๐Ÿž Bug: Get E523 error with modeline

#528 ยท closed ยท 2 comments

View on GitHub โ†—

zoumi

### ๐Ÿค– Which branch are you using? - [ ] dev - [x] main ### ๐Ÿ“œ Issue description: nvim show error msg when open a file with modeline. ``` Error in modelines[1]..OptionSet Autocommands for "*": Lua callback: ...sr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:189: E523: Not allowed here stack traceback: [C]: in function '__newindex' ...sr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:189: in function 'destroy' ...im.aEOJalK/usr/share/nvim/runtime/lua/vim/treesitter.lua:471: in function 'stop' ...ro/data/nvim/lazy/markview.nvim/lua/markview/actions.lua:471: in function 'set_query' ...ro/data/nvim/lazy/markview.nvim/lua/markview/actions.lua:552: in function 'attach' ...o/data/nvim/lazy/markview.nvim/lua/markview/autocmds.lua:255: in function 'bufHandle' ...o/data/nvim/lazy/markview.nvim/lua/markview/autocmds.lua:296: in function <...o/data/nvim/lazy/markview.nvim/lua/markview/autocmds.lua:276> ``` ### ๐Ÿ“‘ Reproduction steps: 1,start nvim with mini init.lua 2,:e no_ext_md_file the content of the file no_ext_md_file: ``` <!-- vim: set ft=markdown: --> # test ``` ### ๐Ÿ’ป Minimal init: ```lua vim.env.LAZY_STDPATH = ".repro" load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() require("lazy.minit").repro({ spec = { { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", ensure_installed = { "html", "latex", "markdown", "markdown_inline", "typst", "yaml" } }, { "OXY2DEV/markview.nvim", -- branch = "dev", lazy = false } }, }); ``` ### ๐Ÿ“œ Logs: LOG | markview/autocmds.lua => optionSet() -> filetype | Option changed. LOG | markview/autocmds.lua => bufHandle() -> filetype | Buffer state changed. LOG | markview/actions.lua => attach() | Attached to 1. LOG | markview/actions.lua => autocmd() -> on_attach | Fired on_attach & MarkviewAttach. LOG | markview/actions.lua => set_query() | Set tree-sitter queries for 1. LOG | markview/actions.lua => set_query() | Set tree-sitter queries for 1. ### Neovim version: NVIM v0.12.1 Build type: Release LuaJIT 2.1.1765228720 Run "nvim -V1 -v" for more info ### โœ… Expected behavior: show no error

Comments

OXY2DEV

It should be fixed now, let me know if it still is causing issues @zoumi.

zoumi

It's solved, thank you!