File tree Expand file tree Collapse file tree 4 files changed +36
-4
lines changed
Expand file tree Collapse file tree 4 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,25 @@ https://github.com/mattn/vim-lsp-settings
2626## Configuration
2727
2828```
29+ e.g.
30+
2931 call ddc#custom#patch_global('sources', ['vim-lsp'])
3032 call ddc#custom#patch_global('sourceOptions', {
3133 \ 'vim-lsp': {
3234 \ 'matchers': ['matcher_head'],
3335 \ 'mark': 'lsp',
3436 \ },
3537 \ })
38+
39+ " if you want to use the unsupported CompleteProvider Server,
40+ " set true by'ignoreCompleteProvider'.
41+ call ddc#custom#patch_filetype(['css'], {
42+ \ 'sourceParams': {
43+ \ 'vim-lsp': {
44+ \ 'ignoreCompleteProvider': v:true,
45+ \ },
46+ \ },
47+ \ })
3648```
3749
3850ddc.vim remove duplicated keyword by default.
Original file line number Diff line number Diff line change @@ -30,12 +30,16 @@ function! ddc_vim_lsp#request(server_name, id) abort
3030endfunction
3131
3232
33- function ! ddc_vim_lsp#get_completion_servers () abort
33+ function ! ddc_vim_lsp#get_completion_servers (ignoreCompleteProvider ) abort
3434 let l: names = []
3535 for l: server_name in lsp#get_allowed_servers ()
3636 let l: capabilities = lsp#get_server_capabilities (l: server_name )
37- if has_key ( l: capabilities , ' completionProvider ' )
37+ if a: ignoreCompleteProvider
3838 call add (l: names , l: server_name )
39+ else
40+ if has_key (l: capabilities , ' completionProvider' )
41+ call add (l: names , l: server_name )
42+ endif
3943 endif
4044 endfor
4145 return l: names
Original file line number Diff line number Diff line change 99} from "https://deno.land/x/ddc_vim@v2.0.0/base/source.ts#^" ;
1010
1111// deno-lint-ignore ban-types
12- type Params = { } ;
12+ type Params = {
13+ ignoreCompleteProvider : boolean ;
14+ } ;
1315
1416export class Source extends BaseSource < Params > {
1517 private counter = 0 ;
@@ -20,6 +22,7 @@ export class Source extends BaseSource<Params> {
2022
2123 const lspservers : string [ ] = await args . denops . call (
2224 "ddc_vim_lsp#get_completion_servers" ,
25+ args . sourceParams . ignoreCompleteProvider ,
2326 // deno-lint-ignore no-explicit-any
2427 ) as any ;
2528 if ( lspservers . length === 0 ) {
@@ -39,6 +42,8 @@ export class Source extends BaseSource<Params> {
3942 }
4043
4144 params ( ) : Params {
42- return { } ;
45+ return {
46+ ignoreCompleteProvider : false ,
47+ } ;
4348 }
4449}
Original file line number Diff line number Diff line change @@ -38,8 +38,19 @@ EXAMPLES *ddc-vim-lsp-examples*
3838 \ 'mark': 'lsp',
3939 \ },
4040 \ })
41+
42+ " if you want to use the unsupported CompleteProvider Server,
43+ " set true by'ignoreCompleteProvider'.
44+ call ddc#custom#patch_filetype(['css'], {
45+ \ 'sourceParams': {
46+ \ 'vim-lsp': {
47+ \ 'ignoreCompleteProvider': v:true,
48+ \ },
49+ \ },
50+ \ })
4151<
4252
53+
4354ddc.vim remove duplicated keyword by default.
4455If you want to list up both of them, please add `'dup' : v:true` .
4556
You can’t perform that action at this time.
0 commit comments