mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 12:15:29 +00:00
fix(nvim): warning with already attached buffer
This commit is contained in:
@@ -4,7 +4,7 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
-- stylua: ignore
|
||||
vim.keymap.set("n", "g0", "<cmd>Telescope lsp_document_symbols<cr>", { buffer = buffer, desc = "Document Symbols" })
|
||||
vim.keymap.set("n", "cc", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = buffer, desc = "Code Action" })
|
||||
end)
|
||||
@@ -15,7 +15,6 @@ return {
|
||||
astro = {},
|
||||
cssls = {},
|
||||
cssmodules_ls = {},
|
||||
denols = {},
|
||||
diagnosticls = {},
|
||||
emmet_ls = {},
|
||||
graphql = {},
|
||||
@@ -23,22 +22,14 @@ return {
|
||||
jsonls = {},
|
||||
lua_ls = {},
|
||||
svelte = {},
|
||||
tsserver = {},
|
||||
denols = {
|
||||
root_dir = require("lspconfig").util.root_pattern("deno.json", "deno.jsonc"),
|
||||
},
|
||||
tsserver = {
|
||||
root_dir = require("lspconfig").util.root_pattern("package.json"),
|
||||
single_file_support = false,
|
||||
},
|
||||
yamlls = {},
|
||||
},
|
||||
},
|
||||
setup = function()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
nvim_lsp.denols.setup({
|
||||
on_attach = on_attach,
|
||||
root_dir = nvim_lsp.util.root_pattern("deno.json", "deno.jsonc"),
|
||||
})
|
||||
|
||||
nvim_lsp.tsserver.setup({
|
||||
on_attach = on_attach,
|
||||
root_dir = nvim_lsp.util.root_pattern("package.json"),
|
||||
single_file_support = false,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user