{"id":13476546,"url":"https://github.com/brainfucksec/neovim-lua","last_synced_at":"2025-05-15T03:08:47.549Z","repository":{"id":37725764,"uuid":"371948609","full_name":"brainfucksec/neovim-lua","owner":"brainfucksec","description":"Neovim KISS configuration with Lua","archived":false,"fork":false,"pushed_at":"2025-04-05T18:48:14.000Z","size":9295,"stargazers_count":832,"open_issues_count":0,"forks_count":117,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-14T03:11:32.599Z","etag":null,"topics":["dotfiles","ide","kiss","lua","neovim","neovim-config","neovim-configuration","neovim-dotfiles","neovim-lua","nvim","nvim-configs","nvim-lua","vim","vimrc"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainfucksec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-05-29T10:54:17.000Z","updated_at":"2025-04-05T18:48:18.000Z","dependencies_parsed_at":"2024-01-14T15:23:11.116Z","dependency_job_id":"6ba3af71-a9b7-44c3-8cf9-9017fbc91c1c","html_url":"https://github.com/brainfucksec/neovim-lua","commit_stats":{"total_commits":426,"total_committers":6,"mean_commits":71.0,"dds":"0.014084507042253502","last_synced_commit":"4268e0eef46db7f54e80173a0c80d900613b0cfd"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainfucksec%2Fneovim-lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainfucksec%2Fneovim-lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainfucksec%2Fneovim-lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainfucksec%2Fneovim-lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainfucksec","download_url":"https://codeload.github.com/brainfucksec/neovim-lua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264771,"owners_count":22041794,"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":["dotfiles","ide","kiss","lua","neovim","neovim-config","neovim-configuration","neovim-dotfiles","neovim-lua","nvim","nvim-configs","nvim-lua","vim","vimrc"],"created_at":"2024-07-31T16:01:31.745Z","updated_at":"2025-05-15T03:08:42.539Z","avatar_url":"https://github.com/brainfucksec.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/logo.png\" alt=\"neovim-lua_logo\"\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\nNeovim KISS configuration with Lua and LSP\n\u003c/h3\u003e\n\n---\n\n## Table of Contents\n\n* [Plugins](#plugins)\n* [Directory Tree](#directory-tree)\n* [Files and Settings](#files-and-settings)\n* [Installation](#installation)\n* [LSP Configuration](#lsp-configuration)\n* [Appearance](#appearance)\n* [Keymaps](#keymaps)\n* [Configuration Check](#configuration-check)\n* [Screenshots](#screenshots)\n* [Guides and Resources](#guides-and-resources)\n* [Other Neovim Lua Project](#other-neovim-lua-projects)\n* [Lua Resources](#lua-resources)\n* [Disclaimer](#disclaimer)\n* [Thanks to](#thanks-to)\n\n## Plugins\n\n[lazy.nvim](https://github.com/folke/lazy.nvim) - A modern plugin manager for Neovim\n\n[lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - A blazing fast and easy to configure neovim statusline plugin written in pure lua.\n\n[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - A collection of common configurations for Neovim's built-in language server client\n\n[nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - Auto completion plugin\n\n[LuaSnip](https://github.com/L3MON4D3/LuaSnip) - Snippet Engine for Neovim written in Lua\n\n[nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) - A File Explorer written In Lua\n\n[indentBlankline](https://github.com/lukas-reineke/indent-blankline.nvim) - Adds indentation guides to all lines (including empty lines)\n\n[nvim-autopairs](https://github.com/windwp/nvim-autopairs) - A super powerful autopairs for Neovim\n\n[Tagbar](https://github.com/preservim/tagbar) - A class outline viewer for Vim\n\n[gitsigns](https://github.com/lewis6991/gitsigns.nvim) - Super fast git decorations implemented purely in lua/teal\n\n[nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - Nvim Treesitter configurations and abstraction layer\n\n[alpha-nvim](https://github.com/goolord/alpha-nvim) - A fast and highly customizable greeter for neovim.\n\n[nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) - A Lua fork of vim-devicons\n\n## Directory Tree\n\n`${HOME}/.config/nvim`\n\n![alt text](img/dir-tree.png)\n\n## Files and Settings\n\n`/nvim`\n\n* [init.lua](nvim/init.lua): Main configuration file that call `lua` modules\n\n* [lua](nvim/lua): The directory of `lua` modules, these modules are called in the `init.lua` file (see below).\n\nSee: [nanotee/nvim-lua-guide: Where to put Lua files](https://github.com/nanotee/nvim-lua-guide#where-to-put-lua-files)\n\n`/nvim/lua/core`\n\n* [autocmds.lua](nvim/lua/core/autocmds.lua): Define autocommands with Lua APIs\n\n* [colors.lua](nvim/lua/core/colors.lua): Define Neovim and plugins color scheme\n\n* [keymaps.lua](nvim/lua/core/keymaps.lua): Keymaps configuration file, Neovim and plugins keymaps\n\n* [lazy.lua](nvim/lua/core/lazy.lua): Plugin manager configuration file\n\n* [options.lua](nvim/lua/core/options.lua): General Neovim settings\n\n* [statusline.lua](nvim/lua/core/statusline.lua): Statusline configuration file\n\n`/nvim/lua/lsp`\n\n* [lspconfig.lua](nvim/lua/lsp/lspconfig.lua): LSP configuration (language servers, keybinding)\n\n`/nvim/lua/plugins`\n\n* [alpha-nvim.lua](nvim/lua/plugins/alpha-nvim.lua): Dashboard\n\n* [indent-blankline.lua](nvim/lua/plugins/indent-blankline.lua): Indent line\n\n* [nvim-cmp.lua](nvim/lua/plugins/nvim-cmp.lua): Autocompletion settings\n\n* [nvim-tree.lua](nvim/lua/plugins/nvim-tree.lua): File manager settings\n\n* [nvim-treesitter](nvim/lua/plugins/nvim-treesitter): Treesitter interface configuration\n\n## Installation\n\n1. Install [Neovim v0.10.x](https://github.com/neovim/neovim/releases/latest).\n\n2. Install [Nerd Fonts](https://www.nerdfonts.com/font-downloads), (the font of the screenshots are `JetBrainsMono Nerd Font`).\n\n3. Install [Node.js - npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for download packages of LSP language servers, see: [LSP Configuration](#lsp-configuration).\n\n4. Make a backup of your current `nvim` folder if necessary:\n\n```term\nmv ~/.config/nvim ~/.config/nvim.backup\n```\n\n5. Download neovim-lua with `git` and copy the `nvim` folder in the `${HOME}/.config` directory:\n\n```term\ngit clone https://github.com/brainfucksec/neovim-lua.git\ncd neovim-lua/\ncp -Rv nvim ~/.config/\n```\n\n6. Install [lazy.nvim](https://lazy.folke.io/) for install and manage the plugins, see: [lazy.nvim - Installation](https://lazy.folke.io/installation)\n\n7. Run Neovim for download/sync plugins with `lazy`\n\n```term\nnvim\n```\n\n## LSP Configuration\n\n1. Install LSP language servers with `npm`, see: [Languages Currently Supported](languages-currently-supported)\n\n```term\nsudo npm install -g \\\n    bash-language-server \\\n    pyright \\\n    vscode-langservers-extracted \\\n    typescript typescript-language-server\n```\n\n2. Install additional packages for plugins support:\n\n**C, C++:**\n\n* [clang](https://clangd.llvm.org/installation.html) for use LSP with [clangd](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#clangd).\n\n* [ctags](https://github.com/universal-ctags/ctags) to view tags with [Tagbar](https://github.com/preservim/tagbar).\n\n**Python:**\n\n* [pynvim](https://github.com/neovim/pynvim)\n\n3. Open a source file of one of the supported languages with Neovim, and run command [:LspInfo](https://github.com/neovim/nvim-lspconfig?tab=readme-ov-file#commands) for verify the LSP support.\n\nSee: [nvim-lspconfig - Quickstart](https://github.com/neovim/nvim-lspconfig?tab=readme-ov-file#quickstart)\n\n### Languages Currently Supported\n\nLua - [builtin](https://neovim.io/doc/user/lua.html)\n\nBash - [bashls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#bashls)\n\nPython - [pyright](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#pyright)\n\nC, C++ - [clangd](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#clangd)\n\nHTML, CSS, JSON - [vscode-langservers-extracted](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#html)\n\nJavaScript, TypeScript - [ts_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#ts_ls)\n\nSee: [nvim-lspconfig #doc/LSP configs](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md)\n\n## Appearance\n\n### Available Colorschemes\n\n* [OneDark](https://github.com/navarasu/onedark.nvim)\n\n* [Kanagawa](https://github.com/rebelot/kanagawa.nvim)\n\n* [Monokai Pro](https://github.com/loctvl842/monokai-pro.nvim)\n\n* [Rose Pine](https://github.com/rose-pine/neovim)\n\n**Fonts:** See: [Installation](#installation)\n\n**Icons:** [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons)\n\nSee: [Screenshots](#screenshots)\n\nThe color scheme (default: OneDark) is defined in the following file:\n\n* Neovim UI - [nvim/lua/core/colors.lua](nvim/lua/core/colors.lua):\n\n```lua\n--[[\nSet Neovim UI color scheme.\nCurrent available color schemes: onedark, kanagawa, monokai-pro, rose-pine.\nSee: https://github.com/brainfucksec/neovim-lua#appearance\n\nInsert preferred color scheme in the `color_scheme` variable.\nNote: Color scheme is loaded in the \"Load color scheme\" section below, setup\nmust be called before loading.\n--]]\nlocal status_ok, color_scheme = pcall(require, 'onedark')\n\n-- Color scheme setup before load:\nrequire('onedark').setup({\n    -- Your settings here.\n})\n\n--[[\nLoad color scheme:\nNote: The instruction to load the color scheme may vary depending on the\npackage.\nSee the README of the related color scheme (i.e. git package) for information,\nExamples: require('color_scheme').setup{}, vim.cmd('color_scheme')\n--]]\nrequire('onedark').load()\n```\n\n## Keymaps\n\nThese are the default keymaps, in the following shortcuts, the `\u003cleader\u003e` key is set up to `,` (comma) character, see: [keymaps.lua](nvim/lua/core/keymaps.lua).\n\n| Shortcut             | Mode          | Description                                       |\n|----------------------|---------------|---------------------------------------------------|\n| `kk`                 | Insert        | Esc with `kk`                                     |\n| `\u003cleader\u003ec`          | Normal        | Clear search highlights                           |\n| `\u003cF2\u003e`               | Normal        | Toggle Paste mode                                 |\n| `\u003cleader\u003etk/th`      | Normal        | Change split orientation (vertical/horizontal)    |\n| `\u003cCtrl\u003e + {h,j,k,l}` | Normal        | Move around splits windows                        |\n| `\u003cleader\u003er`          | Normal        | Reload configuration file                         |\n| `\u003cleader\u003es`          | Normal        | Save file                                         |\n| `\u003cleader\u003eq`          | Normal        | Save (close all windows) and exit from Neovim     |\n| `\u003cCtrl\u003e + t`         | Normal        | Open terminal (`:Term`)                           |\n| `\u003cEsc\u003e`              | Terminal      | Exit terminal                                     |\n| `\u003cCtrl\u003e + n`         | Normal        | Open NvimTree                                     |\n| `\u003cleader\u003et`          | Normal        | Open/Close Tagbar                                 |\n\n## Configuration Check\n\n- Open nvim and run command `checkhealth`, you should not see any error in the output (except for the one related to the Python 2 interpreter if don't have it):\n\n```vim\n:checkhealth\n```\n\n![alt text](img/checkhealth.png)\n\n- You can also use the `startuptime` option to read the nvim startup logs:\n\n```term\nnvim --startuptime nvim-start.log\n\nnvim nvim-start.log\n```\n\nSee: `:help startuptime`\n\nAlso you can check the plugins configuration and startup time with `lazy`:\n\n```vim\n:checkhealth lazy\n```\n\n```vim\n:Lazy profile\n```\n\nSee: [lazy.nvim - Usage](https://lazy.folke.io/usage)\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/banner.png\"\u003e\n\u003c/p\u003e\n\nNote: Screenshots may be out of date compared to the actual setup.\n\n\u003cdetails\u003e\u003csummary\u003e \u003cb\u003e(Click to expand)\u003c/b\u003e\u003c/summary\u003e\n\n**OneDark Darker**\n\n![1-onedark_darker.png](img/1-onedark_darker.png)\n\n**OneDark Dark**\n\n![2-onedark_dark.png](img/2-onedark_dark.png)\n\n**OneDark Cool**\n\n![3-onedark_cool.png](img/3-onedark_cool.png)\n\n**OneDark Deep**\n\n![4-onedark_deep.png](img/4-onedark_deep.png)\n\n**Kanagawa Wave** (lualine theme: palenight)\n\n![5-kanagawa_wave.png](img/5-kanagawa_wave.png)\n\n**Kanagawa Dragon** (lualine theme: seoul256)\n\n![6-kanagawa_dragon.png](img/6-kanagawa_dragon.png)\n\n**Monokai** (lualine theme: molokai)\n\n![7-monokai.png](img/7-monokai.png)\n\n**Rosé Pine** (lualine theme: nightfly)\n\n![8-rose-pine.png](img/8-rose-pine.png)\n\n**lazy.nvim**\n\n![lazy-nvim.png](img/lazy-nvim.png)\n\n\u003c/details\u003e\n\n## Guides and Resources\n\n* [Lua - Neovim docs](https://neovim.io/doc/user/lua.html)\n\n* [Lua-guide - Neovim docs](https://neovim.io/doc/user/lua-guide.html#lua-guide)\n\n* [Everything you need to know to configure neovim using lua](https://vonheikemen.github.io/devlog/tools/configuring-neovim-using-lua/)\n\n* [reddit /r/neovim](https://www.old.reddit.com/r/neovim/)\n\n* [Lemmy: programming.dev/c/neovim](https://programming.dev/c/neovim)\n\n\n## Other Neovim Lua Projects\n\n* [NvChad](https://github.com/siduck76/NvChad)\n\n* [nvim-ide](https://github.com/ldelossa/nvim-ide)\n\n* [nv-ide](https://github.com/crivotz/nv-ide)\n\n* [Neovim from scratch](https://github.com/LunarVim/Neovim-from-scratch)\n\n* [CosmicNvim](https://github.com/CosmicNvim/CosmicNvim)\n\n## Lua Resources\n\n* [Learn X in Y minutes: Where X=Lua](https://learnxinyminutes.com/docs/lua/)\n\n* [Lua Quick Guide](https://github.com/medwatt/Notes/blob/main/Lua/Lua_Quick_Guide.ipynb)\n\n* [Lua 5.4 Reference Manual](https://www.lua.org/manual/5.4/)\n\n---\n\n## Disclaimer\n\nThis setup is based on [KISS](https://en.wikipedia.org/wiki/KISS_principle) principle, probably some concepts may not be valid for everyone. Then feel free to take what you need but **don't install anything without checking first!**\n\nThis setup is not a Framework but it is the configuration I use to work on Linux, it can be used by default as it can be a start point to understand how Neovim is structured and maybe improve this config.  Is the base configuration I use, and it tries to stay as simple as possible, with each addition weighted along these lines.\n\n[Less is more](https://en.wikipedia.org/wiki/Less_is_more)\n\n## Thanks to:\n\n- [All the contributors](https://github.com/brainfucksec/neovim-lua/graphs/contributors) who helped improve this setup with their reports and advices and all the authors of the sources mentioned above.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainfucksec%2Fneovim-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainfucksec%2Fneovim-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainfucksec%2Fneovim-lua/lists"}