nvim config stolen from @Lukacms

This commit is contained in:
2023-11-03 11:24:41 +01:00
parent e881d7c7f5
commit 50c4761b4b
42 changed files with 1809 additions and 0 deletions

24
nvim/lua/lsp/utils.lua Normal file
View File

@@ -0,0 +1,24 @@
local M = {}
M.is_path_excluded = function(bufnr, client)
local buf_path = vim.api.nvim_buf_get_name(bufnr)
local excluded_paths = {}
local success, custom = pcall(require, "custom")
if success then
excluded_paths = custom.excluded_paths[client.name]
end
local is_excluded = false
if excluded_paths ~= nil then
for i = 1, #excluded_paths do
if buf_path:find("^" .. excluded_paths[i]) ~= nil then
is_excluded = true
break
end
end
end
return is_excluded
end
return M