{"id":26560576,"url":"https://github.com/ozogxyz/kyenvim","last_synced_at":"2026-05-10T09:49:06.668Z","repository":{"id":282224544,"uuid":"947883311","full_name":"ozogxyz/kyenvim","owner":"ozogxyz","description":"Neovim LSP without plugins—flat, simple, and built-in with the native LSP API, no lua/ folder, no nested directories.","archived":false,"fork":false,"pushed_at":"2025-03-19T13:46:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T14:32:45.939Z","etag":null,"topics":["lsp","lua","minimal","neovim","neovim-configuration","nvim-lsp","nvim-lspconfig","vim"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/ozogxyz.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":"2025-03-13T11:55:22.000Z","updated_at":"2025-03-19T13:46:09.000Z","dependencies_parsed_at":"2025-03-20T01:46:55.614Z","dependency_job_id":null,"html_url":"https://github.com/ozogxyz/kyenvim","commit_stats":null,"previous_names":["ozogxyz/neovimconfig","ozogxyz/kyenvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozogxyz%2Fkyenvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozogxyz%2Fkyenvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozogxyz%2Fkyenvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozogxyz%2Fkyenvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozogxyz","download_url":"https://codeload.github.com/ozogxyz/kyenvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959456,"owners_count":20538629,"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":["lsp","lua","minimal","neovim","neovim-configuration","nvim-lsp","nvim-lspconfig","vim"],"created_at":"2025-03-22T13:18:21.808Z","updated_at":"2026-05-10T09:49:01.614Z","avatar_url":"https://github.com/ozogxyz.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **kyenvim – Know Your Editor Neovim**  \r\n\r\n## **Know Your Editor, set up LSP using native API**\r\n\r\nIf you are like me and:\r\n\r\n- You want to learn your editor and use what's **built-in** instead of relying on plugins.\r\n- You don’t like it when you don’t know what software installs what and where.  \r\n- You want to have full control over your system—**no hidden abstractions**.  \r\n\r\n--- \r\n\r\n## **Neovim’s LSP: Why You Don’t Need *Three Different* Plugins to set it up**  \r\n\r\nI also needed LSP support (which is why I switched to Neovim from Vim, so my priority was getting LSP working out-of-the-box. \r\n\r\nWhen I switched to Neovim from Vim, I was confused by the complexity of setting up LSP.  \r\n- Why is there `Mason`, `mason-lspconfig`, and `nvim-lspconfig`?  \r\n- Why are there **three** plugins just to set up LSP when Neovim already supports it natively?  \r\n- What if I manually install LSP servers and just tell Neovim where to find them?  \r\n\r\nI did exactly that, following [this article](https://boltless.me/posts/neovim-config-without-plugins-2025/) and the [Neovim LSP API](https://neovim.io/doc/user/lsp.html).\r\n\r\nStarting from Neovim 0.11+ (nightly) it's now a breeze to configure a language servesrs:\r\n\r\n```lua\r\nvim.lsp.config('\u003ccustom-name\u003e', {\r\n    cmd = { \"gopls\" },\r\n    root_markers = { \"go.mod\" },\r\n    filetypes = { \"go\" },\r\n})\r\nvim.lsp.enable('\u003ccustom-name\u003e')\r\n```\r\nThat’s it. Just Neovim doing what it already knows how to do.\r\n\r\n---\r\n\r\n\r\n## **What Neovim Already Does for You**  \r\n\r\nNeovim 0.11+ also comes with default keybindings in LSP defaults, so you **don’t need plugins for common features** ([docs](https://neovim.io/doc/user/lsp.html#lsp-defaults)) so you don’t need to configure keymaps, diagnostics, or completion manually.  \r\n\r\n- **Code navigation** → Go to definition (`gd`), references (`grr`), implementation (`gri`)  \r\n- **Editing support** → Rename (`grn`), format (`gq`), code actions (`gra`)  \r\n- **Diagnostics** → Inline errors, hover (`K`), signature help (`CTRL-S` in Insert mode)  \r\n- **Completion \u0026 tags** → `CTRL-X CTRL-O` for omnifunc, `CTRL-]` for tag jumps  \r\n\r\nIf your language server supports it, **Neovim enables it automatically**. No need for extra plugins.\r\n\r\n---\r\n## **No Nested Directories – Keep It Flat**  \r\n\r\n```bash\r\n~/.config/nvim/\r\n├── init.lua\r\n├── options.lua\r\n├── keymaps.lua\r\n└── autocommands.lua\r\n```\r\n**Why? Because it works.**\r\n\r\nWhen I switched from Vim to Neovim, I was quite confused by the complex nested directories.  \r\n- What’s the `lua/` folder?  \r\n- Why is there both a `plugin/` folder and a `lua/someuser/plugins/` folder?  \r\n\r\nFor someone not familiar with Lua it was **complicated** and confusing. I’m sure there are valid reasons for it, such as Lua’s module system and backward compatibility, but I wanted a flat structure with **minimal complexity**. \r\n\r\nYes, **I know you can throw everything inside `init.lua`** but when your options list, custom keymaps and autocommands grow, a single `init.lua` can become quite long. I just like to separate those into different files but that doesn't mean I have to use the default weird nested structure. \r\n\r\nYou don’t need actually need a `lua/` directory. Vim has always loaded configs from `~/.vim`, and Neovim can do the same from `~/.config/nvim`.\r\n\r\nJust add this in `init.lua`, and Neovim will find your files without needing `lua/` or other `plugin/, plugins/` and what-not directories:  \r\n\r\n```lua\r\npackage.path = package.path .. ';' .. vim.fn.stdpath('config') .. '/?.lua'\r\n```\r\n\r\n## **The Whole `init.lua`**  \r\n\r\nHere’s **everything in one file**. You don't even need creating files or directories for LSP. Toss the lsp commands in `init.lua` if they're not gigantic (like in most configs out there which repeat what's built-in unnecessarily): \r\n\r\n```lua\r\n\r\n-- Add ~/.config/nvim to path to prevent unnecessarily nested directories of neovim\r\npackage.path = package.path .. ';' .. vim.fn.stdpath('config') .. '/?.lua'\r\n\r\nrequire 'options'\r\nrequire 'keymaps'\r\nrequire 'autocommands'\r\n\r\n-- Minimal LSP setup (Neovim 0.11+)\r\nvim.lsp.config('lua_lsp', {\r\n    cmd = { \"lua-language-server\" },\r\n    root_markers = { \".luarc.json\", \".git\" },\r\n    filetypes = { \"lua\" },\r\n})\r\n\r\nvim.lsp.config('go_lsp', {\r\n    cmd = { \"gopls\" },\r\n    root_markers = { \"go.mod\" },\r\n    filetypes = { \"go\" },\r\n})\r\n\r\nvim.lsp.enable('lua_lsp')\r\nvim.lsp.enable('go_lsp')\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozogxyz%2Fkyenvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozogxyz%2Fkyenvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozogxyz%2Fkyenvim/lists"}