From 2c72db44df2df70830a515c70c28ef941841c661 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Thu, 29 Jun 2023 17:29:18 +0700 Subject: [PATCH] feat: remove vim-go --- docs/2023-05-03-neovim.html | 27 ++++++++++++++++++--------- posts/2023-05-03-neovim.md | 19 +++++++++++-------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/docs/2023-05-03-neovim.html b/docs/2023-05-03-neovim.html index c1ec6d1..9ea9f83 100644 --- a/docs/2023-05-03-neovim.html +++ b/docs/2023-05-03-neovim.html @@ -65,7 +65,11 @@ All configs are in my dotfiles.

-

Use both \ and ; as leader key.

+

Use both \ and ; as leader key:

+
+
vim.keymap.set("n", ";", "<leader>", { remap = true })
+vim.keymap.set("n", "q", ":q<CR>")
+

Search multiple words:

:/\vword1|word2|word3
@@ -120,14 +124,7 @@ vim.keymap.set(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>") +vim.keymap.set("n", "<leader>tr", ":lua MiniTrailspace.trim()<CR>")
+
  • + With + neovim/nvim-lspconfig + +
  • ", { remap = true }) +vim.keymap.set("n", "q", ":q") +``` Search multiple words: @@ -50,13 +55,6 @@ vim.keymap.set("n", "cm", ":FZFCommands") vim.keymap.set("n", "", ":NvimTreeToggle") vim.keymap.set("n", "n", ":NvimTreeFindFile") vim.keymap.set("n", "tr", ":lua MiniTrailspace.trim()") -vim.keymap.set("n", "", ":GoRename") -vim.keymap.set("n", "gf", ":GoFillStruct:w") -vim.keymap.set("n", "gat", ":GoAlternate") -vim.keymap.set("n", "gt", ":GoTest") -vim.keymap.set("n", "gr", ":GoReferrers") -vim.keymap.set("n", "gcv", ":GoCoverage") -vim.keymap.set("n", "gdd", ":GoDeclsDir") ``` - 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", "gdd", ":GoDeclsDir") - `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 + - ``: rename ## Reference