Skip to content
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

# symbol doesn't start the cmp menu in a CSS property #57

Open
sidequestboy opened this issue May 27, 2023 · 0 comments
Open

# symbol doesn't start the cmp menu in a CSS property #57

sidequestboy opened this issue May 27, 2023 · 0 comments

Comments

@sidequestboy
Copy link

I'm not 100% sure this is the right place to report this.

Using a minimal configuration nvim-minimal/init.vim:

if has('vim_starting')
  set encoding=utf-8
endif
scriptencoding utf-8

if &compatible
  set nocompatible
endif

let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
  execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end

execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'neovim/nvim-lspconfig'
call plug#end()
PlugInstall | quit

lua << EOF
local cmp = require "cmp"
cmp.setup {
  snippet = {
    expand = function(args)
      vim.fn["vsnip#anonymous"](args.body)
    end,
  },

  mapping = {
    ['<CR>'] = cmp.mapping.confirm({ select = true })
  },

  sources = {
    { name = "nvim_lsp" },
  },
}

local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
local lspconfig = require('lspconfig')
lspconfig.cssls.setup {
  capabilities = capabilities
}
EOF

If I edit a css file with nvim -u nvim-minimal/init.vim style.css, and I'm writing hex colours, previously used colours show as suggestions in the cmp menu. However, I would expect the cmp menu to show up when I type #, but it doesn't:

Screenshot 2023-05-26 at 8 50 12 PM

If I begin writing the colour though, it shows up.

Screenshot 2023-05-26 at 8 50 18 PM

I would expect the # symbol to behave similarly to typing any other matchable character, for example a:

Screenshot 2023-05-26 at 8 58 25 PM
$ nvim --version
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant