{"id":13479551,"url":"https://github.com/aiken-lang/editor-integration-nvim","last_synced_at":"2026-03-06T02:48:02.973Z","repository":{"id":81677966,"uuid":"564251604","full_name":"aiken-lang/editor-integration-nvim","owner":"aiken-lang","description":"A plugin for working with Aiken on Vim / NeoVim.","archived":false,"fork":false,"pushed_at":"2025-12-05T10:44:46.000Z","size":744,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-08T19:42:59.446Z","etag":null,"topics":["aiken","neovim-plugin","nvim-plugin","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiken-lang.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-11-10T10:16:58.000Z","updated_at":"2025-12-05T10:44:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"408ddc87-f1a6-4004-9920-0c32d0254524","html_url":"https://github.com/aiken-lang/editor-integration-nvim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aiken-lang/editor-integration-nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiken-lang%2Feditor-integration-nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiken-lang%2Feditor-integration-nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiken-lang%2Feditor-integration-nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiken-lang%2Feditor-integration-nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiken-lang","download_url":"https://codeload.github.com/aiken-lang/editor-integration-nvim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiken-lang%2Feditor-integration-nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aiken","neovim-plugin","nvim-plugin","vim-plugin"],"created_at":"2024-07-31T16:02:19.040Z","updated_at":"2026-03-06T02:48:02.967Z","avatar_url":"https://github.com/aiken-lang.png","language":"Vim Script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# Aiken Vim\n\nA plugin for working with [Aiken](https://github.com/aiken-lang/aiken) on Vim / NeoVim.\n\n## Features\n\n- [x] Syntax Highlighting\n- [x] Automatic indentation\n- [x] Fold regions for `fn`, `test` and `bench`\n- [x] LSP-integration via [coc.vim](https://github.com/neoclide/coc.nvim) or nvim's native LSP client.\n\n## Installation\n\n### Installation / [vim-plug](https://github.com/junegunn/vim-plug)\n\nSimply use:\n\n```vim\nPlug 'aiken-lang/editor-integration-nvim'\n```\n\n#### (optional) Enabling folds\n\nTo enable fold regions, and in case your defaults are different from nvim's defaults, add the following:\n\n```vim\nautocmd FileType aiken setlocal foldenable foldlevelstart=0\n```\n\nTo only fold when files are \"long\":\n\n```vim\naugroup AikenDynamicFolds\n  autocmd!\n  autocmd FileType aiken call s:AikenDynamicFoldSetup()\naugroup END\n\nfunction! s:AikenDynamicFoldSetup() abort\n  let nlines = line('$')\n  if nlines \u003c 100\n    setlocal foldlevel=99\n    setlocal foldlevelstart=99\n  else\n    setlocal foldlevel=0\n    setlocal foldlevelstart=0\n  endif\nendfunction\n```\n\n### Installation / [lazy.nvim](https://github.com/folke/lazy.nvim)\n\nFirst add this to lazy.nvim setup:\n\n```lua\n{\n  \"aiken-lang/editor-integration-nvim\",\n  dependencies = {\n    'neovim/nvim-lspconfig',\n  }\n}\n```\n\nThen to enable the Aiken LSP, add the following to `init.lua` file:\n\n```lua\nrequire'lspconfig'.aiken.setup({})\n```\n\nTo enable the auto formatting on save, add the following to `init.lua` file:\n\n```lua\nvim.api.nvim_create_autocmd(\"BufWritePre\", {\n  pattern = \"*.ak\",\n  callback = function()\n    vim.lsp.buf.format({async = false})\n\n    vim.opt_local.foldenable = true  -- Optional, to enable or disable fold regions.\n    vim.opt_local.foldlevelstart = 0 -- Optional, start with all regions folded.\n\n    -- Or, to configure folding dynamically based on the file length\n    local buf = vim.api.nvim_get_current_buf()\n    local nlines = vim.api.nvim_buf_line_count(buf)\n    if nlines \u003c 100 then\n      -- Small file: open all folds\n      vim.opt_local.foldlevel = 99\n      vim.opt_local.foldlevelstart = 99\n    else\n      -- Big file: start collapsed\n      vim.opt_local.foldlevel = 0\n      vim.opt_local.foldlevelstart = 0\n    end\n  end\n})\n```\n\n### Installation / manual\n\nCopy the content of `ftdetect`, `indent` and `syntax` to your `$HOME/.config/nvim/`.\nMake sure that `:syntax` is `on`.\n\n### LSP Configuration (coc.vim)\n\n#### `:CocConfig`\n\n```json\n{ \"languageserver\":\n  { \"aiken\":\n      { \"command\": \"aiken\"\n      , \"args\": [\"lsp\"]\n      , \"trace.server\": \"verbose\"\n      , \"rootPatterns\": [\"aiken.toml\"]\n      , \"filetypes\": [\"aiken\"]\n      }\n  }\n}\n```\n\n#### Automatic formatting\n\n```vim\n\" Automatically format code on save\nautocmd BufWritePre *.ak :silent! call CocAction('format')\n```\n\n### [Ctags](https://ctags.io/)\n\nTo use tags for navigation, use the following configuration:\n\n```ctags\n--langdef=Aiken\n--langmap=Aiken:.ak\n--regex-Aiken=/^fn[ \\t]+([a-zA-Z0-9_]+)/\\1/f,functions/\n--regex-Aiken=/^test[ \\t]+([a-zA-Z0-9_]+)/\\1/f,functions/\n--regex-Aiken=/^bench[ \\t]+([a-zA-Z0-9_]+)/\\1/f,functions/\n--regex-Aiken=/^const[ \\t]+([a-zA-Z0-9_]+)/\\1/v,varlambdas/\n--regex-Aiken=/^type[ \\t]+([a-zA-Z0-9_]+)/\\1/t,types/\n```\n\n## Preview\n\n![](.github/preview.png)\n\n## License\n\n[MPL-2.0](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiken-lang%2Feditor-integration-nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiken-lang%2Feditor-integration-nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiken-lang%2Feditor-integration-nvim/lists"}