Comments (6)
Minimal vimrc.
set nocompatible
set runtimepath+=~/work/denops.vim
set runtimepath+=~/work/ddc.vim
set runtimepath+=~/work/ddc-filter-matcher_head
set runtimepath+=~/work/ddc-filter-sorter_rank
set runtimepath+=~/work/ddc-ui-native
set runtimepath+=~/work/ddc-source-nvim-lsp
set runtimepath+=~/src/nvim-lspconfig
lua << EOF
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
local lspconfig = require'lspconfig'
lspconfig.gopls.setup{capabilities = capabilities}
EOF
call ddc#custom#patch_global(
\ 'sources', ['nvim-lsp']
\ )
call ddc#custom#patch_global('ui', 'native')
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank'],
\ },
\ 'nvim-lsp': {
\ 'mark': 'lsp',
\ 'forceCompletionPattern': '\.\w*|:\w*|->\w*',
\ },
\ })
call ddc#enable()
from ddc-source-lsp.
Hi. I have tested it and empty items.
(I don't reproduce your error)
It is from capabilities.textDocument.completion.completionItem.snippetSupport = true
.
gopls
returns snippet items and it is filtered.
Because you don't set snippetEngine
param.
{
label: "fmt",
textEdit: { range: { end: [Object], start: [Object] }, newText: "fmt" },
filterText: "fmt",
preselect: true,
sortText: "00000",
kind: 9,
detail: '"fmt"',
documentation: { kind: "markdown", value: "" },
insertTextFormat: 2
},
insertTextFormat: 2
means snippet.
from ddc-source-lsp.
First of all, the basic premise is that a major renovation has recently taken place; please re-read the doc.
And to solve this case1, register snippetEngine (:h ddc-source-nvim-lsp-param-snippetEngine
).
gopls returns all candidates as a snippet if snippet=true
. So, if the snippetEngine is not registered, they will be filtered. If you don't want to use the snippet plugin, one solution is to change capabilities.
local capabilities = require('ddc_nvim_lsp').make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = false
from ddc-source-lsp.
error messages in :messages
I think the error message is from older commit.
It is bug and it is already fixed. So the items are filtered.
from ddc-source-lsp.
I have updated FAQ.
from ddc-source-lsp.
The issue is improved. Please update.
from ddc-source-lsp.
Related Issues (20)
- Enhancement: Added icons for candidates HOT 1
- lsp completions not appearing HOT 10
- The source becomes slow in non-lsp buffer HOT 8
- [Question] CSS LSP input. HOT 11
- [Question] What is the `$ 0` entered when completing CSS? HOT 8
- Candidates not shown (from gopls) HOT 3
- Not working on Typescript file. HOT 6
- Completions not working for Python 3 -- Nvim 0.6.0 HOT 10
- Showing errors with using efm-langserver HOT 2
- Question about usage HOT 3
- Using built-in terminal breaks lsp server HOT 2
- Last typed word remain as completion matcher even after deleting it HOT 2
- nvim-lsp "gather()" failed HOT 3
- inserted text disappear when snippetSupport is enabled HOT 2
- Rename to `ddc-source-lsp` HOT 1
- Display signature info in menu HOT 2
- `yegappan/lsp` support HOT 4
- [BUG] When using html-lsp, ui-pum in ddc may remain HOT 2
- `getPreviewer` does not work when using `lspEngine: 'vim-lsp'` HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddc-source-lsp.