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.

StevieD
  • 1,492
  • 1
  • 16
  • 24

2 Answers2

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.

Matt
  • 20,685
  • 1
  • 11
  • 24
1

In your lua config:

vim.cmd("syntax off")

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

star-szr
  • 111
  • 1