SetFileTypeSH 缺失

SetFileTypeSH 缺失

我尝试编辑 SH 文件,但打开时总是出现错误:

Error detected while processing BufReadPre Autocommands for "*":
...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:171: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:160: Vim(lua):E5108: Error executing lua ...r/start/filetype.nvim/lu
a/filetype/mappings/function.lua:391: Vim(call):E117: Unknown function: dist#ft#SetFileTypeSH
Error detected while processing BufReadPost Autocommands for "*":
E5108: Error executing lua ...r/start/filetype.nvim/lua/filetype/mappings/function.lua:391: Vim(call):E117: Unknown function: dist#ft#SetFileTypeSH
stack traceback:
        [C]: in function 'cmd'
        ...r/start/filetype.nvim/lua/filetype/mappings/function.lua:391: in function 'name'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:17: in function 'set_filetype'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:65: in function 'try_lookup'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:168: in function 'resolve'
        [string ":lua"]:1: in main chunk

我确实通过 ppa 安装 neovim,所以它应该是其中的一部分。

新维姆信息:

NVIM v0.9.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -ffile-prefix-map=/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f/build/cmake.config -I/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f/src -I/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f/.deps/usr/include -I/usr/include -I/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f/build/src/nvim/auto -I/build/neovim-HE6zRx/neovim-0.9.0~ubuntu1+git202301100019-364b131f4-333b5866f/build/include
Compiled by buildd@lcy02-amd64-115

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

搜索该错误并没有发现似乎是解决方案的东西(至少对我来说)

有人有线索吗?

答案1

可能为时已晚,但我在升级到 v0.9.0 后也遇到了这个问题。它不限于sh文件,但至少tex也影响文件。

事实证明,就我而言,罪魁祸首是nathom/filetype.nvim,它从 v0.8 开始就失去了相关性。我停用了它,现在一切正常。

https://github.com/nathom/filetype.nvim/issues/9

相关内容