added: latest nvim configuration
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
|
||||
-- Configuration documentation can be found with `:h astrolsp`
|
||||
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||
@@ -39,20 +41,18 @@ return {
|
||||
servers = {
|
||||
-- "pyright"
|
||||
},
|
||||
-- customize language server configuration options passed to `lspconfig`
|
||||
---@diagnostic disable: missing-fields
|
||||
-- customize language server configuration passed to `vim.lsp.config`
|
||||
-- client specific configuration can also go in `lsp/` in your configuration root (see `:h lsp-config`)
|
||||
config = {
|
||||
ts_ls = {},
|
||||
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
-- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
|
||||
},
|
||||
-- customize how language servers are attached
|
||||
handlers = {
|
||||
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
|
||||
-- function(server, opts) require("lspconfig")[server].setup(opts) end
|
||||
-- a function with the key `*` modifies the default handler, functions takes the server name as the parameter
|
||||
-- ["*"] = function(server) vim.lsp.enable(server) end
|
||||
|
||||
-- the key is the server that is being setup with `lspconfig`
|
||||
-- the key is the server that is being setup with `vim.lsp.config`
|
||||
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
|
||||
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
|
||||
},
|
||||
-- Configure buffer local auto commands to add when attaching a language server
|
||||
autocmds = {
|
||||
@@ -95,7 +95,7 @@ return {
|
||||
},
|
||||
},
|
||||
-- A custom `on_attach` function to be run after the default `on_attach` function
|
||||
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
|
||||
-- takes two parameters `client` and `bufnr` (`:h lsp-attach`)
|
||||
on_attach = function(client, bufnr)
|
||||
-- this would disable semanticTokensProvider for all clients
|
||||
-- client.server_capabilities.semanticTokensProvider = nil
|
||||
|
||||
Reference in New Issue
Block a user