updated lsp
This commit is contained in:
parent
0c33aac6d8
commit
09e11561fb
|
|
@ -22,7 +22,6 @@ local common_servers = {
|
||||||
"zls",
|
"zls",
|
||||||
-- "gleam",
|
-- "gleam",
|
||||||
"intelephense",
|
"intelephense",
|
||||||
"vtsls",
|
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"html",
|
"html",
|
||||||
"vimls",
|
"vimls",
|
||||||
|
|
@ -96,6 +95,7 @@ end
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
local opts = {noremap = true, silent = true}
|
local opts = {noremap = true, silent = true}
|
||||||
vim.api.nvim_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
vim.api.nvim_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||||
|
vim.api.nvim_set_keymap("n", "gs", "<Cmd>VtsExec goto_source_definition<CR>", opts)
|
||||||
vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||||
vim.api.nvim_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
vim.api.nvim_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||||
vim.api.nvim_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
vim.api.nvim_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||||
|
|
@ -137,6 +137,18 @@ require "lspconfig".jsonls.setup {
|
||||||
|
|
||||||
require("lspconfig.configs").vtsls = require("vtsls").lspconfig
|
require("lspconfig.configs").vtsls = require("vtsls").lspconfig
|
||||||
|
|
||||||
|
require("lspconfig").vtsls.setup(
|
||||||
|
{
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
autoUseWorkspaceTsdk = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
require "lspconfig".eslint.setup {
|
require "lspconfig".eslint.setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
root_dir = util.root_pattern(
|
root_dir = util.root_pattern(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue