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)
159159 vim .fn .jobstart (cmd )
160160end
161161
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+
162170M .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
163176 local tsquery = nil
164177 if cfg .config .lspFeatures .chunks == ' curly' then
165178 tsquery = [[
You can’t perform that action at this time.
0 commit comments