Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c83a164a1c | |||
| db2b2d364f | |||
| 00c2714194 | |||
| 311ea6f97e | |||
| b8a764fac9 | |||
| 0765563c63 | |||
| c42a29d509 | |||
| deaffa8343 | |||
| 9da1ccbc85 | |||
| 206336a9a3 | |||
| 4e79b98122 | |||
| 820c2c1207 | |||
| 8b3a35220e | |||
| 3d0d89284f | |||
| ead16ef172 | |||
| 8c9d5aba7f | |||
| 533e740964 |
@@ -1 +1,2 @@
|
|||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
.DS_Store
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"tabWidth": 4,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": false,
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ".prettierrc",
|
||||||
|
"options": {
|
||||||
|
"parser": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
column_width = 120
|
column_width = 80
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
indent_type = "Spaces"
|
indent_type = "Tabs"
|
||||||
indent_width = 2
|
indent_width = 4
|
||||||
quote_style = "AutoPreferDouble"
|
quote_style = "AutoPreferDouble"
|
||||||
call_parentheses = "None"
|
call_parentheses = "None"
|
||||||
|
|||||||
@@ -1,21 +1,50 @@
|
|||||||
### The infamous windows/linux Neovim config
|
<div align="center">
|
||||||
|
<img src="/assets/neovim.png" width="600">
|
||||||
|
</div>
|
||||||
|
|
||||||
## windows
|
# Neovim Configuration
|
||||||
|
|
||||||
# Powershell
|
Personal Neovim configuration using [lazy.nvim](https://github.com/folke/lazy.nvim) for plugin management.
|
||||||
|
|
||||||
Make use of the powershell script to solve a bunch of issues beforehand.
|
## Features
|
||||||
|
|
||||||
```pwsh
|
- **LSP**: Native LSP with Mason for language server management
|
||||||
.\scripts\windows_dependencies.ps1
|
- **Completion**: Blink.cmp with Copilot integration
|
||||||
|
- **Fuzzy Finding**: Telescope for files and grep
|
||||||
|
- **File Explorer**: Snacks.nvim explorer
|
||||||
|
- **Git**: Fugitive, Gitsigns, and GitHub integration
|
||||||
|
- **AI**: Copilot and CopilotChat
|
||||||
|
- **UI**: Bufferline, Lualine, Dropbar, and various colorschemes
|
||||||
|
- **Navigation**: Harpoon, Kitty navigator for splits
|
||||||
|
- **Editing**: Treesitter, autopairs, rainbow delimiters, visual-multi
|
||||||
|
|
||||||
|
## Key Mappings
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------------------- | ----------------------- |
|
||||||
|
| `<leader>e` | File explorer |
|
||||||
|
| `<leader>f` | Find files |
|
||||||
|
| `<leader>g` | Live grep |
|
||||||
|
| `<Tab>` / `<S-Tab>` | Cycle buffers |
|
||||||
|
| `<Alt-Arrow>` | Navigate splits (Kitty) |
|
||||||
|
| `<Alt-c>` | Toggle Copilot Chat |
|
||||||
|
| `<C-q>` | Toggle terminal |
|
||||||
|
| `<leader>u` | Undotree |
|
||||||
|
| `<leader>ap` | Code actions preview |
|
||||||
|
| `<leader>sp` | Colorscheme picker |
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Neovim >= 0.10
|
||||||
|
- Git
|
||||||
|
- A [Nerd Font](https://www.nerdfonts.com/)
|
||||||
|
- ripgrep (for Telescope grep)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Zacharias-Brohn/nvimdots ~/.config/nvim
|
||||||
|
nvim
|
||||||
```
|
```
|
||||||
|
|
||||||
To Do powershell script:
|
Plugins will be installed automatically on first launch.
|
||||||
|
|
||||||
- [] Add binaries to PATH
|
|
||||||
|
|
||||||
## Remove lines containing regex
|
|
||||||
|
|
||||||
```
|
|
||||||
:%g/{regex}/d
|
|
||||||
```
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 225 KiB |
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"suggest.noselect": true,
|
||||||
|
"suggest.enablePreselect": false,
|
||||||
|
"suggest.triggerAfterInsertEnter": true,
|
||||||
|
"inlineSuggest.autoTrigger": false,
|
||||||
|
"suggest.completionItemKindLabels": {
|
||||||
|
"text": "",
|
||||||
|
"method": "",
|
||||||
|
"function": "",
|
||||||
|
"constructor": "",
|
||||||
|
"field": "",
|
||||||
|
"variable": "",
|
||||||
|
"class": "",
|
||||||
|
"interface": "",
|
||||||
|
"module": "",
|
||||||
|
"property": "",
|
||||||
|
"unit": "",
|
||||||
|
"value": "",
|
||||||
|
"enum": "",
|
||||||
|
"keyword": "",
|
||||||
|
"snippet": "",
|
||||||
|
"color": "",
|
||||||
|
"file": "",
|
||||||
|
"reference": "",
|
||||||
|
"folder": "",
|
||||||
|
"enumMember": "",
|
||||||
|
"constant": "",
|
||||||
|
"struct": "",
|
||||||
|
"event": "",
|
||||||
|
"operator": "",
|
||||||
|
"typeParameter": "",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
|
"suggest.floatConfig": {
|
||||||
|
"maxWidth": 80,
|
||||||
|
"winblend": 1,
|
||||||
|
},
|
||||||
|
"suggest.virtualText": false,
|
||||||
|
|
||||||
|
"languageserver": {
|
||||||
|
"hyprlang": {
|
||||||
|
"command": "hyprls",
|
||||||
|
"filetypes": ["hyprlang"]
|
||||||
|
},
|
||||||
|
"qml": {
|
||||||
|
"command": "qmlls6",
|
||||||
|
"filetypes": ["qml"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git.addedSign.hlGroup": "GitGutterAdd",
|
||||||
|
"git.changedSign.hlGroup": "GitGutterChange",
|
||||||
|
"git.removedSign.hlGroup": "GitGutterDelete",
|
||||||
|
"coc.source.file.enable": true,
|
||||||
|
"coc.source.file.ignoreHidden": false,
|
||||||
|
}
|
||||||
@@ -0,0 +1,432 @@
|
|||||||
|
-- Generated by zshell. Material 3 based Neovim colorscheme.
|
||||||
|
-- This file is a Jinja template rendered by zshell.
|
||||||
|
|
||||||
|
vim.g.colors_name = nil
|
||||||
|
vim.o.background = "dark"
|
||||||
|
|
||||||
|
vim.cmd("highlight clear")
|
||||||
|
if vim.fn.exists("syntax_on") == 1 then
|
||||||
|
vim.cmd("syntax reset")
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.g.colors_name = "zshell"
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
local set = vim.api.nvim_set_hl
|
||||||
|
local function hl(group, opts)
|
||||||
|
set(0, group, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function link(from, to)
|
||||||
|
hl(from, { link = to })
|
||||||
|
end
|
||||||
|
|
||||||
|
local is_light = "dark" == "light"
|
||||||
|
local function pick(light, dark)
|
||||||
|
return is_light and light or dark
|
||||||
|
end
|
||||||
|
|
||||||
|
local c = {
|
||||||
|
bg = "#1A1206",
|
||||||
|
bg_alt = "#231A0D",
|
||||||
|
bg_float = "#271E11",
|
||||||
|
bg_popup = "#32291A",
|
||||||
|
bg_cursorline = pick("#32291A", "#3D3324"),
|
||||||
|
bg_fold = "#231A0D",
|
||||||
|
bg_visual = "#733429",
|
||||||
|
bg_search = pick("#B5893E", "#733429"),
|
||||||
|
bg_incsearch = "#7D2C1E",
|
||||||
|
bg_selection = "#7D2C1E",
|
||||||
|
bg_statusline = pick("#32291A", "#271E11"),
|
||||||
|
bg_statusline_nc = "#231A0D",
|
||||||
|
bg_tabline = "#231A0D",
|
||||||
|
bg_tabsel = "#32291A",
|
||||||
|
|
||||||
|
fg = "#F1E0CA",
|
||||||
|
fg_muted = "#DBC3A1",
|
||||||
|
fg_subtle = "#A38E6E",
|
||||||
|
fg_comment = pick("#A38E6E", "#55442A"),
|
||||||
|
fg_strong = pick("#1A1B1F", "#F2F2F7"),
|
||||||
|
fg_on_soft = pick("#17181C", "#F4F4F8"),
|
||||||
|
|
||||||
|
border = "#55442A",
|
||||||
|
accent = "#FFB4A6",
|
||||||
|
accent_container = "#7D2C1E",
|
||||||
|
accent_fg = "#FFDAD4",
|
||||||
|
accent_solid_fg = "#5F150A",
|
||||||
|
|
||||||
|
secondary = "#FFB4A6",
|
||||||
|
secondary_container = "#733429",
|
||||||
|
secondary_fg = "#FFDAD4",
|
||||||
|
secondary_solid_fg = "#561E15",
|
||||||
|
|
||||||
|
tertiary = "#F0BE6D",
|
||||||
|
tertiary_container = "#B5893E",
|
||||||
|
tertiary_fg = "#000000",
|
||||||
|
tertiary_solid_fg = "#432C00",
|
||||||
|
|
||||||
|
error = "#FFB4AB",
|
||||||
|
error_container = "#93000A",
|
||||||
|
error_fg = "#FFDAD6",
|
||||||
|
error_solid_fg = "#690005",
|
||||||
|
|
||||||
|
ok = "#FFBD9D",
|
||||||
|
warn = "#FFDFD5",
|
||||||
|
info = "#B9AB66",
|
||||||
|
hint = "#FFBA8D",
|
||||||
|
add = "#FFBD9D",
|
||||||
|
change = "#B9AB66",
|
||||||
|
delete = "#FF563E",
|
||||||
|
|
||||||
|
cursor_fg = "#5F150A",
|
||||||
|
cursor_bg = "#FFB4A6",
|
||||||
|
match_bg = "#B5893E",
|
||||||
|
match_fg = "#000000",
|
||||||
|
todo_bg = "#B5893E",
|
||||||
|
todo_fg = "#000000",
|
||||||
|
|
||||||
|
-- Syntax accents must stay dynamic. These come from your generated palette
|
||||||
|
-- instead of fixed hex values, so foregrounds change with the wallpaper too.
|
||||||
|
code_keyword = "#F18F8A",
|
||||||
|
code_func = "#FFBA8D",
|
||||||
|
code_string = "#FFBD9D",
|
||||||
|
code_number = "#FFDFD5",
|
||||||
|
code_const = "#FF563E",
|
||||||
|
code_type = "#FFB4A6",
|
||||||
|
code_special = "#F0BE6D",
|
||||||
|
code_preproc = "#FFB4A6",
|
||||||
|
code_builtin = "#FFB4A6",
|
||||||
|
code_param = "#FFDFD5",
|
||||||
|
code_field = "#FFB4A6",
|
||||||
|
code_namespace = "#F0BE6D",
|
||||||
|
code_operator = pick("#FFB4A6", "#FFB4A6"),
|
||||||
|
|
||||||
|
line_current = pick("#232428", "#E7E7EC"),
|
||||||
|
ref_bg = pick("#3D3324", "#32291A"),
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Core UI -------------------------------------------------------------------
|
||||||
|
hl("Normal", { fg = c.fg, bg = c.bg })
|
||||||
|
hl("NormalNC", { fg = c.fg, bg = c.bg })
|
||||||
|
hl("NormalFloat", { fg = c.fg, bg = c.bg_float })
|
||||||
|
hl("FloatBorder", { fg = c.border, bg = c.bg_float })
|
||||||
|
hl("FloatTitle", { fg = c.accent, bg = c.bg_float, bold = true })
|
||||||
|
hl("FloatFooter", { fg = c.fg_muted, bg = c.bg_float })
|
||||||
|
hl("WinSeparator", { fg = c.border, bg = "NONE" })
|
||||||
|
link("VertSplit", "WinSeparator")
|
||||||
|
|
||||||
|
hl("Cursor", { fg = c.cursor_fg, bg = c.cursor_bg })
|
||||||
|
link("lCursor", "Cursor")
|
||||||
|
link("CursorIM", "Cursor")
|
||||||
|
link("TermCursor", "Cursor")
|
||||||
|
|
||||||
|
hl("CursorLine", { bg = c.bg_cursorline })
|
||||||
|
hl("CursorColumn", { bg = c.bg_cursorline })
|
||||||
|
hl("ColorColumn", { bg = c.bg_alt })
|
||||||
|
|
||||||
|
hl("LineNr", { fg = c.fg_subtle, bg = c.bg })
|
||||||
|
hl("LineNrAbove", { fg = c.fg_subtle, bg = c.bg })
|
||||||
|
hl("LineNrBelow", { fg = c.fg_subtle, bg = c.bg })
|
||||||
|
hl("CursorLineNr", { fg = c.line_current, bg = c.bg_cursorline, bold = true })
|
||||||
|
|
||||||
|
hl("SignColumn", { fg = c.fg_muted, bg = c.bg })
|
||||||
|
hl("FoldColumn", { fg = c.fg_muted, bg = c.bg })
|
||||||
|
hl("Folded", { fg = c.fg_muted, bg = c.bg_fold, italic = true })
|
||||||
|
|
||||||
|
hl("NonText", { fg = c.border, bg = "NONE" })
|
||||||
|
link("EndOfBuffer", "NonText")
|
||||||
|
hl("Whitespace", { fg = c.border, bg = "NONE" })
|
||||||
|
hl("SpecialKey", { fg = c.border, bg = "NONE" })
|
||||||
|
|
||||||
|
hl("Visual", { bg = c.bg_visual })
|
||||||
|
link("VisualNOS", "Visual")
|
||||||
|
hl("Search", { fg = c.tertiary_fg, bg = c.bg_search })
|
||||||
|
hl("CurSearch", { fg = c.accent_fg, bg = c.bg_incsearch, bold = true })
|
||||||
|
link("IncSearch", "CurSearch")
|
||||||
|
hl("Substitute", { fg = c.accent_fg, bg = c.bg_incsearch, bold = true })
|
||||||
|
hl("MatchParen", { fg = c.match_fg, bg = c.match_bg, bold = true })
|
||||||
|
|
||||||
|
hl("Pmenu", { fg = c.fg, bg = c.bg_popup })
|
||||||
|
hl("PmenuSel", { fg = c.fg_on_soft, bg = c.bg_selection, bold = true })
|
||||||
|
hl("PmenuKind", { fg = c.secondary, bg = c.bg_popup })
|
||||||
|
hl("PmenuKindSel", { fg = c.fg_on_soft, bg = c.secondary_container, bold = true })
|
||||||
|
hl("PmenuExtra", { fg = c.fg_muted, bg = c.bg_popup })
|
||||||
|
hl("PmenuExtraSel", { fg = c.fg_on_soft, bg = c.bg_selection })
|
||||||
|
hl("PmenuSbar", { bg = c.bg_alt })
|
||||||
|
hl("PmenuThumb", { bg = c.border })
|
||||||
|
hl("PmenuMatch", { fg = c.accent, bg = c.bg_popup, bold = true })
|
||||||
|
hl("PmenuMatchSel", { fg = c.accent, bg = c.bg_selection, bold = true })
|
||||||
|
hl("PmenuBorder", { fg = c.border, bg = c.bg_popup })
|
||||||
|
|
||||||
|
hl("StatusLine", { fg = c.fg_strong, bg = c.bg_statusline })
|
||||||
|
hl("StatusLineNC", { fg = c.fg_muted, bg = c.bg_statusline_nc })
|
||||||
|
link("StatusLineTerm", "StatusLine")
|
||||||
|
link("StatusLineTermNC", "StatusLineNC")
|
||||||
|
hl("TabLine", { fg = c.fg_muted, bg = c.bg_tabline })
|
||||||
|
hl("TabLineFill", { bg = c.bg_tabline })
|
||||||
|
hl("TabLineSel", { fg = c.fg_on_soft, bg = c.accent_container, bold = true })
|
||||||
|
hl("WinBar", { fg = c.fg, bg = c.bg })
|
||||||
|
hl("WinBarNC", { fg = c.fg_muted, bg = c.bg })
|
||||||
|
|
||||||
|
hl("Directory", { fg = c.accent, bg = "NONE" })
|
||||||
|
hl("Title", { fg = c.accent, bg = "NONE", bold = true })
|
||||||
|
hl("Question", { fg = c.secondary, bg = "NONE", bold = true })
|
||||||
|
hl("ModeMsg", { fg = c.accent, bg = "NONE", bold = true })
|
||||||
|
hl("MoreMsg", { fg = c.info, bg = "NONE", bold = true })
|
||||||
|
hl("ErrorMsg", { fg = c.error, bg = "NONE", bold = true })
|
||||||
|
hl("WarningMsg", { fg = c.warn, bg = "NONE", bold = true })
|
||||||
|
hl("OkMsg", { fg = c.ok, bg = "NONE", bold = true })
|
||||||
|
hl("QuickFixLine", { bg = c.bg_selection, bold = true })
|
||||||
|
|
||||||
|
-- Diffs ---------------------------------------------------------------------
|
||||||
|
hl("DiffAdd", { fg = c.add, bg = c.bg_alt })
|
||||||
|
hl("DiffChange", { fg = c.change, bg = c.bg_alt })
|
||||||
|
hl("DiffDelete", { fg = c.delete, bg = c.bg_alt })
|
||||||
|
hl("DiffText", { fg = c.fg_on_soft, bg = c.accent_container, bold = true })
|
||||||
|
link("DiffTextAdd", "DiffText")
|
||||||
|
hl("Added", { fg = c.add })
|
||||||
|
hl("Changed", { fg = c.change })
|
||||||
|
hl("Removed", { fg = c.delete })
|
||||||
|
|
||||||
|
-- Standard syntax groups ----------------------------------------------------
|
||||||
|
hl("Comment", { fg = c.fg_comment, italic = true })
|
||||||
|
hl("Constant", { fg = c.code_const })
|
||||||
|
hl("String", { fg = c.code_string })
|
||||||
|
hl("Character", { fg = c.code_string })
|
||||||
|
hl("Number", { fg = c.code_number })
|
||||||
|
hl("Boolean", { fg = c.code_number, bold = true })
|
||||||
|
hl("Float", { fg = c.code_number })
|
||||||
|
|
||||||
|
hl("Identifier", { fg = c.fg })
|
||||||
|
hl("Function", { fg = c.code_func, bold = true })
|
||||||
|
|
||||||
|
hl("Statement", { fg = c.code_keyword, bold = true })
|
||||||
|
link("Conditional", "Statement")
|
||||||
|
link("Repeat", "Statement")
|
||||||
|
link("Label", "Statement")
|
||||||
|
hl("Operator", { fg = c.code_operator })
|
||||||
|
hl("Keyword", { fg = c.code_keyword, italic = true })
|
||||||
|
link("Exception", "Statement")
|
||||||
|
|
||||||
|
hl("PreProc", { fg = c.code_preproc })
|
||||||
|
link("Include", "PreProc")
|
||||||
|
link("Define", "PreProc")
|
||||||
|
link("Macro", "PreProc")
|
||||||
|
link("PreCondit", "PreProc")
|
||||||
|
|
||||||
|
hl("Type", { fg = c.code_type, bold = true })
|
||||||
|
link("StorageClass", "Type")
|
||||||
|
link("Structure", "Type")
|
||||||
|
link("Typedef", "Type")
|
||||||
|
|
||||||
|
hl("Special", { fg = c.code_special })
|
||||||
|
link("SpecialChar", "Special")
|
||||||
|
link("Tag", "Special")
|
||||||
|
hl("Delimiter", { fg = c.fg_muted })
|
||||||
|
link("SpecialComment", "Special")
|
||||||
|
link("Debug", "Special")
|
||||||
|
|
||||||
|
hl("Underlined", { fg = c.accent, underline = true })
|
||||||
|
hl("Todo", { fg = c.todo_fg, bg = c.todo_bg, bold = true })
|
||||||
|
hl("Error", { fg = c.error, bold = true })
|
||||||
|
|
||||||
|
-- Spell ---------------------------------------------------------------------
|
||||||
|
hl("SpellBad", { sp = c.error, undercurl = true })
|
||||||
|
hl("SpellCap", { sp = c.info, undercurl = true })
|
||||||
|
hl("SpellLocal", { sp = c.hint, undercurl = true })
|
||||||
|
hl("SpellRare", { sp = c.secondary, undercurl = true })
|
||||||
|
|
||||||
|
-- Diagnostics ---------------------------------------------------------------
|
||||||
|
hl("DiagnosticError", { fg = c.error })
|
||||||
|
hl("DiagnosticWarn", { fg = c.warn })
|
||||||
|
hl("DiagnosticInfo", { fg = c.info })
|
||||||
|
hl("DiagnosticHint", { fg = c.hint })
|
||||||
|
hl("DiagnosticOk", { fg = c.ok })
|
||||||
|
|
||||||
|
hl("DiagnosticUnderlineError", { sp = c.error, undercurl = true })
|
||||||
|
hl("DiagnosticUnderlineWarn", { sp = c.warn, undercurl = true })
|
||||||
|
hl("DiagnosticUnderlineInfo", { sp = c.info, undercurl = true })
|
||||||
|
hl("DiagnosticUnderlineHint", { sp = c.hint, undercurl = true })
|
||||||
|
hl("DiagnosticUnderlineOk", { sp = c.ok, undercurl = true })
|
||||||
|
|
||||||
|
link("DiagnosticSignError", "DiagnosticError")
|
||||||
|
link("DiagnosticSignWarn", "DiagnosticWarn")
|
||||||
|
link("DiagnosticSignInfo", "DiagnosticInfo")
|
||||||
|
link("DiagnosticSignHint", "DiagnosticHint")
|
||||||
|
link("DiagnosticSignOk", "DiagnosticOk")
|
||||||
|
|
||||||
|
link("DiagnosticFloatingError", "DiagnosticError")
|
||||||
|
link("DiagnosticFloatingWarn", "DiagnosticWarn")
|
||||||
|
link("DiagnosticFloatingInfo", "DiagnosticInfo")
|
||||||
|
link("DiagnosticFloatingHint", "DiagnosticHint")
|
||||||
|
link("DiagnosticFloatingOk", "DiagnosticOk")
|
||||||
|
|
||||||
|
hl("DiagnosticVirtualTextError", { fg = c.error, bg = c.error_container })
|
||||||
|
hl("DiagnosticVirtualTextWarn", { fg = c.warn, bg = c.bg_alt })
|
||||||
|
hl("DiagnosticVirtualTextInfo", { fg = c.info, bg = c.bg_alt })
|
||||||
|
hl("DiagnosticVirtualTextHint", { fg = c.hint, bg = c.bg_alt })
|
||||||
|
hl("DiagnosticVirtualTextOk", { fg = c.ok, bg = c.bg_alt })
|
||||||
|
|
||||||
|
link("DiagnosticVirtualLinesError", "DiagnosticVirtualTextError")
|
||||||
|
link("DiagnosticVirtualLinesWarn", "DiagnosticVirtualTextWarn")
|
||||||
|
link("DiagnosticVirtualLinesInfo", "DiagnosticVirtualTextInfo")
|
||||||
|
link("DiagnosticVirtualLinesHint", "DiagnosticVirtualTextHint")
|
||||||
|
link("DiagnosticVirtualLinesOk", "DiagnosticVirtualTextOk")
|
||||||
|
|
||||||
|
hl("DiagnosticDeprecated", { fg = c.fg_muted, strikethrough = true })
|
||||||
|
hl("DiagnosticUnnecessary", { fg = c.fg_muted, italic = true })
|
||||||
|
|
||||||
|
-- LSP reference/inlay/codelens ---------------------------------------------
|
||||||
|
hl("LspReferenceText", { bg = c.ref_bg })
|
||||||
|
hl("LspReferenceRead", { bg = c.ref_bg })
|
||||||
|
hl("LspReferenceWrite", { bg = c.ref_bg, sp = c.accent, undercurl = true })
|
||||||
|
hl("LspReferenceTarget", { fg = c.accent, bg = c.ref_bg, bold = true })
|
||||||
|
hl("LspInlayHint", { fg = c.fg_muted, bg = c.bg_alt, italic = true })
|
||||||
|
hl("LspCodeLens", { fg = c.fg_muted, italic = true })
|
||||||
|
hl("LspCodeLensSeparator", { fg = c.border })
|
||||||
|
hl("LspSignatureActiveParameter", { fg = c.accent, bold = true, underline = true })
|
||||||
|
|
||||||
|
-- Treesitter captures -------------------------------------------------------
|
||||||
|
link("@comment", "Comment")
|
||||||
|
link("@comment.documentation", "Comment")
|
||||||
|
link("@comment.todo", "Todo")
|
||||||
|
link("@comment.error", "DiagnosticError")
|
||||||
|
link("@comment.warning", "DiagnosticWarn")
|
||||||
|
link("@comment.note", "DiagnosticInfo")
|
||||||
|
|
||||||
|
link("@constant", "Constant")
|
||||||
|
hl("@constant.builtin", { fg = c.code_builtin, italic = true, bold = true })
|
||||||
|
hl("@constant.macro", { fg = c.code_preproc, bold = true })
|
||||||
|
link("@string", "String")
|
||||||
|
hl("@string.escape", { fg = c.code_special, bold = true })
|
||||||
|
link("@string.regex", "Special")
|
||||||
|
link("@character", "Character")
|
||||||
|
link("@number", "Number")
|
||||||
|
link("@boolean", "Boolean")
|
||||||
|
link("@float", "Float")
|
||||||
|
|
||||||
|
link("@variable", "Identifier")
|
||||||
|
hl("@variable.builtin", { fg = c.code_builtin, italic = true, bold = true })
|
||||||
|
hl("@variable.parameter", { fg = c.code_param, italic = true })
|
||||||
|
hl("@variable.member", { fg = c.code_field })
|
||||||
|
hl("@property", { fg = c.code_field })
|
||||||
|
hl("@field", { fg = c.code_field })
|
||||||
|
|
||||||
|
link("@function", "Function")
|
||||||
|
hl("@function.builtin", { fg = c.code_builtin, bold = true })
|
||||||
|
link("@function.call", "Function")
|
||||||
|
hl("@function.method", { fg = c.code_func })
|
||||||
|
hl("@function.method.call", { fg = c.code_func })
|
||||||
|
hl("@constructor", { fg = c.code_type, bold = true })
|
||||||
|
|
||||||
|
link("@keyword", "Keyword")
|
||||||
|
hl("@keyword.function", { fg = c.code_keyword, bold = true })
|
||||||
|
hl("@keyword.operator", { fg = c.code_operator })
|
||||||
|
link("@keyword.return", "Keyword")
|
||||||
|
link("@conditional", "Conditional")
|
||||||
|
link("@repeat", "Repeat")
|
||||||
|
link("@label", "Label")
|
||||||
|
link("@operator", "Operator")
|
||||||
|
link("@exception", "Exception")
|
||||||
|
|
||||||
|
link("@preproc", "PreProc")
|
||||||
|
link("@include", "Include")
|
||||||
|
link("@define", "Define")
|
||||||
|
link("@macro", "Macro")
|
||||||
|
|
||||||
|
link("@type", "Type")
|
||||||
|
hl("@type.builtin", { fg = c.code_type, italic = true, bold = true })
|
||||||
|
link("@type.definition", "Type")
|
||||||
|
hl("@attribute", { fg = c.code_preproc })
|
||||||
|
hl("@module", { fg = c.code_namespace })
|
||||||
|
hl("@namespace", { fg = c.code_namespace })
|
||||||
|
|
||||||
|
link("@punctuation.delimiter", "Delimiter")
|
||||||
|
link("@punctuation.bracket", "Delimiter")
|
||||||
|
hl("@punctuation.special", { fg = c.code_special })
|
||||||
|
link("@tag", "Tag")
|
||||||
|
hl("@tag.attribute", { fg = c.code_field })
|
||||||
|
link("@tag.delimiter", "Delimiter")
|
||||||
|
|
||||||
|
-- LSP semantic token families ----------------------------------------------
|
||||||
|
link("@lsp.type.class", "@type")
|
||||||
|
link("@lsp.type.comment", "@comment")
|
||||||
|
link("@lsp.type.decorator", "@attribute")
|
||||||
|
link("@lsp.type.enum", "@type")
|
||||||
|
link("@lsp.type.enumMember", "@constant")
|
||||||
|
link("@lsp.type.event", "@property")
|
||||||
|
link("@lsp.type.function", "@function")
|
||||||
|
link("@lsp.type.interface", "@type")
|
||||||
|
link("@lsp.type.keyword", "@keyword")
|
||||||
|
link("@lsp.type.macro", "@macro")
|
||||||
|
link("@lsp.type.method", "@function.method")
|
||||||
|
link("@lsp.type.modifier", "@keyword")
|
||||||
|
link("@lsp.type.namespace", "@namespace")
|
||||||
|
link("@lsp.type.number", "@number")
|
||||||
|
link("@lsp.type.operator", "@operator")
|
||||||
|
link("@lsp.type.parameter", "@variable.parameter")
|
||||||
|
link("@lsp.type.property", "@property")
|
||||||
|
link("@lsp.type.regexp", "@string.regex")
|
||||||
|
link("@lsp.type.string", "@string")
|
||||||
|
link("@lsp.type.struct", "@type")
|
||||||
|
link("@lsp.type.type", "@type")
|
||||||
|
link("@lsp.type.typeParameter", "@type")
|
||||||
|
link("@lsp.type.variable", "@variable")
|
||||||
|
|
||||||
|
hl("@lsp.mod.deprecated", { strikethrough = true })
|
||||||
|
link("@lsp.mod.readonly", "Constant")
|
||||||
|
link("@lsp.typemod.variable.readonly", "Constant")
|
||||||
|
|
||||||
|
-- Common plugin aliases -----------------------------------------------------
|
||||||
|
hl("GitSignsAdd", { fg = c.add, bg = c.bg })
|
||||||
|
hl("GitSignsChange", { fg = c.change, bg = c.bg })
|
||||||
|
hl("GitSignsDelete", { fg = c.delete, bg = c.bg })
|
||||||
|
|
||||||
|
hl("MiniIndentscopeSymbol", { fg = c.border, nocombine = true })
|
||||||
|
hl("IblIndent", { fg = c.border, nocombine = true })
|
||||||
|
hl("IblScope", { fg = c.fg_muted, nocombine = true })
|
||||||
|
|
||||||
|
link("TelescopeNormal", "NormalFloat")
|
||||||
|
link("TelescopeBorder", "FloatBorder")
|
||||||
|
link("TelescopeTitle", "FloatTitle")
|
||||||
|
link("TelescopeSelection", "PmenuSel")
|
||||||
|
hl("TelescopeMatching", { fg = c.accent, bold = true })
|
||||||
|
|
||||||
|
-- Snacks.nvim picker / explorer --------------------------------------------
|
||||||
|
hl("SnacksPicker", { fg = c.fg, bg = c.bg })
|
||||||
|
hl("SnacksPickerBorder", { fg = c.border, bg = c.bg })
|
||||||
|
hl("SnacksPickerBoxBorder", { fg = c.border, bg = c.bg_alt })
|
||||||
|
hl("SnacksPickerTitle", { fg = c.accent, bg = c.bg_alt, bold = true })
|
||||||
|
|
||||||
|
hl("SnacksPickerInput", { fg = c.fg, bg = c.bg_alt })
|
||||||
|
hl("SnacksPickerInputBorder", { fg = c.border, bg = c.bg_alt })
|
||||||
|
hl("SnacksPickerInputTitle", { fg = c.accent, bg = c.bg_alt, bold = true })
|
||||||
|
hl("SnacksPickerInputSearch", { fg = c.accent, bg = c.bg_alt, bold = true })
|
||||||
|
hl("SnacksPickerPrompt", { fg = c.accent, bg = c.bg_alt, bold = true })
|
||||||
|
|
||||||
|
hl("SnacksPickerList", { fg = c.fg, bg = c.bg })
|
||||||
|
hl("SnacksPickerListBorder", { fg = c.border, bg = c.bg })
|
||||||
|
hl("SnacksPickerListTitle", { fg = c.secondary, bg = c.bg, bold = true })
|
||||||
|
hl("SnacksPickerListCursorLine", { bg = c.bg_cursorline })
|
||||||
|
|
||||||
|
hl("SnacksPickerPreview", { fg = c.fg, bg = c.bg_float })
|
||||||
|
hl("SnacksPickerPreviewBorder", { fg = c.border, bg = c.bg_float })
|
||||||
|
hl("SnacksPickerPreviewTitle", { fg = c.tertiary, bg = c.bg_float, bold = true })
|
||||||
|
|
||||||
|
hl("SnacksPickerMatch", { fg = c.accent, bold = true })
|
||||||
|
hl("SnacksPickerFile", { fg = c.fg })
|
||||||
|
hl("SnacksPickerDir", { fg = c.secondary })
|
||||||
|
hl("SnacksPickerPathHidden", { fg = c.fg_muted })
|
||||||
|
hl("SnacksPickerPathIgnored", { fg = c.fg_subtle, italic = true })
|
||||||
|
hl("SnacksPickerPathExcluded", { fg = c.fg_subtle, italic = true })
|
||||||
|
|
||||||
|
hl("SnacksPickerGitStatusAdded", { fg = c.add })
|
||||||
|
hl("SnacksPickerGitStatusModified", { fg = c.change })
|
||||||
|
hl("SnacksPickerGitStatusDeleted", { fg = c.delete })
|
||||||
|
hl("SnacksPickerGitStatusRenamed", { fg = c.info })
|
||||||
|
hl("SnacksPickerGitStatusCopied", { fg = c.info })
|
||||||
|
hl("SnacksPickerGitStatusUntracked", { fg = c.hint })
|
||||||
|
hl("SnacksPickerGitStatusIgnored", { fg = c.fg_subtle })
|
||||||
|
hl("SnacksPickerGitStatusStaged", { fg = c.ok })
|
||||||
|
|
||||||
|
return c
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
local gen_hook = MiniSplitjoin.gen_hook
|
|
||||||
|
|
||||||
local curly = { brackets = { "%b{}" }, separator = ";" }
|
|
||||||
local curly_semi = { brackets = { "%b{}" }, separator = ";" }
|
|
||||||
local add_semicolon_curly = gen_hook.add_trailing_separator(curly)
|
|
||||||
local remove_semicolon_curly = gen_hook.del_trailing_separator(curly)
|
|
||||||
local pad_curly = gen_hook.pad_brackets(curly_semi)
|
|
||||||
|
|
||||||
vim.b.minisplitjoin_config = {
|
|
||||||
split = { hooks_post = { remove_semicolon_curly } },
|
|
||||||
join = { hooks_pre = { add_semicolon_curly }, hooks_post = { pad_curly } },
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,29 +1,43 @@
|
|||||||
require("config.lazy")
|
|
||||||
require("options")
|
|
||||||
require("globals")
|
|
||||||
require("mappings")
|
|
||||||
require("autocmd")
|
|
||||||
require("minimodules").load_modules()
|
|
||||||
vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim")
|
|
||||||
|
|
||||||
if vim.g.neovide then
|
|
||||||
require("config.neovide")
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.filetype.add({
|
|
||||||
pattern = {
|
|
||||||
[".*/hypr/.*%.conf"] = "hyprlang",
|
|
||||||
[".*/uwsm/env.*"] = "zsh",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if vim.env.PROF then
|
if vim.env.PROF then
|
||||||
local snacks = vim.fn.stdpath("data") .. "/lazy/snacks.nvim"
|
local snacks = vim.fn.stdpath "data" .. "/lazy/snacks.nvim"
|
||||||
|
|
||||||
vim.opt.rtp:append( snacks )
|
vim.opt.rtp:append(snacks)
|
||||||
require("snacks.profiler").startup({
|
require("snacks.profiler").startup {
|
||||||
startup = {
|
startup = {
|
||||||
event = "UIEnter",
|
event = "UIEnter",
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local home = os.getenv "HOME"
|
||||||
|
package.path = package.path
|
||||||
|
.. ";"
|
||||||
|
.. home
|
||||||
|
.. "/.luarocks/share/lua/5.4/?.lua"
|
||||||
|
.. ";"
|
||||||
|
.. home
|
||||||
|
.. "/.luarocks/share/lua/5.4/?/init.lua"
|
||||||
|
|
||||||
|
package.cpath = package.cpath .. ";" .. home .. "/.luarocks/lib/lua/5.4/?.so"
|
||||||
|
|
||||||
|
vim.cmd("source " .. vim.fn.stdpath "config" .. "/cursor.vim")
|
||||||
|
require "config.lazy"
|
||||||
|
require "options"
|
||||||
|
require "globals"
|
||||||
|
require "mappings"
|
||||||
|
require "autocmd"
|
||||||
|
require("minimodules").load_modules()
|
||||||
|
-- require("coc-settings")
|
||||||
|
|
||||||
|
if vim.g.neovide then
|
||||||
|
require "config.neovide"
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.filetype.add {
|
||||||
|
pattern = {
|
||||||
|
[".*/hypr/.*%.conf"] = "hyprlang",
|
||||||
|
[".*/uwsm/env.*"] = "zsh",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.cmd.colorscheme "zshell"
|
||||||
|
|||||||
+68
-68
@@ -1,74 +1,74 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.icons = {
|
M.icons = {
|
||||||
misc = {
|
misc = {
|
||||||
dots = "",
|
dots = "",
|
||||||
},
|
},
|
||||||
ft = {
|
ft = {
|
||||||
octo = " ",
|
octo = " ",
|
||||||
gh = " ",
|
gh = " ",
|
||||||
["markdown.gh"] = " ",
|
["markdown.gh"] = " ",
|
||||||
},
|
},
|
||||||
dap = {
|
dap = {
|
||||||
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
|
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
|
||||||
Breakpoint = " ",
|
Breakpoint = " ",
|
||||||
BreakpointCondition = " ",
|
BreakpointCondition = " ",
|
||||||
BreakpointRejected = { " ", "DiagnosticError" },
|
BreakpointRejected = { " ", "DiagnosticError" },
|
||||||
LogPoint = ".>",
|
LogPoint = ".>",
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
Error = " ",
|
Error = " ",
|
||||||
Warn = " ",
|
Warn = " ",
|
||||||
Hint = " ",
|
Hint = " ",
|
||||||
Info = " ",
|
Info = " ",
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
added = " ",
|
added = " ",
|
||||||
modified = " ",
|
modified = " ",
|
||||||
removed = " ",
|
removed = " ",
|
||||||
},
|
},
|
||||||
kinds = {
|
kinds = {
|
||||||
Array = " ",
|
Array = " ",
|
||||||
Boolean = " ",
|
Boolean = " ",
|
||||||
Class = " ",
|
Class = " ",
|
||||||
Codeium = " ",
|
Codeium = " ",
|
||||||
Color = " ",
|
Color = " ",
|
||||||
Control = " ",
|
Control = " ",
|
||||||
Collapsed = " ",
|
Collapsed = " ",
|
||||||
Constant = " ",
|
Constant = " ",
|
||||||
Constructor = " ",
|
Constructor = " ",
|
||||||
Copilot = " ",
|
Copilot = " ",
|
||||||
Enum = " ",
|
Enum = " ",
|
||||||
EnumMember = " ",
|
EnumMember = " ",
|
||||||
Event = " ",
|
Event = " ",
|
||||||
Field = " ",
|
Field = " ",
|
||||||
File = " ",
|
File = " ",
|
||||||
Folder = " ",
|
Folder = " ",
|
||||||
Function = " ",
|
Function = " ",
|
||||||
Interface = " ",
|
Interface = " ",
|
||||||
Key = " ",
|
Key = " ",
|
||||||
Keyword = " ",
|
Keyword = " ",
|
||||||
Method = " ",
|
Method = " ",
|
||||||
Module = " ",
|
Module = " ",
|
||||||
Namespace = " ",
|
Namespace = " ",
|
||||||
Null = " ",
|
Null = " ",
|
||||||
Number = " ",
|
Number = " ",
|
||||||
Object = " ",
|
Object = " ",
|
||||||
Operator = " ",
|
Operator = " ",
|
||||||
Package = " ",
|
Package = " ",
|
||||||
Property = " ",
|
Property = " ",
|
||||||
Reference = " ",
|
Reference = " ",
|
||||||
Snippet = " ",
|
Snippet = " ",
|
||||||
String = " ",
|
String = " ",
|
||||||
Struct = " ",
|
Struct = " ",
|
||||||
Supermaven = " ",
|
Supermaven = " ",
|
||||||
TabNine = " ",
|
TabNine = " ",
|
||||||
Text = " ",
|
Text = " ",
|
||||||
TypeParameter = " ",
|
TypeParameter = " ",
|
||||||
Unit = " ",
|
Unit = " ",
|
||||||
Value = " ",
|
Value = " ",
|
||||||
Variable = " ",
|
Variable = " ",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
+60
-18
@@ -3,7 +3,7 @@ local autocmd = vim.api.nvim_create_autocmd
|
|||||||
autocmd("LspAttach", {
|
autocmd("LspAttach", {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
if client and vim.lsp.document_color and vim.lsp.document_color.enable then
|
if client then
|
||||||
vim.lsp.document_color.enable(false, args.buf, { "background" })
|
vim.lsp.document_color.enable(false, args.buf, { "background" })
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@@ -22,21 +22,63 @@ autocmd("BufWritePre", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- fWindows
|
autocmd({ "InsertLeave" }, {
|
||||||
autocmd("VimLeavePre", {
|
callback = function()
|
||||||
group = vim.api.nvim_create_augroup('fuck_shada_temp', { clear = true }),
|
require("lint").try_lint()
|
||||||
pattern = { '*' },
|
end,
|
||||||
callback = function()
|
})
|
||||||
local status = 0
|
|
||||||
for _, f in ipairs(vim.fn.globpath(vim.fn.stdpath('data') .. '/shada', '*tmp*', false, true)) do
|
local progress = vim.defaulttable()
|
||||||
if vim.tbl_isempty(vim.fn.readfile(f)) then
|
vim.api.nvim_create_autocmd("LspProgress", {
|
||||||
status = status + vim.fn.delete(f)
|
---@param ev {data: {client_id: integer, params: lsp.ProgressParams}}
|
||||||
end
|
callback = function(ev)
|
||||||
end
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
if status ~= 0 then
|
local value = ev.data.params.value --[[@as {percentage?: number, title?: string, message?: string, kind: "begin" | "report" | "end"}]]
|
||||||
vim.notify('Could not delete empty temporary ShaDa files.', vim.log.levels.ERROR)
|
if not client or type(value) ~= "table" then
|
||||||
vim.fn.getchar()
|
return
|
||||||
end
|
end
|
||||||
end,
|
local p = progress[client.id]
|
||||||
desc = "Delete empty temp ShaDa files"
|
|
||||||
|
for i = 1, #p + 1 do
|
||||||
|
if i == #p + 1 or p[i].token == ev.data.params.token then
|
||||||
|
p[i] = {
|
||||||
|
token = ev.data.params.token,
|
||||||
|
msg = ("[%3d%%] %s%s"):format(
|
||||||
|
value.kind == "end" and 100 or value.percentage or 100,
|
||||||
|
value.title or "",
|
||||||
|
value.message and (" **%s**"):format(value.message)
|
||||||
|
or ""
|
||||||
|
),
|
||||||
|
done = value.kind == "end",
|
||||||
|
}
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local msg = {} ---@type string[]
|
||||||
|
progress[client.id] = vim.tbl_filter(function(v)
|
||||||
|
return table.insert(msg, v.msg) or not v.done
|
||||||
|
end, p)
|
||||||
|
|
||||||
|
local spinner = {
|
||||||
|
"⠋",
|
||||||
|
"⠙",
|
||||||
|
"⠹",
|
||||||
|
"⠸",
|
||||||
|
"⠼",
|
||||||
|
"⠴",
|
||||||
|
"⠦",
|
||||||
|
"⠧",
|
||||||
|
"⠇",
|
||||||
|
"⠏",
|
||||||
|
}
|
||||||
|
vim.notify(table.concat(msg, "\n"), "info", {
|
||||||
|
id = "lsp_progress",
|
||||||
|
title = client.name,
|
||||||
|
opts = function(notif)
|
||||||
|
notif.icon = #progress[client.id] == 0 and " "
|
||||||
|
or spinner[math.floor(vim.uv.hrtime() / (1e6 * 80)) % #spinner + 1]
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,221 @@
|
|||||||
|
vim.opt.backup = false
|
||||||
|
vim.opt.writebackup = false
|
||||||
|
vim.opt.completeopt = "menuone,menu,noinsert,noselect,popup"
|
||||||
|
vim.opt.pumheight = 10
|
||||||
|
|
||||||
|
vim.opt.updatetime = 300
|
||||||
|
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
local keyset = vim.keymap.set
|
||||||
|
function _G.check_back_space()
|
||||||
|
local col = vim.fn.col "." - 1
|
||||||
|
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s" ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Use Tab for trigger completion with characters ahead and navigate
|
||||||
|
-- NOTE: There's always a completion item selected by default, you may want to enable
|
||||||
|
-- no select by setting `"suggest.noselect": true` in your configuration file
|
||||||
|
-- NOTE: Use command ':verbose imap <tab>' to make sure Tab is not mapped by
|
||||||
|
-- other plugins before putting this into your config
|
||||||
|
local opts =
|
||||||
|
{ silent = true, noremap = true, expr = true, replace_keycodes = false }
|
||||||
|
keyset(
|
||||||
|
"i",
|
||||||
|
"<TAB>",
|
||||||
|
'coc#pum#visible() ? coc#pum#next(0) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset("i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(0) : "\<C-h>"]], opts)
|
||||||
|
|
||||||
|
-- Make <CR> to accept selected completion item or notify coc.nvim to format
|
||||||
|
-- <C-g>u breaks current undo, please make your own choice
|
||||||
|
|
||||||
|
keyset(
|
||||||
|
"i",
|
||||||
|
"<cr>",
|
||||||
|
[[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]],
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Use <c-j> to trigger snippets
|
||||||
|
keyset("i", "<c-j>", "<Plug>(coc-snippets-expand-jump)")
|
||||||
|
-- Use <c-space> to trigger completion
|
||||||
|
keyset("i", "<c-space>", "coc#refresh()", { silent = true, expr = true })
|
||||||
|
|
||||||
|
-- Use `[g` and `]g` to navigate diagnostics
|
||||||
|
-- Use `:CocDiagnostics` to get all diagnostics of current buffer in location list
|
||||||
|
keyset("n", "[g", "<Plug>(coc-diagnostic-prev)", { silent = true })
|
||||||
|
keyset("n", "]g", "<Plug>(coc-diagnostic-next)", { silent = true })
|
||||||
|
|
||||||
|
-- GoTo code navigation
|
||||||
|
keyset("n", "gd", "<Plug>(coc-definition)", { silent = true })
|
||||||
|
keyset("n", "gy", "<Plug>(coc-type-definition)", { silent = true })
|
||||||
|
keyset("n", "gi", "<Plug>(coc-implementation)", { silent = true })
|
||||||
|
keyset("n", "gr", "<Plug>(coc-references)", { silent = true })
|
||||||
|
|
||||||
|
-- Use K to show documentation in preview window
|
||||||
|
function _G.show_docs()
|
||||||
|
local cw = vim.fn.expand "<cword>"
|
||||||
|
if vim.fn.index({ "vim", "help" }, vim.bo.filetype) >= 0 then
|
||||||
|
vim.api.nvim_command("h " .. cw)
|
||||||
|
elseif vim.api.nvim_eval "coc#rpc#ready()" then
|
||||||
|
vim.fn.CocActionAsync "doHover"
|
||||||
|
else
|
||||||
|
vim.api.nvim_command("!" .. vim.o.keywordprg .. " " .. cw)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
keyset("n", "K", "<CMD>lua _G.show_docs()<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Highlight the symbol and its references on a CursorHold event(cursor is idle)
|
||||||
|
vim.api.nvim_create_augroup("CocGroup", {})
|
||||||
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||||||
|
group = "CocGroup",
|
||||||
|
command = "silent call CocActionAsync('highlight')",
|
||||||
|
desc = "Highlight symbol under cursor on CursorHold",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Symbol renaming
|
||||||
|
keyset("n", "<leader>rn", "<Plug>(coc-rename)", { silent = true })
|
||||||
|
|
||||||
|
-- Formatting selected code
|
||||||
|
keyset("x", "<leader>f", "<Plug>(coc-format-selected)", { silent = true })
|
||||||
|
keyset("n", "<leader>f", "<Plug>(coc-format-selected)", { silent = true })
|
||||||
|
|
||||||
|
-- Setup formatexpr specified filetype(s)
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = "CocGroup",
|
||||||
|
pattern = "typescript,json",
|
||||||
|
command = "setl formatexpr=CocAction('formatSelected')",
|
||||||
|
desc = "Setup formatexpr specified filetype(s).",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Apply codeAction to the selected region
|
||||||
|
-- Example: `<leader>aap` for current paragraph
|
||||||
|
local opts = { silent = true, nowait = true }
|
||||||
|
keyset("x", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
|
||||||
|
keyset("n", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
|
||||||
|
|
||||||
|
-- Remap keys for apply code actions at the cursor position.
|
||||||
|
keyset("n", "<leader>ac", "<Plug>(coc-codeaction-cursor)", opts)
|
||||||
|
-- Remap keys for apply source code actions for current file.
|
||||||
|
keyset("n", "<leader>as", "<Plug>(coc-codeaction-source)", opts)
|
||||||
|
-- Apply the most preferred quickfix action on the current line.
|
||||||
|
keyset("n", "<leader>qf", "<Plug>(coc-fix-current)", opts)
|
||||||
|
|
||||||
|
-- Remap keys for apply refactor code actions.
|
||||||
|
keyset("n", "<leader>re", "<Plug>(coc-codeaction-refactor)", { silent = true })
|
||||||
|
keyset(
|
||||||
|
"x",
|
||||||
|
"<leader>r",
|
||||||
|
"<Plug>(coc-codeaction-refactor-selected)",
|
||||||
|
{ silent = true }
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"n",
|
||||||
|
"<leader>r",
|
||||||
|
"<Plug>(coc-codeaction-refactor-selected)",
|
||||||
|
{ silent = true }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Run the Code Lens actions on the current line
|
||||||
|
keyset("n", "<leader>cl", "<Plug>(coc-codelens-action)", opts)
|
||||||
|
|
||||||
|
-- Map function and class text objects
|
||||||
|
-- NOTE: Requires 'textDocument.documentSymbol' support from the language server
|
||||||
|
keyset("x", "if", "<Plug>(coc-funcobj-i)", opts)
|
||||||
|
keyset("o", "if", "<Plug>(coc-funcobj-i)", opts)
|
||||||
|
keyset("x", "af", "<Plug>(coc-funcobj-a)", opts)
|
||||||
|
keyset("o", "af", "<Plug>(coc-funcobj-a)", opts)
|
||||||
|
keyset("x", "ic", "<Plug>(coc-classobj-i)", opts)
|
||||||
|
keyset("o", "ic", "<Plug>(coc-classobj-i)", opts)
|
||||||
|
keyset("x", "ac", "<Plug>(coc-classobj-a)", opts)
|
||||||
|
keyset("o", "ac", "<Plug>(coc-classobj-a)", opts)
|
||||||
|
|
||||||
|
-- Remap <C-f> and <C-b> to scroll float windows/popups
|
||||||
|
---@diagnostic disable-next-line: redefined-local
|
||||||
|
local opts = { silent = true, nowait = true, expr = true }
|
||||||
|
keyset(
|
||||||
|
"n",
|
||||||
|
"<C-f>",
|
||||||
|
'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"n",
|
||||||
|
"<C-b>",
|
||||||
|
'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"i",
|
||||||
|
"<C-f>",
|
||||||
|
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(1)<cr>" : "<Right>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"i",
|
||||||
|
"<C-b>",
|
||||||
|
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(0)<cr>" : "<Left>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"v",
|
||||||
|
"<C-f>",
|
||||||
|
'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
keyset(
|
||||||
|
"v",
|
||||||
|
"<C-b>",
|
||||||
|
'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"',
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Use CTRL-S for selections ranges
|
||||||
|
-- Requires 'textDocument/selectionRange' support of language server
|
||||||
|
keyset("n", "<C-s>", "<Plug>(coc-range-select)", { silent = true })
|
||||||
|
keyset("x", "<C-s>", "<Plug>(coc-range-select)", { silent = true })
|
||||||
|
|
||||||
|
-- Add `:Format` command to format current buffer
|
||||||
|
vim.api.nvim_create_user_command("Format", "call CocAction('format')", {})
|
||||||
|
|
||||||
|
-- " Add `:Fold` command to fold current buffer
|
||||||
|
vim.api.nvim_create_user_command(
|
||||||
|
"Fold",
|
||||||
|
"call CocAction('fold', <f-args>)",
|
||||||
|
{ nargs = "?" }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Add `:OR` command for organize imports of the current buffer
|
||||||
|
vim.api.nvim_create_user_command(
|
||||||
|
"OR",
|
||||||
|
"call CocActionAsync('runCommand', 'editor.action.organizeImport')",
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Add (Neo)Vim's native statusline support
|
||||||
|
-- NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||||
|
-- provide custom statusline: lightline.vim, vim-airline
|
||||||
|
vim.opt.statusline:prepend "%{coc#status()}%{get(b:,'coc_current_function','')}"
|
||||||
|
|
||||||
|
-- Mappings for CoCList
|
||||||
|
-- code actions and coc stuff
|
||||||
|
---@diagnostic disable-next-line: redefined-local
|
||||||
|
local opts = { silent = true, nowait = true }
|
||||||
|
-- Show all diagnostics
|
||||||
|
keyset("n", "<space>a", ":<C-u>CocList diagnostics<cr>", opts)
|
||||||
|
-- Manage extensions
|
||||||
|
keyset("n", "<space>m", ":<C-u>CocList extensions<cr>", opts)
|
||||||
|
-- Show commands
|
||||||
|
keyset("n", "<space>c", ":<C-u>CocList commands<cr>", opts)
|
||||||
|
-- Find symbol of current document
|
||||||
|
keyset("n", "<space>o", ":<C-u>CocList outline<cr>", opts)
|
||||||
|
-- Search workspace symbols
|
||||||
|
keyset("n", "<space>s", ":<C-u>CocList -I symbols<cr>", opts)
|
||||||
|
-- Do default action for next item
|
||||||
|
keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts)
|
||||||
|
-- Do default action for previous item
|
||||||
|
keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts)
|
||||||
|
-- Resume latest coc list
|
||||||
|
keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts)
|
||||||
@@ -68,6 +68,6 @@ require("actions-preview").setup {
|
|||||||
--- options for snacks picker
|
--- options for snacks picker
|
||||||
---@type snacks.picker.Config
|
---@type snacks.picker.Config
|
||||||
snacks = {
|
snacks = {
|
||||||
layout = { rpreset = "default" },
|
layout = { preset = "default" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
require("copilot_cmp").setup {
|
|
||||||
event = { "InsertEnter", "LspAttach" },
|
|
||||||
fix_pairs = true,
|
|
||||||
}
|
|
||||||
+24
-24
@@ -1,37 +1,37 @@
|
|||||||
require("auto-session").setup ({
|
require("auto-session").setup ({
|
||||||
{
|
{
|
||||||
enabled = true,
|
enabled = true,
|
||||||
root_dir = vim.fn.stdpath "data" .. "/sessions/",
|
root_dir = vim.fn.stdpath "data" .. "/sessions/",
|
||||||
auto_save = true,
|
auto_save = true,
|
||||||
auto_restore = true,
|
auto_restore = true,
|
||||||
auto_create = true,
|
auto_create = true,
|
||||||
suppressed_dirs = nil,
|
suppressed_dirs = nil,
|
||||||
allowed_dirs = nil,
|
allowed_dirs = nil,
|
||||||
auto_restore_last_session = false,
|
auto_restore_last_session = false,
|
||||||
use_git_branch = false,
|
use_git_branch = false,
|
||||||
lazy_support = true,
|
lazy_support = true,
|
||||||
bypass_save_filetypes = nil,
|
bypass_save_filetypes = nil,
|
||||||
close_unsupported_windows = true,
|
close_unsupported_windows = true,
|
||||||
args_allow_single_directory = true,
|
args_allow_single_directory = true,
|
||||||
args_allow_files_auto_save = false,
|
args_allow_files_auto_save = false,
|
||||||
continue_restore_on_error = true,
|
continue_restore_on_error = true,
|
||||||
show_auto_restore_notif = false,
|
show_auto_restore_notif = false,
|
||||||
cwd_change_handling = false,
|
cwd_change_handling = false,
|
||||||
lsp_stop_on_restore = false,
|
lsp_stop_on_restore = false,
|
||||||
log_level = "error",
|
log_level = "error",
|
||||||
session_lens = {
|
session_lens = {
|
||||||
load_on_setup = true,
|
load_on_setup = true,
|
||||||
theme_conf = {
|
theme_conf = {
|
||||||
},
|
},
|
||||||
previewer = false,
|
previewer = false,
|
||||||
mappings = {
|
mappings = {
|
||||||
delete_session = { "i", "<C-D>" },
|
delete_session = { "i", "<C-D>" },
|
||||||
alternate_session = { "i", "<C-S>" },
|
alternate_session = { "i", "<C-S>" },
|
||||||
copy_session = { "i", "<C-Y>" },
|
copy_session = { "i", "<C-Y>" },
|
||||||
},
|
},
|
||||||
session_control = {
|
session_control = {
|
||||||
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
|
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
|
||||||
control_filename = "session_control.json",
|
control_filename = "session_control.json",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-5
@@ -3,16 +3,24 @@ require("bufferline").setup ({
|
|||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
local s = " "
|
local s = " "
|
||||||
for e, n in pairs(diagnostics_dict) do
|
if diagnostics_dict then
|
||||||
local sym = e == "error" and " "
|
for e, n in pairs(diagnostics_dict) do
|
||||||
or (e == "warning" and " " or " ")
|
local sym = e == "error" and " "
|
||||||
s = s .. n .. sym
|
or (e == "warning" and " " or " ")
|
||||||
|
s = sym .. n
|
||||||
|
end
|
||||||
|
return s
|
||||||
end
|
end
|
||||||
return s
|
return ""
|
||||||
end,
|
end,
|
||||||
show_close_icon = false,
|
show_close_icon = false,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
always_show_bufferline = true,
|
always_show_bufferline = true,
|
||||||
|
tab_size = 1,
|
||||||
|
indicator = {
|
||||||
|
style = "icon",
|
||||||
|
icon = "▎",
|
||||||
|
},
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "NvimTree",
|
filetype = "NvimTree",
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
opts = {
|
||||||
|
max_completions = 1,
|
||||||
|
max_attempts = 2,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local icons = require("assets.icons").icons.kinds
|
||||||
|
|
||||||
|
local devicons = {
|
||||||
|
default_icon = { icon = "", name = "Default" },
|
||||||
|
js = { icon = "", name = "js" },
|
||||||
|
ts = { icon = "", name = "ts" },
|
||||||
|
lock = { icon = "", name = "lock" },
|
||||||
|
["robots.txt"] = { icon = "", name = "robots" },
|
||||||
|
}
|
||||||
|
|
||||||
|
M.components = {
|
||||||
|
kind_icon = {
|
||||||
|
text = function(ctx)
|
||||||
|
local icon = (icons[ctx.kind] or "")
|
||||||
|
|
||||||
|
return icon .. " "
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
kind = {
|
||||||
|
highlight = function(ctx)
|
||||||
|
return ctx.kind
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local opts = {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = {
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
{
|
||||||
|
"fang2hou/blink-copilot",
|
||||||
|
config = function()
|
||||||
|
require "config.blink-copilot"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
version = "1.*",
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
keymap = {
|
||||||
|
["<Tab>"] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.is_visible() then
|
||||||
|
return cmp.select_next()
|
||||||
|
end
|
||||||
|
|
||||||
|
if cmp.snippet_active() then
|
||||||
|
return cmp.snippet_forward()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"fallback",
|
||||||
|
},
|
||||||
|
["<S-Tab>"] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.is_visible() then
|
||||||
|
return cmp.select_prev()
|
||||||
|
end
|
||||||
|
|
||||||
|
if cmp.snippet_active() then
|
||||||
|
return cmp.snippet_backward()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"fallback",
|
||||||
|
},
|
||||||
|
["<CR>"] = { "accept", "fallback" },
|
||||||
|
["Up"] = {},
|
||||||
|
["Down"] = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
|
||||||
|
cmdline = {
|
||||||
|
completion = {
|
||||||
|
menu = { auto_show = true },
|
||||||
|
list = { selection = { preselect = false } },
|
||||||
|
},
|
||||||
|
|
||||||
|
keymap = {
|
||||||
|
["<Tab>"] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.is_visible() then
|
||||||
|
return cmp.select_next()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"fallback",
|
||||||
|
},
|
||||||
|
["<S-Tab>"] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.is_visible() then
|
||||||
|
return cmp.select_prev()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"fallback",
|
||||||
|
},
|
||||||
|
["<CR>"] = { "accept", "fallback" },
|
||||||
|
["Up"] = {},
|
||||||
|
["Down"] = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
documentation = { auto_show = true, auto_show_delay_ms = 50 },
|
||||||
|
keyword = { range = "full" },
|
||||||
|
accept = { auto_brackets = { enabled = true } },
|
||||||
|
ghost_text = { enabled = true },
|
||||||
|
list = {
|
||||||
|
selection = {
|
||||||
|
-- preselect = false,
|
||||||
|
auto_insert = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
menu = {
|
||||||
|
scrollbar = false,
|
||||||
|
border = "single",
|
||||||
|
draw = {
|
||||||
|
padding = 1,
|
||||||
|
columns = {
|
||||||
|
{ "kind_icon" },
|
||||||
|
{ "label", "label_description", gap = 1 },
|
||||||
|
{ "kind" },
|
||||||
|
},
|
||||||
|
components = M.components,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
signature = { enabled = true },
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
default = { "lsp", "path", "snippets", "buffer", "copilot" },
|
||||||
|
providers = {
|
||||||
|
lsp = {
|
||||||
|
score_offset = 50,
|
||||||
|
},
|
||||||
|
|
||||||
|
path = {
|
||||||
|
opts = {
|
||||||
|
get_cwd = function()
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
buffer = {
|
||||||
|
score_offset = -10,
|
||||||
|
},
|
||||||
|
|
||||||
|
snippets = {
|
||||||
|
score_offset = 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
copilot = {
|
||||||
|
name = "copilot",
|
||||||
|
module = "blink-copilot",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
snippets = {
|
||||||
|
preset = "default",
|
||||||
|
},
|
||||||
|
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
---@diagnostic disable: redundant-parameter
|
||||||
|
require("catppuccin").setup {
|
||||||
|
flavour = "latte",
|
||||||
|
background = {
|
||||||
|
light = "latte",
|
||||||
|
dark = "latte",
|
||||||
|
},
|
||||||
|
transparent_background = false,
|
||||||
|
float = {
|
||||||
|
transparent = false,
|
||||||
|
solid = false,
|
||||||
|
},
|
||||||
|
show_end_of_buffer = false,
|
||||||
|
term_colors = false,
|
||||||
|
dim_inactive = {
|
||||||
|
enabled = false,
|
||||||
|
shade = "dark",
|
||||||
|
percentage = 0.15,
|
||||||
|
},
|
||||||
|
no_italic = false,
|
||||||
|
no_bold = false,
|
||||||
|
no_underline = false,
|
||||||
|
styles = {
|
||||||
|
comments = { "italic" },
|
||||||
|
conditionals = { "italic" },
|
||||||
|
loops = {},
|
||||||
|
functions = {},
|
||||||
|
keywords = {},
|
||||||
|
strings = {},
|
||||||
|
variables = {},
|
||||||
|
numbers = {},
|
||||||
|
booleans = {},
|
||||||
|
properties = {},
|
||||||
|
types = {},
|
||||||
|
operators = {},
|
||||||
|
-- miscs = {},
|
||||||
|
},
|
||||||
|
lsp_styles = {
|
||||||
|
virtual_text = {
|
||||||
|
errors = { "italic" },
|
||||||
|
hints = { "italic" },
|
||||||
|
warnings = { "italic" },
|
||||||
|
information = { "italic" },
|
||||||
|
ok = { "italic" },
|
||||||
|
},
|
||||||
|
underlines = {
|
||||||
|
errors = { "underline" },
|
||||||
|
hints = { "underline" },
|
||||||
|
warnings = { "underline" },
|
||||||
|
information = { "underline" },
|
||||||
|
ok = { "underline" },
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color_overrides = {},
|
||||||
|
custom_highlights = {},
|
||||||
|
default_integrations = true,
|
||||||
|
auto_integrations = false,
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
nvimtree = true,
|
||||||
|
notify = false,
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
require("chatgpt").setup({
|
||||||
|
api_host_cmd = "echo http://localhost:5000",
|
||||||
|
api_key_cmd = "echo ''",
|
||||||
|
openai_params = {
|
||||||
|
model = "Selene-1-Mini-Llama-3.1-8B-EXL3",
|
||||||
|
frequency_penalty = 0,
|
||||||
|
presence_penalty = 0,
|
||||||
|
max_tokens = 1024,
|
||||||
|
temperature = 0.1,
|
||||||
|
top_p = 1,
|
||||||
|
n = 1,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
close = "<C-c>",
|
||||||
|
close_n = "<Esc>",
|
||||||
|
yank_last = "<C-y>",
|
||||||
|
yank_last_code = "<C-k>",
|
||||||
|
scroll_up = "<C-u>",
|
||||||
|
scroll_down = "<C-d>",
|
||||||
|
new_session = "<C-l>",
|
||||||
|
cycle_windows = "<Tab>",
|
||||||
|
cycle_modes = "<C-f>",
|
||||||
|
next_message = "<C-j>",
|
||||||
|
prev_message = "<C-k>",
|
||||||
|
select_session = "<Space>",
|
||||||
|
rename_session = "r",
|
||||||
|
delete_session = "d",
|
||||||
|
draft_message = "<C-r>",
|
||||||
|
edit_message = "e",
|
||||||
|
delete_message = "d",
|
||||||
|
toggle_settings = "<C-o>",
|
||||||
|
toggle_sessions = "<C-p>",
|
||||||
|
toggle_help = "<C-h>",
|
||||||
|
toggle_message_role = "<C-r>",
|
||||||
|
toggle_system_role_open = "<C-s>",
|
||||||
|
stop_generating = "<C-x>",
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M = {
|
||||||
|
keymaps = {
|
||||||
|
toggle = "<C-S-q>",
|
||||||
|
quit = nil,
|
||||||
|
},
|
||||||
|
|
||||||
|
border = "rounded",
|
||||||
|
width = "0.8",
|
||||||
|
height = "0.8",
|
||||||
|
model = "gpt-5.2",
|
||||||
|
autoinstall = false,
|
||||||
|
panel = false,
|
||||||
|
use_buffer = false,
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1,28 +1,26 @@
|
|||||||
local is_windows = package.config:sub(1,1) == "\\"
|
require("copilot").setup {
|
||||||
require("copilot").setup({
|
|
||||||
|
|
||||||
panel = {
|
panel = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
auto_refresh = true,
|
auto_refresh = true,
|
||||||
keymap = {
|
keymap = {
|
||||||
jump_prev = "[[",
|
jump_prev = "[[",
|
||||||
jump_next = "]]",
|
jump_next = "]]",
|
||||||
accept = "<CR>",
|
accept = "<CR>",
|
||||||
refresh = "gr",
|
refresh = "gr",
|
||||||
open = "<M-CR>"
|
open = "<M-CR>",
|
||||||
},
|
},
|
||||||
layout = {
|
layout = {
|
||||||
position = "bottom", -- | top | left | right | horizontal | vertical
|
position = "bottom", -- | top | left | right | horizontal | vertical
|
||||||
ratio = 0.4
|
ratio = 0.4,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
suggestion = {
|
suggestion = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
auto_trigger = true,
|
auto_trigger = true,
|
||||||
hide_during_completion = false,
|
hide_during_completion = true,
|
||||||
debounce = 75,
|
debounce = 75,
|
||||||
keymap = {
|
keymap = {
|
||||||
accept = is_windows and "<A-a>" or "<A-a>",
|
accept = "<A-tab>",
|
||||||
accept_word = false,
|
accept_word = false,
|
||||||
accept_line = false,
|
accept_line = false,
|
||||||
next = "<M-]>",
|
next = "<M-]>",
|
||||||
@@ -32,8 +30,8 @@ require("copilot").setup({
|
|||||||
},
|
},
|
||||||
filetypes = {
|
filetypes = {
|
||||||
-- yaml = false,
|
-- yaml = false,
|
||||||
-- markdown = false,
|
markdown = true,
|
||||||
-- help = false,
|
help = true,
|
||||||
-- gitcommit = false,
|
-- gitcommit = false,
|
||||||
-- gitrebase = false,
|
-- gitrebase = false,
|
||||||
-- hgcommit = false,
|
-- hgcommit = false,
|
||||||
@@ -51,11 +49,11 @@ require("copilot").setup({
|
|||||||
-- hypr = false,
|
-- hypr = false,
|
||||||
-- ["."] = false,
|
-- ["."] = false,
|
||||||
},
|
},
|
||||||
copilot_node_command = 'node',
|
copilot_node_command = "node",
|
||||||
server_opts_overrides = {},
|
server_opts_overrides = {},
|
||||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd( "CopilotChatSave AutoSave" )
|
vim.cmd "CopilotChatSave AutoSave"
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
})
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
return {
|
||||||
|
"yarospace/dev-tools.nvim",
|
||||||
|
opts = {
|
||||||
|
actions = {},
|
||||||
|
|
||||||
|
filetypes = {
|
||||||
|
include = {},
|
||||||
|
exclude = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
builtin_actions = {
|
||||||
|
include = {},
|
||||||
|
exclude = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
action_opts = {
|
||||||
|
{
|
||||||
|
group = "Debuggins",
|
||||||
|
name = "Log vars under cursor",
|
||||||
|
opts = {
|
||||||
|
keymap = {
|
||||||
|
global = "<leader>dl",
|
||||||
|
picker = "<M-l>",
|
||||||
|
hide = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
override = true,
|
||||||
|
group_actions = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"Bekaboo/dropbar.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
run = "make"
|
||||||
|
},
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
bar = {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
local opts = {
|
||||||
|
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||||
|
popup_border_style = Util.ui.borderchars("thick", "tl-t-tr-r-br-b-bl-l"),
|
||||||
|
sources = {
|
||||||
|
"filesystem",
|
||||||
|
"buffers",
|
||||||
|
"git_status",
|
||||||
|
"diagnostics",
|
||||||
|
-- "document_symbols",
|
||||||
|
},
|
||||||
|
source_selector = {
|
||||||
|
winbar = true, -- toggle to show selector on winbar
|
||||||
|
content_layout = "center",
|
||||||
|
tabs_layout = "equal",
|
||||||
|
show_separator_on_edge = true,
|
||||||
|
sources = {
|
||||||
|
{ source = "filesystem", display_name = "" },
|
||||||
|
{ source = "buffers", display_name = "" },
|
||||||
|
{ source = "git_status", display_name = "" },
|
||||||
|
-- { source = "document_symbols", display_name = "o" },
|
||||||
|
{ source = "diagnostics", display_name = "" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
indent_size = 2,
|
||||||
|
padding = 1, -- extra padding on left hand side
|
||||||
|
-- indent guides
|
||||||
|
with_markers = true,
|
||||||
|
indent_marker = "│",
|
||||||
|
last_indent_marker = "└",
|
||||||
|
-- expander config, needed for nesting files
|
||||||
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
|
},
|
||||||
|
icon = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
folder_empty = "",
|
||||||
|
folder_empty_open = "",
|
||||||
|
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||||
|
-- then these will never be used.
|
||||||
|
default = " ",
|
||||||
|
},
|
||||||
|
modified = { symbol = "" },
|
||||||
|
git_status = { symbols = Icon.git },
|
||||||
|
diagnostics = { symbols = Icon.diagnostics },
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
width = 40,
|
||||||
|
mappings = {
|
||||||
|
["<1-LeftMouse>"] = "open",
|
||||||
|
["l"] = "open",
|
||||||
|
["<space>"] = "none",
|
||||||
|
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filesystem = {
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["H"] = "navigate_up",
|
||||||
|
["<bs>"] = "toggle_hidden",
|
||||||
|
["."] = "set_root",
|
||||||
|
["/"] = "fuzzy_finder",
|
||||||
|
["f"] = "filter_on_submit",
|
||||||
|
["<c-x>"] = "clear_filter",
|
||||||
|
["a"] = { "add", config = { show_path = "relative" } }, -- "none", "relative", "absolute"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filtered_items = {
|
||||||
|
hide_dotfiles = false,
|
||||||
|
hide_gitignored = false,
|
||||||
|
},
|
||||||
|
follow_current_file = {
|
||||||
|
enabled = true,
|
||||||
|
}, -- This will find and focus the file in the active buffer every
|
||||||
|
-- time the current file is changed while the tree is open.
|
||||||
|
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||||
|
},
|
||||||
|
async_directory_scan = "always",
|
||||||
|
}
|
||||||
|
|
||||||
|
opts.filesystem.components =
|
||||||
|
require "config.features.neo-tree.sources.filesystem.components"
|
||||||
|
local function hideCursor()
|
||||||
|
vim.cmd [[
|
||||||
|
setlocal guicursor=n:block-Cursor
|
||||||
|
setlocal foldcolumn=0
|
||||||
|
hi Cursor blend=100
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
local function showCursor()
|
||||||
|
vim.cmd [[
|
||||||
|
setlocal guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
|
||||||
|
hi Cursor blend=0
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
local neotree_group = Util.augroup "neo-tree_hide_cursor"
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter", "InsertEnter" }, {
|
||||||
|
group = neotree_group,
|
||||||
|
callback = function()
|
||||||
|
local action = vim.bo.filetype == "neo-tree" and hideCursor
|
||||||
|
or showCursor
|
||||||
|
action()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd({ "WinLeave", "BufLeave", "InsertEnter" }, {
|
||||||
|
group = neotree_group,
|
||||||
|
callback = function()
|
||||||
|
showCursor()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
return opts
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.name(config, node, state)
|
||||||
|
local common = require "neo-tree.sources.common.components"
|
||||||
|
local highlights = require "neo-tree.ui.highlights"
|
||||||
|
|
||||||
|
local highlight = config.highlight or highlights.FILE_NAME
|
||||||
|
local text = node.name
|
||||||
|
if node.type == "directory" then
|
||||||
|
highlight = highlights.DIRECTORY_NAME
|
||||||
|
if config.trailing_slash and text ~= "/" then
|
||||||
|
text = text .. "/"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if node:get_depth() == 1 and node.type ~= "message" then
|
||||||
|
highlight = highlights.ROOT_NAME
|
||||||
|
text = vim.fn.fnamemodify(text, ":p:h:t")
|
||||||
|
text = string.upper(text)
|
||||||
|
else
|
||||||
|
local filtered_by = common.filtered_by(config, node, state)
|
||||||
|
highlight = filtered_by.highlight or highlight
|
||||||
|
if config.use_git_status_colors then
|
||||||
|
local git_status = state.components.git_status({}, node, state)
|
||||||
|
if git_status and git_status.highlight then
|
||||||
|
highlight = git_status.highlight
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(config.right_padding) == "number" then
|
||||||
|
if config.right_padding > 0 then
|
||||||
|
text = text .. string.rep(" ", config.right_padding)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
text = text .. " "
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
text = text,
|
||||||
|
highlight = highlight,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.icon(config, node, state)
|
||||||
|
local common = require "neo-tree.sources.common.components"
|
||||||
|
local highlights = require "neo-tree.ui.highlights"
|
||||||
|
|
||||||
|
local icon = config.default or " "
|
||||||
|
local highlight = config.highlight or highlights.FILE_ICON
|
||||||
|
if node.type == "directory" then
|
||||||
|
highlight = highlights.DIRECTORY_ICON
|
||||||
|
if node.loaded and not node:has_children() then
|
||||||
|
icon = not node.empty_expanded and config.folder_empty
|
||||||
|
or config.folder_empty_open
|
||||||
|
elseif node:is_expanded() then
|
||||||
|
icon = config.folder_open or "-"
|
||||||
|
else
|
||||||
|
icon = config.folder_closed or "+"
|
||||||
|
end
|
||||||
|
elseif node.type == "file" or node.type == "terminal" then
|
||||||
|
local success, web_devicons = pcall(require, "nvim-web-devicons")
|
||||||
|
if success then
|
||||||
|
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
|
||||||
|
icon = devicon or icon
|
||||||
|
highlight = hl or highlight
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local filtered_by = common.filtered_by(config, node, state)
|
||||||
|
|
||||||
|
-- Don't render icon in root folder
|
||||||
|
if node:get_depth() == 1 then
|
||||||
|
return {
|
||||||
|
text = nil,
|
||||||
|
highlight = highlight,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
text = icon .. " ",
|
||||||
|
highlight = filtered_by.highlight or highlight,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
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 {
|
|
||||||
indent = { char = "▏" },
|
|
||||||
scope = { highlight = highlight },
|
|
||||||
}
|
|
||||||
|
|
||||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
local opts = {}
|
|
||||||
|
|
||||||
opts = {
|
|
||||||
file_types = { "markdown" },
|
|
||||||
completions = {
|
|
||||||
lsp = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
render_modes = true,
|
|
||||||
|
|
||||||
anti_conceal = {
|
|
||||||
enabled = true,
|
|
||||||
above = 1,
|
|
||||||
below = 1,
|
|
||||||
},
|
|
||||||
|
|
||||||
code = {
|
|
||||||
enabled = true,
|
|
||||||
render_modes = false,
|
|
||||||
sign = true,
|
|
||||||
conceal_delimiters = true,
|
|
||||||
language = true,
|
|
||||||
position = "left",
|
|
||||||
language_icon = true,
|
|
||||||
language_name = true,
|
|
||||||
language_info = true,
|
|
||||||
language_pad = 0,
|
|
||||||
width = "full",
|
|
||||||
left_margin = 0,
|
|
||||||
left_pad = 2,
|
|
||||||
right_pad = 0,
|
|
||||||
min_width = 40,
|
|
||||||
border = "thick",
|
|
||||||
language_border = "█",
|
|
||||||
language_left = "",
|
|
||||||
language_right = "",
|
|
||||||
above = "▄",
|
|
||||||
below = "▀",
|
|
||||||
inline = true,
|
|
||||||
inline_left = "",
|
|
||||||
inline_right = "",
|
|
||||||
inline_pad = 0,
|
|
||||||
priority = 140,
|
|
||||||
highlight = "RenderMarkdownCode",
|
|
||||||
highlight_info = "RenderMarkdownCodeInfo",
|
|
||||||
highlight_language = nil,
|
|
||||||
highlight_border = "RenderMarkdownCodeBorder",
|
|
||||||
highlight_fallback = "RenderMarkdownCodeFallback",
|
|
||||||
highlight_inline = "RenderMarkdownCodeInline",
|
|
||||||
style = "full",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return opts
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.plugin = {
|
|
||||||
"sbdchd/neoformat",
|
|
||||||
config = function()
|
|
||||||
vim.g.neoformat_enabled_lua = { "luaformatter" }
|
|
||||||
vim.g.neoformat_enabled_python = { "black" }
|
|
||||||
vim.g.neoformat_enabled_javascript = { "prettier" }
|
|
||||||
vim.g.neoformat_enabled_typescript = { "prettier" }
|
|
||||||
vim.g.neoformat_enabled_qml = { "qmlformat" }
|
|
||||||
vim.g.neoformat_enabled_go = { "gofmt" }
|
|
||||||
vim.g.neoformat_enabled_sh = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_bash = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_zsh = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_powershell = { "pwshfmt" } -- experimental
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
local palettes = {}
|
||||||
|
|
||||||
|
require("github-theme").setup {
|
||||||
|
options = {
|
||||||
|
compile_path = vim.fn.stdpath "cache" .. "/github-theme",
|
||||||
|
compile_file_suffix = "_compiled",
|
||||||
|
hide_end_of_buffer = true,
|
||||||
|
hide_nc_statusline = true,
|
||||||
|
transparent = false,
|
||||||
|
terminal_colors = true,
|
||||||
|
dim_inactive = false,
|
||||||
|
module_default = true,
|
||||||
|
styles = {
|
||||||
|
comments = "italic",
|
||||||
|
functions = "NONE",
|
||||||
|
keywords = "NONE",
|
||||||
|
variables = "NONE",
|
||||||
|
conditionals = "NONE",
|
||||||
|
constants = "NONE",
|
||||||
|
numbers = "NONE",
|
||||||
|
operators = "NONE",
|
||||||
|
strings = "NONE",
|
||||||
|
types = "NONE",
|
||||||
|
},
|
||||||
|
inverse = {
|
||||||
|
match_paren = false,
|
||||||
|
visual = false,
|
||||||
|
search = false,
|
||||||
|
},
|
||||||
|
darken = {
|
||||||
|
floats = true,
|
||||||
|
sidebars = {
|
||||||
|
enable = true,
|
||||||
|
list = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
modules = {},
|
||||||
|
},
|
||||||
|
palettes = {},
|
||||||
|
specs = {},
|
||||||
|
groups = {},
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
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 {
|
||||||
|
indent = { char = "▏" },
|
||||||
|
scope = { highlight = highlight }
|
||||||
|
}
|
||||||
|
|
||||||
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
require("kanagawa").setup({
|
||||||
|
compile = true,
|
||||||
|
undercurl = true,
|
||||||
|
commentStyle = { italic = true },
|
||||||
|
functionStyle = {},
|
||||||
|
keywordStyle = { italic = true},
|
||||||
|
statementStyle = { bold = true },
|
||||||
|
typeStyle = {},
|
||||||
|
transparent = false,
|
||||||
|
dimInactive = false,
|
||||||
|
terminalColors = true,
|
||||||
|
colors = {
|
||||||
|
palette = {},
|
||||||
|
theme = { wave = {}, lotus = {}, dragon = {}, all = {} },
|
||||||
|
},
|
||||||
|
overrides = function(colors)
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
theme = "dragon",
|
||||||
|
background = {
|
||||||
|
dark = "dragon",
|
||||||
|
light = "lotus"
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
require("lint").linters_by_ft = {
|
||||||
|
javascript = { "eslint" },
|
||||||
|
javascriptreact = { "eslint" },
|
||||||
|
typescript = { "eslint" },
|
||||||
|
typescriptreact = { "eslint" },
|
||||||
|
lua = { "luacheck" },
|
||||||
|
python = { "pylint" },
|
||||||
|
go = { "golangci_lint" },
|
||||||
|
rust = { "clippy" },
|
||||||
|
zsh = { "zsh" },
|
||||||
|
sh = { "zsh" },
|
||||||
|
bash = { "zsh" },
|
||||||
|
cpp = { "cpplint" },
|
||||||
|
markdown = { "markdownlint" },
|
||||||
|
json = { "jsonlint" },
|
||||||
|
yaml = { "yamllint" },
|
||||||
|
qml = { "qmllint" },
|
||||||
|
}
|
||||||
|
|
||||||
|
local default_severity = {
|
||||||
|
['error'] = vim.diagnostic.severity.ERROR,
|
||||||
|
['warning'] = vim.diagnostic.severity.WARN,
|
||||||
|
['information'] = vim.diagnostic.severity.INFO,
|
||||||
|
['hint'] = vim.diagnostic.severity.HINT,
|
||||||
|
}
|
||||||
|
require("lint").linters.qmllint = {
|
||||||
|
name = "qmllint",
|
||||||
|
cmd = "qmllint",
|
||||||
|
stdin = true,
|
||||||
|
append_fname = true,
|
||||||
|
args = {},
|
||||||
|
stream = nil,
|
||||||
|
ignore_exitcode = true,
|
||||||
|
env = nil,
|
||||||
|
parser = require("lint.parser").from_pattern(
|
||||||
|
"([^:]+):(%d+) : (.+)",
|
||||||
|
{ "filename", "lnum", "message" },
|
||||||
|
default_severity,
|
||||||
|
{[ "source" ] = "qmllint" }
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
vim.cmd.colorscheme "tokyodark"
|
||||||
|
vim.o.background = "dark"
|
||||||
@@ -21,7 +21,7 @@ local capabilities = vim.tbl_deep_extend(
|
|||||||
"force",
|
"force",
|
||||||
{},
|
{},
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
cmp_lsp.default_capabilities()
|
cmp_lsp.default_capabilities()
|
||||||
)
|
)
|
||||||
|
|
||||||
require("fidget").setup {}
|
require("fidget").setup {}
|
||||||
@@ -30,7 +30,6 @@ require("mason-lspconfig").setup {
|
|||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"qmlls",
|
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"gopls",
|
"gopls",
|
||||||
},
|
},
|
||||||
@@ -164,7 +163,6 @@ cmp.setup {
|
|||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
{ name = "copilot" },
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,9 +236,13 @@ lspconfig("texlab", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
lspconfig("qmlls", {
|
lspconfig("qmlls", {
|
||||||
cmd = { "qmlls6", "qmlls" },
|
cmd = { "qmlls6" },
|
||||||
filetypes = { "qml", "qmljs" },
|
filetypes = { "qml" },
|
||||||
root_markers = { ".git" },
|
single_file_support = true,
|
||||||
|
root_dir = function(bufnr, on_dir)
|
||||||
|
local root = vim.fs.root(bufnr, ".git")
|
||||||
|
on_dir(root)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig("jsonls", {
|
lspconfig("jsonls", {
|
||||||
@@ -283,14 +285,9 @@ local flat_servers = flatten_to_array(servers)
|
|||||||
for _, server in ipairs(flat_servers) do
|
for _, server in ipairs(flat_servers) do
|
||||||
lspconfig(server, {
|
lspconfig(server, {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.name == "typos_lsp" or client.name == "copilot" then
|
if client.name == "typos_lsp" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
require("workspace-diagnostics").populate_workspace_diagnostics(
|
|
||||||
client,
|
|
||||||
bufnr
|
|
||||||
)
|
|
||||||
end,
|
end,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
require("lspsaga").setup({
|
||||||
|
|
||||||
|
symbol_in_winbar = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
code_action = " ",
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
require("monokai-pro").setup({
|
||||||
|
transparent_background = false,
|
||||||
|
terminal_colors = true,
|
||||||
|
devicons = true,
|
||||||
|
styles = {
|
||||||
|
comment = { italic = true },
|
||||||
|
keyword = { italic = true },
|
||||||
|
type = { italic = true },
|
||||||
|
storageclass = { italic = true },
|
||||||
|
structure = { italic = true },
|
||||||
|
parameter = { italic = true },
|
||||||
|
annotation = { italic = true },
|
||||||
|
tag_attribute = { italic = true },
|
||||||
|
},
|
||||||
|
filter = "pro",
|
||||||
|
|
||||||
|
day_night = {
|
||||||
|
enable = false,
|
||||||
|
day_filter = "pro",
|
||||||
|
night_filter = "spectrum",
|
||||||
|
},
|
||||||
|
inc_search = "background",
|
||||||
|
background_clear = {
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
bufferline = {
|
||||||
|
underline_selected = false,
|
||||||
|
underline_visible = false,
|
||||||
|
},
|
||||||
|
indent_blankline = {
|
||||||
|
context_highlight = "default",
|
||||||
|
context_start_underline = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
+56
-89
@@ -1,7 +1,7 @@
|
|||||||
vim.notify = require('notify')
|
vim.notify = require "notify"
|
||||||
local dap = require('dap')
|
local dap = require "dap"
|
||||||
|
|
||||||
require('notify').setup({
|
require("notify").setup {
|
||||||
render = "wrapped-default",
|
render = "wrapped-default",
|
||||||
timeout = 6000,
|
timeout = 6000,
|
||||||
max_width = 50,
|
max_width = 50,
|
||||||
@@ -17,9 +17,9 @@ require('notify').setup({
|
|||||||
},
|
},
|
||||||
on_open = function(win)
|
on_open = function(win)
|
||||||
-- vim.api.nvim_win_set_option(win, 'wrap', true)
|
-- vim.api.nvim_win_set_option(win, 'wrap', true)
|
||||||
vim.api.nvim_win_set_option(win, 'breakat', ' ')
|
vim.api.nvim_win_set_option(win, "breakat", " ")
|
||||||
end,
|
end,
|
||||||
})
|
}
|
||||||
|
|
||||||
-- Utility functions shared between progress reports for LSP and DAP
|
-- Utility functions shared between progress reports for LSP and DAP
|
||||||
|
|
||||||
@@ -37,8 +37,8 @@ local function get_notif_data(client_id, token)
|
|||||||
return client_notifs[client_id][token]
|
return client_notifs[client_id][token]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local spinner_frames =
|
||||||
local spinner_frames = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" }
|
{ "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" }
|
||||||
|
|
||||||
local function update_spinner(client_id, token)
|
local function update_spinner(client_id, token)
|
||||||
local notif_data = get_notif_data(client_id, token)
|
local notif_data = get_notif_data(client_id, token)
|
||||||
@@ -67,85 +67,52 @@ local function format_message(message, percentage)
|
|||||||
return (percentage and percentage .. "%\t" or "") .. (message or "")
|
return (percentage and percentage .. "%\t" or "") .. (message or "")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vim.lsp.handlers["$/progress"] = function(_, result, ctx)
|
-- LSP integration
|
||||||
-- local client_id = ctx.client_id
|
-- Make sure to also have the snippet with the common helper functions in your config!
|
||||||
--
|
|
||||||
-- local val = result.value
|
vim.lsp.handlers["$/progress"] = function(_, result, ctx)
|
||||||
--
|
local client_id = ctx.client_id
|
||||||
-- if not val.kind then
|
|
||||||
-- return
|
local val = result.value
|
||||||
-- end
|
|
||||||
--
|
if not val.kind then
|
||||||
-- local notif_data = get_notif_data(client_id, result.token)
|
return
|
||||||
--
|
end
|
||||||
-- if val.kind == "begin" then
|
|
||||||
-- local message = format_message(val.message, val.percentage)
|
local notif_data = get_notif_data(client_id, result.token)
|
||||||
--
|
|
||||||
-- notif_data.notification = vim.notify(message, "info", {
|
if val.kind == "begin" then
|
||||||
-- title = format_title(val.title, vim.lsp.get_client_by_id(client_id).name),
|
local message = format_message(val.message, val.percentage)
|
||||||
-- icon = spinner_frames[1],
|
|
||||||
-- timeout = false,
|
notif_data.notification = vim.notify(message, "info", {
|
||||||
-- hide_from_history = false,
|
title = format_title(
|
||||||
-- })
|
val.title,
|
||||||
--
|
vim.lsp.get_client_by_id(client_id).name
|
||||||
-- notif_data.spinner = 1
|
),
|
||||||
-- update_spinner(client_id, result.token)
|
icon = spinner_frames[1],
|
||||||
-- elseif val.kind == "report" and notif_data then
|
timeout = false,
|
||||||
-- notif_data.notification = vim.notify(format_message(val.message, val.percentage), "info", {
|
hide_from_history = false,
|
||||||
-- replace = notif_data.notification,
|
})
|
||||||
-- hide_from_history = false,
|
|
||||||
-- })
|
notif_data.spinner = 1
|
||||||
-- elseif val.kind == "end" and notif_data then
|
update_spinner(client_id, result.token)
|
||||||
-- notif_data.notification =
|
elseif val.kind == "report" and notif_data then
|
||||||
-- vim.notify(val.message and format_message(val.message) or "Complete", "info", {
|
notif_data.notification =
|
||||||
-- icon = "",
|
vim.notify(format_message(val.message, val.percentage), "info", {
|
||||||
-- replace = notif_data.notification,
|
replace = notif_data.notification,
|
||||||
-- timeout = 6000,
|
hide_from_history = false,
|
||||||
-- })
|
})
|
||||||
--
|
elseif val.kind == "end" and notif_data then
|
||||||
-- notif_data.spinner = nil
|
notif_data.notification = vim.notify(
|
||||||
-- end
|
val.message and format_message(val.message) or "Complete",
|
||||||
-- end
|
"info",
|
||||||
--
|
{
|
||||||
-- local severity = {
|
icon = "",
|
||||||
-- "error",
|
replace = notif_data.notification,
|
||||||
-- "warn",
|
timeout = 3000,
|
||||||
-- "info",
|
}
|
||||||
-- "info", -- map both hint and info to info?
|
)
|
||||||
-- }
|
|
||||||
-- vim.lsp.handlers["window/showMessage"] = function(err, method, params, client_id)
|
notif_data.spinner = nil
|
||||||
-- vim.notify(method.message, severity[params.type])
|
end
|
||||||
-- end
|
end
|
||||||
--
|
|
||||||
-- dap.listeners.before['event_progressStart']['progress-notifications'] = function(session, body)
|
|
||||||
-- local notif_data = get_notif_data("dap", body.progressId)
|
|
||||||
--
|
|
||||||
-- local message = format_message(body.message, body.percentage)
|
|
||||||
-- notif_data.notification = vim.notify(message, "info", {
|
|
||||||
-- title = format_title(body.title, session.config.type),
|
|
||||||
-- icon = spinner_frames[1],
|
|
||||||
-- timeout = false,
|
|
||||||
-- hide_from_history = false,
|
|
||||||
-- })
|
|
||||||
--
|
|
||||||
-- notif_data.notification.spinner = 1,
|
|
||||||
-- update_spinner("dap", body.progressId)
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- dap.listeners.before['event_progressUpdate']['progress-notifications'] = function(session, body)
|
|
||||||
-- local notif_data = get_notif_data("dap", body.progressId)
|
|
||||||
-- notif_data.notification = vim.notify(format_message(body.message, body.percentage), "info", {
|
|
||||||
-- replace = notif_data.notification,
|
|
||||||
-- hide_from_history = false,
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- dap.listeners.before['event_progressEnd']['progress-notifications'] = function(session, body)
|
|
||||||
-- local notif_data = client_notifs["dap"][body.progressId]
|
|
||||||
-- notif_data.notification = vim.notify(body.message and format_message(body.message) or "Complete", "info", {
|
|
||||||
-- icon = "",
|
|
||||||
-- replace = notif_data.notification,
|
|
||||||
-- timeout = 6000
|
|
||||||
-- })
|
|
||||||
-- notif_data.spinner = nil
|
|
||||||
-- end
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
-- local null_ls = require("null-ls")
|
||||||
|
--
|
||||||
|
-- local group = vim.api.nvim_create_augroup("lsp_format_on_save", { clear = false })
|
||||||
|
-- local event = "BufWritePre" -- or "BufWritePost"
|
||||||
|
-- local async = event == "BufWritePost"
|
||||||
|
--
|
||||||
|
-- null_ls.setup({
|
||||||
|
-- on_attach = function(client, bufnr)
|
||||||
|
-- if client.supports_method("textDocument/formatting") then
|
||||||
|
-- vim.keymap.set("n", "<Leader>f", function()
|
||||||
|
-- vim.lsp.buf.format({ bufnr = vim.api.nvim_get_current_buf() })
|
||||||
|
-- end, { buffer = bufnr, desc = "[lsp] format" })
|
||||||
|
--
|
||||||
|
-- -- format on save
|
||||||
|
-- vim.api.nvim_clear_autocmds({ buffer = bufnr, group = group })
|
||||||
|
-- vim.api.nvim_create_autocmd(event, {
|
||||||
|
-- buffer = bufnr,
|
||||||
|
-- group = group,
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.lsp.buf.format({ bufnr = bufnr, async = async })
|
||||||
|
-- end,
|
||||||
|
-- desc = "[lsp] format on save",
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- if client.supports_method("textDocument/rangeFormatting") then
|
||||||
|
-- vim.keymap.set("x", "<Leader>f", function()
|
||||||
|
-- vim.lsp.buf.format({ bufnr = vim.api.nvim_get_current_buf() })
|
||||||
|
-- end, { buffer = bufnr, desc = "[lsp] format" })
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
local opts = {}
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown" },
|
||||||
|
completions = {
|
||||||
|
lsp = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
render_modes = true,
|
||||||
|
|
||||||
|
anti_conceal = {
|
||||||
|
enabled = true,
|
||||||
|
above = 1,
|
||||||
|
below = 1,
|
||||||
|
},
|
||||||
|
|
||||||
|
code = {
|
||||||
|
enabled = true,
|
||||||
|
render_modes = false,
|
||||||
|
sign = true,
|
||||||
|
conceal_delimiters = true,
|
||||||
|
language = true,
|
||||||
|
position = "left",
|
||||||
|
language_icon = true,
|
||||||
|
language_name = true,
|
||||||
|
language_info = true,
|
||||||
|
language_pad = 0,
|
||||||
|
width = "full",
|
||||||
|
left_margin = 0,
|
||||||
|
left_pad = 2,
|
||||||
|
right_pad = 0,
|
||||||
|
min_width = 40,
|
||||||
|
border = "thick",
|
||||||
|
language_border = "█",
|
||||||
|
language_left = "",
|
||||||
|
language_right = "",
|
||||||
|
above = "▄",
|
||||||
|
below = "▀",
|
||||||
|
inline = true,
|
||||||
|
inline_left = "",
|
||||||
|
inline_right = "",
|
||||||
|
inline_pad = 0,
|
||||||
|
priority = 140,
|
||||||
|
highlight = "RenderMarkdownCode",
|
||||||
|
highlight_info = "RenderMarkdownCodeInfo",
|
||||||
|
highlight_language = nil,
|
||||||
|
highlight_border = "RenderMarkdownCodeBorder",
|
||||||
|
highlight_fallback = "RenderMarkdownCodeFallback",
|
||||||
|
highlight_inline = "RenderMarkdownCodeInline",
|
||||||
|
style = "full",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- local colors = require("monokai-pro.octagon.colors").setup()
|
||||||
|
|
||||||
|
require("scrollbar").setup {
|
||||||
|
handle = {},
|
||||||
|
marks = {},
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
require("smart-splits").setup {
|
||||||
|
ignored_buftypes = {
|
||||||
|
"nofile",
|
||||||
|
"quickfix",
|
||||||
|
"prompt",
|
||||||
|
},
|
||||||
|
ignored_filetypes = { "NvimTree" },
|
||||||
|
default_amount = 3,
|
||||||
|
at_edge = "wrap",
|
||||||
|
float_win_behavior = "previous",
|
||||||
|
move_cursor_same_row = false,
|
||||||
|
cursor_follows_swapped_bufs = false,
|
||||||
|
ignored_events = {
|
||||||
|
"BufEnter",
|
||||||
|
"WinEnter",
|
||||||
|
},
|
||||||
|
multiplexer_integration = nil,
|
||||||
|
disable_multiplexer_nav_when_zoomed = true,
|
||||||
|
kitty_password = nil,
|
||||||
|
zellij_move_focus_or_tab = false,
|
||||||
|
log_level = "error",
|
||||||
|
}
|
||||||
+58
-7
@@ -57,12 +57,38 @@ return {
|
|||||||
max_height = 80,
|
max_height = 80,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notifier = { enabled = true },
|
notifier = {
|
||||||
|
timeout = 3000,
|
||||||
|
width = { min = 40, max = 0.4 },
|
||||||
|
height = { min = 1, max = 0.6 },
|
||||||
|
margin = { top = 0, right = 1, bottom = 0 },
|
||||||
|
padding = true,
|
||||||
|
gap = 0,
|
||||||
|
sort = { "level", "added" },
|
||||||
|
level = vim.log.levels.TRACE,
|
||||||
|
icons = {
|
||||||
|
error = " ",
|
||||||
|
warn = " ",
|
||||||
|
info = " ",
|
||||||
|
debug = " ",
|
||||||
|
trace = " ",
|
||||||
|
},
|
||||||
|
keep = function(notif)
|
||||||
|
return vim.fn.getcmdpos() > 0
|
||||||
|
end,
|
||||||
|
---@type snacks.notifier.style
|
||||||
|
style = "fancy",
|
||||||
|
top_down = true,
|
||||||
|
date_format = "%R",
|
||||||
|
---@type string|boolean
|
||||||
|
more_format = " ↓ %d lines ",
|
||||||
|
refresh = 50,
|
||||||
|
},
|
||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
scope = { enabled = true },
|
scope = { enabled = true },
|
||||||
scroll = { enabled = true },
|
scroll = { enabled = false },
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
words = { enabled = false },
|
words = { enabled = true },
|
||||||
terminal = {
|
terminal = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
win = { style = "terminal" },
|
win = { style = "terminal" },
|
||||||
@@ -75,10 +101,35 @@ return {
|
|||||||
function()
|
function()
|
||||||
Snacks.terminal.toggle()
|
Snacks.terminal.toggle()
|
||||||
end,
|
end,
|
||||||
mode = "t"
|
mode = "t",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
|
notification = {
|
||||||
|
border = true,
|
||||||
|
zindex = 100,
|
||||||
|
ft = "markdown",
|
||||||
|
wo = {
|
||||||
|
winblend = 0,
|
||||||
|
wrap = true,
|
||||||
|
conceallevel = 2,
|
||||||
|
colorcolumn = "",
|
||||||
|
},
|
||||||
|
bo = { filetype = "snacks_notif" },
|
||||||
|
},
|
||||||
|
|
||||||
|
notification_history = {
|
||||||
|
border = true,
|
||||||
|
zindex = 100,
|
||||||
|
minimal = false,
|
||||||
|
title = " Notifications ",
|
||||||
|
title_pos = "center",
|
||||||
|
ft = "markdown",
|
||||||
|
bo = { filetype = "snacks_notif_history", modifiable = false },
|
||||||
|
wo = { winhighlight = "Normal:SnacksNotifierHistory" },
|
||||||
|
keys = { q = "close" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
gitbrowse = {
|
gitbrowse = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
require("zterm-navigator").setup({
|
|
||||||
-- Default keybindings (set to false to disable)
|
|
||||||
left = "<A-Left>",
|
|
||||||
right = "<A-Right>",
|
|
||||||
up = "<A-Up>",
|
|
||||||
down = "<A-Down>",
|
|
||||||
|
|
||||||
statusline = {
|
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -2,7 +2,7 @@ require("tmux").setup({
|
|||||||
copy_sync = {
|
copy_sync = {
|
||||||
enable = true,
|
enable = true,
|
||||||
redirect_to_clipboard = true,
|
redirect_to_clipboard = true,
|
||||||
sync_clipboard = true,
|
sync_clipboard = false,
|
||||||
sync_registers = true,
|
sync_registers = true,
|
||||||
},
|
},
|
||||||
navigation = {
|
navigation = {
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
require("zterm-navigator").setup {
|
||||||
|
left = "<A-Left>",
|
||||||
|
right = "<A-Right>",
|
||||||
|
up = "<A-Up>",
|
||||||
|
down = "<A-Down>",
|
||||||
|
|
||||||
|
statusline = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function get_qmlls_client(bufnr)
|
||||||
|
for _, c in ipairs(vim.lsp.get_clients { bufnr = bufnr }) do
|
||||||
|
if c.name == "qmlls" then
|
||||||
|
return c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function first_client_encoding(bufnr)
|
||||||
|
local c = vim.lsp.get_clients({ bufnr = bufnr })[1]
|
||||||
|
return (c and c.offset_encoding) or "utf-16"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function normalize_locations(result)
|
||||||
|
if not result then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
-- Single Location / LocationLink
|
||||||
|
if result.uri or result.targetUri then
|
||||||
|
return { result }
|
||||||
|
end
|
||||||
|
-- Array of Location / LocationLink
|
||||||
|
if vim.islist(result) then
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function request_locations(bufnr, method, timeout_ms)
|
||||||
|
local enc = first_client_encoding(bufnr)
|
||||||
|
local params = vim.lsp.util.make_position_params(0, enc)
|
||||||
|
local responses =
|
||||||
|
vim.lsp.buf_request_sync(bufnr, method, params, timeout_ms or 1000)
|
||||||
|
|
||||||
|
if not responses then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local all = {}
|
||||||
|
for client_id, resp in pairs(responses) do
|
||||||
|
local result = resp and resp.result
|
||||||
|
local locs = normalize_locations(result)
|
||||||
|
for _, loc in ipairs(locs) do
|
||||||
|
table.insert(all, { client_id = client_id, loc = loc })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return all
|
||||||
|
end
|
||||||
|
|
||||||
|
local function jump_to_first_location(bufnr, matches)
|
||||||
|
if #matches == 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local m = matches[1]
|
||||||
|
local client = vim.lsp.get_client_by_id(m.client_id)
|
||||||
|
local enc = (client and client.offset_encoding)
|
||||||
|
or first_client_encoding(bufnr)
|
||||||
|
|
||||||
|
local loc = m.loc
|
||||||
|
-- Convert LocationLink -> Location-ish target for jump_to_location
|
||||||
|
if loc.targetUri then
|
||||||
|
loc = {
|
||||||
|
uri = loc.targetUri,
|
||||||
|
range = loc.targetSelectionRange or loc.targetRange,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.lsp.util.jump_to_location(loc, enc)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_cursor_context(bufnr)
|
||||||
|
local pos = vim.api.nvim_win_get_cursor(0)
|
||||||
|
local row = pos[1] - 1
|
||||||
|
local col = pos[2]
|
||||||
|
local line = vim.api.nvim_buf_get_lines(bufnr, row, row + 1, false)[1] or ""
|
||||||
|
local cword = vim.fn.expand "<cword>"
|
||||||
|
return row, col, line, cword
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Tries to detect something like Config.save() and returns ("Config", "save")
|
||||||
|
local function detect_singleton_member_call(bufnr)
|
||||||
|
local _, col, line, cword = get_cursor_context(bufnr)
|
||||||
|
local before = line:sub(1, col + 1)
|
||||||
|
|
||||||
|
-- If cursor is on "save" in Config.save(), this usually works.
|
||||||
|
local singleton = before:match "([%a_][%w_]*)%s*%.[%w_]*$"
|
||||||
|
if not singleton then
|
||||||
|
-- If cursor is on "Config", this can also catch it.
|
||||||
|
singleton = before:match "([%a_][%w_]*)%s*$"
|
||||||
|
if singleton and not line:sub(col + 1):match "^%s*%." then
|
||||||
|
singleton = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not singleton then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Basic heuristic: singleton names are often capitalized in QML
|
||||||
|
-- (you can remove this check if your singletons are lowercase)
|
||||||
|
if not singleton:match "^[A-Z_]" then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return singleton, cword
|
||||||
|
end
|
||||||
|
|
||||||
|
local function find_project_root(bufnr)
|
||||||
|
local qmlls = get_qmlls_client(bufnr)
|
||||||
|
if qmlls and qmlls.config and qmlls.config.root_dir then
|
||||||
|
return qmlls.config.root_dir
|
||||||
|
end
|
||||||
|
return vim.fs.root(bufnr, { ".qmlls.ini", ".git" }) or vim.fn.getcwd()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function singleton_fallback_jump(bufnr)
|
||||||
|
local singleton, member = detect_singleton_member_call(bufnr)
|
||||||
|
if not singleton then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local root = find_project_root(bufnr)
|
||||||
|
local target_name = singleton .. ".qml"
|
||||||
|
|
||||||
|
local matches = vim.fs.find(target_name, {
|
||||||
|
path = root,
|
||||||
|
type = "file",
|
||||||
|
limit = math.huge,
|
||||||
|
})
|
||||||
|
|
||||||
|
if not matches or vim.tbl_isempty(matches) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local pick = nil
|
||||||
|
if #matches == 1 then
|
||||||
|
pick = matches[1]
|
||||||
|
else
|
||||||
|
-- Prefer a path containing "/Config/" for Config.qml, etc.
|
||||||
|
for _, p in ipairs(matches) do
|
||||||
|
if
|
||||||
|
p:match("/" .. singleton .. "/")
|
||||||
|
or p:match("/" .. target_name .. "$")
|
||||||
|
then
|
||||||
|
pick = p
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
pick = pick or matches[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd.edit(vim.fn.fnameescape(pick))
|
||||||
|
|
||||||
|
-- Optional: try to jump near the member inside the singleton file.
|
||||||
|
if member and member ~= singleton then
|
||||||
|
local escaped = vim.fn.escape(member, [[\/]])
|
||||||
|
-- Try function save(...) first, then any "save" occurrence.
|
||||||
|
local found =
|
||||||
|
vim.fn.search("\\<function\\s\\+" .. escaped .. "\\s*(", "W")
|
||||||
|
if found == 0 then
|
||||||
|
vim.fn.search("\\<" .. escaped .. "\\>", "W")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.notify(
|
||||||
|
("LSP returned no locations; fell back to %s.qml"):format(singleton),
|
||||||
|
vim.log.levels.INFO
|
||||||
|
)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.smart_qml_jump()
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
|
||||||
|
-- 1) Try normal definition
|
||||||
|
local defs = request_locations(bufnr, "textDocument/definition", 1200)
|
||||||
|
if jump_to_first_location(bufnr, defs) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 2) Try type definition
|
||||||
|
local tdefs = request_locations(bufnr, "textDocument/typeDefinition", 1200)
|
||||||
|
if jump_to_first_location(bufnr, tdefs) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 3) Singleton fallback: Config.save() -> Config.qml
|
||||||
|
if singleton_fallback_jump(bufnr) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.notify(
|
||||||
|
"No locations found (definition/typeDefinition/fallback)",
|
||||||
|
vim.log.levels.WARN
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
+5
-4
@@ -2,11 +2,12 @@ vim.g.loaded_netrw = 1
|
|||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
|
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
vim.g.gruvbox_material_background = "medium"
|
||||||
vim.g.coq_settings = { keymap = { recommended = false } }
|
vim.g.coq_settings = { keymap = { recommended = false } }
|
||||||
|
vim.g.gruvbox_material_foreground = "original"
|
||||||
vim.g.zig_fmt_parse_errors = 0
|
vim.g.zig_fmt_parse_errors = 0
|
||||||
vim.g.zig_fmt_autosave = 0
|
vim.g.zig_fmt_autosave = 0
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "GitGutterAdd", { fg = "#009900", ctermfg = 2 })
|
vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = '#009900', ctermfg = 2 })
|
||||||
vim.api.nvim_set_hl(0, "GitGutterChange", { fg = "#bbbb00", ctermfg = 3 })
|
vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = '#bbbb00', ctermfg = 3 })
|
||||||
vim.api.nvim_set_hl(0, "GitGutterDelete", { fg = "#ff2222", ctermfg = 1 })
|
vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = '#ff2222', ctermfg = 1 })
|
||||||
vim.api.nvim_set_hl(1, "CmpItemKindCopilot", { fg = "#6CC644" })
|
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
-- Generated by zshell. Lualine theme matching the zshell colorscheme.
|
||||||
|
|
||||||
|
local is_light = "dark" == "light"
|
||||||
|
local function pick(light, dark)
|
||||||
|
return is_light and light or dark
|
||||||
|
end
|
||||||
|
|
||||||
|
local c = {
|
||||||
|
bg = "#1A1206",
|
||||||
|
bg_alt = "#231A0D",
|
||||||
|
bg_mid = pick("#32291A", "#271E11"),
|
||||||
|
fg = "#F1E0CA",
|
||||||
|
fg_muted = "#DBC3A1",
|
||||||
|
fg_strong = pick("#15161A", "#F4F4F8"),
|
||||||
|
|
||||||
|
normal = "#7D2C1E",
|
||||||
|
insert = "#733429",
|
||||||
|
visual = "#B5893E",
|
||||||
|
replace = "#93000A",
|
||||||
|
command = pick("#FFDFD5", "#B9AB66"),
|
||||||
|
inactive = "#231A0D",
|
||||||
|
|
||||||
|
normal_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
insert_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
visual_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
replace_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
command_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
normal = {
|
||||||
|
a = { fg = c.normal_fg, bg = c.normal, gui = "bold" },
|
||||||
|
b = { fg = c.fg_strong, bg = c.bg_mid },
|
||||||
|
c = { fg = c.fg, bg = c.bg_alt },
|
||||||
|
},
|
||||||
|
insert = {
|
||||||
|
a = { fg = c.insert_fg, bg = c.insert, gui = "bold" },
|
||||||
|
b = { fg = c.fg_strong, bg = c.bg_mid },
|
||||||
|
c = { fg = c.fg, bg = c.bg_alt },
|
||||||
|
},
|
||||||
|
visual = {
|
||||||
|
a = { fg = c.visual_fg, bg = c.visual, gui = "bold" },
|
||||||
|
b = { fg = c.fg_strong, bg = c.bg_mid },
|
||||||
|
c = { fg = c.fg, bg = c.bg_alt },
|
||||||
|
},
|
||||||
|
replace = {
|
||||||
|
a = { fg = c.replace_fg, bg = c.replace, gui = "bold" },
|
||||||
|
b = { fg = c.fg_strong, bg = c.bg_mid },
|
||||||
|
c = { fg = c.fg, bg = c.bg_alt },
|
||||||
|
},
|
||||||
|
command = {
|
||||||
|
a = { fg = c.command_fg, bg = c.command, gui = "bold" },
|
||||||
|
b = { fg = c.fg_strong, bg = c.bg_mid },
|
||||||
|
c = { fg = c.fg, bg = c.bg_alt },
|
||||||
|
},
|
||||||
|
inactive = {
|
||||||
|
a = { fg = c.fg_muted, bg = c.inactive, gui = "bold" },
|
||||||
|
b = { fg = c.fg_muted, bg = c.inactive },
|
||||||
|
c = { fg = c.fg_muted, bg = c.bg },
|
||||||
|
},
|
||||||
|
}
|
||||||
+93
-25
@@ -1,49 +1,111 @@
|
|||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
-- Base nvim mappings, you need this.
|
|
||||||
map("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>")
|
map("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>")
|
||||||
map("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>")
|
map("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>")
|
||||||
map({"n", "v"}, "<leader>ap", require("actions-preview").code_actions)
|
|
||||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||||
|
|
||||||
|
-- Move selected text up
|
||||||
map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
|
map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
|
||||||
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
|
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
|
||||||
map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
|
|
||||||
map("n", "<C-j>", "<C-d>zz")
|
|
||||||
map("n", "<C-k>", "<C-u>zz")
|
|
||||||
map("n", "<A-->", ":bdelete<CR>")
|
|
||||||
-- map("n", "<SA-->", ":BufferRestore<CR>")
|
|
||||||
map('n', '<leader>e', function() Snacks.explorer() end)
|
|
||||||
map('n', '<leader>u', require('undotree').toggle, { noremap = true, silent = true })
|
|
||||||
map("n", "<leader>g", require("telescope.builtin").live_grep, {desc = "Telescope grep" })
|
|
||||||
map("n", "<leader>f", require("telescope.builtin").find_files, {desc = "Telescope find files" })
|
|
||||||
|
|
||||||
-- Copilot Chat buffer
|
-- Copilot Chat buffer
|
||||||
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||||
map("i", "<A-c>", vim.cmd.CopilotChatToggle)
|
map("i", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||||
map("v", "<A-c>", vim.cmd.CopilotChatToggle)
|
map("v", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||||
|
|
||||||
-- LSP Restart
|
-- Splits
|
||||||
|
vim.keymap.set("n", "<A-S-Left>", require("smart-splits").resize_left)
|
||||||
|
vim.keymap.set("n", "<A-S-Down>", require("smart-splits").resize_down)
|
||||||
|
vim.keymap.set("n", "<A-S-Up>", require("smart-splits").resize_up)
|
||||||
|
vim.keymap.set("n", "<A-S-Right>", require("smart-splits").resize_right)
|
||||||
|
vim.keymap.set("n", "<A-Left>", require("smart-splits").move_cursor_left)
|
||||||
|
vim.keymap.set("n", "<A-Down>", require("smart-splits").move_cursor_down)
|
||||||
|
vim.keymap.set("n", "<A-Up>", require("smart-splits").move_cursor_up)
|
||||||
|
vim.keymap.set("n", "<A-Right>", require("smart-splits").move_cursor_right)
|
||||||
|
|
||||||
|
-- Explorer and Undotree
|
||||||
|
map("n", "<leader>e", function()
|
||||||
|
Snacks.explorer()
|
||||||
|
end)
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
"<leader>u",
|
||||||
|
require("undotree").toggle,
|
||||||
|
{ noremap = true, silent = true }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Telescope grep
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
"<leader>g",
|
||||||
|
require("telescope.builtin").live_grep,
|
||||||
|
{ desc = "Telescope grep" }
|
||||||
|
)
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
"<leader>f",
|
||||||
|
require("telescope.builtin").find_files,
|
||||||
|
{ desc = "Telescope find files" }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
"gd",
|
||||||
|
vim.lsp.buf.definition,
|
||||||
|
{ noremap = true, silent = true, buffer = bufnr }
|
||||||
|
)
|
||||||
|
|
||||||
|
map("n", "<A-->", ":bdelete<CR>")
|
||||||
|
-- map("n", "<SA-->", ":BufferRestore<CR>")
|
||||||
|
|
||||||
|
map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
map("n", "J", "mzJ`z")
|
||||||
|
map("n", "<C-d>", "<C-d>zz")
|
||||||
|
map("n", "<C-u>", "<C-u>zz")
|
||||||
|
map("n", "n", "nzzzv")
|
||||||
|
map("n", "N", "Nzzzv")
|
||||||
map("n", "<leader>zig", "<cmd>LspRestart<cr>")
|
map("n", "<leader>zig", "<cmd>LspRestart<cr>")
|
||||||
|
|
||||||
-- Why?
|
-- greatest remap ever
|
||||||
map("x", "<leader>p", [["_dP]])
|
map("x", "<leader>p", [["_dP]])
|
||||||
map({"n", "v"}, "<leader>y", [["+y]])
|
|
||||||
map({"n", "v"}, "<leader>d", "\"_d")
|
-- next greatest remap ever : asbjornHaland
|
||||||
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
|
map({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
|
map("n", "<leader>Y", [["+Y]])
|
||||||
|
|
||||||
|
map({ "n", "v" }, "<leader>d", '"_d')
|
||||||
|
|
||||||
|
-- This is going to get me cancelled
|
||||||
|
map("i", "<C-c>", "<Esc>")
|
||||||
|
|
||||||
|
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>")
|
||||||
|
|
||||||
map("n", "<leader><leader>", function()
|
map("n", "<leader><leader>", function()
|
||||||
vim.cmd("so")
|
vim.cmd "so"
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Greatest remap
|
|
||||||
map("n", "<leader>Y", [["+Y]])
|
|
||||||
map("n", "<A-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Terminal" })
|
|
||||||
map("n", "<leader>gb", function() Snacks.gitbrowse.open() end )
|
|
||||||
map("n", "K", require("pretty_hover").hover)
|
|
||||||
|
|
||||||
-- Might delete later
|
|
||||||
map("n", "<leader>fm", "<cmd>TailwindConcealToggle<CR>", { desc = "Toggle Tailwind Conceal" })
|
|
||||||
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
|
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
|
||||||
|
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
"<leader>fm",
|
||||||
|
"<cmd>TailwindConcealToggle<CR>",
|
||||||
|
{ desc = "Toggle Tailwind Conceal" }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Terminal
|
||||||
|
map("n", "<C-q>", function()
|
||||||
|
Snacks.terminal.toggle()
|
||||||
|
end, { desc = "Toggle Terminal" })
|
||||||
|
|
||||||
|
-- Gitbrowse
|
||||||
|
map("n", "<leader>gb", function()
|
||||||
|
Snacks.gitbrowse.open()
|
||||||
|
end)
|
||||||
|
|
||||||
-- Notif history
|
-- Notif history
|
||||||
map("n", "<leader>n", function()
|
map("n", "<leader>n", function()
|
||||||
Snacks.notifier.show_history()
|
Snacks.notifier.show_history()
|
||||||
@@ -51,3 +113,9 @@ end)
|
|||||||
|
|
||||||
-- Actions Previewer
|
-- Actions Previewer
|
||||||
map({ "n", "v" }, "<leader>ap", require("actions-preview").code_actions)
|
map({ "n", "v" }, "<leader>ap", require("actions-preview").code_actions)
|
||||||
|
|
||||||
|
map("n", "K", require("pretty_hover").hover)
|
||||||
|
|
||||||
|
-- winbar
|
||||||
|
local dbar_api = require "dropbar.api"
|
||||||
|
map("n", "<leader>b", dbar_api.pick)
|
||||||
|
|||||||
+9
-3
@@ -3,17 +3,18 @@ vim.opt.relativenumber = true
|
|||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = false
|
||||||
vim.opt.smartindent = false
|
vim.opt.smartindent = false
|
||||||
|
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
|
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
|
||||||
|
|
||||||
|
vim.opt.laststatus = 3
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = true
|
||||||
vim.opt.linebreak = true
|
vim.opt.linebreak = true
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.undodir = vim.fn.stdpath('data') .. '/undodir'
|
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = false
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
@@ -54,4 +55,9 @@ vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. d
|
|||||||
|
|
||||||
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
|
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
|
||||||
|
|
||||||
vim.g.tpipeline_restore = 1
|
vim.api.nvim_create_user_command('Redir', function(ctx)
|
||||||
|
local lines = vim.split(vim.api.nvim_exec(ctx.args, true), '\n', { plain = true })
|
||||||
|
vim.cmd('new')
|
||||||
|
vim.api.nvim_buf_set_lines(0, 0, -1, false, lines)
|
||||||
|
vim.opt_local.modified = false
|
||||||
|
end, { nargs = '+', complete = 'command' })
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"olimorris/onedarkpro.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require "config.themelight"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"notken12/base46-colors",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"loctvl842/monokai-pro.nvim",
|
||||||
|
config = function()
|
||||||
|
require "config.monokaipro"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require "config.catppuccin"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rebelot/kanagawa.nvim",
|
||||||
|
-- config = function()
|
||||||
|
-- require("config.kanagawa")
|
||||||
|
-- end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sainnhe/edge",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.g.edge_enable_italic = 1
|
||||||
|
vim.g.edge_style = "default"
|
||||||
|
vim.g.edge_menu_selection_background = "purple"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"projekt0n/github-nvim-theme",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require "config.githubtheme"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alexmozaidze/palenight.nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Yazeed1s/minimal.nvim",
|
||||||
|
init = function()
|
||||||
|
vim.g.minimal_italic_comments = true
|
||||||
|
vim.g.minimal_italic_keywords = true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
"nvim-mini/mini.nvim",
|
|
||||||
},
|
|
||||||
---@module 'render-markdown'
|
|
||||||
---@type render.md.UserConfig
|
|
||||||
opts = require "config.format.markdown",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
config = function()
|
|
||||||
require("config.gitsigns")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,221 +0,0 @@
|
|||||||
return {
|
|
||||||
"y3owk1n/undo-glow.nvim",
|
|
||||||
version = "*",
|
|
||||||
opts = {
|
|
||||||
animation = {
|
|
||||||
enabled = true,
|
|
||||||
duration = 300,
|
|
||||||
animation_type = "fade",
|
|
||||||
window_scoped = true,
|
|
||||||
},
|
|
||||||
highlights = {
|
|
||||||
undo = {
|
|
||||||
hl_color = { bg = "#693232" }, -- Dark muted red
|
|
||||||
},
|
|
||||||
redo = {
|
|
||||||
hl_color = { bg = "#2F4640" }, -- Dark muted green
|
|
||||||
},
|
|
||||||
yank = {
|
|
||||||
hl_color = { bg = "#7A683A" }, -- Dark muted yellow
|
|
||||||
},
|
|
||||||
paste = {
|
|
||||||
hl_color = { bg = "#325B5B" }, -- Dark muted cyan
|
|
||||||
},
|
|
||||||
search = {
|
|
||||||
hl_color = { bg = "#5C475C" }, -- Dark muted purple
|
|
||||||
},
|
|
||||||
comment = {
|
|
||||||
hl_color = { bg = "#7A5A3D" }, -- Dark muted orange
|
|
||||||
},
|
|
||||||
cursor = {
|
|
||||||
hl_color = { bg = "#793D54" }, -- Dark muted pink
|
|
||||||
},
|
|
||||||
},
|
|
||||||
priority = 2048 * 3,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"u",
|
|
||||||
function()
|
|
||||||
require("undo-glow").undo()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Undo with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"U",
|
|
||||||
function()
|
|
||||||
require("undo-glow").redo()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Redo with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"p",
|
|
||||||
function()
|
|
||||||
require("undo-glow").paste_below()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Paste below with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"P",
|
|
||||||
function()
|
|
||||||
require("undo-glow").paste_above()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Paste above with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
function()
|
|
||||||
require("undo-glow").search_next {
|
|
||||||
animation = {
|
|
||||||
animation_type = "strobe",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Search next with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"N",
|
|
||||||
function()
|
|
||||||
require("undo-glow").search_prev {
|
|
||||||
animation = {
|
|
||||||
animation_type = "strobe",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Search prev with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"*",
|
|
||||||
function()
|
|
||||||
require("undo-glow").search_star {
|
|
||||||
animation = {
|
|
||||||
animation_type = "strobe",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Search star with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"#",
|
|
||||||
function()
|
|
||||||
require("undo-glow").search_hash {
|
|
||||||
animation = {
|
|
||||||
animation_type = "strobe",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Search hash with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gc",
|
|
||||||
function()
|
|
||||||
-- This is an implementation to preserve the cursor position
|
|
||||||
local pos = vim.fn.getpos "."
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.fn.setpos(".", pos)
|
|
||||||
end)
|
|
||||||
return require("undo-glow").comment()
|
|
||||||
end,
|
|
||||||
mode = { "n", "x" },
|
|
||||||
desc = "Toggle comment with highlight",
|
|
||||||
expr = true,
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gc",
|
|
||||||
function()
|
|
||||||
require("undo-glow").comment_textobject()
|
|
||||||
end,
|
|
||||||
mode = "o",
|
|
||||||
desc = "Comment textobject with highlight",
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gcc",
|
|
||||||
function()
|
|
||||||
return require("undo-glow").comment_line()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
desc = "Toggle comment line with highlight",
|
|
||||||
expr = true,
|
|
||||||
noremap = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
||||||
desc = "Highlight when yanking (copying) text",
|
|
||||||
callback = function()
|
|
||||||
require("undo-glow").yank()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- This only handles neovim instance and do not highlight when switching panes in tmux
|
|
||||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
|
||||||
desc = "Highlight when cursor moved significantly",
|
|
||||||
callback = function()
|
|
||||||
require("undo-glow").cursor_moved {
|
|
||||||
animation = {
|
|
||||||
animation_type = "slide",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- This will handle highlights when focus gained, including switching panes in tmux
|
|
||||||
vim.api.nvim_create_autocmd("FocusGained", {
|
|
||||||
desc = "Highlight when focus gained",
|
|
||||||
callback = function()
|
|
||||||
---@type UndoGlow.CommandOpts
|
|
||||||
local opts = {
|
|
||||||
animation = {
|
|
||||||
animation_type = "slide",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
opts = require("undo-glow.utils").merge_command_opts(
|
|
||||||
"UgCursor",
|
|
||||||
opts
|
|
||||||
)
|
|
||||||
local pos = require("undo-glow.utils").get_current_cursor_row()
|
|
||||||
|
|
||||||
require("undo-glow").highlight_region(
|
|
||||||
vim.tbl_extend("force", opts, {
|
|
||||||
s_row = pos.s_row,
|
|
||||||
s_col = pos.s_col,
|
|
||||||
e_row = pos.e_row,
|
|
||||||
e_col = pos.e_col,
|
|
||||||
force_edge = opts.force_edge == nil and true
|
|
||||||
or opts.force_edge,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
|
||||||
desc = "Highlight when search cmdline leave",
|
|
||||||
callback = function()
|
|
||||||
require("undo-glow").search_cmd {
|
|
||||||
animation = {
|
|
||||||
animation_type = "fade",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
+150
-75
@@ -1,38 +1,34 @@
|
|||||||
return {
|
return {
|
||||||
{
|
|
||||||
require("config.snacks")
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"nvim-mini/mini.nvim",
|
"nvim-mini/mini.nvim",
|
||||||
version = false,
|
version = false,
|
||||||
|
|
||||||
modules = function()
|
modules = function()
|
||||||
require("config.mini-modules")
|
require "config.mini-modules"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
build = ":TSUpdate",
|
|
||||||
branch = "main",
|
branch = "main",
|
||||||
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.treesitter"
|
require "config.treesitter"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sainnhe/edge",
|
"rmagatti/auto-session",
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.edge_enable_italic = 1
|
require "config.autosession"
|
||||||
vim.g.edge_style = "default"
|
|
||||||
vim.g.edge_menu_selection_background = "purple"
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rmagatti/auto-session",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("config.autosession")
|
require "config.telescope"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -48,58 +44,51 @@ return {
|
|||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.barbar")
|
require "config.barbar"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require "config.lualine"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mawkler/modicator.nvim",
|
"mawkler/modicator.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.modicator")
|
require "config.modicator"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"shinchu/lightline-gruvbox.vim",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"jiaoshijie/undotree",
|
"jiaoshijie/undotree",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.undotree")
|
require "config.undotree"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hiphish/rainbow-delimiters.nvim",
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
enabled = true,
|
enabled = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.autopairs")
|
require "config.autopairs"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
config = function()
|
|
||||||
require "config.notify"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
"zbirenbaum/copilot.lua",
|
||||||
|
lazy = true,
|
||||||
cmd = "Copilot",
|
cmd = "Copilot",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.ai.copilot"
|
require "config.copilot"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
config = function ()
|
|
||||||
require "config.ai.copilot_cmp"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"CopilotC-Nvim/CopilotChat.nvim",
|
"CopilotC-Nvim/CopilotChat.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
@@ -108,28 +97,23 @@ return {
|
|||||||
},
|
},
|
||||||
build = "make tiktoken",
|
build = "make tiktoken",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.ai.copilotchat"
|
require "config.copilotchat"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.dapconf")
|
require "config.dapconf"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mason-org/mason-lspconfig.nvim",
|
require "config.snacks",
|
||||||
opts = {},
|
|
||||||
dependencies = {
|
|
||||||
{ "mason-org/mason.nvim", opts = {} },
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/lazydev.nvim",
|
"folke/lazydev.nvim",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
opts = function()
|
opts = function()
|
||||||
require("config.lazydev")
|
require "config.lazydev"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -147,10 +131,9 @@ return {
|
|||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
"saghen/blink.cmp",
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("config.format.lspconfig")
|
require "config.lspconfig"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -168,6 +151,22 @@ return {
|
|||||||
{
|
{
|
||||||
"mfussenegger/nvim-jdtls",
|
"mfussenegger/nvim-jdtls",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require "config.harpoon"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- {
|
||||||
|
-- "catgoose/nvim-colorizer.lua",
|
||||||
|
-- config = function()
|
||||||
|
-- require("config.colorizer")
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"ziglang/zig.vim",
|
"ziglang/zig.vim",
|
||||||
},
|
},
|
||||||
@@ -181,7 +180,7 @@ return {
|
|||||||
{
|
{
|
||||||
"f3fora/nvim-texlabconfig",
|
"f3fora/nvim-texlabconfig",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.format.texlab")
|
require "config.texlab"
|
||||||
end,
|
end,
|
||||||
build = "go build",
|
build = "go build",
|
||||||
},
|
},
|
||||||
@@ -200,7 +199,7 @@ return {
|
|||||||
{
|
{
|
||||||
"ThePrimeagen/refactoring.nvim",
|
"ThePrimeagen/refactoring.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.format.refactoring")
|
require "config.refactoring"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -210,45 +209,54 @@ return {
|
|||||||
vim.g.minimal_italic_functions = true
|
vim.g.minimal_italic_functions = true
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "propet/colorscheme-persist.nvim",
|
||||||
|
-- dependencies = {
|
||||||
|
-- "nvim-telescope/telescope.nvim",
|
||||||
|
-- },
|
||||||
|
-- lazy = false,
|
||||||
|
-- config = true,
|
||||||
|
-- keys = {
|
||||||
|
-- {
|
||||||
|
-- "<leader>sp",
|
||||||
|
-- function()
|
||||||
|
-- require("colorscheme-persist").picker()
|
||||||
|
-- end,
|
||||||
|
-- mode = "n",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- opts = {
|
||||||
|
-- picker_opts = require("telescope.themes").get_dropdown {
|
||||||
|
-- enable_preview = true,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"aserowy/tmux.nvim",
|
"aznhe21/actions-preview.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.terminal.tmux")
|
require "config.actions-preview"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
config = function()
|
||||||
|
require "config.lint"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rachartier/tiny-inline-diagnostic.nvim",
|
"rachartier/tiny-inline-diagnostic.nvim",
|
||||||
config = function ()
|
|
||||||
require("config.format.TID")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ThePrimeagen/harpoon",
|
|
||||||
branch = "harpoon2",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
config = function()
|
||||||
require("config.harpoon")
|
require "config.TID"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aznhe21/actions-preview.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
config = function()
|
|
||||||
require("config.actions-preview")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "artemave/workspace-diagnostics.nvim",
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"sbdchd/neoformat",
|
require "config.dev-tools",
|
||||||
config = function()
|
|
||||||
require("config.format.neoformat")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Zacharias-Brohn/zterm-navigator.nvim",
|
|
||||||
config = function()
|
|
||||||
require("config.terminal.zterm-navigator")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Fildo7525/pretty_hover",
|
"Fildo7525/pretty_hover",
|
||||||
@@ -256,6 +264,73 @@ return {
|
|||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"artemave/workspace-diagnostics.nvim",
|
"knubie/vim-kitty-navigator",
|
||||||
|
build = "cp ./*.py ~/.config/kitty/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
require "config.dropbar",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = function()
|
||||||
|
require "config.gitsigns"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sbdchd/neoformat",
|
||||||
|
init = function()
|
||||||
|
vim.cmd(
|
||||||
|
"source "
|
||||||
|
.. vim.fn.stdpath "config"
|
||||||
|
.. "/lua/plugins/neoformat.vim"
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"petertriho/nvim-scrollbar",
|
||||||
|
config = function()
|
||||||
|
require "config.scrollbar"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Zacharias-Brohn/zterm-navigator.nvim",
|
||||||
|
enabled = false,
|
||||||
|
config = function()
|
||||||
|
require "config.zterm-navigator"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-mini/mini.nvim",
|
||||||
|
},
|
||||||
|
---@module 'render-markdown'
|
||||||
|
---@type render.md.UserConfig
|
||||||
|
opts = require "config.render-markdown",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mrjones2014/smart-splits.nvim",
|
||||||
|
config = function()
|
||||||
|
require "config.smart-splits"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kkrampis/codex.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = { "Codex", "CodexToggle" },
|
||||||
|
keys = {
|
||||||
|
-- {
|
||||||
|
-- nil,
|
||||||
|
-- function()
|
||||||
|
-- require("codex").toggle()
|
||||||
|
-- end,
|
||||||
|
-- desc = "Toggle Codex",
|
||||||
|
-- mode = { "n", "t" },
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
opts = function()
|
||||||
|
require "config.codex"
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
let g:neoformat_enabled_python = ['autopep8']
|
||||||
|
let g:neoformat_enabled_javascript = ['prettier']
|
||||||
|
let g:neoformat_enabled_html = ['prettier']
|
||||||
|
let g:neoformat_enabled_css = ['prettier']
|
||||||
|
let g:neoformat_enabled_json = ['prettier']
|
||||||
|
let g:neoformat_enabled_yaml = ['prettier']
|
||||||
|
let g:neoformat_enabled_lua = ['stylua']
|
||||||
|
let g:neoformat_enabled_rust = ['rustfmt']
|
||||||
|
let g:neoformat_enabled_cpp = ['uncrustify']
|
||||||
|
let g:neoformat_enabled_markdown = ['prettier']
|
||||||
|
let g:neoformat_enabled_qml = ['qmlformat']
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("config.telescope")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"propet/colorscheme-persist.nvim",
|
|
||||||
enable = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
},
|
|
||||||
lazy = false,
|
|
||||||
config = true,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>sp",
|
|
||||||
function()
|
|
||||||
require("colorscheme-persist").picker()
|
|
||||||
end,
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = function() -- ✅ Changed to function
|
|
||||||
return {
|
|
||||||
picker_opts = require("telescope.themes").get_dropdown({
|
|
||||||
enable_preview = true,
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"notken12/base46-colors",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function ()
|
|
||||||
if vim.env.TMUX then
|
|
||||||
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
|
|
||||||
callback = function()
|
|
||||||
vim.defer_fn( function()
|
|
||||||
vim.opt.laststatus = 0
|
|
||||||
end, 100)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.o.laststatus = 0
|
|
||||||
end
|
|
||||||
require("config.theme.lualine")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"catgoose/nvim-colorizer.lua",
|
|
||||||
config = function()
|
|
||||||
require("config.theme.colorizer")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"olimorris/onedarkpro.nvim",
|
|
||||||
enabled = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
require("config.theme.onedarkpro-light")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
return {
|
||||||
|
"y3owk1n/undo-glow.nvim",
|
||||||
|
version = "*",
|
||||||
|
opts = {
|
||||||
|
animation = {
|
||||||
|
enabled = true,
|
||||||
|
duration = 300,
|
||||||
|
animation_type = "fade",
|
||||||
|
window_scoped = true,
|
||||||
|
},
|
||||||
|
highlights = {
|
||||||
|
undo = {
|
||||||
|
hl_color = { bg = "#693232" }, -- Dark muted red
|
||||||
|
},
|
||||||
|
redo = {
|
||||||
|
hl_color = { bg = "#2F4640" }, -- Dark muted green
|
||||||
|
},
|
||||||
|
yank = {
|
||||||
|
hl_color = { bg = "#7A683A" }, -- Dark muted yellow
|
||||||
|
},
|
||||||
|
paste = {
|
||||||
|
hl_color = { bg = "#325B5B" }, -- Dark muted cyan
|
||||||
|
},
|
||||||
|
search = {
|
||||||
|
hl_color = { bg = "#5C475C" }, -- Dark muted purple
|
||||||
|
},
|
||||||
|
comment = {
|
||||||
|
hl_color = { bg = "#7A5A3D" }, -- Dark muted orange
|
||||||
|
},
|
||||||
|
cursor = {
|
||||||
|
hl_color = { bg = "#793D54" }, -- Dark muted pink
|
||||||
|
},
|
||||||
|
},
|
||||||
|
priority = 2048 * 3,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"u",
|
||||||
|
function()
|
||||||
|
require("undo-glow").undo()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Undo with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"U",
|
||||||
|
function()
|
||||||
|
require("undo-glow").redo()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Redo with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"p",
|
||||||
|
function()
|
||||||
|
require("undo-glow").paste_below()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Paste below with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"P",
|
||||||
|
function()
|
||||||
|
require("undo-glow").paste_above()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Paste above with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"n",
|
||||||
|
function()
|
||||||
|
require("undo-glow").search_next {
|
||||||
|
animation = {
|
||||||
|
animation_type = "strobe",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Search next with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"N",
|
||||||
|
function()
|
||||||
|
require("undo-glow").search_prev {
|
||||||
|
animation = {
|
||||||
|
animation_type = "strobe",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Search prev with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"*",
|
||||||
|
function()
|
||||||
|
require("undo-glow").search_star {
|
||||||
|
animation = {
|
||||||
|
animation_type = "strobe",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Search star with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"#",
|
||||||
|
function()
|
||||||
|
require("undo-glow").search_hash {
|
||||||
|
animation = {
|
||||||
|
animation_type = "strobe",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Search hash with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gc",
|
||||||
|
function()
|
||||||
|
-- This is an implementation to preserve the cursor position
|
||||||
|
local pos = vim.fn.getpos "."
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.fn.setpos(".", pos)
|
||||||
|
end)
|
||||||
|
return require("undo-glow").comment()
|
||||||
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Toggle comment with highlight",
|
||||||
|
expr = true,
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gc",
|
||||||
|
function()
|
||||||
|
require("undo-glow").comment_textobject()
|
||||||
|
end,
|
||||||
|
mode = "o",
|
||||||
|
desc = "Comment textobject with highlight",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gcc",
|
||||||
|
function()
|
||||||
|
return require("undo-glow").comment_line()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
desc = "Toggle comment line with highlight",
|
||||||
|
expr = true,
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
desc = "Highlight when yanking (copying) text",
|
||||||
|
callback = function()
|
||||||
|
require("undo-glow").yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- This only handles neovim instance and do not highlight when switching panes in tmux
|
||||||
|
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||||
|
desc = "Highlight when cursor moved significantly",
|
||||||
|
callback = function()
|
||||||
|
require("undo-glow").cursor_moved {
|
||||||
|
animation = {
|
||||||
|
animation_type = "slide",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- This will handle highlights when focus gained, including switching panes in tmux
|
||||||
|
vim.api.nvim_create_autocmd("FocusGained", {
|
||||||
|
desc = "Highlight when focus gained",
|
||||||
|
callback = function()
|
||||||
|
---@type UndoGlow.CommandOpts
|
||||||
|
local opts = {
|
||||||
|
animation = {
|
||||||
|
animation_type = "slide",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
opts = require("undo-glow.utils").merge_command_opts(
|
||||||
|
"UgCursor",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
local pos = require("undo-glow.utils").get_current_cursor_row()
|
||||||
|
|
||||||
|
require("undo-glow").highlight_region(
|
||||||
|
vim.tbl_extend("force", opts, {
|
||||||
|
s_row = pos.s_row,
|
||||||
|
s_col = pos.s_col,
|
||||||
|
e_row = pos.e_row,
|
||||||
|
e_col = pos.e_col,
|
||||||
|
force_edge = opts.force_edge == nil and true
|
||||||
|
or opts.force_edge,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||||
|
desc = "Highlight when search cmdline leave",
|
||||||
|
callback = function()
|
||||||
|
require("undo-glow").search_cmd {
|
||||||
|
animation = {
|
||||||
|
animation_type = "fade",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
Write-Host "NVIM setup script for Windows" -ForegroundColor Green
|
|
||||||
Write-Host "Installing winget packages" -foregroundcolor cyan
|
|
||||||
|
|
||||||
$packages = @(
|
|
||||||
"Neovim.Neovim",
|
|
||||||
"MartinStorsjo.LLVM-MinGW.MSVCRT",
|
|
||||||
"zig.zig",
|
|
||||||
"GnuWin32.Make",
|
|
||||||
"Rustlang.Rust.MSVC",
|
|
||||||
"GoLang.Go",
|
|
||||||
"Kitware.Cmake",
|
|
||||||
"Ninja-build.Ninja",
|
|
||||||
"LuaLS.lua-language-server",
|
|
||||||
"GitHub.cli",
|
|
||||||
"GNU.Wget2",
|
|
||||||
"GnuWin32.UnZip",
|
|
||||||
"GnuWin32.Gzip",
|
|
||||||
"7zip.7zip"
|
|
||||||
)
|
|
||||||
|
|
||||||
for ($i = 0; $i -lt $packages.Count; $i++) {
|
|
||||||
$index = $i + 1
|
|
||||||
Write-Host ("{0,4}) {1}" -f $index, $packages[$i]) -foreground yellow
|
|
||||||
winget install $package
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !(Get-Command cargo -ErrorAction SilentlyContinue) ) {
|
|
||||||
Write-Host "Cargo is not installed. Please install Rust to proceed." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
Write-Host "Installing cargo package treesitter-cli" -foregroundcolor cyan
|
|
||||||
cargo install --locked tree-sitter-cli
|
|
||||||
}
|
|
||||||
|
|
||||||
$list = @(
|
|
||||||
"Git.Git",
|
|
||||||
"ajeetdsouza.zoxide"
|
|
||||||
)
|
|
||||||
|
|
||||||
Write-Host "`nOptional packages to install:`n" -ForegroundColor Magenta
|
|
||||||
|
|
||||||
for ($i = 0; $i -lt $list.Count; $i++) {
|
|
||||||
$index = $i + 1
|
|
||||||
Write-Host "$index) $($list[$i])" -ForegroundColor Magenta
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nInstall all packages? [Y]es / [N]o / [E]dit list: " -ForegroundColor Green -NoNewLine
|
|
||||||
$answer = Read-Host
|
|
||||||
|
|
||||||
switch ($answer.ToLower()) {
|
|
||||||
|
|
||||||
"y" {
|
|
||||||
$selected = $list
|
|
||||||
}
|
|
||||||
|
|
||||||
"n" {
|
|
||||||
Write-Host "No packages will be installed." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
"e" {
|
|
||||||
Write-Host "`nEnter numbers to EXCLUDE (space separated, e.g. 2 3): " -ForegroundColor Yellow -NoNewLine
|
|
||||||
$excludeInput = Read-Host
|
|
||||||
|
|
||||||
$excludeIndexes = $excludeInput -split "\s+" | ForEach-Object { [int]$_ - 1 }
|
|
||||||
|
|
||||||
$selected = @()
|
|
||||||
for ($i = 0; $i -lt $list.Count; $i++) {
|
|
||||||
if ($excludeIndexes -notcontains $i) {
|
|
||||||
$selected += $list[$i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
default {
|
|
||||||
Write-Host "Invalid option. Exiting." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($selected.Count -eq 0) {
|
|
||||||
Write-Host "Nothing to install." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nInstalling selected packages:`n" -ForegroundColor Cyan
|
|
||||||
|
|
||||||
foreach ($module in $selected) {
|
|
||||||
Write-Host "Installing $module..." -ForegroundColor Yellow
|
|
||||||
winget install --id $module
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user