feat: remove vim-go
parent
647b20e500
commit
2c72db44df
|
@ -65,7 +65,11 @@
|
||||||
All configs are in
|
All configs are in
|
||||||
<a href="https://github.com/haunt98/dotfiles">my dotfiles</a>.
|
<a href="https://github.com/haunt98/dotfiles">my dotfiles</a>.
|
||||||
</p>
|
</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><leader><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<CR><span class="pl-pds">"</span></span>)</pre>
|
||||||
|
</div>
|
||||||
<p>Search multiple words:</p>
|
<p>Search multiple words:</p>
|
||||||
<div class="highlight highlight-source-viml">
|
<div class="highlight highlight-source-viml">
|
||||||
<pre>:/<span class="pl-cce">\v</span>word1|word2|word3</pre>
|
<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><leader>cm<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:FZFCommands<CR><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><leader>cm<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:FZFCommands<CR><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><C-n><span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeToggle<CR><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><C-n><span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeToggle<CR><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><leader>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeFindFile<CR><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><leader>n<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:NvimTreeFindFile<CR><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><leader>tr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:lua MiniTrailspace.trim()<CR><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><leader>tr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:lua MiniTrailspace.trim()<CR><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><F2><span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoRename<CR><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><leader>gf<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoFillStruct<CR>:w<CR><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><leader>gat<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoAlternate<CR><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><leader>gt<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoTest<CR><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><leader>gr<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoReferrers<CR><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><leader>gcv<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoCoverage<CR><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><leader>gdd<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>:GoDeclsDir<CR><span class="pl-pds">"</span></span>)</pre>
|
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -195,6 +192,18 @@ vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span clas
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</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><F2></code>: rename</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -4,7 +4,12 @@
|
||||||
|
|
||||||
All configs are in [my dotfiles](https://github.com/haunt98/dotfiles).
|
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:
|
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", "<C-n>", ":NvimTreeToggle<CR>")
|
||||||
vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>")
|
vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>")
|
||||||
vim.keymap.set("n", "<leader>tr", ":lua MiniTrailspace.trim()<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:
|
- 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
|
- `sa`: add surround
|
||||||
- `sd`: delete surround
|
- `sd`: delete surround
|
||||||
- `sr`: replace 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
|
## Reference
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue