Compare commits

..

36 Commits

Author SHA1 Message Date
8245a48cc7
add nixfmt to runtime pkgs 2025-01-10 18:03:29 +01:00
3d82bad6ee
pkgs: add nixfmt-rfc-style 2025-01-08 18:32:17 +01:00
6e26ec33fa
gitignore: update 2024-12-03 23:15:07 +01:00
b9c3cd2e1a
gitignore: update 2024-12-03 23:14:02 +01:00
a09a34997c
lsp: add typist_lsp 2024-12-03 22:33:03 +01:00
127047caeb
lsp: add yaml-lsp-server 2024-12-03 22:24:57 +01:00
60acbede4d
switch nixpkgs to 24.11 2024-12-03 22:09:52 +01:00
9f36693f90
lua -> vim.loop.cwd() -> vim.fn.getcwd() 2024-09-25 16:42:15 +02:00
8fdf9bd08c
flake: update 2024-09-25 16:39:17 +02:00
e3c064d3a9
flake: update 2024-06-19 10:12:55 +02:00
8754d5b79d
flake: update 2024-05-31 11:44:03 +02:00
ba6b926cc4
flake: update 2024-04-12 17:28:34 +02:00
201161972e
packages: re-enable nixd 2024-04-12 17:26:46 +02:00
2b10f5cb32
nvim-lsp: remove implicit pkgs definition 2024-03-16 22:09:08 +01:00
c055bd2a2f
flake: add bundled package, remove nixd over unresolved CVE 2024-03-16 19:06:45 +01:00
f042e08ecd
Revert "flake: add arm64-linux target"
This reverts commit 13bed01615.
2024-03-16 17:12:06 +01:00
13bed01615
flake: add arm64-linux target 2024-03-16 15:32:53 +01:00
3f9559992a
lua: format 2024-03-16 15:22:08 +01:00
9332c56c01
nvim-lsp: remove nativeBuildInputs 2024-03-16 15:09:45 +01:00
a9bc0c8a7a
flake: update 2024-03-16 14:20:14 +01:00
5bba266c6e
flake: add symlink for needed packages in overlay 2024-03-16 14:13:23 +01:00
dce3a89665
nvim-ts-rainbow -> rainbow-delimiters-nvim 2023-12-21 22:45:36 +01:00
b660608fb3
plugin: add editorconfig-nvim 2023-10-31 21:20:26 +01:00
9652f4cb75 repo: add gitignore 2023-10-27 01:40:00 +02:00
df0441425f nixd: add config 2023-10-27 01:39:32 +02:00
6347d51dc2 lsp_servers: move packages from flake.nix to nvim-lsp.nix 2023-10-27 01:39:05 +02:00
3c95acb92e flake: update configuration, add proper outputs and arm64 target 2023-10-27 01:38:31 +02:00
a81f0a2041 go: add gopls 2023-10-26 14:52:30 +02:00
8555092095 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7131f3c223a2d799568e4b278380cd9dac2b8579' (2023-10-04)
  → 'github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c' (2023-10-25)
2023-10-26 14:48:34 +02:00
b9f6e59d12 flake: update 2023-10-04 20:59:16 +02:00
871a8b4a8c enable zls (zig language server) 2023-07-10 10:41:56 +02:00
d26fa59d72 shorten keybind expressions 2023-07-10 10:30:17 +02:00
2544f1130f don't call lsp setup twice, clieanup global opt setting 2023-07-09 17:23:18 +02:00
44eaabc43c lua_ls: fix vim global not found 2023-07-09 12:01:44 +02:00
aa745901c6 don't display diagnostics by default 2023-07-08 17:15:22 +02:00
6ebd6e83c6 don\'t display diagnostics by default 2023-07-08 17:11:09 +02:00
7 changed files with 143 additions and 679 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
result
.ccls-cache/
hello.c
compile_commands.json

1
.nixd.json Normal file
View File

@ -0,0 +1 @@
{"formatting":{"command":"alejandra"}}

628
ado.vim
View File

@ -1,628 +0,0 @@
" Supporting code -------------------------------------------------------------
" Preamble {{{
" ~/.local/share/nvim/plugged/vim-colorschemes/colors/ado.vim
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
finish
endif
set background=dark
if exists("syntax_on")
syntax reset
endif
let colors_name = "ado"
if !exists("g:badwolf_html_link_underline") " {{{
let g:badwolf_html_link_underline = 1
endif " }}}
if !exists("g:badwolf_css_props_highlight") " {{{
let g:badwolf_css_props_highlight = 0
endif " }}}
" }}}
" Palette {{{
let s:bwc = {}
" The most basic of all our colors is a slightly tweaked version of the Molokai
" Normal text.
let s:bwc.plain = ['f8f6f2', 15]
" Pure and simple.
let s:bwc.snow = ['ffffff', 15]
let s:bwc.coal = ['000000', 16]
" All of the Gravel colors are based on a brown from Clouds Midnight.
let s:bwc.brightgravel = ['d9cec3', 252]
let s:bwc.lightgravel = ['998f84', 245]
let s:bwc.gravel = ['857f78', 243]
let s:bwc.mediumgravel = ['666462', 241]
let s:bwc.deepgravel = ['45413b', 238]
let s:bwc.deepergravel = ['35322d', 236]
let s:bwc.darkgravel = ['242321', 235]
let s:bwc.blackgravel = ['1c1b1a', 233]
let s:bwc.blackestgravel = ['141413', 232]
" A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on
" my desk.
let s:bwc.dalespale = ['fade3e', 221]
" orange3
let s:bwc.orange3 = ['d75f00', 166]
" A beautiful tan from Tomorrow Night.
let s:bwc.dirtyblonde = ['f4cf86', 222]
" Delicious, chewy red from Made of Code for the poppiest highlights.
let s:bwc.taffy = ['ff2c4b', 160]
" Another chewy accent, but use sparingly!
let s:bwc.saltwatertaffy = ['8cffba', 121]
" The star of the show comes straight from Made of Code.
let s:bwc.tardis = ['0a9dff', 39]
" This one's from Mustang, not Florida!
let s:bwc.orange = ['ffa724', 184]
" A limier green from Getafe.
let s:bwc.lime = ['aeee00', 220]
"
" A limier green from Getafe.
let s:bwc.lime2 = ['aeee00', 164]
" Rose's dress in The Idiot's Lantern.
let s:bwc.dress = ['ff9eb8', 161]
" Another play on the brown from Clouds Midnight. I love that color.
let s:bwc.toffee = ['b88853', 137]
" Also based on that Clouds Midnight brown.
let s:bwc.coffee = ['c7915b', 173]
let s:bwc.darkroast = ['88633f', 95]
" }}}
" Highlighting Function {{{
function! s:HL(group, fg, ...)
" Arguments: group, guifg, guibg, gui, guisp
let histring = 'hi ' . a:group . ' '
if strlen(a:fg)
if a:fg == 'fg'
let histring .= 'guifg=fg ctermfg=fg '
else
let c = get(s:bwc, a:fg)
let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
endif
endif
if a:0 >= 1 && strlen(a:1)
if a:1 == 'bg'
let histring .= 'guibg=bg ctermbg=bg '
else
let c = get(s:bwc, a:1)
let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
endif
endif
if a:0 >= 2 && strlen(a:2)
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
if a:0 >= 3 && strlen(a:3)
let c = get(s:bwc, a:3)
let histring .= 'guisp=#' . c[0] . ' '
endif
" echom histring
execute histring
endfunction
" }}}
" Configuration Options {{{
if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter
let s:gutter = 'blackestgravel'
else
let s:gutter = 'blackgravel'
endif
if exists('g:badwolf_tabline')
if g:badwolf_tabline == 0
let s:tabline = 'blackestgravel'
elseif g:badwolf_tabline == 1
let s:tabline = 'blackgravel'
elseif g:badwolf_tabline == 2
let s:tabline = 'darkgravel'
elseif g:badwolf_tabline == 3
let s:tabline = 'deepgravel'
else
let s:tabline = 'blackestgravel'
endif
else
let s:tabline = 'blackgravel'
endif
" }}}
" Actual colorscheme ----------------------------------------------------------
" Vanilla Vim {{{
" General/UI {{{
call s:HL('Normal', 'plain', 'blackgravel')
call s:HL('Folded', 'mediumgravel', 'bg', 'none')
call s:HL('VertSplit', 'lightgravel', 'bg', 'none')
call s:HL('CursorLine', '', 'darkgravel', 'none')
call s:HL('CursorColumn', '', 'darkgravel')
call s:HL('ColorColumn', '', 'darkgravel')
call s:HL('TabLine', 'plain', s:tabline, 'none')
call s:HL('TabLineFill', 'plain', s:tabline, 'none')
call s:HL('TabLineSel', 'coal', 'tardis', 'none')
call s:HL('MatchParen', 'dalespale', 'darkgravel', 'bold')
call s:HL('NonText', 'deepgravel', 'bg')
call s:HL('SpecialKey', 'deepgravel', 'bg')
call s:HL('Visual', '', 'deepgravel')
call s:HL('VisualNOS', '', 'deepgravel')
call s:HL('Search', 'coal', 'dalespale', 'bold')
call s:HL('IncSearch', 'coal', 'tardis', 'bold')
call s:HL('Underlined', 'fg', '', 'underline')
call s:HL('StatusLine', 'coal', 'tardis', 'bold')
call s:HL('StatusLineNC', 'snow', 'deepgravel', 'bold')
call s:HL('Directory', 'dirtyblonde', '', 'bold')
call s:HL('Title', 'lime')
call s:HL('ErrorMsg', 'taffy', 'bg', 'bold')
call s:HL('MoreMsg', 'dalespale', '', 'bold')
call s:HL('ModeMsg', 'dirtyblonde', '', 'bold')
call s:HL('Question', 'dirtyblonde', '', 'bold')
call s:HL('WarningMsg', 'dress', '', 'bold')
" This is a ctags tag, not an HTML one. 'Something you can use c-] on'.
call s:HL('Tag', '', '', 'bold')
" hi IndentGuides guibg=#373737
" hi WildMenu guifg=#66D9EF guibg=#000000
" }}}
" Gutter {{{
call s:HL('LineNr', 'mediumgravel', s:gutter)
call s:HL('SignColumn', '', s:gutter)
call s:HL('FoldColumn', 'mediumgravel', s:gutter)
" }}}
" Cursor {{{
call s:HL('Cursor', 'coal', 'tardis', 'bold')
call s:HL('vCursor', 'coal', 'tardis', 'bold')
call s:HL('iCursor', 'coal', 'tardis', 'none')
" }}}
" Syntax highlighting {{{
" Start with a simple base.
call s:HL('Special', 'plain')
" Comments are slightly brighter than folds, to make 'headers' easier to see.
call s:HL('Comment', 'gravel')
call s:HL('Todo', 'snow', 'bg', 'bold')
call s:HL('SpecialComment', 'snow', 'bg', 'bold')
" Strings are a nice, pale straw color. Nothing too fancy.
call s:HL('String', 'dirtyblonde')
" Control flow stuff is taffy.
call s:HL('Statement', 'taffy', '', 'bold')
call s:HL('Keyword', 'taffy', '', 'bold')
call s:HL('Conditional', 'taffy', '', 'bold')
call s:HL('Operator', 'taffy', '', 'none')
call s:HL('Label', 'taffy', '', 'none')
call s:HL('Repeat', 'taffy', '', 'none')
" Functions and variable declarations are orange, because plain looks weird.
call s:HL('Identifier', 'orange', '', 'none')
call s:HL('Function', 'orange', '', 'none')
call s:HL('Namespace', 'orange', '', 'none')
call s:HL("cppSTLnamespace", 'dirtyblonde', "", "")
" Preprocessor stuff is lime, to make it pop.
"
" This includes imports in any given language, because they should usually be
" grouped together at the beginning of a file. If they're in the middle of some
" other code they should stand out, because something tricky is
" probably going on.
call s:HL('PreProc', 'lime', '', 'none')
call s:HL('Macro', 'lime', '', 'none')
call s:HL('Define', 'lime', '', 'none')
call s:HL('PreCondit', 'lime', '', 'bold')
" Constants of all kinds are colored together.
" I'm not really happy with the color yet...
call s:HL('Constant', 'toffee', '', 'bold')
call s:HL('Character', 'toffee', '', 'bold')
call s:HL('Boolean', 'toffee', '', 'bold')
call s:HL('Number', 'toffee', '', 'bold')
call s:HL('Float', 'toffee', '', 'bold')
" Not sure what 'special character in a constant' means, but let's make it pop.
call s:HL('SpecialChar', 'dress', '', 'bold')
call s:HL('Type', 'dress', '', 'none')
call s:HL('StorageClass', 'orange3', '', 'none')
call s:HL('Structure', 'orange3', '', 'none')
call s:HL('Typedef', 'taffy', '', 'bold')
" Make try/catch blocks stand out.
call s:HL('Exception', 'lime', '', 'bold')
" Misc
call s:HL('Error', 'snow', 'orange3', 'bold')
call s:HL('Debug', 'snow', '', 'bold')
call s:HL('Ignore', 'gravel', '', '')
" }}}
" Completion Menu {{{
call s:HL('Pmenu', 'plain', 'deepergravel')
call s:HL('PmenuSel', 'coal', 'tardis', 'bold')
call s:HL('PmenuSbar', '', 'deepergravel')
call s:HL('PmenuThumb', 'brightgravel')
" }}}
" Diffs {{{
call s:HL('DiffDelete', 'coal', 'coal')
call s:HL('DiffAdd', '', 'deepergravel')
call s:HL('DiffChange', '', 'darkgravel')
call s:HL('DiffText', 'snow', 'deepergravel', 'bold')
" }}}
" Spelling {{{
if has("spell")
call s:HL('SpellCap', 'dalespale', 'bg', 'undercurl,bold', 'dalespale')
call s:HL('SpellBad', '', 'bg', 'undercurl', 'dalespale')
call s:HL('SpellLocal', '', '', 'undercurl', 'dalespale')
call s:HL('SpellRare', '', '', 'undercurl', 'dalespale')
endif
" }}}
" }}}
" Plugins {{{
" CtrlP {{{
" the message when no match is found
call s:HL('CtrlPNoEntries', 'snow', 'taffy', 'bold')
" the matched pattern
call s:HL('CtrlPMatch', 'orange', 'bg', 'none')
" the line prefix '>' in the match window
call s:HL('CtrlPLinePre', 'deepgravel', 'bg', 'none')
" the prompts base
call s:HL('CtrlPPrtBase', 'deepgravel', 'bg', 'none')
" the prompts text
call s:HL('CtrlPPrtText', 'plain', 'bg', 'none')
" the prompts cursor when moving over the text
call s:HL('CtrlPPrtCursor', 'coal', 'tardis', 'bold')
" 'prt' or 'win', also for 'regex'
call s:HL('CtrlPMode1', 'coal', 'tardis', 'bold')
" 'file' or 'path', also for the local working dir
call s:HL('CtrlPMode2', 'coal', 'tardis', 'bold')
" the scanning status
call s:HL('CtrlPStats', 'coal', 'tardis', 'bold')
" TODO: CtrlP extensions.
" CtrlPTabExtra : the part of each line thats not matched against (Comment)
" CtrlPqfLineCol : the line and column numbers in quickfix mode (|s:HL-Search|)
" CtrlPUndoT : the elapsed time in undo mode (|s:HL-Directory|)
" CtrlPUndoBr : the square brackets [] in undo mode (Comment)
" CtrlPUndoNr : the undo number inside [] in undo mode (String)
" }}}
" EasyMotion {{{
call s:HL('EasyMotionTarget', 'tardis', 'bg', 'bold')
call s:HL('EasyMotionShade', 'deepgravel', 'bg')
" }}}
" Interesting Words {{{
" These are only used if you're me or have copied the <leader>hNUM mappings
" from my Vimrc.
call s:HL('InterestingWord1', 'coal', 'orange')
call s:HL('InterestingWord2', 'coal', 'lime')
call s:HL('InterestingWord3', 'coal', 'saltwatertaffy')
call s:HL('InterestingWord4', 'coal', 'toffee')
call s:HL('InterestingWord5', 'coal', 'dress')
call s:HL('InterestingWord6', 'coal', 'taffy')
" }}}
" Makegreen {{{
" hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=coal guibg=#9edf1c
" hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048
" }}}
" Rainbow Parentheses {{{
call s:HL('level16c', 'mediumgravel', '', 'bold')
call s:HL('level15c', 'dalespale', '', 'bold')
call s:HL('level14c', 'dress', '', 'bold')
call s:HL('level13c', 'orange', '', 'bold')
call s:HL('level12c', 'tardis', '', 'bold')
call s:HL('level11c', 'lime', '', 'bold')
call s:HL('level10c', 'toffee', '', 'bold')
call s:HL('level9c', 'saltwatertaffy', '', 'bold')
call s:HL('level8c', 'coffee', '', 'bold')
call s:HL('level7c', 'dalespale', '', 'bold')
call s:HL('level6c', 'dress', '', 'bold')
call s:HL('level5c', 'orange', '', 'bold')
call s:HL('level4c', 'tardis', '', 'bold')
call s:HL('level3c', 'lime', '', 'bold')
call s:HL('level2c', 'toffee', '', 'bold')
call s:HL('level1c', 'saltwatertaffy', '', 'bold')
" }}}
" ShowMarks {{{
call s:HL('ShowMarksHLl', 'tardis', 'blackgravel')
call s:HL('ShowMarksHLu', 'tardis', 'blackgravel')
call s:HL('ShowMarksHLo', 'tardis', 'blackgravel')
call s:HL('ShowMarksHLm', 'tardis', 'blackgravel')
" }}}
" }}}
" Filetype-specific {{{
" Clojure {{{
call s:HL('clojureSpecial', 'lime', '', '')
call s:HL('clojureDefn', 'lime', '', '')
call s:HL('clojureDefMacro', 'lime', '', '')
call s:HL('clojureDefine', 'lime', '', '')
call s:HL('clojureMacro', 'lime', '', '')
call s:HL('clojureCond', 'lime', '', '')
call s:HL('clojureKeyword', 'orange', '', 'none')
call s:HL('clojureFunc', 'dress', '', 'none')
call s:HL('clojureRepeat', 'dress', '', 'none')
call s:HL('clojureParen0', 'lightgravel', '', 'none')
call s:HL('clojureAnonArg', 'snow', '', 'bold')
" }}}
" CSS {{{
if g:badwolf_css_props_highlight
call s:HL('cssColorProp', 'dirtyblonde', '', 'none')
call s:HL('cssBoxProp', 'dirtyblonde', '', 'none')
call s:HL('cssTextProp', 'dirtyblonde', '', 'none')
call s:HL('cssRenderProp', 'dirtyblonde', '', 'none')
call s:HL('cssGeneratedContentProp', 'dirtyblonde', '', 'none')
else
call s:HL('cssColorProp', 'fg', '', 'none')
call s:HL('cssBoxProp', 'fg', '', 'none')
call s:HL('cssTextProp', 'fg', '', 'none')
call s:HL('cssRenderProp', 'fg', '', 'none')
call s:HL('cssGeneratedContentProp', 'fg', '', 'none')
end
call s:HL('cssValueLength', 'toffee', '', 'bold')
call s:HL('cssColor', 'toffee', '', 'bold')
call s:HL('cssBraces', 'lightgravel', '', 'none')
call s:HL('cssIdentifier', 'orange', '', 'bold')
call s:HL('cssClassName', 'orange', '', 'none')
" }}}
" Diff {{{
call s:HL('gitDiff', 'lightgravel', '',)
call s:HL('diffRemoved', 'dress', '',)
call s:HL('diffAdded', 'lime', '',)
call s:HL('diffFile', 'coal', 'taffy', 'bold')
call s:HL('diffNewFile', 'coal', 'taffy', 'bold')
call s:HL('diffLine', 'coal', 'orange', 'bold')
call s:HL('diffSubname', 'orange', '', 'none')
" }}}
" Django Templates {{{
call s:HL('djangoArgument', 'dirtyblonde', '',)
call s:HL('djangoTagBlock', 'orange', '')
call s:HL('djangoVarBlock', 'orange', '')
" hi djangoStatement guifg=#ff3853 gui=bold
" hi djangoVarBlock guifg=#f4cf86
" }}}
" HTML {{{
" Punctuation
call s:HL('htmlTag', 'darkroast', 'bg', 'none')
call s:HL('htmlEndTag', 'darkroast', 'bg', 'none')
" Tag names
call s:HL('htmlTagName', 'coffee', '', 'bold')
call s:HL('htmlSpecialTagName', 'coffee', '', 'bold')
call s:HL('htmlSpecialChar', 'lime', '', 'none')
" Attributes
call s:HL('htmlArg', 'coffee', '', 'none')
" Stuff inside an <a> tag
if g:badwolf_html_link_underline
call s:HL('htmlLink', 'lightgravel', '', 'underline')
else
call s:HL('htmlLink', 'lightgravel', '', 'none')
endif
" }}}
" Java {{{
call s:HL('javaClassDecl', 'taffy', '', 'bold')
call s:HL('javaScopeDecl', 'taffy', '', 'bold')
call s:HL('javaCommentTitle', 'gravel', '')
call s:HL('javaDocTags', 'snow', '', 'none')
call s:HL('javaDocParam', 'dalespale', '', '')
" }}}
" LaTeX {{{
call s:HL('texStatement', 'tardis', '', 'none')
call s:HL('texMathZoneX', 'orange', '', 'none')
call s:HL('texMathZoneA', 'orange', '', 'none')
call s:HL('texMathZoneB', 'orange', '', 'none')
call s:HL('texMathZoneC', 'orange', '', 'none')
call s:HL('texMathZoneD', 'orange', '', 'none')
call s:HL('texMathZoneE', 'orange', '', 'none')
call s:HL('texMathZoneV', 'orange', '', 'none')
call s:HL('texMathZoneX', 'orange', '', 'none')
call s:HL('texMath', 'orange', '', 'none')
call s:HL('texMathMatcher', 'orange', '', 'none')
call s:HL('texRefLabel', 'dirtyblonde', '', 'none')
call s:HL('texRefZone', 'lime', '', 'none')
call s:HL('texComment', 'darkroast', '', 'none')
call s:HL('texDelimiter', 'orange', '', 'none')
call s:HL('texZone', 'brightgravel', '', 'none')
augroup badwolf_tex
au!
au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$" end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup
augroup END
" }}}
" LessCSS {{{
call s:HL('lessVariable', 'lime', '', 'none')
" }}}
" Lispyscript {{{
call s:HL('lispyscriptDefMacro', 'lime', '', '')
call s:HL('lispyscriptRepeat', 'dress', '', 'none')
" }}}
" Mail {{{
call s:HL('mailSubject', 'orange', '', 'bold')
call s:HL('mailHeader', 'lightgravel', '', '')
call s:HL('mailHeaderKey', 'lightgravel', '', '')
call s:HL('mailHeaderEmail', 'snow', '', '')
call s:HL('mailURL', 'toffee', '', 'underline')
call s:HL('mailSignature', 'gravel', '', 'none')
call s:HL('mailQuoted1', 'gravel', '', 'none')
call s:HL('mailQuoted2', 'dress', '', 'none')
call s:HL('mailQuoted3', 'dirtyblonde', '', 'none')
call s:HL('mailQuoted4', 'orange', '', 'none')
call s:HL('mailQuoted5', 'lime', '', 'none')
" }}}
" Markdown {{{
call s:HL('markdownHeadingRule', 'lightgravel', '', 'bold')
call s:HL('markdownHeadingDelimiter', 'lightgravel', '', 'bold')
call s:HL('markdownOrderedListMarker', 'lightgravel', '', 'bold')
call s:HL('markdownListMarker', 'lightgravel', '', 'bold')
call s:HL('markdownItalic', 'snow', '', 'bold')
call s:HL('markdownBold', 'snow', '', 'bold')
call s:HL('markdownH1', 'orange', '', 'bold')
call s:HL('markdownH2', 'lime', '', 'bold')
call s:HL('markdownH3', 'lime', '', 'none')
call s:HL('markdownH4', 'lime', '', 'none')
call s:HL('markdownH5', 'lime', '', 'none')
call s:HL('markdownH6', 'lime', '', 'none')
call s:HL('markdownLinkText', 'toffee', '', 'underline')
call s:HL('markdownIdDeclaration', 'toffee')
call s:HL('markdownAutomaticLink', 'toffee', '', 'bold')
call s:HL('markdownUrl', 'toffee', '', 'bold')
call s:HL('markdownUrldelimiter', 'lightgravel', '', 'bold')
call s:HL('markdownLinkDelimiter', 'lightgravel', '', 'bold')
call s:HL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold')
call s:HL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold')
call s:HL('markdownCode', 'dirtyblonde', '', 'none')
call s:HL('markdownCodeBlock', 'dirtyblonde', '', 'none')
" }}}
" MySQL {{{
call s:HL('mysqlSpecial', 'dress', '', 'bold')
" }}}
" Python {{{
hi def link pythonOperator Operator
call s:HL('pythonBuiltin', 'dress')
call s:HL('pythonBuiltinObj', 'dress')
call s:HL('pythonBuiltinFunc', 'dress')
call s:HL('pythonEscape', 'dress')
call s:HL('pythonException', 'lime', '', 'bold')
call s:HL('pythonExceptions', 'lime', '', 'none')
call s:HL('pythonPrecondit', 'lime', '', 'none')
call s:HL('pythonDecorator', 'taffy', '', 'none')
call s:HL('pythonRun', 'gravel', '', 'bold')
call s:HL('pythonCoding', 'gravel', '', 'bold')
" }}}
" SLIMV {{{
" Rainbow parentheses
call s:HL('hlLevel0', 'gravel')
call s:HL('hlLevel1', 'orange')
call s:HL('hlLevel2', 'saltwatertaffy')
call s:HL('hlLevel3', 'dress')
call s:HL('hlLevel4', 'coffee')
call s:HL('hlLevel5', 'dirtyblonde')
call s:HL('hlLevel6', 'orange')
call s:HL('hlLevel7', 'saltwatertaffy')
call s:HL('hlLevel8', 'dress')
call s:HL('hlLevel9', 'coffee')
" }}}
" Vim {{{
call s:HL('VimCommentTitle', 'lightgravel', '', 'bold')
call s:HL('VimMapMod', 'dress', '', 'none')
call s:HL('VimMapModKey', 'dress', '', 'none')
call s:HL('VimNotation', 'dress', '', 'none')
call s:HL('VimBracket', 'dress', '', 'none')
" }}}
" }}}

12
flake.lock generated
View File

@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1688646010,
"narHash": "sha256-kCeza5eKI2NEi8k0EoeZfv3lN1r1Vwx+L/VA6I8tmG4=",
"owner": "NixOS",
"lastModified": 1733120037,
"narHash": "sha256-En+gSoVJ3iQKPDU1FHrR6zIxSLXKjzKY+pnh9tt+Yts=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5daaa32204e9c46b05cd709218b7ba733d07e80c",
"rev": "f9f0d5c5380be0a599b1fb54641fa99af8281539",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,31 +2,77 @@
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = {
self,
nixpkgs,
}: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
in {
nvim = pkgs.mkShell {
nativeBuildInputs = [
pkgs.alejandra
pkgs.ccls
pkgs.luaformatter
pkgs.nixd
pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
(import ./nvim-lsp.nix {inherit pkgs;})
];
};
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
neovim = import ./nvim-lsp.nix {inherit pkgs;};
in {
nvim = pkgs.symlinkJoin {
name = "nvim";
paths = with pkgs;
[
alejandra
ccls
gopls
luaformatter
nixd
nixfmt-rfc-style
pyright
rust-analyzer
sumneko-lua-language-server
svls
texlab
tree-sitter
typst-lsp
verible
yaml-language-server
zls
]
++ [neovim];
};
});
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.alejandra
pkgs.ccls
pkgs.gopls
pkgs.luaformatter
pkgs.nixd
pkgs.nixfmt-rfc-style
pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
(import ./nvim-lsp.nix {inherit pkgs;})
];
};
});
overlays = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
overlay = final: prev: {
nvim = self.packages.${system}.nvim;
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
};
}

View File

@ -1,8 +1,7 @@
{pkgs ? import <nixpkgs> {}}: let
{pkgs}: let
neovim = pkgs.neovim.override {
configure = {
customRC = ''
${colorScheme}
lua <<EOF
${luaRc}
EOF
@ -12,6 +11,7 @@
(nvim-treesitter.withPlugins (parsers: [
parsers.c
parsers.cpp
parsers.go
parsers.json
parsers.latex
parsers.lua
@ -29,12 +29,13 @@
cmp-nvim-ultisnips
cmp-path
colorizer
editorconfig-nvim
fugitive
fzf-lua
gruvbox
nvim-cmp
nvim-lspconfig
nvim-ts-rainbow
rainbow-delimiters-nvim
repeat
targets-vim
UltiSnips
@ -49,7 +50,6 @@
# lua
luaRc = builtins.readFile ./vimrc.lua;
colorScheme = builtins.readFile ./ado.vim;
in
pkgs.runCommand "nvim-lsp" {} ''
mkdir -p $out/bin

View File

@ -1,34 +1,40 @@
-- Basic settings
vim.g.loaded_matchparen = true
vim.g.netrw_liststyle = 3
vim.go.background = 'dark'
vim.go.belloff = 'all'
vim.go.breakindent = true
vim.go.hlsearch = false
vim.go.laststatus = 0
vim.go.lazyredraw = true
vim.go.showcmd = true
vim.go.synmaxcol = 800
vim.go.syntax = 'on'
vim.go.termguicolors = true
vim.go.titleold = vim.fn.getcwd()
vim.go.title = true
vim.go.wildmenu = true
vim.go.wrap = true
vim.wo.number = true
--vim.cmd([[colorscheme gruvbox]])
local glob_opts = {
background = 'dark',
belloff = 'all',
breakindent = true,
hlsearch = false,
laststatus = 0,
lazyredraw = true,
showcmd = true,
synmaxcol = 800,
syntax = 'on',
termguicolors = true,
titleold = vim.fn.getcwd(),
title = true,
wildmenu = true,
wrap = true,
}
for option, value in pairs(glob_opts) do
vim.go[option] = value
end
vim.cmd([[colorscheme gruvbox]])
require 'nvim-treesitter.configs'.setup {
highlight = { enable = true, disable = {} },
indent = { enable = false, disable = {} },
rainbow = {
enable = true,
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
colors = {
'#ff0000', '#ffa500', '#ffff00', '#008000', '#0051a0', '#8003f2'
} -- table of hex strings
extended_mode = true,
max_file_lines = 1000,
colors = { '#ff0000', '#0051a0' ,'#ffa500', '#ffff00', '#008000', '#8003f2' }
}
}
@ -99,6 +105,19 @@ vim.api.nvim_create_autocmd('LspAttach', {
end
})
vim.diagnostic.config({ virtual_text = false }) -- Turn off inline diagnostics
-- Show all diagnostics on current line in floating window
vim.api.nvim_set_keymap('n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>', opts)
-- Go to next diagnostic (if there are multiple on the same line, only shows
-- one at a time in the floating window)
vim.api.nvim_set_keymap('n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>', opts)
-- Go to prev diagnostic (if there are multiple on the same line, only shows
-- one at a time in the floating window)
vim.api.nvim_set_keymap('n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>', opts)
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local cmp = require 'cmp'
@ -163,7 +182,7 @@ cmp.setup({
}
})
local servers = { 'pyright', 'rust_analyzer', 'ccls', 'lua_ls', 'nixd', 'texlab', 'verible' }
local servers = { 'pyright', 'rust_analyzer', 'ccls', 'nixd', 'texlab', 'zls', 'gopls', 'yamlls', 'typst_lsp' }
local capabilities = require('cmp_nvim_lsp').default_capabilities()
for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup {
@ -172,11 +191,33 @@ for _, lsp in pairs(servers) do
end
require('lspconfig').lua_ls.setup({
capabilities = capabilities,
single_file_support = true,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' },
},
runtime = {
version = 'LuaJIT',
path = vim.split(package.path, ';'),
},
workspace = {
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
},
},
telemetry = {
enable = false,
},
},
},
})
require('lspconfig').verible.setup({
root_dir = function() return vim.loop.cwd() end
capabilities = capabilities,
root_dir = function() return vim.fn.getcwd() end
})
if vim.fn.exists('+undofile') ~= 0 then