- added nlua (lua neovim) debug configuration
This commit is contained in:
@ -20,7 +20,7 @@ return { -- LSP Configuration & Plugins
|
||||
map('gd', function() vim.lsp.buf.definition() end, '[G]oto [D]efinition')
|
||||
-- map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
-- map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
map('<leader>gd', require('telescope.builtin').lsp_type_definitions, '[G]oto Type [D]efinition')
|
||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
-- map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
@ -34,7 +34,8 @@ return { -- LSP Configuration & Plugins
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
if client and client:supports_method(
|
||||
vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
@ -46,6 +47,13 @@ return { -- LSP Configuration & Plugins
|
||||
})
|
||||
end
|
||||
|
||||
if client and client:supports_method(
|
||||
vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||
map('<leader>ti', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
||||
end, "[T]oggle [I]nlay")
|
||||
end
|
||||
|
||||
-- autoformat
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = event.buf,
|
||||
@ -84,7 +92,8 @@ return { -- LSP Configuration & Plugins
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
["${3rd}/luv/library"] = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user