Everything I've got so far
I'm gitting it for real
This commit is contained in:
commit
b0387c6965
4
init.lua
Normal file
4
init.lua
Normal file
@ -0,0 +1,4 @@
|
||||
require("themenacesauce.core")
|
||||
require("themenacesauce.lazy")
|
||||
|
||||
require("current-theme")
|
||||
34
lazy-lock.json
Normal file
34
lazy-lock.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"auto-session": { "branch": "main", "commit": "292492ab7af4bd8b9e37e28508bc8ce995722fd5" },
|
||||
"folkeTokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mini.comment": { "branch": "main", "commit": "a0c721115faff8d05505c0a12dab410084d9e536" },
|
||||
"mini.files": { "branch": "main", "commit": "fafacfecdd6c5a66bb10d173a749f3c098e84498" },
|
||||
"mini.nvim": { "branch": "main", "commit": "f28cd08c8be826355d64080400fab1764c9693dd" },
|
||||
"mini.splitjoin": { "branch": "main", "commit": "9fcd8856efb95a505090c3225726466494076127" },
|
||||
"mini.surround": { "branch": "main", "commit": "d648a5601e1c48f175b07d10eba141da338a0a2a" },
|
||||
"mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "70a9fecaf5aeae70c765d4c51a8038165a91aa06" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"solarized-osaka.nvim": { "branch": "main", "commit": "f0c2f0ba0bd56108d53c9bfae4bb28ff6c67bbdb" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"undotree": { "branch": "master", "commit": "fc28931fbfba66ab75d9af23fe46ffbbb9de6e8c" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }
|
||||
}
|
||||
1
lua/current-theme.lua
Normal file
1
lua/current-theme.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.cmd("colorscheme rose-pine")
|
||||
7
lua/themenacesauce/core/init.lua
Normal file
7
lua/themenacesauce/core/init.lua
Normal file
@ -0,0 +1,7 @@
|
||||
require("themenacesauce.core.options")
|
||||
require("themenacesauce.core.keymaps")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
18
lua/themenacesauce/core/keymaps.lua
Normal file
18
lua/themenacesauce/core/keymaps.lua
Normal file
@ -0,0 +1,18 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
|
||||
local M = {}
|
||||
|
||||
M.general = {
|
||||
n = {
|
||||
["<C-h>"] = { "<cmd> TmuxNavigateLeft<CR>", "window left"},
|
||||
["<C-h>"] = { "<cmd> TmuxNavigateRight<CR>", "window right"},
|
||||
["<C-h>"] = { "<md> TmuxNavigateDown<CR>", "window down"},
|
||||
["<C-h>"] = { "<cmd> TmuxNavigateUp<CR>", "window up"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
29
lua/themenacesauce/core/options.lua
Normal file
29
lua/themenacesauce/core/options.lua
Normal file
@ -0,0 +1,29 @@
|
||||
vim.cmd("let g:netrw_banner = 0")
|
||||
|
||||
-- sets Vim Option Numberlines to true and then enables relative numberline.
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = true
|
||||
|
||||
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.inccommand = "split"
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- lets you copy text from NVim into others apps.
|
||||
-- vim.opt.clipboard:append("unnamedplus")
|
||||
-- highlights the files you search for.
|
||||
vim.opt.hlsearch = true
|
||||
|
||||
vim.opt.mouse = "a"
|
||||
vim.g.editorconfig = true
|
||||
|
||||
35
lua/themenacesauce/lazy.lua
Normal file
35
lua/themenacesauce/lazy.lua
Normal file
@ -0,0 +1,35 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "themenacesauce.plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "rose-pine" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
26
lua/themenacesauce/plugins/auto-pairs.lua
Normal file
26
lua/themenacesauce/plugins/auto-pairs.lua
Normal file
@ -0,0 +1,26 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = {"InsertEnter"},
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
autopairs.setup({
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = {"string"},
|
||||
javascript = {"template_string"},
|
||||
java = false,
|
||||
},
|
||||
})
|
||||
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
||||
end,
|
||||
}
|
||||
14
lua/themenacesauce/plugins/auto-sessions.lua
Normal file
14
lua/themenacesauce/plugins/auto-sessions.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
local auto_session = require("auto-session")
|
||||
|
||||
auto_session.setup({
|
||||
auto_restore_enabled = false,
|
||||
auto_session_suppress_dirs = { "~/", "~/Dev", "~/Downloads", "~/Documents", "~/Desktop" },
|
||||
})
|
||||
|
||||
vim.keymap.set( "n", "<leader>wr", "<cmd>AutoSession restore<CR>", { desc = "Restore session for cwd" }) --restore last workspace session for current directory
|
||||
vim.keymap.set("n", "<leader>ws", "<cmd>AutoSession save<CR>", { desc = "Save session for auto session root dir" }) -- save workspace session for current directory
|
||||
end
|
||||
}
|
||||
257
lua/themenacesauce/plugins/colorscheme.lua
Normal file
257
lua/themenacesauce/plugins/colorscheme.lua
Normal file
@ -0,0 +1,257 @@
|
||||
return {
|
||||
-- NOTE: Rose pine
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
-- priority = 1000,
|
||||
config = function()
|
||||
require("rose-pine").setup({
|
||||
variant = "main", -- auto, main, moon, or dawn
|
||||
dark_variant = "main", -- main, moon, or dawn
|
||||
dim_inactive_windows = false,
|
||||
-- disable_background = true,
|
||||
-- disable_nc_background = false,
|
||||
-- disable_float_background = false,
|
||||
-- extend_background_behind_borders = false,
|
||||
styles = {
|
||||
bold = true,
|
||||
italic = false,
|
||||
transparency = true,
|
||||
},
|
||||
highlight_groups = {
|
||||
ColorColumn = { bg = "#1C1C21" },
|
||||
Normal = { bg = "none" }, -- Main background remains transparent
|
||||
Pmenu = { bg = "", fg = "#e0def4" }, -- Completion menu background
|
||||
PmenuSel = { bg = "#4a465d", fg = "#f8f5f2" }, -- Highlighted completion item
|
||||
PmenuSbar = { bg = "#191724" }, -- Scrollbar background
|
||||
PmenuThumb = { bg = "#9ccfd8" }, -- Scrollbar thumb
|
||||
},
|
||||
enable = {
|
||||
terminal = false,
|
||||
legacy_highlights = false, -- Improve compatibility for previous versions of Neovim
|
||||
migrations = true, -- Handle deprecated options automatically
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
-- HACK: set this on the color you want to be persistent
|
||||
-- when quit and reopening nvim
|
||||
-- vim.cmd("colorscheme rose-pine")
|
||||
end,
|
||||
},
|
||||
-- NOTE: gruvbox
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
-- priority = 1000 ,
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = false,
|
||||
comments = false,
|
||||
folds = false,
|
||||
operators = false,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {
|
||||
Pmenu = { bg = "" }, -- Completion menu background
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- NOTE: Kanagwa
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
config = function()
|
||||
require('kanagawa').setup({
|
||||
compile = false, -- enable compiling the colorscheme
|
||||
undercurl = true, -- enable undercurls
|
||||
commentStyle = { italic = true },
|
||||
functionStyle = {},
|
||||
keywordStyle = { italic = false },
|
||||
statementStyle = { bold = true },
|
||||
typeStyle = {},
|
||||
transparent = true, -- do not set background color
|
||||
dimInactive = false, -- dim inactive window `:h hl-NormalNC`
|
||||
terminalColors = true, -- define vim.g.terminal_color_{0,17}
|
||||
colors = { -- add/modify theme and palette colors
|
||||
palette = {},
|
||||
theme = {
|
||||
wave = {},
|
||||
dragon = {},
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = "none",
|
||||
border = "rounded"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
overrides = function(colors) -- add/modify highlights
|
||||
local theme = colors.theme
|
||||
return {
|
||||
NormalFloat = { bg = "none" },
|
||||
FloatBorder = { bg = "none" },
|
||||
FloatTitle = { bg = "none" },
|
||||
Pmenu = { fg = theme.ui.shade0, bg = "NONE", blend = vim.o.pumblend }, -- add `blend = vim.o.pumblend` to enable transparency
|
||||
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
|
||||
PmenuSbar = { bg = theme.ui.bg_m1 },
|
||||
PmenuThumb = { bg = theme.ui.bg_p2 },
|
||||
|
||||
-- Save an hlgroup with dark background and dimmed foreground
|
||||
-- so that you can use it where your still want darker windows.
|
||||
-- E.g.: autocmd TermOpen * setlocal winhighlight=Normal:NormalDark
|
||||
NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },
|
||||
|
||||
-- Popular plugins that open floats will link to NormalFloat by default;
|
||||
-- set their background accordingly if you wish to keep them dark and borderless
|
||||
LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
TelescopeTitle = { fg = theme.ui.special, bold = true },
|
||||
TelescopePromptBorder = { fg = theme.ui.special, },
|
||||
TelescopeResultsNormal = { fg = theme.ui.fg_dim, },
|
||||
TelescopeResultsBorder = { fg = theme.ui.special, },
|
||||
TelescopePreviewBorder = { fg = theme.ui.special },
|
||||
}
|
||||
end,
|
||||
theme = "wave", -- Load "wave" theme when 'background' option is not set
|
||||
background = { -- map the value of 'background' option to a theme
|
||||
dark = "wave", -- try "dragon" !
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
-- NOTE: neosolarized
|
||||
{
|
||||
"craftzdog/solarized-osaka.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("solarized-osaka").setup({
|
||||
transparent = true,
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = true },
|
||||
keywords = { italic = false },
|
||||
functions = {},
|
||||
variables = {},
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
|
||||
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
|
||||
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
|
||||
dim_inactive = false, -- dims inactive windows
|
||||
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
|
||||
on_highlights = function(hl, c)
|
||||
local prompt = "#2d3149"
|
||||
hl.TelescopeNormal = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.fg_dark,
|
||||
}
|
||||
hl.TelescopeBorder = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopePromptNormal = {
|
||||
bg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopePromptBorder = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopePromptTitle = {
|
||||
bg = prompt,
|
||||
fg = "#2C94DD",
|
||||
}
|
||||
hl.TelescopePreviewTitle = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopeResultsTitle = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
-- NOTE : tokyonight
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
name = "folkeTokyonight",
|
||||
-- priority = 1000,
|
||||
config = function()
|
||||
local transparent = true
|
||||
local bg = "#011628"
|
||||
local bg_dark = "#011423"
|
||||
local bg_highlight = "#143652"
|
||||
local bg_search = "#0A64AC"
|
||||
local bg_visual = "#275378"
|
||||
local fg = "#CBE0F0"
|
||||
local fg_dark = "#B4D0E9"
|
||||
local fg_gutter = "#627E97"
|
||||
local border = "#547998"
|
||||
|
||||
require("tokyonight").setup({
|
||||
style = "night",
|
||||
transparent = transparent,
|
||||
|
||||
styles = {
|
||||
comments = { italic = false },
|
||||
keywords = { italic = false },
|
||||
sidebars = transparent and "transparent" or "dark",
|
||||
floats = transparent and "transparent" or "dark",
|
||||
},
|
||||
on_colors = function(colors)
|
||||
colors.bg = transparent and colors.none or bg
|
||||
colors.bg_dark = transparent and colors.none or bg_dark
|
||||
colors.bg_float = transparent and colors.none or bg_dark
|
||||
colors.bg_highlight = bg_highlight
|
||||
colors.bg_popup = bg_dark
|
||||
colors.bg_search = bg_search
|
||||
colors.bg_sidebar = transparent and colors.none or bg_dark
|
||||
colors.bg_statusline = transparent and colors.none or bg_dark
|
||||
colors.bg_visual = bg_visual
|
||||
colors.border = border
|
||||
colors.fg = fg
|
||||
colors.fg_dark = fg_dark
|
||||
colors.fg_float = fg
|
||||
colors.fg_gutter = fg_gutter
|
||||
colors.fg_sidebar = fg_dark
|
||||
end,
|
||||
})
|
||||
-- vim.cmd("colorscheme tokyonight")
|
||||
-- NOTE: Auto switch to tokyonight for markdown files only
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = { "markdown" },
|
||||
-- callback = function()
|
||||
-- -- Ensure the theme switch only happens once for a buffer
|
||||
-- local buffer = vim.api.nvim_get_current_buf()
|
||||
-- if not vim.b[buffer].tokyonight_applied then
|
||||
-- if vim.fn.expand("%:t") ~= "" and vim.api.nvim_buf_get_option(0, "buftype") ~= "nofile" then
|
||||
-- vim.cmd("colorscheme tokyonight")
|
||||
-- end
|
||||
-- vim.b[buffer].tokyonight_applied = true
|
||||
-- end
|
||||
-- end,
|
||||
-- })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
34
lua/themenacesauce/plugins/harpoon.lua
Normal file
34
lua/themenacesauce/plugins/harpoon.lua
Normal file
@ -0,0 +1,34 @@
|
||||
return {
|
||||
"thePrimeagen/harpoon",
|
||||
enabled = true,
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
harpoon:setup({
|
||||
global_settings = {
|
||||
save_on_toggle = true,
|
||||
save_on_change = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Harpoon Nav Interface
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end, { desc = "Harpoon add files" })
|
||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
-- Harpoon marked files
|
||||
vim.keymap.set("n", "<C-y>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<C-i>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||
end
|
||||
|
||||
}
|
||||
3
lua/themenacesauce/plugins/init.lua
Normal file
3
lua/themenacesauce/plugins/init.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"nvim.lua/plenary.nvim",
|
||||
}
|
||||
94
lua/themenacesauce/plugins/lualine.lua
Normal file
94
lua/themenacesauce/plugins/lualine.lua
Normal file
@ -0,0 +1,94 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local lualine = require("lualine")
|
||||
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
||||
|
||||
local colors = {
|
||||
color0 = "#092236",
|
||||
color1 = "#ff5874",
|
||||
color2 = "#c3ccdc",
|
||||
color3 = "#1c1e26",
|
||||
color6 = "#a1aab8",
|
||||
color7 = "#828697",
|
||||
color8 = "#ae81ff",
|
||||
}
|
||||
|
||||
local my_lualine_theme = {
|
||||
replace = {
|
||||
a = { fg = colors.color0, bg = colors.color1, gui = "bold" },
|
||||
b = { fg = colors.color2, bg = colors.color3 },
|
||||
},
|
||||
inactive = {
|
||||
a = { fg = colors.color6, bg = colors.color3, gui = "bold" },
|
||||
b = { fg = colors.color6, bg = colors.color3 },
|
||||
c = { fg = colors.color6, bg = colors.color3 },
|
||||
},
|
||||
normal = {
|
||||
a = { fg = colors.color0, bg = colors.color7, gui = "bold" },
|
||||
b = { fg = colors.color2, bg = colors.color3 },
|
||||
c = { fg = colors.color2, bg = colors.color3 },
|
||||
},
|
||||
visual = {
|
||||
a = { fg = colors.color0, bg = colors.color8, gui = "bold" },
|
||||
b = { fg = colors.color2, bg = colors.color3 },
|
||||
},
|
||||
insert = {
|
||||
a = { fg = colors.color0, bg = colors.color2, gui = "bold" },
|
||||
b = { fg = colors.color2, bg = colors.color3 },
|
||||
},
|
||||
}
|
||||
|
||||
local mode = {
|
||||
'mode',
|
||||
fmt = function(str)
|
||||
-- return ' '
|
||||
-- displays only the first character of the mode
|
||||
return ' ' .. str
|
||||
end,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
'diff',
|
||||
colored = true,
|
||||
symbols = { added = ' ', modified = ' ', removed = ' ' }, -- changes diff symbols
|
||||
-- cond = hide_in_width,
|
||||
}
|
||||
|
||||
local filename = {
|
||||
'filename',
|
||||
file_status = true,
|
||||
path = 0,
|
||||
}
|
||||
|
||||
local branch = {'branch', icon = {'', color={fg='#A6D4DE'}}, '|'}
|
||||
|
||||
|
||||
lualine.setup({
|
||||
icons_enabled = true,
|
||||
options = {
|
||||
theme = my_lualine_theme,
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "|", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { branch },
|
||||
lualine_c = { diff, filename },
|
||||
lualine_x = {
|
||||
{
|
||||
-- require("noice").api.statusline.mode.get,
|
||||
-- cond = require("noice").api.statusline.mode.has,
|
||||
lazy_status.updates,
|
||||
cond = lazy_status.has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
-- { "encoding",},
|
||||
-- { "fileformat" },
|
||||
{ "filetype" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
119
lua/themenacesauce/plugins/mini.lua
Normal file
119
lua/themenacesauce/plugins/mini.lua
Normal file
@ -0,0 +1,119 @@
|
||||
return {
|
||||
-- Mini Nvim
|
||||
{"echasnovski/mini.nvim", version = false },
|
||||
|
||||
{
|
||||
'echasnovski/mini.comment',
|
||||
version = false,
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
config = function()
|
||||
--disable the autocommand from ts-context-commentstring
|
||||
require('ts_context_commentstring').setup {
|
||||
enable_autocmd = false,
|
||||
}
|
||||
require("mini.comment").setup {
|
||||
--tsx, jsx, html, svelte comment support
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require('ts_context_commentstring.internal').calculate_commentstring({ key =
|
||||
'commentstring' })
|
||||
or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- File Explorer (works wil Oil File Explorer)
|
||||
{
|
||||
'echasnovski/mini.files',
|
||||
config = function()
|
||||
local MiniFiles = require("mini.files")
|
||||
MiniFiles.setup({
|
||||
mappings = {
|
||||
go_in = "<CR>", -- Map both Enter and L to enter directories or open files
|
||||
go_in_plus = "L", --Open
|
||||
go_out = "-", --Previous folder
|
||||
go_out_plus = "H", --Close folder
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>ee", "<cmd>lua MiniFiles.open()<CR>", { desc = "Toggle mini file explorer" }) -- toggle file explorer
|
||||
vim.keymap.set("n", "<leader>ef", function()
|
||||
MiniFiles.open(vim.api.nvim_buf_get_name(0), false)
|
||||
MiniFiles.reveal_cwd()
|
||||
end, { desc = "Toggle into currently opened file" })
|
||||
end
|
||||
},
|
||||
{
|
||||
'echasnovski/mini.surround',
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
custom_surroundings = nil,
|
||||
|
||||
highlight_duration = 300,
|
||||
|
||||
-- INFO:
|
||||
--saiw surround with no whitespace
|
||||
--saw surround with whitespace
|
||||
mappings = {
|
||||
add = 'sa',
|
||||
delete = 'ds',
|
||||
find = 'sf',
|
||||
find_left = 'sF',
|
||||
highlight = 'sh',
|
||||
replace = 'sr',
|
||||
update_n_lines = 'sn',
|
||||
|
||||
suffix_last = 'l', -- Suffix to search with "previous" method
|
||||
suffix_next = 'n', -- Suffix to search with "next" method
|
||||
},
|
||||
|
||||
n_lines = 20,
|
||||
|
||||
respect_selection_type = false,
|
||||
|
||||
|
||||
search_method = 'cover',
|
||||
|
||||
silent = false,
|
||||
},
|
||||
|
||||
-- Get rid of whitespace
|
||||
{
|
||||
"echasnovski/mini.trailspace",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = function()
|
||||
local miniTrailspace = require("mini.trailspace")
|
||||
|
||||
miniTrailspace.setup({
|
||||
only_in_normal_buffers = true,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>cw", function() minTrailspace.trim() end, { desc = "Erase Whitespace" })
|
||||
|
||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("mini.trailspace").unhighlight()
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.splitjoin",
|
||||
config = function()
|
||||
local miniSplitJoin = require("mini.splitjoin")
|
||||
|
||||
miniSplitJoin.setup({
|
||||
mappings = { toggle = ""},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "x", }, "sj", function() miniSplitJoin.join() end, { desc = "Join arguments" })
|
||||
vim.keymap.set({ "n", "x", }, "sk", function() miniSplitJoin.split() end, { desc = "Split arguments"})
|
||||
end,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
lua/themenacesauce/plugins/oil.lua
Normal file
33
lua/themenacesauce/plugins/oil.lua
Normal file
@ -0,0 +1,33 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = {"nvim-tree/nvim-web-devicons"},
|
||||
config = function()
|
||||
require("oil").setup({
|
||||
default_file_explorer = true, -- starts up nvim with oil as the default explorer instead of netrw,
|
||||
columns = { },
|
||||
keymaps = {
|
||||
["<C-h>"] = false,
|
||||
["<C-c>"] = false, -- Ctrl c will not exit
|
||||
["<M-h>"] = "action.select.split", -- Alt h to split window
|
||||
["q"] = "actions.close",
|
||||
},
|
||||
delete_to_trash = true,
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
},
|
||||
skip_confirm_for_simple_edits = true,
|
||||
})
|
||||
|
||||
--keymaps for oil
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) -- opens parent dir over current active window
|
||||
vim.keymap.set("n", "<leader>-", require("oil").toggle_float, { desc = "toggle float oil" }) -- opens parent directory over current active window
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "oil",
|
||||
callback = function()
|
||||
vim.opt_local.cursorline = true
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
}
|
||||
175
lua/themenacesauce/plugins/snacks.lua
Normal file
175
lua/themenacesauce/plugins/snacks.lua
Normal file
@ -0,0 +1,175 @@
|
||||
return {
|
||||
-- HACK: docs @ https://github.com/folke/snacks.nvim/blob/main/docs
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
-- NOTE: Options
|
||||
opts = {
|
||||
styles = {
|
||||
input = {
|
||||
keys = {
|
||||
n_esc = { "<C-c>", { "cmp_close", "cancel" }, mode = "n", expr = true },
|
||||
i_esc = { "<C-c>", { "cmp_close", "stopinsert" }, mode = "i", expr = true },
|
||||
},
|
||||
}
|
||||
},
|
||||
-- Snacks Modules
|
||||
input = {
|
||||
enabled = true,
|
||||
},
|
||||
quickfile = {
|
||||
enabled = true,
|
||||
exclude = { "latex" },
|
||||
},
|
||||
-- HACK: read picker docs @ https://github.com/folke/snacks.nvim/blob/main/docs/picker.md
|
||||
picker = {
|
||||
enabled = true,
|
||||
matchers = {
|
||||
frecency = true,
|
||||
cwd_bonus = false,
|
||||
},
|
||||
exclude = {
|
||||
".git",
|
||||
"node_modules",
|
||||
"dist",
|
||||
"build",
|
||||
},
|
||||
formatters = {
|
||||
file = {
|
||||
filename_first = true,
|
||||
filename_only = false,
|
||||
icon_width = 2,
|
||||
},
|
||||
},
|
||||
layout = {
|
||||
-- presets options : "default" , "ivy" , "ivy-split" , "telescope" , "vscode", "select" , "sidebar"
|
||||
-- override picker layout in keymaps function as a param below
|
||||
preset = "telescope", -- defaults to this layout unless overidden
|
||||
cycle = false,
|
||||
},
|
||||
layouts = {
|
||||
select = {
|
||||
preview = false,
|
||||
layout = {
|
||||
backdrop = false,
|
||||
width = 0.6,
|
||||
min_width = 80,
|
||||
height = 0.4,
|
||||
min_height = 10,
|
||||
box = "vertical",
|
||||
border = "rounded",
|
||||
title = "{title}",
|
||||
title_pos = "center",
|
||||
{ win = "input", height = 1, border = "bottom" },
|
||||
{ win = "list", border = "none" },
|
||||
{ win = "preview", title = "{preview}", width = 0.6, height = 0.4, border = "top" },
|
||||
}
|
||||
},
|
||||
telescope = {
|
||||
reverse = true, -- set to false for search bar to be on top
|
||||
layout = {
|
||||
box = "horizontal",
|
||||
backdrop = false,
|
||||
width = 0.8,
|
||||
height = 0.9,
|
||||
border = "none",
|
||||
{
|
||||
box = "vertical",
|
||||
{ win = "list", title = " Results ", title_pos = "center", border = "rounded" },
|
||||
{ win = "input", height = 1, border = "rounded", title = "{title} {live} {flags}", title_pos = "center" },
|
||||
},
|
||||
{
|
||||
win = "preview",
|
||||
title = "{preview:Preview}",
|
||||
width = 0.50,
|
||||
border = "rounded",
|
||||
title_pos = "center",
|
||||
},
|
||||
},
|
||||
},
|
||||
ivy = {
|
||||
layout = {
|
||||
box = "vertical",
|
||||
backdrop = false,
|
||||
width = 0,
|
||||
height = 0.4,
|
||||
position = "bottom",
|
||||
border = "top",
|
||||
title = " {title} {live} {flags}",
|
||||
title_pos = "left",
|
||||
{ win = "input", height = 1, border = "bottom" },
|
||||
{
|
||||
box = "horizontal",
|
||||
{ win = "list", border = "none" },
|
||||
{ win = "preview", title = "{preview}", width = 0.5, border = "left" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
image = {
|
||||
enabled = function()
|
||||
return vim.bo.filetype == "markdown"
|
||||
end,
|
||||
doc = {
|
||||
float = false, -- show image on cursor hover
|
||||
inline = false, -- show image inline
|
||||
max_width = 50,
|
||||
max_height = 30,
|
||||
wo = {
|
||||
wrap = false,
|
||||
},
|
||||
},
|
||||
convert = {
|
||||
notify = true,
|
||||
command = "magick"
|
||||
},
|
||||
img_dirs = { "img", "images", "assets", "static", "public", "media", "attachments","Archives/All-Vault-Images/", "~/Library", "~/Downloads" },
|
||||
},
|
||||
dashboard = {
|
||||
enabled = true,
|
||||
sections = {
|
||||
{ section = "header" },
|
||||
{ section = "keys", gap = 1, padding = 1 },
|
||||
{ section = "startup" },
|
||||
{
|
||||
section = "terminal",
|
||||
cmd = "ascii-image-converter ~/Pictures/imagesForLinux/Pfp.png -C -c",
|
||||
random = 15,
|
||||
pane = 2,
|
||||
indent = 15,
|
||||
height = 30,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>lg", function() require("snacks").lazygit() end, desc = "Lazygit" },
|
||||
{ "<leader>gl", function() require("snacks").lazygit.log() end, desc = "Lazygit Logs" },
|
||||
-- { "<leader>es", function() require("snacks").explorer() end, desc = "Open Snacks Explorer" },
|
||||
{ "<leader>rN", function() require("snacks").rename.rename_file() end, desc = "Fast Rename Current File" },
|
||||
{ "<leader>dB", function() require("snacks").bufdelete() end, desc = "Delete or Close Buffer (Confirm)" },
|
||||
|
||||
-- Snacks Picker
|
||||
{ "<leader>pf", function() require("snacks").picker.files() end, desc = "Find Files (Snacks Picker)" },
|
||||
{ "<leader>pc", function() require("snacks").picker.files({cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
|
||||
{ "<leader>ps", function() require("snacks").picker.grep() end, desc = "Grep word" },
|
||||
{ "<leader>pws", function() require("snacks").picker.grep_word() end, desc = "Search Visual Selection or Word", mode = {"n", "x" } },
|
||||
{ "<leader>pk", function() require("snacks").picker.keymaps({ layout = "ivy" }) end, desc = "Search Keymaps (Snacks Picker)" },
|
||||
|
||||
{ "<leader>gbr", function() require("snacks").picker.git_branches({ layout = "select" }) end, desc = "Pick and Switch Git Branches" },
|
||||
{ "<leader>th", function() require("snacks").picker.colorschemes({ layout = "ivy" }) end, desc = "Pick Color Schemes"},
|
||||
{ "<leader>vh", function() require("snacks").picker.help() end, desc = "Help Pages" },
|
||||
}
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = { "BufReadPre", "BufNewFile"},
|
||||
keys = {
|
||||
{ "<leader>pt", function() require("snacks").picker.todo_comments() end, desc = "Todo" },
|
||||
{ "<leader>pT", function() require("snacks").picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
51
lua/themenacesauce/plugins/telescope.lua
Normal file
51
lua/themenacesauce/plugins/telescope.lua
Normal file
@ -0,0 +1,51 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"andrew-george/telescope-themes",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("themes")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
path_display = { "smart" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
themes = {
|
||||
enable_previewer = true,
|
||||
enable_live_preview = true,
|
||||
persist = {
|
||||
enabled = true,
|
||||
path = vim.fn.stdpath("config") .. "/lua/colorscheme.lua",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<leader>pr", "<cmd>Telescope oldfiles<CR>", { desc = "Fuzzy find recent files" })
|
||||
vim.keymap.set("n", "<leader>pWs", function()
|
||||
local word = vim.fn.expand("<cWORD>")
|
||||
builtin.grep_string({ search = word })
|
||||
end, { desc = "Find Connected Words under cursor" })
|
||||
|
||||
vim.keymap.set("n", "<leader>ths", "<cmd>Telescope themes<CR>", { noremap = true, silent = true, desc = "Theme Switcher" })
|
||||
|
||||
end,
|
||||
}
|
||||
61
lua/themenacesauce/plugins/todo-comments.lua
Normal file
61
lua/themenacesauce/plugins/todo-comments.lua
Normal file
@ -0,0 +1,61 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "nvim-lua/plenary.nvim"},
|
||||
config = function()
|
||||
local todo_comments = require("todo-comments")
|
||||
|
||||
todo_comments.setup({
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
TODO = { icon = " ", color = "info" , alt = {"Personal"} },
|
||||
HACK = { icon = " ", color = "warning", alt = { "DON SKIP" } },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO", "READ", "COLORS", "Custom" } },
|
||||
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||
FORGETNOT = { icon = " ", color = "hint" },
|
||||
},
|
||||
-- Patterns for hl markdown support
|
||||
highlight = {
|
||||
multiline = true,
|
||||
multiline_pattern = "^.",
|
||||
multiline_context = 10,
|
||||
before = "",
|
||||
keyword = "wide",
|
||||
after = "fg",
|
||||
pattern = {
|
||||
[[.*<(KEYWORDS)\s*:]], -- default pattern
|
||||
[[<!--\s*(KEYWORDS)\s*:.*-->]], -- HTML comments with colon
|
||||
[[<!--\s*(KEYWORDS)\s*.*-->]], -- HTML comments without colon
|
||||
},
|
||||
comments_only = false, -- highlighting outside of comments
|
||||
},
|
||||
search = {
|
||||
command = "rg",
|
||||
args = {
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
},
|
||||
pattern = [[\b(KEYWORDS)\b]],
|
||||
},
|
||||
})
|
||||
|
||||
-- keymaps
|
||||
vim.keymap.set("n", "]t", function()
|
||||
todo_comments.jump_next()
|
||||
end, { desc = "Next todo comment" })
|
||||
|
||||
vim.keymap.set("n", "[t", function()
|
||||
todo_comments.jump_prev()
|
||||
end, { desc = "Previous todo comment" })
|
||||
end,
|
||||
}
|
||||
91
lua/themenacesauce/plugins/treesitter.lua
Normal file
91
lua/themenacesauce/plugins/treesitter.lua
Normal file
@ -0,0 +1,91 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require("nvim-treesitter")
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup({ -- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
|
||||
-- ensure these languages parsers are installed
|
||||
ensure_installed = {
|
||||
"json",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"go",
|
||||
"yaml",
|
||||
"html",
|
||||
"css",
|
||||
"python",
|
||||
"http",
|
||||
"prisma",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"svelte",
|
||||
"graphql",
|
||||
"bash",
|
||||
"lua",
|
||||
"vim",
|
||||
"dockerfile",
|
||||
"gitignore",
|
||||
"query",
|
||||
"vimdoc",
|
||||
"c",
|
||||
"java",
|
||||
"rust",
|
||||
"ron",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
-- scope_incremental = false,
|
||||
node_decremental = "<C-backspace>",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- force start treesitter for all filetypes
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
pcall(vim.treesitter.start)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- NOTE: js,ts,jsx,tsx Auto Close Tags
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
enabled = true,
|
||||
ft = { "html", "xml", "javascript", "typescript", "javascriptreact", "typescriptreact", "svelte" },
|
||||
config = function()
|
||||
-- Independent nvim-ts-autotag setup
|
||||
require("nvim-ts-autotag").setup({
|
||||
opts = {
|
||||
enable_close = true, -- Auto-close tags
|
||||
enable_rename = true, -- Auto-rename pairs
|
||||
enable_close_on_slash = false, -- Disable auto-close on trailing `</`
|
||||
},
|
||||
per_filetype = {
|
||||
["html"] = {
|
||||
enable_close = true, -- Disable auto-closing for HTML
|
||||
},
|
||||
["typescriptreact"] = {
|
||||
enable_close = true, -- Explicitly enable auto-closing (optional, defaults to `true`)
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
22
lua/themenacesauce/plugins/trouble.lua
Normal file
22
lua/themenacesauce/plugins/trouble.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"folke/todo-comments.nvim"
|
||||
},
|
||||
opts = {
|
||||
focus = true,
|
||||
},
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{ "<leader>xw", "<cmd>Trouble diagnostics toggle<CR>", desc = "Open trouble workspace diagnostics" },
|
||||
{
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<CR>",
|
||||
desc = "Open trouble document diagnostics",
|
||||
},
|
||||
{ "<leader>xq", "<cmd>Trouble quickfix toggle<CR>", desc = "Open trouble quickfix list" },
|
||||
{ "<leader>xl", "<cmd>Trouble loclist toggle<CR>", desc = "Open trouble location list" },
|
||||
{ "<leader>xt", "<cmd>Trouble todo toggle<CR>", desc = "Open todos in trouble" },
|
||||
},
|
||||
}
|
||||
6
lua/themenacesauce/plugins/undotree.lua
Normal file
6
lua/themenacesauce/plugins/undotree.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
end,
|
||||
}
|
||||
7
lua/themenacesauce/plugins/vimbegood.lua
Normal file
7
lua/themenacesauce/plugins/vimbegood.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"thePrimeagen/vim-be-good",
|
||||
cmd = "VimBeGood",
|
||||
config = function()
|
||||
require("VimBeGood").setup {}
|
||||
end,
|
||||
}
|
||||
19
lua/themenacesauce/plugins/vimtmuxnavigator.lua
Normal file
19
lua/themenacesauce/plugins/vimtmuxnavigator.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user