completion-nvim icon indicating copy to clipboard operation
completion-nvim copied to clipboard

cssls no autocompletion

Open abenz1267 opened this issue 4 years ago • 4 comments

My testing minimal init.vim Minimal config with with nvim-lspconfig, completion-nvim.

How to reproduce Create new *.css file and try out autocompletion

Expected behavior Autocompleting items. backg -> list with background- etc.

I've tried checking if it's nvim-lsp or something else, but autocompletion works fine with omnifunc.

Any idea?

Regards

Andrej Benz

abenz1267 avatar Nov 12 '20 15:11 abenz1267

That's weird...I'll look into this when I'm available.

haorenW1025 avatar Nov 20 '20 09:11 haorenW1025

I'm having a similar issue with all the LSP servers I've tried (rls, ccls, ocamllsp and pyls). I enable autocompletion like so:

autocmd BufEnter * lua require'completion'.on_attach()

Further down in my config, I enable various language servers:

lua <<EOF
	local lsp = require'lspconfig'
	local comp = require'completion'
	lsp.ccls.setup {
		settings = {
			diagnostics = {
				onChange = 4000;
			}
		}; 
		on_attach = comp.on_attach;
	}
	lsp.ocamllsp.setup{ on_attach = comp.on_attach; }
	lsp.rls.setup{ on_attach = comp.on_attach; }
	lsp.pyls.setup{ on_attach = comp.on_attach; }
EOF

But autocompletion doesn't work in buffers with the LSPs enabled, only in those without an LSP running.

Keating950 avatar Nov 22 '20 17:11 Keating950

If this is still an issue for somebody, what helped me is set snippetSupport = true for cssls (and html). See: hrsh7th/vim-vsnip-integ#36

gadkadosh avatar Dec 29 '20 08:12 gadkadosh

Thank-you, I've been looking for a solution for so long for this. I feel like it needs to be more prominent somewhere in the documentation.

nimaipatel avatar Dec 31 '20 09:12 nimaipatel