We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cb2d24 commit bb710f4Copy full SHA for bb710f4
1 file changed
lua/quarto/init.lua
@@ -159,7 +159,20 @@ M.searchHelp = function(cmd_input)
159
vim.fn.jobstart(cmd)
160
end
161
162
+-- from https://github.com/neovim/nvim-lspconfig/blob/f98fa715acc975c2dd5fb5ba7ceddeb1cc725ad2/lua/lspconfig/util.lua#L23
163
+function M.bufname_valid(bufname)
164
+ if bufname:match '^/' or bufname:match '^[a-zA-Z]:' or bufname:match '^zipfile://' or bufname:match '^tarfile:' then
165
+ return true
166
+ end
167
+ return false
168
+end
169
+
170
M.activate = function()
171
+ local bufname = vim.api.nvim_buf_get_name(0)
172
+ -- do not activate in special buffers, for example 'fugitive://...'
173
+ if not M.bufname_valid(bufname) then
174
+ return
175
176
local tsquery = nil
177
if cfg.config.lspFeatures.chunks == 'curly' then
178
tsquery = [[
0 commit comments