initial dotfiles
This commit is contained in:
commit
45e5fe53d2
370 changed files with 25449 additions and 0 deletions
5
.config/nvim/lua/config/autocmds.lua
Normal file
5
.config/nvim/lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
vim.cmd("Neotree show right")
|
||||
end,
|
||||
})
|
||||
36
.config/nvim/lua/config/highlights.lua
Normal file
36
.config/nvim/lua/config/highlights.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
-- Force LazyVim UI elements to use Carrie's green 🐾🌿
|
||||
|
||||
local green = "#afb979"
|
||||
local green_bright = "#cbd88c"
|
||||
local bg = "#141414"
|
||||
|
||||
local function hi(group, opts)
|
||||
vim.api.nvim_set_hl(0, group, opts)
|
||||
end
|
||||
|
||||
-- ✅ WhichKey menu (the big popup cheat sheet)
|
||||
hi("WhichKey", { fg = green_bright })
|
||||
hi("WhichKeyGroup", { fg = green })
|
||||
hi("WhichKeyDesc", { fg = green_bright })
|
||||
hi("WhichKeyBorder", { fg = green })
|
||||
|
||||
-- ✅ Lazy.nvim plugin manager UI
|
||||
hi("LazyNormal", { bg = bg })
|
||||
hi("LazyButton", { fg = green })
|
||||
hi("LazyButtonActive", { fg = bg, bg = green_bright, bold = true })
|
||||
hi("LazyH1", { fg = green_bright, bold = true })
|
||||
|
||||
-- ✅ Completion menu (nvim-cmp)
|
||||
hi("CmpItemAbbr", { fg = green_bright })
|
||||
hi("CmpItemAbbrMatch", { fg = green, bold = true })
|
||||
hi("CmpBorder", { fg = green })
|
||||
hi("CmpNormal", { bg = bg })
|
||||
|
||||
-- ✅ Telescope menus (if you use it)
|
||||
hi("TelescopeBorder", { fg = green })
|
||||
hi("TelescopePromptBorder", { fg = green })
|
||||
hi("TelescopeSelection", { bg = "#303030" })
|
||||
hi("TelescopePromptPrefix", { fg = green_bright })
|
||||
|
||||
-- ✅ Floating menus in general
|
||||
hi("FloatBorder", { fg = green })
|
||||
8
.config/nvim/lua/config/keymaps.lua
Normal file
8
.config/nvim/lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-- Neo-tree toggle with `
|
||||
vim.keymap.set("n", "`", function()
|
||||
vim.cmd("Neotree toggle right")
|
||||
end, { desc = "Toggle Neo-tree" })
|
||||
|
||||
-- Buffer (tab/page) navigation
|
||||
vim.keymap.set("n", "[", vim.cmd.bprevious, { desc = "Previous buffer" })
|
||||
vim.keymap.set("n", "]", vim.cmd.bnext, { desc = "Next buffer" })
|
||||
53
.config/nvim/lua/config/lazy.lua
Normal file
53
.config/nvim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
.config/nvim/lua/config/options.lua
Normal file
3
.config/nvim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
26
.config/nvim/lua/config/quit.lua
Normal file
26
.config/nvim/lua/config/quit.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
local function close_neotree_if_open()
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
local ft = vim.api.nvim_buf_get_option(buf, "filetype")
|
||||
if ft == "neo-tree" then
|
||||
vim.cmd("Neotree close")
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Override :q
|
||||
vim.api.nvim_create_user_command("Q", function()
|
||||
close_neotree_if_open()
|
||||
vim.cmd("q")
|
||||
end, {})
|
||||
|
||||
vim.cmd("cnoreabbrev q Q")
|
||||
|
||||
-- Override :wq
|
||||
vim.api.nvim_create_user_command("WQ", function()
|
||||
close_neotree_if_open()
|
||||
vim.cmd("wq")
|
||||
end, {})
|
||||
|
||||
vim.cmd("cnoreabbrev wq WQ")
|
||||
15
.config/nvim/lua/plugins/arrpc-presence.lua
Normal file
15
.config/nvim/lua/plugins/arrpc-presence.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
"vyfor/cord.nvim",
|
||||
build = "./build || .\\build",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
editor = {
|
||||
client = "neovim",
|
||||
tooltip = "The only real IDE",
|
||||
},
|
||||
display = {
|
||||
theme = "default",
|
||||
flavor = "accent",
|
||||
},
|
||||
},
|
||||
}
|
||||
197
.config/nvim/lua/plugins/example.lua
Normal file
197
.config/nvim/lua/plugins/example.lua
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
3
.config/nvim/lua/plugins/mini.lua
Normal file
3
.config/nvim/lua/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
'nvim-mini/mini.nvim', version = false
|
||||
},
|
||||
9
.config/nvim/lua/plugins/neocodeium.lua
Normal file
9
.config/nvim/lua/plugins/neocodeium.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"monkoose/neocodeium",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local neocodeium = require("neocodeium")
|
||||
neocodeium.setup()
|
||||
vim.keymap.set("i", "<A-f>", neocodeium.accept)
|
||||
end,
|
||||
}
|
||||
34
.config/nvim/lua/plugins/neotree.lua
Normal file
34
.config/nvim/lua/plugins/neotree.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
window = {
|
||||
position = "right",
|
||||
width = 25,
|
||||
mappings = {
|
||||
["`"] = "close_window", -- leave neotree
|
||||
|
||||
["."] = "navigate_up", -- go to parent dir
|
||||
["d"] = "delete",
|
||||
["c"] = "copy_to_clipboard",
|
||||
["v"] = "paste_from_clipboard",
|
||||
|
||||
["n"] = "add", -- new file
|
||||
["f"] = "add_directory", -- new folder
|
||||
},
|
||||
},
|
||||
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
hijack_netrw_behavior = "open_default",
|
||||
use_libuv_file_watcher = true,
|
||||
|
||||
filtered_items = {
|
||||
visible = true, -- show hidden files
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue