1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

remove inspect() from lua _G table

Nvim nows provides `vim.inspect()` and `vim.print()`.
This commit is contained in:
jdhao 2024-09-01 21:46:22 +02:00
parent 51f81093da
commit db380ca7a7
2 changed files with 1 additions and 6 deletions

View File

@ -43,7 +43,7 @@ local custom_attach = function(client, bufnr)
map("n", "<space>wa", vim.lsp.buf.add_workspace_folder, { desc = "add workspace folder" }) map("n", "<space>wa", vim.lsp.buf.add_workspace_folder, { desc = "add workspace folder" })
map("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, { desc = "remove workspace folder" }) map("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, { desc = "remove workspace folder" })
map("n", "<space>wl", function() map("n", "<space>wl", function()
inspect(vim.lsp.buf.list_workspace_folders()) vim.print(vim.lsp.buf.list_workspace_folders())
end, { desc = "list workspace folder" }) end, { desc = "list workspace folder" })
-- Set some key bindings conditional on server capabilities -- Set some key bindings conditional on server capabilities

View File

@ -3,11 +3,6 @@ local api = vim.api
local utils = require('utils') local utils = require('utils')
-- Inspect something
function _G.inspect(item)
vim.print(item)
end
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- custom variables -- -- custom variables --
------------------------------------------------------------------------ ------------------------------------------------------------------------