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
|
@ -75,6 +75,10 @@
|
|||
"command": "bash-language-server",
|
||||
"args": ["start"],
|
||||
"filetypes": ["sh"]
|
||||
},
|
||||
"kotlin": {
|
||||
"command": "kotlin-language-server",
|
||||
"filetypes": ["kotlin"]
|
||||
}
|
||||
},
|
||||
"git.enableGutters": true
|
||||
|
|
7
init.vim
7
init.vim
|
@ -4,7 +4,12 @@ call plug#begin()
|
|||
Plug 'kyazdani42/nvim-web-devicons' " optional, for file icons
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
|
||||
" neovim lsp plugins
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'williamboman/mason.nvim'
|
||||
Plug 'williamboman/mason-lspconfig.nvim'
|
||||
Plug 'jose-elias-alvarez/null-ls.nvim'
|
||||
|
||||
Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'preservim/nerdcommenter'
|
||||
|
@ -31,7 +36,7 @@ Plug 'bluz71/vim-moonfly-colors'
|
|||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' }
|
||||
Plug 'BurntSushi/ripgrep'
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
"Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue