diff --git a/coc-settings.json b/coc-settings.json index 5cf2378..07edc9b 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -75,6 +75,10 @@ "command": "bash-language-server", "args": ["start"], "filetypes": ["sh"] + }, + "kotlin": { + "command": "kotlin-language-server", + "filetypes": ["kotlin"] } }, "git.enableGutters": true diff --git a/init.vim b/init.vim index dd830b0..752bfad 100644 --- a/init.vim +++ b/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() diff --git a/lua/general.lua b/lua/general.lua index cf9235e..a9b3e3b 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -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,