{"id":18739266,"url":"https://github.com/1995parham/elievim","last_synced_at":"2025-04-12T20:01:42.374Z","repository":{"id":52957485,"uuid":"519956667","full_name":"1995parham/elievim","owner":"1995parham","description":"neovim configuration based on cosyvim 🙈🎈💌","archived":false,"fork":false,"pushed_at":"2025-04-09T20:22:45.000Z","size":467,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T21:30:06.407Z","etag":null,"topics":["lua","neovim","nvim","vim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1995parham.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}},"created_at":"2022-08-01T03:55:41.000Z","updated_at":"2025-04-09T20:22:49.000Z","dependencies_parsed_at":"2024-01-17T21:06:32.735Z","dependency_job_id":"66bfdbd2-a67e-4d47-98fb-32521bb0e175","html_url":"https://github.com/1995parham/elievim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"nvimdev/dope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Felievim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Felievim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Felievim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Felievim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1995parham","download_url":"https://codeload.github.com/1995parham/elievim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625499,"owners_count":21135513,"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":["lua","neovim","nvim","vim"],"created_at":"2024-11-07T15:33:11.480Z","updated_at":"2025-04-12T20:01:42.289Z","avatar_url":"https://github.com/1995parham.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eThe Way of Life\u003c/h1\u003e\n\n\u003ch6 align=\"center\"\u003eYour editor, your rules\u003c/h6\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/elahe-dastan.png\" alt=\"Elahe\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/1995parham/elievim/ci.yml?label=ci\u0026logo=github\u0026style=for-the-badge\u0026branch=main\" alt=\"GitHub Workflow Status\"\u003e\n  \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/1995parham/elievim?logo=gnu\u0026style=for-the-badge\"\u003e\n\u003c/p\u003e\n\n# Introduction\n\nNeovim is a modern and powerful text editor that is fully compatible with Vim and supports Lua plugins,\nLSP client, and remote plugins. It is a project that seeks to aggressively refactor Vim in order to simplify maintenance,\nenable advanced UIs, and maximize extensibility.\nYou can learn more about Neovim from its [official website](https://neovim.io/),\nits [GitHub repository](https://github.com/neovim/neovim), or its [releases page](https://github.com/neovim/neovim/releases).\n\n## Structure\n\n```text\n├── init.lua\n├── 📂 lua\n│   ├── 📂 core                    heart of elievim which provides api\n│   │   ├── init.lua\n│   │   ├── keymap.lua             keymap api\n│   │   └── options.lua            vim options\n│   │\n│   ├── 📂 keymap\n│   │   ├── config.lua\n│   │   └── init.lua\n│   │   └── plugins.lua\n│   │\n│   ├── 📂 commands\n│   │   │\n│   │   ├── init.lua\n│   │   └── go.lua\n│   │   └── ansible.lua\n│   │\n│   └── 📂 modules\n│       │\n│       ├── 📂 completion\n│       │   ├── config.lua\n│       │   └── plugins.lua\n│       ├── 📂 lang\n│       │   ├── config.lua\n│       │   └── plugins.lua\n│       ├── 📂 tools\n│       │   ├── config.lua\n│       │   └── plugins.lua\n│       └── 📂 ui\n│           ├── config.lua\n│           └── plugins.lua\n└── 📂 snippets                   snippets\n    ├── lua.json\n    └── package.json\n\n```\n\n## Nomenclature\n\n_Ellie_ is a pet form of _Elahe_ coming from [Elahe Dastan](https://github.com/elahe-dastan/).\n\n## How to Install?\n\nYou need to remove your old configuration and then install `elievim` using:\n\n```bash\nrm -Rf ~/.config/nvim\nrm -Rf ~/.local/share/nvim\nrm -Rf ~/.cache/nvim\n\ngit clone https://github.com/1995parham/elievim\n```\n\n## How to register plugins?\n\nWhen you have a new module in the `modules` folder, you can register plugins as follows in the `plugins.lua`:\n\n```lua\nlocal conf = require('modules.ui.config')\n\nreturn {\n    {'1995parham/naz.vim', config = conf.naz},\n    {'plugin github repo name'},\n}\n```\n\n## What is `config`?\n\nThis is a keyword of [lazy.nvim](https://github.com/folke/lazy.nvim),\nand you need to check its document.\nIf a plugin has many configs you can create other file in\n`modules/your-folder-name/config.lua` and avoid making the `plugins.lua` file too long.\n\n```lua\nreturn {\n    -- modules/completion/plugins.lua\n    {\n      'neovim/nvim-lspconfig',\n      -- used filetype to lazy load lsp\n      -- config your language filetype in here\n      ft = { 'lua','rust','c','cpp'},\n      config = conf.nvim_lsp,\n    },\n\n    -- modules/tools/plugins.lua\n    {\n      'nvim-telescope/telescope.nvim',\n      -- use command to lazy load.\n      cmd = 'Telescope',\n      config = conf.telescope,\n      dependencies = {\n        { 'nvim-lua/popup.nvim' },\n        { 'nvim-lua/plenary.nvim' },\n        { 'nvim-telescope/telescope-fzy-native.nvim' },\n      }\n    },\n}\n```\n\n## How to config key mapping?\n\nIn elievim there are some APIs that make it easy to set key mapping.\nAll APIs are defined in `core/keymap.lua`.\n\n```lua\n-- functions to generate keymap by vim.keymap.set\nkeymap.nmap()\nkeymap.imap()\nkeymap.cmap()\nkeymap.vmap()\nkeymap.xmap()\nkeymap.tmap()\n-- generate opts into vim.keymap.set\nkeymap.new_opts()\n-- function type that work with keymap.new_opts\nkeymap.silent()\nkeymap.noremap()\nkeymap.expr()\nkeymap.nowait()\nkeymap.remap()\n-- just return string with \u003cCmd\u003e and \u003cCR\u003e\nkeymap.cmd()\n-- work like cmd but for visual map\nkeymap.cu()\n```\n\nUse these APIs to config your key mapping in `keymap` folder. In this folder\n`keymap/init.lua` is necessary but if you have many VIM modes' remap you can config them in `keymap/other-file.lua`\nThen config plugins key mapping in `keymap/init.lua`. The example of API usage is as follows:\n\n```lua\n-- genreate keymap in normal mode\nnmap {\n  -- packer which is replaced by lazy.nvim\n  {'\u003cLeader\u003epu',cmd('PackerUpdate'),opts(noremap,silent,'Packer update')},\n  {'\u003cLeader\u003epi',cmd('PackerInstall'),opts(noremap,silent)},\n  {'\u003cLeader\u003epc',cmd('PackerCompile'),opts(noremap,silent)},\n}\n```\n\n`map` for each table, generate a new table that can pass to `vim.keymap.set` as follows:\n\n\u003e `cmd('PackerUpdate')` just return a string `\u003ccmd\u003ePackerUpdate\u003cCR\u003e` as RHS.\n\u003e LHS is `\u003cleader\u003epu` and `opts(noremap, silent, 'Packer update')` generate options table as follows:\n\n```lua\n{noremap = true,silent = true, desc = 'Packer Update' }\n```\n\nFor some vim mode remap and Do not need use `cmd` function because\nyou want to have another key mapping not a command as RHS.\n\n```lua\n-- window jump\n{\"\u003cC-h\u003e\",'\u003cC-w\u003eh',opts(noremap)}\n```\n\nAlso, you can pass a table not include sub table to `map` like\n\n```lua\nnmap {'key','rhs',opts(noremap,silent)}\n```\n\nUse `:h vim.keymap.set` to know more about.\n\n## LSP Tools Requirements\n\nTo utilize Language Servers, you'll typically need the following commands:\n\n```bash\n- luarocks\n- npm / node\n- pip / python\n```\n\n### Configuration\n\nLanguage servers are configured in `lua/modules/completion/config.lua` based on\n[`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md).\n\n- Install Language Servers: Use [`mason.nvim`](https://github.com/williamboman/mason.nvim) to install\n  the language servers you need.\n- Automatic Configuration (Recommended): Most language servers will be automatically configured\n  by [`mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim).\n- Manual Configuration (Optional): If a server isn't automatically configured, or you prefer manual setup,\n  add configurations to `lua/modules/completion/config.lua`.\n\n```lua\n['taplo'] = function()\n  require('lspconfig').taplo.setup({})\nend,\n```\n\nIf you use this approach, make sure you don't also manually set up servers\ndirectly via `lspconfig` as this will cause servers to be set up more than\nonce.\n\n## Tips\n\n### Improve key repeat\n\n```bash\n# macOS (needs a restart)\ndefaults write NSGlobalDomain KeyRepeat -int 1\ndefaults write NSGlobalDomain InitialKeyRepeat -int 10\n\n# Linux (X11)\nxset r rate 210 40\n```\n\n## Links\n\n- \u003chttps://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md\u003e\n- \u003chttps://github.com/neovim/nvim-lspconfig/wiki\u003e\n- \u003chttps://github.com/williamboman/mason.nvim/tree/main/lua/mason-registry\u003e\n- \u003chttps://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/MAIN.md\u003e\n- \u003chttps://neovim.io/doc/user/\u003e\n- \u003chttps://github.com/ray-x/go.nvim\u003e\n\n## Languages\n\nThis document outlines useful features of my development configuration\nspecifically designed for Python and Go projects.\n\n### General\n\n- Need to **comment out** a section of code while in virtual mode? This configuration offers a handy shortcut!\n  Simply use the key combination `gc` while your selection is active.\n  This will efficiently comment out all the lines within your chosen block.\n\n- I am using [`oversser.nvim`](https://github.com/stevearc/overseer.nvim) to run commands in the background,\n  these commands includes `npm run dev`, `npm start`, `just start`, etc.\n\n- This configuration leverages the power of [`oversser.nvim`](https://github.com/stevearc/overseer.nvim) to seamlessly\n  run background commands directly within Neovim. This eliminates the need to switch windows or terminals,\n  keeping you focused on your coding flow.\n  Overseer allows you to execute common development commands like `npm run dev`, `npm start`, and `just start`\n  in the background. This means you can initiate development servers, linters, or other long-running processes\n  without interrupting your work in Neovim.\n  Activate Overseer with a simple keyboard shortcut: `spc + r + r`.\n  This brings up the Overseer interface where you can choose the command you want to run in the background.\n  Overseer takes care of the execution, freeing you to focus on your code.\n\n### Golang\n\n- I love the `FillStruct` feature included in this configuration!\n  Here's how it works:\n\n  1. Place your cursor inside a struct definition.\n  2. Trigger the code actions menu using `spc + c + a` (or your preferred shortcut).\n  3. Look for the Fill Struct action and select it.\n\n  Voilà! Your struct will be populated with empty fields, ready for you to customize.\n  The implementation details for this feature can be found in the `reftool.lua` file of the go.nvim plugin:\n  \u003chttps://github.com/ray-x/go.nvim/blob/master/lua/go/reftool.lua\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham%2Felievim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1995parham%2Felievim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham%2Felievim/lists"}