248 current 2024-03-20 12:46:51 24.05.20240319.b06025f 6.8.0-zen1 *
This commit is contained in:
parent
8290a9cfe1
commit
beb60ea1ec
2 changed files with 19 additions and 17 deletions
|
|
@ -1,27 +1,29 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.set_autocmd = function(client, bufnr)
|
M.set_autocmd = function(client, bufnr)
|
||||||
local capability_map = require("lsp.autocmd")
|
local capability_map = require("lsp.autocmd")
|
||||||
|
|
||||||
for capability, map in pairs(capability_map) do
|
for capability, map in pairs(capability_map) do
|
||||||
if client.supports_method(capability) then
|
if client.supports_method(capability) then
|
||||||
vim.api.nvim_clear_autocmds({ group = map.opts.group, buffer = bufnr })
|
vim.api.nvim_clear_autocmds({ group = map.opts.group, buffer = bufnr })
|
||||||
map.opts.buffer = bufnr
|
map.opts.buffer = bufnr
|
||||||
vim.api.nvim_create_autocmd(map.event, map.opts)
|
vim.api.nvim_create_autocmd(map.event, map.opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
M.set_keymaps = function(client, bufnr)
|
M.set_keymaps = function(client, bufnr)
|
||||||
local capability_map = require("lsp.keymaps")
|
local capability_map = require("lsp.keymaps")
|
||||||
|
|
||||||
for capability, maps in pairs(capability_map) do
|
for capability, maps in pairs(capability_map) do
|
||||||
if client.supports_method(capability) then
|
if client.supports_method(capability) then
|
||||||
for key, map in pairs(maps) do
|
for key, map in pairs(maps) do
|
||||||
vim.keymap.set("n", key, map[1], { desc = map[2], buffer = bufnr })
|
vim.keymap.set("n", key, map[1], { desc = map[2], buffer = bufnr })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require("lspconfig").tsserver.setup({})
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
"overseer.nvim": { "branch": "master", "commit": "b72f6d23ce47ccd427be2341f389c63448278f17" },
|
"overseer.nvim": { "branch": "master", "commit": "b72f6d23ce47ccd427be2341f389c63448278f17" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
|
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
|
||||||
"promise-async": { "branch": "main", "commit": "93540c168c5ed2b030ec3e6c40ab8bbb85e36355" },
|
"promise-async": { "branch": "main", "commit": "93540c168c5ed2b030ec3e6c40ab8bbb85e36355" },
|
||||||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
"rustaceanvim": { "branch": "master", "commit": "b0548ff58d34caa220f8806c518fedb6453fc48e" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "4d798fd5b692c8fce77268aba8f6f926b0c9f835" },
|
"schemastore.nvim": { "branch": "main", "commit": "4d798fd5b692c8fce77268aba8f6f926b0c9f835" },
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
|
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue