From d4fb1e4d4ecba70a0ffb1d00325c254f88de23b8 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 4 Sep 2023 22:15:12 +0200 Subject: [PATCH] feat(nvim): adapt config due to plugin updates --- users/myuser/graphical/default.nix | 2 + users/myuser/neovim/init.lua | 8 +-- users/myuser/neovim/lua/plugins/neo-tree.lua | 62 ++++++++++---------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/users/myuser/graphical/default.nix b/users/myuser/graphical/default.nix index b22dcb1..17a628c 100644 --- a/users/myuser/graphical/default.nix +++ b/users/myuser/graphical/default.nix @@ -17,6 +17,8 @@ # TODO VP9 hardware video decoding blocklisted # TODO gpg switch to sk + # TODO some font icons not showing + # TODO seogue ui shellAliases = { p = "cd ~/projects"; diff --git a/users/myuser/neovim/init.lua b/users/myuser/neovim/init.lua index 3ac3e8d..abc039b 100644 --- a/users/myuser/neovim/init.lua +++ b/users/myuser/neovim/init.lua @@ -59,7 +59,7 @@ return packer.startup(function(use) -- Replace built-in LSP prompts and windows use { "stevearc/dressing.nvim", config = conf_setup "dressing" } -- Status updates for LSP progress in right bottom corner. - use { "j-hui/fidget.nvim", after = "nvim-lspconfig", config = conf_setup "fidget" } + use { "j-hui/fidget.nvim", after = "nvim-lspconfig", config = conf_setup "fidget", tag = "legacy" } -- Show latex math equations use { "jbyuki/nabla.nvim", config = conf_fn "nabla" } -- Show colors @@ -99,8 +99,8 @@ return packer.startup(function(use) use "johmsalas/text-case.nvim" -- camelcase (and similar) word motions and textobjects use { "chaoren/vim-wordmotion", config = conf_fn "wordmotion" } - -- Codex completion - use { "tom-doerr/vim_codex" } + -- Respect editor-config files + use { "gpanders/editorconfig.nvim" } ---------------------------------------------------------------------------------------------------- -- Functionality @@ -135,7 +135,7 @@ return packer.startup(function(use) ---------------------------------------------------------------------------------------------------- -- Snippet engine - use { "L3MON4D3/LuaSnip" } + use { "L3MON4D3/LuaSnip", tag = "v1.*" } -- Completion engine use { "hrsh7th/nvim-cmp", config = conf_module "cmp", after = "LuaSnip" } -- Luasnip completion source diff --git a/users/myuser/neovim/lua/plugins/neo-tree.lua b/users/myuser/neovim/lua/plugins/neo-tree.lua index ecd1b94..2cbc8b7 100644 --- a/users/myuser/neovim/lua/plugins/neo-tree.lua +++ b/users/myuser/neovim/lua/plugins/neo-tree.lua @@ -1,7 +1,7 @@ vim.cmd [[let g:neo_tree_remove_legacy_commands = 1]] -local notify = function(message, level) - vim.notify(message, level, { title = "NeoTree" }) -end +-- local notify = function(message, level) +-- vim.notify(message, level, { title = "NeoTree" }) +-- end require("neo-tree").setup { sort_case_insensitive = true, @@ -63,37 +63,39 @@ require("neo-tree").setup { }, }, group_empty_dirs = true, - follow_current_file = true, + follow_current_file = { + enabled = true, + }, use_libuv_file_watcher = true, filtered_items = { hide_dotfiles = false, hide_by_name = { ".git" }, }, }, - event_handlers = { - { - event = "file_added", - handler = function(arg) - notify("Added: " .. arg, "info") - end, - }, - { - event = "file_deleted", - handler = function(arg) - notify("Deleted: " .. arg, "info") - end, - }, - { - event = "file_renamed", - handler = function(args) - notify("Renamed: " .. args.source .. " -> " .. args.destination, "info") - end, - }, - { - event = "file_moved", - handler = function(args) - notify("Moved: " .. args.source .. " -> " .. args.destination, "info") - end, - }, - }, + -- event_handlers = { + -- { + -- event = "file_added", + -- handler = function(arg) + -- notify("Added: " .. arg, "info") + -- end, + -- }, + -- { + -- event = "file_deleted", + -- handler = function(arg) + -- notify("Deleted: " .. arg, "info") + -- end, + -- }, + -- { + -- event = "file_renamed", + -- handler = function(args) + -- notify("Renamed: " .. args.source .. " -> " .. args.destination, "info") + -- end, + -- }, + -- { + -- event = "file_moved", + -- handler = function(args) + -- notify("Moved: " .. args.source .. " -> " .. args.destination, "info") + -- end, + -- }, + -- }, }