1
Fork 0

docs: more docs ig

This commit is contained in:
Matei Adriel 2022-04-04 11:55:57 +03:00
parent 6fe5826a29
commit 8811e6fedd
3 changed files with 40 additions and 10 deletions

View file

@ -2,7 +2,7 @@
## Keybinds ## 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 > Things written using italics are chords
> (aka all the keys need to be pressed at the same time) > (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 | | | vv | Create vertical split | |
| \<Space>\<Space> | Save | | | \<Space>\<Space> | Save | |
| jj | Exit insert mode | | | jj | Exit insert mode | |
| C-n | Open tree | nvim-tree |
| _vp_ | Run command in another tmux pane | vimux, arpeggio |
| _<leader>k_ | Insert digraph | | | _<leader>k_ | Insert digraph | |
| _<leader>a_ | Swap last 2 used buffers | | | _<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 | | _sk_ | Move to previous lh-bracket marker | lh-brackets |
| _sj_ | Move to next lh-bracket marker | lh-brackets | | _sj_ | Move to next lh-bracket marker | lh-brackets |
| _mo_ | Move outside the current brackets | lh-brackets | | _mo_ | Move outside the current brackets | lh-brackets |
| _ml_ | Remove all markers and move to the last one | lh-brackets | | _ml_ | Remove all markers and move to the last one | lh-brackets |
| C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator | | 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 ### Idris

View file

@ -31,19 +31,19 @@ function M.on_attach(client, bufnr)
map(bufnr, 'n', 'L', '<cmd>lua vim.lsp.buf.signature_help()<CR>') map(bufnr, 'n', 'L', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
-- Workspace stuff -- Workspace stuff
map(bufnr, 'n', '<space>wa', map(bufnr, 'n', '<leader>wa',
'<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>') '<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>') '<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>') '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>')
-- Code actions -- Code actions
map(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>') map(bufnr, 'n', '<leader>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>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
-- map(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<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', '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 end
local function on_attach_typescript(client, bufnr) local function on_attach_typescript(client, bufnr)

View file

@ -28,7 +28,9 @@ local bindings = {
}, },
["extensions.file_browser.file_browser"] = "<Leader>p", ["extensions.file_browser.file_browser"] = "<Leader>p",
extensions = { extensions = {
unicode = {picker = {mode = "i", kind = "dropdown", key = "uu"}} unicode = {
picker = {mode = "i", kind = "dropdown", key = "ui", chord = 1}
}
} }
} }