- Notifications
You must be signed in to change notification settings - Fork1
arsham/shark
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The goal of this project is to have a fast Neovim startup, provide mappingsthat can be easily memorised, interact with theLua API, and makeprogramming fun.
This setup is mostly customised to forGo (Golang) andRustdevelopment. There is also a few otherLSP servers setup for other LSPservers to work with various file types.
This project supports Neovim version0.10.0
and newer.
- Besides in a few places that Neovim doesn't provide an API in Lua, mostconfiguration is done inLua.
- LSP,Treesitter, andFZF are setup to work together.
- Seamless navigation withtmux.
- Completion withnvim-cmp plugin is setup.
- It is optimised to handle verylarge files.
- There are some handytextobjects such asbackticks andindents.
- You can add the current location of the cursor or makenotes on thecurrent location in thequickfix/local lists with repeatable mappings.
- You canmanipulate quickfix/local lists.
- It comes with integration withgit and gist.
- Has a lot of useful feedback in the gutter.
- Statusline is configures withfeline.
- It is set to give a lot of useful information about the buffer.
- Prettier quickfix buffer and quickfix tools.
- The theme is setup with Lua to take advantage of its performance.
Just clone this project:
$ git clone https://github.com/arsham/shark.git~/.config/nvim
Once you startNeovim
, it will install the package manager and installs thelisted plugins.
Some default mappings/commands are augmented tocentre the buffer after theexecution.
Some mappings/commands are obvious, but I've left them here as a reminder. Someare left out either because they are not used too often, or they are definedafter writing this document and I've forgot to document.
I would recommend you have a look at the code to see what is available to you.
This list might change at any time depending on if there is a betterreplacement or the requirement changes.
Click to view the plugin list
Some plugins are not listed here. You can find the complete list in theplugins folder.
Licenses for plugins can be foundhere.
Function | Plugin | Description |
---|---|---|
🔥 Core | folke/lazy.nvim | Package manager |
🔥 Visual | arsham/arshamiser.nvim | Status line, colour scheme and folds |
🔥 Lists | arsham/listish.nvim | Supporting quickfix and local lists |
🧰 Lib | arsham/arshlib.nvim | Library used in various plugins |
⚡ Visual | nvim-tree/nvim-web-devicons | |
🔍 Finder | junegunn/fzf | Fuzzy finder |
🔍 Finder | junegunn/fzf.vim | fzf plugin for vim |
🔥 Finder | arsham/fzfmania.nvim | Very powerful FZF setup in lua |
🔥 Finder | ibhagwan/fzf-lua | fzf ❤️ lua - fzf frontend |
🧰 Core | nvim-lua/plenary.nvim | |
⏩ Core | tweekmonster/startuptime.vim | Benchmarking startup |
🔁 Core | tpope/vim-repeat | |
🥇 Textobj | arsham/archer.nvim | Mappings and text objects for archers |
🧰 Visuals | MunifTanjim/nui.nvim | UI component |
🥇 Textobj | arsham/indent-tools.nvim | Indent mappings and text object |
🔥 Visuals | arsham/matchmaker.nvim | Creates highlight for user matches |
🛢️ Tool | stevearc/oil.nvim | File explorer |
GIT | tpope/vim-fugitive | git integration |
GIT | tpope/vim-rhubarb | Go to selection's code Github page |
Core | tpope/vim-git | |
🌲 Visuals | nvim-treesitter | Highlighting engine |
🔥 GIT | lewis6991/gitsigns.nvim | git signs in the gutter |
🥇 Textobj | nvim-treesitter-textobjects | Treesitter Text Objects |
🔥 Visuals | freddiehaddad/feline.nvim | Statusline (default) |
🗨️ Visuals | rcarriga/nvim-notify | Better notification UI |
🌈 Visuals | treesitter-refactor | Treesitter plugin |
🗒️ Visuals | nvim-treesitter/playground | Treesitter plugin |
Editing | context-commentstring | |
🥊 Core | andymass/vim-matchup | |
Editing | monaqa/dial.nvim | Enhanced increment/decrement values |
👗 Visuals | stevearc/dressing.nvim | |
GIT | mattn/vim-gist | gist integration |
Core | RaafatTurki/hex.nvim | Hex viewer |
Tool | iamcco/markdown-preview.nvim | |
🧭 Core | numToStr/Navigator.nvim | Seamless navigation with tmux |
📁 Tool | nvim-neo-tree/neo-tree.nvim | File explorer tree |
🪟 Core | s1n7ax/nvim-window-picker | Window picker |
Tool | ralismark/opsort.vim | Sort operator |
Tool | sQVe/sort.nvim | Line-wise and delimiter sorting |
🔭 Tool | dhruvasagar/vim-zoom | Zoom windows |
🥇 Textobj | David-Kunz/treesitter-unit | Treesitter units |
LSP | neovim/nvim-lspconfig | LSP configuration |
LSP | mason.nvim | Package manager for LSP, DAP, etc. |
LSP | mason-lspconfig.nvim | LSP config bridge for mason.nvim |
LSP | hrsh7th/nvim-cmp | Completion with LSP |
LSP | saadparwaiz1/cmp_luasnip | Extension for nvim-cmp |
LSP | L3MON4D3/LuaSnip | Snippet engine |
LSP | hrsh7th/cmp-cmdline | Extension for nvim-cmp |
LSP | friendly-snippets | |
LSP | hrsh7th/cmp-buffer | Extension for nvim-cmp |
LSP | hrsh7th/cmp-calc | Extension for nvim-cmp |
LSP | hrsh7th/cmp-nvim-lsp | Extension for nvim-cmp |
LSP | hrsh7th/lsp-signature-help | Extension for nvim-cmp |
LSP | hrsh7th/cmp-nvim-lua | Extension for nvim-cmp |
LSP | hrsh7th/cmp-path | Extension for nvim-cmp |
LSP | lukas-reineke/cmp-rg | Extension for nvim-cmp |
💡 LSP | j-hui/fidget.nvim | Spinner for LSP status |
📢 LSP | none-ls.nvim | External Tool to LSP bridge |
📢 LSP | mason-null-ls.nvim | Null LS and Mason bridge |
📢 LSP | mason-tool-installer | LSP server installer |
🗒️ Editing | numToStr/Comment.nvim | Comment string |
🗒️ LSP | smjonas/inc-rename.nvim | Incremental renaming |
🗒️ Editing | windwp/nvim-autopairs | |
Editing | arthurxavierx/vim-caser | Case conversion |
🖌️ Visuals | NvChad/nvim-colorizer.lua | Colourise matched colours in buffer |
🦀 Tools | saecki/crates.nvim | Crate.toml helper |
💡 LSP | kosayoda/nvim-lightbulb | Code actions buln |
Editing | gbprod/substitute.nvim | Text exchange operator |
💡 LSP | lsp_lines.nvim | Show LSP diagnostics in extmarks |
👈 Core | milisims/nvim-luaref | |
🗒️ Editing | echasnovski/mini.nvim | For surround, alignments, etc. |
Core | folke/neodev.nvim | |
📆 Tool | nvim-neorg/neorg | Note taking tool |
Lists | kevinhwang91/nvim-bqf | Better quickfix list manager |
Tool | bfredl/nvim-luadev | REPL/debug console for lua plugins |
💡 LSP | SmiteshP/nvim-navic | Current code context with LSP |
Tool | kiran94/s3edit.nvim | Edit files on S3 bucket |
🔍 Tool | woosaaahh/sj.nvim | Search and quickly jump |
Editing | mbbill/undotree | Undo tree browser |
GIT | rbong/vim-flog | git log graph |
🎡 Visual | towolf/vim-helm | Helm syntax highlighting |
Core | tmux-plugins/vim-tmux | |
Editing | mg979/vim-visual-multi | Multiple cursors |
🔫 Core | svban/YankAssassin.vim | Stay where you are after yanking |
Editing | zbirenbaum/copilot.lua | Copilot |
Editing | Exafunction/codeium.vim | Codeium (opensource copilot) |
💡 LSP | utilyre/barbecue.nvim | Complementary to navic |
LSP | uga-rosa/cmp-dynamic | Extension for nvim-cmp |
Tool | stevearc/overseer.nvim | Task runner |
🌈 Tool | ziontee113/color-picker.nvim | Colour picker and updater |
Editing | aduros/ai.vim | OpenAI plugin |
Tool | tamton-aquib/duck.nvim | Fun little ducks |
🕸️ Tool | rest-nvim/rest.nvim | Fast http client in lua |
🧰 Lib | vhyrro/luarocks.nvim | Easily install luarocks with lazy.nvim |
🔍 Tool | arsham/yanker.nvim | Yank history helper |
🗒️ Editing | jbyuki/venn.nvim | Draw ASCII diagrams |
Editing | jackMort/ChatGPT.nvim | ChatGPT |
🔍 Finder | nvim-telescope/telescope.nvim | Fuzzy finder/picker |
Tool | tpope/vim-dadbod | Database connection and query manager |
Note that if copilot is enabled, codeium will be disabled.
In most mappings we are following this theme, unless there is an uncomfortablesituation or messes with a community-driven or Vim's very well known mapping:
Part of mapping | Description |
---|---|
q | Quickfix list mappings |
w | Local list mappings (because it's nearq) |
w | Window |
] | Jumps to the next item |
[ | Jumps to the previous item |
b | Buffer |
f | File,Find |
a | All, or disabling certain constraints |
a | Argument (parameter) |
i | Indent |
m | Match highlighting |
d | Diff,Diagnostics |
h | Hunk |
c | Change,Copilot,Codium |
s | Statement,Scope |
o | Loop |
e | Element |
y | Yank |
t | Tab |
z | Folds, language/spelling |
g | Go/Jump to, run something that goes/jumps to |
n | Neorg related |
r | Rest |
Theleader
key isspace
!
Click to view mappings
Mapping | Description |
---|---|
<Alt-,> | Adds, at the end of current line without moving (repeatable) |
<S-Alt-,> | Removes, from the end of current line without moving (repeatable) |
<Alt-.> | Adds. at the end of current line without moving (repeatable) |
<S-Alt-.> | Removes. from the end of current line without moving (repeatable) |
<Alt-;> | Adds; at the end of current line without moving (repeatable) |
<S-Alt-;> | Removes; from the end of current line without moving (repeatable) |
<Alt-{> | Adds curly brackets at the end of line into insert mode (repeatable) |
[count]]<space> | Inserts [count] empty lines after (repeatable) |
[count][<space> | Inserts [count] empty lines before (repeatable) |
]i | Jump down along theindents |
[i | Jump up along theindents |
<leader>oo | Open theOil buffer. |
<leader>gg | Fugitive git buffer |
<leader>gd | Fugitive gitDiff |
]c | Jump to the nextchange |
[c | Jump to the previouschange |
<leader>gs | (gitsigns) ToggleSigns |
<leader>hb | (gitsigns)Blame line |
<leader>hs | (gitsigns)Stagehunk |
<leader>hl | (gitsigns)Stageline |
<leader>hu | (gitsigns)Unstagehunk |
<leader>hr | (gitsigns)Resethunk |
<leader>hR | (gitsigns)Reset buffer |
<leader>hp | (gitsigns)Previewhunk |
]f | Go to start of the next function |
[f | Go to start of the previous function |
]F | Go to end of the next function |
[F | Go to end of the previous function |
]b | Go to start of the next block |
[b | Go to start of the previous block |
]B | Go to end of the next block |
[B | Go to end of the previous block |
]gc | Go to start of the next comment |
[gc | Go to start of the previous comment |
]a | Go to start of the next parameter |
[a | Go to start of the previous parameter |
]A | Go to end of the next parameter |
[A | Go to end of the previous parameter |
]o | Go to the next loop |
[o | Go to the previous loop |
]s | Go to the next scope |
[s | Go to the previous scope |
<leader>.f | Swap around with the next function |
<leader>,f | Swap around with the previous function |
<leader>.e | Swap with the next element |
<leader>,e | Swap with the previous element |
<leader>.a | Swap with the next parameter |
<leader>,a | Swap with the previous parameter |
<leader>df | Peek function definition |
[count]<Alt-j> | Shifts line(s) down and format |
[count]<Alt-k> | Shifts line(s) up and format |
g= | Re-indents the hole buffer |
<Left> | Reduce vertical size |
<Right> | Increase vertical size |
<Up> | Reduce horizontal size |
<Down> | Increase horizontal size |
<Esc><Esc> | Clear hlsearch |
<leader>gw | Grep currentWord in buffer. Populates the locallist. |
<leader>sp | ToggleSpelling for buffer |
<leader>sf | Autofixes previous misspelled word |
[i]<C-s> | Autofixes previous misspelled word |
<leader>hh | Opens thehelp for current word |
<C-w>b | Delete current buffer |
<C-w><C-b> | Delete current buffer |
<C-w>t | Open current buffer in new tab |
<C-w><C-t> | Open current buffer in new tab |
cn | Initiate acgn on currentword |
[V]cn | Initiate acgn on current visually |
selected string | |
g. | Use last change (anything) as the |
initiate acgn on currentword | |
<leader>zm | Set folding method toManual |
<leader>ze | Set folding method toExpression |
<leader>zi | Set folding method toIndent |
<leader>zk | Set folding method to Marker |
<leader>zs | Set folding method toSyntax |
[c]<Alt-a> | Go to begging of the line |
[c]<Alt-e> | Go to end of the line |
[c]<C-r><C-l> | Copy current line in the buffer |
<Tab><Tab> | Switch to the alternative buffer |
gso | Sort objects |
gsoo | Sort lines |
[s][i]<Ctrl-l> | Next snippet choice |
[s][i]<Ctrl-h> | Previous snippet choice |
[n,v]gc | Comment operator |
<leader>nr | Return fromNeorg buffer |
<leader>nm | Modify code block withNeorg looking-glass |
<leader>nh | Neorg workspaceHme |
<leader>nw | NeorgWorkspace |
<leader>nj | NeorgJournal |
[Neorg]]] | Neorg buffer next heading |
[Neorg][[ | Neorg buffer previous heading |
<leader>us | Unlink all open snippet sessions |
<leader>ce | EnableCopilot |
<leader>cd | DisableCopilot |
<leader>cp | CopilotPanel |
]] | (copilot panel) Jump to the next suggestion |
[[ | (copilot panel) Jump to the previous suggestion |
<CR> | (copilot panel) Accept suggestion |
gr | (copilot panel) Refresh |
<Alt-CR> | (copilot panel) Open |
<Alt-]> | (copilot suggestion) Next suggestion |
<Alt-[> | (copilot suggestion) Previous suggestion |
<C-y><C-y> | (copilot suggestion) Accept whole suggestion |
<C-y><C-w> | (copilot suggestion) Accept a word of suggestion |
<C-y><C-l> | (copilot suggestion) Accept a line of suggestion |
<Ctrl-]> | (copilot suggestion) Dismiss |
<Leader>ce | EnableCodeium |
<Leader>cd | DisableCodeium |
<Leader>or | Run overseer task |
<Leader>ot | Toggle overseer tasks panel |
<Leader>fl | LocateFiles (neess mlocate) |
<Leader>rr | RunRestRequest under cursor |
<Leader>rp | PreviewRestRequest under cursor in cURL command |
<Leader>R | Rreview the lastRestRequest |
<Leader>v | Enable/DisableVenn |
[v]<leader>bd | Base64decode visually selected text |
[v]<leader>be | Base64encode visually selected text |
Note that if copilot is enabled, codeium will be disabled.
There are more specialised mappings provided, keep reading please!
Click to view the text objects
Text Object | Description |
---|---|
i` | In backtick pairs (multi-line) |
a` | Around backtick pairs (multi-line) |
an | AroundNext pairs (current lint) |
in | InNext pairs (current line) |
iN | InNumeric value (can be float too) |
aN | AroundNumeric value |
az | Around folds |
iz | In folds |
ai | AroundIndentation block |
ii | InIndentation block |
ah | AroundHunk |
ih | InHunk |
af | Select around a function |
if | Select inside a function |
am | Select around a method |
im | Select inside a method |
ab | Select around a block |
ib | Select inside a block |
aa | Select around a parameter |
ia | Select inside a parameter |
as | Select around a statement |
H | To the beginning of line |
L | To the end of line |
au | Select around a unit |
iu | Select inside a unit |
il | In line |
al | Around line |
There are sets ofi* anda* text objects, where*
can be any of:_ . : , ; | / \ * + - #
There are a few tools for interacting withquickfix andlocal lists.Following mappings can be used for either cases, all you need to do it tosubstitutew
forq
or vice versa. Generallyq is forquickfix listandw is forlocal list. I chosew because it's besideq and itmakes it easy to think about these two types of lists.
<leader>qq
,<leader>ww
,<leader>qn
and<leader>wn
are repeatable with.!
After adding an item to the list, an indicator in thestatusline will showyou how many items you have in a list.
Click to view mappings for lists
Mapping | Description |
---|---|
<leader>cc | Close both quickfix and local list windows |
<leader>qq | Add current line and column to thequickfix list. |
<leader>qn | Add current line and column with yournote to thequickfix list. |
<leader>qo | Open thequickfix list. |
<leader>qd | Drop thequickfix list. |
<leader>qc | Close thequickfix list. |
]q | Go to the next item in thequickfix list and centre. |
[q | Go to the previous item in thequickfix list and centre. |
<leader>wq | Add current line and column to the locallist. |
<leader>wn | Add current line and column with yournote to the locallist. |
<leader>wo | Open the locallist. |
<leader>wd | Drop the locallist. |
<leader>wc | Close the locallist. |
]w | Go to the next item in the locallist and centre. |
[w | Go to the previous item in the locallist and centre. |
Click to view commands for lists
Command | Description |
---|---|
Clearquickfix | Clear the quickfix list. |
Clearloclist | Clear the local list of current buffer. |
Additional tonvim-bqf bindings,you can do<count>dd
in the quickfix/local list buffers to delete<count>
rows from quickfix/local list buffer.
You canhighlight words with random colours.
<leader>ma
and<leader>me
are repeatable with.!
Click to view the mappings
Note that all these mappings are bound to the current window.
Mapping | Description |
---|---|
<leader>ma | Add current word as a sub-pattern to the highlights. |
<leader>me | Add anexact match on current term. |
<leader>mp | Add an match by asking for apattern. |
<leader>ml | Add currentline |
<leader>md | DeleteMatches with fzf search. |
<leader>mc | Clear allmatched patterns on current window. |
Click to view the mappings
Most actions can apply to multiple selected items if possible.
Mapping | Description |
---|---|
<Ctrl-p> | File list in current folder. |
<Alt-p> | File list in home folder. |
<Ctrl-b> | Buffer list. |
<Alt-b> | Deletebuffers from the buffer list. |
<Ctrl-/> | Search in lines on current buffer. |
<Alt-/> | Search in lines ofall open buffers. |
<leader>@ | Search inctags orLSP symbols (see below). |
<leader>: | Commands |
<leader>ff | Find in contents of all files in current folder. |
<leader>fF | Like<leader>ff , but you can filter filenames too |
<leader>fa | FindAll disabling.gitignore handling. |
<leader>fA | Like<leader>fA , but you can filter filenames too |
<leader>fi | IncrementallyFind. |
<leader>rg | Search (rg) with current word. |
<leader>fG | Like<leader>fG , but you can filter filenames too |
<leader>ra | Search (rg) disabling.gitignore handling. |
<leader>rA | Like<leader>rA , but you can filter filenames too |
<leader>ri | Incrementally search (rg) with current word. |
<leader>fh | FileHistory |
<leader>fl | Filelocate (requires mlocate) |
<leader>gf | GFiles |
<leader>mm | Marks |
<Ctrl-x><Ctrl-k> | Search indictionaries (requireswords-insane) |
<Ctrl-x><Ctrl-f> | Search infiles |
<Ctrl-x><Ctrl-l> | Search inlines |
<leader>kk | Toggles file tree |
<leader>kf | Finds current file in the file tree |
If you keep hitting<Ctrl-/>
the preview window will change width. WithShift-/
you can show and hide the preview window.
When a file is selected, additional to whatfzf provides out of the box,you can invoke one of these secondary actions:
Mapping | Description |
---|---|
alt-/ | To search in the lines. |
alt-@ | To search in ctags or lsp symbols. |
alt-: | To go to a specific line. |
alt-q | Add items to the quickfix list. |
alt-w | Add items to the local list. |
Note that if aLSP
server is not attached to the buffer, it will fall back toctags
.
Sometimes when you list files andsink
with@, theLSP
might not beready yet, therefore it falls back toctags
immediately. In this case you cancancel, which will land you to the file, and you can invoke<leader>@
forLSP symbols.
There are a few added commands to what fzf provides.
Click to view the commands
Command | Description |
---|---|
GGrep | Rungit grep |
GTree | Browsegit commits |
Marks | Showmarks with preview |
MarksDelete | Deletemarks |
Todo | Listtodo/fixme lines |
ArgsAdd | Select and add files to the args list |
ArgsDelete | Select and delete files from the args list |
Worktree | Switch between git worktrees |
BLines | Search in current buffer |
History | Show open file history |
Checkout | Checkout a branch |
GitStatus | Show git status |
Jumps | Choose from jump list |
Autocmds | Show autocmds |
Changes | Show change list |
Registers | Show register contents |
Yank Mappings | Description |
---|---|
<leader>yh | ListYankHistory) |
<leader>y | Yank to the+ register (external clipboard) |
<leader>p | Paste from the+ register |
<leader>P | Paste from the+ register (before/above) |
(v)p | Paste on selected text without changing "reg |
When aLSP server is attached to a buffer, a series of mappings will bedefined for that buffer based on the server's capabilities. When possible,fzf will take over the results of theLSP mappings results.
Click to view the mappings
Mapping | Description |
---|---|
<leader>dd | Show lineDiagnostics |
<leader>dq | Fill theQuicklist withDiagnostics |
<leader>dw | Fill the local list withDiagnostics |
]d | Go to nextdiagnostic issue(R) |
[d | Go to previousdiagnostic issue(R) |
H | Hover popup |
[i]<Alt-h> | Hover popup |
gd | Go toDefinition |
2gd | Go toDefinition in vertical split |
3gd | Go toDefinition in horizontal split |
4gd | Go toDefinition in new tab |
K | ShowSignature help |
[i]<M-l> | ShowSignature help |
[i]<Alt-l> | ShowSignature help |
<leader>gq | Format the buffer with LSP |
[x]gq | Format the selection with LSP |
gq | Format operator with LSP |
<leader>i | Organise imports |
grn | Incrementally rename symbol |
grr | Go to references |
<leader>gi | Go toImplementation |
gD | Go toDeclaration |
<leader>cr | Code lensRun |
gra | CodeActions (also in visual mode) |
<leader>gc | Go toCaller |
<leader>dr | Restart the LSP server (see below) |
- Mappings marked with
(R)
are repeatable with;
and,
.Please see the code for all available mappings.
Mapping | Description |
---|---|
[i]<C-j> | Select next item |
[i]<C-k> | Select previous item |
[i]<C-b> | Scroll documents up |
[i]<C-f> | Scroll documents down |
[i]<C-Space> | Initiate completion menu (main one) |
[i]<C-x><C-o> | Initiate completion menu (lsp, buffer, rg) |
[i]<C-x><C-r> | Initiate completion menu (rg) |
[i]<C-x><C-s> | Initiate completion menu (luasnip) |
[i]<C-x><C-g> | Initiate completion menu (git) |
[i,c]<C-e> | Abort completion and close |
[i,s]<Tab> | Next placeholder |
[i,s]<S-Tab> | Previous placeholder |
LSP defines its own set of commands, however I have added a few interestingadditions.
Click to view the commands
Command | Description |
---|---|
Diagnostics | AlternativeDiag |
DiagnosticsAll | AlternativeDiagAll |
DiagnosticsDisable | |
DiagnosticsEnable | |
Definition | Go to the definition |
WorkspaceList | |
WorkspaceRemove | |
WorkspaceAdd | |
WorkspaceSymbols | |
DocumentSymbol | |
References | |
Implementation | |
TypeDefinition | |
CodeLensRefresh | |
CodeLensRun | |
CodeAction | Also works on a visually selected text. |
Callers | Show callers and go to one |
Callees | Show callees and go to one |
RestartLsp | |
UnlinkSnippets | Unlink all open snippet sessions |
ListWorkspace | List attached LSP workspace folders |
TheRestartLsp
fixes an issue when theLspRestart
does not have anyeffects.
The following list of commands do not fit into any specific categories.
Click to view the commands
Command | Description |
---|---|
Filename | View the filename |
YankFilename | Yank the filename to" register |
YankFilenameC | Yank the filename to+ register |
YankFilepath | Yank the file path to" register |
YankFilepathC | Yank the file path to+ register |
Nowrap | Stop wrapping current buffer |
ToggleRelativeNumbers | Start/Stop relative number switching |
ToggleTrimWhitespaces | Toggles trimming whitespaces on buffer |
Scratch | Create a scratch buffer |
{range}Duck [args] | Show some ducks |
Give an icon for something else | |
{range}Cook | Cook some ducks |
FoldComments | Fold comments (sets folding to expr) |
EditConfig | Edit configuration files in a new tab |
LspCaps | Show short LSP capabilities |
LspCapsFull | Show sull LSP capabilities |
GoModTidy | Run go mod tidy on go and mod files |
Tmux | Start a tmux project (using tmuxp) |
LazyLoadAll | Load all lazy-loaded plugins |
CC | Close all floating windows |
ChatGPT | Open interactive window |
ChatGPTActAs | Suggest an actor |
I never was a fan of snippets, until I discovered theLuaSnip plugin and it changed my mind.Here is a demo of a couple of snippets shipped with this setup:
Click to view advance snippets demo
Queryrows snippet creates a useful code in Go that uses theRetry library for querying postgres.
Ife snippet is an improvement over a snippet bytjdevriesthat tries to work better with return values.
These are commands you can use inLua land. Assign the required module to avariable and re-use.
localquick=require("arshlib.quick")
Executes a normal command. For example:
quick.normal("n","y2k")
See:h feedkeys()
for values of the mode.
Createhighlight
groups:
quick.highlight("LspReferenceRead", {ctermbg=180,guibg="#43464F",style="bold"})
These functions will call your function/command and then centres the buffer:
quick.call_and_centre(function()print("Yolo!")end)quick.cmd_and_centre("SomeCommand")
Click to view the plugin list
About
Neovim setup, all in Lua