Add abolish.vim, fix workspace_files function
This commit is contained in:
parent
0318cf895e
commit
a1204e5a90
2 changed files with 17 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ return {
|
|||
"tpope/vim-characterize",
|
||||
"tpope/vim-commentary",
|
||||
"tpope/vim-sleuth",
|
||||
"tpope/vim-abolish",
|
||||
|
||||
{ "chrisgrieser/nvim-genghis", dependencies = "stevearc/dressing.nvim", opts = { trashCmd = "rm" } },
|
||||
|
||||
|
|
@ -29,7 +30,11 @@ return {
|
|||
"artemave/workspace-diagnostics.nvim",
|
||||
opts = {
|
||||
workspace_files = function()
|
||||
-- try LSP workspace folder first, for repos with multiple subprojects
|
||||
local project_root = vim.lsp.buf.list_workspace_folders()[1]
|
||||
if project_root == nil then
|
||||
project_root = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
end
|
||||
local workspace_files = vim.fn.split(vim.fn.system("git ls-files " .. project_root), "\n")
|
||||
return workspace_files
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue