new go binds and format readme tables
This commit is contained in:
parent
2239bd1539
commit
7612d675b2
4 changed files with 79 additions and 66 deletions
|
|
@ -58,7 +58,7 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim
|
||||||
Я не помню откуда эти бинды, может они есть в стоке, а может нет, но они полезные.
|
Я не помню откуда эти бинды, может они есть в стоке, а может нет, но они полезные.
|
||||||
|
|
||||||
| Bind | Description |
|
| Bind | Description |
|
||||||
| -------------- | ---------------------------------- |
|
|---------------------|-------------------------------------|
|
||||||
| `K` | Hover documentation |
|
| `K` | Hover documentation |
|
||||||
| `ctrl+o` | Go back |
|
| `ctrl+o` | Go back |
|
||||||
| `ctrl+i` | Go forward (if you went backwards) |
|
| `ctrl+i` | Go forward (if you went backwards) |
|
||||||
|
|
@ -78,8 +78,8 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim
|
||||||
Бинды в таблице ниже нажимаются без пробела перед ними. Просто бинд
|
Бинды в таблице ниже нажимаются без пробела перед ними. Просто бинд
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------|----------------|
|
||||||
| <nobr>`esc esc`</nobr> | Exit terminal mode (This won't work in all terminal emulators/tmux/etc. Try your own mapping or use `<C-\><C-n>` to exit terminal mode) | settings.lua |
|
| `esc esc` | Exit terminal mode (This won't work in all terminal emulators/tmux/etc. Try your own mapping or use `<C-\><C-n>` to exit terminal mode) | settings.lua |
|
||||||
| `esc` | Creal highlights on search when pressing Esc in normal mode | settings.lua |
|
| `esc` | Creal highlights on search when pressing Esc in normal mode | settings.lua |
|
||||||
| `gp` | `G`oto context (`p`arent) | treesitter.lua |
|
| `gp` | `G`oto context (`p`arent) | treesitter.lua |
|
||||||
| `gd` | `G`oto `D`efinition | lsp.lua |
|
| `gd` | `G`oto `D`efinition | lsp.lua |
|
||||||
|
|
@ -92,15 +92,17 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim
|
||||||
Перед каждым из биндов в нижней таблице надо нажать `leader`, что есть `space`, пробел.
|
Перед каждым из биндов в нижней таблице надо нажать `leader`, что есть `space`, пробел.
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
|
||||||
| `tt` | `T`oggle `T`erminal | terminal.lua |
|
| `tt` | `T`oggle `T`erminal | terminal.lua |
|
||||||
| `gta` | `G`o `T`ag `A`dd. Add json tags for struct | golang.lua |
|
| `gta` | `G`o `T`ag `A`dd. Add json tags for struct | golang.lua |
|
||||||
| `gtr` | `G`o `T`ag `R`emove. Remove json tags for struct | golang.lua |
|
| `gtr` | `G`o `T`ag `R`emove. Remove json tags for struct | golang.lua |
|
||||||
| `gfs` | `G`o `F`ill `S`truct | golang.lua |
|
| `gs` | `G`o fill `S`truct | golang.lua |
|
||||||
| `gfc` | `G`o `F`ill Switch `C`ase | golang.lua |
|
| `gc` | `G`o fill Switch `C`ase | golang.lua |
|
||||||
| `gie` | `G`o `I`f `E`rr | golang.lua |
|
| `gp` | `G`o fix `P`lurals (change func foo(b int, a int, r int) -> func foo(b, a, r int)) | golang.lua |
|
||||||
| `gfp` | `G`o `F`ix `P`lurals | golang.lua |
|
| `ge` | `G`o if `E`rr | golang.lua |
|
||||||
| `D` | Type `D`efinition. Jump to the typo of the word under your cursor. Useful when you're not sure what type a variable is and you want to see the definition of its *type*, not where it was *defined*. | lsp.lua |
|
| `gi` | `G`o `I`mports | golang.lua |
|
||||||
|
| `D` | Type `D`efinition. Jump to the typo of the word under your cursor. | lsp.lua |
|
||||||
|
| | Useful when you're not sure what type a variable is and you want to see the definition of its *type*, not where it was *defined*. | |
|
||||||
| `ds` | `D`ocument `S`ymbols. Fuzzy find all the symbols in your current document. Symbols are things like variables, funckions, types, etc. | lsp.lua |
|
| `ds` | `D`ocument `S`ymbols. Fuzzy find all the symbols in your current document. Symbols are things like variables, funckions, types, etc. | lsp.lua |
|
||||||
| `ws` | `W`orkspace `S`ymbols. Fuzzy find all the symbols in your currend workspace. Similar to document symbols, except searches over you entire project | lsp.lua |
|
| `ws` | `W`orkspace `S`ymbols. Fuzzy find all the symbols in your currend workspace. Similar to document symbols, except searches over you entire project | lsp.lua |
|
||||||
| `rn` | `R`e`n`ame. Rename the variable under your cursor. Most Language Servers support renaming across files, etc. | lsp.lua |
|
| `rn` | `R`e`n`ame. Rename the variable under your cursor. Most Language Servers support renaming across files, etc. | lsp.lua |
|
||||||
|
|
@ -130,19 +132,19 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim
|
||||||
Без пробела
|
Без пробела
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---- | ----------------------------- | ------------ |
|
|------|-------------------------------|--------------|
|
||||||
| `]c` | Jump to next git `C`hange | gitsigns.lua |
|
| `]c` | Jump to next git `C`hange | gitsigns.lua |
|
||||||
| `[c` | Jump to previous git `C`hange | gitsigns.lua |
|
| `[c` | Jump to previous git `C`hange | gitsigns.lua |
|
||||||
Visual mode. С пробелом
|
Visual mode. С пробелом
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---- | ---------------- | ------------ |
|
|------|------------------|--------------|
|
||||||
| `hs` | `S`tage git hunk | gitsigns.lua |
|
| `hs` | `S`tage git hunk | gitsigns.lua |
|
||||||
| `hr` | `R`eset git hunk | gitsigns.lua |
|
| `hr` | `R`eset git hunk | gitsigns.lua |
|
||||||
Normal mode. С пробелом
|
Normal mode. С пробелом
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---- | ------------------------------ | ------------ |
|
|------|--------------------------------|--------------|
|
||||||
| `hs` | Git `S`tage hunk | gitsigns.lua |
|
| `hs` | Git `S`tage hunk | gitsigns.lua |
|
||||||
| `hr` | Git `R`eset hunk | gitsigns.lua |
|
| `hr` | Git `R`eset hunk | gitsigns.lua |
|
||||||
| `hS` | Git `S`tage buffer | gitsigns.lua |
|
| `hS` | Git `S`tage buffer | gitsigns.lua |
|
||||||
|
|
@ -159,7 +161,7 @@ Normal mode. С пробелом
|
||||||
Без пробела
|
Без пробела
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---- | ------------------------------ | --------- |
|
|------|--------------------------------|-----------|
|
||||||
| `F5` | Debug: Start/Continue | debug.lua |
|
| `F5` | Debug: Start/Continue | debug.lua |
|
||||||
| `F1` | Debug: Step Into | debug.lua |
|
| `F1` | Debug: Step Into | debug.lua |
|
||||||
| `F2` | Debug: Step Over | debug.lua |
|
| `F2` | Debug: Step Over | debug.lua |
|
||||||
|
|
@ -168,7 +170,7 @@ Normal mode. С пробелом
|
||||||
С пробелом
|
С пробелом
|
||||||
|
|
||||||
| Bind | Description | File |
|
| Bind | Description | File |
|
||||||
| ---- | -------------------------- | --------- |
|
|------|----------------------------|-----------|
|
||||||
| `b` | Debug: Toggle `B`reakpoint | debug.lua |
|
| `b` | Debug: Toggle `B`reakpoint | debug.lua |
|
||||||
| `B` | Debug: Set `B`reakpoint | debug.lua |
|
| `B` | Debug: Set `B`reakpoint | debug.lua |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,14 @@ require('lazy').setup({
|
||||||
-- Plugins for git
|
-- Plugins for git
|
||||||
require 'custom.plugins.git',
|
require 'custom.plugins.git',
|
||||||
|
|
||||||
|
-- Autoformat markdown tables
|
||||||
|
{
|
||||||
|
'Kicamon/markdown-table-mode.nvim',
|
||||||
|
config = function()
|
||||||
|
require('markdown-table-mode').setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
--
|
--
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" },
|
"lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" },
|
||||||
"luvit-meta": { "branch": "main", "commit": "55709f183b0742a7e4f47688c284f81148ad4dc0" },
|
"luvit-meta": { "branch": "main", "commit": "55709f183b0742a7e4f47688c284f81148ad4dc0" },
|
||||||
|
"markdown-table-mode.nvim": { "branch": "main", "commit": "870d0449c1c78c673faa9637a63036f9537b4caa" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,12 @@ return {
|
||||||
require('go').setup()
|
require('go').setup()
|
||||||
vim.keymap.set({ 'n' }, '<leader>gta', ':GoAddTag<CR>', { desc = '[G]o [T]ag [A]dd' })
|
vim.keymap.set({ 'n' }, '<leader>gta', ':GoAddTag<CR>', { desc = '[G]o [T]ag [A]dd' })
|
||||||
vim.keymap.set({ 'n' }, '<leader>gtr', ':GoRmTag<CR>', { desc = '[G]o [T]ag [R]emove' })
|
vim.keymap.set({ 'n' }, '<leader>gtr', ':GoRmTag<CR>', { desc = '[G]o [T]ag [R]emove' })
|
||||||
vim.keymap.set({ 'n' }, '<leader>gfs', ':GoFillStruct<CR>', { desc = '[G]o [F]ill [S]truct' })
|
vim.keymap.set({ 'n' }, '<leader>gs', ':GoFillStruct<CR>', { desc = '[G]o fill [S]truct' })
|
||||||
vim.keymap.set({ 'n' }, '<leader>gfc', ':GoFillSwitch<CR>', { desc = '[G]o [F]ill Switch [C]ase' })
|
vim.keymap.set({ 'n' }, '<leader>gc', ':GoFillSwitch<CR>', { desc = '[G]o fill Switch [C]ase' })
|
||||||
vim.keymap.set({ 'n' }, '<leader>gie', ':GoIfErr<CR>', { desc = '[G]o [I]f [E]rr' })
|
-- Go Fix Plurals - change func foo(b int, a int, r int) -> func foo(b, a, r int)
|
||||||
vim.keymap.set({ 'n' }, '<leader>gfp', ':GoFixPlurals<CR>', { desc = '[G]o [F]ix [P]lurals' })
|
vim.keymap.set({ 'n' }, '<leader>gp', ':GoFixPlurals<CR>', { desc = '[G]o fix [P]lurals' })
|
||||||
|
vim.keymap.set({ 'n' }, '<leader>ge', ':GoIfErr<CR>', { desc = '[G]o if [E]rr' })
|
||||||
|
vim.keymap.set({ 'n' }, '<leader>gi', ':GoImports<CR>', { desc = '[G]o [I]mports' })
|
||||||
end,
|
end,
|
||||||
event = { 'CmdlineEnter' },
|
event = { 'CmdlineEnter' },
|
||||||
ft = { 'go', 'gomod' },
|
ft = { 'go', 'gomod' },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue