{"id":18674874,"url":"https://github.com/kiddae/neovim-dots","last_synced_at":"2026-02-03T15:03:46.219Z","repository":{"id":110963478,"uuid":"422875994","full_name":"kiddae/neovim-dots","owner":"kiddae","description":"Average `neovim` configuration.","archived":false,"fork":false,"pushed_at":"2023-08-18T20:23:41.000Z","size":1904,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T20:29:17.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim Snippet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiddae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-30T12:34:02.000Z","updated_at":"2023-08-03T19:38:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"8801d707-9d8e-4079-bc57-0b113b1c3506","html_url":"https://github.com/kiddae/neovim-dots","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddae%2Fneovim-dots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddae%2Fneovim-dots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddae%2Fneovim-dots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddae%2Fneovim-dots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiddae","download_url":"https://codeload.github.com/kiddae/neovim-dots/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239520052,"owners_count":19652615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T09:20:53.074Z","updated_at":"2026-02-03T15:03:41.192Z","avatar_url":"https://github.com/kiddae.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A `neovim` configuration.\n\n![screenshot](screenshot.png)\n\nTo be used with my [dotfiles](https://github.com/kiddae/dotfiles)\n\n# Installation\n\nClone the repository to `~/.config/nvim`. Install [`vim-plug`](https://github.com/junegunn/vim-plug) using the command given in its repository. Run `nvim -c PlugInstall`. Voilà!\n\n# Usage\n\n## Navigation\n\nExtending the normal vim keybindings, things I've added for myself can be found in [`commands.vim`](commands.vim), mostly for managing buffers and files and navigating between windows/splits:\n\n```vim\n\"\u003cleader\u003e = space\nlet mapleader = \" \"\nnnoremap \u003cC-h\u003e :wincmd h\u003cCR\u003e  \"navigates\nnnoremap \u003cC-j\u003e :wincmd j\u003cCR\u003e\nnnoremap \u003cC-k\u003e :wincmd k\u003cCR\u003e\nnnoremap \u003cC-l\u003e :wincmd l\u003cCR\u003e\nnnoremap \u003cC-w\u003e :wincmd w\u003cCR\u003e\nnnoremap \u003cleader\u003eh :wincmd H\u003cCR\u003e \"moves\nnnoremap \u003cleader\u003ej :wincmd J\u003cCR\u003e\nnnoremap \u003cleader\u003ek :wincmd K\u003cCR\u003e\nnnoremap \u003cleader\u003el :wincmd L\u003cCR\u003e\nnnoremap \u003cleader\u003e+ :vertical resize +5\u003cCR\u003e \"resizes\nnnoremap \u003cleader\u003e- :vertical resize -5\u003cCR\u003e\nnnoremap \u003cleader\u003e\u003e :vertical resize \u003e5\u003cCR\u003e\nnnoremap \u003cleader\u003e\u003c :vertical resize \u003c5\u003cCR\u003e\nnnoremap \u003cleader\u003e= :winc =\u003cCR\u003e\n\n\"switching buffers/closing/new file\nnnoremap \u003cS-tab\u003e :bp\u003cCR\u003e\nnnoremap \u003ctab\u003e :bn\u003cCR\u003e\nnnoremap \u003cC-q\u003e :bp\u003cbar\u003esp\u003cbar\u003ebn\u003cbar\u003ebd\u003cCR\u003e\n```\n\n## Run and compile\n\nIn that same [`commands.vim`](commands.vim) file, you'll find the definition of command `RunSplit` which runs the shell command given as argument in a terminal window on the right. To complete this, the global dictionary `g:Rules` contains rules for any filetypes you want, as another dictionary with the compiling command and program run command, as well as a silent flag (as a boolean) to compile with `AsyncRun`. For example (from the `commands.vim` file itself):\n\n```vim\nlet g:Rules.cpp = {\"compile\": \"g++ -o %\u003c %\", \"run\": \"./%\u003c\", \"silent\": v:true}\n```\n\nFor project-specific configuration, just add a `.vimrc` file in the working directory containing the new definitions. They should reload automatically, but if it isn't the case, run `:call UpdateCommands()`.\n\nThe `Compile` and `RunProgram` commands can then be used, they are also mapped to `\u003cF4\u003e` and `\u003cF5\u003e` respectively.\n\n## Language Server Protocol\n\nThis configuration uses `neovim`'s Language Server Protocol that is managed through the plugin [`nvim-lsp-installer`](https://github.com/williamboman/nvim-lsp-installer). To add a language server, head over to [`plugin/nvim-lspconfig.lua`](plugin/nvim-lspconfig.lua) and add it to the array at the top. You can get a list of the installed servers and the ones available with `:LspInstallInfo`. Note that some dependencies are required to properly install the servers, see the plugin's repository for more information.\n\nThe keybindings are very similar to the default ones given as example by `neovim`'s repository.\n\n```lua\nvim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '\u003ccmd\u003elua vim.lsp.buf.declaration()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '\u003ccmd\u003elua vim.lsp.buf.definition()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '\u003ccmd\u003elua vim.lsp.buf.hover()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '\u003ccmd\u003elua vim.lsp.buf.implementation()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ek', '\u003ccmd\u003elua vim.lsp.buf.signature_help()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ewa', '\u003ccmd\u003elua vim.lsp.buf.add_workspace_folder()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ewr', '\u003ccmd\u003elua vim.lsp.buf.remove_workspace_folder()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ewl', '\u003ccmd\u003elua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003eD', '\u003ccmd\u003elua vim.lsp.buf.type_definition()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ern', '\u003ccmd\u003elua vim.lsp.buf.rename()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003eca', '\u003ccmd\u003elua vim.lsp.buf.code_action()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '\u003ccmd\u003elua vim.lsp.buf.references()\u003cCR\u003e', opts)\nvim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cleader\u003ef', '\u003ccmd\u003elua vim.lsp.buf.formatting()\u003cCR\u003e', opts)\n```\n\nAuto-completion and suggestions are provided by [`nvim-cmp`](https://github.com/hrsh7th/nvim-cmp), they will show up as you work, or you can fire it up manually with `Ctrl+space`.\n\n## Debug-Adapter Protocol\n\nI am using [`nvim-dap`](https://github.com/mfussenegger/nvim-dap) as a bridge to using debug adapters, as well as [`nvim-dap-ui`](https://github.com/gcarriga/nvim-dap-ui) as an intuitive user interface to debugging sessions.\nThis requires the manual installation of the debug adapters, [`nvim-dap`'s wiki](https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation) is probably the better option to understand how to do. I have configured `debugpy` and `vscode-cpptools`, with the virtualenv for `debugpy` in `~/.virtualenvs/debugpy/` and the binaries for `cpptools` in `~/Code/cpptools/`.\n\nKeybindings are the ones given as example by the plugin:\n\n```vim\nnnoremap \u003csilent\u003e \u003cF5\u003e :lua require'dap'.continue()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cF10\u003e :lua require'dap'.step_over()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cF11\u003e :lua require'dap'.step_into()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cF12\u003e :lua require'dap'.step_out()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003eb :lua require'dap'.toggle_breakpoint()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003eB :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003elp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003edr :lua require'dap'.repl.toggle()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003edl :lua require'dap'.run_last()\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003edq :lua require'dap'.terminate()\u003cCR\u003e\n```\n\n## Others\n\n### File explorer\n\nI use [`nvim-tree`](https://github.com/kyazdani42/nvim-tree.lua). Fire it up with `Ctrl+n`, and to quickly learn how to use it, `g?` will show its keybindings.\n\n### Telescope\n\nSearch for files in the current working directory with `\u003cleader\u003eff` or recently opened files with `\u003cleader\u003efh`, powered by [`telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim)\n\n### Auto-pairs\n\nBrackets, parentheses etc. are closed automatically; to move the next word inside it, use `Ctrl+E` ([`auto-pairs`](https://github.com/jiangmiao/auto-pairs)).\n\n### WhichKey?\n\n[`WhichKey`](https://github.com/folke/which-key.nvim) is a little menu that shows the available binding in case you forget. You can fire it up with `\u003cleader\u003e\u003cF1\u003e`, or it will do it automatically if you're starting a command.\n\n### VimTex\n\nI use [`vimtex`](https://github.com/lervag/vimtex) for editing LaTeX documents, with `zathura` as a document viewer. Very simply put, just run `:VimtexCompile` when in a LaTeX document and the plugin will do the job for you. If there are errors, run `:copen` to see the messages, and then close the window with `:q` or `:cclose`.\n\n### Snippets\n\n(Only for LaTeX as of now) A bunch of handy snippets are configured in [`Ultisnips/`](Ultisnips/) for convenient use.\n\n### Templates\n\nNew `.cpp` files, `makefiles` or LaTeX document will be filled with a predefined template, to get going faster!\nDefined in [`templates/`](templates/) and in [`templates.vim`](templates.vim) (TODO ameliorate for better automation...)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiddae%2Fneovim-dots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiddae%2Fneovim-dots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiddae%2Fneovim-dots/lists"}