diff --git a/lazy-lock.json b/lazy-lock.json index e107fbf..925c97b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,4 +1,5 @@ { + "99": { "branch": "master", "commit": "0172d3caae2d8b967c9d47aa7557295f1481e5df" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" }, "SchemaStore.nvim": { "branch": "main", "commit": "55ca969ceed5209d62cbf4c20cef023ff188b6c5" }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 269f7c9..ef6cecb 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -190,6 +190,11 @@ return { vim.lsp.config("gopls", { capabilities = capabilities, filetypes = { "go", "gomod", "gowork", "gotmpl", "gohtml" }, + settings = { + gopls = { + buildFlags = { "-tags=integration" } + } + } }) vim.lsp.enable("gopls") diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index fddd72b..2d47107 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -1,29 +1,55 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - require("neo-tree").setup({ + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + require("neo-tree").setup({ filesystem = { use_libuv_file_watcher = true, filtered_items = { visible = true, - } + }, + }, + window = { + mappings = { + ["Y"] = { + function(state) + local node = state.tree:get_node() + local path = node:get_id() + vim.fn.setreg("+", path, "c") + vim.notify("Copied: " .. path .. " to clipboard") + end, + desc = "Copy path to clipboard", + }, + ["O"] = { + function(state) + local node = state.tree:get_node() + vim.notify("Opening: " .. node.path) + + local _, err = vim.ui.open(node.path) + + if err then + vim.notify("Error opening explorer: " .. err, vim.log.levels.ERROR) + end + end, + desc = "Open in default app", + }, + ["P"] = { "toggle_preview", config = { use_float = false } }, + }, }, event_handlers = { - { - event = "file_open_requested", - handler = function() - vim.cmd("Neotree close") - end - }, - - } + { + event = "file_open_requested", + handler = function() + vim.cmd("Neotree close") + end, + }, + }, }) vim.keymap.set("n", "", ":Neotree filesystem reveal right", { desc = "Neotree show explorer" }) - end, + end, }