vim-settings/neovim/lua/plugins.lua

574 lines
16 KiB
Lua
Raw Normal View History

-- Install packer
local utils = require("utils")
2021-12-15 17:37:51 +00:00
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim"
2022-10-25 16:42:59 +00:00
local packer_bootstrap = ""
2021-08-24 17:38:14 +00:00
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
2021-12-15 17:37:51 +00:00
packer_bootstrap = vim.fn.system({ "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path })
2021-08-24 17:38:14 +00:00
end
2021-12-15 17:37:51 +00:00
vim.cmd("packadd packer.nvim")
2021-08-24 17:38:14 +00:00
-- Configures dark-notify to use colors from my environment
2021-08-24 17:38:14 +00:00
local function config_dark_notify()
2021-12-15 17:37:51 +00:00
require("dark_notify").run({
onchange = function(_)
-- Defined in _colors
_G.update_colors()
2021-08-24 17:38:14 +00:00
end,
2021-12-15 17:37:51 +00:00
})
2021-08-24 17:38:14 +00:00
end
2022-02-25 19:03:05 +00:00
local packer = require("packer")
local packer_util = require("packer.util")
local use = packer.use
packer.init({
-- Always load default
2023-03-08 22:39:00 +00:00
snapshot = utils.map_version_rule({
2023-06-02 00:11:50 +00:00
[">=0.9.0"] = "latest-0.9",
2023-03-08 22:39:00 +00:00
[">=0.8.0"] = "latest-0.8",
[">=0.7.0"] = "latest-0.7",
2023-06-12 16:13:48 +00:00
[">=0.6.0"] = "latest-0.6",
2023-03-08 22:39:00 +00:00
}),
2022-02-25 19:03:05 +00:00
snapshot_path = packer_util.join_paths(vim.fn.stdpath("config"), "packer_snapshots"),
display = {
open_fn = function()
return packer_util.float({ border = "single" })
end,
},
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Load things faster!
2023-06-02 00:11:50 +00:00
if vim.fn.has("nvim-0.9.0") == 1 then
-- Not needed on nvim 0.9+
vim.loader.enable()
else
use({
"lewis6991/impatient.nvim",
config = [[require('impatient')]],
tag = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
[">0.6.0"] = "v0.2",
[">=0.5.0"] = "v0.1",
}),
})
end
2022-02-25 19:03:05 +00:00
-- Let Packer manage and lazyload itself
use({
"https://github.com/wbthomason/packer.nvim",
2022-02-25 19:03:05 +00:00
cmd = {
"PackerClean",
"PackerCompile",
"PackerInstall",
"PackerLoad",
"PackerProfile",
"PackerSnapshot",
"PackerSnapshotDelete",
"PackerSnapshotRollback",
2022-02-25 19:03:05 +00:00
"PackerStatus",
"PackerSync",
"PackerUpdate",
},
config = [[require("plugins")]],
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Colorschemes
use({
"https://github.com/vim-scripts/wombat256.vim",
2022-06-07 16:52:10 +00:00
{
"https://github.com/ViViDboarder/wombat.nvim",
2022-06-07 16:52:10 +00:00
requires = {
{
"rktjmp/lush.nvim",
tag = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
[">=0.5.0"] = "v1.0.1",
}),
},
},
},
2023-06-12 16:13:48 +00:00
{
"https://github.com/ViViDboarder/wombuddy.nvim",
requires = "https://github.com/tjdevries/colorbuddy.vim",
},
{
"https://github.com/ishan9299/nvim-solarized-lua",
2023-06-12 16:13:48 +00:00
commit = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
["<0.7.0"] = "faba49b",
}),
},
2022-02-25 19:03:05 +00:00
{
"https://github.com/folke/tokyonight.nvim",
2022-02-25 19:03:05 +00:00
run = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length
},
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Auto and ends to some ifs and dos
use("https://github.com/tpope/vim-endwise")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Unix commands from vim? Yup!
use("https://github.com/tpope/vim-eunuch")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Adds repeats for custom motions
use("https://github.com/tpope/vim-repeat")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Readline shortcuts
use("https://github.com/tpope/vim-rsi")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Surround motions
use("https://github.com/tpope/vim-surround")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Better netrw
use("https://github.com/tpope/vim-vinegar")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Easier jumping to lines
use("https://github.com/vim-scripts/file-line")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Auto ctags generation
use("https://github.com/ludovicchabant/vim-gutentags")
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Make it easier to discover some of my keymaps
use({
"https://github.com/folke/which-key.nvim",
2022-02-25 19:03:05 +00:00
config = function()
require("plugins.whichkey").configure()
end,
tag = "v1.*",
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Better commenting
use({
"https://github.com/tomtom/tcomment_vim",
2022-02-25 19:03:05 +00:00
config = function()
require("utils").keymap_set("n", "//", ":TComment<CR>", { desc = "Toggle comment" })
require("utils").keymap_set("v", "//", ":TCommentBlock<CR>", { desc = "Toggle comment" })
2022-02-25 19:03:05 +00:00
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Allow wrapping and joining of arguments across multiple lines
use({
"https://github.com/FooSoft/vim-argwrap",
2022-02-25 19:03:05 +00:00
config = function()
require("utils").keymap_set("n", "<Leader>a", "<cmd>ArgWrap<CR>", {
desc = "Wrap or unwrap arguments",
})
2022-02-25 19:03:05 +00:00
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Adds git operations to vim
use({
"https://github.com/tpope/vim-fugitive",
tag = utils.map_version_rule({
[">=0.9.2"] = utils.nil_val,
-- HACK: Pinning to avoid neovim bug https://github.com/neovim/neovim/issues/10121
-- when used in status line.
["<0.9.2"] = "v3.6",
}),
2022-02-25 19:03:05 +00:00
config = function()
require("utils").keymap_set("n", "gb", "<cmd>Git blame<CR>", { desc = "Git blame" })
require("utils").keymap_set("n", "gc", "<cmd>Git commit<CR>", { desc = "Git commit" })
require("utils").keymap_set("n", "gd", "<cmd>Git diff<CR>", { desc = "Git diff" })
require("utils").keymap_set("n", "gs", "<cmd>Git<CR>", { desc = "Git status" })
require("utils").keymap_set("n", "gw", "<cmd>Git write<CR>", { desc = "Git write" })
2022-02-25 19:03:05 +00:00
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Quick toggling of Location and Quickfix lists
use({
"https://github.com/milkypostman/vim-togglelist",
2022-02-25 19:03:05 +00:00
config = function()
require("utils").keymap_set("n", "<F6>", ":call ToggleQuickfixList()<CR>", { desc = "Toggle quickfix" })
require("utils").keymap_set("n", "<F7>", ":call ToggleLocationList()<CR>", { desc = "Toggle location list" })
2022-02-25 19:03:05 +00:00
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Find text everywhere!
use({
"https://github.com/mhinz/vim-grepper",
2022-02-25 19:03:05 +00:00
config = function()
require("plugins.grepper")
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Highlight inline colors
use({
"https://github.com/norcalli/nvim-colorizer.lua",
2022-02-25 19:03:05 +00:00
config = function()
require("colorizer").setup()
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Custom status line
2023-06-02 00:11:50 +00:00
use({
"https://github.com/SmiteshP/nvim-gps",
requires = "https://github.com/nvim-treesitter/nvim-treesitter",
2023-06-02 00:11:50 +00:00
disable = vim.fn.has("nvim-0.7.0") == 1,
})
-- Replaces gps for 0.7+
use({
"https://github.com/SmiteshP/nvim-navic",
requires = "https://github.com/neovim/nvim-lspconfig",
2023-06-02 00:11:50 +00:00
disable = vim.fn.has("nvim-0.7.0") ~= 1,
})
2022-02-25 19:03:05 +00:00
use({
"https://github.com/nvim-lualine/lualine.nvim",
2022-02-25 19:03:05 +00:00
config = function()
require("plugins.lualine").config_lualine()
end,
2023-06-02 00:11:50 +00:00
after = vim.fn.has("nvim-0.7.0") == 1 and "nvim-navic" or "nvim-gps",
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- On Mac, update colors when dark mode changes
use({
"https://github.com/cormacrelf/dark-notify",
2022-02-25 19:03:05 +00:00
disable = not vim.g.is_mac,
-- Download latest release on install
run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length
config = config_dark_notify,
requires = "https://github.com/nvim-lualine/lualine.nvim",
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Custom start screen
use({
"https://github.com/mhinz/vim-startify",
2022-02-25 19:03:05 +00:00
config = function()
require("utils").require_with_local("plugins.startify")
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- LSP
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Configure language servers
2022-08-31 18:45:26 +00:00
use({
"https://github.com/neovim/nvim-lspconfig",
2022-08-31 18:45:26 +00:00
tag = utils.map_version_rule({
2022-11-02 23:57:18 +00:00
-- [">=0.8.0"] = utils.nil_val,
[">=0.7.0"] = utils.nil_val,
2022-08-31 18:45:26 +00:00
[">=0.6.1"] = "v0.1.2",
[">=0.6.0"] = "v0.1.0",
}),
})
2022-02-25 19:03:05 +00:00
-- Install language servers
use({
"https://github.com/williamboman/mason.nvim",
requires = {
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/williamboman/mason-lspconfig.nvim",
},
-- Only supports >=0.7.0
disable = vim.fn.has("nvim-0.7.0") ~= 1,
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Lua dev for vim
use({
"https://github.com/folke/neodev.nvim",
requires = "https://github.com/neovim/nvim-lspconfig",
})
2022-02-25 19:03:05 +00:00
-- Rust analyzer
use({
"https://github.com/simrat39/rust-tools.nvim",
disable = vim.fn.has("nvim-0.7.0") ~= 1,
})
2022-02-25 19:03:05 +00:00
-- Better display of lsp diagnostics
2023-06-12 16:13:48 +00:00
use({
"https://github.com/folke/trouble.nvim",
2023-06-12 16:13:48 +00:00
tag = utils.map_version_rule({
2023-06-13 23:08:07 +00:00
[">=0.7.2"] = "v2.*",
["<0.7.2"] = "v1.*",
2023-06-12 16:13:48 +00:00
}),
})
2022-02-25 19:03:05 +00:00
2022-06-07 16:52:22 +00:00
-- Incremental lsp rename view
use({
"https://github.com/smjonas/inc-rename.nvim",
2022-06-07 16:52:22 +00:00
config = function()
2023-06-13 23:08:42 +00:00
require("inc_rename").setup({
input_buffer_type = "dressing",
})
2022-06-07 16:52:22 +00:00
end,
-- Only supports >=0.8.0
disable = vim.fn.has("nvim-0.8.0") ~= 1,
2022-06-07 16:52:22 +00:00
})
2022-02-25 19:03:05 +00:00
-- Generic linter/formatters in diagnostics API
use({
"https://github.com/jose-elias-alvarez/null-ls.nvim",
2023-06-02 00:11:50 +00:00
branch = utils.map_version_rule({
[">=0.8.0"] = utils.nil_val,
[">=0.7.0"] = "0.7-compat",
2023-06-13 23:47:03 +00:00
["<0.7.0"] = utils.nil_val, -- use pinned commit
2023-06-02 00:11:50 +00:00
}),
2022-02-25 19:03:05 +00:00
commit = utils.map_version_rule({
2023-06-02 00:11:50 +00:00
[">=0.8.0"] = utils.nil_val,
[">=0.7.0"] = utils.nil_val, -- Use pinned branch
[">=0.6.0"] = "4b403d2d724f48150ded41189ae4866492a8158b",
2022-02-25 19:03:05 +00:00
}),
requires = { "https://github.com/nvim-lua/plenary.nvim", "https://github.com/neovim/nvim-lspconfig" },
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Writing
-- abolish/pencil
use({
"https://github.com/preservim/vim-pencil",
2022-02-25 19:03:05 +00:00
cmd = { "Pencil" },
})
use({
"https://github.com/preservim/vim-textobj-sentence",
requires = "https://github.com/kana/vim-textobj-user",
2022-02-25 19:03:05 +00:00
})
use({
"https://github.com/junegunn/goyo.vim",
2022-02-25 19:03:05 +00:00
cmd = { "Goyo", "Zen" },
config = [[require("plugins.goyo-limelight")]],
requires = { "https://github.com/junegunn/limelight.vim", cmd = "Limelight" },
2022-02-25 19:03:05 +00:00
})
2021-08-24 17:38:14 +00:00
2022-02-25 19:03:05 +00:00
-- Treesitter
use({
"https://github.com/nvim-treesitter/nvim-treesitter",
2022-02-25 19:03:05 +00:00
run = ":TSUpdate",
2022-06-07 16:52:10 +00:00
commit = utils.map_version_rule({
2022-11-02 23:57:18 +00:00
[">=0.8.0"] = utils.nil_val,
[">=0.7.0"] = "4cccb6f494eb255b32a290d37c35ca12584c74d0",
2023-06-12 16:13:48 +00:00
[">=0.6.0"] = "bc25a6a5",
2022-06-07 16:52:10 +00:00
}),
2022-02-25 19:03:05 +00:00
config = function()
2023-06-01 23:52:12 +00:00
require("utils").require_with_local("plugins.treesitter").setup()
2022-02-25 19:03:05 +00:00
end,
})
2023-06-12 16:13:48 +00:00
--[[ TODO: Enable this as an alterantive or fallback for LSPs
2022-02-25 19:03:05 +00:00
use({
"https://github.com/nvim-treesitter/nvim-treesitter-refactor",
requires = "https://github.com/nvim-treesitter/nvim-treesitter",
2023-06-12 16:13:48 +00:00
commit = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
["<0.7.0"] = "75f5895",
}),
2022-02-25 19:03:05 +00:00
})
2023-06-12 16:13:48 +00:00
--]]
2022-02-25 19:03:05 +00:00
use({
"https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
requires = "https://github.com/nvim-treesitter/nvim-treesitter",
2023-06-12 16:13:48 +00:00
commit = utils.map_version_rule({
2023-06-28 04:44:11 +00:00
[">=0.8.0"] = utils.nil_val,
[">=0.7.0"] = "8673926519ea61069f9c1366d1ad1949316d250e",
2023-06-12 16:13:48 +00:00
["<0.7.0"] = "eca3bf30334f85259d41dc060d50994f8f91ef7d",
}),
2022-02-25 19:03:05 +00:00
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Completion
2023-06-12 16:13:48 +00:00
use({
"https://github.com/L3MON4D3/LuaSnip",
2023-06-12 16:13:48 +00:00
tag = "v1.*",
})
2022-02-25 19:03:05 +00:00
use({
"https://github.com/hrsh7th/nvim-cmp",
2022-02-25 19:03:05 +00:00
config = function()
require("plugins.completion").config_cmp()
end,
2022-06-07 16:52:10 +00:00
commit = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
[">=0.5.0"] = "bba6fb67fdafc0af7c5454058dfbabc2182741f4",
}),
2022-02-25 19:03:05 +00:00
requires = {
2023-06-12 16:13:48 +00:00
{
"https://github.com/hrsh7th/cmp-nvim-lsp",
2023-06-12 16:13:48 +00:00
after = "nvim-cmp",
commit = utils.map_version_rule({
[">=0.7.0"] = utils.nil_val,
["<0.7.0"] = "3cf38d9c957e95c397b66f91967758b31be4abe6",
}),
},
{ "https://github.com/hrsh7th/cmp-buffer", after = "nvim-cmp" },
{ "https://github.com/f3fora/cmp-spell", after = "nvim-cmp" },
2022-06-07 16:52:10 +00:00
{
"https://github.com/saadparwaiz1/cmp_luasnip",
2022-06-07 16:52:10 +00:00
after = "nvim-cmp",
commit = utils.map_version_rule({
[">0.7.0"] = utils.nil_val,
[">=0.5.0"] = "b10829736542e7cc9291e60bab134df1273165c9",
}),
},
"https://github.com/L3MON4D3/LuaSnip",
2022-02-25 19:03:05 +00:00
},
event = "InsertEnter *",
})
2022-02-25 17:09:51 +00:00
2022-02-25 19:03:05 +00:00
-- Add snippets
use({
"https://github.com/rafamadriz/friendly-snippets",
requires = "https://github.com/L3MON4D3/LuaSnip",
2022-02-25 19:03:05 +00:00
after = "LuaSnip",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
2022-02-25 19:03:05 +00:00
end,
})
2022-03-01 20:27:15 +00:00
use({
"https://github.com/ray-x/lsp_signature.nvim",
2022-03-01 20:27:15 +00:00
config = function()
require("lsp_signature").setup({
extra_trigger_chars = { "(", "," },
auto_close_after = nil,
-- Toggle these to use hint only
floating_window = true,
hint_enable = false,
})
end,
})
2022-02-25 19:03:05 +00:00
-- Fuzzy Finder
use({
"https://github.com/nvim-telescope/telescope.nvim",
2022-02-25 19:03:05 +00:00
requires = {
"https://github.com/nvim-lua/plenary.nvim",
"https://github.com/nvim-lua/popup.nvim",
"https://github.com/nvim-telescope/telescope-file-browser.nvim",
2022-02-25 19:03:05 +00:00
},
tag = utils.map_version_rule({
2022-08-31 18:45:26 +00:00
-- Follow stable release tag
[">=0.7.0"] = "0.1.0",
2022-04-29 19:31:45 +00:00
[">=0.6.0"] = "nvim-0.6",
2022-02-25 19:03:05 +00:00
["<0.6.0"] = "nvim-0.5.1",
["==0.5.0"] = "nvim-0.5.0",
}),
config = function()
require("plugins.telescope")
end,
})
2021-08-24 17:38:14 +00:00
2022-02-25 19:03:05 +00:00
-- Filetypes
use("https://github.com/ViViDboarder/vim-forcedotcom")
use("https://github.com/hsanson/vim-android")
2022-02-25 19:03:05 +00:00
use({
"https://github.com/sheerun/vim-polyglot",
2022-02-25 19:03:05 +00:00
config = function()
-- TODO: Replace with api calls when dropping 0.6
2022-02-25 19:03:05 +00:00
vim.cmd([[
2022-02-25 19:10:28 +00:00
augroup polyglot_fts
au BufRead,BufNewFile */playbooks/*.yml,*/playbooks/*.yaml set filetype=yaml.ansible
au BufRead,BufNewFile go.mod,go.sum set filetype=gomod
augroup end
]])
2022-02-25 19:03:05 +00:00
end,
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Debuging nvim config
use({
"https://github.com/tweekmonster/startuptime.vim",
2022-02-25 19:03:05 +00:00
cmd = { "StartupTime" },
})
2021-12-16 22:43:02 +00:00
2022-02-25 19:03:05 +00:00
-- Fancy todo highlighting
use({
"https://github.com/folke/todo-comments.nvim",
2022-02-25 19:03:05 +00:00
requires = {
"https://github.com/nvim-lua/plenary.nvim",
2022-02-25 19:03:05 +00:00
},
config = function()
require("plugins.todo")
end,
2023-06-12 16:13:48 +00:00
tag = utils.map_version_rule({
[">=0.8.0"] = "stable",
["<0.8.0"] = utils.nil_val,
}),
branch = utils.map_version_rule({
[">=0.8.0"] = utils.nil_val,
["<0.8.0"] = "neovim-pre-0.8.0",
}),
2022-02-25 19:03:05 +00:00
})
2022-01-02 15:41:55 +00:00
2022-02-25 19:03:05 +00:00
-- Fancy notifications
use({
"https://github.com/rcarriga/nvim-notify",
2022-02-25 19:03:05 +00:00
config = function()
2022-10-14 21:41:14 +00:00
require("plugins.notify")
2021-12-16 22:43:02 +00:00
end,
})
2022-02-25 19:03:05 +00:00
2023-06-13 23:08:42 +00:00
use({
"https://github.com/stevearc/dressing.nvim",
2023-06-28 04:44:11 +00:00
branch = utils.map_version_rule({
[">=0.8.0"] = utils.nil_val,
["<0.8.0"] = "nvim-0.7",
}),
2023-06-13 23:08:42 +00:00
config = function()
require("dressing").setup({})
end,
})
2023-10-20 23:59:19 +00:00
-- Obsidian notes
-- This loads an Obsidian plugin for better vault interraction as well as auto pulls
-- and commits to my vault git repo. On iOS devices, I use Working Copy to sync the
-- repo and use Shortcuts to automate pulling on open and auto committing and pushing
-- after closing Obsidian.
2023-10-20 23:59:19 +00:00
use({
"https://github.com/epwalsh/obsidian.nvim",
2023-10-20 23:59:19 +00:00
requires = {
"https://github.com/nvim-lua/plenary.nvim",
{
-- Fork of https://github.com/declancm/git-scripts.nvim is used here
-- because it inclueds a few small fixes.
"https://github.com/vividboarder/git-scripts.nvim",
branch = "dev",
config = function()
local gs = require("git-scripts")
gs.setup({
default_keymaps = false,
commit_on_save = true,
})
gs.async_pull()
end,
after = "obsidian.nvim",
},
2023-10-20 23:59:19 +00:00
},
tag = "v1.*",
2023-10-20 23:59:19 +00:00
config = function()
require("obsidian").setup({
workspaces = {
name = "personal",
path = "~/Documents/Obsidian",
},
})
end,
event = {
"BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md",
"BufNewFile " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md",
},
})
2023-10-20 23:59:32 +00:00
-- Work things
-- Sourcegraph
use({
"https://github.com/sourcegraph/sg.nvim",
2023-10-20 23:59:32 +00:00
run = "nvim -l build/init.lua",
requires = {
"https://github.com/nvim-lua/plenary.nvim",
2023-10-20 23:59:32 +00:00
},
2023-11-10 19:25:19 +00:00
config = function()
require("sg").setup({
enable_cody = false,
on_attach = function() end,
})
end,
cmd = {
"SourcegraphBuild",
"SourcegraphDownloadBinaries",
"SourcegraphInfo",
"SourcegraphLink",
"SourcegraphLogin",
"SourcegraphSearch",
},
2023-10-20 23:59:32 +00:00
})
2022-02-25 19:03:05 +00:00
-- Auto sync after bootstrapping on a fresh box
2022-10-25 16:42:59 +00:00
if packer_bootstrap ~= "" then
2022-02-25 19:03:05 +00:00
packer.sync()
end