Closed nabezokodaikon closed 2 years ago
I solved it with the following settings.
call ddc#custom#patch_filetype(['css'], {
\ 'keywordPattern': '[a-zA-Z_:\s]\w*',
\ 'smartCase': v:true,
\ })
After all I couldn't do it well. The settings are as follows.
call ddc#custom#patch_filetype(['css'], {
\ 'keywordPattern': '[a-zA-Z_:]\w*',
\ 'smartCase': v:true,
\ })
call ddc#custom#patch_filetype(['css'], 'sources', ['nvim-lsp'])
call ddc#custom#patch_filetype(['css'], 'sourceOptions', {
\ 'nvim-lsp': {
\ 'forceCompletionPattern': ':\s\w*' },
\ })
The item called Unit of LSP is not completed correctly.
Your keyword pattern is wrong. You should know what is you have set.
\ 'keywordPattern': '[a-zA-Z_:]\w*',
does not match 10
.
You need to use \w*
instead.
I'm sorry. Could you tell me the general settings?
What is the general? You need to configure plugins as you need.
I'm sorry. I would like to know an example of a specific setting method.
No magic. You need to configure by try and error.
It means:
If you don't want to configure plugins, you don't have to use the plugin. It does not work with zero configuration. You can use other plugins.
ddc works as you configure.
Understood.
The default pattern is \k*
. It may be better if you don't want to configure patterns. But you have changed it. It is own risk.
I think nvim-lsp may set better pattern automatically from LSP server. But it is not my policy. It is too complicated and it is not easy to configure by users.
Problems summary
I don't know the proper setting for CSS forceCompletionPattern. Completion candidates that start with a colon are not entered correctly.
Expected
Find out the proper settings for the CSS forceCompletionPattern.
Environment Information
ddc.vim version (SHA1): 9c43cf1f89136a2b6592e694a693c9676a3ffaa7
ddc-nvim-lsp version (SHA1): 75b53823d900d9be55a77fe2d096d54d0eaa262c
denops.vim version (SHA1): f575cd5c56787b764e064da845b72ceea184ea97
deno version(
deno -V
output): 1.15.1OS: Mac
neovim/Vim
:version
output: 0.5.1:checkhealth
or:CheckHealth
result(neovim only): OKProvide a minimal init.vim/vimrc with less than 50 lines (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
html:
in the CSS file.nvim-cmp setup
Screenshot (if possible)
ddc-nvim-lsp![スクリーンショット 2021-10-14 23 24 11](https://user-images.githubusercontent.com/3197942/137343417-486b902d-4cc0-40c8-8e6a-3345fd54ce51.png)
nvim-cmp![スクリーンショット 2021-10-14 23 41 15](https://user-images.githubusercontent.com/3197942/137343473-39befabf-0297-49c1-8537-602188665de3.png)