-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp#complete omnifunc isn't triggered #285
Comments
lsp#complete
omnifunc isn't triggered
Maybe the vim-lsp can be configured for example like below, and omnicompletion works perfectly with the selected schema (when I open a let g:lsp_settings = {
\ 'json-languageserver': {
\ 'workspace_config': {
\ 'json': {
\ 'schemas': [
\ {
\ 'url': 'http://json.schemastore.org/package',
\ 'fileMatch': ['package.json'],
\ },
\ ],
\ 'format': {
\ 'enable': v:true,
\ }
\ },
\ },
\ }, With completor, this configuration is never passed - obviously - to the languages server (is there a way to do that?).
|
Looking for a way to pass configurations to LSP servers as well, any workarounds? |
Update completor to the latest and the LSP workspace configuration can be set using the following settings: let g:completor_filetype_map = {}
let g:completor_filetype_map.json = {
\ 'ft': 'lsp',
\ 'cmd': 'vscode-json-languageserver --stdio',
\ 'insertText': 'label',
\ 'config': {
\ 'json': {
\ 'format': { 'enable': v:false },
\ 'schemas': [
\ {'fileMatch': ['package.json'], 'url': 'http://json.schemastore.org/package'},
\ ]
\ }
\ }
\ } |
Omnifunc completion works very nicely with the css completer:
I would love to use the omnifunc completer from prabirshrestha/vim-lsp, however, It is not listing matches.
My configuration is similar to the css completion, I tried it with bash-language-server.
The debug log shows that - supposedly - the omnifunc is called:
If I press
i_Ctrl-X_Ctrl_O
, the completion popup appears, the omnifunc is working.I understand that completor itself could be configured to use LSP directly, however, vim-lsp (with mattn/vim-lsp-settings) is a super nice and scalable solution to maintain LSP enginges easily.
I could also use the suggested prabirshrestha/asyncomplete.vim and prabirshrestha/asyncomplete-lsp.vim async engines, however completor gives a more configurable and nicer representation, and better configurability for triggers etc.
The text was updated successfully, but these errors were encountered: