1

running newvim 0.6.1. Totally clean install, no plugins.

In init.lua:

vim.opt.syntax = "off"

Also tried "false" and "disabled." Didn't work. Also tried vim.g, vim.o, vim.bo. Didn't work.

Syntax highlighting still shows up.

In init.vim:

syntax off

No syntax highlighting.

2 Answers 2

1

Setting &syntax, as well as &filetype option, in vimrc / init.vim / init.lua is pretty much meaningless.

If you don't need the syntax then do :syntax off (or :syntax manual). Maybe also :filetype off if really wanted.

1

In your lua config:

vim.cmd("syntax off")

Reference: https://neovim.io/doc/user/lua.html#vim.cmd()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.