Skip to content

completion snippets behave badly in the presence of combining diacritics #4404

Open
@expipiplus1

Description

@expipiplus1

Your environment

Which LSP client (editor/plugin) do you use?
Neovim, astrovim (which I think is using luasnips and nvim-cmp)

The actual crash is in nvim-cmp, so it's quite possibly a bug there, but at least turning off plugin.ghcide-completions.config.snippetsOn seems to fix things, so opening this issue just in case anyone else searches combining diacritics snippets or something.

Sorry for the low quality report!

Which version of HLS do you use and how did you install it?
haskell-language-server version: 2.9.0.0 (GHC: 9.8.2)

Steps to reproduce

  • Set up astrovim and enable the haskell community pack (definitely a smaller repro)
  • Open a haskell file
  • wait for hls to init
  • type (a with a combining circumflex)
  • observe something like:
Error executing vim.schedule lua callback: ...l/share/astrovim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:409: snippet parsing failed.
stack traceback:
        [C]: in function 'error'
        ...l/share/astrovim/lazy/nvim-cmp/lua/cmp/utils/snippet.lua:409: in function 'parse'
        .../e/.local/share/astrovim/lazy/nvim-cmp/lua/cmp/entry.lua:130: in function 'callback'
        ...cal/share/astrovim/lazy/nvim-cmp/lua/cmp/utils/cache.lua:38: in function 'get_word'
        .../e/.local/share/astrovim/lazy/nvim-cmp/lua/cmp/entry.lua:81: in function 'callback'
        ...cal/share/astrovim/lazy/nvim-cmp/lua/cmp/utils/cache.lua:38: in function 'get_offset'
        ...e/.local/share/astrovim/lazy/nvim-cmp/lua/cmp/source.lua:353: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: ghcidestatus: needs infoNot actionable, because there's missing informationtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions