File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,20 @@ M.searchHelp = function(cmd_input)
159
159
vim .fn .jobstart (cmd )
160
160
end
161
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
+
162
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
+ end
163
176
local tsquery = nil
164
177
if cfg .config .lspFeatures .chunks == ' curly' then
165
178
tsquery = [[
You can’t perform that action at this time.
0 commit comments