0

I wrote config codes in markdown.lua file, as follows:

require('markdown-preview').setup {
  vim.g.mkdp_browser = "C:/Program\ Files/Google/Chrome/Application/chrome.exe"
}

But it doesn't work, error as follows:

Error while calling lua chunk: ... /markdown.lua:2: '}' expected (to close '{' at line 1) near '='

I don't understand.

ebynapura
  • 3
  • 1
  • 3

1 Answers1

0

Assuming you are using this plugin, you probably need to do something like this instead:

vim.g.mkdp_browser = "C:/Program\ Files/Google/Chrome/Application/chrome.exe"
require('markdown-preview').setup({})

vim.g are globals, so you usually need to set them outside of the plugin setup, before calling its setup function.

caarlos0
  • 20,020
  • 27
  • 85
  • 160