nvim/plug: -coc.nvim -neomake +mason.nvim@main +mason-lspconfig.nvim@main

This commit is contained in:
Paul Stemmet 2022-08-28 08:55:37 +00:00
parent bb4fa19006
commit bb937f9db7
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
7 changed files with 31 additions and 41 deletions

View File

@ -4,7 +4,7 @@ return function()
local defaults = { local defaults = {
always_show_bufferline = true, always_show_bufferline = true,
numbers = "none", numbers = "none",
diagnostics = 'coc', diagnostics = false,
offsets = {{ offsets = {{
filetype = 'neo-tree', filetype = 'neo-tree',
text = 'File Explorer', text = 'File Explorer',

View File

@ -1,19 +0,0 @@
return function()
local fn, g = vim.fn, vim.g
local au = require 'psoxizsh.autocmd'
g['coc_global_extensions'] = {
'coc-yank',
'coc-spell-checker',
'coc-vimlsp',
'coc-rust-analyzer',
'coc-json',
'coc-markdownlint',
'coc-yaml'
}
au.PsoxCocAutos {
{ 'CursorHold', '*', function() fn.CocActionAsync('highlight') end },
{ 'User', 'CocJumpPlaceholder', function() fn.CocActionAsync('showSignatureHelp') end },
}
end

View File

@ -24,7 +24,7 @@ return function()
color = file_color, color = file_color,
} }
local branch = { 'b:gitsigns_head', icon = '', color = { gui = 'bold' } } local branch = { 'b:gitsigns_head', icon = '', color = { gui = 'bold' } }
local diagnostics = { 'diagnostics', sources = { 'coc' }, update_in_insert = true } local diagnostics = { 'diagnostics', sources = { 'nvim_diagnostic' }, update_in_insert = true }
local diff = { 'diff', source = diff_source } local diff = { 'diff', source = diff_source }
local defaults = { local defaults = {

View File

@ -0,0 +1,13 @@
return function()
local mason_lsp, util = require 'mason-lspconfig', require 'psoxizsh.util'
-- https://github.com/williamboman/mason-lspconfig.nvim#default-configuration
local defaults = {
-- https://github.com/williamboman/mason-lspconfig.nvim#available-lsp-servers
ensure_installed = {},
automatic_installation = true,
}
mason_lsp.setup(util.mconfig('config.mason-lsp', defaults))
end

View File

@ -0,0 +1,7 @@
return function()
local mason, util = require 'mason', require 'psoxizsh.util'
local defaults = {}
return mason.setup(util.mconfig('config.mason', defaults))
end

View File

@ -1,14 +0,0 @@
return function()
local g, fn = vim.g, vim.fn
-- Don't move cursor into qf/loc on open
g.neomake_open_list = 2
-- Allow multiple makers to resolve
g.neomake_serialize = 1
g.neomake_serialize_abort_on_error = 1
-- Let Neomake control window size
g.qf_auto_resize = 0
fn['neomake#configure#automake']('rw', 800)
end

View File

@ -77,13 +77,16 @@ local plugins = {
}, },
-- IDE stuff + language highlighting -- IDE stuff + language highlighting
{ 'neoclide/coc.nvim', { 'williamboman/mason.nvim',
disable = vim.fn.executable('node') ~= 1, as = 'mason',
branch = 'release', branch = 'main',
config = require 'psoxizsh.plugins.config.coc' config = require 'psoxizsh.plugins.config.mason'
}, },
{ 'neomake/neomake', { 'williamboman/mason-lspconfig.nvim',
config = require 'psoxizsh.plugins.config.neomake' as = 'mason-lspconfig',
branch = 'main',
after = 'mason',
config = require 'psoxizsh.plugins.config.mason-lsp'
}, },
{ 'vim-perl/vim-perl', { 'vim-perl/vim-perl',
ft = 'perl', ft = 'perl',