diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index 1499a40..892ef38 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -7,14 +7,6 @@ enable = true; settings = { - # Run the formatter on file save. - format_on_save = { - lspFallback = true; - timeoutMs = 500; - }; - # Receive notificaton when a formatter errors. - notifyOnError = true; - # Map of filetype to formatters. formatters_by_ft = { c = ["clang-format"]; @@ -34,6 +26,25 @@ command = lib.getExe pkgs.stylua; }; }; + + # Receive notificaton when a formatter errors. + notifyOnError = true; }; }; + + # Keymaps for conform.nvim + keymaps = [ + { + mode = ""; + key = "f"; + action.__raw = '' + function() + require('conform').format { async = true, lsp_fallback = true } + end + ''; + options = { + desc = "Format buffer"; + }; + } + ]; } diff --git a/config/plugins/utils/telescope.nix b/config/plugins/utils/telescope.nix index 9e01993..8adffe1 100644 --- a/config/plugins/utils/telescope.nix +++ b/config/plugins/utils/telescope.nix @@ -18,10 +18,10 @@ # Configure our telescope keymaps. keymaps = { # File Pickers - "ff" = { + "sf" = { action = "find_files"; options = { - desc = "Find project files"; + desc = "Search project files"; }; }; "/" = { @@ -32,10 +32,10 @@ }; # Vim Pickers - "fb" = { + "sb" = { action = "buffers"; options = { - desc = "Find open buffers"; + desc = "Search open buffers"; }; }; ":" = { diff --git a/config/plugins/utils/whichkey.nix b/config/plugins/utils/whichkey.nix index cfeac59..7501f1e 100644 --- a/config/plugins/utils/whichkey.nix +++ b/config/plugins/utils/whichkey.nix @@ -5,15 +5,6 @@ # Prefixes, No operation. keymaps = [ - { - mode = "n"; - key = "f"; - action = ""; - options = { - desc = "+find/files"; - }; - } - { mode = "n"; key = "s";