{"id":13441859,"url":"https://github.com/prabirshrestha/vim-lsp","last_synced_at":"2025-05-14T14:09:24.129Z","repository":{"id":37550450,"uuid":"72978528","full_name":"prabirshrestha/vim-lsp","owner":"prabirshrestha","description":"async language server protocol plugin for vim and neovim","archived":false,"fork":false,"pushed_at":"2024-09-22T23:16:10.000Z","size":1865,"stargazers_count":3239,"open_issues_count":62,"forks_count":304,"subscribers_count":45,"default_branch":"master","last_synced_at":"2025-05-14T09:32:34.471Z","etag":null,"topics":["async","asyncomplete","language-server-protocol","neovim","vim","vim-lsp","vim8"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/prabirshrestha.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":"2016-11-06T09:31:03.000Z","updated_at":"2025-05-14T02:12:39.000Z","dependencies_parsed_at":"2024-01-07T12:14:08.180Z","dependency_job_id":"a6119f3e-e2ba-4796-97ef-8d57f137f38b","html_url":"https://github.com/prabirshrestha/vim-lsp","commit_stats":{"total_commits":945,"total_committers":184,"mean_commits":5.135869565217392,"dds":0.6730158730158731,"last_synced_commit":"04428c920002ac7cfacbecacb070a8af57b455d0"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabirshrestha%2Fvim-lsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabirshrestha%2Fvim-lsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabirshrestha%2Fvim-lsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabirshrestha%2Fvim-lsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prabirshrestha","download_url":"https://codeload.github.com/prabirshrestha/vim-lsp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160556,"owners_count":22024571,"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":["async","asyncomplete","language-server-protocol","neovim","vim","vim-lsp","vim8"],"created_at":"2024-07-31T03:01:38.926Z","updated_at":"2025-05-14T14:09:24.079Z","avatar_url":"https://github.com/prabirshrestha.png","language":"Vim Script","funding_links":["https://opencollective.com/vim-lsp","https://opencollective.com/vim-lsp/backer/0/website","https://opencollective.com/vim-lsp/backer/1/website","https://opencollective.com/vim-lsp/backer/2/website","https://opencollective.com/vim-lsp/backer/3/website","https://opencollective.com/vim-lsp/backer/4/website","https://opencollective.com/vim-lsp/backer/5/website","https://opencollective.com/vim-lsp/backer/6/website","https://opencollective.com/vim-lsp/backer/7/website","https://opencollective.com/vim-lsp/backer/8/website","https://opencollective.com/vim-lsp/backer/9/website","https://opencollective.com/vim-lsp/backer/10/website","https://opencollective.com/vim-lsp/backer/11/website","https://opencollective.com/vim-lsp/backer/12/website","https://opencollective.com/vim-lsp/backer/13/website","https://opencollective.com/vim-lsp/backer/14/website"],"categories":["HarmonyOS","Vim Script","Vim script"],"sub_categories":["Windows Manager"],"readme":"# vim-lsp [![Gitter](https://badges.gitter.im/vimlsp/community.svg)](https://gitter.im/vimlsp/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nAsync [Language Server Protocol](https://github.com/Microsoft/language-server-protocol) plugin for vim8 and neovim.\n\n# Installing\n\nInstall [vim-plug](https://github.com/junegunn/vim-plug) and then:\n\n```viml\nPlug 'prabirshrestha/vim-lsp'\n```\n\n__Performance__\n\nCertain bottlenecks in Vim script have been implemented in lua. If you would like to take advantage of these performance gains\nuse vim compiled with lua or neovim v0.4.0+\n\n## Registering servers\n\n```viml\nif executable('pylsp')\n    \" pip install python-lsp-server\n    au User lsp_setup call lsp#register_server({\n        \\ 'name': 'pylsp',\n        \\ 'cmd': {server_info-\u003e['pylsp']},\n        \\ 'allowlist': ['python'],\n        \\ })\nendif\n\nfunction! s:on_lsp_buffer_enabled() abort\n    setlocal omnifunc=lsp#complete\n    setlocal signcolumn=yes\n    if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif\n    nmap \u003cbuffer\u003e gd \u003cplug\u003e(lsp-definition)\n    nmap \u003cbuffer\u003e gs \u003cplug\u003e(lsp-document-symbol-search)\n    nmap \u003cbuffer\u003e gS \u003cplug\u003e(lsp-workspace-symbol-search)\n    nmap \u003cbuffer\u003e gr \u003cplug\u003e(lsp-references)\n    nmap \u003cbuffer\u003e gi \u003cplug\u003e(lsp-implementation)\n    nmap \u003cbuffer\u003e gt \u003cplug\u003e(lsp-type-definition)\n    nmap \u003cbuffer\u003e \u003cleader\u003ern \u003cplug\u003e(lsp-rename)\n    nmap \u003cbuffer\u003e [g \u003cplug\u003e(lsp-previous-diagnostic)\n    nmap \u003cbuffer\u003e ]g \u003cplug\u003e(lsp-next-diagnostic)\n    nmap \u003cbuffer\u003e K \u003cplug\u003e(lsp-hover)\n    nnoremap \u003cbuffer\u003e \u003cexpr\u003e\u003cc-f\u003e lsp#scroll(+4)\n    nnoremap \u003cbuffer\u003e \u003cexpr\u003e\u003cc-d\u003e lsp#scroll(-4)\n\n    let g:lsp_format_sync_timeout = 1000\n    autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')\n    \n    \" refer to doc to add more commands\nendfunction\n\naugroup lsp_install\n    au!\n    \" call s:on_lsp_buffer_enabled only for languages that has the server registered.\n    autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()\naugroup END\n```\n\nRefer to [vim-lsp-settings](https://github.com/mattn/vim-lsp-settings) on how to easily setup language servers using vim-lsp automatically.\n\n```viml\nPlug 'prabirshrestha/vim-lsp'\nPlug 'mattn/vim-lsp-settings'\n```\n\n## auto-complete\n\nRefer to docs on configuring omnifunc or [asyncomplete.vim](https://github.com/prabirshrestha/asyncomplete.vim).\n\n## Snippets\nvim-lsp does not support snippets by default. If you want snippet integration, you will first have to install a third-party snippet plugin and a plugin that integrates it in vim-lsp.\nAt the moment, you have following options:\n1. [vim-vsnip](https://github.com/hrsh7th/vim-vsnip) together with [vim-vsnip-integ](https://github.com/hrsh7th/vim-vsnip-integ)\n2. [UltiSnips](https://github.com/SirVer/ultisnips) together with [vim-lsp-ultisnips](https://github.com/thomasfaingnaert/vim-lsp-ultisnips)\n3. [neosnippet.vim](https://github.com/Shougo/neosnippet.vim) together with [vim-lsp-neosnippet](https://github.com/thomasfaingnaert/vim-lsp-neosnippet)\n\nFor more information, refer to the readme and documentation of the respective plugins.\n\n## Folding\n\nYou can let the language server automatically handle folding for you. To enable this, you have to set `'foldmethod'`, `'foldexpr'` and (optionally) `'foldtext'`:\n\n```vim\nset foldmethod=expr\n  \\ foldexpr=lsp#ui#vim#folding#foldexpr()\n  \\ foldtext=lsp#ui#vim#folding#foldtext()\n```\n\nIf you would like to disable folding globally, you can add this to your configuration:\n\n```vim\nlet g:lsp_fold_enabled = 0\n```\n\nAlso see `:h vim-lsp-folding`.\n\n## Semantic highlighting\nvim-lsp supports the unofficial extension to the LSP protocol for semantic highlighting (https://github.com/microsoft/vscode-languageserver-node/pull/367).\nThis feature requires Neovim highlights, or Vim with the `textprop` feature enabled.\nYou will also need to link language server semantic scopes to Vim highlight groups.\nRefer to `:h vim-lsp-semantic` for more info.\n\n## Supported commands\n\n**Note:**\n* Some servers may only support partial commands.\n* While it is possible to register multiple servers for the same filetype, some commands will pick only the first server that supports it. For example, it doesn't make sense for rename and format commands to be sent to multiple servers.\n\n| Command | Description|\n|--|--|\n|`:LspAddTreeCallHierarchyIncoming`| Find incoming call hierarchy for the symbol under cursor, but add the result to the current list |\n|`:LspCallHierarchyIncoming`| Find incoming call hierarchy for the symbol under cursor |\n|`:LspCallHierarchyOutgoing`| Find outgoing call hierarchy for the symbol under cursor |\n|`:LspCodeAction`| Gets a list of possible commands that can be applied to a file so it can be fixed (quick fix) |\n|`:LspCodeLens`| Gets a list of possible commands that can be executed on the current document |\n|`:LspDeclaration`| Go to the declaration of the word under the cursor, and open in the current window |\n|`:LspDefinition`| Go to the definition of the word under the cursor, and open in the current window |\n|`:LspDocumentDiagnostics`| Get current document diagnostics information |\n|`:LspDocumentFormat`| Format entire document |\n|`:LspDocumentRangeFormat`| Format document selection |\n|`:LspDocumentSymbol`| Show document symbols |\n|`:LspHover`| Show hover information |\n|`:LspImplementation` | Show implementation of interface in the current window |\n|`:LspNextDiagnostic`| jump to next diagnostic (all of error, warning, information, hint) |\n|`:LspNextError`| jump to next error |\n|`:LspNextReference`| jump to next reference to the symbol under cursor |\n|`:LspNextWarning`| jump to next warning |\n|`:LspPeekDeclaration`| Go to the declaration of the word under the cursor, but open in preview window |\n|`:LspPeekDefinition`| Go to the definition of the word under the cursor, but open in preview window |\n|`:LspPeekImplementation`| Go to the implementation of an interface, but open in preview window |\n|`:LspPeekTypeDefinition`| Go to the type definition of the word under the cursor, but open in preview window |\n|`:LspPreviousDiagnostic`| jump to previous diagnostic (all of error, warning, information, hint) |\n|`:LspPreviousError`| jump to previous error |\n|`:LspPreviousReference`| jump to previous reference to the symbol under cursor |\n|`:LspPreviousWarning`| jump to previous warning |\n|`:LspReferences`| Find references |\n|`:LspRename`| Rename symbol |\n|`:LspStatus` | Show the status of the language server |\n|`:LspTypeDefinition`| Go to the type definition of the word under the cursor, and open in the current window |\n|`:LspTypeHierarchy`| View type hierarchy of the symbol under the cursor |\n|`:LspWorkspaceSymbol`| Search/Show workspace symbol |\n\n### Diagnostics\n\nDocument diagnostics (e.g. warnings, errors) are enabled by default, but if you\npreferred to turn them off and use other plugins instead (like\n[Neomake](https://github.com/neomake/neomake) or\n[ALE](https://github.com/w0rp/ale), set `g:lsp_diagnostics_enabled` to\n`0`:\n\n```viml\nlet g:lsp_diagnostics_enabled = 0         \" disable diagnostics support\n```\n\n### Highlight references\n\nHighlight references to the symbol under the cursor (enabled by default).\nYou can disable it by adding\n\n```viml\nlet g:lsp_document_highlight_enabled = 0\n```\n\nto your configuration.\n\nTo change the style of the highlighting, you can set or link the `lspReference`\nhighlight group, e.g.:\n\n```viml\nhighlight lspReference ctermfg=red guifg=red ctermbg=green guibg=green\n```\n\n## Debugging\n\nIn order to enable file logging set `g:lsp_log_file`.\n\n```vim\nlet g:lsp_log_verbose = 1\nlet g:lsp_log_file = expand('~/vim-lsp.log')\n\n\" for asyncomplete.vim log\nlet g:asyncomplete_log_file = expand('~/asyncomplete.log')\n```\n\nYou can get detailed status on your servers using `:CheckHealth` with a plugin on vim:\n\n```vim\nif !has('nvim') | Plug 'rhysd/vim-healthcheck' | endif\nCheckHealth\n```\n\n## Tests\n\n[vim-themis](https://github.com/thinca/vim-themis) is used for testing. To run\nintegration tests [gopls](https://github.com/golang/tools/tree/master/gopls)\nexecutable must be in path.\n\n## Maintainers\n\n- [Prabir Shrestha](https://github.com/prabirshrestha) (author, maintainer)\n- [mattn](https://github.com/mattn) (maintainer)\n- [hrsh7th](https://github.com/hrsh7th) (maintainer)\n- [Thomas Faingnaert](https://github.com/thomasfaingnaert) (maintainer)\n- [rhysd](https://github.com/rhysd) (maintainer)\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/vim-lsp#backer)]\n\n\u003ca href=\"https://opencollective.com/vim-lsp/backer/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/backer/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/backer/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/backer/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/backer/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/4/avatar.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://opencollective.com/vim-lsp/backer/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/5/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/6/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/7/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/8/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/9/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/10/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/10/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/11/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/11/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/12/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/12/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/13/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/13/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/backer/14/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/backer/14/avatar.svg\"\u003e\u003c/a\u003e\n\n\n## Sponsors\n\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/vim-lsp#sponsor)]\n\n\u003ca href=\"https://opencollective.com/vim-lsp/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/vim-lsp/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/10/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/10/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/11/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/11/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/12/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/12/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/13/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/13/avatar.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/vim-lsp/sponsor/14/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/vim-lsp/sponsor/14/avatar.svg\"\u003e\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabirshrestha%2Fvim-lsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprabirshrestha%2Fvim-lsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabirshrestha%2Fvim-lsp/lists"}