diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2021-03-10 16:53:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 16:53:23 -0500 |
commit | 564dd7d8db110d134987f8619c3894d2149f8956 (patch) | |
tree | c640576e9074274a66982f26daecf72230653f57 /runtime/lua/vim/lsp/protocol.lua | |
parent | c29494b719d9706aa84758336b4c1e7ba6f86070 (diff) | |
download | rneovim-564dd7d8db110d134987f8619c3894d2149f8956.tar.gz rneovim-564dd7d8db110d134987f8619c3894d2149f8956.tar.bz2 rneovim-564dd7d8db110d134987f8619c3894d2149f8956.zip |
lsp: get_language_id (#14092)
* Allow specifying a languageId for a lsp
For some languages the filetype might not match the languageId the
language server accepts. In these cases the config for the language
server can contain a function which gets the current buffer and filetype
and returns a languageId. When it isn't provided the filetype is used
instead.
Example:
```lua
require'lspconfig'.sourcekit.setup{
get_language_id = function(bufnr, ft)
return 'swift'
end;
}
```
Closes #13093
* lsp: Change to get_language_id
Co-authored-by: Jan Dammshäuser <mail@jandamm.de>
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
0 files changed, 0 insertions, 0 deletions