Cleanup dotfiles

This commit is contained in:
Corey Smith
2025-07-23 00:26:25 -07:00
parent 75c981e76d
commit e25d845bbf
33 changed files with 3394 additions and 0 deletions

View File

@ -0,0 +1,9 @@
(directive) @function
(directive_start) @function
(directive_end) @function
(comment) @comment
((parameter) @include (#set! "priority" 110))
((php_only) @include (#set! "priority" 110))
((bracket_start) @function (#set! "priority" 120))
((bracket_end) @function (#set! "priority" 120))
(keyword) @function

View File

@ -0,0 +1,4 @@
((text) @injection.content
(#not-has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language php))

View File

@ -0,0 +1,571 @@
-------------------------------------------------------------------------------
-- Neovim Colorscheme for Little Plummer Creek Studio
-------------------------------------------------------------------------------
--
-- Jump To:
-- 1. Setup
-- 2. Palette
-- 3. Groups
-- 4. Do the Thing!
--
-------------------------------------------------------------------------------
-- Setup
-------------------------------------------------------------------------------
--
-- Setup the Colorscheme boilerplate. This is a light theme.
--
vim.cmd('highlight clear')
if vim.fn.exists('syntax_on') then
vim.cmd('syntax reset')
end
vim.o.background = 'light'
vim.g.colors_name = 'lpcstudio'
-------------------------------------------------------------------------------
-- Palette
-------------------------------------------------------------------------------
--
-- Define the Palette as hue to be used in highlight groups. Based on the
-- TailwindCSS colors at https://tailwindcss.com/docs/customizing-colors
--
local hue = {
base = {
["50"] = "#FDFDFF",
["100"] = "#F7F8FA",
["200"] = "#EBECF0",
["250"] = "#DCDDE1",
["300"] = "#CCCDD1",
["350"] = "#BDBFC4",
["400"] = "#A3A6AE",
["500"] = "#80838B",
["600"] = "#696C74",
["700"] = "#54575F",
["800"] = "#3E4149",
["900"] = "#2B2E35",
["950"] = "#1A1C22",
},
slate = {
["50"] = "#f8fafc",
["100"] = "#f1f5f9",
["200"] = "#e2e8f0",
["300"] = "#cbd5e1",
["400"] = "#94a3b8",
["450"] = "#6C7C94",
["500"] = "#64748b",
["600"] = "#475569",
["700"] = "#334155",
["800"] = "#1e293b",
["900"] = "#0f172a",
["950"] = "#020617",
},
gray = {
["50"] = "#f9fafb",
["100"] = "#f3f4f6",
["200"] = "#e5e7eb",
["300"] = "#d1d5db",
["400"] = "#9ca3af",
["500"] = "#6b7280",
["600"] = "#4b5563",
["700"] = "#374151",
["800"] = "#1f2937",
["900"] = "#111827",
["950"] = "#030712",
},
zinc = {
["50"] = "#fafafa",
["100"] = "#f4f4f5",
["200"] = "#e4e4e7",
["300"] = "#d4d4d8",
["400"] = "#a1a1aa",
["500"] = "#71717a",
["600"] = "#52525b",
["700"] = "#3f3f46",
["800"] = "#27272a",
["900"] = "#18181b",
["950"] = "#09090b",
},
neutral = {
["50"] = "#fafafa",
["100"] = "#f5f5f5",
["200"] = "#e5e5e5",
["300"] = "#d4d4d4",
["400"] = "#a3a3a3",
["500"] = "#737373",
["600"] = "#525252",
["700"] = "#404040",
["800"] = "#262626",
["900"] = "#171717",
["950"] = "#0a0a0a",
},
stone = {
["50"] = "#fafaf9",
["100"] = "#f5f5f4",
["200"] = "#e7e5e4",
["300"] = "#d6d3d1",
["400"] = "#a8a29e",
["500"] = "#78716c",
["600"] = "#57534e",
["700"] = "#44403c",
["800"] = "#292524",
["900"] = "#1c1917",
["950"] = "#0c0a09",
},
red = {
["50"] = "#fef2f2",
["100"] = "#fee2e2",
["200"] = "#fecaca",
["300"] = "#fca5a5",
["400"] = "#f87171",
["500"] = "#ef4444",
["600"] = "#dc2626",
["700"] = "#b91c1c",
["800"] = "#991b1b",
["900"] = "#7f1d1d",
["950"] = "#450a0a",
},
orange = {
["50"] = "#fff7ed",
["100"] = "#ffedd5",
["200"] = "#fed7aa",
["300"] = "#fdba74",
["400"] = "#fb923c",
["500"] = "#f97316",
["600"] = "#ea580c",
["700"] = "#c2410c",
["800"] = "#9a3412",
["900"] = "#7c2d12",
["950"] = "#431407",
},
amber = {
["50"] = "#fffbeb",
["100"] = "#fef3c7",
["200"] = "#fde68a",
["300"] = "#fcd34d",
["400"] = "#fbbf24",
["500"] = "#f59e0b",
["600"] = "#d97706",
["700"] = "#b45309",
["800"] = "#92400e",
["900"] = "#78350f",
["950"] = "#451a03",
},
yellow = {
["50"] = "#fefce8",
["100"] = "#fef9c3",
["200"] = "#fef08a",
["300"] = "#fde047",
["400"] = "#facc15",
["500"] = "#eab308",
["600"] = "#ca8a04",
["700"] = "#a16207",
["800"] = "#854d0e",
["900"] = "#713f12",
["950"] = "#422006",
},
lime = {
["50"] = "#f7fee7",
["100"] = "#ecfccb",
["200"] = "#d9f99d",
["300"] = "#bef264",
["400"] = "#a3e635",
["500"] = "#84cc16",
["600"] = "#65a30d",
["700"] = "#4d7c0f",
["800"] = "#3f6212",
["900"] = "#365314",
["950"] = "#1a2e05",
},
green = {
["50"] = "#f0fdf4",
["100"] = "#dcfce7",
["200"] = "#bbf7d0",
["300"] = "#86efac",
["400"] = "#4ade80",
["500"] = "#22c55e",
["600"] = "#16a34a",
["700"] = "#15803d",
["800"] = "#166534",
["900"] = "#14532d",
["950"] = "#052e16",
},
emerald = {
["50"] = "#ecfdf5",
["100"] = "#d1fae5",
["200"] = "#a7f3d0",
["300"] = "#6ee7b7",
["400"] = "#34d399",
["500"] = "#10b981",
["600"] = "#059669",
["700"] = "#047857",
["800"] = "#065f46",
["900"] = "#064e3b",
["950"] = "#022c22",
},
teal = {
["50"] = "#f0fdfa",
["100"] = "#ccfbf1",
["200"] = "#99f6e4",
["300"] = "#5eead4",
["400"] = "#2dd4bf",
["500"] = "#14b8a6",
["600"] = "#0d9488",
["700"] = "#0f766e",
["800"] = "#115e59",
["900"] = "#134e4a",
["950"] = "#042f2e",
},
cyan = {
["50"] = "#ecfeff",
["100"] = "#cffafe",
["200"] = "#a5f3fc",
["300"] = "#67e8f9",
["400"] = "#22d3ee",
["500"] = "#06b6d4",
["600"] = "#0891b2",
["700"] = "#0e7490",
["800"] = "#155e75",
["900"] = "#164e63",
["950"] = "#083344",
},
sky = {
["50"] = "#f0f9ff",
["100"] = "#e0f2fe",
["200"] = "#bae6fd",
["300"] = "#7dd3fc",
["400"] = "#38bdf8",
["500"] = "#0ea5e9",
["600"] = "#0284c7",
["700"] = "#0369a1",
["800"] = "#075985",
["900"] = "#0c4a6e",
["950"] = "#082f49",
},
blue = {
["50"] = "#eff6ff",
["100"] = "#dbeafe",
["200"] = "#bfdbfe",
["300"] = "#93c5fd",
["400"] = "#60a5fa",
["500"] = "#3b82f6",
["600"] = "#2563eb",
["700"] = "#1d4ed8",
["800"] = "#1e40af",
["900"] = "#1e3a8a",
["950"] = "#172554",
},
indigo = {
["50"] = "#eef2ff",
["100"] = "#e0e7ff",
["200"] = "#c7d2fe",
["300"] = "#a5b4fc",
["400"] = "#818cf8",
["500"] = "#6366f1",
["600"] = "#4f46e5",
["700"] = "#4338ca",
["800"] = "#3730a3",
["900"] = "#312e81",
["950"] = "#1e1b4b",
},
violet = {
["50"] = "#f5f3ff",
["100"] = "#ede9fe",
["200"] = "#ddd6fe",
["300"] = "#c4b5fd",
["400"] = "#a78bfa",
["500"] = "#8b5cf6",
["600"] = "#7c3aed",
["700"] = "#6d28d9",
["800"] = "#5b21b6",
["900"] = "#4c1d95",
["950"] = "#2e1065",
},
purple = {
["50"] = "#faf5ff",
["100"] = "#f3e8ff",
["200"] = "#e9d5ff",
["300"] = "#d8b4fe",
["400"] = "#c084fc",
["500"] = "#a855f7",
["600"] = "#9333ea",
["700"] = "#7e22ce",
["800"] = "#6b21a8",
["900"] = "#581c87",
["950"] = "#3b0764",
},
fuchsia = {
["50"] = "#fdf4ff",
["100"] = "#fae8ff",
["200"] = "#f5d0fe",
["300"] = "#f0abfc",
["400"] = "#e879f9",
["500"] = "#d946ef",
["600"] = "#c026d3",
["700"] = "#a21caf",
["800"] = "#86198f",
["900"] = "#701a75",
["950"] = "#4a044e",
},
pink = {
["50"] = "#fdf2f8",
["100"] = "#fce7f3",
["200"] = "#fbcfe8",
["300"] = "#f9a8d4",
["400"] = "#f472b6",
["500"] = "#ec4899",
["600"] = "#db2777",
["700"] = "#be185d",
["800"] = "#9d174d",
["900"] = "#831843",
["950"] = "#500724",
},
rose = {
["50"] = "#fff1f2",
["100"] = "#ffe4e6",
["200"] = "#fecdd3",
["300"] = "#fda4af",
["400"] = "#fb7185",
["500"] = "#f43f5e",
["600"] = "#e11d48",
["700"] = "#be123c",
["800"] = "#9f1239",
["900"] = "#881337",
["950"] = "#4c0519",
},
}
-------------------------------------------------------------------------------
-- Groups
-------------------------------------------------------------------------------
--
-- Let's get down to business. Define highlight groups using the palette
-- we worked so hard on. Access colors with `hue.base["shade"]`. Example:
--
-- Normal = { fg = hue.base["500"], bg = "NONE", bold = true }
--
local groups = {
-------------------------------------------------------------------------------
-- Cursor Line
-------------------------------------------------------------------------------
CursorLine = {},
-------------------------------------------------------------------------------
-- Matching Parentheses
-------------------------------------------------------------------------------
MatchParen = { fg = 0 },
-------------------------------------------------------------------------------
-- Sign Column
-------------------------------------------------------------------------------
SignColumn = { fg = 0 },
-------------------------------------------------------------------------------
-- Normal Text
-------------------------------------------------------------------------------
Normal = { fg = hue.base["900"] },
-------------------------------------------------------------------------------
-- Vertical Splits
-------------------------------------------------------------------------------
VertSplit = { fg = hue.base["400"] },
WinSeparator = { fg = hue.base["400"] },
-------------------------------------------------------------------------------
-- Floating Window Borders
-------------------------------------------------------------------------------
FloatBorder = { fg = hue.base["600"], bg = hue.base["100"] },
-------------------------------------------------------------------------------
-- Search
-------------------------------------------------------------------------------
Search = { fg = hue.base["600"], bg = hue.amber["200"] },
-------------------------------------------------------------------------------
-- Visual Highlighting
-------------------------------------------------------------------------------
Visual = { bg = hue.base["300"] },
-------------------------------------------------------------------------------
-- End of Buffers
-------------------------------------------------------------------------------
EndOfBuffer = { fg = hue.base["900"] },
-------------------------------------------------------------------------------
-- Popup Menu
-------------------------------------------------------------------------------
Pmenu = { fg = hue.neutral["100"], bg = hue.neutral["500"], italic = true },
PmenuSel = { fg = hue.neutral["100"], bg = hue.blue["500"], italic = true },
PmenuSbar = { bg = hue.neutral["500"] },
PmenuThumb = { bg = hue.neutral["500"] },
-------------------------------------------------------------------------------
-- Tab Line
-------------------------------------------------------------------------------
TabLine = { fg = hue.base["400"], bg = hue.base["700"] },
TabLineFill = { fg = hue.base["100"], bg = hue.base["700"] },
TabLineSel = { fg = hue.base["100"], bg = hue.base["600"], bold = true },
-------------------------------------------------------------------------------
-- Line Numbers
-------------------------------------------------------------------------------
LineNr = { fg = hue.base["500"] },
LineNrAbove = { fg = hue.base["500"] },
LineNrBelow = { fg = hue.base["500"] },
CursorLineNr = { fg = hue.base["500"] },
-------------------------------------------------------------------------------
-- Status Line
-------------------------------------------------------------------------------
StatusLine = { fg = hue.base["200"], bg = hue.base["700"] },
StatusLineNC = { fg = hue.base["200"], bg = hue.base["700"] },
-------------------------------------------------------------------------------
-- Syntax
-------------------------------------------------------------------------------
Boolean = { fg = hue.yellow["800"] },
Comment = { fg = hue.base["500"] },
Conditional = { fg = hue.fuchsia["800"] },
Constant = { fg = hue.amber["800"] },
Debug = {},
Define = {},
Delimiter = {},
Error = {},
Exception = {},
Float = {},
Function = { fg = hue.rose["800"] },
Identifier = { fg = hue.rose["800"] },
Ignore = {},
Include = { fg = hue.fuchsia["800"], bold = true },
Keyword = { fg = hue.sky["800"], bold = true },
Label = { fg = hue.rose["800"] },
Macro = {},
Number = { fg = hue.yellow["800"] },
Operator = {},
PreCondit = {},
PreProc = {},
Repeat = {},
Special = { fg = hue.cyan["800"] },
SpecialChar = {},
SpecialComment = {},
Statement = {},
StorageClass = { fg = hue.sky["800"], bold = true },
String = { fg = hue.lime["700"] },
Structure = { fg = hue.sky["800"], bold = true },
Tag = { fg = hue.rose["800"] },
Title = { bold = true },
Todo = {},
Type = { fg = hue.sky["800"] },
Typedef = {},
Underlined = { fg = hue.blue["800"], underline = true },
-------------------------------------------------------------------------------
-- Diffs
-------------------------------------------------------------------------------
Added = { fg = hue.green["700"] },
Changed = { fg = hue.sky["700"] },
Removed = { fg = hue.red["800"] },
-------------------------------------------------------------------------------
-- Diagnosticles
-------------------------------------------------------------------------------
DiagnosticError = { fg = hue.red["300"], italic = true },
DiagnosticWarn = { fg = hue.orange["300"], italic = true },
DiagnosticHint = { fg = hue.amber["300"], italic = true },
DiagnosticInfo = { fg = hue.base["300"], italic = true },
DiagnosticUnderlineWarn = { bg = hue.amber["100"] },
DiagnosticUnderlineHint = { bg = hue.amber["100"] },
DiagnosticUnnecessary = { bg = hue.amber["100"] },
-- Trouble Plugin
-------------------------------------------------------------------------------
TroubleFile = { fg = hue.base["900"], bold = true },
TroubleCount = { fg = hue.base["400"], bold = true },
TroubleSignError = { fg = hue.red["600"] },
TroubleSignWarning = { fg = hue.orange["600"] },
TroubleSignHint = { fg = hue.amber["600"] },
TroubleSignInfo = { fg = hue.base["600"] },
-------------------------------------------------------------------------------
-- Diff
-------------------------------------------------------------------------------
GitSignsAdd = { fg = hue.lime["400"] },
GitSignsDelete = { fg = hue.red["400"] },
GitSignsChange = { fg = hue.blue["400"] },
GitSignsText = { fg = hue.base["400"] },
-------------------------------------------------------------------------------
-- NvimTree Plugin
-------------------------------------------------------------------------------
NvimTreeCursorLine = { fg = hue.base["100"], bg = hue.base["400"] },
NvimTreeNormal = { fg = hue.base["950"] },
NvimTreeFolderIcon = { fg = hue.base["950"] },
NvimTreeFileIcon = { fg = hue.base["950"] },
NvimTreeFolderName = { fg = hue.base["950"] },
NvimTreeEmptyFolder = { fg = hue.base["950"] },
NvimTreeEmptyFolderName = { fg = hue.base["950"] },
NvimTreeOpenedFile = { fg = hue.base["950"] },
NvimTreeOpenedFolderName = { fg = hue.base["950"] },
NvimTreeSpecialFile = { fg = hue.base["950"] },
NvimTreeSymlink = { fg = hue.base["950"] },
NvimTreeFile = { fg = hue.base["950"] },
NvimTreeFileDeleted = { fg = hue.base["950"] },
NvimTreeFileDirty = { fg = hue.base["950"] },
NvimTreeFileMerge = { fg = hue.base["950"] },
NvimTreeFileRenamed = { fg = hue.base["950"] },
NvimTreeFileStaged = { fg = hue.base["950"] },
NvimTreeExecFile = { fg = hue.base["950"] },
NvimTreeWindowPicker = { fg = hue.base["100"], bg = hue.base["900"] },
}
-------------------------------------------------------------------------------
-- Set all the colors
-------------------------------------------------------------------------------
--
-- Zhu li! Do the thing!
--
for group, settings in pairs(groups) do
vim.api.nvim_set_hl(0, group, settings)
end
-------------------------------------------------------------------------------
-- Manage NvimTree colors on enter and exit
-------------------------------------------------------------------------------
--
--
--
local nvimTreeCursorLine = vim.api.nvim_create_augroup("NvimTreeCursorLine", {
clear = true
})
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "NvimTree_1",
callback = function()
vim.cmd("setlocal cursorline")
vim.api.nvim_set_hl(0, "NvimTreeCursorLine", {
fg = hue.base["100"], bg = hue.blue["500"]
})
end,
group = nvimTreeCursorLine,
})
vim.api.nvim_create_autocmd("BufLeave", {
pattern = "NvimTree_1",
callback = function()
vim.api.nvim_set_hl(0, "NvimTreeCursorLine", {
fg = hue.base["900"], bg = hue.base["250"]
})
end,
group = nvimTreeCursorLine,
})

587
dot_config/nvim/init.lua Normal file
View File

@ -0,0 +1,587 @@
-- -----------------------------------------------------------------------------
-- mini.nvim
-- -----------------------------------------------------------------------------
--
-- This Neovim configuration leans heavily on the mini.nvim ecosystem.
--
-- Installing mini.nvim and all its modules allows us to load each module with
-- a simple 'require('mini.module').setup()'. Using the mini.deps module allows
-- for adding plugins using the `MiniDeps.add()` function followed by the same
-- 'require('plugin').setup()'. Pass a config to setup to configure modules and
-- plugins, for example `require('plugin').setup.({config})`.
--
-- See `https://github.com/echasnovski/mini.nvim`
--
local path_package = vim.fn.stdpath('data') .. '/site'
local mini_path = path_package .. '/pack/deps/start/mini.nvim'
if not vim.loop.fs_stat(mini_path) then
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local clone_cmd = {
'git', 'clone', '--filter=blob:none',
'https://github.com/echasnovski/mini.nvim', mini_path
}
vim.fn.system(clone_cmd)
vim.cmd('packadd mini.nvim | helptags ALL')
end
-- -----------------------------------------------------------------------------
-- mini.deps
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.deps`
--
local deps = require('mini.deps')
deps.setup()
-- -----------------------------------------------------------------------------
-- mini.ai
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.ai`
--
local ai = require('mini.ai')
ai.setup()
-- -----------------------------------------------------------------------------
-- mini.basics
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.basics`
--
local basics = require('mini.basics')
basics.setup()
-- -----------------------------------------------------------------------------
-- mini.completion
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.completion`
--
local completion = require('mini.completion')
completion.setup()
-- -----------------------------------------------------------------------------
-- mini.diff
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.diff`
--
local diff = require('mini.diff')
diff.setup()
-- -----------------------------------------------------------------------------
-- mini.git
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.git`
--
local git = require('mini.git')
git.setup()
-- -----------------------------------------------------------------------------
-- mini.hipatterns
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.hipatterns`
--
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
hex_color = hipatterns.gen_highlighter.hex_color(),
}
})
-- -----------------------------------------------------------------------------
-- mini.indentscope
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.indentscope`
--
local indentscope = require('mini.indentscope')
indentscope.setup()
-- -----------------------------------------------------------------------------
-- mini.pairs
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.pairs`
--
local pairs = require('mini.pairs')
pairs.setup()
-- -----------------------------------------------------------------------------
-- mini.surround
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.surround`
--
local surround = require('mini.surround')
surround.setup()
-- -----------------------------------------------------------------------------
-- mini.statusline
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/echasnovski/mini.statusline`
--
local special_filetypes = {
'NvimTree',
'NeoTree',
'Trouble'
}
local function is_special_filetype(filetype)
for _, special_filetype in ipairs(special_filetypes) do
if filetype == special_filetype then
return true
end
end
return false
end
local function get_position_indicator()
local filetype = vim.bo.filetype
if is_special_filetype(filetype) then
return ""
end
local space_or_tab = vim.bo.expandtab and "S" or "T"
local shiftwidth = vim.bo.shiftwidth
local row, col = vim.fn.line('.'), vim.fn.col('.')
return space_or_tab .. shiftwidth .. ' ' .. string.format("%d:%d", row, col) .. ' '
end
local function get_filename()
local filetype = vim.bo.filetype
local symbol = vim.bo.readonly and " [-] " or (vim.bo.modified and " [+] " or "")
if filetype == '' then
return "[scratch]" .. symbol
elseif is_special_filetype(filetype) then
return filetype
else
return vim.fn.expand('%:.') .. symbol
end
end
-- Set up mini.statusline
require('mini.statusline').setup({
content = {
active = function()
local filetype = vim.bo.filetype
-- For special filetypes, return a simplified statusline
if is_special_filetype(filetype) then
return get_filename()
end
-- For regular files, construct the full statusline
return string.format(
' %s%s%s',
get_filename(), -- filename with modification symbol
'%=', -- middle spacing
get_position_indicator() -- position indicator
)
end,
inactive = function()
-- For inactive windows, show a simpler statusline
return string.format(
' %s%s%s',
get_filename(), -- filename with modification symbol
'%=', -- middle spacing
get_position_indicator() -- position indicator
)
end,
},
use_icons = true,
set_vim_settings = true,
})
-- -----------------------------------------------------------------------------
-- nvim-lspconfig
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/neovim/nvim-lspconfig`
--
MiniDeps.add({
source = 'neovim/nvim-lspconfig',
})
vim.lsp.config('luals', {
cmd = {'lua-language-server'},
filetypes = {'lua'},
root_markers = {'.luarc.json', '.luarc.jsonc'},
settings = {
Lua = {
diagnostics = {
globals = {'vim', 'MiniDeps'}
}
}
}
})
vim.lsp.enable('luals')
vim.lsp.config('gopls', {
cmd = {'gopls'},
filetypes = {'go', 'gomod', 'gowork', 'gotmpl'},
root_markers = {'go.mod', '.git'},
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
},
},
})
vim.lsp.enable('gopls')
-- -----------------------------------------------------------------------------
-- nvim-treesitter
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/nvim-treesitter/nvim-treesitter`
--
MiniDeps.add({
source = 'nvim-treesitter/nvim-treesitter',
checkout = 'master',
monitor = 'main',
hooks = {
post_checkout = function()
vim.cmd('TSUpdate')
end
},
})
-- Add the custom Blade parser
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.blade = {
install_info = {
url = "https://github.com/EmranMR/tree-sitter-blade", -- Community parser repo
files = { "src/parser.c" },
branch = "main",
},
filetype = "blade",
}
-- Treesitter setup
require('nvim-treesitter.configs').setup({
auto_install = true, -- Automatically install missing parsers
ensure_installed = {
'bash',
'c',
'c_sharp',
'css',
'csv',
'dockerfile',
'editorconfig',
'git_config',
'gitcommit',
'gitignore',
'go',
'graphql',
'html',
'javascript',
'jq',
'jsdoc',
'json',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'nginx',
'php',
'phpdoc',
'python',
'query',
'ruby',
'rust',
'scss',
'sql',
'tmux',
'toml',
'typescript',
'vim',
'vimdoc',
'xml',
'yaml',
'blade', -- Add blade here
},
highlight = {
enable = true, -- Enable syntax highlighting
},
indent = {
enable = false, -- Disable indentation for now
},
})
-- Set filetype for Blade files
vim.cmd [[autocmd BufRead,BufNewFile *.blade.php set filetype=blade]]
-- -----------------------------------------------------------------------------
-- tmux.nvim
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/aserowy/tmux.nvim`
--
MiniDeps.add({ source = 'aserowy/tmux.nvim' })
require('tmux').setup({})
-- Terminal Keymaps
vim.keymap.set("t", "<c-j>", "<c-\\><c-n><c-w>j", {noremap = true})
vim.keymap.set("t", "<c-h>", "<c-\\><c-n><c-w>h", {noremap = true})
vim.keymap.set("t", "<c-k>", "<c-\\><c-n><c-w>k", {noremap = true})
vim.keymap.set("t", "<c-l>", "<c-\\><c-n><c-w>l", {noremap = true})
-- -----------------------------------------------------------------------------
-- Oil
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/stevearc/oil.nvim`
--
MiniDeps.add({ source = 'stevearc/oil.nvim' })
require('oil').setup({
skip_confirm_for_simple_edits = true,
prompt_save_on_select_new_entry = false,
delete_to_trash = true,
confirmation = {
border = "double",
},
view_options = {
show_hidden = true,
sort = {
{
"name", "asc"
},
},
}
})
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
-- -----------------------------------------------------------------------------
-- Neogit
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/NeogitOrg/neogit`
--
MiniDeps.add({ source = 'nvim-lua/plenary.nvim' })
MiniDeps.add({ source = 'NeogitOrg/neogit' })
require('neogit').setup({
integrations = {
fzf_lua = true, -- Use your existing fzf-lua
},
})
-- -----------------------------------------------------------------------------
-- FZF Lua
-- -----------------------------------------------------------------------------
--
-- See `https://github.com/ibhagwan/fzf-lua`
--
MiniDeps.add({
source = 'ibhagwan/fzf-lua'
})
require('fzf-lua').setup({
fzf_bin = 'fzf', -- Use system fzf (not embedded)
-- Make it fill the screen like terminal fzf
winopts = {
height = 1.0, -- Full height
width = 1.0, -- Full width
row = 0, -- Top of screen
col = 0, -- Left of screen
border = 'none', -- No border (like terminal)
preview = {
border = 'double',
title = false, -- Remove the preview title
title_pos = false,
}
},
-- Let fzf handle the layout/preview like in terminal
fzf_opts = {
-- Remove fzf-lua's default overrides to use your terminal config
['--height'] = false, -- Don't override height
['--layout'] = false, -- Don't override layout
['--border'] = false, -- Don't override border
['--info'] = false, -- Don't override info position
},
-- Ensure previews work like your terminal setup
files = {
-- preview_opts = 'hidden', -- Let fzf handle preview
},
})
vim.keymap.set("n", "<leader>f", "<cmd>FzfLua files<cr>", { desc = "Search Files" })
vim.keymap.set("n", "<leader>o", "<cmd>FzfLua oldfiles<cr>", { desc = "List Recent Files" })
vim.keymap.set("n", "<leader>b", "<cmd>FzfLua buffers<cr>", { desc = "List Buffers" })
vim.keymap.set("n", "<leader>g", "<cmd>FzfLua live_grep<cr>", { desc = "List Matched Strings" })
vim.keymap.set("n", "<leader>d", "<cmd>FzfLua lsp_diagnostics<cr>", { desc = "List Diagnostics" })
-- -----------------------------------------------------------------------------
-- VimWiki
-- -----------------------------------------------------------------------------
--
--
--
-- MiniDeps.add({
-- source = 'vimwiki/vimwiki'
-- })
--
-- require('vimwiki').setup()
-- -----------------------------------------------------------------------------
-- Set Colorscheme
-- -----------------------------------------------------------------------------
--
-- Use the custom colorscheme at `nvim/colors/lpcstudio`
--
vim.cmd 'colorscheme lpcstudio'
-- -----------------------------------------------------------------------------
-- Disable swapfile
-- -----------------------------------------------------------------------------
--
-- The swapfiles seem unneeded with my local development environment. Crashes
-- are rare, and the files are combersome.
--
vim.opt.swapfile = false
-- -----------------------------------------------------------------------------
-- Show the mode in the command line
-- -----------------------------------------------------------------------------
--
-- I like seeing the mode in the bottom left and not following me around.
-- I generally know what mode I'm in and don't need a vibrant hint.
--
vim.opt.showmode = true
-- -----------------------------------------------------------------------------
-- Make cursor blink
-- -----------------------------------------------------------------------------
--
-- Sometimes on a big monitor I have trouble finding cursors. This helps.
--
vim.cmd [[ set guicursor+=a:blinkon1 ]]
-- -----------------------------------------------------------------------------
-- Automatically resize windows
-- -----------------------------------------------------------------------------
--
--
vim.api.nvim_create_autocmd("VimResized", {
command = "wincmd =",
})
-- -----------------------------------------------------------------------------
-- Default Spacing
-- -----------------------------------------------------------------------------
--
--
--
local space = 4
vim.opt.shiftwidth = space
vim.opt.tabstop = space
vim.opt.softtabstop = space
vim.opt.expandtab = true
vim.opt.shiftround = true
-- -----------------------------------------------------------------------------
-- Keymaps
-- -----------------------------------------------------------------------------
--
--
--
vim.keymap.set('i', '<F15>', '<C-o>o', { noremap = true, silent = true, desc = "Open new line below (Shift+Enter)" })
-- -----------------------------------------------------------------------------
-- Open Help buffers to the right
-- -----------------------------------------------------------------------------
--
--
vim.api.nvim_create_autocmd("FileType", {
desc = "Automatically Split help Buffers to the right",
pattern = "help",
command = "wincmd L",
})
-- -----------------------------------------------------------------------------
-- Search highlight remove on cursor move
-- -----------------------------------------------------------------------------
--
--
local function augroup(name, fnc)
fnc(vim.api.nvim_create_augroup(name, { clear = true }))
end
augroup("ibhagwan/ToggleSearchHL", function(g)
vim.api.nvim_create_autocmd("InsertEnter", {
group = g,
callback = function()
vim.schedule(function() vim.cmd("nohlsearch") end)
end
})
vim.api.nvim_create_autocmd("CursorMoved", {
group = g,
callback = function()
local view, rpos = vim.fn.winsaveview(), vim.fn.getpos(".")
vim.cmd(string.format("silent! keepjumps go%s",
(vim.fn.line2byte(view.lnum) + view.col + 1 - (vim.v.searchforward == 1 and 2 or 0))))
local ok, _ = pcall(vim.cmd, "silent! keepjumps norm! n")
local insearch = ok and (function()
local npos = vim.fn.getpos(".")
return npos[2] == rpos[2] and npos[3] == rpos[3]
end)()
vim.fn.winrestview(view)
if not insearch then
vim.schedule(function() vim.cmd("nohlsearch") end)
end
end
})
end)

View File

@ -0,0 +1,8 @@
return {
'stevearc/conform.nvim',
opts = {
formatters_by_ft = {
blade = { "blade-formatter" }
},
},
}

View File

@ -0,0 +1,2 @@
Coeur dAlene
diminishment

Binary file not shown.

View File

@ -0,0 +1,16 @@
-- Enable modern command-line completion
vim.opt.wildmode = { "longest", "full" }
vim.opt.wildmenu = true
vim.opt.wildoptions = "pum"
vim.opt.pumblend = 10
vim.opt.pumheight = 10
-- Enhanced command-line completion
vim.keymap.set('c', '<C-p>', '<Up>', { noremap = true })
vim.keymap.set('c', '<C-n>', '<Down>', { noremap = true })
-- Set up better command-line experience
vim.opt.cmdheight = 1
vim.opt.laststatus = 2
vim.opt.showmode = true
vim.opt.showcmd = true