feat: remove vim-go

main
sudo pacman -Syu 2023-06-29 17:29:18 +07:00
parent 647b20e500
commit 2c72db44df
2 changed files with 29 additions and 17 deletions

View File

@ -65,7 +65,11 @@
All configs are in
<a href="https://github.com/haunt98/dotfiles">my dotfiles</a>.
</p>
<p>Use both <code>\</code> and <code>;</code> as leader key.</p>
<p>Use both <code>\</code> and <code>;</code> as leader key:</p>
<div class="highlight highlight-source-lua">
<pre>vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>;<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;<span class="pl-pds">"</span></span>, { remap <span class="pl-k">=</span> <span class="pl-c1">true</span> })
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>q<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:q&lt;CR&gt;<span class="pl-pds">"</span></span>)</pre>
</div>
<p>Search multiple words:</p>
<div class="highlight highlight-source-viml">
<pre>:/<span class="pl-cce">\v</span>word1|word2|word3</pre>
@ -120,14 +124,7 @@ vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span clas
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;cm<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:FZFCommands&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;C-n&gt;<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeToggle&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeFindFile&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;tr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:lua MiniTrailspace.trim()&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;F2&gt;<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoRename&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gf<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoFillStruct&lt;CR&gt;:w&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gat<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoAlternate&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gt<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoTest&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoReferrers&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gcv<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoCoverage&lt;CR&gt;<span class="pl-pds">"</span></span>)
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;gdd<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoDeclsDir&lt;CR&gt;<span class="pl-pds">"</span></span>)</pre>
vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>&lt;leader&gt;tr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:lua MiniTrailspace.trim()&lt;CR&gt;<span class="pl-pds">"</span></span>)</pre>
</div>
<ul>
<li>
@ -195,6 +192,18 @@ vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span clas
</li>
</ul>
</li>
<li>
With
<a href="https://github.com/neovim/nvim-lspconfig"
>neovim/nvim-lspconfig</a
>
<ul>
<li><code>gd</code>: go to definition</li>
<li><code>gr</code>: go to references</li>
<li><code>K</code>: hover</li>
<li><code>&lt;F2&gt;</code>: rename</li>
</ul>
</li>
</ul>
<h2>
<a

View File

@ -4,7 +4,12 @@
All configs are in [my dotfiles](https://github.com/haunt98/dotfiles).
Use both `\` and `;` as leader key.
Use both `\` and `;` as leader key:
```lua
vim.keymap.set("n", ";", "<leader>", { remap = true })
vim.keymap.set("n", "q", ":q<CR>")
```
Search multiple words:
@ -50,13 +55,6 @@ vim.keymap.set("n", "<leader>cm", ":FZFCommands<CR>")
vim.keymap.set("n", "<C-n>", ":NvimTreeToggle<CR>")
vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>")
vim.keymap.set("n", "<leader>tr", ":lua MiniTrailspace.trim()<CR>")
vim.keymap.set("n", "<F2>", ":GoRename<CR>")
vim.keymap.set("n", "<leader>gf", ":GoFillStruct<CR>:w<CR>")
vim.keymap.set("n", "<leader>gat", ":GoAlternate<CR>")
vim.keymap.set("n", "<leader>gt", ":GoTest<CR>")
vim.keymap.set("n", "<leader>gr", ":GoReferrers<CR>")
vim.keymap.set("n", "<leader>gcv", ":GoCoverage<CR>")
vim.keymap.set("n", "<leader>gdd", ":GoDeclsDir<CR>")
```
- With [nvim-tree/nvim-tree.lua](https://github.com/nvim-tree/nvim-tree.lua), inside nvim-tree:
@ -81,6 +79,11 @@ vim.keymap.set("n", "<leader>gdd", ":GoDeclsDir<CR>")
- `sa`: add surround
- `sd`: delete surround
- `sr`: replace surround
- With [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
- `gd`: go to definition
- `gr`: go to references
- `K`: hover
- `<F2>`: rename
## Reference