diff --git a/lazy-lock.json b/lazy-lock.json index dd0196e..5eda8b7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,13 +11,15 @@ "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, "neogit": { "branch": "master", "commit": "9bc4ee89bb42be31a2f0b1da41e36e3e6cab9bbb" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lspconfig": { "branch": "master", "commit": "0ef64599b8aa0187ee5f6d92cb39c951f348f041" }, "nvim-treesitter": { "branch": "master", "commit": "a1573a9135c608e68cb383f752623527be84bdce" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "orgmode": { "branch": "master", "commit": "e3500add486b17da58ce8e42a0f799161e5761c9" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, - "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" } + "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, + "workspaces.nvim": { "branch": "master", "commit": "0b03d3f2ffe38729b1792905ec447405ed76cb6e" } } diff --git a/lua/keybindings.lua b/lua/keybindings.lua index 43e385a..28c3ffa 100644 --- a/lua/keybindings.lua +++ b/lua/keybindings.lua @@ -5,10 +5,16 @@ vim.keymap.set('n', 'fs', fzf.blines, { desc = "Search buffer" }) vim.keymap.set('n', 'fg', fzf.live_grep, { desc = "Grep" }) vim.keymap.set('n', 'fG', fzf.grep_cword, { desc = "Grep word under cursor" }) vim.keymap.set('n', 'fc', fzf.commands, { desc = "Commands" }) -vim.keymap.set('n', 'fC', fzf.command_history, { desc = "Command history" }) vim.keymap.set('n', 'fm', fzf.manpages, { desc = "Manpages" }) vim.keymap.set('n', 'b', fzf.buffers, { desc = "Buffers" }) -- use fzf buffer lines as default search vim.keymap.set('n', '/', fzf.blines, { desc = "Search buffer" }) + +-- open file manager and git +vim.keymap.set('n', 'g', ":Neogit", { desc = "Git Manager" }) +vim.keymap.set('n', 't', ":Neotree", { desc = "File Manager" }) + +-- configure workspaces +vim.keymap.set('n', 'w', ":WorkspacesOpen", { desc = "Open a workspace" }) diff --git a/lua/lsp.lua b/lua/lsp.lua index ca05cd0..601488b 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -47,7 +47,7 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + -- vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set("n", "f", function() @@ -58,6 +58,7 @@ local on_attach = function(client, bufnr) local fzf = require('fzf-lua') vim.keymap.set('n', 'd', fzf.diagnostics_document , { desc = "Doc diagnostics" }) + vim.keymap.set('n', 'D', fzf.diagnostics_workspace, { desc = "Workspace diagnostics" }) vim.keymap.set('n', 's', fzf.lsp_document_symbols, { desc = "Doc symbols" }) -- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) vim.keymap.set('n', '', fzf.lsp_references, { desc = "Find References" }) diff --git a/lua/options.lua b/lua/options.lua index bce6f6a..06bee03 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -25,7 +25,8 @@ vim.opt.ignorecase = true -- ignore case in searches by default vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered --- Wrapping movements +-- Wrapping movements and long lines vim.opt.whichwrap = "b,s,<,>,[,]" -- wrap backspace, space and left-right cursor keys +vim.opt.wrap = false -- formatoptions not very well set -- vim.opt.formatoptions = "tac" diff --git a/lua/plugins.lua b/lua/plugins.lua index 43f5af9..2a654ca 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -181,4 +181,34 @@ require("lazy").setup({ }, + -- neo-tree file management + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + } + }, + + -- workspaces, lightweight "projects" + { + "natecraddock/workspaces.nvim", + config = function() + require("workspaces").setup { + -- option to automatically activate workspace when opening neovim in a workspace directory + auto_open = true, + + -- option to automatically activate workspace when changing directory not via this plugin + auto_dir = true, + + hooks = { + open = "FzfLua files" + } + } + end + }, + })