From 7529d2b7f94a7d44ac8fc57d4c3f43710c0b2c47 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 7 Aug 2023 15:35:47 +0000 Subject: [PATCH 1/4] flake: bump inputs --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index b3c3e01..a6f5424 100644 --- a/flake.lock +++ b/flake.lock @@ -131,11 +131,11 @@ ] }, "locked": { - "lastModified": 1691039228, - "narHash": "sha256-iPNZJ1LvfUf1Y456ewC0DXgf99TNssG8OLObOyqxO6M=", + "lastModified": 1691312444, + "narHash": "sha256-J9e9dGwAPTX+UlAn8jehoyaEq6fwK+L+gunfx0cYT4E=", "owner": "nix-community", "repo": "home-manager", - "rev": "86dd48d70a2e2c17e84e747ba4faa92453e68d4a", + "rev": "903e06d734bcae48efb79b9afd51b406d2744179", "type": "github" }, "original": { @@ -147,11 +147,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1691006197, - "narHash": "sha256-DbtxVWPt+ZP5W0Usg7jAyTomIM//c3Jtfa59Ht7AV8s=", + "lastModified": 1691368598, + "narHash": "sha256-ia7li22keBBbj02tEdqjVeLtc7ZlSBuhUk+7XTUFr14=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "66aedfd010204949cb225cf749be08cb13ce1813", + "rev": "5a8e9243812ba528000995b294292d3b5e120947", "type": "github" }, "original": { @@ -163,11 +163,11 @@ }, "nur": { "locked": { - "lastModified": 1691139289, - "narHash": "sha256-cZtqvYztpGwLtAsfrzY2VeTfFdW3HBwX7m1KV2Zy2nw=", + "lastModified": 1691410813, + "narHash": "sha256-khyrWULs4+wHc3c545yHchsK/p8Ej4vAx7Tflgeq1oE=", "owner": "nix-community", "repo": "NUR", - "rev": "cb20b89d5b355c53a18dd149e7104a67381c7c17", + "rev": "7038553b4660dbac2a11f24ceb9f7282b1ece316", "type": "github" }, "original": { @@ -192,11 +192,11 @@ ] }, "locked": { - "lastModified": 1691093055, - "narHash": "sha256-sjNWYpDHc6vx+/M0WbBZKltR0Avh2S43UiDbmYtfHt0=", + "lastModified": 1691397944, + "narHash": "sha256-4fa4bX3kPYKpEssgrFRxRCPVXczidArDeSWaUMSzQAU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "ebb43bdacd1af8954d04869c77bc3b61fde515e4", + "rev": "e5588ddffd4c3578547a86ef40ec9a6fbdae2986", "type": "github" }, "original": { From 7ace62da72a5988ee091964a75a022ff2610b539 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 7 Aug 2023 15:37:35 +0000 Subject: [PATCH 2/4] home: vim: use async path completion This makes the editor more responsive when completing in directories that are network mounted or have a large amount of entries. --- home/vim/default.nix | 1 + home/vim/plugin/settings/completion.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/home/vim/default.nix b/home/vim/default.nix index 1aad3c1..a9c2bda 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -77,6 +77,7 @@ in luasnip # Snippet manager compatible with LSP friendly-snippets # LSP snippets collection nvim-cmp # Completion engine + cmp-async-path # More responsive path completion cmp-buffer # Words from open buffers cmp-nvim-lsp # LSP suggestions cmp-nvim-lua # NeoVim lua API diff --git a/home/vim/plugin/settings/completion.lua b/home/vim/plugin/settings/completion.lua index 2d150e8..0ed8c7f 100644 --- a/home/vim/plugin/settings/completion.lua +++ b/home/vim/plugin/settings/completion.lua @@ -37,7 +37,7 @@ cmp.setup({ entries = "native", }, sources = { - { name = "path", priority_weight = 110 }, + { name = "async_path", priority_weight = 110 }, { name = "nvim_lsp", priority_weight = 100 }, { name = "nvim_lua", priority_weight = 90 }, { name = "luasnip", priority_weight = 80 }, From 5c9394f5e5b58ed92673ea0a44e3bf0c934b65ed Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 10:38:42 +0100 Subject: [PATCH 3/4] WIP: home: vim: notify --- home/vim/after/plugin/mappings/telescope.lua | 2 ++ home/vim/default.nix | 1 + home/vim/plugin/settings/notify.lua | 14 ++++++++++++++ home/vim/plugin/settings/telescope.lua | 1 + 4 files changed, 18 insertions(+) create mode 100644 home/vim/plugin/settings/notify.lua diff --git a/home/vim/after/plugin/mappings/telescope.lua b/home/vim/after/plugin/mappings/telescope.lua index 0867b36..e0d38a7 100644 --- a/home/vim/after/plugin/mappings/telescope.lua +++ b/home/vim/after/plugin/mappings/telescope.lua @@ -1,4 +1,5 @@ local wk = require("which-key") +local telescope = require("telescope") local telescope_builtin = require("telescope.builtin") local keys = { @@ -9,6 +10,7 @@ local keys = { F = { telescope_builtin.find_files, "Files" }, g = { telescope_builtin.live_grep, "Grep string" }, G = { telescope_builtin.grep_string, "Grep string under cursor" }, + n = { telescope.extensions.notify.notify, "Notification history" }, }, } diff --git a/home/vim/default.nix b/home/vim/default.nix index a9c2bda..9b8ba86 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -88,6 +88,7 @@ in # UX improvements dressing-nvim # Integrate native UI hooks with Telescope etc... gitsigns-nvim # Fast git UI integration + nvim-notify # Better notification API nvim-surround # Deal with pairs, now in Lua telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions diff --git a/home/vim/plugin/settings/notify.lua b/home/vim/plugin/settings/notify.lua new file mode 100644 index 0000000..b68c90f --- /dev/null +++ b/home/vim/plugin/settings/notify.lua @@ -0,0 +1,14 @@ +local notify = require("notify") + +notify.setup({ + icons = { + DEBUG = "D", + ERROR = "E", + INFO = "I", + TRACE = "T", + WARN = "W", + }, + stages = "slide", +}) + +vim.notify = notify diff --git a/home/vim/plugin/settings/telescope.lua b/home/vim/plugin/settings/telescope.lua index 4548ec5..ed8ebc7 100644 --- a/home/vim/plugin/settings/telescope.lua +++ b/home/vim/plugin/settings/telescope.lua @@ -22,3 +22,4 @@ telescope.setup({ telescope.load_extension("fzf") telescope.load_extension("lsp_handlers") +telescope.load_extension("notify") From f08f24cdbaf42f12dd8ad366510e07bc1bb9f6ee Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 7 Aug 2023 10:51:01 +0000 Subject: [PATCH 4/4] WIP: home: vim: LSP notify --- home/vim/default.nix | 1 + home/vim/plugin/settings/notify.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/home/vim/default.nix b/home/vim/default.nix index 9b8ba86..12a1a5a 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -89,6 +89,7 @@ in dressing-nvim # Integrate native UI hooks with Telescope etc... gitsigns-nvim # Fast git UI integration nvim-notify # Better notification API + nvim-lsp-notify # LSP event notification, using nvim-notify nvim-surround # Deal with pairs, now in Lua telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions diff --git a/home/vim/plugin/settings/notify.lua b/home/vim/plugin/settings/notify.lua index b68c90f..189b4be 100644 --- a/home/vim/plugin/settings/notify.lua +++ b/home/vim/plugin/settings/notify.lua @@ -1,4 +1,5 @@ local notify = require("notify") +local lsp_notify = require("lsp-notify") notify.setup({ icons = { @@ -12,3 +13,5 @@ notify.setup({ }) vim.notify = notify + +lsp_notify.setup({})