-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.project.nvim
More file actions
35 lines (28 loc) · 1017 Bytes
/
Copy path.project.nvim
File metadata and controls
35 lines (28 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local vim = vim
vim.g.title = false
vim.cmd('ProjectRoot')
-- Run shell command 'just build' in project root when :ProjectBuild is called
_G.project_build = function()
print("Building project...")
vim.cmd('ProjectRoot')
vim.cmd('!just build nvim')
end
-- vim.cmd("command! -nargs=0 ProjectBuild lua require('project').build()")
local is_ok, telescope = pcall(require, "telescope.defaults")
if is_ok then
local ignore = telescope.file_ignore_patterns
-- table.insert(telescope.file_ignore_patterns, "**/*.so")
-- table.insert(telescope.file_ignore_patterns,"**/.lhnvim/*")
-- table.insert(telescope.file_ignore_patterns, "**/target/*")
telescope.file_ignore_patterns = {
"**/*.so",
"**/.lhnvim/*",
"**/target/*",
unpack(ignore)
}
vim.notify("Telescope loaded", vim.log.levels.INFO, { title = "Project.nvim" })
for _, v in ipairs(telescope.file_ignore_patterns) do
print("Ignored file: ", v)
end
print("Table of ignored files: ", telescope.file_ignore_patterns)
end