From 8811e6fedd52cf5b2858e8dc8de7f335e5278729 Mon Sep 17 00:00:00 2001
From: Matei Adriel <rafaeladriel11@gmail.com>
Date: Mon, 4 Apr 2022 11:55:57 +0300
Subject: [PATCH] docs: more docs ig

---
 dotfiles/neovim/README.md                    | 34 ++++++++++++++++++--
 dotfiles/neovim/lua/my/plugins/lspconfig.lua | 12 +++----
 dotfiles/neovim/lua/my/plugins/telescope.lua |  4 ++-
 3 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/dotfiles/neovim/README.md b/dotfiles/neovim/README.md
index 20d21c1..8d8adba 100644
--- a/dotfiles/neovim/README.md
+++ b/dotfiles/neovim/README.md
@@ -2,7 +2,7 @@
 
 ## Keybinds
 
-Table of my own keybinds. Here as documentation for myself. I am yet to include any of the keybinds for the lspconfig, telescope or cmp here.
+Table of my own keybinds. Here as documentation for myself. I am yet to include any of the keybinds for cmp here.
 
 > Things written using italics are chords
 > (aka all the keys need to be pressed at the same time)
@@ -12,15 +12,43 @@ Table of my own keybinds. Here as documentation for myself. I am yet to include
 | vv               | Create vertical split                       |                    |
 | \<Space>\<Space> | Save                                        |                    |
 | jj               | Exit insert mode                            |                    |
-| C-n              | Open tree                                   | nvim-tree          |
-| _vp_             | Run command in another tmux pane            | vimux, arpeggio    |
 | _<leader>k_      | Insert digraph                              |                    |
 | _<leader>a_      | Swap last 2 used buffers                    |                    |
+| C-n              | Open tree                                   | nvim-tree          |
+| _vp_             | Run command in another tmux pane            | vimux              |
 | _sk_             | Move to previous lh-bracket marker          | lh-brackets        |
 | _sj_             | Move to next lh-bracket marker              | lh-brackets        |
 | _mo_             | Move outside the current brackets           | lh-brackets        |
 | _ml_             | Remove all markers and move to the last one | lh-brackets        |
 | C-hjkl           | Navigation between vim & tmux panes         | vim-tmux-navigator |
+| J                | Show line diagnostics                       | lspconfig          |
+| K                | Show hover info                             | lspconfig          |
+| L                | Signature help (?)                          | lspconfig          |
+| gD               | Go to declaration                           | lspconfig          |
+| gd               | Go to definition                            | lspconfig          |
+| gi               | Go to implementation                        | lspconfig          |
+| <leader>rn       | Rename                                      | lspconfig          |
+| <leader>f        | format                                      | lspconfig          |
+
+### Lh-brackets
+
+The default brackets I load in each buffer are (), [], "", '', {} and \`\`. Different brackets are added in different filetypes.
+
+### Telescope
+
+| Keybind    | Description                    | Plugins                |
+| ---------- | ------------------------------ | ---------------------- |
+| Ctrl-P     | Find files                     |                        |
+| Ctrl-F     | Grep in project                |                        |
+| <leader>d  | Diagnostics                    | lspconfig              |
+| <leader>wd | Workspace diagnostics          | lspconfig              |
+| <leader>ca | Code actions                   | lspconfig              |
+| <leader>t  | Show builtin pickers           |                        |
+| <leader>s  | Show symbols using tree-sitter |                        |
+| <leader>gj | List git commits               |                        |
+| <leader>gk | List git branches              |                        |
+| <leader>p  | Interactive file broswer       | telescope-file-browser |
+| _ui_       | Insert unicode char            |                        |
 
 ### Idris
 
diff --git a/dotfiles/neovim/lua/my/plugins/lspconfig.lua b/dotfiles/neovim/lua/my/plugins/lspconfig.lua
index 05445a7..eba77dd 100644
--- a/dotfiles/neovim/lua/my/plugins/lspconfig.lua
+++ b/dotfiles/neovim/lua/my/plugins/lspconfig.lua
@@ -31,19 +31,19 @@ function M.on_attach(client, bufnr)
     map(bufnr, 'n', 'L', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
 
     -- Workspace stuff
-    map(bufnr, 'n', '<space>wa',
+    map(bufnr, 'n', '<leader>wa',
         '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>')
-    map(bufnr, 'n', '<space>wr',
+    map(bufnr, 'n', '<leader>wr',
         '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>')
-    map(bufnr, 'n', '<space>wl',
+    map(bufnr, 'n', '<leader>wl',
         '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>')
 
     -- Code actions
-    map(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>')
-    map(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
+    map(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>')
+    map(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
     -- map(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>')
     map(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>')
-    map(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>')
+    map(bufnr, 'n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>')
 end
 
 local function on_attach_typescript(client, bufnr)
diff --git a/dotfiles/neovim/lua/my/plugins/telescope.lua b/dotfiles/neovim/lua/my/plugins/telescope.lua
index 155bdaf..ab7be4c 100644
--- a/dotfiles/neovim/lua/my/plugins/telescope.lua
+++ b/dotfiles/neovim/lua/my/plugins/telescope.lua
@@ -28,7 +28,9 @@ local bindings = {
     },
     ["extensions.file_browser.file_browser"] = "<Leader>p",
     extensions = {
-        unicode = {picker = {mode = "i", kind = "dropdown", key = "uu"}}
+        unicode = {
+            picker = {mode = "i", kind = "dropdown", key = "ui", chord = 1}
+        }
     }
 }