{"id":13682976,"url":"https://github.com/natebosch/vim-lsc","last_synced_at":"2025-04-12T14:21:16.609Z","repository":{"id":37706448,"uuid":"79178987","full_name":"natebosch/vim-lsc","owner":"natebosch","description":"A vim plugin for communicating with a language server","archived":false,"fork":false,"pushed_at":"2024-05-23T15:50:31.000Z","size":703,"stargazers_count":692,"open_issues_count":79,"forks_count":83,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-03T13:18:24.735Z","etag":null,"topics":["autocomplete","language-server-protocol","linting","neovim","quickfix","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natebosch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-17T02:16:22.000Z","updated_at":"2025-04-01T00:42:59.000Z","dependencies_parsed_at":"2024-01-14T16:08:12.688Z","dependency_job_id":"aa63e25e-5fa9-49c0-93bb-dec286b0701b","html_url":"https://github.com/natebosch/vim-lsc","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fvim-lsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fvim-lsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fvim-lsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natebosch%2Fvim-lsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natebosch","download_url":"https://codeload.github.com/natebosch/vim-lsc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578874,"owners_count":21127714,"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":["autocomplete","language-server-protocol","linting","neovim","quickfix","vim"],"created_at":"2024-08-02T13:01:56.656Z","updated_at":"2025-04-12T14:21:16.588Z","avatar_url":"https://github.com/natebosch.png","language":"Vim Script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# Vim Language Server Client\n\nAdds language-aware tooling to vim by communicating with a language server\nfollowing the [language server protocol][]. For more information see\n[langserver.org][].\n\n[language server protocol]: https://github.com/Microsoft/language-server-protocol\n[langserver.org]: http://langserver.org/\n\n## Installation\n\nInstall with your plugin management method of choice. If you don't have a\npreference check out [vim-plug][]. Install a language server and ensure it is\nexecutable from your `$PATH`.\n\nvim-lsc is compatible with vim 8, and neovim.\n\nNote: When using neovim be sure to use `set shortmess-=F` to avoid suppressing\nerror messages from this plugin.\n\n[vim-plug]:https://github.com/junegunn/vim-plug\n\n## Configuration\n\nMap a filetype to the command that starts the language server for that filetype\nin your `vimrc`.\n\n```viml\nlet g:lsc_server_commands = {'dart': 'dart_language_server'}\n```\n\nTo disable autocomplete in favor of manual completion also add\n\n```viml\nlet g:lsc_enable_autocomplete = v:false\n```\n\nMost interactive features are triggered by commands. You can use\n`g:lsc_auto_map` to have them automatically mapped for the buffers which have a\nlanguage server enabled. You can use the default mappings by setting it to\n`v:true`, or specify your own mappings in a dict.\n\nMost keys take strings or lists of strings which are the keys bound to that\ncommand in normal mode. The `'ShowHover'` key can also be `v:true` in which case\nit sets `keywordprg` instead of a keybind (`keywordprg` maps `K`). The\n'Completion' key sets a completion function for manual invocation, and should be\neither `'completefunc'` or `'omnifunc'` (see `:help complete-functions`).\n\n```viml\n\" Use all the defaults (recommended):\nlet g:lsc_auto_map = v:true\n\n\" Apply the defaults with a few overrides:\nlet g:lsc_auto_map = {'defaults': v:true, 'FindReferences': '\u003cleader\u003er'}\n\n\" Setting a value to a blank string leaves that command unmapped:\nlet g:lsc_auto_map = {'defaults': v:true, 'FindImplementations': ''}\n\n\" ... or set only the commands you want mapped without defaults.\n\" Complete default mappings are:\nlet g:lsc_auto_map = {\n    \\ 'GoToDefinition': '\u003cC-]\u003e',\n    \\ 'GoToDefinitionSplit': ['\u003cC-W\u003e]', '\u003cC-W\u003e\u003cC-]\u003e'],\n    \\ 'FindReferences': 'gr',\n    \\ 'NextReference': '\u003cC-n\u003e',\n    \\ 'PreviousReference': '\u003cC-p\u003e',\n    \\ 'FindImplementations': 'gI',\n    \\ 'FindCodeActions': 'ga',\n    \\ 'Rename': 'gR',\n    \\ 'ShowHover': v:true,\n    \\ 'DocumentSymbol': 'go',\n    \\ 'WorkspaceSymbol': 'gS',\n    \\ 'SignatureHelp': 'gm',\n    \\ 'Completion': 'completefunc',\n    \\}\n```\n\nDuring the initialization call LSP supports a `trace` argument which configures\nlogging on the server. Set this with `g:lsc_trace_level`. Valid values are\n`'off'`, `'messages'`, or `'verbose'`. Defaults to `'off'`.\n\n## Features\n\nThe protocol does not require that every language server supports every feature\nso support may vary.\n\nAll communication with the server is asynchronous and will not block the editor.\nFor requests that trigger an action the response might be silently ignored if it\ncan no longer be used - you can abort most operations that are too slow by\nmoving the cursor.\n\nThe client can be temporarily disabled for a session with `LSClientDisable` and\nre-enabled with `LSClientEnable`. At any time the server can be exited and\nrestarted with `LSClientRestartServer` - this sends a request for the server to\nexit rather than kill it's process so a completely unresponsive server should be\nkilled manually instead.\n\n### Diagnostics\n\nErrors, warnings, and hints reported by the server are highlighted in the\nbuffer. When the cursor is on a line with a diagnostic the message will be\ndisplayed. If there are multiple diagnostics on a line the one closest to the\ncursor will be displayed.\n\nDiagnostics are also reported in the location list for each window which has the\nbuffer open. **Tip:** Use `:lbefore` or `:lafter` to jump to the next diagnostic\nbefore or after the cursor position. If the location list was overwritten it can\nbe restored with `:LSCLientWindowDiagnostics`.\n\nRun `:LSClientAllDiagnostics` to populate, and maintain, a list of all\ndiagnostics across the project in the quickfix list.\n\n### Autocomplete\n\nWhen more than 3 word characters or a trigger character are typed a request for\nautocomplete suggestions is sent to the server. If the server responds before\nthe cursor moves again the options will be provided using vim's built in\ncompletion.\n\nNote: By default `completeopt` includes `preview` and completion items include\ndocumentation in the preview window. Close the window after completion with\n`\u003cc-w\u003e\u003cc-z\u003e` or disable with `set completeopt-=preview`. To automatically close\nthe documentation window use the following:\n\n```viml\nautocmd CompleteDone * silent! pclose\n```\n\nDisable autocomplete with `let g:lsc_enable_autocomplete = v:false`. A\ncompletion function is available at `lsc#complete#complete` (set to\n`completefunc` if applying the default keymap). This is synchronous and has a\ncap of 5 seconds to wait for the server to respond. It can be used whether\nautocomplete is enabled or not.\n\n### Reference Highlights\n\nIf the server supports the `textDocument/documentHighlight` call references to\nthe element under the cursor throughout the document will be highlighted.\nDisable with `let g:lsc_reference_highlights = v:false` or customize the\nhighlighting with the group `lscReference`. Use `\u003cc-n\u003e`\n(`:LSClientNextReference`) or `\u003cc-p\u003e` (`:LSClientPReviousReference`) to jump to\nother reference to the currently highlighted element.\n\n### Jump to definition\n\nWhile the cursor is on any identifier call `LSClientGoToDefinition` (`\u003cC-]\u003e` if\nusing the default mappings) to jump to the location of the definition. If the\ncursor moves before the server responds the response will be ignored.\n\n### Find references\n\nWhile the cursor is on any identifier call `LSClientFindReferences` (`gr` if\nusing the default mappings) to populate the quickfix list with usage locations.\n\n### Find implementations\n\nWhile the cursor is on any identifier call `LSClientFindImplementations` (`gI`\nif using the default mappings) to populate the quickfix list with implementation\nlocations.\n\n### Document Symbols\n\nCall `LSClientDocumentSymbol` (`go` if using the default mappings) to populate\nthe quickfix list with the locations of all symbols in that document.\n\n### Workspace Symbol Search\n\nCall `LSClientWorkspaceSymbol` with a no arguments, or with a single String\nargument. (`gS` if using the default mappings) to query the server for symbols\nmatching a search string. Results will populate the quickfix list.\n\n### Hover\n\nWhile the cursor is on any identifier call `LSClientShowHover` (`K` if using the\ndefault mappings, bound through `keywordprg`) to request hover text and show it\nin a popup or preview window.\nOverride the direction of the split by setting `g:lsc_preview_split_direction`\nto either `'below'` or `'above'`. Quickly close the preview without switching\nbuffers with `\u003cc-w\u003e\u003cc-z\u003e`. See `:help preview-window`.\n\n### Code Actions\n\nCall `LSClientFindCodeActions` (`ga` if using the default mappings) to look for\ncode actions available at the cursor location and run one by entering the number\nof the chosen action.\n\n### Signature help\n\nCall `LSClientSignatureHelp` (`gm` if using the default mappings) to get help while writing\na function call. The currently active parameter is highlighted with the group\n`lscCurrentParameter`.\n\n## Integrations with other plugins\n\n- [vista.vim](https://github.com/liuchengxu/vista.vim)\n- [deoplete-vim-lsc](https://github.com/hrsh7th/deoplete-vim-lsc)\n- [vim-vsnip](https://github.com/hrsh7th/vim-vsnip)\n- [vim-vsnip-integ](https://github.com/hrsh7th/vim-vsnip-integ)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatebosch%2Fvim-lsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatebosch%2Fvim-lsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatebosch%2Fvim-lsc/lists"}