Breaking change for non-whichkey users | Refactor mapping functions

This commit is contained in:
siduck 2022-05-29 15:08:53 +05:30
parent c5bcf9d9a1
commit 0f013d4e7b
6 changed files with 85 additions and 192 deletions

View file

@ -22,14 +22,8 @@ M.on_attach = function(client, bufnr)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
local options = require("plugins.configs.whichkey").options
local lsp_mappings = { nvchad.load_config().mappings.lspconfig }
lsp_mappings[1]["mode_opts"] = { buffer = bufnr }
if not nvchad.whichKey_map(lsp_mappings, options) then
nvchad.no_WhichKey_map(lsp_mappings)
end
local lsp_mappings = nvchad.load_config().mappings.lspconfig
nvchad.load_mappings({ lsp_mappings }, { buffer = bufnr })
end
local capabilities = vim.lsp.protocol.make_client_capabilities()