Skip to content

"main" snippet not showing when in cpp file. #557

@skylerfokine

Description

@skylerfokine

My cmp_nvim_lsp.lua: https://github.com/skylerfokine/Nvimconfig/blob/master/lua/config/plugins/cmp_nvim_lsp.lua
My Nvim lsp config: https://github.com/skylerfokine/Nvimconfig/blob/master/lua/config/plugins/nvim-lspconfig.lua

When in a *cpp if I were to type "main" or "#guard" i would expect the template snippet to pop up however it does not (see images below)

Main Example:

Image

Guard example:

Image

Things to note:

  • Im using terminal from windows
  • I am on WSL Ubuntu
  • This is LazyVim

Things Ive done to debug
-Ensure I have jsregexp already installed
-Check to see if the cpp.json file is loaded using ":lua print(vim.inspect(require("luasnip").get_snippets("cpp")))" (which it does load it)
-Added comparators options (it didnt work)

I am still fairly new to neovim but I have been trying to debug this for the last few days locally.

I though Id open an issue to help those who may have the same problems.

I'll appreciate any help <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions