From ad1098a0110e0d5a3e303b67157e0910c85cea87 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 26 Sep 2023 16:24:10 -0400 Subject: Fix broken build --- lua/ben/plugins/blamer.lua | 8 ++++--- lua/ben/plugins/colorscheme.lua | 9 ++++--- lua/ben/plugins/flog.lua | 7 ++++-- lua/ben/plugins/fugitive.lua | 8 +++---- lua/ben/plugins/gitsigns.lua | 4 ++-- lua/ben/plugins/go.lua | 2 +- lua/ben/plugins/gutentags.lua | 6 ++--- lua/ben/plugins/nvim-r.lua | 4 ++-- lua/ben/plugins/org-telescope.lua | 21 ++++++++++++++++ lua/ben/plugins/telescope.lua | 50 ++++++++++++++------------------------- lua/ben/plugins/treesitter.lua | 6 ++--- lua/ben/plugins/yadm.lua | 12 ---------- 12 files changed, 69 insertions(+), 68 deletions(-) create mode 100644 lua/ben/plugins/org-telescope.lua delete mode 100644 lua/ben/plugins/yadm.lua (limited to 'lua/ben') diff --git a/lua/ben/plugins/blamer.lua b/lua/ben/plugins/blamer.lua index 9779c3a..9d5e6c4 100644 --- a/lua/ben/plugins/blamer.lua +++ b/lua/ben/plugins/blamer.lua @@ -1,9 +1,11 @@ return { - "APZelos/blamer.nvim", - -- Only load if linux is the os AND git is installed + -- Only load if on a compatible OS and git is installed cond = function() - return (vim.fn.has("linux") == 1) and vim.fn.executable("git") + local goodOS = (vim.fn.has("linux") == 1) or (vim.fn.has("mac") == 1) + local hasGit = vim.fn.executable("git") == 1 + return goodOS and hasGit end, + "APZelos/blamer.nvim", config = function() vim.g.blamer_enabled = 1 vim.g.blamer_delay = 500 diff --git a/lua/ben/plugins/colorscheme.lua b/lua/ben/plugins/colorscheme.lua index 17f89bb..4caaa52 100644 --- a/lua/ben/plugins/colorscheme.lua +++ b/lua/ben/plugins/colorscheme.lua @@ -1,5 +1,6 @@ return { - { -- Treesitter-optimized colorscheme: + -- Treesitter optimized colorscheme + { "neanias/everforest-nvim", version = false, priority = 1000, @@ -12,7 +13,8 @@ return { require("everforest").load() end, }, - { -- My very own colorscheme + -- My very own colorscheme + { "ChausseBenjamin/friffle-vim", lazy = true, config = function() @@ -31,7 +33,8 @@ return { vim.cmd([[hi Search guifg='#810002' guibg='#738c9c']]) end, }, - { -- Backup retro colorscheme + -- Backup retro colorscheme + { "djpohly/elly.vim", lazy = true, }, diff --git a/lua/ben/plugins/flog.lua b/lua/ben/plugins/flog.lua index 44ac8f9..81b0c0d 100644 --- a/lua/ben/plugins/flog.lua +++ b/lua/ben/plugins/flog.lua @@ -1,8 +1,11 @@ return { "rbong/vim-flog", + -- Only enable if git is installed + cond = function() + return vim.fn.executable("git") == 1 + end, dependencies = { "tpope/vim-fugitive" }, keys = { - { "gg", "Flog" }, -- G.it G.raph - { "gv", "Flogsplit" }, -- G.it V.ertical + { "gg", "Flogsplit" }, -- G.it G.raph }, } diff --git a/lua/ben/plugins/fugitive.lua b/lua/ben/plugins/fugitive.lua index 3957d95..690a958 100644 --- a/lua/ben/plugins/fugitive.lua +++ b/lua/ben/plugins/fugitive.lua @@ -1,11 +1,11 @@ return { "tpope/vim-fugitive", - -- Only load if git is installed + dependencies = "tpope/vim-rhubarb", + -- Only enable on systems with git installed cond = function() - return vim.fn.executable("git") + return vim.fn.executable("git") == 1 end, - dependencies = "tpope/vim-rhubarb", - -- Only enable when in a git repo + -- Only load when using one of the following commands: keys = { { "gs", "G" }, -- G.it S.tatus { "gd", "G difftool" }, -- G.it D.iff diff --git a/lua/ben/plugins/gitsigns.lua b/lua/ben/plugins/gitsigns.lua index 242f95c..ef8f427 100644 --- a/lua/ben/plugins/gitsigns.lua +++ b/lua/ben/plugins/gitsigns.lua @@ -1,8 +1,8 @@ return { "lewis6991/gitsigns.nvim", - -- Only load if git is installed + -- Only enable if git is installed cond = function() - return vim.fn.executable("git") + return vim.fn.executable("git") == 1 end, event = { "BufReadPre", "BufNewFile" }, config = true, diff --git a/lua/ben/plugins/go.lua b/lua/ben/plugins/go.lua index 0e1511f..2d5e17c 100644 --- a/lua/ben/plugins/go.lua +++ b/lua/ben/plugins/go.lua @@ -1,6 +1,6 @@ return { "ray-x/go.nvim", - -- Only load if go is installed + -- Only if Go is installed cond = function() return vim.fn.executable("go") end, diff --git a/lua/ben/plugins/gutentags.lua b/lua/ben/plugins/gutentags.lua index a97f2a9..88fb388 100644 --- a/lua/ben/plugins/gutentags.lua +++ b/lua/ben/plugins/gutentags.lua @@ -1,8 +1,8 @@ return { "ludovicchabant/vim-gutentags", - -- Only load if ctags are installed - cond = function() - return vim.fn.executable("ctags") + -- Only enable if ctags is installed + condition = function() + return vim.fn.executable("ctags") == 1 end, event = { "BufReadPre", "BufNewFile" }, } diff --git a/lua/ben/plugins/nvim-r.lua b/lua/ben/plugins/nvim-r.lua index 3978d1e..e6e43d1 100644 --- a/lua/ben/plugins/nvim-r.lua +++ b/lua/ben/plugins/nvim-r.lua @@ -1,8 +1,8 @@ return { "jalvesaq/Nvim-R", - -- Only load if R is installed + -- Only enable if R is installed cond = function() - return vim.fn.executable("R") + return vim.fn.executable("R") == 1 end, ft = { "R", "Rnoweb", "tex", "aux", "bib" }, config = function() diff --git a/lua/ben/plugins/org-telescope.lua b/lua/ben/plugins/org-telescope.lua new file mode 100644 index 0000000..55a32d1 --- /dev/null +++ b/lua/ben/plugins/org-telescope.lua @@ -0,0 +1,21 @@ +return { + "joaomsa/telescope-orgmode.nvim", + depends = { + { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, + "nvim-orgmode/orgmode", + }, + lazy = true, + config = function() + require("telescope").load_extension("orgmode") + end, + keys = { + -- F.ing O.rgmode + { "fo", 'lua require("telescope").extensions.orgmode.search_headings()' }, + }, +} diff --git a/lua/ben/plugins/telescope.lua b/lua/ben/plugins/telescope.lua index 1b091eb..3d64347 100644 --- a/lua/ben/plugins/telescope.lua +++ b/lua/ben/plugins/telescope.lua @@ -1,41 +1,27 @@ return { - { -- Main plugin: Telescope - "nvim-telescope/telescope.nvim", - branch = "0.1.x", - dependencies = { - "nvim-lua/plenary.nvim", - }, - keys = { -- LazyLoad telescope when it's actually needed + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + }, + keys = { -- LazyLoad telescope when it's actually needed - -- F.ind F.iles - { "ff", 'lua require("telescope.builtin").find_files()' }, + -- F.ind F.iles + { "ff", 'lua require("telescope.builtin").find_files()' }, - -- F.ind B.uffers - { "fb", 'lua require("telescope.builtin").buffers()' }, + -- F.ind B.uffers + { "fb", 'lua require("telescope.builtin").buffers()' }, - -- F.ind G.it - { "fg", 'lua require("telescope.builtin").git_files()' }, + -- F.ind G.it + { "fg", 'lua require("telescope.builtin").git_files()' }, - -- F.ind H.elp - { "fh", 'lua require("telescope.builtin").help_tags()' }, + -- F.ind H.elp + { "fh", 'lua require("telescope.builtin").help_tags()' }, - -- F.ind Q.uick F.ix - { "fqf", 'lua require("telescope.builtin").quickfix()' }, + -- F.ind Q.uick F.ix + { "fqf", 'lua require("telescope.builtin").quickfix()' }, - -- F.ind C.olor S.cheme - { "fcs", 'lua require("telescope.builtin").colorscheme()' }, - }, - { -- Telescope extension for orgmode - "joaomsa/telescope-orgmode.nvim", - lazy = true, - config = function() - require("telescope").load_extension("orgmode") - end, - -- This way, telescope doesn't load the extension until it's actually needed - keys = { - -- F.ing O.rgmode - { "fo", 'lua require("telescope").extensions.orgmode.seach_headings()' }, - }, - }, + -- F.ind C.olor S.cheme + { "fcs", 'lua require("telescope.builtin").colorscheme()' }, }, } diff --git a/lua/ben/plugins/treesitter.lua b/lua/ben/plugins/treesitter.lua index ec3022b..279fa1a 100644 --- a/lua/ben/plugins/treesitter.lua +++ b/lua/ben/plugins/treesitter.lua @@ -1,11 +1,9 @@ return { { "nvim-treesitter/nvim-treesitter", - dependencies = { - "windwp/nvim-ts-autotag", - }, - event = { "BufReadPre", "BufNewFile" }, + dependencies = "windwp/nvim-ts-autotag", build = ":TSUpdate", + event = { "BufReadPre", "BufNewFile" }, config = function() -- import nvim-treesitter plugin local treesitter = require("nvim-treesitter.configs") diff --git a/lua/ben/plugins/yadm.lua b/lua/ben/plugins/yadm.lua deleted file mode 100644 index ae0fea7..0000000 --- a/lua/ben/plugins/yadm.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "robstumborg/yadm.nvim", - -- Only load if yadm is installed - cond = function() - return vim.fn.executable("yadm") - end, - config = function() - require("yadm").setup({ - yadm_dir = vim.fn.expand("$XDG_DATA_HOME/yadm/repo.git"), - }) - end, -} -- cgit v1.2.3