From 49730b5f3c2739cfb8efedc99cc340a7cbdab774 Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 28 Oct 2023 13:09:04 -0300 Subject: [PATCH] Update from obsidian - Affected files: notes/utils/Neovim.md projects/quests.md --- notes/utils/Neovim.md | 54 +++++++++++++++++++++++++++++++++++++++---- projects/quests.md | 1 + 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/notes/utils/Neovim.md b/notes/utils/Neovim.md index 4f6f72b..35b4034 100644 --- a/notes/utils/Neovim.md +++ b/notes/utils/Neovim.md @@ -1,23 +1,65 @@ -## Formatters + +## Config +### Formatters Hay que añadirlos en `plugins/formatters.lua`, pueden ser instalados con mason. -## Linters +### Linters Hay que añadirlos en `plugins/linters.lua`, pueden ser instalados con mason. -## LSP +### LSP Hay que añadirlos en `plugins/lsp.lua`, son instalados automáticamente al ser agregados aquí con mason. ## Remember to use: +### Misc + +- In visual mode, you can use `J` or `K` to move the selection +- With alt + hjkl I can resize the window, I can restore the size with ` =` +- `r` tiene keymaps para search and replace + +### LSP y code actions + +- `la` -> Code action by lsp +- `lA` -> Node action by Treesitter +- `lm` -> Toggle node join split (arrays, objects, etc) +- `lr` -> rename symbol +- `fd` -> See disagnostics in file +- `fD` -> See disagnostics in workspace +- `gr` -> List reference of symbol in telescope + +### Git + +Puedo invocar comandos de git directamente desde neovim con `:Git ...` + ### Harpoon Fast navigation with `[hjkl]` +### Buffers + +Puedo hacer pin a ciertos buffers para no cerrarlos con `bp` y cerrar todos los buffers no pineados con `bP` + +Puedo cerrar los otros buffers no activos con `bO` + ### Treesitter -#### Text objects +TODO: Research movemet with Treesitter + +### Text objects + +Los text objects se utilizan en la forma de ==acción - motion==, Ej: `vi{` es `selecciona dentro de los { }` + +Acciones: +- v -> visual selection +- d -> delete +- c -> change +- gc -> comment + +Text objects available: +- f -> function +- t -> html tag ### Surround plugin @@ -41,6 +83,10 @@ works for: - Comments (`gc`) - Visual selection +### Telescope + +- [Browser plugins mappigns](https://github.com/nvim-telescope/telescope-file-browser.nvim#mappings) + ## Plugins compatibility errors Lazy.nvim tiene un `lazy-lock.json`, por lo que ante cualquier problema de compatibilidad, podemos volver a versión especificada aqui con `Lazy restore`. Es importante mantener este archivo en git y solo modificarlo cuando se esté seguro que no hay problemas de compatibilidad. \ No newline at end of file diff --git a/projects/quests.md b/projects/quests.md index 353f538..0c02836 100644 --- a/projects/quests.md +++ b/projects/quests.md @@ -42,6 +42,7 @@ kanban-plugin: basic - [ ] Aprender a usar diffview en git - neovim - [ ] Aprender a usar registers en neovim - [ ] Reseach mindfullness +- [ ] Treesitter movement in neovim ## Waiting for...