add perlcritic, add mason automated lsp servers install
This commit is contained in:
parent
82cbc247fa
commit
cb1507b292
1 changed files with 25 additions and 14 deletions
|
@ -2,14 +2,27 @@
|
||||||
vim.g.loaded = 1
|
vim.g.loaded = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
-- load lsp stuff
|
-- load lsp and dependencies (help for both coc and independent lsp setup)
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"bashls",
|
||||||
|
"pyright",
|
||||||
|
"perlnavigator",
|
||||||
|
"salt_ls",
|
||||||
|
"dockerls",
|
||||||
|
"kotlin_language_server",
|
||||||
|
"intelephense",
|
||||||
|
"phpactor",
|
||||||
|
"eslint"
|
||||||
|
}
|
||||||
|
})
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua,
|
require("null-ls").builtins.formatting.stylua,
|
||||||
require("null-ls").builtins.diagnostics.eslint,
|
require("null-ls").builtins.diagnostics.eslint,
|
||||||
require("null-ls").builtins.completion.spell,
|
require("null-ls").builtins.completion.spell,
|
||||||
|
require("null-ls").builtins.code_actions.gitsigns,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -27,19 +40,17 @@ codewindow.apply_default_keybinds()
|
||||||
|
|
||||||
|
|
||||||
-- load perl lsp
|
-- load perl lsp
|
||||||
local config = {
|
require'lspconfig'.perlnavigator.setup{
|
||||||
cmd = { 'pls' }, -- complete path to where PLS is located
|
settings = {
|
||||||
settings = {
|
perlnavigator = {
|
||||||
pls = {
|
perlPath = 'perl',
|
||||||
--inc = { '/my/perl/5.34/lib', '/some/other/perl/lib' }, -- add list of dirs to @INC
|
enableWarnings = true,
|
||||||
--cwd = { '/my/projects' }, -- working directory for PLS
|
perltidyProfile = '',
|
||||||
perlcritic = { enabled = true }, -- use perlcritic and pass a non-default location for its config
|
perlcriticProfile = '',
|
||||||
syntax = { enabled = true, perl = '/usr/bin/perl' }, -- enable syntax checking and use a non-default perl binary
|
perlcriticEnabled = true,
|
||||||
--perltidy = { perltidyrc = '/my/projects/.perltidyrc' } -- non-default location for perltidy's config
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
require'lspconfig'.perlpls.setup(config)
|
|
||||||
|
|
||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
create_in_closed_folder = true,
|
create_in_closed_folder = true,
|
||||||
|
|
Loading…
Reference in a new issue