mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
make inspect() global
This commit is contained in:
parent
ab88c112ff
commit
cad9f5a214
@ -13,7 +13,7 @@ local custom_attach = function(client, bufnr)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<space>wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
|
||||
vim.keymap.set("n", "<space>wl", function() inspect(vim.lsp.buf.list_workspace_folders()) end, opts)
|
||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
local fn = vim.fn
|
||||
|
||||
-- inspect something
|
||||
function inspect(item)
|
||||
function _G.inspect(item)
|
||||
vim.pretty_print(item)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user