diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 6ca53d4..a92bff2 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -59,6 +59,7 @@ set guifont=Iosevka:h35 " Use Ioeska in frontends. set hidden autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red +autocmd ColorScheme * highlight Comment ctermfg=green autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ " Highlight trailing whitespace autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice @@ -98,6 +99,7 @@ lua require('lspconfig').clangd.setup{} lua require('lspconfig').tsserver.setup{} lua require('lspconfig').elmls.setup{} lua require('lspconfig').pylsp.setup{} +lua require('lspconfig').pyright.setup{} " All these language servers can be used for symbols-outline lua require("symbols-outline").setup() @@ -143,3 +145,35 @@ lua << EOF search = { command = "ag", }, } EOF + +lua << EOF + local lspconfig = require 'lspconfig' + local configs = require 'lspconfig.configs' + local util = require 'lspconfig.util' + + configs.chplcheck = { + default_config = { + cmd = {"chplcheck", "--lsp", "--enable-rule", "UnusedFormal", "--enable-rule", "UnusedLoopIndex"}, + filetypes = {'chpl'}, + autostart = true, + single_file_support = true, + root_dir = util.find_git_ancestor, + settings = {}, + }, + } + + configs.chpllsp = { + default_config = { + cmd = {"/Users/daniel.fedorin/Documents/software/chapel/tools/chpl-language-server/chpl-language-server", "--resolver"}, + filetypes = {'chpl'}, + autostart = true, + single_file_support = true, + root_dir = util.find_git_ancestor, + settings = {}, + }, + } + + lspconfig.chplcheck.setup{} + lspconfig.chpllsp.setup{} + vim.cmd("autocmd BufRead,BufNewFile *.chpl set filetype=chpl") +EOF