All Projects → hrsh7th → vim-lamp

hrsh7th / vim-lamp

Licence: MIT license
💡Language Server Protocol client for Vim.

Programming Languages

Vim Script
2826 projects
typescript
32286 projects
PHP
23972 projects - #3 most used programming language
rust
11053 projects
HTML
75241 projects
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to vim-lamp

nvim-toggle-terminal
NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance
Stars: ✭ 54 (+58.82%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+1326.47%)
Mutual labels:  nvim, lsp, nvim-plugin
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+53629.41%)
Mutual labels:  vim-plugin, nvim, lsp
Nvim Lspconfig
Quickstart configurations for the Nvim LSP client
Stars: ✭ 3,410 (+9929.41%)
Mutual labels:  language-server-protocol, nvim, lsp
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+588.24%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
Vim Lsp Cxx Highlight
Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
Stars: ✭ 231 (+579.41%)
Mutual labels:  vim-plugin, language-server-protocol, nvim
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (+105.88%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
LspCpp
A Language Server Protocol implementation in C++
Stars: ✭ 40 (+17.65%)
Mutual labels:  language-server-protocol, lsp
py lsp.nvim
Lsp Plugin for working with Python virtual environments
Stars: ✭ 58 (+70.59%)
Mutual labels:  nvim, lsp
tower-lsp
Language Server Protocol implementation written in Rust
Stars: ✭ 455 (+1238.24%)
Mutual labels:  language-server-protocol, lsp
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+2197.06%)
Mutual labels:  lsp, nvim-plugin
coc-java-debug
An extension for coc.nvim to enable Java debugging via jdt.ls
Stars: ✭ 92 (+170.59%)
Mutual labels:  nvim, lsp
lsp-command
Command interface for neovim LSP
Stars: ✭ 48 (+41.18%)
Mutual labels:  nvim, lsp
groovy-language-server
A language server for Groovy
Stars: ✭ 132 (+288.24%)
Mutual labels:  language-server-protocol, lsp
nvim-config
My neovim config
Stars: ✭ 63 (+85.29%)
Mutual labels:  nvim, lsp
nvim-metals
A Metals plugin for Neovim
Stars: ✭ 265 (+679.41%)
Mutual labels:  nvim, lsp
lsp spinner.nvim
neovim plugin to retrieve the name of the running LSP client(s) and display a spinner when there are wip job
Stars: ✭ 23 (-32.35%)
Mutual labels:  nvim, lsp
typescript-language-server
TypeScript & JavaScript Language Server
Stars: ✭ 1,118 (+3188.24%)
Mutual labels:  language-server-protocol, lsp
lxtk
Language Client/Server Toolkit
Stars: ✭ 22 (-35.29%)
Mutual labels:  language-server-protocol, lsp
vscode
The Visual Studio Code Extension for the Erlang Language Server
Stars: ✭ 62 (+82.35%)
Mutual labels:  language-server-protocol, lsp

vim-lamp

Language Server Protocol client for Vim.

Concept

  • Works on vim/nvim both
  • High performance
  • Well supported LSP spec
  • Well visualize diagnostics

Status

  • APIs aren't stable yet.
    • Apply breaking change with no announcement.

Setting

if has('vim_starting')
  set encoding=utf-8
endif
scriptencoding utf-8

if &compatible
  set nocompatible
endif

if !isdirectory(expand('~/.vim/plugged/vim-plug'))
  silent !curl -fLo ~/.vim/plugged/vim-plug/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
end
execute printf('source %s', expand('~/.vim/plugged/vim-plug/plug.vim'))

call plug#begin('~/.vim/plugged')
Plug 'hrsh7th/vim-lamp'
Plug 'hrsh7th/vim-compete'
Plug 'hrsh7th/vim-compete-lamp'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
call plug#end()

"
" required options
"
set hidden

augroup vimrc
  autocmd!
augroup END

"
" initialize servers
"
autocmd! vimrc User lamp#initialized call s:on_initialized()
function! s:on_initialized()
  " built-in setting
  call lamp#builtin#intelephense()
  call lamp#builtin#html_languageserver()
  call lamp#builtin#css_languagserver()
  call lamp#builtin#typescript_language_server()
  call lamp#builtin#vim_language_server()
  call lamp#builtin#gopls()
  call lamp#builtin#rls()
  call lamp#builtin#pyls()

  " custom setting
  call lamp#register('example-server', {
        \   'command': ['example-server', '--stdio'],
        \   'filetypes': ['example'],
        \   'root_uri': { -> lamp#findup(['.git', 'example.config.json']) },
        \   'initialization_options': { -> {
        \   } },
        \   'capabilitis': {
        \     'completionProvider': {
        \       'triggerCharacters': [',']
        \     }
        \   }
        \ })
endfunction

"
" initialize buffers
"
autocmd! vimrc User lamp#text_document_did_open call s:on_text_document_did_open()
function! s:on_text_document_did_open() abort
  " completion
  setlocal omnifunc=lamp#complete

  " commands
  nnoremap <buffer> gf<CR>       :<C-u>LampDefinition edit<CR>
  nnoremap <buffer> gfs          :<C-u>LampDefinition split<CR>
  nnoremap <buffer> gfv          :<C-u>LampDefinition vsplit<CR>
  nnoremap <buffer> tgf<CR>      :<C-u>LampTypeDefinition edit<CR>
  nnoremap <buffer> tgfs         :<C-u>LampTypeDefinition split<CR>
  nnoremap <buffer> tgfv         :<C-u>LampTypeDefinition vsplit<CR>
  nnoremap <buffer> dgf<CR>      :<C-u>LampDeclaration edit<CR>
  nnoremap <buffer> dgfs         :<C-u>LampDeclaration split<CR>
  nnoremap <buffer> dgfv         :<C-u>LampDeclaration vsplit<CR>
  nnoremap <buffer> <Leader>i    :<C-u>LampHover<CR>
  nnoremap <buffer> <Leader>r    :<C-u>LampRename<CR>
  nnoremap <buffer> <Leader>g    :<C-u>LampReferences<CR>
  nnoremap <buffer> @            :<C-u>LampDocumentHighlight<CR>
  nnoremap <buffer> <Leader>@    :<C-u>LampDocumentHighlightClear<CR>
  nnoremap <buffer> <Leader>f    :<C-u>LampFormatting<CR>
  vnoremap <buffer> <Leader>f    :LampRangeFormatting<CR>
  nnoremap <buffer> <Leader><CR> :<C-u>LampCodeAction<CR>
  vnoremap <buffer> <Leader><CR> :LampCodeAction<CR>
  nnoremap <buffer> <C-n>        :<C-u>LampSelectionRangeExpand<CR>
  nnoremap <buffer> <C-p>        :<C-u>LampSelectionRangeCollapse<CR>
  vnoremap <buffer> <C-n>        :<C-u>LampSelectionRangeExpand<CR>
  vnoremap <buffer> <C-p>        :<C-u>LampSelectionRangeCollapse<CR>
  nnoremap <buffer> <C-k>        :<C-u>LampDiagnosticsPrev<CR>
  nnoremap <buffer> <C-j>        :<C-u>LampDiagnosticsNext<CR>
endfunction

Spec compatibility

- General
    - [x] initialize
    - [x] initialized
    - [x] shutdown
    - [x] exit
    - [x] $/cancelRequest
    - [ ] $/progress

- Window
    - [x] window/showMessage
    - [x] window/showMessageRequest
    - [x] window/logMessage
    - [ ] window/workDoneProgress/create
    - [ ] window/workDoneProgress/cancel

- Telemetry
    - [x] telemetry/event

- Client
    - [ ] ~~client/registerCapability~~ (Maybe unneeded)
    - [ ] ~~client/unregisterCapability~~ (Maybe unneeded)

- Workspace
    - [x] workspace/workspaceFolders
    - [x] workspace/didChangeWorkspaceFolders
    - [x] workspace/didChangeConfiguration
    - [x] workspace/configuration
    - [ ] workspace/didChangeWatchedFiles
    - [ ] workspace/symbol
    - [x] workspace/executeCommand
    - [x] workspace/applyEdit

- Synchronization
    - [x] textDocument/didOpen
    - [x] textDocument/didChange
    - [x] textDocument/willSave
    - [x] textDocument/willSaveWaitUntil
    - [x] textDocument/didSave
    - [x] textDocument/didClose

- Diagnostics
    - [x] textDocument/publishDiagnostics

- Language Features
    - [x] textDocument/completion
    - [x] completionItem/resolve
    - [x] textDocument/hover
    - [x] textDocument/signatureHelp
    - [x] textDocument/declaration
    - [x] textDocument/definition
    - [x] textDocument/typeDefinition
    - [x] textDocument/implementation
    - [x] textDocument/references
    - [x] textDocument/documentHighlight
    - [ ] textDocument/documentSymbol
    - [x] textDocument/codeAction
    - [ ] textDocument/codeLens
    - [ ] codeLens/resolve
    - [ ] textDocument/documentLink
    - [ ] documentLink/resolve
    - [ ] textDocument/documentColor
    - [ ] textDocument/colorPresentation
    - [x] textDocument/formatting
    - [x] textDocument/rangeFormatting
    - [x] textDocument/onTypeFormatting
    - [x] textDocument/rename
    - [x] textDocument/prepareRename
    - [ ] textDocument/foldingRange
    - [x] textDocument/selectionRange

- Proposed
    - [ ] textDocument/semanticTokens
    - [ ] textDocument/callHierarchy

TODO

  • Use VS.System.Job and VS.RPC.JSON
  • Support textDocument/codeLens
  • Support textDocument/onTypeFormatting with <CR>
  • Support $/progress
  • Support textDocument/semanticTokens
  • Support textDocument/foldingRange
  • Custom highlighting in fenced language (e.g. underlined)
  • Improve documentation
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].