add mason plugin for managing lsp servers and dependencies
This commit is contained in:
parent
c2a666b2cd
commit
c94463ac84
3 changed files with 36 additions and 4 deletions
|
@ -2,10 +2,33 @@
|
|||
vim.g.loaded = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- load perl lsp
|
||||
require('lspconfig').perlpls.setup{}
|
||||
-- load lsp stuff
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- load perl lsp
|
||||
local config = {
|
||||
cmd = { 'pls' }, -- complete path to where PLS is located
|
||||
settings = {
|
||||
pls = {
|
||||
--inc = { '/my/perl/5.34/lib', '/some/other/perl/lib' }, -- add list of dirs to @INC
|
||||
--cwd = { '/my/projects' }, -- working directory for PLS
|
||||
perlcritic = { enabled = true }, -- use perlcritic and pass a non-default location for its config
|
||||
syntax = { enabled = true, perl = '/usr/bin/perl' }, -- enable syntax checking and use a non-default perl binary
|
||||
--perltidy = { perltidyrc = '/my/projects/.perltidyrc' } -- non-default location for perltidy's config
|
||||
}
|
||||
}
|
||||
}
|
||||
require'lspconfig'.perlpls.setup(config)
|
||||
|
||||
-- OR setup with some options
|
||||
require("nvim-tree").setup({
|
||||
create_in_closed_folder = true,
|
||||
hijack_cursor = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue