{"id":21490776,"url":"https://github.com/novusnota/func-extracted-ls","last_synced_at":"2025-07-15T17:32:12.470Z","repository":{"id":233629803,"uuid":"732101626","full_name":"novusnota/func-extracted-ls","owner":"novusnota","description":"💎 FunC language server (of LSP specification), extracted and re-packaged from its official VSCode extension.","archived":false,"fork":false,"pushed_at":"2024-06-19T18:05:32.000Z","size":182,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-09T12:16:27.338Z","etag":null,"topics":["func","func-lang","language-server","lsp","lsp-server","the-open-network","ton","ton-blockchain"],"latest_commit_sha":null,"homepage":"https://github.com/ton-community/vscode-func","language":"JavaScript","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/novusnota.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":"2023-12-15T16:40:55.000Z","updated_at":"2024-08-27T15:21:04.000Z","dependencies_parsed_at":"2024-06-20T06:02:37.290Z","dependency_job_id":"1805cf14-0973-4ed5-9a04-d3ec1c35ebdb","html_url":"https://github.com/novusnota/func-extracted-ls","commit_stats":null,"previous_names":["novusnota/func-extracted-ls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ffunc-extracted-ls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ffunc-extracted-ls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ffunc-extracted-ls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ffunc-extracted-ls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novusnota","download_url":"https://codeload.github.com/novusnota/func-extracted-ls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226057440,"owners_count":17566952,"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":["func","func-lang","language-server","lsp","lsp-server","the-open-network","ton","ton-blockchain"],"created_at":"2024-11-23T14:45:48.810Z","updated_at":"2024-11-23T14:45:49.340Z","avatar_url":"https://github.com/novusnota.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# func-extracted-ls\n\n💎 FunC language server (of LSP specification), extracted and re-packaged from its official [VSCode extension](...).\n\n⚙ Automatically builds upon updates in the upstream VSCode extension through Github Actions.\n\n## Features\n\n* Auto-completion\n* Definition search and go-to-definition\n* Symbol search\n* Formatting\n* Basic diagnostics\n\n## Known issues\n\n* Diagnostics for `#import` statements say \"Dependency not found\" until you open imported files at least once during your editing session.\n\nThat's because the FunC's VSCode extension and inner language server were designed very tightly coupled to VSCode, expecting it to provide all the files. Unfortunately, that non-standard communication doesn't work in this extracted LS form.\n\nAs a temporary solution (because permanent may require full rewrite of the LS), just open all the imported files in your editing session at least once, then invoke any LSP action (code completion, for example) and all those files would be sourced during your editing session.\n\n## Installation\n\nThe only requirement is having a Node.js version 16 or higher installed. Then, run the following command to install the extracted FunC language server:\n\n```bash\nnpm i -g func-extracted-ls\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eAlternatives\u003c/summary\u003e\n  \u003cp\u003e\u003c/p\u003e\n\n  Using `yarn`:\n\n  ```bash\n  yarn global add func-extracted-ls\n  ```\n\n  Using `pnpm`:\n\n  ```bash\n  pnpm add -g func-extracted-ls\n  ```\n\n  Using `bun`:\n\n  ```bash\n  bun add -g func-extracted-ls\n  ```\n\n\u003c/details\u003e\n\n\u003cp\u003e\u003c/p\u003e\n\n## Clients\n\nThe following editors and IDEs have available clients:\n\n\u003c!--\n  TODO: plugins or PRs to support default configuration\n  (or at least submit a PR for default configuration)\n\n- [Helix](https://helix-editor.com/) (built-in support)\n- Sublime Text (plugin is in the making)\n- Emacs        (plugin is in the making)\n- Neovim: nvim-lspconfig, mason-lsp\n--\u003e\n\n* [Visual Studio Code][func-vscode]\n* Sublime Text ([see below](#sublime-text))\n* Vim ([see below](#vim))\n* Neovim ([see below](#neovim))\n* Helix ([see below](#helix))\n* Oni ([see below](#oni))\n* IntelliJ IDEA and related IDEs from JetBrains ([see below](#jetbrains))\n\n### Sublime Text\n\nFirst, install the [**LSP** package](https://packagecontrol.io/packages/LSP) if it's not installed already.\n\nThen, open its settings (**Preferences: LSP Settings** in the command palette, \u003ckbd\u003eCtrl/Cmd\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003eP\u003c/kbd\u003e), then add this config:\n\n```json\n{\n  \"clients\": {\n    \"FunC\": {\n      \"enabled\": true,\n      \"command\": [\"func-extracted-ls\", \"--stdio\"],\n      \"selector\": \"source.fc, source.func\"\n    }\n  }\n}\n```\n\n### Vim\n\nFor Vim 8 or later install the plugin [prabirshrestha/vim-lsp](https://github.com/prabirshrestha/vim-lsp) and add the following to `.vimrc`:\n\n```vim\nif executable('func-extracted-ls')\n  au User lsp_setup call lsp#register_server({\n        \\ 'name': 'func',\n        \\ 'cmd': {server_info-\u003e['func-extracted-ls', '--stdio']},\n        \\ 'allowlist': ['fc', 'func'],\n        \\ })\nendif\n```\n\nFor Vim 8 or Neovim using [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe), add the following to `.vimrc`:\n\n```vim\nlet g:ycm_language_server =\n    \\ [\n    \\   {\n    \\     'name': 'func',\n    \\     'cmdline': [ 'func-extracted-ls', '--stdio' ],\n    \\     'filetypes': [ 'fc', 'func' ],\n    \\   }\n    \\ ]\n```\n\nFor Vim 8 or Neovim using [neoclide/coc.nvim](https://github.com/neoclide/coc.nvim), according to [it's Wiki article](https://github.com/neoclide/coc.nvim/wiki/Language-servers#bash), add the following to your `coc-settings.json`:\n\n```jsonc\n  \"languageserver\": {\n    \"func\": {\n      \"command\": \"func-extracted-ls\",\n      \"args\": [\"--stdio\"],\n      \"filetypes\": [\"fc\", \"func\"],\n      \"ignoredRootPaths\": [\"~\"]\n    }\n  }\n```\n\n### Neovim\n\nFor Neovim 0.8 and later:\n\n```lua\nvim.api.nvim_create_autocmd('FileType', {\n  pattern = { 'fc', 'func' },\n  callback = function()\n    vim.lsp.start({\n      name = 'func-extracted-ls',\n      cmd = { 'func-extracted-ls', '--stdio' },\n    })\n  end,\n})\n```\n\nFor Neovim prior to 0.8 and using [autozimu/LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim), add the following to `init.vim`:\n\n```vim\nlet g:LanguageClient_serverCommands = {\n    \\ 'func': ['func-extracted-ls', '--stdio']\n    \\ }\n```\n\n### Helix\n\nCreate or open `~/.config/helix/languages.toml` (Use `~\\AppData\\Roaming\\helix\\languages.toml` on Windows) and add the following:\n\n```toml\n[[language]]\nname = \"func\"\nscope = \"source.func\"\ninjection-regex = \"^(fc|func)$\"\nfile-types = [\"fc\", \"func\"]\nlanguage-servers = [ \"func-extracted-ls\" ]\ncomment-token = \";;\"\nindent = { tab-width = 4, unit = \"    \" }\n\n[language.auto-pairs]\n'\"' = '\"'\n'{' = '}'\n'(' = ')'\n'[' = ']'\n\n[language-server.func-extracted-ls]\ncommand = \"func-extracted-ls\"\nargs = [ \"--stdio\" ]\n```\n\n### Oni\n\nOn the config file (**File → Preferences → Edit Oni config**) add the following configuration:\n\n```javascript\n\"language.func.languageServer.command\": \"func-extracted-ls\",\n\"language.func.languageServer.arguments\": [\"--stdio\"],\n```\n\n### JetBrains\n\nAs of now, Language Server Protocol support is unofficial and only available in IntelliJ IDEA and related IDEs from JetBrains through 3rd-party plugins. Instead, please use the official extension for all things TON in IntelliJ IDEs: [intellij-ton](https://plugins.jetbrains.com/plugin/23382-ton).\n\n### The rest\n\nDidn't find your editor on the list? Try searching for tips in the respective documentation or related community resources.\n\nNote, that some editors may not support the Language Server Protocol (LSP), in which case you're out of luck until such support is added by editor maintainers or external contributors, such as yourself.\n\nIf you did manage to set up and use the FunC language server in your editor, then please file an issue or submit a PR to this repository and explain how you did it 🤗\n\n## Contributing\n\nIf you have any issues which arise ONLY in the case of using provided language servers outside of VSCode, please, file an issue to [the present repository](https://github.com/novusnota/func-extracted-ls/issues).\n\nIn any other case, please, file issues to the upstream extension repository: [FunC VSCode extension][func-vscode].\n\n## Credits\n\nBased on [The Open Network](https://ton.org).\n\nPackaged with 🤍 by [Novus Nota](https://github.com/novusnota).\n\n## License\n\nTODO:\n\n* Packaging: [MIT](https://github.com/novusnota/func-extracted-ls/blob/main/LICENSE) © [Novus Nota](https://github.com/novusnota)\n* [VSCode extension][func-vscode]: [GNU General Public License v3.0 (GPL-3.0)](https://github.com/ton-community/vscode-func/blob/main/LICENSE)\n\n[func-vscode]: https://github.com/ton-community/vscode-func\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovusnota%2Ffunc-extracted-ls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovusnota%2Ffunc-extracted-ls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovusnota%2Ffunc-extracted-ls/lists"}