nathom / filetype.nvim

A faster version of filetype.vim
560 stars 35 forks source link

Unknown function: `dist#ft#FTlpc` #96

Open dsoto1219 opened 1 year ago

dsoto1219 commented 1 year ago

When loading certain filetypes on my machine, including .c and .tex, the following error appears in red when opening these files using neovim:

Error detected while processing BufNewFile Autocommands for "*":
E5108: Error executing lua vim/_editor.lua:341: BufNewFile Autocommands for "*"..script nvim_exec2() called at BufNewFile Autocommands for "*":0: Vim(call):E117: Unknown function: dist#ft#FTlpc
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua:341: in function 'cmd'
        ...ta/lazy/filetype.nvim/lua/filetype/mappings/function.lua:265: in function 'name'
        ...Local/nvim-data/lazy/filetype.nvim/lua/filetype/init.lua:17: in function 'set_filetype'
        ...Local/nvim-data/lazy/filetype.nvim/lua/filetype/init.lua:65: in function 'try_lookup'
        ...Local/nvim-data/lazy/filetype.nvim/lua/filetype/init.lua:168: in function 'resolve'
        [string ":lua"]:1: in main chunk

Continuing past these errors disabled all treesitter highlighting in these filetypes. So far, deleting filetype.nvim from my lazy config was the only way to stop this error.

jaydorsey commented 7 months ago

I was running into the same issue with HTML files with a slightly different error name, FThtml. I found this which doesn't exist in neovim, and I also found this issue which was merged, but I'm not sure how that relates back to this error.

I don't know if it's relevant, but I was using lazy.nvim and I had set lazy = false. Once I removed that flag, the issue went away.