diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-17 19:08:57 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-17 19:08:57 +0200 |
commit | 531de7d6d78c4c15f97c4a08c5606abcfdb7e699 (patch) | |
tree | 0a8a965db04a5a7b2000511cb9e9cbce67e6de29 | |
parent | 2c97afab40a98c99a471342a519023f6e775e98e (diff) |
Update which-key format and switch win
-rw-r--r-- | fnl/config/which-key.fnl | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 65252da..e78f038 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -75,7 +75,7 @@ "Document Diagnostics"] :w ["<cmd>Telescope lsp_workspace_diagnostics<cr>" "Workspace Diagnostics"] - :f ["<cmd>lua vim.lsp.buf.formatting()<cr>" :Format] + :f ["<cmd>lua vim.lsp.buf.format { async = true }<cr>" :Format] :i [:<cmd>LspInfo<cr> :Info] :I [:<cmd>LspInstallInfo<cr> "Installer Info"] :j ["<cmd>lua vim.lsp.diagnostic.goto_next()<CR>" "Next Diagnostic"] @@ -86,15 +86,12 @@ :s ["<cmd>Telescope lsp_document_symbols<cr>" "Document Symbols"] :S ["<cmd>Telescope lsp_dynamic_workspace_symbols<cr>" "Workspace Symbols"]} - :s {:name :Search - :b ["<cmd>Telescope git_branches<cr>" "Checkout branch"] - :c ["<cmd>Telescope colorscheme<cr>" :Colorscheme] - :h ["<cmd>Telescope help_tags<cr>" "Find Help"] - :M ["<cmd>Telescope man_pages<cr>" "Man Pages"] - :r ["<cmd>Telescope oldfiles<cr>" "Open Recent File"] - :R ["<cmd>Telescope registers<cr>" :Registers] - :k ["<cmd>Telescope keymaps<cr>" :Keymaps] - :C ["<cmd>Telescope commands<cr>" :Commands]} + :s [(fn switch-window [] + (let [window-picker (require :window-picker)] + (let [win (window-picker.pick_window)] + (if (not= win nil) + (nvim.set_current_win win))))) + "Switch window"] :o {:name :Orgmode :a ["<cmd>lua require('orgmode').action('agenda.prompt')" "Open agenda prompt"] |