Configure CLS and chplcheck
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
This commit is contained in:
parent
7747bb47e2
commit
3e6a62b798
|
@ -59,6 +59,7 @@ set guifont=Iosevka:h35 " Use Ioeska in frontends.
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
|
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
|
||||||
|
autocmd ColorScheme * highlight Comment ctermfg=green
|
||||||
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ " Highlight trailing whitespace
|
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ " Highlight trailing whitespace
|
||||||
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
|
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
|
||||||
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
|
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').tsserver.setup{}
|
||||||
lua require('lspconfig').elmls.setup{}
|
lua require('lspconfig').elmls.setup{}
|
||||||
lua require('lspconfig').pylsp.setup{}
|
lua require('lspconfig').pylsp.setup{}
|
||||||
|
lua require('lspconfig').pyright.setup{}
|
||||||
|
|
||||||
" All these language servers can be used for symbols-outline
|
" All these language servers can be used for symbols-outline
|
||||||
lua require("symbols-outline").setup()
|
lua require("symbols-outline").setup()
|
||||||
|
@ -143,3 +145,35 @@ lua << EOF
|
||||||
search = { command = "ag", },
|
search = { command = "ag", },
|
||||||
}
|
}
|
||||||
EOF
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user