feat(nvim): clueless.
This commit is contained in:
parent
6456f7b216
commit
e8279efeb6
15 changed files with 1003 additions and 1055 deletions
7
dot_config/nvim/dot_stylua.toml
Normal file
7
dot_config/nvim/dot_stylua.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
column_width = 80
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
collapse_simple_statement = "Never"
|
||||
call_parentheses = "Always"
|
|
@ -34,6 +34,12 @@ Nmap("<C-J>", "<C-W>j")
|
|||
Nmap("<C-K>", "<C-W>k")
|
||||
Nmap("<C-L>", "<C-W>l")
|
||||
Nmap("<C-H>", "<C-W>h")
|
||||
|
||||
-- merge conflicts
|
||||
Nmap("<leader>gd", ":Gvdiff!<CR>")
|
||||
Nmap("gdh", ":diffget //2<CR>")
|
||||
Nmap("gdl", ":diffget //3<CR>")
|
||||
|
||||
-- escape :terminal easier
|
||||
vim.cmd([[tnoremap <Esc> <C-\><C-n>]])
|
||||
|
||||
|
@ -45,9 +51,9 @@ vim.o.expandtab = true
|
|||
-- indentation autocmds for some filetypes
|
||||
vim.cmd([[
|
||||
" smol spaces for soydev
|
||||
autocmd FileType html,css,js,jsreact,ts,tsreact,json,yaml setlocal ts=2 sw=2 sts=0 et
|
||||
autocmd FileType html,lua,css,js,jsreact,ts,tsreact,json,yaml setlocal ts=2 sw=2 sts=0 et
|
||||
" Tabs, yikes
|
||||
autocmd FileType go,lua setlocal ts=4 sw=4 sts=4 noet
|
||||
autocmd FileType go setlocal ts=4 sw=4 sts=4 noet
|
||||
" Spaces, based languages
|
||||
autocmd FileType python,rust setlocal ts=4 sw=4 sts=4 et
|
||||
autocmd FileType markdown let g:table_mode_corner='|'
|
||||
|
@ -66,6 +72,16 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
|||
end,
|
||||
})
|
||||
|
||||
local wr_group = vim.api.nvim_create_augroup("WinResize", { clear = true })
|
||||
|
||||
-- resize splits when vim window is resized
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
group = wr_group,
|
||||
pattern = "*",
|
||||
command = "wincmd =",
|
||||
desc = "Automatically resize windows when the host window size changes.",
|
||||
})
|
||||
|
||||
-- neovide settings {{{
|
||||
if vim.g.neovide then
|
||||
vim.cmd("cd $HOME")
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
require("bufferline").setup({
|
||||
closable = false,
|
||||
icons = "both",
|
||||
insert_at_end = true,
|
||||
no_name_title = "",
|
||||
})
|
||||
|
||||
-- hop between buffers in order of the bar
|
||||
Nmap("<A-,>", "<Cmd>BufferPrevious<CR>")
|
||||
Nmap("<A-.>", "<Cmd>BufferNext<CR>")
|
||||
-- Re-order to previous/next
|
||||
Nmap("<A-<>", "<Cmd>BufferMovePrevious<CR>")
|
||||
Nmap("<A->>", "<Cmd>BufferMoveNext<CR>")
|
||||
-- Goto buffer in position...
|
||||
Nmap("<A-1>", "<Cmd>BufferGoto 1<CR>")
|
||||
Nmap("<A-2>", "<Cmd>BufferGoto 2<CR>")
|
||||
Nmap("<A-3>", "<Cmd>BufferGoto 3<CR>")
|
||||
Nmap("<A-4>", "<Cmd>BufferGoto 4<CR>")
|
||||
Nmap("<A-5>", "<Cmd>BufferGoto 5<CR>")
|
||||
Nmap("<A-6>", "<Cmd>BufferGoto 6<CR>")
|
||||
Nmap("<A-7>", "<Cmd>BufferGoto 7<CR>")
|
||||
Nmap("<A-8>", "<Cmd>BufferGoto 8<CR>")
|
||||
Nmap("<A-9>", "<Cmd>BufferGoto 9<CR>")
|
||||
Nmap("<A-0>", "<Cmd>BufferLast<CR>")
|
||||
-- Pin/unpin buffer
|
||||
Nmap("<A-p>", "<Cmd>BufferPin<CR>")
|
||||
-- Close buffer
|
||||
Nmap("<A-x>", "<Cmd>BufferClose<CR>")
|
||||
Nmap("<A-X>", "<Cmd>BufferClose!<CR>")
|
||||
-- create new buffer
|
||||
Nmap("<A-c>", "<Cmd>enew<CR>")
|
||||
-- pick buffer
|
||||
Nmap("<A-space>", "<Cmd>BufferPick<CR>")
|
||||
-- Sort automatically by...
|
||||
Nmap("<Space>bb", "<Cmd>BufferOrderByBufferNumber<CR>")
|
||||
Nmap("<Space>bd", "<Cmd>BufferOrderByDirectory<CR>")
|
||||
Nmap("<Space>bl", "<Cmd>BufferOrderByLanguage<CR>")
|
||||
Nmap("<Space>bw", "<Cmd>BufferOrderByWindowNumber<CR>")
|
40
dot_config/nvim/lua/config/bufferline.lua
Normal file
40
dot_config/nvim/lua/config/bufferline.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
require("bufferline").setup({
|
||||
options = {
|
||||
show_close_icon = false,
|
||||
separator_style = "slant",
|
||||
close_icon = "",
|
||||
offsets = { { filetype = "NvimTree" } },
|
||||
left_mouse_command = "buffer %d",
|
||||
middle_mouse_command = "bdelete! %d",
|
||||
right_mouse_command = nil,
|
||||
},
|
||||
})
|
||||
-- hop between buffers in order of the bar
|
||||
Nmap("<A-,>", "<Cmd>BufferLineCyclePrev<CR>")
|
||||
Nmap("<A-.>", "<Cmd>BufferLineCycleNext<CR>")
|
||||
-- Re-order to previous/next
|
||||
Nmap("<A-<>", "<Cmd>BufferLineMovePrev<CR>")
|
||||
Nmap("<A->>", "<Cmd>BufferLineMoveNext<CR>")
|
||||
-- Goto buffer in position...
|
||||
Nmap("<A-1>", "<Cmd>BufferLineGoToBuffer 1<CR>")
|
||||
Nmap("<A-2>", "<Cmd>BufferLineGoToBuffer 2<CR>")
|
||||
Nmap("<A-3>", "<Cmd>BufferLineGoToBuffer 3<CR>")
|
||||
Nmap("<A-4>", "<Cmd>BufferLineGoToBuffer 4<CR>")
|
||||
Nmap("<A-5>", "<Cmd>BufferLineGoToBuffer 5<CR>")
|
||||
Nmap("<A-6>", "<Cmd>BufferLineGoToBuffer 6<CR>")
|
||||
Nmap("<A-7>", "<Cmd>BufferLineGoToBuffer 7<CR>")
|
||||
Nmap("<A-8>", "<Cmd>BufferLineGoToBuffer 8<CR>")
|
||||
Nmap("<A-9>", "<Cmd>BufferLineGoToBuffer 9<CR>")
|
||||
Nmap("<A-0>", "<Cmd>BufferLineGoToBuffer -1<CR>")
|
||||
-- Pin/unpin buffer
|
||||
Nmap("<A-p>", "<Cmd>BufferLineTogglePin<CR>")
|
||||
-- Close buffer
|
||||
Nmap("<A-x>", "<Cmd>bdelete<CR>")
|
||||
Nmap("<A-X>", "<Cmd>bdelete!<CR>")
|
||||
-- create new buffer
|
||||
Nmap("<A-c>", "<Cmd>enew<CR>")
|
||||
-- pick buffer
|
||||
Nmap("<A-space>", "<Cmd>BufferLinePick<CR>")
|
||||
-- Sort automatically by...
|
||||
Nmap("<Space>bd", "<Cmd>BufferLineSortByDirectory<CR>")
|
||||
Nmap("<Space>bl", "<Cmd>BufferLineSortByExtension<CR>")
|
|
@ -1,13 +1,11 @@
|
|||
-- use transparency in terminal only
|
||||
vim.g.catppuccin_flavour = "mocha"
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
vim.g.catppuccin_flavour = "frappe"
|
||||
|
||||
require("catppuccin").setup({
|
||||
transparent_background = false,
|
||||
term_colors = true,
|
||||
dim_inactive = {
|
||||
enable = false,
|
||||
enable = true,
|
||||
shade = "dark",
|
||||
percentage = 0.05,
|
||||
percentage = 0.15,
|
||||
},
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
|
@ -49,7 +47,7 @@ require("catppuccin").setup({
|
|||
},
|
||||
barbar = false,
|
||||
bufferline = true,
|
||||
dashboard = true,
|
||||
dashboard = false,
|
||||
fern = false,
|
||||
gitgutter = false,
|
||||
gitsigns = true,
|
||||
|
@ -64,7 +62,22 @@ require("catppuccin").setup({
|
|||
telescope = true,
|
||||
ts_rainbow = true,
|
||||
vim_sneak = false,
|
||||
}
|
||||
},
|
||||
custom_highlights = {
|
||||
DashboardShortCut = { fg = colors.yellow },
|
||||
DashboardHeader = { fg = colors.red },
|
||||
DashboardCenter = { fg = colors.peach },
|
||||
DashboardFooter = { fg = colors.maroon },
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd("colorscheme catppuccin")
|
||||
vim.api.nvim_command("colorscheme catppuccin")
|
||||
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
package.loaded["feline"] = nil
|
||||
package.loaded["catppuccin.groups.integrations.feline"] = nil
|
||||
require("config.feline")
|
||||
end,
|
||||
})
|
||||
|
|
26
dot_config/nvim/lua/config/colorizer.lua
Normal file
26
dot_config/nvim/lua/config/colorizer.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("colorizer").setup({
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = false, -- "Name" codes like Blue or blue
|
||||
RRGGBBAA = false, -- #RRGGBBAA hex codes
|
||||
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
||||
rgb_fn = false, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = false, -- CSS hsl() and hsla() functions
|
||||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes for `mode`: foreground, background, virtualtext
|
||||
mode = "background", -- Set the display mode.
|
||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
||||
-- True is same as normal
|
||||
tailwind = true,
|
||||
-- parsers can contain values used in |user_default_options|
|
||||
sass = { enable = true }, -- Enable sass colors
|
||||
},
|
||||
buftypes = {
|
||||
"*",
|
||||
-- exclude prompt and popup buftypes from highlight
|
||||
"!prompt",
|
||||
"!popup",
|
||||
},
|
||||
})
|
|
@ -1,3 +1,5 @@
|
|||
local cp = require("catppuccin.palettes.init").get_palette()
|
||||
|
||||
local home = os.getenv("HOME")
|
||||
local db = require("dashboard")
|
||||
|
||||
|
@ -31,12 +33,12 @@ end
|
|||
|
||||
db.custom_center = {
|
||||
{
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
desc = "Restore latest session ",
|
||||
action = "SessionLoad",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
desc = "Open Projects ",
|
||||
action = "Telescope project",
|
||||
},
|
||||
|
@ -51,7 +53,7 @@ db.custom_center = {
|
|||
action = "Telescope file_browser",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
desc = "Find word ",
|
||||
action = "Telescope live_grep",
|
||||
},
|
||||
|
@ -61,6 +63,16 @@ db.custom_center = {
|
|||
action = function()
|
||||
vim.cmd("cd " .. home .. "/.config/nvim/")
|
||||
vim.cmd("edit init.lua")
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
db.custom_footer = function()
|
||||
local v = vim.version()
|
||||
local vStr = string.format("%d.%d.%d", v.major, v.minor, v.patch)
|
||||
local plugCount = #vim.tbl_keys(packer_plugins)
|
||||
return {
|
||||
"neovim " .. vStr,
|
||||
plugCount .. " regrets",
|
||||
}
|
||||
end
|
||||
|
|
|
@ -7,12 +7,20 @@ ctp_feline.setup({
|
|||
right_separator = "",
|
||||
bar = "█",
|
||||
mode_icon = " ",
|
||||
dir = " ",
|
||||
file = " ",
|
||||
git = {
|
||||
branch = " ",
|
||||
},
|
||||
},
|
||||
sett = {
|
||||
show_modified = true,
|
||||
curr_dir = clrs.mauve,
|
||||
curr_file = clrs.blue,
|
||||
},
|
||||
mode_colors = {
|
||||
["n"] = { "NORMAL", clrs.blue },
|
||||
},
|
||||
})
|
||||
|
||||
require("feline").setup({
|
||||
|
@ -32,27 +40,3 @@ require("feline").setup({
|
|||
bufnames = {},
|
||||
},
|
||||
})
|
||||
|
||||
-- local navic = require("nvim-navic")
|
||||
|
||||
-- local wbar = {
|
||||
-- active = {},
|
||||
-- inactive = {}
|
||||
-- }
|
||||
-- table.insert(wbar.active, {})
|
||||
-- table.insert(wbar.active, {})
|
||||
-- table.insert(wbar.active, {})
|
||||
|
||||
-- table.insert(wbar.active[1], {
|
||||
-- provider = function()
|
||||
-- return navic.get_location()
|
||||
-- end,
|
||||
-- enabled = function()
|
||||
-- return navic.is_available()
|
||||
-- end,
|
||||
-- })
|
||||
-- table.insert(wbar.active[3], {
|
||||
-- provider = 'lsp_client_names'
|
||||
-- })
|
||||
|
||||
-- require("feline").winbar.setup({ components = wbar })
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
local saga = require("lspsaga")
|
||||
saga.init_lsp_saga()
|
||||
saga.init_lsp_saga({
|
||||
code_action_lightbulb = {
|
||||
enable = false,
|
||||
},
|
||||
})
|
||||
|
||||
Nmap("gr", "<cmd>Lspsaga rename<cr>")
|
||||
Nmap("gx", "<cmd>Lspsaga code_action<cr>")
|
||||
|
@ -8,16 +12,6 @@ Nmap("K", "<cmd>Lspsaga hover_doc<cr>")
|
|||
Nmap("go", "<cmd>Lspsaga show_line_diagnostics<cr>")
|
||||
Nmap("gj", "<cmd>Lspsaga diagnostic_jump_next<cr>")
|
||||
Nmap("gk", "<cmd>Lspsaga diagnostic_jump_prev<cr>")
|
||||
-- Nmap("<C-u>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1, '<c-u>')<cr>", {})
|
||||
-- Nmap("<C-d>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(1, '<c-d>')<cr>", {})
|
||||
|
||||
-- vim.keymap.set("n", "<C-u>", function()
|
||||
-- require("lspsaga.action").smart_scroll_with_saga(1)
|
||||
-- end)
|
||||
-- -- scroll up
|
||||
-- vim.keymap.set("n", "<C-d>", function()
|
||||
-- require("lspsaga.action").smart_scroll_with_saga(-1)
|
||||
-- end)
|
||||
|
||||
vim.cmd([[
|
||||
nnoremap <silent> <A-d> <cmd>lua require('lspsaga.floaterm').open_float_terminal()<CR>
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
function string.starts(self, str)
|
||||
return self:find('^' .. str) ~= nil
|
||||
return self:find("^" .. str) ~= nil
|
||||
end
|
||||
|
||||
local conceal = function()
|
||||
local home = os.getenv("HOME")
|
||||
local blacklist = {
|
||||
[home .. "/git/work"] = "Working...",
|
||||
[home .. "/git/freelance"] = "Freelancing...",
|
||||
[home .. "/git/freelance"] = "Freelancing...",
|
||||
[home .. "/git/work"] = "Using nvim at work.",
|
||||
[home .. "/git/freelance"] = "Using nvim to freelance.",
|
||||
}
|
||||
|
||||
local cur_file = vim.fn.expand("%:p")
|
||||
|
@ -71,8 +70,8 @@ require("presence"):setup({
|
|||
},
|
||||
["prisma"] = {
|
||||
"Prisma",
|
||||
"https://avatars.githubusercontent.com/u/17219288"
|
||||
}
|
||||
"https://avatars.githubusercontent.com/u/17219288",
|
||||
},
|
||||
},
|
||||
-- Rich Presence text options
|
||||
editing_text = function(s)
|
||||
|
@ -80,31 +79,31 @@ require("presence"):setup({
|
|||
if concealed then
|
||||
return concealed
|
||||
end
|
||||
return "✍️ " .. s
|
||||
return "Editing " .. s
|
||||
end,
|
||||
reading_text = function(s)
|
||||
local concealed = conceal()
|
||||
if concealed then
|
||||
return concealed
|
||||
end
|
||||
return "📖 " .. s
|
||||
return "Reading " .. s
|
||||
end,
|
||||
file_explorer_text = function(s)
|
||||
local concealed = conceal()
|
||||
if concealed then
|
||||
return concealed
|
||||
end
|
||||
return "📁 " .. s
|
||||
return "Working in " .. s
|
||||
end,
|
||||
workspace_text = function(s)
|
||||
local concealed = conceal()
|
||||
if s ~= nil and not concealed then
|
||||
return "🗂️ ".. s
|
||||
return "Working on " .. s
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end,
|
||||
git_commit_text = "Committing changes",
|
||||
plugin_manager_text = "🤹 Managing Plugins",
|
||||
plugin_manager_text = "Managing Plugins",
|
||||
line_number_text = "L%s of %s",
|
||||
})
|
||||
|
|
|
@ -9,57 +9,37 @@ require("nvim-treesitter.configs").setup({
|
|||
},
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"cpp",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"fish",
|
||||
"gdscript",
|
||||
"glsl",
|
||||
"go",
|
||||
"godot_resource",
|
||||
"gomod",
|
||||
"gowork",
|
||||
"graphql",
|
||||
"help",
|
||||
"hjson",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"kotlin",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"ninja",
|
||||
"perl",
|
||||
"php",
|
||||
"prisma",
|
||||
"proto",
|
||||
"pug",
|
||||
"python",
|
||||
"rasi",
|
||||
"regex",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"svelte",
|
||||
"swift",
|
||||
"teal",
|
||||
"todotxt",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
|
|
|
@ -62,7 +62,9 @@ cmp.setup.cmdline(":", {
|
|||
})
|
||||
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(
|
||||
vim.lsp.protocol.make_client_capabilities()
|
||||
)
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
@ -101,8 +103,7 @@ local on_attach = function(client, bufnr)
|
|||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set("n", "<space>nf", function()
|
||||
end, bufopts)
|
||||
vim.keymap.set("n", "<space>nf", function() end, bufopts)
|
||||
end
|
||||
|
||||
local common_config = {
|
||||
|
@ -146,7 +147,9 @@ lsp.rust_analyzer.setup(common_config)
|
|||
|
||||
--- Web Development
|
||||
lsp.cssls.setup(common_config)
|
||||
local emmet_cap = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local emmet_cap = require("cmp_nvim_lsp").update_capabilities(
|
||||
vim.lsp.protocol.make_client_capabilities()
|
||||
)
|
||||
emmet_cap.textDocument.completion.completionItem.snippetSupport = true
|
||||
lsp.emmet_ls.setup({
|
||||
on_attach = on_attach,
|
||||
|
@ -193,7 +196,11 @@ lsp.dockerls.setup(common_config)
|
|||
lsp.graphql.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = lsp.util.root_pattern(".graphqlrc*", ".graphql.config.*", "graphql.config.*"),
|
||||
root_dir = lsp.util.root_pattern(
|
||||
".graphqlrc*",
|
||||
".graphql.config.*",
|
||||
"graphql.config.*"
|
||||
),
|
||||
settings = {
|
||||
graphql = {
|
||||
schemaPath = "schema.graphql",
|
||||
|
@ -214,19 +221,8 @@ lsp.yamlls.setup({
|
|||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
yaml = {
|
||||
schemas = {
|
||||
["https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.2-standalone-strict/all.json"] = {
|
||||
"*.k8s.yaml",
|
||||
"*.k8s.yml",
|
||||
"kubectl-edit-*.yaml",
|
||||
},
|
||||
},
|
||||
["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,6 +2,10 @@ require("utils")
|
|||
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
local packer = require("packer")
|
||||
if not packer then
|
||||
return
|
||||
end
|
||||
|
||||
-- slow internet...
|
||||
packer.init({
|
||||
git = { clone_timeout = 180 },
|
||||
|
@ -20,36 +24,11 @@ return packer.startup(function(use)
|
|||
use({
|
||||
"catppuccin/nvim",
|
||||
as = "catppuccin",
|
||||
run = ":CatppuccinCompile",
|
||||
config = function()
|
||||
require("config/catppuccin")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"Pocco81/true-zen.nvim",
|
||||
config = function()
|
||||
require("true-zen").setup({
|
||||
modes = {
|
||||
ataraxis = {
|
||||
shade = "dark",
|
||||
backdrop = 0.00,
|
||||
quit_untoggles = true,
|
||||
padding = {
|
||||
left = 52,
|
||||
right = 52,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
},
|
||||
},
|
||||
narrow = {
|
||||
run_ataraxis = true,
|
||||
},
|
||||
},
|
||||
integrations = {
|
||||
tmux = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- git gutter
|
||||
use({
|
||||
|
@ -91,46 +70,7 @@ return packer.startup(function(use)
|
|||
use({
|
||||
"akinsho/bufferline.nvim",
|
||||
config = function()
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
show_close_icon = false,
|
||||
separator_style = "slant",
|
||||
close_icon = "",
|
||||
offsets = { { filetype = "NvimTree" } },
|
||||
left_mouse_command = "buffer %d",
|
||||
middle_mouse_command = "bdelete! %d",
|
||||
right_mouse_command = nil,
|
||||
},
|
||||
})
|
||||
-- hop between buffers in order of the bar
|
||||
Nmap("<A-,>", "<Cmd>BufferLineCyclePrev<CR>")
|
||||
Nmap("<A-.>", "<Cmd>BufferLineCycleNext<CR>")
|
||||
-- Re-order to previous/next
|
||||
Nmap("<A-<>", "<Cmd>BufferLineMovePrev<CR>")
|
||||
Nmap("<A->>", "<Cmd>BufferLineMoveNext<CR>")
|
||||
-- Goto buffer in position...
|
||||
Nmap("<A-1>", "<Cmd>BufferLineGoToBuffer 1<CR>")
|
||||
Nmap("<A-2>", "<Cmd>BufferLineGoToBuffer 2<CR>")
|
||||
Nmap("<A-3>", "<Cmd>BufferLineGoToBuffer 3<CR>")
|
||||
Nmap("<A-4>", "<Cmd>BufferLineGoToBuffer 4<CR>")
|
||||
Nmap("<A-5>", "<Cmd>BufferLineGoToBuffer 5<CR>")
|
||||
Nmap("<A-6>", "<Cmd>BufferLineGoToBuffer 6<CR>")
|
||||
Nmap("<A-7>", "<Cmd>BufferLineGoToBuffer 7<CR>")
|
||||
Nmap("<A-8>", "<Cmd>BufferLineGoToBuffer 8<CR>")
|
||||
Nmap("<A-9>", "<Cmd>BufferLineGoToBuffer 9<CR>")
|
||||
Nmap("<A-0>", "<Cmd>BufferLineGoToBuffer -1<CR>")
|
||||
-- Pin/unpin buffer
|
||||
Nmap("<A-p>", "<Cmd>BufferLineTogglePin<CR>")
|
||||
-- Close buffer
|
||||
Nmap("<A-x>", "<Cmd>bdelete<CR>")
|
||||
Nmap("<A-X>", "<Cmd>bdelete!<CR>")
|
||||
-- create new buffer
|
||||
Nmap("<A-c>", "<Cmd>enew<CR>")
|
||||
-- pick buffer
|
||||
Nmap("<A-space>", "<Cmd>BufferLinePick<CR>")
|
||||
-- Sort automatically by...
|
||||
Nmap("<Space>bd", "<Cmd>BufferLineSortByDirectory<CR>")
|
||||
Nmap("<Space>bl", "<Cmd>BufferLineSortByExtension<CR>")
|
||||
require("config/bufferline")
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -155,7 +95,9 @@ return packer.startup(function(use)
|
|||
-- syntax
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
|
||||
run = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
config = function()
|
||||
require("config/treesitter")
|
||||
end,
|
||||
|
@ -169,17 +111,6 @@ return packer.startup(function(use)
|
|||
require("which-key").setup({})
|
||||
end,
|
||||
})
|
||||
-- we IDE now
|
||||
use({
|
||||
"rcarriga/nvim-notify",
|
||||
config = function()
|
||||
require("notify").setup({
|
||||
fps = 60,
|
||||
timeout = 2500,
|
||||
stages = "fade",
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- syntax
|
||||
use("alker0/chezmoi.vim")
|
||||
|
@ -188,27 +119,29 @@ return packer.startup(function(use)
|
|||
use("elkowar/yuck.vim")
|
||||
|
||||
-- tooling
|
||||
use({
|
||||
"editorconfig/editorconfig-vim",
|
||||
config = function()
|
||||
-- add fugitive buffers to the editorconfig excludes
|
||||
vim.g.EditorConfig_exclude_patterns = { "fugitive://.*", "scp://.*" }
|
||||
end,
|
||||
})
|
||||
use("gpanders/editorconfig.nvim")
|
||||
-- read and write encrypted pgp files
|
||||
use("jamessan/vim-gnupg")
|
||||
|
||||
-- additional functionality
|
||||
use("tpope/vim-commentary")
|
||||
use("tpope/vim-surround")
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"kylechui/nvim-surround",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
})
|
||||
use("ggandor/lightspeed.nvim")
|
||||
-- make those above work in repeat commands
|
||||
use("tpope/vim-repeat")
|
||||
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({})
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require("cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
@ -220,14 +153,7 @@ return packer.startup(function(use)
|
|||
require("nvim-ts-autotag").setup()
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"heavenshell/vim-jsdoc",
|
||||
run = "make install",
|
||||
config = function()
|
||||
Nmap("<leader>jd", "<Cmd>JsDoc<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
--
|
||||
-- git
|
||||
use("tpope/vim-fugitive")
|
||||
-- why not both?
|
||||
|
@ -238,7 +164,6 @@ return packer.startup(function(use)
|
|||
Nmap("<leader>ng", "<Cmd>Neogit<CR>")
|
||||
end,
|
||||
})
|
||||
use("christoomey/vim-sort-motion")
|
||||
use("dhruvasagar/vim-table-mode")
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
|
@ -249,15 +174,15 @@ return packer.startup(function(use)
|
|||
end,
|
||||
})
|
||||
use({
|
||||
"RRethy/vim-hexokinase",
|
||||
run = "make",
|
||||
"nvchad/nvim-colorizer.lua",
|
||||
config = function()
|
||||
vim.g.Hexokinase_highlighters = { "virtual" }
|
||||
require("config/colorizer")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"simrat39/symbols-outline.nvim",
|
||||
config = function()
|
||||
require("symbols-outline").setup()
|
||||
Nmap("<leader>so", ":SymbolsOutline<CR>")
|
||||
end,
|
||||
})
|
||||
|
@ -276,7 +201,9 @@ return packer.startup(function(use)
|
|||
"kristijanhusak/vim-dadbod-completion",
|
||||
requires = { { "tpope/vim-dadbod" }, { "hrsh7th/nvim-cmp" } },
|
||||
config = function()
|
||||
require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } })
|
||||
require("cmp").setup.buffer({
|
||||
sources = { { name = "vim-dadbod-completion" } },
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -325,6 +252,12 @@ return packer.startup(function(use)
|
|||
require("telescope").load_extension("project")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"nvim-telescope/telescope-packer.nvim",
|
||||
config = function()
|
||||
require("telescope").load_extension("packer")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"olacin/telescope-cc.nvim",
|
||||
requires = {
|
||||
|
@ -335,9 +268,6 @@ return packer.startup(function(use)
|
|||
require("telescope").load_extension("conventional_commits")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"sudormrfbin/cheatsheet.nvim",
|
||||
})
|
||||
|
||||
use({
|
||||
"andweeb/presence.nvim",
|
||||
|
@ -361,22 +291,6 @@ return packer.startup(function(use)
|
|||
use("hrsh7th/cmp-vsnip")
|
||||
use("hrsh7th/vim-vsnip")
|
||||
use("petertriho/cmp-git")
|
||||
-- other
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.gofmt,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.rustfmt,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
},
|
||||
})
|
||||
end,
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
})
|
||||
|
||||
use({
|
||||
"simrat39/rust-tools.nvim",
|
||||
|
@ -402,7 +316,11 @@ return packer.startup(function(use)
|
|||
use({
|
||||
"github/copilot.vim",
|
||||
config = function()
|
||||
Imap("<C-J>", "copilot#Accept(<Tab>)", { noremap = true, silent = true, expr = true })
|
||||
Imap(
|
||||
"<C-J>",
|
||||
"copilot#Accept(<Tab>)",
|
||||
{ noremap = true, silent = true, expr = true }
|
||||
)
|
||||
vim.g.copilot_no_tab_map = true
|
||||
end,
|
||||
})
|
||||
|
@ -453,6 +371,7 @@ return packer.startup(function(use)
|
|||
})
|
||||
|
||||
-- automatic theme switching
|
||||
if vim.fn.has("macunix") then
|
||||
use({
|
||||
"f-person/auto-dark-mode.nvim",
|
||||
config = function()
|
||||
|
@ -469,6 +388,6 @@ return packer.startup(function(use)
|
|||
})
|
||||
auto_dark_mode.init()
|
||||
end,
|
||||
cond = vim.fn.has("macunix"),
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue