bye chezmoi, new custom nvim setup
This commit is contained in:
parent
ffa9bdd2ec
commit
3d83403358
121 changed files with 786 additions and 132 deletions
|
@ -1,7 +1,6 @@
|
||||||
# Gaiety's Dotfiles
|
# Gaiety's Dotfiles
|
||||||
|
|
||||||
Designed for Unix Systems.
|
Designed for Unix Systems.
|
||||||
Do not clone this repo manually! It's the last step via chezmoi
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
@ -16,5 +15,4 @@ Misc dependencies: `git, curl`
|
||||||
mkdir -p ~/.config/mise
|
mkdir -p ~/.config/mise
|
||||||
curl https://git.gay/gaiety/dotfiles/raw/branch/main/dot_config/mise/config.toml -o ~/.config/mise/config.toml
|
curl https://git.gay/gaiety/dotfiles/raw/branch/main/dot_config/mise/config.toml -o ~/.config/mise/config.toml
|
||||||
mise install
|
mise install
|
||||||
chezmoi init --apply git@git.gay:gaiety/dotfiles.git
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
require("config.lazy")
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
"LazyVim": { "branch": "main", "commit": "3dbace941ee935c89c73fd774267043d12f57fe2" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" },
|
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
|
||||||
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
|
|
||||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" },
|
|
||||||
"grug-far.nvim": { "branch": "main", "commit": "8058c2366f21af6f446d8e0f9333ae7c22f7679a" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
|
||||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
|
||||||
"mini.ai": { "branch": "main", "commit": "a9b992b13d22a8db8df6beac25afa59a10b5584d" },
|
|
||||||
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
|
|
||||||
"mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" },
|
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
|
||||||
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "3ad562700d0615818bf358268ac8914f6ce2b079" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
|
||||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "749df308870381979dc098063973f6ace9968ef6" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3a3c6244553f13fdd92d312c82722b57ce6c4bec" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
|
||||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
|
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" },
|
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "4b386e66a9599057587c30538d5e6192e3d1c181" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"extras": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"news": {
|
|
||||||
"NEWS.md": "6520"
|
|
||||||
},
|
|
||||||
"version": 6
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
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)
|
|
||||||
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- add LazyVim and import its plugins
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
|
||||||
-- import/override with your plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
|
||||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
|
||||||
lazy = false,
|
|
||||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
|
||||||
-- have outdated releases, which may break your Neovim install.
|
|
||||||
version = false, -- always use the latest git commit
|
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
|
||||||
},
|
|
||||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
|
||||||
checker = {
|
|
||||||
enabled = true, -- check for plugin updates periodically
|
|
||||||
notify = false, -- notify on update
|
|
||||||
}, -- automatically check for plugin updates
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
-- disable some rtp plugins
|
|
||||||
disabled_plugins = {
|
|
||||||
"gzip",
|
|
||||||
-- "matchit",
|
|
||||||
-- "matchparen",
|
|
||||||
-- "netrwPlugin",
|
|
||||||
"tarPlugin",
|
|
||||||
"tohtml",
|
|
||||||
"tutor",
|
|
||||||
"zipPlugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
return {
|
|
||||||
-- add gruvbox
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
priority = 1000,
|
|
||||||
opts = {
|
|
||||||
flavour = "mocha",
|
|
||||||
transparent_background = true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Configure LazyVim to load catppuccin
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "catppuccin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
38
nvim/init.lua
Normal file
38
nvim/init.lua
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
-- 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
|
||||||
|
-- load plugins
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = { import = "plugins" },
|
||||||
|
}, lazy_defaults, {
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
||||||
|
|
||||||
|
require "config/options"
|
||||||
|
require "config/keys"
|
||||||
|
require "config/autocmds"
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
-- require "mappings"
|
||||||
|
end)
|
50
nvim/lazy-lock.json
Normal file
50
nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "a35468cd72645dbd52c0624ceead5f301c566dff" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"codestats.nvim": { "branch": "master", "commit": "041b315c4f82997186fcdb3fc2f687cc128a28f3" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
|
"hlargs.nvim": { "branch": "main", "commit": "752927d9ebf753802bd4788e53c67a21b8e255cc" },
|
||||||
|
"inc-rename.nvim": { "branch": "main", "commit": "a3e31af13844534c66041ce92f29af7745883875" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
|
"lazy-lsp.nvim": { "branch": "master", "commit": "15019ce6111ea3a13531b14820c430116de3048d" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lsp-format.nvim": { "branch": "master", "commit": "42d1d3e407c846d95f84ea3767e72ed6e08f7495" },
|
||||||
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
||||||
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||||
|
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||||
|
"notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-cokeline": { "branch": "main", "commit": "9fbed130683b7b6f73198c09e35ba4b33f547c08" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "7ad4a11cc5742774877c529fcfb2702f7caf75e4" },
|
||||||
|
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
|
||||||
|
"nvim-spider": { "branch": "main", "commit": "99df646eab60df0b948dd2532ef5f5512707a9a4" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-treesitter-endwise": { "branch": "master", "commit": "d6cbb83307d516ec076d17c9a33d704ef626ee8c" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
|
||||||
|
"resession.nvim": { "branch": "master", "commit": "84c81e5fd8a94dc85a60b97089536174e558e288" },
|
||||||
|
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
|
||||||
|
"smear-cursor.nvim": { "branch": "main", "commit": "aff844fc1483fd673f721a41affcd7e2fcb885f5" },
|
||||||
|
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||||
|
"switch.vim": { "branch": "main", "commit": "14b28ec7bba51c734084bab5f73aef1883fb3786" },
|
||||||
|
"symbols.nvim": { "branch": "main", "commit": "62cd4236b3eeabf3b970f225b1cc3379e11dc99c" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
|
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
|
}
|
17
nvim/lua/config/autocmds.lua
Normal file
17
nvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
local augroup = vim.api.nvim_create_augroup -- Create/get autocommand group
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
|
||||||
|
|
||||||
|
-- Remove whitespace on save
|
||||||
|
autocmd('BufWritePost', {
|
||||||
|
pattern = '',
|
||||||
|
command = "lua vim.notify('Save Successful')"
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Highlight on yank
|
||||||
|
augroup('YankHighlight', { clear = true })
|
||||||
|
autocmd('TextYankPost', {
|
||||||
|
group = 'YankHighlight',
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '1000' })
|
||||||
|
end
|
||||||
|
})
|
32
nvim/lua/config/keys.lua
Normal file
32
nvim/lua/config/keys.lua
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
map('n', '<S-Tab>', '<Cmd>bp<CR>', opts)
|
||||||
|
map('n', '<Tab>', '<Cmd>bn<CR>', opts)
|
||||||
|
map('n', '<[b>', '<Cmd>bp<CR>', opts)
|
||||||
|
map('n', '<]b>', '<Cmd>bn<CR>', opts)
|
||||||
|
map('n', '<leader>w', '<Cmd>bd<CR>', opts)
|
||||||
|
map('n', '<leader>s', '<Cmd>w<CR>', opts)
|
||||||
|
map('n', '<leader>S', '<Cmd>w!<CR>', opts)
|
||||||
|
map('n', '<Enter>', 'za<CR>', opts)
|
||||||
|
map('n', '`', '<Cmd>Neotree toggle<CR>', opts)
|
||||||
|
map('n', '~', '<Cmd>SymbolsToggle<CR>', opts)
|
||||||
|
map('n', '<leader>e', '<Cmd>Neotree toggle<CR>', opts)
|
||||||
|
map('n', '<leader>ff', "<Cmd>Telescope live_grep<CR>", opts)
|
||||||
|
map('n', '<leader>fq', "<Cmd>Telescope quickfix<CR>", opts)
|
||||||
|
map('n', '<leader>fr', "<Cmd>Telescope registers<CR>", opts)
|
||||||
|
map('n', '<leader>f/', "<Cmd>Telescope current_buffer_fuzzy_find<CR>", opts)
|
||||||
|
map('n', '<leader>flr', "<Cmd>Telescope lsp_references<CR>", opts)
|
||||||
|
map('n', '<leader>fls', "<Cmd>Telescope treesitter<CR>", opts)
|
||||||
|
map('n', '<leader>fld', "<Cmd>Telescope diagnostics<CR>", opts)
|
||||||
|
map('n', '<leader>fgs', "<Cmd>Telescope git_status<CR>", opts)
|
||||||
|
map('n', '<leader>fgb', "<Cmd>Telescope git_branches<CR>", opts)
|
||||||
|
map('n', '<leader>fgc', "<Cmd>Telescope git_commits<CR>", opts)
|
||||||
|
map('n', '<leader>fgC', "<Cmd>Telescope git_bcommits<CR>", opts)
|
||||||
|
map('n', '<leader>t', "<Cmd>Switch<CR>", opts)
|
||||||
|
map('n', '<leader>r', "<Cmd>Spectre<CR>", opts)
|
||||||
|
map('n', '<Up>', "<C-a>", opts)
|
||||||
|
map('n', '<Down>', "<C-x>", opts)
|
||||||
|
map('n', '<Right>', "<Cmd>Switch<CR>", opts)
|
||||||
|
map('n', '<Left>', "<Cmd>Switch<CR>", opts)
|
||||||
|
map('n', '<leader>r', ":IncRename ", opts)
|
43
nvim/lua/config/options.lua
Normal file
43
nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
-- This file is automatically loaded by plugins.core
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- LazyVim auto format
|
||||||
|
vim.g.autoformat = true
|
||||||
|
|
||||||
|
-- Use pretty notifications
|
||||||
|
vim.notify = require("notify")
|
||||||
|
|
||||||
|
-- Set Theme
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
|
||||||
|
-- Set Misc Options
|
||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
opt.cursorline = true -- Enable highlighting of the current line
|
||||||
|
opt.autoindent = true
|
||||||
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
|
opt.shiftwidth = 2 -- Size of an indent
|
||||||
|
opt.tabstop = 2 -- Size of an indent
|
||||||
|
opt.linebreak = true -- Wrap lines at convenient points
|
||||||
|
opt.list = true -- Show some invisible characters (tabs...
|
||||||
|
-- opt.mouse = false
|
||||||
|
opt.number = true -- Print line number
|
||||||
|
opt.relativenumber = true -- Relative line numbers
|
||||||
|
opt.ruler = false -- Disable the default ruler
|
||||||
|
opt.scrolloff = 4 -- Lines of context
|
||||||
|
opt.sidescrolloff = 8 -- Columns of context
|
||||||
|
opt.spelllang = { "en" }
|
||||||
|
opt.showmode = false -- Dont show mode since we have a statusline
|
||||||
|
opt.termguicolors = true -- True color support
|
||||||
|
opt.undofile = true
|
||||||
|
opt.undolevels = 10000
|
||||||
|
opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode
|
||||||
|
opt.wrap = false -- Disable line wrap
|
||||||
|
opt.signcolumn = "yes"
|
||||||
|
opt.foldcolumn = "0"
|
||||||
|
opt.foldlevel = 99
|
||||||
|
opt.foldlevelstart = 99
|
||||||
|
opt.foldmethod = "expr"
|
||||||
|
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
opt.foldenable = true
|
3
nvim/lua/plugins/adjust.lua
Normal file
3
nvim/lua/plugins/adjust.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
"AndrewRadev/switch.vim"
|
||||||
|
}
|
17
nvim/lua/plugins/codestats.lua
Normal file
17
nvim/lua/plugins/codestats.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
"liljaylj/codestats.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
event = { "TextChanged", "InsertEnter" },
|
||||||
|
cmd = { "CodeStatsXpSend", "CodeStatsProfileUpdate" },
|
||||||
|
config = function()
|
||||||
|
require("codestats").setup({
|
||||||
|
username = "gaiety", -- needed to fetch profile data
|
||||||
|
base_url = "https://codestats.net", -- codestats.net base url
|
||||||
|
api_key = "SFMyNTY.WjJGcFpYUjUjI01qSXhPVFU9.fMtCrS4QvdQKCgS_pasnqpWGUyrk3At646kPkN7LIn8",
|
||||||
|
send_on_exit = true, -- send xp on nvim exit
|
||||||
|
send_on_timer = true, -- send xp on timer
|
||||||
|
timer_interval = 60000, -- timer interval in milliseconds (minimum 1000ms to prevent DDoSing codestat.net servers)
|
||||||
|
curl_timeout = 5, -- curl request timeout in seconds
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
9
nvim/lua/plugins/colorize.lua
Normal file
9
nvim/lua/plugins/colorize.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
"catgoose/nvim-colorizer.lua",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = { -- set to setup table
|
||||||
|
mode = "virtualtext",
|
||||||
|
virtualtext = "■",
|
||||||
|
virtualtext_inline = true,
|
||||||
|
},
|
||||||
|
}
|
51
nvim/lua/plugins/completion.lua
Normal file
51
nvim/lua/plugins/completion.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
config = function()
|
||||||
|
require('nvim-ts-autotag').setup({
|
||||||
|
opts = {
|
||||||
|
enable_close = true, -- Auto close tags
|
||||||
|
enable_rename = true, -- Auto rename pairs of tags
|
||||||
|
enable_close_on_slash = true -- Auto close on trailing </
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
|
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(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' }, -- For luasnip users.
|
||||||
|
}, {
|
||||||
|
{ name = 'buffer' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
dependencies = {
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
15
nvim/lua/plugins/dash.lua
Normal file
15
nvim/lua/plugins/dash.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
-- dependencies = { 'echasnovski/mini.icons' },
|
||||||
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
|
config = function()
|
||||||
|
local startify = require("alpha.themes.startify")
|
||||||
|
-- available: devicons, mini, default is mini
|
||||||
|
-- if provider not loaded and enabled is true, it will try to use another provider
|
||||||
|
startify.file_icons.provider = "devicons"
|
||||||
|
require("alpha").setup(
|
||||||
|
startify.config
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
46
nvim/lua/plugins/filefinder.lua
Normal file
46
nvim/lua/plugins/filefinder.lua
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
tag = '0.1.8',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
config = function()
|
||||||
|
-- You dont need to set any of these options. These are the default ones. Only
|
||||||
|
-- the loading is important
|
||||||
|
require('telescope').setup {
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
override_generic_sorter = true, -- override the generic sorter
|
||||||
|
override_file_sorter = true, -- override the file sorter
|
||||||
|
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||||
|
-- the default case_mode is "smart_case"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-- To get fzf loaded and working with telescope, you need to call
|
||||||
|
-- load_extension, somewhere after setup function:
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"danielfalk/smart-open.nvim",
|
||||||
|
branch = "0.2.x",
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("smart_open")
|
||||||
|
vim.keymap.set("n", "<leader><leader>", function()
|
||||||
|
require("telescope").extensions.smart_open.smart_open()
|
||||||
|
end, { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"kkharji/sqlite.lua",
|
||||||
|
-- Only required if using match_algorithm fzf
|
||||||
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
|
-- Optional. If installed, native fzy will be used when match_algorithm is fzy
|
||||||
|
{ "nvim-telescope/telescope-fzy-native.nvim" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
42
nvim/lua/plugins/folding.lua
Normal file
42
nvim/lua/plugins/folding.lua
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||||
|
local newVirtText = {}
|
||||||
|
local suffix = (' %d '):format(endLnum - lnum)
|
||||||
|
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||||
|
local targetWidth = width - sufWidth
|
||||||
|
local curWidth = 0
|
||||||
|
for _, chunk in ipairs(virtText) do
|
||||||
|
local chunkText = chunk[1]
|
||||||
|
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
if targetWidth > curWidth + chunkWidth then
|
||||||
|
table.insert(newVirtText, chunk)
|
||||||
|
else
|
||||||
|
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||||
|
local hlGroup = chunk[2]
|
||||||
|
table.insert(newVirtText, { chunkText, hlGroup })
|
||||||
|
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||||
|
if curWidth + chunkWidth < targetWidth then
|
||||||
|
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
curWidth = curWidth + chunkWidth
|
||||||
|
end
|
||||||
|
table.insert(newVirtText, { suffix, 'MoreMsg' })
|
||||||
|
return newVirtText
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"kevinhwang91/nvim-ufo",
|
||||||
|
dependencies = {
|
||||||
|
"kevinhwang91/promise-async",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('ufo').setup({
|
||||||
|
fold_virt_text_handler = handler,
|
||||||
|
provider_selector = function(_bufnr, _filetype, _buftype)
|
||||||
|
return { 'treesitter', 'indent' }
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
3
nvim/lua/plugins/illuminate.lua
Normal file
3
nvim/lua/plugins/illuminate.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
}
|
40
nvim/lua/plugins/indentguide.lua
Normal file
40
nvim/lua/plugins/indentguide.lua
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"HiPhish/rainbow-delimiters.nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
main = "ibl",
|
||||||
|
---@module "ibl"
|
||||||
|
---@type ibl.config
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
local highlight = {
|
||||||
|
"RainbowRed",
|
||||||
|
"RainbowYellow",
|
||||||
|
"RainbowBlue",
|
||||||
|
"RainbowOrange",
|
||||||
|
"RainbowGreen",
|
||||||
|
"RainbowViolet",
|
||||||
|
"RainbowCyan",
|
||||||
|
}
|
||||||
|
local hooks = require "ibl.hooks"
|
||||||
|
-- create the highlight groups in the highlight setup hook, so they are reset
|
||||||
|
-- every time the colorscheme changes
|
||||||
|
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||||
|
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.g.rainbow_delimiters = { highlight = highlight }
|
||||||
|
require("ibl").setup { scope = { highlight = highlight } }
|
||||||
|
|
||||||
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
41
nvim/lua/plugins/lsp.lua
Normal file
41
nvim/lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"smjonas/inc-rename.nvim",
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dundalek/lazy-lsp.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
{ "VonHeikemen/lsp-zero.nvim", branch = "v3.x" },
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lsp_zero = require("lsp-zero")
|
||||||
|
|
||||||
|
lsp_zero.on_attach(function(_client, bufnr)
|
||||||
|
-- see :help lsp-zero-keybindings to learn the available actions
|
||||||
|
lsp_zero.default_keymaps({
|
||||||
|
buffer = bufnr,
|
||||||
|
preserve_mappings = false
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
|
require("lazy-lsp").setup {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lukas-reineke/lsp-format.nvim",
|
||||||
|
config = function()
|
||||||
|
require("lsp-format").setup {}
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
callback = function(args)
|
||||||
|
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
||||||
|
require("lsp-format").on_attach(client, args.buf)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
17
nvim/lua/plugins/moves.lua
Normal file
17
nvim/lua/plugins/moves.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
{ "chrisgrieser/nvim-spider", lazy = true },
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
---@type Flash.Config
|
||||||
|
opts = {},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
10
nvim/lua/plugins/notify.lua
Normal file
10
nvim/lua/plugins/notify.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
name = "notify",
|
||||||
|
lazy = true,
|
||||||
|
config = function()
|
||||||
|
require("notify").setup({
|
||||||
|
background_colour = "#7f849c"
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
48
nvim/lua/plugins/pairs.lua
Normal file
48
nvim/lua/plugins/pairs.lua
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'RRethy/nvim-treesitter-endwise',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require('nvim-autopairs').setup()
|
||||||
|
|
||||||
|
local npairs = require("nvim-autopairs")
|
||||||
|
local Rule = require('nvim-autopairs.rule')
|
||||||
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
|
local cmp = require('cmp')
|
||||||
|
cmp.event:on(
|
||||||
|
'confirm_done',
|
||||||
|
cmp_autopairs.on_confirm_done()
|
||||||
|
)
|
||||||
|
|
||||||
|
npairs.setup({
|
||||||
|
check_ts = true,
|
||||||
|
ts_config = {
|
||||||
|
lua = { 'string' }, -- it will not add a pair on that treesitter node
|
||||||
|
javascript = { 'template_string' },
|
||||||
|
java = false, -- don't check treesitter on java
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local ts_conds = require('nvim-autopairs.ts-conds')
|
||||||
|
|
||||||
|
|
||||||
|
-- press % => %% only while inside a comment or string
|
||||||
|
npairs.add_rules({
|
||||||
|
Rule("%", "%", "lua")
|
||||||
|
:with_pair(ts_conds.is_ts_node({ 'string', 'comment' })),
|
||||||
|
Rule("$", "$", "lua")
|
||||||
|
:with_pair(ts_conds.is_not_ts_node({ 'function' }))
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
enabled = function(bufnr) return true end,
|
||||||
|
disable_filetype = { "TelescopePrompt", "spectre_panel", "snacks_picker_input" },
|
||||||
|
enable_check_bracket_line = false,
|
||||||
|
map_cr = true,
|
||||||
|
map_bs = true, -- map the <BS> key
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
12
nvim/lua/plugins/replace.lua
Normal file
12
nvim/lua/plugins/replace.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-pack/nvim-spectre",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
config = function ()
|
||||||
|
require("noice").setup {
|
||||||
|
presets = { inc_rename = true }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
6
nvim/lua/plugins/scrolling.lua
Normal file
6
nvim/lua/plugins/scrolling.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
return {
|
||||||
|
"karb94/neoscroll.nvim",
|
||||||
|
opts = {
|
||||||
|
easing = "quadratic"
|
||||||
|
},
|
||||||
|
}
|
13
nvim/lua/plugins/smear.lua
Normal file
13
nvim/lua/plugins/smear.lua
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
return {
|
||||||
|
"sphamba/smear-cursor.nvim",
|
||||||
|
opts = {
|
||||||
|
stiffness = 0.8, -- 0.6 [0, 1]
|
||||||
|
trailing_stiffness = 0.5, -- 0.4 [0, 1]
|
||||||
|
stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
|
||||||
|
trailing_stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
|
||||||
|
distance_stop_animating = 0.5,
|
||||||
|
time_interval = 7, -- milliseconds
|
||||||
|
cursor_color = "#f9e2af",
|
||||||
|
legacy_computing_symbols_support = true,
|
||||||
|
},
|
||||||
|
}
|
68
nvim/lua/plugins/statusline.lua
Normal file
68
nvim/lua/plugins/statusline.lua
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
return {
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
|
config = function()
|
||||||
|
-- Bubbles config for lualine
|
||||||
|
-- Author: lokesh-krishna
|
||||||
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
|
-- stylua: ignore
|
||||||
|
local colors = {
|
||||||
|
blue = '#89b4fa',
|
||||||
|
cyan = '#89dceb',
|
||||||
|
black = '#1e1e2e',
|
||||||
|
white = '#cdd6f4',
|
||||||
|
red = '#f38ba8',
|
||||||
|
violet = '#cba6f7',
|
||||||
|
grey = '#303030',
|
||||||
|
}
|
||||||
|
|
||||||
|
local bubbles_theme = {
|
||||||
|
normal = {
|
||||||
|
a = { fg = colors.black, bg = colors.violet },
|
||||||
|
b = { fg = colors.white, bg = colors.grey },
|
||||||
|
c = { fg = colors.white },
|
||||||
|
},
|
||||||
|
|
||||||
|
insert = { a = { fg = colors.black, bg = colors.blue } },
|
||||||
|
visual = { a = { fg = colors.black, bg = colors.cyan } },
|
||||||
|
replace = { a = { fg = colors.black, bg = colors.red } },
|
||||||
|
|
||||||
|
inactive = {
|
||||||
|
a = { fg = colors.white, bg = colors.black },
|
||||||
|
b = { fg = colors.white, bg = colors.black },
|
||||||
|
c = { fg = colors.white },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
theme = bubbles_theme,
|
||||||
|
component_separators = '',
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
|
||||||
|
lualine_b = { 'filename', 'branch' },
|
||||||
|
lualine_c = {
|
||||||
|
'%=', --[[ add your center components here in place of this comment ]]
|
||||||
|
},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = { 'filetype', 'progress' },
|
||||||
|
lualine_z = {
|
||||||
|
{ 'location', separator = { right = '' }, left_padding = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = { 'filename' },
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = { 'location' },
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
20
nvim/lua/plugins/symbols.lua
Normal file
20
nvim/lua/plugins/symbols.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
return {
|
||||||
|
"oskarrrrrrr/symbols.nvim",
|
||||||
|
config = function()
|
||||||
|
local r = require("symbols.recipes")
|
||||||
|
require("symbols").setup(
|
||||||
|
r.DefaultFilters,
|
||||||
|
r.AsciiSymbols,
|
||||||
|
{
|
||||||
|
sidebar = {
|
||||||
|
unfold_on_goto = true,
|
||||||
|
close_on_goto = true,
|
||||||
|
preview = {
|
||||||
|
show_always = true,
|
||||||
|
show_line_number = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
15
nvim/lua/plugins/tabline.lua
Normal file
15
nvim/lua/plugins/tabline.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"willothy/nvim-cokeline",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim", -- Required for v0.4.0+
|
||||||
|
"nvim-tree/nvim-web-devicons", -- If you want devicons
|
||||||
|
"stevearc/resession.nvim" -- Optional, for persistent history
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('cokeline').setup({
|
||||||
|
show_if_buffers_are_at_least = 2,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
18
nvim/lua/plugins/theme.lua
Normal file
18
nvim/lua/plugins/theme.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
return {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
lazy = true,
|
||||||
|
name = "catppuccin",
|
||||||
|
opts = {
|
||||||
|
flavour = "mocha",
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
treesitter = true,
|
||||||
|
barbar = true,
|
||||||
|
},
|
||||||
|
transparent_background = true, -- disables setting the background color.
|
||||||
|
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
||||||
|
comments = { "italic" }, -- Change the style of comments
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
4
nvim/lua/plugins/todo.lua
Normal file
4
nvim/lua/plugins/todo.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
}
|
16
nvim/lua/plugins/tree.lua
Normal file
16
nvim/lua/plugins/tree.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||||
|
},
|
||||||
|
lazy = false, -- neo-tree will lazily load itself
|
||||||
|
---@module "neo-tree"
|
||||||
|
---@type neotree.Config?
|
||||||
|
opts = {
|
||||||
|
-- fill any relevant options here
|
||||||
|
},
|
||||||
|
}
|
92
nvim/lua/plugins/treesitter.lua
Normal file
92
nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
opts = {
|
||||||
|
spec = {
|
||||||
|
{ "<BS>", desc = "Decrement Selection", mode = "x" },
|
||||||
|
{ "<c-space>", desc = "Increment Selection", mode = { "x", "n" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"m-demare/hlargs.nvim",
|
||||||
|
event = { "VeryLazy" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
version = false, -- last release is way too old and doesn't work on Windows
|
||||||
|
build = ":TSUpdate",
|
||||||
|
event = { "VeryLazy" },
|
||||||
|
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
|
||||||
|
init = function(plugin)
|
||||||
|
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
|
||||||
|
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
|
||||||
|
-- no longer trigger the **nvim-treesitter** module to be loaded in time.
|
||||||
|
-- Luckily, the only things that those plugins need are the custom queries, which we make available
|
||||||
|
-- during startup.
|
||||||
|
require("lazy.core.loader").add_to_rtp(plugin)
|
||||||
|
require("nvim-treesitter.query_predicates")
|
||||||
|
end,
|
||||||
|
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
||||||
|
keys = {
|
||||||
|
{ "<c-space>", desc = "Increment Selection" },
|
||||||
|
{ "<bs>", desc = "Decrement Selection", mode = "x" },
|
||||||
|
},
|
||||||
|
opts_extend = { "ensure_installed" },
|
||||||
|
---@type TSConfig
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
opts = {
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"jsdoc",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"luap",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"printf",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"toml",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"xml",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "<C-space>",
|
||||||
|
node_incremental = "<C-space>",
|
||||||
|
scope_incremental = false,
|
||||||
|
node_decremental = "<bs>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
textobjects = {
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" },
|
||||||
|
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" },
|
||||||
|
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" },
|
||||||
|
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue