summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/ben/plugins/blamer.lua8
-rw-r--r--lua/ben/plugins/colorscheme.lua9
-rw-r--r--lua/ben/plugins/flog.lua7
-rw-r--r--lua/ben/plugins/fugitive.lua8
-rw-r--r--lua/ben/plugins/gitsigns.lua4
-rw-r--r--lua/ben/plugins/go.lua2
-rw-r--r--lua/ben/plugins/gutentags.lua6
-rw-r--r--lua/ben/plugins/nvim-r.lua4
-rw-r--r--lua/ben/plugins/org-telescope.lua21
-rw-r--r--lua/ben/plugins/telescope.lua50
-rw-r--r--lua/ben/plugins/treesitter.lua6
-rw-r--r--lua/ben/plugins/yadm.lua12
12 files changed, 69 insertions, 68 deletions
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 = {
- { "<leader>gg", "<cmd>Flog<cr>" }, -- G.it G.raph
- { "<leader>gv", "<cmd>Flogsplit<cr>" }, -- G.it V.ertical
+ { "<leader>gg", "<cmd>Flogsplit<cr>" }, -- 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 = {
{ "<leader>gs", "<cmd>G<CR>" }, -- G.it S.tatus
{ "<leader>gd", "<cmd>G difftool<CR>" }, -- 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
+ { "<leader>fo", '<cmd>lua require("telescope").extensions.orgmode.search_headings()<cr>' },
+ },
+}
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
- { "<leader>ff", '<cmd>lua require("telescope.builtin").find_files()<cr>' },
+ -- F.ind F.iles
+ { "<leader>ff", '<cmd>lua require("telescope.builtin").find_files()<cr>' },
- -- F.ind B.uffers
- { "<leader>fb", '<cmd>lua require("telescope.builtin").buffers()<cr>' },
+ -- F.ind B.uffers
+ { "<leader>fb", '<cmd>lua require("telescope.builtin").buffers()<cr>' },
- -- F.ind G.it
- { "<leader>fg", '<cmd>lua require("telescope.builtin").git_files()<cr>' },
+ -- F.ind G.it
+ { "<leader>fg", '<cmd>lua require("telescope.builtin").git_files()<cr>' },
- -- F.ind H.elp
- { "<leader>fh", '<cmd>lua require("telescope.builtin").help_tags()<cr>' },
+ -- F.ind H.elp
+ { "<leader>fh", '<cmd>lua require("telescope.builtin").help_tags()<cr>' },
- -- F.ind Q.uick F.ix
- { "<leader>fqf", '<cmd>lua require("telescope.builtin").quickfix()<cr>' },
+ -- F.ind Q.uick F.ix
+ { "<leader>fqf", '<cmd>lua require("telescope.builtin").quickfix()<cr>' },
- -- F.ind C.olor S.cheme
- { "<leader>fcs", '<cmd>lua require("telescope.builtin").colorscheme()<cr>' },
- },
- { -- 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
- { "<leader>fo", '<cmd>lua require("telescope").extensions.orgmode.seach_headings()<cr>' },
- },
- },
+ -- F.ind C.olor S.cheme
+ { "<leader>fcs", '<cmd>lua require("telescope.builtin").colorscheme()<cr>' },
},
}
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,
-}