@@ -17,8 +17,7 @@ function M.quartoPreview(opts)
1717 local cmd
1818 local mode
1919
20-
21- -- check for
20+ -- check for
2221 --
2322 -- editor:
2423 -- render-on-save: false
@@ -32,7 +31,7 @@ function M.quartoPreview(opts)
3231 local quarto_config = root_dir .. ' /_quarto.yml'
3332 lines = vim .fn .readfile (quarto_config )
3433 else
35- -- assumption: the yaml header is not longer than a generous 500 lines
34+ -- assumption: the yaml header is not longer than a generous 500 lines
3635 lines = vim .api .nvim_buf_get_lines (0 , 0 , 500 , false )
3736 end
3837
@@ -72,14 +71,14 @@ function M.quartoPreview(opts)
7271 local current_tabpage = vim .api .nvim_get_current_tabpage ()
7372
7473 -- Open a new tab for the terminal
75- vim .cmd ( ' tabnew' )
74+ vim .cmd ' tabnew'
7675 local term_buf = vim .api .nvim_create_buf (true , false )
7776 vim .api .nvim_set_current_buf (term_buf )
7877
7978 vim .fn .termopen (cmd , {
8079 on_exit = function (_ , exit_code , _ )
8180 if exit_code ~= 0 then
82- vim .notify (" Quarto preview exited with code " .. exit_code , vim .log .levels .ERROR )
81+ vim .notify (' Quarto preview exited with code ' .. exit_code , vim .log .levels .ERROR )
8382 end
8483 end ,
8584 })
@@ -106,7 +105,7 @@ function M.quartoPreview(opts)
106105end
107106
108107function M .quartoPreviewNoWatch ()
109- M .quartoPreview ( { args = ' --no-watch-inputs' })
108+ M .quartoPreview { args = ' --no-watch-inputs' }
110109end
111110
112111function M .quartoUpdatePreview ()
@@ -116,7 +115,7 @@ function M.quartoUpdatePreview()
116115 local url = nil
117116 for _ , line in ipairs (lines ) do
118117 if line :find (query_start ) then
119- url = ' http' .. line :sub (# query_start + 1 )
118+ url = ' http' .. line :sub (# query_start + 1 )
120119 break
121120 end
122121 end
0 commit comments