fix
This commit is contained in:
parent
7bf2c2a77b
commit
1b3dcf1128
@ -7,7 +7,7 @@ local finders = require("telescope.finders")
|
|||||||
local g = require("nvim-goodies")
|
local g = require("nvim-goodies")
|
||||||
local global_state = require("telescope.state")
|
local global_state = require("telescope.state")
|
||||||
local gpath = require("nvim-goodies.path")
|
local gpath = require("nvim-goodies.path")
|
||||||
local os = require("nvim-goodies.os")
|
local gos = require("nvim-goodies.os")
|
||||||
local pfiletype = require("plenary.filetype")
|
local pfiletype = require("plenary.filetype")
|
||||||
local pickers = require("telescope.pickers")
|
local pickers = require("telescope.pickers")
|
||||||
local previewers = require("telescope.previewers")
|
local previewers = require("telescope.previewers")
|
||||||
@ -19,24 +19,24 @@ local M = {}
|
|||||||
|
|
||||||
local active_saves = {}
|
local active_saves = {}
|
||||||
local changed_lookup = {}
|
local changed_lookup = {}
|
||||||
local directory_sep = g.iff(os.is_windows, "\\", "/")
|
local directory_sep = g.iff(gos.is_windows, "\\", "/")
|
||||||
local haven_config = {
|
local haven_config = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
exclusions = {
|
exclusions = {
|
||||||
function(path, _)
|
function(path, _)
|
||||||
if os.is_windows then
|
if gos.is_windows then
|
||||||
return path:lower():starts_with((vim.fn.eval("$VIMRUNTIME") .. directory_sep):lower())
|
return path:lower():starts_with((vim.fn.eval("$VIMRUNTIME") .. directory_sep):lower())
|
||||||
end
|
end
|
||||||
return path:starts_with(vim.fn.eval("$VIMRUNTIME") .. directory_sep)
|
return path:starts_with(vim.fn.eval("$VIMRUNTIME") .. directory_sep)
|
||||||
end,
|
end,
|
||||||
function(path, _)
|
function(path, _)
|
||||||
if os.is_windows then
|
if gos.is_windows then
|
||||||
return path:lower():starts_with((vim.fn.stdpath("data") .. directory_sep):lower())
|
return path:lower():starts_with((vim.fn.stdpath("data") .. directory_sep):lower())
|
||||||
end
|
end
|
||||||
return path:starts_with(vim.fn.stdpath("data") .. directory_sep)
|
return path:starts_with(vim.fn.stdpath("data") .. directory_sep)
|
||||||
end,
|
end,
|
||||||
function(path, _)
|
function(path, _)
|
||||||
if os.is_windows then
|
if gos.is_windows then
|
||||||
return path:lower():starts_with(
|
return path:lower():starts_with(
|
||||||
(gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. directory_sep):lower()
|
(gpath.create_path(vim.fn.eval("$XDG_CONFIG_HOME"), "coc") .. directory_sep):lower()
|
||||||
)
|
)
|
||||||
@ -46,7 +46,7 @@ local haven_config = {
|
|||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
function(path, _)
|
function(path, _)
|
||||||
if os.is_windows then
|
if gos.is_windows then
|
||||||
return path:lower():ends_with(
|
return path:lower():ends_with(
|
||||||
(directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG"):lower()
|
(directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG"):lower()
|
||||||
)
|
)
|
||||||
@ -54,7 +54,7 @@ local haven_config = {
|
|||||||
return path:ends_with(directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG")
|
return path:ends_with(directory_sep .. ".git" .. directory_sep .. "COMMIT_EDITMSG")
|
||||||
end,
|
end,
|
||||||
function(path, config)
|
function(path, config)
|
||||||
if os.is_windows then
|
if gos.is_windows then
|
||||||
return path:lower():starts_with((config.haven_path .. directory_sep):lower())
|
return path:lower():starts_with((config.haven_path .. directory_sep):lower())
|
||||||
end
|
end
|
||||||
return path:starts_with(config.haven_path .. directory_sep)
|
return path:starts_with(config.haven_path .. directory_sep)
|
||||||
@ -65,7 +65,7 @@ local haven_config = {
|
|||||||
max_history_count = 200,
|
max_history_count = 200,
|
||||||
save_timeout = 10000
|
save_timeout = 10000
|
||||||
}
|
}
|
||||||
local line_ending = g.iff(os.is_windows, "\r\n", "\n")
|
local line_ending = g.iff(gos.is_windows, "\r\n", "\n")
|
||||||
|
|
||||||
local print_message = function(is_error, msg)
|
local print_message = function(is_error, msg)
|
||||||
vim.notify(
|
vim.notify(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user