{"id":13485262,"url":"https://github.com/hrsh7th/vim-lamp","last_synced_at":"2025-05-05T15:54:30.777Z","repository":{"id":42020898,"uuid":"218449259","full_name":"hrsh7th/vim-lamp","owner":"hrsh7th","description":"💡Language Server Protocol client for Vim.","archived":false,"fork":false,"pushed_at":"2022-04-18T02:58:45.000Z","size":767,"stargazers_count":32,"open_issues_count":10,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T09:58:50.845Z","etag":null,"topics":["language-server-protocol","lsp","nvim","nvim-plugin","vim","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrsh7th.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}},"created_at":"2019-10-30T05:22:33.000Z","updated_at":"2024-07-01T07:58:27.000Z","dependencies_parsed_at":"2022-08-12T02:31:35.119Z","dependency_job_id":null,"html_url":"https://github.com/hrsh7th/vim-lamp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fvim-lamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fvim-lamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fvim-lamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fvim-lamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrsh7th","download_url":"https://codeload.github.com/hrsh7th/vim-lamp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252527627,"owners_count":21762734,"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":["language-server-protocol","lsp","nvim","nvim-plugin","vim","vim-plugin"],"created_at":"2024-07-31T17:01:53.319Z","updated_at":"2025-05-05T15:54:30.739Z","avatar_url":"https://github.com/hrsh7th.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# vim-lamp\nLanguage Server Protocol client for Vim.\n\n# Concept\n- Works on vim/nvim both\n- High performance\n- Well supported LSP spec\n- Well visualize diagnostics\n\n# Status\n- APIs aren't stable yet.\n    - Apply breaking change with no announcement.\n\n\n# Setting\n\n```vim\nif has('vim_starting')\n  set encoding=utf-8\nendif\nscriptencoding utf-8\n\nif \u0026compatible\n  set nocompatible\nendif\n\nif !isdirectory(expand('~/.vim/plugged/vim-plug'))\n  silent !curl -fLo ~/.vim/plugged/vim-plug/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\nend\nexecute printf('source %s', expand('~/.vim/plugged/vim-plug/plug.vim'))\n\ncall plug#begin('~/.vim/plugged')\nPlug 'hrsh7th/vim-lamp'\nPlug 'hrsh7th/vim-compete'\nPlug 'hrsh7th/vim-compete-lamp'\nPlug 'hrsh7th/vim-vsnip'\nPlug 'hrsh7th/vim-vsnip-integ'\ncall plug#end()\n\n\"\n\" required options\n\"\nset hidden\n\naugroup vimrc\n  autocmd!\naugroup END\n\n\"\n\" initialize servers\n\"\nautocmd! vimrc User lamp#initialized call s:on_initialized()\nfunction! s:on_initialized()\n  \" built-in setting\n  call lamp#builtin#intelephense()\n  call lamp#builtin#html_languageserver()\n  call lamp#builtin#css_languagserver()\n  call lamp#builtin#typescript_language_server()\n  call lamp#builtin#vim_language_server()\n  call lamp#builtin#gopls()\n  call lamp#builtin#rls()\n  call lamp#builtin#pyls()\n\n  \" custom setting\n  call lamp#register('example-server', {\n        \\   'command': ['example-server', '--stdio'],\n        \\   'filetypes': ['example'],\n        \\   'root_uri': { -\u003e lamp#findup(['.git', 'example.config.json']) },\n        \\   'initialization_options': { -\u003e {\n        \\   } },\n        \\   'capabilitis': {\n        \\     'completionProvider': {\n        \\       'triggerCharacters': [',']\n        \\     }\n        \\   }\n        \\ })\nendfunction\n\n\"\n\" initialize buffers\n\"\nautocmd! vimrc User lamp#text_document_did_open call s:on_text_document_did_open()\nfunction! s:on_text_document_did_open() abort\n  \" completion\n  setlocal omnifunc=lamp#complete\n\n  \" commands\n  nnoremap \u003cbuffer\u003e gf\u003cCR\u003e       :\u003cC-u\u003eLampDefinition edit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e gfs          :\u003cC-u\u003eLampDefinition split\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e gfv          :\u003cC-u\u003eLampDefinition vsplit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e tgf\u003cCR\u003e      :\u003cC-u\u003eLampTypeDefinition edit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e tgfs         :\u003cC-u\u003eLampTypeDefinition split\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e tgfv         :\u003cC-u\u003eLampTypeDefinition vsplit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e dgf\u003cCR\u003e      :\u003cC-u\u003eLampDeclaration edit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e dgfs         :\u003cC-u\u003eLampDeclaration split\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e dgfv         :\u003cC-u\u003eLampDeclaration vsplit\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003ei    :\u003cC-u\u003eLampHover\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003er    :\u003cC-u\u003eLampRename\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003eg    :\u003cC-u\u003eLampReferences\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e @            :\u003cC-u\u003eLampDocumentHighlight\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003e@    :\u003cC-u\u003eLampDocumentHighlightClear\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003ef    :\u003cC-u\u003eLampFormatting\u003cCR\u003e\n  vnoremap \u003cbuffer\u003e \u003cLeader\u003ef    :LampRangeFormatting\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cLeader\u003e\u003cCR\u003e :\u003cC-u\u003eLampCodeAction\u003cCR\u003e\n  vnoremap \u003cbuffer\u003e \u003cLeader\u003e\u003cCR\u003e :LampCodeAction\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cC-n\u003e        :\u003cC-u\u003eLampSelectionRangeExpand\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cC-p\u003e        :\u003cC-u\u003eLampSelectionRangeCollapse\u003cCR\u003e\n  vnoremap \u003cbuffer\u003e \u003cC-n\u003e        :\u003cC-u\u003eLampSelectionRangeExpand\u003cCR\u003e\n  vnoremap \u003cbuffer\u003e \u003cC-p\u003e        :\u003cC-u\u003eLampSelectionRangeCollapse\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cC-k\u003e        :\u003cC-u\u003eLampDiagnosticsPrev\u003cCR\u003e\n  nnoremap \u003cbuffer\u003e \u003cC-j\u003e        :\u003cC-u\u003eLampDiagnosticsNext\u003cCR\u003e\nendfunction\n```\n\n# [Spec compatibility](https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/)\n\u003cdetails\u003e\n\n    - General\n        - [x] initialize\n        - [x] initialized\n        - [x] shutdown\n        - [x] exit\n        - [x] $/cancelRequest\n        - [ ] $/progress\n\n    - Window\n        - [x] window/showMessage\n        - [x] window/showMessageRequest\n        - [x] window/logMessage\n        - [ ] window/workDoneProgress/create\n        - [ ] window/workDoneProgress/cancel\n\n    - Telemetry\n        - [x] telemetry/event\n\n    - Client\n        - [ ] ~~client/registerCapability~~ (Maybe unneeded)\n        - [ ] ~~client/unregisterCapability~~ (Maybe unneeded)\n\n    - Workspace\n        - [x] workspace/workspaceFolders\n        - [x] workspace/didChangeWorkspaceFolders\n        - [x] workspace/didChangeConfiguration\n        - [x] workspace/configuration\n        - [ ] workspace/didChangeWatchedFiles\n        - [ ] workspace/symbol\n        - [x] workspace/executeCommand\n        - [x] workspace/applyEdit\n\n    - Synchronization\n        - [x] textDocument/didOpen\n        - [x] textDocument/didChange\n        - [x] textDocument/willSave\n        - [x] textDocument/willSaveWaitUntil\n        - [x] textDocument/didSave\n        - [x] textDocument/didClose\n\n    - Diagnostics\n        - [x] textDocument/publishDiagnostics\n\n    - Language Features\n        - [x] textDocument/completion\n        - [x] completionItem/resolve\n        - [x] textDocument/hover\n        - [x] textDocument/signatureHelp\n        - [x] textDocument/declaration\n        - [x] textDocument/definition\n        - [x] textDocument/typeDefinition\n        - [x] textDocument/implementation\n        - [x] textDocument/references\n        - [x] textDocument/documentHighlight\n        - [ ] textDocument/documentSymbol\n        - [x] textDocument/codeAction\n        - [ ] textDocument/codeLens\n        - [ ] codeLens/resolve\n        - [ ] textDocument/documentLink\n        - [ ] documentLink/resolve\n        - [ ] textDocument/documentColor\n        - [ ] textDocument/colorPresentation\n        - [x] textDocument/formatting\n        - [x] textDocument/rangeFormatting\n        - [x] textDocument/onTypeFormatting\n        - [x] textDocument/rename\n        - [x] textDocument/prepareRename\n        - [ ] textDocument/foldingRange\n        - [x] textDocument/selectionRange\n\n    - Proposed\n        - [ ] textDocument/semanticTokens\n        - [ ] textDocument/callHierarchy\n\n\u003c/details\u003e\n\n# TODO\n- Use VS.System.Job and VS.RPC.JSON\n- Support `textDocument/codeLens`\n- Support `textDocument/onTypeFormatting` with `\u003cCR\u003e`\n- Support `$/progress`\n- Support `textDocument/semanticTokens`\n- Support `textDocument/foldingRange`\n- Custom highlighting in fenced language (e.g. underlined)\n- Improve documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrsh7th%2Fvim-lamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrsh7th%2Fvim-lamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrsh7th%2Fvim-lamp/lists"}