1
0
mirror of https://github.com/danbee/dotfiles-local synced 2025-03-04 08:49:07 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Barber
bf485891d1 Update plugins 2023-06-08 12:18:39 -05:00
Daniel Barber
b5c9203263 Rejig config 2023-06-08 12:18:31 -05:00
19 changed files with 347 additions and 300 deletions

View File

@ -1,33 +1,36 @@
{
"ascii.nvim": { "branch": "master", "commit": "068b098b6d301bb87988ea749b66bed641072121" },
"ascii.nvim": { "branch": "master", "commit": "f4d165c7384aade71d828fb08502d8ceda7dca89" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"dashboard-nvim": { "branch": "master", "commit": "0af0ad181db271ef8d5a332f4cfcec9118340497" },
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
"gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" },
"gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" },
"kanagawa.nvim": { "branch": "master", "commit": "12f07c5d68ba6b09b53ab528de6df68e55b4cd9a" },
"lazy.nvim": { "branch": "main", "commit": "ceb413678dfcf3d5455208959185e3db1f7892c7" },
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
"mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" },
"nerdcommenter": { "branch": "master", "commit": "1fe9e1cfea9bb0dbc77174d776759ed67899ee50" },
"kanagawa.nvim": { "branch": "master", "commit": "14a7524a8b259296713d4d77ef3c7f4dec501269" },
"lazy.nvim": { "branch": "main", "commit": "d1b02c2dda88422ca573f2a1ebdfb213ce0124d6" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "d883632bf8f92f1d5abea4a9c28fb2f90aa795aa" },
"nerdcommenter": { "branch": "master", "commit": "b0b09ea46c9f0509556257bd8b838b40f493d6a0" },
"nordic.nvim": { "branch": "main", "commit": "bd4cf4e4ca8b6a8b63e2e6e38d2112a59be45494" },
"nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" },
"null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" },
"nvim-cmp": { "branch": "main", "commit": "c7189282199d6f92d3becb91d4f44fc734f75f98" },
"nvim-lspconfig": { "branch": "master", "commit": "3bd4ca412982afa6f88bb7ef890660cee51c3e58" },
"nvim-treesitter": { "branch": "master", "commit": "bff7115bf89a553e4a1a120eb69b99486564af4c" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "85a6f9d1af8b731f09f4031e1f9478d4b40d13ab" },
"nui.nvim": { "branch": "main", "commit": "d5a82aae64426a805e19d8ef5a379292f9dc55d3" },
"null-ls.nvim": { "branch": "main", "commit": "a138b14099e9623832027ea12b4631ddd2a49256" },
"nvim-cmp": { "branch": "main", "commit": "b5a636d46c69bb371995c22d7a10ee1544004879" },
"nvim-lspconfig": { "branch": "master", "commit": "0f598b9ab9f2a6d7e137074be99c8d89af44b990" },
"nvim-test": { "branch": "main", "commit": "e06f3d029ee161f3ead6193cf27354d1eb8723c3" },
"nvim-treesitter": { "branch": "master", "commit": "2c59e0ff3da6514b03d853ebecb6c36c515a5d7d" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "944b0d85bb6817948eaaf78893cbb23c25641d8f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "2d6d3c7e49a24f6ffbbf7898241fefe9784f61bd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
"nvim-web-devicons": { "branch": "master", "commit": "b34362b20a4942b3245f958e73ebe1b09b020ad1" },
"onedark.nvim": { "branch": "master", "commit": "82cad746101300aa2fdea5f4d121c51c23bab8bd" },
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
"telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" },
"tokyonight.nvim": { "branch": "main", "commit": "f2ed28707a0ad49047d9b733395ea205ea09f517" },
"nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" },
"onedark.nvim": { "branch": "master", "commit": "8ef51924724d506e515f2d3ac9f959a9eaf38f3d" },
"plenary.nvim": { "branch": "master", "commit": "499e0743cf5e8075cd32af68baa3946a1c76adf1" },
"telescope.nvim": { "branch": "master", "commit": "9a82b5b73eba8c8d71bacedd062d20fe6d3c791a" },
"tokyonight.nvim": { "branch": "main", "commit": "161114bd39b990995e08dbf941f6821afbdcd666" },
"treesj": { "branch": "main", "commit": "b1e2976c2d7ba922371cc7f3ab08b75136c27231" },
"vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" },
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
"which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" }
"which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }
}

View File

@ -17,6 +17,7 @@ keymap(
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"

View File

@ -0,0 +1,7 @@
return {
"MaximilianLloyd/ascii.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
},
}

View File

@ -1,24 +1,30 @@
return function()
require("dashboard").setup({
theme = "hyper",
config = {
header = {
[[ . . ]],
[[ ';;,. ::' ]],
[[ ,:::;,, :ccc, ]],
[[,::c::,,,,. :cccc,]],
[[,cccc:;;;;;. cllll,]],
[[,cccc;.;;;;;, cllll;]],
[[:cccc; .;;;;;;. coooo;]],
[[;llll; ,:::::'loooo;]],
[[;llll: ':::::loooo:]],
[[:oooo: .::::llodd:]],
[[.;ooo: ;cclooo:.]],
[[ .;oc 'coo;. ]],
[[ .' .,. ]],
[[]],
[[]],
return {
"glepnir/dashboard-nvim",
event = "VimEnter",
config = function()
require("dashboard").setup({
theme = "hyper",
config = {
header = {
[[ . . ]],
[[ ';;,. ::' ]],
[[ ,:::;,, :ccc, ]],
[[,::c::,,,,. :cccc,]],
[[,cccc:;;;;;. cllll,]],
[[,cccc;.;;;;;, cllll;]],
[[:cccc; .;;;;;;. coooo;]],
[[;llll; ,:::::'loooo;]],
[[;llll: ':::::loooo:]],
[[:oooo: .::::llodd:]],
[[.;ooo: ;cclooo:.]],
[[ .;oc 'coo;. ]],
[[ .' .,. ]],
[[]],
[[]],
},
},
},
})
end
})
end,
}

View File

@ -0,0 +1,7 @@
return {
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
}

View File

@ -1,8 +1,12 @@
return function()
require("config.plugins.lspconfig.elixir")
require("config.plugins.lspconfig.emmet")
require("config.plugins.lspconfig.javascript")
require("config.plugins.lspconfig.lua")
require("config.plugins.lspconfig.ruby")
require("config.plugins.lspconfig.rust")
end
return {
"neovim/nvim-lspconfig",
config = function()
require("config.plugins.lspconfig.elixir")
require("config.plugins.lspconfig.emmet")
require("config.plugins.lspconfig.javascript")
require("config.plugins.lspconfig.lua")
require("config.plugins.lspconfig.ruby")
require("config.plugins.lspconfig.rust")
end,
}

View File

@ -1,3 +1,9 @@
return function()
require("lualine").setup()
end
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup()
end,
}

View File

@ -0,0 +1,7 @@
return {
"williamboman/mason.nvim",
config = function()
require("mason").setup()
end,
}

View File

@ -1,8 +1,18 @@
return function()
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return {
"nvim-neo-tree/neo-tree.nvim",
require("neo-tree").setup({
hijack_netrw_behavior = "open_default",
})
end
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("neo-tree").setup({
hijack_netrw_behavior = "open_default",
})
end,
}

View File

@ -1,39 +1,45 @@
return function()
local null_ls = require("null-ls")
return {
"jose-elias-alvarez/null-ls.nvim",
null_ls.setup({
sources = {
null_ls.builtins.formatting.crystal_format,
null_ls.builtins.formatting.prettierd.with({
filetypes = {
"css",
"graphql",
"handlebars",
"html",
"javascript",
"javascriptreact",
"json",
"jsonc",
"less",
"markdown",
"markdown.mdx",
"ruby",
"scss",
"typescript",
"typescriptreact",
"vue",
"yaml",
},
timeout = 5000,
}),
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.standardrb,
null_ls.builtins.formatting.stylua,
},
})
dependencies = { "nvim-lua/plenary.nvim" },
-- Format on save
vim.api.nvim_create_autocmd("BufWritePre", {
command = "lua vim.lsp.buf.format()",
})
end
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.crystal_format,
null_ls.builtins.formatting.prettierd.with({
filetypes = {
"css",
"graphql",
"handlebars",
"html",
"javascript",
"javascriptreact",
"json",
"jsonc",
"less",
"markdown",
"markdown.mdx",
"ruby",
"scss",
"typescript",
"typescriptreact",
"vue",
"yaml",
},
timeout = 5000,
}),
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.standardrb,
null_ls.builtins.formatting.stylua,
},
})
-- Format on save
vim.api.nvim_create_autocmd("BufWritePre", {
command = "lua vim.lsp.buf.format()",
})
end,
}

View File

@ -1,54 +1,66 @@
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
return col ~= 0
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
== nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes(key, true, true, true),
mode,
true
)
end
return function()
local cmp = require("cmp")
return {
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, { "i", "s" })
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "vsnip" },
}, {
{ name = "buffer" },
}),
})
end
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "vsnip" },
}, {
{ name = "buffer" },
}),
})
end,
}

View File

@ -0,0 +1,7 @@
return {
"klen/nvim-test",
config = function()
require("nvim-test").setup()
end,
}

View File

@ -0,0 +1,82 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
init = function()
-- PERF: no need to load the plugin,
-- if we only need its queries for mini.ai
local plugin =
require("lazy.core.config").spec.plugins["nvim-treesitter"]
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
local enabled = false
if opts.textobjects then
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
if opts.textobjects[mod] and opts.textobjects[mod].enable then
enabled = true
break
end
end
end
if not enabled then
require("lazy.core.loader").disable_rtp_plugin(
"nvim-treesitter-textobjects"
)
end
end,
},
"JoosepAlviste/nvim-ts-context-commentstring",
"RRethy/nvim-treesitter-endwise",
},
config = function()
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
indent = { enable = true },
endwise = { enable = true },
context_commentstring = { enable = true },
auto_install = true,
sync_install = false,
ensure_installed = {
"bash",
"c",
"comment",
"css",
"dockerfile",
"eex",
"elixir",
"html",
"javascript",
"json",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"ruby",
"rust",
"scss",
"sql",
"swift",
"toml",
"tsx",
"typescript",
"vim",
"vue",
"yaml",
},
})
end,
},
}

View File

@ -0,0 +1,5 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
}

View File

@ -1,41 +0,0 @@
return function()
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
indent = { enable = true },
endwise = { enable = true },
context_commentstring = { enable = true },
auto_install = true,
sync_install = false,
ensure_installed = {
"bash",
"c",
"comment",
"css",
"dockerfile",
"eex",
"elixir",
"html",
"javascript",
"json",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"ruby",
"rust",
"scss",
"sql",
"swift",
"toml",
"tsx",
"typescript",
"vim",
"vue",
"yaml",
},
})
end

View File

@ -1,3 +1,9 @@
return function()
require("treesj").setup()
end
return {
"Wansmer/treesj",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function()
require("treesj").setup()
end,
}

View File

@ -1,10 +1,14 @@
return function()
vim.o.timeout = true
vim.o.timeoutlen = 300
return {
"folke/which-key.nvim",
require("which-key").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
})
end
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
})
end,
}

View File

@ -1,74 +1,24 @@
return {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"hrsh7th/cmp-vsnip",
"hrsh7th/vim-vsnip",
"tpope/vim-fugitive",
"preservim/nerdcommenter",
{
"Wansmer/treesj",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = require("config.plugins.treesj"),
},
{
"MaximilianLloyd/ascii.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
},
},
{
"glepnir/dashboard-nvim",
event = "VimEnter",
config = require("config.plugins.dashboard"),
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
{
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
},
{
"hrsh7th/nvim-cmp",
config = require("config.plugins.nvim-cmp"),
},
{
"williamboman/mason.nvim",
config = function()
require("mason").setup()
end,
},
{
"neovim/nvim-lspconfig",
config = require("config.plugins.lspconfig"),
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = require("config.plugins.lualine"),
},
{
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = require("config.plugins.neo-tree"),
},
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"folke/which-key.nvim",
config = require("config.plugins.which-key"),
},
{
"jose-elias-alvarez/null-ls.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = require("config.plugins.null-ls"),
},
"tpope/vim-fugitive",
require("config.plugins.ascii"),
require("config.plugins.dashboard"),
require("config.plugins.gitsigns"),
require("config.plugins.lspconfig"),
require("config.plugins.lualine"),
require("config.plugins.mason"),
require("config.plugins.neo-tree"),
require("config.plugins.null-ls"),
require("config.plugins.nvim-cmp"),
require("config.plugins.nvim-test"),
require("config.plugins.nvim-treesitter"),
require("config.plugins.telescope"),
require("config.plugins.treesj"),
require("config.plugins.which-key"),
}

View File

@ -1,35 +0,0 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
init = function()
-- PERF: no need to load the plugin, if we only need its queries for mini.ai
local plugin =
require("lazy.core.config").spec.plugins["nvim-treesitter"]
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
local enabled = false
if opts.textobjects then
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
if opts.textobjects[mod] and opts.textobjects[mod].enable then
enabled = true
break
end
end
end
if not enabled then
require("lazy.core.loader").disable_rtp_plugin(
"nvim-treesitter-textobjects"
)
end
end,
},
"JoosepAlviste/nvim-ts-context-commentstring",
"RRethy/nvim-treesitter-endwise",
},
config = require("config.plugins.tree-sitter"),
},
}