├── ftdetect ├── eta.vim └── mdx.vim ├── ftplugin ├── rust.lua ├── prisma.lua ├── vim.vim ├── yaml.lua ├── c.lua ├── gitcommit.lua ├── reason.vim ├── diff.vim ├── scss.lua ├── org.vim ├── astro.lua ├── html.lua ├── python.vim ├── go.lua ├── text.vim ├── qf.lua ├── cpp.lua ├── r.vim ├── objc.lua ├── objcpp.lua ├── typescriptreact.lua ├── lua.lua ├── wiki.vim ├── scala.vim ├── typescript.lua ├── nim.vim ├── dockerfile.lua ├── javascript.lua └── markdown.lua ├── lua ├── tt │ ├── plugin │ │ ├── tasks.lua │ │ ├── dap.lua │ │ ├── treesitter.lua │ │ └── find.lua │ ├── snippets │ │ ├── ft │ │ │ ├── go.lua │ │ │ ├── lua.lua │ │ │ ├── typescript.lua │ │ │ ├── text.lua │ │ │ ├── rust.lua │ │ │ └── ecmascript.lua │ │ └── init.lua │ ├── constants.lua │ ├── filetypes.lua │ ├── lsp │ │ ├── mappings.lua │ │ ├── efm.lua │ │ └── init.lua │ ├── job_runner.lua │ ├── core_opts.lua │ ├── plugins.lua │ ├── autocmds.lua │ ├── project.lua │ ├── git.lua │ ├── ft │ │ └── ecma.lua │ ├── mappings.lua │ ├── tools.lua │ ├── nvim_utils.lua │ └── format.lua └── nvim-web-devicons.lua ├── after ├── ftplugin │ ├── javascript.vim │ ├── typescriptreact.vim │ ├── typescript.vim │ └── text.vim ├── queries │ ├── cpp │ │ └── highlights.scm │ ├── go │ │ └── highlights.scm │ ├── java │ │ └── highlights.scm │ ├── objc │ │ └── highlights.scm │ ├── rust │ │ └── highlights.scm │ ├── tsx │ │ └── highlights.scm │ ├── javascript │ │ └── highlights.scm │ ├── typescript │ │ └── highlights.scm │ └── c │ │ └── highlights.scm └── syntax │ ├── markdown.vim │ └── scala.vim ├── .gitattributes ├── spell ├── en.utf-8.add.spl └── en.utf-8.add ├── README.md ├── langservers ├── .yarnrc.yml ├── .prettierrc.json └── package.json ├── colors ├── jazzy.vim ├── tropics.vim ├── tropics-light.vim ├── ghost_mono.vim └── quiet-modified.vim ├── ginit.vim ├── .gitignore ├── .gitmodules ├── doc ├── stuck.txt └── arm64.txt ├── autoload ├── quickfixed.vim ├── tools.vim └── symbols.vim ├── snippets └── react.json ├── syntax ├── fugitiveblame.vim └── markdown.vim ├── init.lua └── knapsack.vim /ftdetect/eta.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ftplugin/rust.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ftplugin/prisma.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lua/tt/plugin/tasks.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /after/ftplugin/javascript.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /after/ftplugin/typescriptreact.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ftplugin/vim.vim: -------------------------------------------------------------------------------- 1 | set foldmethod=marker 2 | -------------------------------------------------------------------------------- /ftplugin/yaml.lua: -------------------------------------------------------------------------------- 1 | vim.wo.list = true 2 | -------------------------------------------------------------------------------- /ftplugin/c.lua: -------------------------------------------------------------------------------- 1 | vim.b.source_ft = { 'c' } 2 | -------------------------------------------------------------------------------- /ftplugin/gitcommit.lua: -------------------------------------------------------------------------------- 1 | vim.o.spell = true 2 | -------------------------------------------------------------------------------- /ftplugin/reason.vim: -------------------------------------------------------------------------------- 1 | packadd vim-reason-plus 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | lua/tt/packer_compiled.lua binary 2 | -------------------------------------------------------------------------------- /after/queries/cpp/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/go/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/java/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/objc/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/rust/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/tsx/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/javascript/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/queries/typescript/highlights.scm: -------------------------------------------------------------------------------- 1 | ../c/highlights.scm -------------------------------------------------------------------------------- /after/ftplugin/typescript.vim: -------------------------------------------------------------------------------- 1 | setlocal commentstring=//%s 2 | -------------------------------------------------------------------------------- /ftdetect/mdx.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile *.mdx set filetype=markdown 2 | -------------------------------------------------------------------------------- /ftplugin/diff.vim: -------------------------------------------------------------------------------- 1 | hi! link diffRemoved DiffDelete 2 | hi! link diffAdded DiffAdd 3 | -------------------------------------------------------------------------------- /ftplugin/scss.lua: -------------------------------------------------------------------------------- 1 | require("tt.lsp.efm").init() 2 | vim.lsp.start(vim.lsp.config.efm) 3 | -------------------------------------------------------------------------------- /ftplugin/org.vim: -------------------------------------------------------------------------------- 1 | let b:localleader = "\\" 2 | packadd vim-orgmode 3 | packadd vim-speeddating 4 | -------------------------------------------------------------------------------- /spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamestthompson3/vimConfig/HEAD/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vim Configuration 2 | 3 | Necessary external binaries: 4 | 5 | - ripgrep 6 | - ctags 7 | - fd 8 | -------------------------------------------------------------------------------- /ftplugin/astro.lua: -------------------------------------------------------------------------------- 1 | vim.bo.formatoptions = vim.bo.formatoptions .. "o" 2 | require("tt.ft.ecma").bootstrap() 3 | -------------------------------------------------------------------------------- /ftplugin/html.lua: -------------------------------------------------------------------------------- 1 | vim.g.html_indent_style1 = "inc" 2 | vim.g.html_indent_inctags = "style" 3 | vim.b.autoformat = true 4 | -------------------------------------------------------------------------------- /ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | set list 2 | let python_highlight_all = 1 3 | set omnifunc= 4 | 5 | hi link pythonStatement Keyword 6 | -------------------------------------------------------------------------------- /langservers/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | defaultSemverRangePrefix: "" 2 | 3 | nodeLinker: node-modules 4 | 5 | progressBarStyle: patrick 6 | -------------------------------------------------------------------------------- /ftplugin/go.lua: -------------------------------------------------------------------------------- 1 | vim.bo.suffixesadd = ".go" 2 | if vim.bo.readonly ~= true then 3 | require("tt.snippets.ft.go").init() 4 | end 5 | -------------------------------------------------------------------------------- /colors/jazzy.vim: -------------------------------------------------------------------------------- 1 | set background=dark 2 | let g:colors_name="jazzy" 3 | 4 | lua require('lush')(require('lush_theme.stockton_to_malone')) 5 | -------------------------------------------------------------------------------- /ginit.vim: -------------------------------------------------------------------------------- 1 | set lines=50 columns=300 2 | "GuiFont! JetBrainsMono\ Nerd\ Font\ Mono 3 | GuiLinespace 0 4 | GuiTabline 0 5 | GuiPopupmenu 0 6 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/go.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("ien", "if err != nil {\n\t$1\n}") 4 | end 5 | return M 6 | -------------------------------------------------------------------------------- /ftplugin/text.vim: -------------------------------------------------------------------------------- 1 | " needs a bit of work, still leaves off some letters, highlights single 2 | " capitals 3 | match keyword '\<\([A-Z]\{2,}_\?\)\+\>' 4 | "set tw=120 5 | -------------------------------------------------------------------------------- /after/syntax/markdown.vim: -------------------------------------------------------------------------------- 1 | unlet b:current_syntax 2 | syntax include @Yaml syntax/yaml.vim 3 | syntax region yamlFrontmatter start=/\%^---$/ end=/^---$/ keepend contains=@Yaml 4 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/lua.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("l", "log($1)") 4 | vim.snippet.add("req", 'local $1 = require("$1")') 5 | end 6 | return M 7 | -------------------------------------------------------------------------------- /ftplugin/qf.lua: -------------------------------------------------------------------------------- 1 | vim.keymap.set("n", "", ":call quickfixed#history(0)", { buffer = true }) 2 | vim.keymap.set("n", "", ":call quickfixed#history(1)", { buffer = true }) 3 | -------------------------------------------------------------------------------- /ftplugin/cpp.lua: -------------------------------------------------------------------------------- 1 | vim.b.source_ft = { "h", "hpp" } 2 | vim.keymap.set("n", "h", ":call tools#switchSourceHeader()", { buffer = true, silent = true }) 3 | vim.bo.define = "^(#s*define|[a-z]*s*consts*[a-z]*)" 4 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/typescript.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("fn", "function $1 ($2): $3 {\n\t$4\n}") 4 | vim.snippet.add("cn", "const $1 = ($2): $3 => {\n\t$4\n}") 5 | end 6 | return M 7 | -------------------------------------------------------------------------------- /ftplugin/r.vim: -------------------------------------------------------------------------------- 1 | " remapping the basic :: send line 2 | nmap , RDSendLine 3 | nmap . RDSendFile 4 | " remapping selection :: send multiple lines 5 | vmap , RDSendSelection 6 | " remapping selection :: send multiple lines + echo lines 7 | vmap ,e RESendSelection 8 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/text.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("twh", "content-type: wikitext\ncreated: $1\ntitle: $2\nmodified: $3\nid: $4\ntags: []\n\n") 4 | end 5 | return M 6 | 7 | -- Note: Original snippet used the current timestamp and filename, which can be manually added 8 | -------------------------------------------------------------------------------- /ftplugin/objc.lua: -------------------------------------------------------------------------------- 1 | vim.o.path = vim.o.path .. "/System/Library/Frameworks/Foundation.framework/Headers/**" 2 | vim.b.source_ft = { "m", "mm" } 3 | vim.keymap.set("n", "h", ":call tools#switchSourceHeader()", { buffer = true, silent = true }) 4 | vim.bo.define = "^(#s*define|[a-z]*s*consts*[a-z]*)" 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | pack 2 | tags 3 | cscope.* 4 | node_modules 5 | *packer_compiled* 6 | langservers/.yarn/* 7 | lazy-lock.json 8 | !langservers/.yarn/patches 9 | !langservers/.yarn/releases 10 | !langservers/.yarn/plugins 11 | !langservers/.yarn/sdks 12 | !langservers/.yarn/versions 13 | .DS_Store 14 | .aider* 15 | -------------------------------------------------------------------------------- /ftplugin/objcpp.lua: -------------------------------------------------------------------------------- 1 | vim.o.path = vim.o.path .. "/System/Library/Frameworks/Foundation.framework/Headers/**" 2 | vim.b.source_ft = { "m", "mm" } 3 | vim.keymap.set("n", "h", ":call tools#switchSourceHeader()", { buffer = true, silent = true }) 4 | vim.bo.define = "^(#s*define|[a-z]*s*consts*[a-z]*)" 5 | -------------------------------------------------------------------------------- /ftplugin/typescriptreact.lua: -------------------------------------------------------------------------------- 1 | require("tt.ft.ecma").bootstrap() 2 | 3 | -- For andymass/vim-matchup plugin 4 | if vim.g.loaded_matchup then 5 | vim.b.matchpairs = "(:),{:},[:],<:>" 6 | vim.b.match_words = "<@<=([^/][^ \t>]*)g{hlend}[^>]*%(/@|$):<@<=/\1>" 7 | vim.b.match_skip = "s:comment|string" 8 | end 9 | -------------------------------------------------------------------------------- /ftplugin/lua.lua: -------------------------------------------------------------------------------- 1 | require("tt.snippets.ft.lua").init() 2 | vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')" 3 | vim.keymap.set("n", "f", "!stylua %", { silent = true, buffer = true }) 4 | vim.opt_local.suffixesadd:prepend(".lua") 5 | vim.opt_local.suffixesadd:prepend("init.lua") 6 | vim.b.autoformat = true 7 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/rust.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("l", 'println!("$1");') 4 | vim.snippet.add("fn", "fn $1($2) -> $3 {\n\t$4\n}") 5 | vim.snippet.add("modtest", "#[cfg(test)]\nmod tests {\nuse super::*;\n\n#[test]\nfn $1() {\n\t$2\n}}") 6 | vim.snippet.add("tst", "#[test]\nfn $1() {\n\t$2\n}") 7 | end 8 | return M 9 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pack/plugins/opt/nim.vim"] 2 | path = pack/plugins/opt/nim.vim 3 | url = https://github.com/zah/nim.vim.git 4 | [submodule "pack/plugins/opt/rust.vim"] 5 | path = pack/plugins/opt/rust.vim 6 | url = https://github.com/rust-lang/rust.vim.git 7 | [submodule "pack/plugins/opt/vim-packager"] 8 | path = pack/plugins/opt/vim-packager 9 | url = git@github.com:kristijanhusak/vim-packager.git 10 | -------------------------------------------------------------------------------- /ftplugin/wiki.vim: -------------------------------------------------------------------------------- 1 | let b:localleader = "\\" 2 | iab dtss strftime("%H:%M") 3 | iab dateheader strftime("%Y %b %d") 4 | " highlight people / things with @ 5 | match Callout '@\w\+\.\?\w\+' 6 | setlocal foldmethod=syntax 7 | setlocal textwidth=120 8 | setlocal wrap 9 | 10 | " Jira stuff 11 | command! JIRAIssues call jira#getIssues() 12 | command! -range -nargs=0 JIRATransition call jira#transitionIssue() 13 | -------------------------------------------------------------------------------- /ftplugin/scala.vim: -------------------------------------------------------------------------------- 1 | setlocal formatoptions-=t formatoptions+=croqnl 2 | silent! setlocal formatoptions+=j 3 | 4 | setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// 5 | setlocal shiftwidth=2 softtabstop=2 expandtab 6 | 7 | setlocal include=^\\s*import 8 | setlocal includeexpr=substitute(v:fname,'\\.','/','g') 9 | 10 | setlocal path+=src/main/scala,src/test/scala 11 | setlocal suffixesadd=.scala 12 | 13 | " compiler sbt 14 | -------------------------------------------------------------------------------- /ftplugin/typescript.lua: -------------------------------------------------------------------------------- 1 | vim.bo.formatoptions = vim.bo.formatoptions .. "o" 2 | require("tt.ft.ecma").bootstrap() 3 | require("tt.snippets.ft.typescript").init() 4 | vim.api.nvim_create_user_command("ShowFuncs", function() 5 | if vim.b.showfunc == true then 6 | vim.cmd("hi! link @lsp.type.function.typescript Identifier") 7 | else 8 | vim.cmd("hi! link @lsp.type.function.typescript @comment.block.c") 9 | vim.b.showfunc = true 10 | end 11 | end, {}) 12 | -------------------------------------------------------------------------------- /lua/tt/snippets/init.lua: -------------------------------------------------------------------------------- 1 | function vim.snippet.add(trigger, body, opts) 2 | vim.keymap.set("ia", trigger, function() 3 | vim.snippet.expand(body) 4 | end, { buffer = true }) 5 | end 6 | 7 | vim.keymap.set({ "i", "s" }, "", function() 8 | if vim.snippet.active() then 9 | vim.snippet.jump(1) 10 | end 11 | end) 12 | 13 | vim.keymap.set({ "i", "s" }, "", function() 14 | if vim.snippet.active() then 15 | vim.snippet.jump(-1) 16 | end 17 | end) 18 | -------------------------------------------------------------------------------- /after/ftplugin/text.vim: -------------------------------------------------------------------------------- 1 | setlocal wrap 2 | setlocal linebreak 3 | setlocal spell 4 | " setlocal textwidth=120 5 | 6 | syntax region CodeFence start=+```\w\++ end=+```+ contains=@NoSpell 7 | syntax region CodeBlock start=+`\w\++ end=+`+ contains=@NoSpell 8 | syntax match UrlNoSpell /\w\+:\/\/[^[:space:]]\+/ contains=@NoSpell 9 | 10 | nnoremap j gj 11 | nnoremap k gk 12 | 13 | " if exists('g:set_writerline') 14 | " finish 15 | " else 16 | " set statusline+=\ %{wordcount().words}\ words 17 | " let g:set_writerline = 1 18 | " endif 19 | -------------------------------------------------------------------------------- /ftplugin/nim.vim: -------------------------------------------------------------------------------- 1 | let b:MarkMargin = 80 2 | 3 | compiler nim 4 | 5 | function! CompileNim(threads) abort 6 | let l:filename = expand('%:t') 7 | if a:threads == 1 8 | exec printf(':!nim c -r --threads:on %s', l:filename) 9 | else 10 | exec printf(':!nim c -r %s', l:filename) 11 | endif 12 | endfunction 13 | 14 | command! -nargs=1 CompileNim call CompileNim() 15 | nnoremap rcf CompileNim 16 | setlocal suffixesadd+=.nim 17 | setlocal define=proc\\s 18 | setlocal include=import\\s 19 | setlocal path+=./** 20 | set list 21 | -------------------------------------------------------------------------------- /langservers/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "embeddedLanguageFormatting": "auto", 5 | "htmlWhitespaceSensitivity": "css", 6 | "insertPragma": false, 7 | "jsxBracketSameLine": false, 8 | "jsxSingleQuote": false, 9 | "printWidth": 80, 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "semi": true, 14 | "singleQuote": false, 15 | "tabWidth": 2, 16 | "trailingComma": "es5", 17 | "useTabs": false, 18 | "vueIndentScriptAndStyle": false 19 | } 20 | -------------------------------------------------------------------------------- /lua/tt/plugin/dap.lua: -------------------------------------------------------------------------------- 1 | local dap = require("dap") 2 | local M = {} 3 | function M.init() 4 | vim.keymap.set("n", "", require("dap").toggle_breakpoint) 5 | dap.adapters.gdb = { 6 | type = "executable", 7 | command = "gdb", 8 | args = { "-i", "dap" }, 9 | } 10 | dap.configurations.c = { 11 | { 12 | name = "Launch", 13 | type = "gdb", 14 | request = "launch", 15 | program = function() 16 | return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") 17 | end, 18 | cwd = "${workspaceFolder}", 19 | }, 20 | } 21 | end 22 | return M 23 | -------------------------------------------------------------------------------- /lua/tt/constants.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.prettier_roots = { 4 | ".prettierrc", 5 | ".prettierrc.json", 6 | ".prettierrc.js", 7 | ".prettierrc.yml", 8 | ".prettierrc.yaml", 9 | ".prettierrc.json5", 10 | ".prettierrc.mjs", 11 | ".prettierrc.cjs", 12 | ".prettierrc.toml", 13 | } 14 | 15 | M.eslint_roots = { 16 | "eslint.config.js", 17 | "eslint.config.mjs", 18 | "eslint.config.cjs", 19 | "eslint.config.ts", 20 | "eslint.config.mts", 21 | "eslint.config.cts", 22 | ".eslintrc", 23 | } 24 | 25 | M.biome_roots = { 26 | "biome.json", 27 | "biome.jsonc", 28 | } 29 | 30 | return M 31 | -------------------------------------------------------------------------------- /after/queries/c/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ; High priority: Block comments (/* */) 4 | ; Priority 105 ensures these override the default @comment captures (which are usually 100) 5 | ((comment) @comment.block 6 | (#match? @comment.block "^/\\*") 7 | (#set! "priority" 110)) 8 | 9 | ; High priority: Line comments (//) 10 | ((comment) @comment.line 11 | (#match? @comment.line "^//") 12 | (#set! "priority" 110)) 13 | 14 | ; Override default comment highlighting with lower priority fallback 15 | ; This ensures any comment that doesn't match above still gets highlighted 16 | ((comment) @comment 17 | (#set! "priority" 90)) 18 | -------------------------------------------------------------------------------- /ftplugin/dockerfile.lua: -------------------------------------------------------------------------------- 1 | local iabbrev = require("tt.nvim_utils").vim_util.iabbrev 2 | 3 | iabbrev("from", "FROM", true) 4 | iabbrev("run", "RUN", true) 5 | iabbrev("cmd", "CMD", true) 6 | iabbrev("label", "LABEL", true) 7 | iabbrev("env", "ENV", true) 8 | iabbrev("expose", "EXPOSE", true) 9 | iabbrev("add", "ADD", true) 10 | iabbrev("copy", "COPY", true) 11 | iabbrev("entrypoint", "ENTRYPOINT", true) 12 | iabbrev("user", "USER", true) 13 | iabbrev("arg", "ARG", true) 14 | iabbrev("onbuild", "ONBUILD", true) 15 | iabbrev("stopsignal", "STOPSIGNAL", true) 16 | iabbrev("healthcheck", "HEALTHCHECK", true) 17 | iabbrev("shell", "SHELL", true) 18 | iabbrev("volume", "VOLUME", true) 19 | -------------------------------------------------------------------------------- /langservers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "langservers", 3 | "version": "1.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "dependencies": { 7 | "@astrojs/language-server": "2.16.1", 8 | "@biomejs/biome": "2.3.7", 9 | "@fsouza/prettierd": "0.26.2", 10 | "eslint_d": "14.3.0", 11 | "import-sort-cli": "6.0.0", 12 | "import-sort-parser-babylon": "6.0.0", 13 | "import-sort-parser-typescript": "6.0.0", 14 | "import-sort-style-renke": "6.0.0", 15 | "prettier": "3.6.2", 16 | "typescript": "5.9.3", 17 | "typescript-language-server": "5.1.3", 18 | "vscode-css-languageserver-bin": "1.4.0", 19 | "vscode-html-languageserver-bin": "1.4.0" 20 | }, 21 | "packageManager": "yarn@4.9.2" 22 | } 23 | -------------------------------------------------------------------------------- /spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | async 2 | UIs 3 | things 4 | SEO 5 | UI 6 | screenshots 7 | JS 8 | CSS 9 | Frontend 10 | viewport 11 | Subgrid 12 | subgrid 13 | Subgrids 14 | MEMES 15 | frontend 16 | redux 17 | codebase 18 | OOF 19 | codebase's 20 | XHR 21 | RXJS 22 | rxjs 23 | blog 24 | API 25 | redux's 26 | mobx 27 | react's 28 | utils 29 | Memes 30 | plugins 31 | wildcards 32 | wildcard 33 | wifi 34 | composability 35 | FORTNITE 36 | Solaris 37 | Fortnite 38 | workflow 39 | fixed 40 | Debian 41 | strawman 42 | fungibility 43 | technoliteracy 44 | realtime 45 | Whitelisting 46 | Neovim 47 | offline 48 | Apps 49 | app 50 | Javascript 51 | JSON 52 | microservices 53 | proxied 54 | datastructures 55 | immersive 56 | succesfully 57 | Wiki 58 | Salesforce 59 | backend 60 | websocket 61 | struct 62 | webview 63 | -------------------------------------------------------------------------------- /doc/stuck.txt: -------------------------------------------------------------------------------- 1 | *stuck* For that thing you want to do but forgot 2 | 3 | +-+ +-+ +-+ 4 | |V| |I| |M| 5 | +-+ +-+ +-+ 6 | 7 | 8 | A Handy Reference Guide to doing things in vim. 9 | ==================================================================== 10 | CONTENTS *CheatSheetContents* 11 | 12 | 1. Delete Based on Pattern ................ |DeletePattern| 13 | 14 | ==================================================================== 15 | Section 1: Delete Based on Pattern *DeletePattern* 16 | 17 | If you want to delete based on a pattern, (say remove all lines starting with `[`) you should use the |:g| command. 18 | 19 | Example: > 20 | 21 | :%g/^\]/d 22 | 23 | < 24 | -------------------------------------------------------------------------------- /autoload/quickfixed.vim: -------------------------------------------------------------------------------- 1 | function! QFHistory(goNewer) 2 | " Get dictionary of properties of the current window 3 | let wininfo = filter(getwininfo(), {i,v -> v.winnr == winnr()})[0] 4 | let isloc = wininfo.loclist 5 | " Build the command: one of colder/cnewer/lolder/lnewer 6 | let cmd = (isloc ? 'l' : 'c') . (a:goNewer ? 'newer' : 'older') 7 | try | execute cmd | catch | endtry 8 | endfunction 9 | 10 | " open the quickfix window if there are valid errors 11 | function! quickfixed#OpenQuickfix() 12 | if get(g:, 'qf_auto_open_quickfix', 1) 13 | " get user-defined maximum height 14 | let max_height = get(g:, 'qf_max_height', 10) < 1 ? 10 : get(g:, 'qf_max_height', 10) 15 | execute get(g:, "qf_auto_resize", 1) ? 'cclose|' . min([ max_height, len(getqflist()) ]) . 'cwindow' : 'cwindow' 16 | endif 17 | endfunction 18 | -------------------------------------------------------------------------------- /lua/tt/filetypes.lua: -------------------------------------------------------------------------------- 1 | vim.filetype.add({ 2 | pattern = { 3 | -- Nginx 4 | ["[nN]ginx.*%.conf"] = "nginx", 5 | ["*/etc/nginx/*"] = "nginx", 6 | ["*/usr/local/nginx/conf/*"] = "nginx", 7 | ["*/nginx/.*%.conf"] = "nginx", 8 | [".*%.nginx"] = "nginx", 9 | 10 | -- Objective-C/C++ 11 | [".*%.mm"] = "objc", 12 | [".*%.m"] = "objc", 13 | 14 | -- Dockerfile 15 | ["[Dd]ockerfile.*"] = "dockerfile", 16 | [".*%.dock"] = "dockerfile", 17 | 18 | -- Web Development 19 | [".*%.svelte"] = "html", 20 | [".*%.pcss"] = "css", 21 | 22 | -- Configuration files 23 | [".*%.eslintrc"] = "json", 24 | [".*%.babelrc"] = "json", 25 | [".*%.prettierrc"] = "json", 26 | [".*%.huskyrc"] = "json", 27 | [".*%.swcrc"] = "json", 28 | ["%.swcrc"] = "json", 29 | 30 | -- Others 31 | [".*%.bat"] = "dosbatch", 32 | [".*%.sys"] = "dosbatch", 33 | [".*%.wiki"] = "wiki", 34 | }, 35 | }) 36 | -------------------------------------------------------------------------------- /autoload/tools.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | 3 | function! tools#switchSourceHeader() abort 4 | if (expand ('%:e') != 'h') 5 | find %:t:r.h 6 | else 7 | let l:filename = expand('%:t:r') 8 | for item in b:source_ft 9 | try 10 | execute 'find '.l:filename.'.'.item 11 | catch /^Vim\%((\a\+)\)\=:E/ 12 | endtry 13 | endfor 14 | endif 15 | endfunction 16 | 17 | 18 | function! tools#redir(cmd) 19 | for win in range(1, winnr('$')) 20 | if getwinvar(win, 'scratch') 21 | execute win . 'windo close' 22 | endif 23 | endfor 24 | if a:cmd =~ '^!' 25 | let output = system(matchstr(a:cmd, '^!\zs.*')) 26 | else 27 | redir => output 28 | execute a:cmd 29 | redir END 30 | endif 31 | vnew 32 | let w:scratch = 1 33 | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile 34 | nnoremap q c 35 | call setline(1, split(output, "\n")) 36 | endfunction 37 | -------------------------------------------------------------------------------- /lua/tt/lsp/mappings.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local function bufmap(mode, lhs, rhs, bufnr, desc) 4 | vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = desc }) 5 | end 6 | 7 | function M.setMappings(bufnr) 8 | bufmap("n", "ge", function() 9 | vim.diagnostic.open_float(0, { scope = "cursor" }) 10 | end, bufnr, "Show diagnostic") 11 | bufmap("n", "gd", vim.lsp.buf.definition, bufnr, "Go to definition") 12 | bufmap("n", "gs", ":vsplit|lua vim.lsp.buf.definition()", bufnr, "Go to definition (vsplit)") 13 | bufmap("n", "k", vim.lsp.codelens.run, bufnr, "Run codelens") 14 | bufmap("n", "i", vim.lsp.buf.implementation, bufnr, "Go to implementation") 15 | bufmap("n", "f", vim.lsp.buf.format, bufnr, "Format buffer") 16 | bufmap("n", "th", function() 17 | vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) 18 | end, bufnr, "Toggle inlay hints") 19 | end 20 | 21 | return M 22 | -------------------------------------------------------------------------------- /lua/tt/plugin/treesitter.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.supported_langs = { 4 | "comment", 5 | "fish", 6 | "bash", 7 | "c", 8 | "cpp", 9 | "objc", 10 | "lua", 11 | "go", 12 | "css", 13 | "html", 14 | "javascript", 15 | "json", 16 | "java", 17 | "scala", 18 | "python", 19 | "graphql", 20 | "rust", 21 | "svelte", 22 | "typescript", 23 | "tsx", 24 | } 25 | 26 | function M.init() 27 | local lines = vim.fn.line("$") 28 | local ts_config = require("nvim-treesitter.configs") 29 | if lines > 30000 then -- skip some settings for large files 30 | require("nvim-treesitter.configs").setup({ highlight = { enable = false } }) 31 | return 32 | end 33 | require("treesitter-context").setup({ 34 | enable = true, 35 | max_lines = -1, 36 | multiwindow = true, 37 | trim_scope = "outer", 38 | }) 39 | 40 | ts_config.setup({ 41 | ensure_installed = M.supported_langs, 42 | matchup = { 43 | enable = true, 44 | }, 45 | auto_install = true, 46 | disable = { "prisma" }, -- langs where the plugin is better 47 | indent = { 48 | enable = true, 49 | }, 50 | incremental_selection = { 51 | enable = true, 52 | }, 53 | highlight = { 54 | enable = true, 55 | }, 56 | }) 57 | end 58 | 59 | return M 60 | -------------------------------------------------------------------------------- /ftplugin/javascript.lua: -------------------------------------------------------------------------------- 1 | local g = vim.g 2 | require("tt.ft.ecma").bootstrap() 3 | 4 | g.jsx_ext_required = 0 5 | g.javascript_plugin_jsdoc = 1 6 | g.javascript_plugin_ngdoc = 1 7 | g.javascript_plugin_flow = 1 8 | g.vim_json_syntax_conceal = 0 9 | -- changes const thing = require("thing-lib") 10 | -- to import thing from \"thing-lib" -> the backlash isn't included in the 11 | -- transform, I just need it for vim comments 12 | -- TODO: do this with snippets? 13 | -- let @i = 'ceimportf=cf(from f)x' 14 | 15 | vim.bo.makeprg = "node %" 16 | 17 | -- Error: bar 18 | -- at Object.foo [as _onTimeout] (/Users/Felix/.vim/bundle/vim-nodejs-errorformat/test.js:2:9) 19 | local efm = { 20 | "%AError: %m", 21 | "%AEvalError: %m", 22 | "%ARangeError: %m", 23 | "%AReferenceError: %m", 24 | "%ASyntaxError: %m", 25 | "%ATypeError: %m", 26 | "%Z%*[ ]at %f:%l:%c", 27 | "%Z%*[ ]%m (%f:%l:%c)", 28 | } 29 | 30 | -- at Object.foo [as _onTimeout] (.vim/bundle/vim-nodejs-errorformat/test.js:2:9) 31 | table.insert(efm, "%*[ ]%m (%f:%l:%c)") 32 | 33 | -- at node.js:903:3 34 | table.insert(efm, "%*[ ]at %f:%l:%c") 35 | 36 | -- .vim/bundle/vim-nodejs-errorformat/test.js:2 37 | -- throw new Error('bar'); 38 | -- ^ 39 | table.insert(efm, "%Z%p^,%A%f:%l,%C%m") 40 | 41 | -- Ignore everything else 42 | table.insert(efm, "%-G%.%#") 43 | vim.bo.errorformat = table.concat(efm, "") 44 | -------------------------------------------------------------------------------- /lua/tt/job_runner.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.run_job(cmd, opts) 4 | opts = opts or {} 5 | 6 | local results = {} 7 | local default_opts = { 8 | stdout_buffered = true, 9 | stderr_buffered = true, 10 | on_stdout = function(_, data) 11 | if #data > 0 and data[1] ~= "" then 12 | for _, line in ipairs(data) do 13 | if line ~= "" then 14 | if opts.collect_output then 15 | table.insert(results, line) 16 | elseif opts.on_stdout then 17 | opts.on_stdout(line) 18 | else 19 | vim.schedule(function() 20 | print(line) 21 | end) 22 | end 23 | end 24 | end 25 | end 26 | end, 27 | on_stderr = function(_, data) 28 | if #data > 0 and data[1] ~= "" then 29 | for _, line in ipairs(data) do 30 | if line ~= "" then 31 | if opts.collect_output then 32 | table.insert(results, line) 33 | elseif opts.on_stderr then 34 | opts.on_stderr(line) 35 | else 36 | vim.schedule(function() 37 | error(line) 38 | end) 39 | end 40 | end 41 | end 42 | end 43 | end, 44 | on_exit = function(_, code) 45 | if opts.on_exit then 46 | opts.on_exit(code, results) 47 | end 48 | end, 49 | } 50 | 51 | local job_opts = vim.tbl_extend("force", default_opts, opts) 52 | return vim.fn.jobstart(cmd, job_opts) 53 | end 54 | 55 | return M 56 | -------------------------------------------------------------------------------- /lua/tt/lsp/efm.lua: -------------------------------------------------------------------------------- 1 | local node = require("tt.nvim_utils").nodejs 2 | local efm_initialized = false 3 | local M = {} 4 | function M.init() 5 | if not efm_initialized then 6 | local eslintd = { 7 | lintCommand = node.find_node_executable("eslint_d") .. " -f unix --stdin --stdin-filename ${INPUT}", 8 | lintStdin = true, 9 | lintFormats = { "%f:%l:%c: %m" }, 10 | lintIgnoreExitCode = true, 11 | } 12 | local stylint = { 13 | lintCommand = node.find_node_executable("stylelint") 14 | .. " --no-color --formatter compact --stdin --stdin-filename ${INPUT}", 15 | lintStdin = true, 16 | lintFormats = { "%.%#: line %l, col %c, %trror - %m", "%.%#: line %l, col %c, %tarning - %m" }, 17 | rootMarkers = { ".stylelintrc", "package.json" }, 18 | } 19 | vim.lsp.config.efm = { 20 | cmd = { "efm-langserver" }, 21 | filetypes = { 22 | "javascript", 23 | "typescript", 24 | "javascriptreact", 25 | "typescriptreact", 26 | "scss", 27 | "css", 28 | "json", 29 | }, 30 | settings = { 31 | rootMarkers = { "package.json", ".git" }, 32 | languages = { 33 | javascript = { eslintd }, 34 | typescript = { eslintd }, 35 | scss = { stylint }, 36 | css = { stylint }, 37 | javascriptreact = { eslintd }, 38 | typescriptreact = { eslintd }, 39 | json = { 40 | { 41 | lintCommand = "jq .", 42 | lintStdin = true, 43 | }, 44 | }, 45 | }, 46 | }, 47 | } 48 | efm_initialized = true 49 | end 50 | end 51 | 52 | return M 53 | -------------------------------------------------------------------------------- /lua/tt/snippets/ft/ecmascript.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | M.init = function() 3 | vim.snippet.add("l", "console.log($1);") 4 | vim.snippet.add("lco", "console.log('%c$1%o', 'color: $2;')") 5 | vim.snippet.add("d", "debugger") 6 | vim.snippet.add("fn", "function $1 ($2) {\n\t$3\n}") 7 | vim.snippet.add("efn", "export function $1 ($2) {\n\t$3\n}") 8 | vim.snippet.add("gei", 'document.getElementById("$1");') 9 | vim.snippet.add("cn", "const $1 = ($2) => {\n\t$3\n}") 10 | vim.snippet.add("eaf", "export async function $1 ($2) {\n\t$3\n}") 11 | 12 | -- express/prisma stuff 13 | vim.snippet.add( 14 | "dbf", 15 | [[export async function $1 ($2) { 16 | return q.run("$1", "$3", { 17 | $4 18 | }); 19 | } 20 | ]] 21 | ) 22 | 23 | vim.snippet.add( 24 | "nro", 25 | [[import {Router} from "express"; 26 | 27 | export const $1 = Router({mergeParams: true}); 28 | ]] 29 | ) 30 | 31 | vim.snippet.add( 32 | "nrd", 33 | [[ 34 | $1.$2("$3", async (req, res, next) => { 35 | $4 36 | }) 37 | ]] 38 | ) 39 | 40 | vim.snippet.add( 41 | "ier", 42 | [[if($1) { 43 | return next(new InternalServerError()) 44 | } 45 | ]] 46 | ) 47 | 48 | -- React stuff 49 | vim.snippet.add("fco", "function $1 ({$2}) {\n\t$3\n}\n\nexport default $1") 50 | vim.snippet.add("cco", "const $1 = ({$2}) => {\n\t$3\n}\n\nexport default $1") 51 | vim.snippet.add("usee", "useEffect(() => {\n\t$1\n}, [$2])") 52 | 53 | -- Testing 54 | vim.snippet.add("tst", 'describe("$1", () => {\n\t it("$2", () => {\n\t$3\n\t}) \n})') 55 | vim.snippet.add("its", 'it("$1", () => {\n\t$2\n})') 56 | end 57 | return M 58 | -------------------------------------------------------------------------------- /snippets/react.json: -------------------------------------------------------------------------------- 1 | { 2 | "Create a stateless component": { 3 | "prefix": "scomp", 4 | "description": "A stateless component", 5 | "body": [ 6 | "import React from 'react';", 7 | "\nconst ${1:ComponentName} = () => {", 8 | "\treturn (", 9 | "\t\t$0", 10 | "\t);", 11 | "};", 12 | "\nexport default ${1:ComponentName};" 13 | ] 14 | }, 15 | "Create a stateless component with the file name": { 16 | "prefix": "fscomp", 17 | "description": "A stateless component with the same name as the file", 18 | "body": [ 19 | "import React from 'react';", 20 | "\nconst $TM_FILENAME_BASE = () => {", 21 | "\treturn (", 22 | "\t\t$0", 23 | "\t);", 24 | "};", 25 | "\nexport default $TM_FILENAME_BASE;" 26 | ] 27 | }, 28 | "Create only a styled-component with the file name": { 29 | "prefix": "fstyle", 30 | "description": "A styled component with the same name as the current buffer", 31 | "body": [ 32 | "import styled from 'styled-components';", 33 | "\nconst $TM_FILENAME_BASE = styled($0)(({theme}) => ({", 34 | "\t$1", 35 | "}));", 36 | "\nexport default $TM_FILENAME_BASE;" 37 | ] 38 | }, 39 | "useState's hook creation": { 40 | "prefix": "useState", 41 | "description": "The creation of useState's hook", 42 | "body": "const [${1:value}, ${2:setValue}] = useState<${3:type}>(${0:defaultValue});" 43 | }, 44 | 45 | "useCallback hook creation": { 46 | "prefix": "useCallback", 47 | "description": "The creation of useCallback hook", 48 | "body": "React.useCallback(() => {$1}, [$2])" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /autoload/symbols.vim: -------------------------------------------------------------------------------- 1 | function! symbols#PreviewWord() abort 2 | if &previewwindow " don't do this in the preview window 3 | return 4 | endif 5 | let w = expand('') " get the word under cursor 6 | if w =~ '\a' " if the word contains a letter 7 | 8 | " Delete any existing highlight before showing another tag 9 | silent! wincmd P " jump to preview window 10 | if &previewwindow " if we really get there... 11 | match none " delete existing highlight 12 | wincmd p " back to old window 13 | endif 14 | 15 | " Try displaying a matching tag for the word under the cursor 16 | try 17 | exe 'ptag ' . w 18 | catch 19 | return 20 | endtry 21 | 22 | silent! wincmd P " jump to preview window 23 | if &previewwindow " if we really get there... 24 | if has('folding') 25 | silent! .foldopen " don't want a closed fold 26 | endif 27 | call search('$', 'b') " to end of previous line 28 | let w = substitute(w, '\\', '\\\\', '') 29 | call search('\<\V' . w . '\>') " position cursor on match 30 | " Add a match highlight to the word at this position 31 | hi! link previewWord TODO 32 | exe 'match previewWord "\%' . line('.') . 'l\%' . col('.') . 'c\k*"' 33 | wincmd p " back to old window 34 | endif 35 | endif 36 | endfunction 37 | 38 | function! symbols#ShowDeclaration(global) abort 39 | let pos = getpos('.') 40 | if searchdecl(expand(''), a:global) == 0 41 | let line_of_declaration = line('.') 42 | execute line_of_declaration . '#' 43 | endif 44 | call cursor(pos[1], pos[2]) 45 | endfunction 46 | 47 | " /*}}}*/ 48 | -------------------------------------------------------------------------------- /lua/tt/core_opts.lua: -------------------------------------------------------------------------------- 1 | local iabbrev = require("tt.nvim_utils").vim_util.iabbrev 2 | local api = vim.api 3 | 4 | if not is_windows then 5 | vim.o.shell = vim.fn.executable("fish") and "fish" or "bash" 6 | end 7 | 8 | vim.cmd.packadd("cfilter") 9 | 10 | -- Common mistakes 11 | iabbrev("retrun", "return") 12 | iabbrev("pritn", "print") 13 | iabbrev("cosnt", "const") 14 | iabbrev("imoprt", "import") 15 | iabbrev("imprt", "import") 16 | iabbrev("iomprt", "import") 17 | iabbrev("improt", "import") 18 | iabbrev("slef", "self") 19 | iabbrev("sapn", "span") 20 | iabbrev("teh", "the") 21 | iabbrev("tehn", "then") 22 | iabbrev("hadnler", "handler") 23 | iabbrev("bunlde", "bundle") 24 | 25 | vim.api.nvim_create_user_command("Diff", function() 26 | require("tt.git").diff() 27 | end, {}) 28 | 29 | vim.api.nvim_create_user_command("Changed", function() 30 | require("tt.git").changedFiles() 31 | end, {}) 32 | 33 | vim.api.nvim_create_user_command("Restore", function() 34 | require("tt.tools").restoreFile() 35 | end, {}) 36 | 37 | vim.api.nvim_create_user_command("Redir", function(opts) 38 | vim.cmd('silent call tools#redir("' .. opts.args .. '")') 39 | end, { nargs = 1, complete = "command" }) 40 | 41 | vim.api.nvim_create_user_command("Sesh", function(opts) 42 | require("tt.tools").saveSession(opts.args) 43 | end, { nargs = 1 }) 44 | 45 | -- Global Vim functions 46 | vim.api.nvim_exec2( 47 | [[ 48 | function! AS_HandleSwapfile(filename, swapname) 49 | " if swapfile is older than file itself, just get rid of it 50 | if getftime(v:swapname) < getftime(a:filename) 51 | call delete(v:swapname) 52 | let v:swapchoice = 'e' 53 | endif 54 | endfunction 55 | ]], 56 | { output = false } 57 | ) 58 | -------------------------------------------------------------------------------- /lua/tt/plugins.lua: -------------------------------------------------------------------------------- 1 | local function gh(pkg) 2 | return "https://github.com/" .. pkg 3 | end 4 | 5 | vim.pack.add({ 6 | gh("echasnovski/mini.surround"), 7 | gh("stevearc/oil.nvim"), 8 | gh("ludovicchabant/vim-gutentags"), 9 | gh("windwp/nvim-ts-autotag"), 10 | gh("windwp/nvim-autopairs"), 11 | gh("ibhagwan/fzf-lua"), 12 | gh("dmmulroy/ts-error-translator.nvim"), 13 | gh("nvim-treesitter/nvim-treesitter"), 14 | gh("nvim-treesitter/nvim-treesitter-context"), 15 | gh("norcalli/nvim-colorizer.lua"), 16 | gh("reedes/vim-wordy"), 17 | }) 18 | 19 | local disabled_plugins = { 20 | "gzip", 21 | "netrwPlugin", 22 | "rplugin", 23 | "tarPlugin", 24 | "tohtml", 25 | "tutor", 26 | "zipPlugin", 27 | "getscript", 28 | "vimball", 29 | "logiPat", 30 | "rrhelper", 31 | "python_provider", 32 | } 33 | 34 | table.foreach(disabled_plugins, function(_, p) 35 | local loaded = "loaded_" .. p 36 | vim.g[loaded] = 1 37 | end) 38 | 39 | local lazy_load = vim.api.nvim_create_augroup("Plugins", { clear = true }) 40 | require("tt.plugin.find").init() 41 | 42 | vim.api.nvim_create_autocmd("InsertEnter", { 43 | group = lazy_load, 44 | pattern = "*", 45 | callback = function() 46 | require("nvim-autopairs").setup() 47 | vim.api.nvim_clear_autocmds({ group = "Plugins", event = "InsertEnter" }) 48 | end, 49 | }) 50 | 51 | vim.api.nvim_create_autocmd("BufReadPost", { 52 | group = lazy_load, 53 | pattern = "*", 54 | callback = function() 55 | require("tt.plugin.treesitter").init() 56 | require("mini.surround").setup() 57 | vim.cmd("packadd vim-gutentags") 58 | require("oil").setup({ 59 | view_options = { 60 | show_hidden = true, 61 | }, 62 | }) 63 | require("nvim-ts-autotag").setup({ 64 | aliases = { 65 | ["astro"] = "html", 66 | }, 67 | }) 68 | vim.api.nvim_clear_autocmds({ group = "Plugins", event = "BufReadPost" }) 69 | end, 70 | }) 71 | 72 | vim.api.nvim_create_user_command("Update", function() 73 | vim.pack.update() 74 | end, {}) 75 | -------------------------------------------------------------------------------- /ftplugin/markdown.lua: -------------------------------------------------------------------------------- 1 | local iabbrev = require("tt.nvim_utils").vim_util.iabbrev 2 | local api = vim.api 3 | local M = {} 4 | 5 | vim.fn.matchadd("Callout", "@w+.?w+") 6 | 7 | iabbrev(" dateheader", vim.fn.strftime("%Y %b %d"), true) 8 | 9 | function M.composer() 10 | vim.wo[0].wrap = true 11 | vim.wo[0].linebreak = true 12 | vim.wo[0].spell = true 13 | end 14 | 15 | function M.createFile() end 16 | 17 | vim.wo.foldlevel = 1 18 | vim.wo.conceallevel = 0 19 | 20 | function M.asyncDocs() 21 | local shortname = vim.fn.expand("%:t:r") 22 | local fullname = api.nvim_buf_get_name(0) 23 | 24 | vim.fn.jobstart({ 25 | "pandoc", 26 | fullname, 27 | "--from", 28 | "gfm", 29 | "--to=html5", 30 | "-o", 31 | string.format("%s.html", shortname), 32 | "-s", 33 | "--highlight-style", 34 | "tango", 35 | "-c", 36 | "$NOTES_DIR/notes.css", 37 | }, { 38 | on_exit = function(_, code) 39 | if code == 0 then 40 | print("FILE CONVERSION COMPLETE") 41 | end 42 | end, 43 | }) 44 | end 45 | 46 | function M.previewLinkedPage() 47 | local width = api.nvim_get_option_value("columns", {}) 48 | local height = api.nvim_get_option_value("lines", {}) 49 | -- if the editor is big enough 50 | if width > 150 or height > 35 then 51 | -- fzf's window height is 3/4 of the max height, but not more than 30 52 | local win_height = math.min(math.ceil(height * 3 / 4), 30) 53 | local win_width 54 | 55 | -- if the width is small 56 | if width < 150 then 57 | -- just subtract 8 from the editor's width 58 | win_width = math.ceil(width - 8) 59 | else 60 | -- use 90% of the editor's width 61 | win_width = math.ceil(width * 0.9) 62 | end 63 | local buf = api.nvim_create_buf(false, true) 64 | local filename = vim.fn.expand("") 65 | local opts = { 66 | relative = "editor", 67 | width = win_width, 68 | height = win_height, 69 | row = math.ceil((height - win_height) / 2), 70 | col = math.ceil((width - win_width) / 2), 71 | style = "minimal", 72 | } 73 | api.nvim_open_win(buf, true, opts) 74 | vim.cmd(string.format("read %s.md", filename)) 75 | api.nvim_buf_set_keymap(buf, "n", "q", ":close", {}) 76 | end 77 | end 78 | 79 | vim.api.nvim_create_user_command("Compose", function() require'tt.ft.markdown'.composer() end, {}) 80 | 81 | vim.keymap.set("n", "j", "gj", { buffer = true }) 82 | vim.keymap.set("n", "k", "gk", { buffer = true }) 83 | vim.keymap.set("n", "gh", M.previewLinkedPage, { buffer = true }) 84 | vim.keymap.set("n", "r", M.asyncDocs, { buffer = true }) 85 | 86 | return M 87 | -------------------------------------------------------------------------------- /lua/tt/autocmds.lua: -------------------------------------------------------------------------------- 1 | local git = require("tt.git") 2 | 3 | local load_core = vim.api.nvim_create_augroup("load_core", { clear = true }) 4 | local bufs = vim.api.nvim_create_augroup("bufs", { clear = true }) 5 | 6 | vim.api.nvim_create_autocmd("VimEnter", { 7 | group = load_core, 8 | callback = function() 9 | require("tt.tools").openQuickfix() 10 | local proj = require("tt.project") 11 | proj.setup() 12 | proj.add_current_project() 13 | end, 14 | }) 15 | 16 | vim.api.nvim_create_autocmd("SwapExists", { 17 | group = load_core, 18 | command = "call AS_HandleSwapfile(expand(':p'), v:swapname)", 19 | }) 20 | 21 | vim.api.nvim_create_autocmd("TextYankPost", { 22 | group = load_core, 23 | callback = function() 24 | vim.highlight.on_yank({ higroup = "Search", timeout = 100 }) 25 | end, 26 | }) 27 | 28 | vim.api.nvim_create_autocmd("BufNewFile", { 29 | group = load_core, 30 | pattern = "*.html", 31 | command = "0r ~/vim/skeletons/skeleton.html", 32 | }) 33 | 34 | vim.api.nvim_create_autocmd("BufNewFile", { 35 | group = load_core, 36 | pattern = "*.md", 37 | command = "0r ~/vim/skeletons/skeleton.md", 38 | }) 39 | 40 | vim.api.nvim_create_autocmd("BufWriteCmd", { 41 | group = bufs, 42 | pattern = "*.todo", 43 | callback = function() 44 | local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) 45 | for _, line in pairs(lines) do 46 | local result = vim.system({ "todo.sh", "add" }, { stdin = line }):wait() 47 | local exit_code = result.code 48 | if exit_code ~= 0 then 49 | vim.notify("command failed: " .. (result.stderr or result.stdout or ""), vim.log.levels.ERROR) 50 | end 51 | end 52 | vim.cmd.bdelete({ bang = true }) 53 | end, 54 | }) 55 | 56 | vim.api.nvim_create_autocmd("VimResized", { 57 | desc = "Automatically resize splits, when terminal window is moved", 58 | command = "wincmd =", 59 | }) 60 | 61 | vim.api.nvim_create_autocmd("VimLeavePre", { 62 | group = load_core, 63 | callback = require("tt.tools").saveSession, 64 | }) 65 | 66 | vim.api.nvim_create_autocmd("VimResume", { 67 | group = load_core, 68 | command = "checktime", 69 | }) 70 | 71 | vim.api.nvim_create_autocmd("QuickFixCmdPost", { 72 | group = load_core, 73 | pattern = "[^l]*", 74 | nested = true, 75 | callback = require("tt.tools").openQuickfix, 76 | }) 77 | 78 | vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { 79 | group = load_core, 80 | callback = function() 81 | git.clear_blame() 82 | end, 83 | }) 84 | 85 | vim.api.nvim_create_autocmd("FocusGained", { 86 | group = load_core, 87 | command = "checktime", 88 | }) 89 | 90 | vim.api.nvim_create_autocmd("BufReadPost", { 91 | group = bufs, 92 | pattern = "quickfix", 93 | callback = function() 94 | vim.keymap.set("n", "ra", ":ReplaceAll", { buffer = true, silent = true }) 95 | vim.keymap.set("n", "R", ":Cfilter!", { buffer = true }) 96 | vim.keymap.set("n", "K", ":Cfilter", { buffer = true }) 97 | end, 98 | }) 99 | -------------------------------------------------------------------------------- /lua/tt/plugin/find.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | function M.init() 3 | local fzf = require("fzf-lua") 4 | fzf.register_ui_select() 5 | fzf.setup({ 6 | "max-perf", 7 | winopts = { preview = { hidden = true } }, 8 | fzf_opts = { ["--scheme"] = "path", ["--tiebreak"] = "index" }, 9 | }) 10 | vim.keymap.set("n", ",", "FzfLua global") 11 | -- function _G.RgFindFiles(cmdarg) 12 | -- local fnames = vim.fn.systemlist({ "fd", "--color", "never", "--type", "f", "--hidden" }) 13 | -- if #cmdarg == 0 then 14 | -- return fnames 15 | -- else 16 | -- return vim.fn.matchfuzzy(fnames, cmdarg) 17 | -- end 18 | -- end 19 | -- 20 | -- vim.o.findfunc = "v:lua.RgFindFiles" 21 | -- 22 | local function is_cmdline_type_find() 23 | local cmdline_cmd = vim.fn.split(vim.fn.getcmdline(), " ")[1] 24 | 25 | return cmdline_cmd == "find" or cmdline_cmd == "fin" or cmdline_cmd == "sf" 26 | end 27 | -- 28 | -- vim.api.nvim_create_autocmd({ "CmdlineChanged", "CmdlineLeave" }, { 29 | -- pattern = { "*" }, 30 | -- group = vim.api.nvim_create_augroup("CmdlineAutocompletion", { clear = true }), 31 | -- callback = function(ev) 32 | -- local function should_enable_autocomplete() 33 | -- local cmdline_cmd = vim.fn.split(vim.fn.getcmdline(), " ")[1] 34 | -- 35 | -- return is_cmdline_type_find() or cmdline_cmd == "help" or cmdline_cmd == "h" 36 | -- end 37 | -- 38 | -- if ev.event == "CmdlineChanged" and should_enable_autocomplete() then 39 | -- vim.opt.wildmode = "noselect:lastused,full" 40 | -- vim.fn.wildtrigger() 41 | -- end 42 | -- 43 | -- if ev.event == "CmdlineLeave" then 44 | -- vim.opt.wildmode = "full" 45 | -- end 46 | -- end, 47 | -- }) 48 | -- 49 | -- vim.keymap.set("n", ",", ":find") 50 | vim.keymap.set("c", "", function() 51 | local keys 52 | if is_cmdline_type_find() then 53 | keys = vim.api.nvim_replace_termcodes("edit", true, true, true) 54 | else 55 | keys = vim.api.nvim_replace_termcodes("", true, true, true) 56 | end 57 | vim.fn.feedkeys(keys, "c") 58 | end) 59 | -- vim.keymap.set("c", "", function() 60 | -- if is_cmdline_type_find() then 61 | -- local keys = vim.api.nvim_replace_termcodes("vsplit", true, true, true) 62 | -- vim.fn.feedkeys(keys, "c") 63 | -- end 64 | -- end) 65 | -- vim.keymap.set("c", "", function() 66 | -- if is_cmdline_type_find() then 67 | -- local keys = vim.api.nvim_replace_termcodes("split", true, true, true) 68 | -- vim.fn.feedkeys(keys, "c") 69 | -- end 70 | -- end) 71 | -- vim.keymap.set("n", ".", ":b") 72 | 73 | -- temp move elsewhere 74 | vim.keymap.set("n", "c", function() 75 | vim.ui.input({}, function(c) 76 | if c and c ~= "" then 77 | vim.cmd("noswapfile vnew") 78 | vim.bo.buftype = "nofile" 79 | vim.bo.bufhidden = "wipe" 80 | vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.fn.systemlist(c)) 81 | end 82 | end) 83 | end) 84 | end 85 | 86 | return M 87 | -------------------------------------------------------------------------------- /after/syntax/scala.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " What Is This: Add some conceal operator for your scala files 3 | " File: scala.vim (conceal enhancement) 4 | " Author: Michael Pollmeier 5 | " Last Change: 2013-11-09 6 | " Version: 1.0.0 7 | " Require: 8 | " set nocompatible 9 | " somewhere on your .vimrc 10 | " 11 | " Vim 7.3 or Vim compiled with conceal patch. 12 | " Use --with-features=big or huge in order to compile it in. 13 | " 14 | " Usage: 15 | " Drop this file in your 16 | " ~/.vim/after/syntax folder (Linux/MacOSX/BSD...) 17 | " ~/vimfiles/after/syntax folder (Windows) 18 | " 19 | " For this script to work, you have to set the encoding 20 | " to utf-8 :set enc=utf-8 21 | " 22 | " Additional: 23 | " * This plug-in is very much inspired by Vincent Berthoux's http://github.com/Twinside/vim-haskellConceal 24 | " * if you want to avoid the loading, add the following 25 | " line in your .vimrc : 26 | " let g:no_scala_conceal = 1 27 | " 28 | if exists('g:no_scala_conceal') || !has('conceal') || &enc != 'utf-8' 29 | finish 30 | endif 31 | 32 | syntax match scalaNiceOperator "<-" conceal cchar=← 33 | syntax match scalaNiceOperator "->" conceal cchar=→ 34 | syntax match scalaNiceOperator "==" conceal cchar=≟ 35 | syntax match scalaNiceOperator "===" conceal cchar=≡ 36 | syntax match scalaNiceOperator "!=" conceal cchar=≠ 37 | syntax match scalaNiceOperator "=/=" conceal cchar=≢ 38 | syntax match scalaNiceOperator ">>" conceal cchar=» 39 | syntax match scalaNiceOperator "&&" conceal cchar=∧ 40 | syntax match scalaNiceOperator "||" conceal cchar=∨ 41 | 42 | let s:extraConceal = 1 43 | " Some windows font don't support some of the characters, 44 | " so if they are the main font, we don't load them :) 45 | if has("win32") 46 | let s:incompleteFont = [ 'Consolas' 47 | \ , 'Lucida Console' 48 | \ , 'Courier New' 49 | \ ] 50 | let s:mainfont = substitute( &guifont, '^\([^:,]\+\).*', '\1', '') 51 | for s:fontName in s:incompleteFont 52 | if s:mainfont ==? s:fontName 53 | let s:extraConceal = 0 54 | break 55 | endif 56 | endfor 57 | endif 58 | 59 | if s:extraConceal 60 | " Match greater than and lower than w/o messing with Kleisli composition 61 | syntax match scalaNiceOperator "<=\ze[^<]" conceal cchar=≤ 62 | syntax match scalaNiceOperator ">=\ze[^>]" conceal cchar=≥ 63 | 64 | syntax match scalaNiceOperator "=>" conceal cchar=⇒ 65 | syntax match scalaNiceOperator "=\zs<<" conceal cchar=« 66 | 67 | " Redfining to get proper '::' concealing 68 | syntax match hs_DeclareFunction /^[a-z_(]\S*\(\s\|\n\)*::/me=e-2 nextgroup=scalaNiceOperator contains=hs_FunctionName,hs_OpFunctionName 69 | syntax match scalaNiceOperator "\:\:" conceal cchar=∷ 70 | 71 | syntax match scalaNiceOperator "++" conceal cchar=⧺ 72 | syntax match scalaNiceOperator "forall" conceal cchar=∀ 73 | 74 | "syntax match scalaNiceOperator /\s\.\s/ms=s+1,me=e-1 conceal cchar=∘ 75 | syntax match scalaNiceOperator "map\ze[ ({]" conceal cchar=∘ 76 | syntax match scalaNiceOperator "flatMap\ze[ ({]" conceal cchar=⤜ 77 | 78 | syntax match scalaNiceOperator "exists" conceal cchar=∈ 79 | endif 80 | 81 | hi link scalaNiceOperator Operator 82 | hi! link Conceal Operator 83 | setlocal conceallevel=2 84 | -------------------------------------------------------------------------------- /lua/tt/project.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | local tools = require("tt.tools") 3 | 4 | local projects_file = vim.fn.expand("~/.nvim-projects") 5 | 6 | local function read_projects() 7 | local projects = {} 8 | local file = io.open(projects_file, "r") 9 | 10 | if file then 11 | for line in file:lines() do 12 | -- Trim whitespace and skip empty lines 13 | line = line:match("^%s*(.-)%s*$") 14 | if line ~= "" then 15 | table.insert(projects, line) 16 | end 17 | end 18 | file:close() 19 | end 20 | 21 | return projects 22 | end 23 | 24 | local function write_projects(projects) 25 | -- Remove duplicates while preserving order 26 | local seen = {} 27 | local unique_projects = {} 28 | 29 | for _, project in ipairs(projects) do 30 | if not seen[project] then 31 | seen[project] = true 32 | table.insert(unique_projects, project) 33 | end 34 | end 35 | 36 | local file = io.open(projects_file, "w") 37 | if file then 38 | for _, project in ipairs(unique_projects) do 39 | file:write(project .. "\n") 40 | end 41 | file:close() 42 | return true 43 | end 44 | 45 | return false 46 | end 47 | 48 | function M.add_current_project() 49 | local git_root = vim.fs.root(0, ".git") 50 | 51 | if not git_root then 52 | vim.notify("No git repository found", vim.log.levels.WARN) 53 | return 54 | end 55 | 56 | local projects = read_projects() 57 | table.insert(projects, git_root) 58 | 59 | if write_projects(projects) then 60 | else 61 | vim.notify("Failed to write projects file", vim.log.levels.ERROR) 62 | end 63 | end 64 | 65 | function M.remove_project() 66 | local projects = read_projects() 67 | if #projects == 0 then 68 | vim.notify("No projects found. Use :ProjectAdd to add the current directory.", vim.log.levels.INFO) 69 | return 70 | end 71 | local new_projects = {} 72 | 73 | vim.ui.select(projects, { 74 | prompt = "Remove Project:", 75 | }, function(choice) 76 | if choice ~= nil then 77 | for _, project in ipairs(projects) do 78 | if project ~= choice then 79 | table.insert(new_projects, project) 80 | end 81 | end 82 | 83 | if write_projects(new_projects) then 84 | vim.notify("Removed project: " .. choice, vim.log.levels.INFO) 85 | else 86 | vim.notify("Failed to write projects file", vim.log.levels.ERROR) 87 | end 88 | end 89 | end) 90 | end 91 | 92 | -- Open the projects buffer 93 | function M.show_projects() 94 | local projects = read_projects() 95 | 96 | if #projects == 0 then 97 | vim.notify("No projects found. Use :ProjectAdd to add the current directory.", vim.log.levels.INFO) 98 | return 99 | end 100 | vim.ui.select(projects, { 101 | prompt = "Select Project:", 102 | }, function(choice) 103 | if choice ~= nil then 104 | vim.cmd("cd " .. vim.fn.fnameescape(choice)) 105 | vim.cmd("%bdelete") 106 | tools.splashscreen() 107 | end 108 | end) 109 | end 110 | 111 | function M.setup() 112 | vim.api.nvim_create_user_command("ProjectAdd", function() 113 | M.add_current_project() 114 | end, { desc = "Add current git project to projects list" }) 115 | 116 | vim.api.nvim_create_user_command("Projects", function() 117 | M.show_projects() 118 | end, { desc = "Show all tracked projects" }) 119 | 120 | vim.api.nvim_create_user_command("ProjectClear", function() 121 | M.remove_project() 122 | end, { desc = "Remove project from list" }) 123 | end 124 | 125 | return M 126 | -------------------------------------------------------------------------------- /syntax/fugitiveblame.vim: -------------------------------------------------------------------------------- 1 | let s:hash_colors = {} 2 | function! s:RehighlightBlame() abort 3 | for [hash, cterm] in items(s:hash_colors) 4 | if !empty(cterm) || has('gui_running') || has('termguicolors') && &termguicolors 5 | exe 'hi FugitiveblameHash'.hash.' guifg=#'.hash.get(s:hash_colors, hash, '') 6 | else 7 | exe 'hi link FugitiveblameHash'.hash.' Identifier' 8 | endif 9 | endfor 10 | endfunction 11 | let b:current_syntax = 'fugitiveblame' 12 | let conceal = has('conceal') ? ' conceal' : '' 13 | let arg = exists('b:fugitive_blame_arguments') ? b:fugitive_blame_arguments : '' 14 | syn match FugitiveblameBoundary "^\^" 15 | syn match FugitiveblameBlank "^\s\+\s\@=" nextgroup=FugitiveblameAnnotation,fugitiveblameOriginalFile,FugitiveblameOriginalLineNumber skipwhite 16 | syn match FugitiveblameHash "\%(^\^\=\)\@<=\<\x\{7,40\}\>" nextgroup=FugitiveblameAnnotation,FugitiveblameOriginalLineNumber,fugitiveblameOriginalFile skipwhite 17 | syn match FugitiveblameUncommitted "\%(^\^\=\)\@<=\<0\{7,40\}\>" nextgroup=FugitiveblameAnnotation,FugitiveblameOriginalLineNumber,fugitiveblameOriginalFile skipwhite 18 | syn region FugitiveblameAnnotation matchgroup=FugitiveblameDelimiter start="(" end="\%( \d\+\)\@<=)" contained keepend oneline 19 | syn match FugitiveblameTime "[0-9:/+-][0-9:/+ -]*[0-9:/+-]\%( \+\d\+)\)\@=" contained containedin=FugitiveblameAnnotation 20 | exec 'syn match FugitiveblameLineNumber " *\d\+)\@=" contained containedin=FugitiveblameAnnotation'.conceal 21 | exec 'syn match FugitiveblameOriginalFile " \%(\f\+\D\@<=\|\D\@=\f\+\)\%(\%(\s\+\d\+\)\=\s\%((\|\s*\d\+)\)\)\@=" contained nextgroup=FugitiveblameOriginalLineNumber,FugitiveblameAnnotation skipwhite'.(arg =~# 'f' ? '' : conceal) 22 | exec 'syn match FugitiveblameOriginalLineNumber " *\d\+\%(\s(\)\@=" contained nextgroup=FugitiveblameAnnotation skipwhite'.(arg =~# 'n' ? '' : conceal) 23 | exec 'syn match FugitiveblameOriginalLineNumber " *\d\+\%(\s\+\d\+)\)\@=" contained nextgroup=FugitiveblameShort skipwhite'.(arg =~# 'n' ? '' : conceal) 24 | syn match FugitiveblameShort " \d\+)" contained contains=FugitiveblameLineNumber 25 | syn match FugitiveblameNotCommittedYet "(\@<=Not Committed Yet\>" contained containedin=FugitiveblameAnnotation 26 | hi def link FugitiveblameBoundary Keyword 27 | hi def link FugitiveblameHash Identifier 28 | hi def link FugitiveblameUncommitted Ignore 29 | hi def link FugitiveblameTime PreProc 30 | hi def link FugitiveblameLineNumber Number 31 | hi def link FugitiveblameOriginalFile String 32 | hi def link FugitiveblameOriginalLineNumber Float 33 | hi def link FugitiveblameShort FugitiveblameDelimiter 34 | hi def link FugitiveblameDelimiter Delimiter 35 | hi def link FugitiveblameNotCommittedYet Comment 36 | let seen = {} 37 | for lnum in range(1, line('$')) 38 | let hash = matchstr(getline(lnum), '^\^\=\zs\x\{6\}') 39 | if hash ==# '' || hash ==# '000000' || has_key(seen, hash) 40 | continue 41 | endif 42 | let seen[hash] = 1 43 | if &t_Co > 16 && get(g:, 'CSApprox_loaded') && !empty(findfile('autoload/csapprox/per_component.vim', escape(&rtp, ' '))) 44 | \ && empty(get(s:hash_colors, hash)) 45 | let [s, r, g, b; __] = map(matchlist(hash, '\(\x\x\)\(\x\x\)\(\x\x\)'), 'str2nr(v:val,16)') 46 | let color = csapprox#per_component#Approximate(r, g, b) 47 | if color == 16 && &background ==# 'dark' 48 | let color = 8 49 | endif 50 | let s:hash_colors[hash] = ' ctermfg='.color 51 | else 52 | let s:hash_colors[hash] = '' 53 | endif 54 | exe 'syn match FugitiveblameHash'.hash.' "\%(^\^\=\)\@<='.hash.'\x\{1,34\}\>" nextgroup=FugitiveblameAnnotation,FugitiveblameOriginalLineNumber,fugitiveblameOriginalFile skipwhite' 55 | endfor 56 | call s:RehighlightBlame() 57 | -------------------------------------------------------------------------------- /lua/tt/git.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | local api = vim.api 3 | local fn = vim.fn 4 | local shell_to_buf = require("tt.nvim_utils").vim_util.shell_to_buf 5 | local namespace = api.nvim_create_namespace("git_lens") 6 | 7 | local function cmd(cmd) 8 | if is_windows then 9 | return "git " .. cmd .. " 2> NUL | tr -d '\n'" 10 | else 11 | return "git " .. cmd .. " 2> /dev/null | tr -d '\n'" 12 | end 13 | end 14 | 15 | function M.diff() 16 | local fileName = fn.expand("%") 17 | local ext = fn.expand("%:e") 18 | local buf = shell_to_buf({ "git", "show", "HEAD:" .. fileName }) 19 | vim.cmd.wincmd("v") 20 | vim.cmd.wincmd("h") 21 | api.nvim_win_set_buf(0, buf) 22 | vim.bo.filetype = ext 23 | vim.cmd.diffthis() 24 | vim.cmd.wincmd("l") 25 | vim.cmd.diffthis() 26 | end 27 | 28 | function M.blame_file() 29 | local fileName = fn.expand("%") 30 | local buf = shell_to_buf({ "git", "blame", fileName }) 31 | vim.cmd("40wincmd v") 32 | vim.cmd.wincmd("r") 33 | api.nvim_win_set_buf(0, buf) 34 | vim.bo.filetype = "fugitiveblame" 35 | vim.cmd.wincmd("h") 36 | end 37 | 38 | function M.blame() 39 | local ft = fn.expand("%:h:t") 40 | if ft == "" then 41 | return 42 | end 43 | if ft == "bin" then 44 | return 45 | end 46 | api.nvim_buf_clear_namespace(0, 99, 0, -1) 47 | local currFile = fn.expand("%") 48 | local line = api.nvim_win_get_cursor(0) 49 | local log_result = vim.system({ 50 | "git", 51 | "log", 52 | "-1", 53 | "--format=%an, %ar • %s", 54 | "-L", 55 | string.format("%d,%d:%s", line[1], line[1], currFile), 56 | }, { text = true }):wait() 57 | if log_result.code ~= 0 or not log_result.stdout then 58 | return "Not Committed Yet" 59 | end 60 | 61 | text = vim.split(log_result.stdout, "\n") 62 | 63 | api.nvim_buf_set_extmark(0, namespace, line[1] - 1, line[2], { 64 | virt_text = { { string.format("%s", text[1]), "GitLens" } }, 65 | }) 66 | end 67 | 68 | function M.clear_blame() 69 | api.nvim_buf_clear_namespace(0, namespace, 0, -1) 70 | end 71 | 72 | function M.branch() 73 | local command = {} 74 | if is_windows then 75 | command = { "git", "rev-parse", "--abbrev-ref", "HEAD" } 76 | else 77 | command = { "git", "rev-parse", "--abbrev-ref", "HEAD" } 78 | end 79 | local result = vim.system(command):wait() 80 | if result.code == 0 and result.stdout then 81 | if is_windows then 82 | return result.stdout:gsub("\\n", "") 83 | else 84 | return result.stdout:gsub("\n", "") 85 | end 86 | else 87 | return "" 88 | end 89 | end 90 | 91 | -- returns short status of changes 92 | function M.stat() 93 | local command = cmd("diff --shortstat") 94 | local result = vim.system({ command }):wait() 95 | return result.stdout or "" 96 | end 97 | 98 | local function listChangedFiles() 99 | local result = vim.system({ "git", "diff", "--name-only", "--no-color" }):wait() 100 | if result.code == 0 and result.stdout then 101 | return vim.split(vim.trim(result.stdout), "\n") 102 | else 103 | return {} 104 | end 105 | end 106 | 107 | local function jumpToDiff() 108 | vim.cmd("silent only") 109 | vim.cmd("vsplit ") 110 | M.diff() 111 | vim.cmd.wincmd("h") 112 | vim.cmd.wincmd("h") 113 | end 114 | 115 | function M.QfFiles() 116 | local files = listChangedFiles() 117 | local qfFiles = {} 118 | for _, file in ipairs(files) do 119 | table.insert(qfFiles, { filename = file, lnum = 1 }) 120 | end 121 | fn.setqflist(qfFiles, "r") 122 | end 123 | 124 | function M.changedFiles() 125 | vim.cmd.tabnew() 126 | local files = listChangedFiles() 127 | local buf = api.nvim_create_buf(false, true) 128 | api.nvim_buf_set_lines(buf, 0, -1, true, files) 129 | api.nvim_win_set_buf(0, buf) 130 | vim.keymap.set("n", "", jumpToDiff, { buffer = buf }) 131 | vim.keymap.set("n", "Q", ":tabclose", { buffer = buf }) 132 | end 133 | 134 | return M 135 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | vim.loader.enable() 2 | -- This needs to be set before plugins so that plugin init codes can read the mapleader key 3 | vim.g.mapleader = " " 4 | vim.opt.rtp:prepend(vim.fn.stdpath("data") .. "/site/pack/*") 5 | require("tt.plugins") 6 | local globals = require("tt.nvim_utils").GLOBALS 7 | 8 | vim.g.did_install_default_menus = 1 9 | vim.g.python3_host_prog = globals.python_host 10 | vim.g.markdown_fenced_languages = { 11 | "html", 12 | "typescript", 13 | "markdown", 14 | "javascript", 15 | "js=javascript", 16 | "ts=typescript", 17 | "rust", 18 | "css", 19 | "vim", 20 | "lua", 21 | } 22 | 23 | vim.g.gutentags_file_list_command = "fd --type f --hidden -E .git" 24 | vim.g.gutentags_cache_dir = vim.fn.expand("~/.cache/") 25 | vim.g.gutentags_project_root = { ".git" } 26 | vim.g.gutentags_add_default_project_roots = 0 27 | vim.g.gutentags_generate_on_empty_buffer = 1 28 | vim.g.gutentags_ctags_exclude_wildignore = 1 29 | 30 | local set = vim.o 31 | set.exrc = true 32 | set.secure = true 33 | set.title = true 34 | set.splitright = true 35 | set.modeline = false 36 | set.wildignorecase = true 37 | set.wildignore = 38 | "*/node_modules/*,*.png,*.PNG,*.jpg,*.jpeg,*.JPG,*.JPEG,*.pdf,*.exe,*.o,*.obj,*.dll,*.DS_Store,*.ttf,*.otf,*.woff,*.woff2,*.eot" 39 | set.expandtab = true 40 | set.shiftround = true 41 | set.ignorecase = true 42 | set.smartcase = true 43 | set.undofile = true 44 | set.relativenumber = true 45 | set.tags = "" -- let gutentags handle this 46 | set.foldenable = false 47 | set.undolevels = 1000 48 | set.ttimeoutlen = 20 49 | set.shiftwidth = 2 50 | set.softtabstop = 2 51 | set.tabstop = 2 52 | set.synmaxcol = 200 53 | set.cmdheight = 2 54 | set.splitkeep = "topline" 55 | set.conceallevel = 2 56 | set.showbreak = string.rep(".", 3) -- Make it so that long lines wrap smartly 57 | 58 | set.smartindent = true 59 | set.fileformat = "unix" 60 | set.jumpoptions = "stack" 61 | set.diffopt = "hiddenoff,iwhiteall,algorithm:minimal,internal,closeoff,indent-heuristic,linematch:60,inline:word" 62 | set.nrformats = "bin,hex,alpha" 63 | set.grepprg = "rg --smart-case --vimgrep --block-buffered" 64 | set.virtualedit = "block" 65 | set.inccommand = "split" 66 | set.completeopt = "menuone,noselect,popup,fuzzy" 67 | set.autocomplete = true 68 | set.complete = ".,w,b,u,o,F" 69 | set.listchars = "tab:░░,trail:·,space:·,extends:»,precedes:«,nbsp:⣿" 70 | set.formatlistpat = "^\\s*\\[({]\\?\\([0-9]\\+\\|[a-zA-Z]\\+\\)[\\]:.)}]\\s\\+\\|^\\s*[-–+o*•]\\s\\+" 71 | set.foldlevelstart = 99 72 | set.foldlevel = 1 73 | set.foldmethod = "expr" 74 | set.foldexpr = "nvim_treesitter#foldexpr()" 75 | set.shortmess = vim.o.shortmess .. "s" 76 | set.undodir = globals.home .. "/.cache/Vim/undofile" 77 | 78 | local in_wsl = os.getenv("WSL_DISTRO_NAME") ~= nil 79 | 80 | if in_wsl then 81 | vim.g.clipboard = { 82 | name = "wsl clipboard", 83 | copy = { ["+"] = { "clip.exe" }, ["*"] = { "clip.exe" } }, 84 | paste = { ["+"] = { "nvim_paste" }, ["*"] = { "nvim_paste" } }, 85 | cache_enabled = true, 86 | } 87 | end 88 | 89 | -- UI OPTS 90 | set.wrap = false 91 | set.cursorline = true 92 | set.fillchars = "stlnc:»,vert:║,fold:·" 93 | set.number = true 94 | set.pumblend = 5 95 | set.pumheight = 15 96 | set.scrolloff = 1 97 | set.sidescrolloff = 5 98 | set.guicursor = "n-ci-c-o:blinkon175-blinkoff175-Cursor/lCursor,i-ci:ver25-Cursor,v-ve:blinkon175-blinkoff175-Cursor" 99 | vim.cmd("colorscheme quiet-modified") 100 | require("tt.core_opts") 101 | require("tt.lsp") 102 | require("tt.mappings") 103 | require("tt.autocmds") 104 | require("tt.snippets") 105 | require("tt.filetypes") 106 | require("tt.format") 107 | vim.opt.statusline = 108 | "%f %#Search#%{&mod?'[+]':''}%* %{luaeval('require\"tt.nvim_utils\".vim_util.get_diagnostics()')} %=%r%=%{luaeval('require\"tt.nvim_utils\".vim_util.get_lsp_clients()')}" 109 | local schedule = vim.schedule 110 | schedule(function() 111 | require("tt.tools").splashscreen() 112 | end) 113 | -------------------------------------------------------------------------------- /lua/tt/ft/ecma.lua: -------------------------------------------------------------------------------- 1 | local node = require("tt.nvim_utils").nodejs 2 | local constants = require("tt.constants") 3 | local job_runner = require("tt.job_runner") 4 | 5 | local fn = vim.fn 6 | 7 | local M = {} 8 | 9 | function M.bootstrap() 10 | if vim.bo.readonly ~= true then 11 | require("tt.snippets.ft.ecmascript").init() 12 | end 13 | vim.bo.suffixesadd = ".js,.jsx,.ts,.tsx" 14 | vim.bo.include = "^\\s*[^/]\\+\\(from\\|require(['\"]\\)" 15 | vim.bo.define = "class\\s" 16 | vim.wo.foldlevel = 99 17 | 18 | vim.api.nvim_create_user_command("Sort", function() 19 | require("tt.ft.ecma").import_sort(true) 20 | end, {}) 21 | vim.api.nvim_create_user_command("Eslint", function() 22 | require("tt.ft.ecma").linter_d() 23 | end, {}) 24 | vim.api.nvim_create_user_command("Lint", function() 25 | require("tt.ft.ecma").lint_project() 26 | end, {}) 27 | vim.api.nvim_create_user_command("Run", function() 28 | require("tt.ft.ecma").run_yarn() 29 | end, {}) 30 | 31 | -- optionally enable formatters/linters 32 | if vim.fs.root(0, constants.eslint_roots) then 33 | require("tt.lsp.efm").init() 34 | vim.lsp.start(vim.lsp.config.efm) 35 | end 36 | 37 | if vim.fs.root(0, constants.prettier_roots) then 38 | vim.b.autoformat = true 39 | end 40 | end 41 | 42 | function M.import_sort(async, cb) 43 | local path = fn.fnameescape(fn.expand("%:p")) 44 | local executable_path = node.find_node_executable("import-sort") 45 | 46 | if fn.executable(executable_path) then 47 | if true == async then 48 | job_runner.run_job({ 49 | executable_path, 50 | path, 51 | "--write", 52 | }, { 53 | on_stdout = function(line) 54 | vim.schedule(function() 55 | print(line) 56 | end) 57 | end, 58 | on_stderr = function(line) 59 | vim.schedule(function() 60 | error("IMPORT_SORT: " .. line) 61 | end) 62 | end, 63 | on_exit = function(code) 64 | if code == 0 then 65 | vim.schedule(function() 66 | vim.cmd.checktime() 67 | if cb ~= nil then 68 | cb() 69 | end 70 | end) 71 | end 72 | end, 73 | }) 74 | else 75 | vim.system({ executable_path, path, "--write" }):wait() 76 | vim.cmd.checktime() 77 | if cb ~= nil then 78 | cb() 79 | end 80 | end 81 | else 82 | error("Cannot find import-sort executable") 83 | end 84 | end 85 | 86 | function M.lint_project() 87 | local executable_path = node.find_node_executable("eslint_d") 88 | 89 | job_runner.run_job({ 90 | executable_path, 91 | ".", 92 | "--ext", 93 | ".js,.ts,.tsx,.jsx", 94 | "--max-warnings=0", 95 | "-f", 96 | "compact", 97 | "--fix", 98 | }, { 99 | collect_output = true, 100 | on_exit = function(_, results) 101 | vim.schedule(function() 102 | fn.setloclist(fn.winnr(), {}, " ", { 103 | title = "eslint -- errors", 104 | lines = results, 105 | efm = "%f: line %l\\, col %c\\, %m,%-G%.%#", 106 | }) 107 | vim.cmd.lwindow() 108 | end) 109 | end, 110 | }) 111 | end 112 | 113 | function M.linter_d() 114 | local path = fn.fnameescape(fn.expand("%:p")) 115 | local executable_path = node.find_node_executable("eslint_d") 116 | 117 | job_runner.run_job({ 118 | executable_path, 119 | path, 120 | "-f", 121 | "compact", 122 | "--fix", 123 | }, { 124 | collect_output = true, 125 | on_exit = function(_, results) 126 | vim.schedule(function() 127 | vim.cmd.checktime() 128 | fn.setloclist(fn.winnr(), {}, " ", { 129 | title = "eslint -- errors", 130 | lines = results, 131 | efm = "%f: line %l\\, col %c\\, %m,%-G%.%#", 132 | }) 133 | vim.cmd.lwindow() 134 | vim.lsp.buf_attach_client(0, 1) 135 | end) 136 | end, 137 | }) 138 | end 139 | 140 | function M.sort_and_lint() 141 | M.import_sort(true, M.linter_d) 142 | end 143 | 144 | function M.run_yarn() 145 | local function getscripts() 146 | local vals = vim.system({ "jq", ".scripts | keys", "package.json", "-a" }):wait() 147 | result = vim.json.decode(vals.stdout) 148 | return result 149 | end 150 | end 151 | 152 | return M 153 | -------------------------------------------------------------------------------- /knapsack.vim: -------------------------------------------------------------------------------- 1 | " MINIMAL VIMRC, focused on portability 2 | if executable('rg') 3 | set grepprg=rg\ --smart-case\ --vimgrep 4 | else if executable('ag') 5 | set grepprg=ag\ --vimgrep 6 | endif 7 | 8 | set path+=** 9 | set path-=/usr/include 10 | set wildignore+=*/lib/*,*/locale/*,*/flow-typed/*,*/node_modules/* 11 | set wildignore+=*.png,*.PNG,*.jpg,*.jpeg,*.JPG,*.JPEG,*.pdf,*.exe,*.o,*.obj,*.dll,*.DS_Store 12 | set wildignore+=*.ttf,*.otf,*.woff,*.woff2,*.eot 13 | set autoindent 14 | set incsearch 15 | set tabstop=2 16 | set expandtab 17 | set shiftround 18 | set ignorecase 19 | set smartcase 20 | syntax enable 21 | set completeopt+=longest,noinsert,menuone,noselect 22 | set completeopt-=preview 23 | filetype plugin indent on 24 | set formatoptions-=o " Don't insert comment lines when pressing o in normal mode 25 | set autoread " Automatically read a file changed outside of vim 26 | set complete-=i 27 | set belloff=all 28 | set wildmenu 29 | set backspace=indent,eol,start "better backspace behavior 30 | set hlsearch 31 | set smarttab 32 | set history=10000 33 | set renderoptions=type:directx,gamma:1.0,contrast:0.5,level:1,geom:1,renmode:4,taamode:1 34 | set background=dark 35 | set laststatus=2 36 | set guifont=IBM\ Plex\ Mono 37 | 38 | iabbrev retrun return 39 | iabbrev pritn print 40 | iabbrev cosnt const 41 | iabbrev imoprt import 42 | iabbrev imprt import 43 | iabbrev iomprt import 44 | iabbrev improt import 45 | iabbrev slef self 46 | iabbrev teh the 47 | iabbrev hadnler handler 48 | iabbrev bunlde bundle 49 | 50 | filetype plugin indent on 51 | 52 | augroup ECMA 53 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx suffixesadd+=.js,.jsx,.ts,.tsx " navigate to imported files by adding the js(x) suffix 54 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx setlocal include=^\\s*[^\/]\\+\\(from\\\|require(['\"]\\) 55 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx setlocal define=class\\s 56 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx inoremap console.log()i 57 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx inoremap console.log(`%c${}`, 'color: ;')F{a 58 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx inoremap d debugger 59 | autocmd FileType typescript,typescript.tsx,typescript.jsx,javascript,javascript.jsx nnoremap i biimport {ea} from ''i 60 | augroup END 61 | 62 | augroup quickfix 63 | autocmd! 64 | autocmd QuickFixCmdPost cgetexpr cwindow 65 | autocmd QuickFixCmdPost lgetexpr lwindow 66 | augroup END 67 | 68 | " MAPS: 69 | let g:mapleader = "\" 70 | imap jj 71 | 72 | if exists(':tnoremap') 73 | tnoremap 74 | endif 75 | 76 | nnoremap [q :cnext 77 | nnoremap ]q :cprev 78 | nnoremap [Q :cnfile 79 | nnoremap ]Q :cpfile 80 | 81 | nnoremap ; : 82 | nnoremap : ; 83 | 84 | " Blocks: 85 | vnoremap :m '<-2gv=gv 86 | vnoremap :m '>+1gv=gv 87 | nnoremap :m .-2== 88 | nnoremap :m .+1== 89 | 90 | nnoremap , :find 91 | nnoremap S :%s//g 92 | vmap s :s//g 93 | 94 | nnoremap :call WinMove('j') 95 | nnoremap :call WinMove('l') 96 | nnoremap :call WinMove('h') 97 | nnoremap :call WinMove('k') 98 | nnoremap wq :close 99 | 100 | " System Clipboard: 101 | xnoremap y "+y 102 | xnoremap d "+d 103 | nnoremap p "+p 104 | nnoremap P "+P 105 | " Don't trash current register when pasting in visual mode 106 | xnoremap p p:if v:register == '"'let @@=@0endif 107 | 108 | " Move in given direction or create new split 109 | function! WinMove(key) abort 110 | let t:curwin = winnr() 111 | exec "wincmd ".a:key 112 | if (t:curwin == winnr()) 113 | if (match(a:key,'[jk]')) 114 | wincmd v 115 | else 116 | wincmd s 117 | endif 118 | exec "wincmd ".a:key 119 | endif 120 | endfunction 121 | 122 | 123 | " COMMANDS: 124 | command! -nargs=+ -complete=file_in_path -bar Grep let a = split(, ' ') 125 | \ | cgetexpr system(join([&grepprg, shellescape(a[0]), get(a, 1, '')], ' ')) 126 | \ | unlet a 127 | -------------------------------------------------------------------------------- /lua/tt/mappings.lua: -------------------------------------------------------------------------------- 1 | local tools = require("tt.tools") 2 | local git = require("tt.git") 3 | 4 | -- INSERT MODE 5 | vim.keymap.set("i", "jj", "", { noremap = true }) 6 | vim.keymap.set("i", "", "", { noremap = true }) 7 | vim.keymap.set("i", "", "", { noremap = true }) 8 | vim.keymap.set("i", "", "", { noremap = true }) 9 | vim.keymap.set("i", "", "", { noremap = true }) 10 | 11 | -- TERMINAL MODE 12 | vim.keymap.set("t", "", "", { noremap = true }) 13 | 14 | -- NORMAL MODE 15 | vim.keymap.set("n", "", ":m .-2==", { noremap = true, silent = true }) 16 | vim.keymap.set("n", "", ":m .+1==", { noremap = true, silent = true }) 17 | vim.keymap.set("n", "'", "`", { noremap = true }) 18 | vim.keymap.set("n", "Y", "y$", { noremap = true }) 19 | vim.keymap.set("n", "p", '"+p', { noremap = true }) 20 | vim.keymap.set("n", "P", '"+P', { noremap = true }) 21 | vim.keymap.set("n", "g.", '/\\V\\C"cgn', { noremap = true }) 22 | vim.keymap.set( 23 | "n", 24 | "z/", 25 | ":let @/='\\<=expand(\"\")\\>':set hls", 26 | { noremap = true, silent = true } 27 | ) 28 | vim.keymap.set("n", "e", ":e =expand('%:p:h') . '/'", { noremap = true, silent = false }) 29 | vim.keymap.set("n", "", function() 30 | tools.winMove("j") 31 | end) 32 | vim.keymap.set("n", "", function() 33 | tools.winMove("l") 34 | end) 35 | vim.keymap.set("n", "", function() 36 | tools.winMove("h") 37 | end) 38 | vim.keymap.set("n", "", function() 39 | tools.winMove("k") 40 | end) 41 | vim.keymap.set("n", "ssb", tools.sourceSession) 42 | vim.keymap.set("n", "", tools.profile) 43 | vim.keymap.set("n", "B", git.blame_file) 44 | vim.keymap.set("n", "b", git.blame) 45 | vim.keymap.set("n", "d", function() 46 | tools.openTerminalDrawer() 47 | end) 48 | 49 | vim.keymap.set("n", "n", function() 50 | pcall(vim.cmd, "normal! n") 51 | require("tt.nvim_utils").hl_search_match(0.15) 52 | end, { silent = true }) 53 | 54 | vim.keymap.set("n", "N", function() 55 | pcall(vim.cmd, "normal! N") 56 | require("tt.nvim_utils").hl_search_match(0.15) 57 | end, { silent = true }) 58 | 59 | vim.keymap.set("n", "", function() 60 | pcall(vim.cmd, "nohlsearch") 61 | end, { silent = true }) 62 | 63 | vim.keymap.set("n", "-", function() 64 | require("oil").open() 65 | end, { silent = true }) 66 | 67 | vim.keymap.set("n", "a", function() 68 | vim.cmd("argadd %") 69 | vim.cmd("argdedupe") 70 | end, { silent = true }) 71 | 72 | vim.keymap.set("n", "1", function() 73 | vim.cmd("silent! 1argument") 74 | end, { silent = true }) 75 | 76 | vim.keymap.set("n", "2", function() 77 | vim.cmd("silent! 2argument") 78 | end, { silent = true }) 79 | 80 | vim.keymap.set("n", "3", function() 81 | vim.cmd("silent! 3argument") 82 | end, { silent = true }) 83 | 84 | vim.keymap.set("n", "cc", vim.cmd.cclose, { noremap = true, silent = true }) 85 | vim.keymap.set("n", "cl", vim.cmd.lclose, { noremap = true, silent = true }) 86 | vim.keymap.set("n", "h", "call tools#switchSourceHeader()", { noremap = true, silent = true }) 87 | vim.keymap.set("n", "-", 'let @+ = expand("%")', { noremap = true, silent = true }) 88 | vim.keymap.set("n", "", 'so "%"', { noremap = true, silent = true }) 89 | 90 | vim.keymap.set("n", "S", ":%s//g", { noremap = true }) 91 | vim.keymap.set("n", "g_", ":g//#:", { noremap = true }) 92 | vim.keymap.set("n", "", ":silent grep!", { noremap = true }) 93 | 94 | -- VISUAL MODE 95 | vim.keymap.set("x", "y", '"+y', { noremap = true }) 96 | vim.keymap.set("x", "d", '"+d', { noremap = true }) 97 | -- Don't trash current register when pasting in visual mode 98 | vim.keymap.set("x", "p", "p:if v:register == '\"'let @@=@0endif", { noremap = true }) 99 | vim.keymap.set("x", "I", "(mode()=~#'[vV]'?'^o^I':'I')", { noremap = true, expr = true }) 100 | vim.keymap.set("x", "A", "(mode()=~#'[vV]'?'0o$A':'A')", { noremap = true, expr = true }) 101 | vim.keymap.set("v", "", ":m '<-2gv=gv", { noremap = true }) 102 | vim.keymap.set("v", "", ":m '>+1gv=gv", { noremap = true }) 103 | -- vim.keymap.set("v", "s", ":s//g", { noremap = true }) 104 | vim.keymap.set("x", "b", "Gblame", { noremap = true, silent = true }) 105 | -------------------------------------------------------------------------------- /lua/tt/tools.lua: -------------------------------------------------------------------------------- 1 | local git = require("tt.git") 2 | local api = vim.api 3 | local fn = vim.fn 4 | 5 | local sessionPath = vim.fs.joinpath(vim.uv.os_homedir(), "sessions") 6 | 7 | local M = {} 8 | 9 | function M.openQuickfix() 10 | local qflen = fn.len(fn.getqflist()) 11 | local qfheight = math.min(10, qflen) 12 | vim.cmd(string.format("cclose|%dcwindow", qfheight)) 13 | end 14 | 15 | function M.splashscreen() 16 | local curr_buf = api.nvim_get_current_buf() 17 | local args = vim.fn.argc() 18 | local offset = api.nvim_buf_get_offset(curr_buf, 1) 19 | if args == 0 and offset <= 1 then 20 | api.nvim_create_buf(false, true) 21 | vim.cmd([[ silent! r ~/vim/skeletons/start.screen ]]) 22 | vim.bo[0].bufhidden = "wipe" 23 | vim.bo[0].buflisted = false 24 | vim.bo[0].matchpairs = "" 25 | vim.opt_local.relativenumber = true 26 | vim.opt_local.cursorline = false 27 | vim.wo[0].cursorcolumn = false 28 | M.simpleMRU() 29 | vim.cmd([[:34]]) 30 | vim.keymap.set("n", "", "gf", { buffer = true, noremap = true }) 31 | vim.bo[0].modified = false 32 | vim.bo[0].modifiable = false 33 | else 34 | end 35 | end 36 | 37 | function M.openTerminalDrawer() 38 | vim.cmd.copen() 39 | vim.cmd.term() 40 | api.nvim_input("i") 41 | end 42 | 43 | function M.restoreFile() 44 | local cmd = "git restore " .. fn.expand("%") 45 | vim.cmd("!" .. cmd) 46 | end 47 | 48 | function M.renameFile() 49 | local oldName = api.nvim_get_current_line() 50 | local input_cmd = string.format("input('Rename: ', '%s', 'file')", oldName) 51 | local newName = api.nvim_eval(input_cmd) 52 | os.rename(oldName, newName) 53 | api.nvim_input("R") 54 | end 55 | 56 | function M.deleteFile() 57 | local fileName = api.nvim_get_current_line() 58 | os.remove(fileName) 59 | api.nvim_input("R") 60 | end 61 | 62 | function M.winMove(key) 63 | local currentWindow = fn.winnr() 64 | vim.cmd.wincmd(key) 65 | if fn.winnr() == currentWindow then 66 | if key == "j" or key == "k" then 67 | vim.cmd.wincmd("s") 68 | else 69 | vim.cmd.wincmd("v") 70 | end 71 | vim.cmd.wincmd(key) 72 | end 73 | end 74 | 75 | -- Session Management 76 | function M.createSessionName(custom_name) 77 | local git_root = vim.fs.root(0, ".git") 78 | local project_name 79 | if git_root then 80 | project_name = vim.fn.fnamemodify(git_root, ":t") 81 | else 82 | project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") 83 | end 84 | local branch_name = git.branch() 85 | if branch_name == "" or branch_name == "master" or branch_name == "main" then 86 | branch_name = "default" 87 | else 88 | branch_name = branch_name:gsub("/", "-") 89 | end 90 | 91 | if custom_name and custom_name ~= "" then 92 | local cleared = custom_name:gsub("/", "-"):gsub("%s+", "_") 93 | return string.format("%s_%s_%s", project_name, branch_name, cleared) 94 | else 95 | return string.format("%s_%s", project_name, branch_name) 96 | end 97 | end 98 | 99 | function M.saveSession(session_name) 100 | -- When called as autocmd callback, session_name is an event table 101 | if type(session_name) == "table" then 102 | session_name = nil 103 | end 104 | local sessionName = M.createSessionName(session_name) 105 | local cmd = string.format("mks! %s/%s.vim", sessionPath, sessionName) 106 | vim.cmd(cmd) 107 | end 108 | 109 | function M.sourceSession(session_name) 110 | local sessionName = M.createSessionName(session_name) 111 | local sessionFile = string.format("%s/%s.vim", sessionPath, sessionName) 112 | if vim.fn.filereadable(sessionFile) == 1 then 113 | vim.cmd("so " .. sessionFile) 114 | else 115 | -- Session doesn't exist, create it 116 | M.saveSession(session_name) 117 | vim.notify("Created new session: " .. sessionName, vim.log.levels.INFO) 118 | end 119 | end 120 | 121 | function M.simpleMRU() 122 | local files = vim.v.oldfiles 123 | local cwd = vim.fn.getcwd(0) 124 | local filteredFiles = vim.tbl_filter(function(file) 125 | return vim.startswith(file, cwd) and vim.fn.filereadable(file) == 1 and not string.find(file, "COMMIT_MESSAGE") 126 | end, files) 127 | for _, file in ipairs(filteredFiles) do 128 | local fname = vim.fn.fnamemodify(file, ":.") 129 | vim.fn.append(vim.fn.line("$") - 1, vim.trim(fname)) 130 | end 131 | vim.cmd([[:1]]) 132 | end 133 | 134 | function M.profile() 135 | if vim.g.profiler_running ~= nil then 136 | vim.cmd("profile pause") 137 | vim.g.profiler_running = nil 138 | vim.cmd("noautocmd qall!") 139 | else 140 | vim.g.profiler_running = 1 141 | vim.cmd("profile start profile.log") 142 | vim.cmd("profile func *") 143 | vim.cmd("profile file *") 144 | end 145 | end 146 | 147 | return M 148 | -------------------------------------------------------------------------------- /lua/tt/nvim_utils.lua: -------------------------------------------------------------------------------- 1 | --- NVIM SPECIFIC SHORTCUTS 2 | local vim = vim or {} 3 | local api = vim.api 4 | local fn = vim.fn 5 | 6 | local M = {} 7 | 8 | local valid_modes = { 9 | n = "n", 10 | v = "v", 11 | x = "x", 12 | i = "i", 13 | o = "o", 14 | t = "t", 15 | c = "c", 16 | s = "s", 17 | -- :map! and :map 18 | ["!"] = "!", 19 | [" "] = "", 20 | } 21 | 22 | local is_windows = vim.uv.os_uname().sysname == "Windows_NT" 23 | -- set up globals based on current env 24 | local GLOBALS = {} 25 | 26 | if is_windows then 27 | GLOBALS.home = os.getenv("HOMEPATH") 28 | GLOBALS.python_host = "C:\\Users\\taylor.thompson\\AppData\\Local\\Programs\\Python\\Python36-32\\python.exe" 29 | else 30 | GLOBALS.home = os.getenv("HOME") 31 | GLOBALS.python_host = "/opt/homebrew/bin/python3" 32 | end 33 | 34 | M.GLOBALS = GLOBALS 35 | 36 | function log(item) 37 | print(vim.inspect(item)) 38 | end 39 | 40 | M.vim_util = {} 41 | 42 | function M.vim_util.get_lsp_clients() 43 | local lsp = vim.lsp 44 | if vim.tbl_isempty(lsp.get_clients({ bufnr = 0 })) then 45 | return "" 46 | end 47 | local clients = {} 48 | for _, client in ipairs(lsp.get_clients({ bufnr = 0 })) do 49 | table.insert(clients, client.name) 50 | end 51 | return table.concat(clients, " • ") 52 | end 53 | 54 | function M.vim_util.get_diagnostics() 55 | local diags = vim.diagnostic.get(0) 56 | local warnings = 0 57 | local errors = 0 58 | if diags == nil then 59 | return "" 60 | end 61 | for _, diag in ipairs(diags) do 62 | if diag.severity == 1 then 63 | errors = errors + 1 64 | elseif diag.severity == 2 then 65 | warnings = warnings + 1 66 | end 67 | end 68 | if errors == 0 and warnings == 0 then 69 | return "" 70 | else 71 | return "(" .. errors .. "E" .. " • " .. warnings .. "W)" 72 | end 73 | end 74 | 75 | function M.vim_util.shell_to_buf(cmd) 76 | local buf = api.nvim_create_buf(false, true) 77 | local result = vim.system(cmd):wait() 78 | local lines = vim.split(result.stdout or "", "\n") 79 | api.nvim_buf_set_lines(buf, 0, -1, true, lines) 80 | return buf 81 | end 82 | 83 | --- 84 | -- MISC UTILS 85 | --- 86 | 87 | M.nodejs = {} 88 | 89 | -- find vim related node_modules 90 | function M.nodejs.get_node_bin(bin) 91 | return fn.stdpath("config") .. "/langservers/node_modules/.bin/" .. bin 92 | end 93 | 94 | function M.nodejs.find_node_executable(binaryName) 95 | local normalized_bin_name 96 | local executable = "" 97 | if is_windows then 98 | normalized_bin_name = binaryName .. ".cmd" 99 | else 100 | normalized_bin_name = binaryName 101 | end 102 | 103 | local function is_executable(path) 104 | local stat = vim.uv.fs_stat(path) 105 | if not stat then 106 | return false 107 | end 108 | return vim.fn.executable(path) 109 | end 110 | 111 | if vim.g.nodeDir ~= nil then 112 | executable = vim.g.nodeDir .. "/node_modules/.bin/" .. normalized_bin_name 113 | end 114 | if not is_executable(executable) then 115 | executable = fn.getcwd() .. "/node_modules/.bin/" .. normalized_bin_name 116 | end 117 | if not is_executable(executable) then 118 | local result = vim.system({ "git", "rev-parse", "--show-toplevel" }):wait() 119 | if result.code == 0 then 120 | local project_root_path = vim.trim(result.stdout) 121 | executable = vim.fs.normalize(project_root_path .. "/node_modules/.bin/" .. normalized_bin_name) 122 | end 123 | end 124 | 125 | if not is_executable(executable) then 126 | executable = M.nodejs.get_node_bin(normalized_bin_name) 127 | end 128 | if not is_executable(executable) then 129 | return "" 130 | end 131 | return executable 132 | end 133 | 134 | function M.nodejs.get_node_lib(lib) 135 | local f = fn.getcwd() .. "/node_modules/" .. lib 136 | if not vim.uv.fs_stat(f) then 137 | local result = vim.system({ "git", "rev-parse", "--show-toplevel" }):wait() 138 | if result.code == 0 then 139 | local project_root_path = vim.trim(result.stdout) 140 | f = vim.fs.normalize(project_root_path .. "/node_modules/" .. lib) 141 | end 142 | end 143 | if vim.uv.fs_stat(f) then 144 | return f 145 | end 146 | -- Fallback to langservers 147 | local langservers_path = fn.stdpath("config") .. "/langservers/node_modules/" .. lib 148 | if vim.uv.fs_stat(langservers_path) then 149 | return langservers_path 150 | end 151 | return "" 152 | end 153 | 154 | function M.vim_util.iabbrev(src, target, buffer) 155 | if buffer == nil then 156 | vim.cmd.iabbrev({ args = { src, target } }) 157 | else 158 | vim.cmd.iabbrev({ args = { "", src, target } }) 159 | end 160 | end 161 | 162 | function M.hl_search_match(blinktime) 163 | -- Get the pattern that matches the cursor position and last search pattern 164 | local pattern = [[\c\%#]] .. vim.fn.getreg("/") 165 | local match_id = vim.fn.matchadd("DiffDelete", pattern, 101) 166 | vim.cmd("redraw") 167 | vim.defer_fn(function() 168 | pcall(vim.fn.matchdelete, match_id) 169 | vim.cmd("redraw") 170 | end, blinktime * 1000) 171 | end 172 | 173 | return M 174 | -------------------------------------------------------------------------------- /doc/arm64.txt: -------------------------------------------------------------------------------- 1 | *arm64.txt* arm64 assembly language reference manual 2 | 3 | +-+ +-+ +-+ +-+ +-+ 4 | |A| |R| |M| |6| |4| 5 | +-+ +-+ +-+ +-+ +-+ 6 | 7 | 8 | A Handy Reference Guide to ARM64 Assembly. 9 | Taken and adapted from this blog post: 10 | https://modexp.wordpress.com/2018/10/30/arm64-assembly/ 11 | ==================================================================== 12 | CONTENTS *ARM64Contents* 13 | 14 | 1. Registers ................ |ARMRegisters| 15 | 2. Conditions ............... |ARMConditions| 16 | 3. Data Types ............... |ARMDataTypes| 17 | 3. Credits .............. |JestCredits| 18 | 19 | ==================================================================== 20 | Section 1: Registers *ARMRegisters* 21 | 22 | | Name | Size | Description | 23 | |-------|---------|--------------------------------| 24 | | *Wn* | 32-bits | General purpose registers 0-31 | 25 | | *Xn* | 64-bits | General purpose registers 0-31 | 26 | | *WZR* | 32-bits | Zero register | 27 | | *XZR* | 64-bits | Zero register | 28 | | *SP* | 64-bits | Stack pointer | 29 | 30 | Calling Convention *ARMCallingConvention* 31 | 32 | Note: The following is applicable to Debian Linux. You may freely use x0-x18, but remember that if 33 | calling subroutines, they may use them as well. 34 | 35 | | Register | Description | 36 | |-------------|----------------------------| 37 | | *X0 – X7* | arguments and return value | 38 | | *X8 – X18* | temporary registers | 39 | | *X19 – X28* | callee-saved registers | 40 | | *X29* | frame pointer | 41 | | *X30* | link register | 42 | | SP | stack pointer | 43 | 44 | Section 2: Conditions *ARMConditions* 45 | 46 | Condition Flags *ARMConditionFlags* 47 | 48 | ARM has a “process state” with condition flags that affect the behaviour of some instructions. 49 | Branch instructions can be used to change the flow of execution. Some of the data processing 50 | instructions allow setting the condition flags with the S suffix. e.g ANDS or ADDS. The flags are 51 | the Zero Flag (Z), the Carry Flag (C), the Negative Flag (N) and the is Overflow Flag (V). 52 | 53 | | Flag | Description | 54 | |------|---------------------------------------------------------------------------------------------------| 55 | | N | Bit 31. Set if the result of an operation is negative. Cleared if the result is positive or zero. | 56 | | Z | Bit 30. Set if the result of an operation is zero/equal. Cleared if non-zero/not equal. | 57 | | C | Bit 29. Set if an instruction results in a carry or overflow. Cleared if no carry. | 58 | | V | Bit 28. Set if an instruction results in an overflow. Cleared if no overflow. | 59 | 60 | 61 | Condition Codes *ARMConditionCodes* 62 | 63 | The A32 instruction set supports conditional execution for most of its operations. To improve 64 | performance, ARM removed support with A64. These conditional codes are now only effective with 65 | branch, select and compare instructions. This appears to be a disadvantage, but there are sufficient 66 | alternatives in the A64 set that are a distinct improvement. 67 | 68 | | Mnemonic | Description | Condition Flags | 69 | |----------|-------------------------------|---------------------------| 70 | | EQ | Equal | Z set | 71 | | NE | Not Equal | Z clear | 72 | | CS | or HS Carry Set | C set | 73 | | CC | or LO Carry Clear | C clear | 74 | | MI | Minus | N set | 75 | | PL | Plus, positive or zero | N clear | 76 | | VS | Overflow | V set | 77 | | VC | No overflow | V clear | 78 | | HI | Unsigned Higher than or equal | C set and Z clear | 79 | | LS | Unsigned Less than or equal | C clear or Z set | 80 | | GE | Signed Greater than or Equal | N and V the same | 81 | | LT | Signed Less than | N and V differ | 82 | | GT | Signed Greater than | Z clear, N and V the same | 83 | | LE | Signed Less than or Equal | J Z set, N and V differ | 84 | | AL | Always. Normally omitted. | Any J | 85 | 86 | 87 | Section 3: Data Types *ARMDataTypes* 88 | 89 | | Type | Size | 90 | |------------|----------| 91 | | Byte | 8 bits | 92 | | Half-word | 16 bits | 93 | | Word | 32 bits | 94 | | Doubleword | 64 bits | 95 | | Quadword | 128 bits | 96 | -------------------------------------------------------------------------------- /lua/tt/format.lua: -------------------------------------------------------------------------------- 1 | local node = require("tt.nvim_utils").nodejs 2 | local constants = require("tt.constants") 3 | 4 | local prettierBin 5 | local biomeBin 6 | local formatters 7 | 8 | local formatters_by_ft = { 9 | javascript = { "prettier", "biome" }, 10 | javascriptreact = { "prettier", "biome" }, 11 | typescript = { "prettier_ts", "biome" }, 12 | typescriptreact = { "prettier_ts", "biome" }, 13 | go = "gofmt", 14 | c = "clangfmt", 15 | cpp = "clangfmt", 16 | objcpp = "clangfmt", 17 | css = "prettier_css", 18 | scss = { "prettier_css", "stylint" }, 19 | rust = "rustfmt", 20 | astro = "prettier_astro", 21 | html = "prettier_html", 22 | json = "prettier_json", 23 | lua = "stylua", 24 | fish = "fish_indent", 25 | -- yaml = "yamlfmt", 26 | } 27 | 28 | local function biomeCheck() 29 | return vim.fs.root(0, constants.biome_roots) 30 | end 31 | 32 | local function prettierCheck() 33 | return vim.fs.root(0, constants.prettier_roots) 34 | end 35 | 36 | local function setup_formatters() 37 | if formatters then 38 | return 39 | end 40 | 41 | prettierBin = node.find_node_executable("prettier") 42 | biomeBin = node.find_node_executable("biome") 43 | 44 | local function makePrettierFormatter(parser) 45 | return { command = { prettierBin, "--parser", parser }, condition = prettierCheck } 46 | end 47 | 48 | formatters = { 49 | -- remove_whitepsace = { 50 | -- exec = function() 51 | -- if 1 == vim.g.remove_whitespace then 52 | -- vim.nvim_exec("normal mz", false) 53 | -- vim.cmd("%s/\\s\\+$//ge") 54 | -- vim.nvim_exec("normal `z", false) 55 | -- end 56 | -- end, 57 | -- }, 58 | gofmt = { command = { "gofmt", "-s" } }, 59 | prettier = { command = { prettierBin }, condition = prettierCheck }, 60 | prettier_ts = makePrettierFormatter("typescript"), 61 | stylint = { command = { node.find_node_executable("stylelint"), "--fix" } }, 62 | biome = { command = { biomeBin, "format", "$FILENAME", "--write" }, condition = biomeCheck }, 63 | prettier_json = makePrettierFormatter("json"), 64 | prettier_html = makePrettierFormatter("html"), 65 | prettier_css = makePrettierFormatter("css"), 66 | prettier_astro = { command = { prettierBin, "--stdin-filepath", "$FILENAME" }, condition = prettierCheck }, 67 | stylua = { 68 | command = { "stylua", "-" }, 69 | }, 70 | rustfmt = { 71 | command = { "rustfmt", "$FILENAME", "--emit=stdout", "-q" }, 72 | }, 73 | clangfmt = { command = { "clang-format", "-assume-filename", "$FILENAME" } }, 74 | yamlfmt = { command = { "yamlfmt", "-in" } }, 75 | fish_indent = { command = { "fish_indent" } }, 76 | } 77 | end 78 | 79 | local function runFormat(buf, formatter) 80 | if vim.g.autoformat == false then 81 | return 82 | end 83 | local cmd = formatter.command 84 | if not cmd then 85 | return 86 | end 87 | 88 | local input = "" 89 | if vim.tbl_contains(cmd, "$FILENAME") then 90 | cmd = vim.tbl_map(function(v) 91 | if v == "$FILENAME" then 92 | return buf 93 | end 94 | return v 95 | end, cmd) 96 | end 97 | local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) 98 | input = table.concat(lines, "\n") 99 | 100 | local result = vim.system(cmd, { stdin = input }):wait() 101 | local exit_code = result.code 102 | 103 | if exit_code == 0 then 104 | local output_lines = vim.split(result.stdout, "\n") 105 | -- Remove trailing empty line if present 106 | if output_lines[#output_lines] == "" then 107 | table.remove(output_lines) 108 | end 109 | vim.api.nvim_buf_set_lines(0, 0, -1, false, output_lines) 110 | else 111 | vim.notify("Formatter failed: " .. (result.stderr or result.stdout or ""), vim.log.levels.ERROR) 112 | end 113 | end 114 | 115 | -- Format function 116 | local function format_buffer() 117 | setup_formatters() 118 | local filetype = vim.bo.filetype 119 | local formatterList = formatters_by_ft[filetype] 120 | 121 | local buf = vim.api.nvim_buf_get_name(0) 122 | if vim.islist(formatterList) then 123 | for _, formatter in pairs(formatterList) do 124 | local f = formatters[formatter] 125 | if f.condition ~= nil then 126 | if f.condition() then 127 | runFormat(buf, f) 128 | end 129 | else 130 | runFormat(buf, f) 131 | end 132 | end 133 | end 134 | if not formatters[formatterList] then 135 | return 136 | end 137 | runFormat(buf, formatters[formatterList]) 138 | end 139 | 140 | vim.api.nvim_create_autocmd("BufWritePre", { 141 | pattern = { "*" }, 142 | callback = format_buffer, 143 | }) 144 | 145 | vim.api.nvim_create_user_command("FormatInfo", function() 146 | setup_formatters() 147 | local filetype = vim.bo.filetype 148 | local formatterList = formatters_by_ft[filetype] 149 | local formattersToRun = {} 150 | 151 | if vim.islist(formatterList) then 152 | for _, formatter in pairs(formatterList) do 153 | local f = formatters[formatter] 154 | if f.condition ~= nil then 155 | if f.condition() then 156 | table.insert(formattersToRun, formatter) 157 | end 158 | end 159 | end 160 | log("Running > " .. vim.iter(formattersToRun):join(",")) 161 | for _, formatter in pairs(formattersToRun) do 162 | local f = formatters[formatter] 163 | log(" Command: " .. vim.iter(f.command):join(" ")) 164 | end 165 | return 166 | end 167 | if not formatters[formatterList] then 168 | log("No formatters found with: " .. formatterList) 169 | return 170 | else 171 | table.insert(formattersToRun, formatterList) 172 | end 173 | log("Running > " .. vim.iter(formattersToRun):join(",")) 174 | for _, formatter in pairs(formattersToRun) do 175 | local f = formatters[formatter] 176 | log(" Command: " .. vim.iter(f.command):join(" ")) 177 | end 178 | end, {}) 179 | -------------------------------------------------------------------------------- /colors/tropics.vim: -------------------------------------------------------------------------------- 1 | highlight Normal guifg=#F0ECFE guibg=#000000 guisp=NONE blend=NONE gui=NONE 2 | highlight! link NormalNC Normal 3 | highlight Bold guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=bold 4 | highlight Callout guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 5 | highlight ColorColumn guifg=NONE guibg=#20222D guisp=NONE blend=NONE gui=NONE 6 | highlight Comment guifg=#F8BD96 guibg=NONE guisp=NONE blend=NONE gui=italic 7 | highlight! link TSComment Comment 8 | highlight Conceal guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 9 | highlight! link EndOfBuffer Conceal 10 | highlight! link NonText Conceal 11 | highlight! link SpecialKey Conceal 12 | highlight! link Whitespace Conceal 13 | highlight Constant guifg=#98CEFB guibg=NONE guisp=NONE blend=NONE gui=NONE 14 | highlight CursorColumn guifg=NONE guibg=#20222D guisp=NONE blend=NONE gui=NONE 15 | highlight CursorLine guifg=NONE guibg=#20222D guisp=NONE blend=NONE gui=NONE 16 | highlight CursorLineNr guifg=#6D7083 guibg=#20222D guisp=NONE blend=NONE gui=NONE 17 | highlight DiffAdd guifg=#89DCEB guibg=#0B3941 guisp=NONE blend=NONE gui=NONE 18 | highlight DiffChange guifg=#FAE3B2 guibg=#272935 guisp=NONE blend=NONE gui=NONE 19 | highlight DiffDelete guifg=#DDB5F2 guibg=#340D4A guisp=NONE blend=NONE gui=NONE 20 | highlight DiffText guifg=#C7C9FF guibg=#00035C guisp=NONE blend=NONE gui=NONE 21 | highlight Directory guifg=#98CEFB guibg=NONE guisp=NONE blend=NONE gui=NONE 22 | highlight ErrorMsg guifg=#F28DAB guibg=NONE guisp=NONE blend=NONE gui=NONE 23 | highlight! link LspDiagnosticsDefaultError ErrorMsg 24 | highlight! link LspDiagnosticsSignError ErrorMsg 25 | highlight ExtraWhitespace guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 26 | highlight FloatBorder guifg=#FAE3B2 guibg=#20222D guisp=NONE blend=NONE gui=NONE 27 | highlight FoldColumn guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 28 | highlight Folded guifg=#6D7083 guibg=#272935 guisp=NONE blend=NONE gui=NONE 29 | highlight Function guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 30 | highlight GitLens guifg=#DDB5F2 guibg=#20222D guisp=NONE blend=NONE gui=NONE 31 | highlight Identifier guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 32 | highlight IncSearch guifg=#000000 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 33 | highlight Italic guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=italic 34 | highlight Keyword guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 35 | highlight LineNr guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 36 | highlight LspDiagnosticsDefaultHint guifg=#AAE9B3 guibg=NONE guisp=NONE blend=NONE gui=NONE 37 | highlight LspDiagnosticsDefaultInformation guifg=#AAE9B3 guibg=NONE guisp=NONE blend=NONE gui=NONE 38 | highlight LspDiagnosticsSignHint guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 39 | highlight LspDiagnosticsSignInformation guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 40 | highlight LspDiagnosticsUnderlineError guifg=#F28DAB guibg=NONE guisp=NONE blend=NONE gui=underline 41 | highlight MatchParen guifg=#F0ECFE guibg=#2E313D guisp=NONE blend=NONE gui=bold 42 | highlight ModeMsg guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 43 | highlight MoreMsg guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 44 | highlight NormalFloat guifg=#B6B5C9 guibg=#000000 guisp=NONE blend=NONE gui=NONE 45 | highlight Number guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 46 | highlight Pmenu guifg=#F0ECFE guibg=#272935 guisp=NONE blend=NONE gui=NONE 47 | highlight! link TreesitterContext Pmenu 48 | highlight PmenuSbar guifg=#272935 guibg=#272935 guisp=NONE blend=NONE gui=NONE 49 | highlight PmenuSel guifg=#000000 guibg=#98CEFB guisp=NONE blend=NONE gui=NONE 50 | highlight PmenuThumb guifg=#20222D guibg=#20222D guisp=NONE blend=NONE gui=NONE 51 | highlight PreProc guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=bold 52 | highlight! link Define PreProc 53 | highlight! link Include PreProc 54 | highlight! link Macro PreProc 55 | highlight! link PreCondit PreProc 56 | highlight Question guifg=#B5E8E1 guibg=NONE guisp=NONE blend=NONE gui=NONE 57 | highlight QuickFixLine guifg=NONE guibg=#3C3F4E guisp=NONE blend=NONE gui=NONE 58 | highlight Search guifg=#000000 guibg=#98CEFB guisp=NONE blend=NONE gui=NONE 59 | highlight SignColumn guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 60 | highlight Special guifg=#F5C2E7 guibg=NONE guisp=NONE blend=NONE gui=NONE 61 | highlight SpecialComment guifg=#F0ECFE guibg=NONE guisp=NONE blend=NONE gui=bold 62 | highlight Statement guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 63 | highlight StatusLine guifg=#AAE9B3 guibg=NONE guisp=NONE blend=NONE gui=NONE 64 | highlight! link TabLineSel StatusLine 65 | highlight StatusLineNC guifg=#5B5F71 guibg=#272935 guisp=NONE blend=NONE gui=NONE 66 | highlight! link TabLine StatusLineNC 67 | highlight! link TabLineFill StatusLineNC 68 | highlight String guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 69 | highlight TSFunction guifg=#DFAAB4 guibg=NONE guisp=NONE blend=NONE gui=NONE 70 | highlight! link TSMethod TSFunction 71 | highlight TSOperator guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 72 | highlight TSPunctBracket guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 73 | highlight TSPunctDelimiter guifg=#5B5F71 guibg=NONE guisp=NONE blend=NONE gui=NONE 74 | highlight! link TSTagDelimiter TSPunctDelimiter 75 | highlight TSTag guifg=#C7C9FF guibg=NONE guisp=NONE blend=NONE gui=NONE 76 | highlight TSTypeBuiltin guifg=#BCBDE6 guibg=NONE guisp=NONE blend=NONE gui=NONE 77 | highlight Title guifg=#98CEFB guibg=NONE guisp=NONE blend=NONE gui=NONE 78 | highlight Todo guifg=#000000 guibg=#98CEFB guisp=NONE blend=NONE gui=NONE 79 | highlight! link TSDanger Todo 80 | highlight Type guifg=#7499BE guibg=NONE guisp=NONE blend=NONE gui=NONE 81 | highlight! link TSType Type 82 | highlight Underlined guifg=#C7C9FF guibg=NONE guisp=NONE blend=NONE gui=underline 83 | highlight VertSplit guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 84 | highlight Visual guifg=NONE guibg=#3C3F4E guisp=NONE blend=NONE gui=NONE 85 | highlight! link VisualNOS Visual 86 | highlight WarningMsg guifg=#FAE3B2 guibg=NONE guisp=NONE blend=NONE gui=NONE 87 | highlight! link LspDiagnosticsDefaultWarning WarningMsg 88 | highlight! link LspDiagnosticsSignWarning WarningMsg 89 | highlight WildMenu guifg=#000000 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 90 | highlight htmlTag guifg=#89DCEB guibg=NONE guisp=NONE blend=NONE gui=NONE 91 | highlight tsxIntrinsicTagName guifg=#89DCEB guibg=NONE guisp=NONE blend=NONE gui=NONE 92 | highlight tsxTagName guifg=#89DCEB guibg=NONE guisp=NONE blend=NONE gui=NONE 93 | -------------------------------------------------------------------------------- /colors/tropics-light.vim: -------------------------------------------------------------------------------- 1 | highlight Normal guifg=#000000 guibg=#F0ECFE guisp=NONE blend=NONE gui=NONE 2 | highlight! link DiffChange Normal 3 | highlight! link NormalNC Normal 4 | highlight Bold guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=bold 5 | highlight Callout guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 6 | highlight ColorColumn guifg=NONE guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 7 | highlight Comment guifg=#0010F0 guibg=NONE guisp=NONE blend=NONE gui=bold,italic 8 | highlight! link TSComment Comment 9 | highlight Conceal guifg=#265664 guibg=NONE guisp=NONE blend=NONE gui=NONE 10 | highlight! link EndOfBuffer Conceal 11 | highlight! link NonText Conceal 12 | highlight! link SpecialKey Conceal 13 | highlight! link Whitespace Conceal 14 | highlight Conditional guifg=#945153 guibg=NONE guisp=NONE blend=NONE gui=NONE 15 | highlight Constant guifg=#714A78 guibg=NONE guisp=NONE blend=NONE gui=bold 16 | highlight Cursor guifg=#F0ECFE guibg=#945153 guisp=NONE blend=NONE gui=NONE 17 | highlight! link lCursor Cursor 18 | highlight CursorColumn guifg=NONE guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 19 | highlight CursorLine guifg=#272935 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 20 | highlight CursorLineNr guifg=#272935 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 21 | highlight DiagnosticHint guifg=#104F6A guibg=NONE guisp=NONE blend=NONE gui=NONE 22 | highlight DiffAdd guifg=#FFFFFF guibg=#1C8092 guisp=NONE blend=NONE gui=bold,italic 23 | highlight DiffDelete guifg=#FFFFFF guibg=#5A4A78 guisp=NONE blend=NONE gui=bold,italic 24 | highlight DiffText guifg=#F0ECFE guibg=#0010F0 guisp=NONE blend=NONE gui=NONE 25 | highlight Directory guifg=#0010F0 guibg=NONE guisp=NONE blend=NONE gui=NONE 26 | highlight ErrorMsg guifg=#000000 guibg=#EF152F guisp=NONE blend=NONE gui=NONE 27 | highlight! link LspDiagnosticsDefaultError ErrorMsg 28 | highlight! link LspDiagnosticsSignError ErrorMsg 29 | highlight ExtraWhitespace guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 30 | highlight FloatBorder guifg=#104F6A guibg=#F0ECFE guisp=NONE blend=NONE gui=NONE 31 | highlight FoldColumn guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 32 | highlight Folded guifg=#272935 guibg=#6D7083 guisp=NONE blend=NONE gui=NONE 33 | highlight Function guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 34 | highlight GitLens guifg=#333A57 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 35 | highlight Identifier guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 36 | highlight IncSearch guifg=#F0ECFE guibg=#20222D guisp=NONE blend=NONE gui=NONE 37 | highlight Italic guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=italic 38 | highlight Keyword guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=bold 39 | highlight! link TSKeyword Keyword 40 | highlight LineNr guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 41 | highlight LspDiagnosticsDefaultHint guifg=#104F6A guibg=NONE guisp=NONE blend=NONE gui=NONE 42 | highlight LspDiagnosticsDefaultInformation guifg=#104F6A guibg=NONE guisp=NONE blend=NONE gui=NONE 43 | highlight LspDiagnosticsFloatingHint guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 44 | highlight LspDiagnosticsFloatingInformation guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 45 | highlight LspDiagnosticsSignHint guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 46 | highlight LspDiagnosticsSignInformation guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 47 | highlight LspDiagnosticsUnderlineError guifg=#EF152F guibg=NONE guisp=NONE blend=NONE gui=underline 48 | highlight LspReferenceRead guifg=#333A57 guibg=NONE guisp=NONE blend=NONE gui=NONE 49 | highlight LspReferenceText guifg=#333A57 guibg=NONE guisp=NONE blend=NONE gui=NONE 50 | highlight LspReferenceWrite guifg=#333A57 guibg=NONE guisp=NONE blend=NONE gui=NONE 51 | highlight MatchParen guifg=#F0ECFE guibg=#0010F0 guisp=NONE blend=NONE gui=NONE 52 | highlight ModeMsg guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 53 | highlight MoreMsg guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 54 | highlight NormalFloat guifg=#20222D guibg=#F0ECFE guisp=NONE blend=NONE gui=NONE 55 | highlight Number guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 56 | highlight Pmenu guifg=#000000 guibg=#6D7083 guisp=NONE blend=NONE gui=NONE 57 | highlight PmenuSbar guifg=#6D7083 guibg=#6D7083 guisp=NONE blend=NONE gui=NONE 58 | highlight PmenuSel guifg=#F0ECFE guibg=#0010F0 guisp=NONE blend=NONE gui=NONE 59 | highlight PmenuThumb guifg=#B6B5C9 guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 60 | highlight PreProc guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 61 | highlight! link Define PreProc 62 | highlight! link Include PreProc 63 | highlight! link Macro PreProc 64 | highlight! link PreCondit PreProc 65 | highlight Question guifg=#32625B guibg=NONE guisp=NONE blend=NONE gui=NONE 66 | highlight QuickFixLine guifg=NONE guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 67 | highlight Search guifg=#F0ECFE guibg=#0010F0 guisp=NONE blend=NONE gui=NONE 68 | highlight SignColumn guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 69 | highlight Special guifg=#000000 guibg=NONE guisp=NONE blend=NONE gui=bold 70 | highlight SpecialComment guifg=#000000 guibg=NONE guisp=NONE blend=NONE gui=bold 71 | highlight Statement guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE 72 | highlight StatusLine guifg=#32625B guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 73 | highlight! link TabLineSel StatusLine 74 | highlight StatusLineNC guifg=#2E313D guibg=#6D7083 guisp=NONE blend=NONE gui=NONE 75 | highlight! link TabLine StatusLineNC 76 | highlight! link TabLineFill StatusLineNC 77 | highlight String guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=italic 78 | highlight! link TSString String 79 | highlight TSFunction guifg=#000000 guibg=NONE guisp=NONE blend=NONE gui=bold 80 | highlight! link TSMethod TSFunction 81 | highlight TSOperator guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 82 | highlight TSPunctBracket guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 83 | highlight TSPunctDelimiter guifg=#2E313D guibg=NONE guisp=NONE blend=NONE gui=NONE 84 | highlight! link TSTagDelimiter TSPunctDelimiter 85 | highlight TSTag guifg=#166674 guibg=NONE guisp=NONE blend=NONE gui=NONE 86 | highlight TSTypeBuiltin guifg=#000000 guibg=NONE guisp=NONE blend=NONE gui=NONE 87 | highlight Title guifg=#0010F0 guibg=NONE guisp=NONE blend=NONE gui=NONE 88 | highlight Todo guifg=#F0ECFE guibg=#0010F0 guisp=NONE blend=NONE gui=NONE 89 | highlight! link TSDanger Todo 90 | highlight TreesitterContext guifg=#0F257B guibg=#B6B5C9 guisp=NONE blend=NONE gui=NONE 91 | highlight Type guifg=#272D72 guibg=NONE guisp=NONE blend=NONE gui=NONE 92 | highlight! link TSType Type 93 | highlight Underlined guifg=#5A4A78 guibg=NONE guisp=NONE blend=NONE gui=underline 94 | highlight VertSplit guifg=#3C3F4E guibg=NONE guisp=NONE blend=NONE gui=NONE 95 | highlight Visual guifg=#F0ECFE guibg=#48676A guisp=NONE blend=NONE gui=NONE 96 | highlight! link VisualNOS Visual 97 | highlight WarningMsg guifg=#8E5E15 guibg=NONE guisp=NONE blend=NONE gui=NONE 98 | highlight! link LspDiagnosticsDefaultWarning WarningMsg 99 | highlight! link LspDiagnosticsSignWarning WarningMsg 100 | highlight WildMenu guifg=#F0ECFE guibg=#20222D guisp=NONE blend=NONE gui=NONE 101 | highlight WinBar guifg=#104F6A guibg=#F0ECFE guisp=NONE blend=NONE gui=bold 102 | highlight htmlTag guifg=#166674 guibg=NONE guisp=NONE blend=NONE gui=NONE 103 | highlight tsxIntrinsicTagName guifg=#166674 guibg=NONE guisp=NONE blend=NONE gui=NONE 104 | highlight tsxTagName guifg=#166674 guibg=NONE guisp=NONE blend=NONE gui=NONE 105 | -------------------------------------------------------------------------------- /syntax/markdown.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Markdown 3 | " Maintainer: Ben Williams 4 | " URL: http://plasticboy.com/markdown-vim-mode/ 5 | " Remark: Uses HTML syntax file 6 | " TODO: Handle stuff contained within stuff (e.g. headings within blockquotes) 7 | 8 | 9 | " Read the HTML syntax to start with 10 | runtime! syntax/html.vim 11 | 12 | if exists('b:current_syntax') 13 | unlet b:current_syntax 14 | endif 15 | 16 | if exists("b:current_syntax") 17 | finish 18 | endif 19 | 20 | " don't use standard HiLink, it will not work with included syntax files 21 | command! -nargs=+ HtmlHiLink hi def link 22 | 23 | syn spell toplevel 24 | syn case ignore 25 | syn sync linebreaks=1 26 | 27 | let s:conceal = '' 28 | let s:concealends = '' 29 | let s:concealcode = '' 30 | let s:conceal = ' conceal' 31 | let s:concealends = ' concealends' 32 | let s:concealcode = ' concealends' 33 | 34 | " additions to HTML groups 35 | if get(g:, 'vim_markdown_emphasis_multiline', 1) 36 | let s:oneline = '' 37 | else 38 | let s:oneline = ' oneline' 39 | endif 40 | syn region mkdItalic matchgroup=mkdItalic start="\%(\*\|_\)" end="\%(\*\|_\)" 41 | syn region mkdBold matchgroup=mkdBold start="\%(\*\*\|__\)" end="\%(\*\*\|__\)" 42 | syn region mkdBoldItalic matchgroup=mkdBoldItalic start="\%(\*\*\*\|___\)" end="\%(\*\*\*\|___\)" 43 | execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs\*\ze[^\\\*\t ]\%(\%([^*]\|\\\*\|\n\)*[^\\\*\t ]\)\?\*\_W" end="[^\\\*\t ]\zs\*\ze\_W" keepend contains=@Spell' . s:oneline . s:concealends 44 | execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs_\ze[^\\_\t ]" end="[^\\_\t ]\zs_\ze\_W" keepend contains=@Spell' . s:oneline . s:concealends 45 | execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs\*\*\ze\S" end="\S\zs\*\*" keepend contains=@Spell' . s:oneline . s:concealends 46 | execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs__\ze\S" end="\S\zs__" keepend contains=@Spell' . s:oneline . s:concealends 47 | execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs\*\*\*\ze\S" end="\S\zs\*\*\*" keepend contains=@Spell' . s:oneline . s:concealends 48 | execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs___\ze\S" end="\S\zs___" keepend contains=@Spell' . s:oneline . s:concealends 49 | 50 | " [link](URL) | [link][id] | [link][] | ![image](URL) 51 | syn region mkdFootnotes matchgroup=mkdDelimiter start="\[^" end="\]" 52 | execute 'syn region mkdID matchgroup=mkdDelimiter start="\[" end="\]" contained oneline' . s:conceal 53 | execute 'syn region mkdURL matchgroup=mkdDelimiter start="(" end=")" contained oneline' . s:conceal 54 | execute 'syn region mkdLink matchgroup=mkdDelimiter start="\\\@ ]*>" end=">" 66 | 67 | " Link definitions: [id]: URL (Optional Title) 68 | syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[\^\@!" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite 69 | syn region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline 70 | syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained 71 | syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained 72 | syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained 73 | 74 | "HTML headings 75 | syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=mkdLink,mkdInlineURL,@Spell 76 | syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=mkdLink,mkdInlineURL,@Spell 77 | syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=mkdLink,mkdInlineURL,@Spell 78 | syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=mkdLink,mkdInlineURL,@Spell 79 | syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=mkdLink,mkdInlineURL,@Spell 80 | syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=mkdLink,mkdInlineURL,@Spell 81 | syn match htmlH1 /^.\+\n=\+$/ contains=mkdLink,mkdInlineURL,@Spell 82 | syn match htmlH2 /^.\+\n-\+$/ contains=mkdLink,mkdInlineURL,@Spell 83 | 84 | "define Markdown groups 85 | syn match mkdLineBreak / \+$/ 86 | syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell 87 | execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@]*\\\@" end=""' . s:concealcode 93 | execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="]*\\\@" end=""' . s:concealcode 94 | syn region mkdFootnote start="\[^" end="\]" 95 | syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/ 96 | syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ 97 | syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained 98 | syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\ze\s\+/ contained 99 | syn region mkdListItemLine start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" oneline contains=@mkdNonListItem,mkdListItem,@Spell 100 | syn region mkdNonListItemBlock start="\(\%^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@!\|\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!\)" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell 101 | syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*\(\*\|\s\)*$/ 102 | syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-\(-\|\s\)*$/ 103 | syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/ 104 | 105 | " YAML frontmatter 106 | if get(g:, 'vim_markdown_frontmatter', 0) 107 | syn include @yamlTop syntax/yaml.vim 108 | syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|\.\.\.\)$" contains=@yamlTop keepend 109 | unlet! b:current_syntax 110 | endif 111 | 112 | if get(g:, 'vim_markdown_toml_frontmatter', 0) 113 | try 114 | syn include @tomlTop syntax/toml.vim 115 | syn region Comment matchgroup=mkdDelimiter start="\%^+++$" end="^+++$" transparent contains=@tomlTop keepend 116 | unlet! b:current_syntax 117 | catch /E484/ 118 | syn region Comment matchgroup=mkdDelimiter start="\%^+++$" end="^+++$" 119 | endtry 120 | endif 121 | 122 | if get(g:, 'vim_markdown_json_frontmatter', 0) 123 | try 124 | syn include @jsonTop syntax/json.vim 125 | syn region Comment matchgroup=mkdDelimiter start="\%^{$" end="^}$" contains=@jsonTop keepend 126 | unlet! b:current_syntax 127 | catch /E484/ 128 | syn region Comment matchgroup=mkdDelimiter start="\%^{$" end="^}$" 129 | endtry 130 | endif 131 | 132 | syn include @tex syntax/tex.vim 133 | syn region mkdMath start="\\\@ 4 | " Maintainer: Maxence Weynans 5 | " Website: https://github.com/vim/colorschemes 6 | " License: Vim License (see `:help license`)` 7 | " Last Change: 2025 Jan 07 8 | 9 | " Generated by Colortemplate v2.2.3 10 | 11 | " hi clear 12 | source $VIMRUNTIME/colors/vim.lua " Nvim: revert to Vim default color scheme 13 | let g:colors_name = 'quiet' 14 | 15 | let s:t_Co = &t_Co 16 | 17 | hi! link Added Normal 18 | hi! link Changed Normal 19 | hi! link Removed Normal 20 | hi! link Terminal Normal 21 | hi! link StatusLineTerm StatusLine 22 | hi! link StatusLineTermNC StatusLineNC 23 | hi! link MessageWindow Pmenu 24 | hi! link PopupNotification Todo 25 | hi! link PopupSelected PmenuSel 26 | hi! link Boolean Constant 27 | hi! link Character Constant 28 | hi! link Conditional Statement 29 | hi! link Define PreProc 30 | hi! link Debug Special 31 | hi! link Delimiter Special 32 | hi! link Exception Statement 33 | hi! link Float Constant 34 | hi! link Function Identifier 35 | hi! link Include PreProc 36 | hi! link Keyword Statement 37 | hi! link Label Statement 38 | hi! link Macro PreProc 39 | hi! link Number Constant 40 | hi! link Operator Statement 41 | hi! link PreCondit PreProc 42 | hi! link Repeat Statement 43 | hi! link SpecialChar Special 44 | hi! link SpecialComment Special 45 | hi! link StorageClass Type 46 | hi! link String Constant 47 | hi! link Structure Type 48 | hi! link Tag Special 49 | hi! link Typedef Type 50 | hi! link lCursor Cursor 51 | hi! link debugBreakpoint ModeMsg 52 | hi! link debugPC CursorLine 53 | hi! link DiagnosticUnnecessary WildMenu 54 | 55 | 56 | if &background ==# 'dark' 57 | if (has('termguicolors') && &termguicolors) || has('gui_running') 58 | let g:terminal_ansi_colors = ['#282828', '#d7005f', '#00af5f', '#d78700', '#0087d7', '#d787d7', '#00afaf', '#fffff', '#707070', '#ff005f', '#00d75f', '#33ff33', '#5fafff', '#ff87ff', '#00d7d7', '#ffffff'] 59 | " Nvim uses g:terminal_color_{0-15} instead 60 | for i in range(g:terminal_ansi_colors->len()) 61 | let g:terminal_color_{i} = g:terminal_ansi_colors[i] 62 | endfor 63 | endif 64 | hi Normal guifg=#fffff guibg=#000000 gui=NONE cterm=NONE 65 | hi ColorColumn guifg=NONE guibg=#1c1c1c gui=NONE cterm=NONE 66 | hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE 67 | hi CurSearch guifg=#ff5fff guibg=#282828 gui=reverse cterm=reverse 68 | hi Cursor guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse 69 | hi CursorColumn guifg=NONE guibg=#303030 gui=NONE cterm=NONE 70 | hi CursorLine guifg=NONE guibg=#303030 gui=NONE cterm=NONE 71 | hi CursorLineNr guifg=#fffff guibg=#303030 gui=NONE cterm=NONE 72 | hi DiffAdd guifg=#00af00 guibg=#282828 gui=reverse cterm=reverse 73 | hi DiffChange guifg=#87afd7 guibg=#282828 gui=reverse cterm=reverse 74 | hi DiffDelete guifg=#d75f5f guibg=#282828 gui=reverse cterm=reverse 75 | hi DiffText guifg=#d787d7 guibg=#282828 gui=reverse cterm=reverse 76 | hi Directory guifg=#fffff guibg=NONE gui=NONE cterm=NONE 77 | hi EndOfBuffer guifg=#707070 guibg=NONE gui=NONE cterm=NONE 78 | hi ErrorMsg guifg=#fffff guibg=#282828 gui=reverse cterm=reverse 79 | hi FoldColumn guifg=#707070 guibg=NONE gui=NONE cterm=NONE 80 | hi Folded guifg=#707070 guibg=#282828 gui=NONE cterm=NONE 81 | hi IncSearch guifg=#33ff33 guibg=#282828 gui=reverse cterm=reverse 82 | hi LineNr guifg=#585858 guibg=NONE gui=NONE cterm=NONE 83 | hi MatchParen guifg=#ff00af guibg=NONE gui=bold cterm=bold 84 | hi ModeMsg guifg=#fffff guibg=NONE gui=bold cterm=bold 85 | hi MoreMsg guifg=#fffff guibg=NONE gui=NONE cterm=NONE 86 | hi NonText guifg=#707070 guibg=NONE gui=NONE cterm=NONE 87 | hi Pmenu guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 88 | hi PmenuMatch guifg=#d7005f guibg=#a8a8a8 gui=NONE cterm=NONE 89 | hi PmenuExtra guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 90 | hi PmenuKind guifg=#282828 guibg=#a8a8a8 gui=bold cterm=bold 91 | hi PmenuSbar guifg=#707070 guibg=#585858 gui=NONE cterm=NONE 92 | hi PmenuSel guifg=#282828 guibg=#fffff gui=NONE cterm=NONE 93 | hi PmenuMatchSel guifg=#d7005f guibg=#fffff gui=bold cterm=bold 94 | hi PmenuExtraSel guifg=#282828 guibg=#fffff gui=NONE cterm=NONE 95 | hi PmenuKindSel guifg=#282828 guibg=#fffff gui=bold cterm=bold 96 | hi PmenuThumb guifg=#fffff guibg=#fffff gui=NONE cterm=NONE 97 | hi Question guifg=#fffff guibg=NONE gui=NONE cterm=NONE 98 | hi QuickFixLine guifg=#ff5fff guibg=#282828 gui=reverse cterm=reverse 99 | hi Search guifg=#00afff guibg=#282828 gui=reverse cterm=reverse 100 | hi SignColumn guifg=#fffff guibg=NONE gui=NONE cterm=NONE 101 | hi SpecialKey guifg=#707070 guibg=NONE gui=bold cterm=bold 102 | hi SpellBad guifg=#d7005f guibg=NONE guisp=#d7005f gui=undercurl cterm=underline 103 | hi SpellCap guifg=#0087d7 guibg=NONE guisp=#0087d7 gui=undercurl cterm=underline 104 | hi SpellLocal guifg=#d787d7 guibg=NONE guisp=#d787d7 gui=undercurl cterm=underline 105 | hi SpellRare guifg=#00afaf guibg=NONE guisp=#00afaf gui=undercurl cterm=underline 106 | hi StatusLine guifg=#282828 guibg=#fffff gui=none cterm=none 107 | hi StatusLineNC guifg=#707070 guibg=#282828 gui=reverse cterm=reverse 108 | hi TabLine guifg=#707070 guibg=#282828 gui=reverse cterm=reverse 109 | hi TabLineFill guifg=#fffff guibg=NONE gui=NONE cterm=NONE 110 | hi TabLineSel guifg=#282828 guibg=#fffff gui=bold cterm=bold 111 | hi Title guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE 112 | hi VertSplit guifg=#707070 guibg=#282828 gui=NONE cterm=NONE 113 | hi Visual guifg=#0a3a0a guibg=#c8e8c8 gui=NONE cterm=NONE 114 | hi VisualNOS guifg=NONE guibg=#303030 gui=NONE cterm=NONE 115 | hi WarningMsg guifg=#fffff guibg=NONE gui=NONE cterm=NONE 116 | hi WildMenu guifg=#00afff guibg=#282828 gui=bold cterm=bold 117 | hi NormalFloat guifg=#fffff guibg=#1c1c1c gui=NONE cterm=NONE 118 | hi FloatBorder guifg=#707070 guibg=#1c1c1c gui=NONE cterm=NONE 119 | hi Comment guifg=#707070 guibg=NONE gui=NONE cterm=NONE 120 | hi Constant guifg=#fffff guibg=NONE gui=NONE cterm=NONE 121 | hi Error guifg=#ff005f guibg=#282828 gui=bold,reverse cterm=bold,reverse 122 | hi Identifier guifg=#fffff guibg=NONE gui=NONE cterm=NONE 123 | hi Ignore guifg=#fffff guibg=NONE gui=NONE cterm=NONE 124 | hi PreProc guifg=#fffff guibg=NONE gui=NONE cterm=NONE 125 | hi Special guifg=#fffff guibg=NONE gui=NONE cterm=NONE 126 | hi Statement guifg=#fffff guibg=NONE gui=NONE cterm=NONE 127 | hi Todo guifg=#00ffaf guibg=NONE gui=bold,reverse cterm=bold,reverse 128 | hi Type guifg=#fffff guibg=NONE gui=NONE cterm=NONE 129 | hi Underlined guifg=#fffff guibg=NONE gui=underline cterm=underline 130 | hi CursorIM guifg=#282828 guibg=#afff00 gui=NONE cterm=NONE 131 | hi ToolbarLine guifg=NONE guibg=#282828 gui=NONE cterm=NONE 132 | hi ToolbarButton guifg=#fffff guibg=#282828 gui=bold cterm=bold 133 | else 134 | " Light background 135 | if (has('termguicolors') && &termguicolors) || has('gui_running') 136 | let g:terminal_ansi_colors = ['#282828', '#af0000', '#005f00', '#af5f00', '#005faf', '#870087', '#008787', '#d7d7d7', '#626262', '#d70000', '#008700', '#d78700', '#0087d7', '#af00af', '#00afaf', '#ffffff'] 137 | " Nvim uses g:terminal_color_{0-15} instead 138 | for i in range(g:terminal_ansi_colors->len()) 139 | let g:terminal_color_{i} = g:terminal_ansi_colors[i] 140 | endfor 141 | endif 142 | hi Normal guifg=#282828 guibg=#d7d7d7 gui=NONE cterm=NONE 143 | hi ColorColumn guifg=NONE guibg=#e4e4e4 gui=NONE cterm=NONE 144 | hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE 145 | hi CurSearch guifg=#ff5fff guibg=#282828 gui=reverse cterm=reverse 146 | hi Cursor guifg=#eeeeee guibg=#282828 gui=NONE cterm=NONE 147 | hi CursorColumn guifg=NONE guibg=#d0d0d0 gui=NONE cterm=NONE 148 | hi CursorLine guifg=NONE guibg=#d0d0d0 gui=NONE cterm=NONE 149 | hi CursorLineNr guifg=#282828 guibg=#eeeeee gui=NONE cterm=NONE 150 | hi DiffAdd guifg=#005f00 guibg=#c8e6c9 gui=NONE cterm=NONE 151 | hi DiffChange guifg=#005faf guibg=#bbdefb gui=NONE cterm=NONE 152 | hi DiffDelete guifg=#af0000 guibg=#ffcdd2 gui=NONE cterm=NONE 153 | hi DiffText guifg=#4a148c guibg=#e1bee7 gui=NONE cterm=NONE 154 | hi Directory guifg=#282828 guibg=NONE gui=NONE cterm=NONE 155 | hi EndOfBuffer guifg=#626262 guibg=NONE gui=NONE cterm=NONE 156 | hi ErrorMsg guifg=#282828 guibg=#d7d7d7 gui=reverse cterm=reverse 157 | hi FoldColumn guifg=#626262 guibg=NONE gui=NONE cterm=NONE 158 | hi Folded guifg=#626262 guibg=#d7d7d7 gui=NONE cterm=NONE 159 | hi IncSearch guifg=#d78700 guibg=#fff8e1 gui=NONE cterm=NONE 160 | hi LineNr guifg=#a8a8a8 guibg=NONE gui=NONE cterm=NONE 161 | hi MatchParen guifg=#af0000 guibg=#ffcdd2 gui=bold cterm=bold 162 | hi ModeMsg guifg=#282828 guibg=NONE gui=bold cterm=bold 163 | hi MoreMsg guifg=#282828 guibg=NONE gui=NONE cterm=NONE 164 | hi NonText guifg=#626262 guibg=NONE gui=NONE cterm=NONE 165 | hi Pmenu guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 166 | hi PmenuMatch guifg=#d70000 guibg=#a8a8a8 gui=NONE cterm=NONE 167 | hi PmenuExtra guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 168 | hi PmenuKind guifg=#282828 guibg=#a8a8a8 gui=bold cterm=bold 169 | hi PmenuSbar guifg=#282828 guibg=#e4e4e4 gui=NONE cterm=NONE 170 | hi PmenuSel guifg=#d7d7d7 guibg=#282828 gui=NONE cterm=NONE 171 | hi PmenuMatchSel guifg=#d70000 guibg=#282828 gui=bold cterm=bold 172 | hi PmenuExtraSel guifg=#d7d7d7 guibg=#282828 gui=NONE cterm=NONE 173 | hi PmenuKindSel guifg=#d7d7d7 guibg=#282828 gui=bold cterm=bold 174 | hi PmenuThumb guifg=#282828 guibg=#282828 gui=NONE cterm=NONE 175 | hi Question guifg=#282828 guibg=NONE gui=NONE cterm=NONE 176 | hi QuickFixLine guifg=#af0000 guibg=#ffcdd2 gui=NONE cterm=NONE 177 | hi Search guifg=#005faf guibg=#e3f2fd gui=NONE cterm=NONE 178 | hi SignColumn guifg=#282828 guibg=NONE gui=NONE cterm=NONE 179 | hi SpecialKey guifg=#626262 guibg=NONE gui=bold cterm=bold 180 | hi SpellBad guifg=#af0000 guibg=#d7d7d7 guisp=#af0000 gui=undercurl cterm=underline 181 | hi SpellCap guifg=#005faf guibg=#d7d7d7 guisp=#005faf gui=undercurl cterm=underline 182 | hi SpellLocal guifg=#870087 guibg=#d7d7d7 guisp=#870087 gui=undercurl cterm=underline 183 | hi SpellRare guifg=#008787 guibg=#d7d7d7 guisp=#008787 gui=undercurl cterm=underline 184 | hi StatusLine guifg=#eeeeee guibg=#282828 gui=bold cterm=bold 185 | hi StatusLineNC guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 186 | hi TabLine guifg=#282828 guibg=#a8a8a8 gui=NONE cterm=NONE 187 | hi TabLineFill guifg=#282828 guibg=#d7d7d7 gui=NONE cterm=NONE 188 | hi TabLineSel guifg=#eeeeee guibg=#282828 gui=bold cterm=bold 189 | hi Title guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE 190 | hi VertSplit guifg=#626262 guibg=#d7d7d7 gui=NONE cterm=NONE 191 | hi Visual guifg=#005f87 guibg=#c8e3f0 gui=NONE cterm=NONE 192 | hi VisualNOS guifg=NONE guibg=#eeeeee gui=NONE cterm=NONE 193 | hi WarningMsg guifg=#282828 guibg=NONE gui=NONE cterm=NONE 194 | hi WildMenu guifg=#282828 guibg=#eeeeee gui=bold cterm=bold 195 | hi NormalFloat guifg=#282828 guibg=#f0f0f0 gui=NONE cterm=NONE 196 | hi FloatBorder guifg=#a8a8a8 guibg=#f0f0f0 gui=NONE cterm=NONE 197 | hi Comment guifg=#0c2919 guibg=#a8d4c3 gui=NONE cterm=NONE 198 | hi Constant guifg=#282828 guibg=NONE gui=NONE cterm=NONE 199 | hi Error guifg=#af0000 guibg=#ffcdd2 gui=bold cterm=bold 200 | hi Identifier guifg=#282828 guibg=NONE gui=NONE cterm=NONE 201 | hi Ignore guifg=#282828 guibg=NONE gui=NONE cterm=NONE 202 | hi PreProc guifg=#282828 guibg=NONE gui=NONE cterm=NONE 203 | hi Special guifg=#282828 guibg=NONE gui=NONE cterm=NONE 204 | hi Statement guifg=#282828 guibg=NONE gui=NONE cterm=NONE 205 | hi Todo guifg=#00ffaf guibg=#282828 gui=bold,reverse cterm=bold,reverse 206 | hi Type guifg=#282828 guibg=NONE gui=NONE cterm=NONE 207 | hi Underlined guifg=#282828 guibg=NONE gui=underline cterm=underline 208 | hi CursorIM guifg=#282828 guibg=#afff00 gui=NONE cterm=NONE 209 | hi ToolbarLine guifg=NONE guibg=#d7d7d7 gui=NONE cterm=NONE 210 | hi ToolbarButton guifg=#282828 guibg=#d7d7d7 gui=bold cterm=bold 211 | endif 212 | 213 | if s:t_Co >= 256 214 | if &background ==# 'dark' 215 | hi Normal ctermfg=253 ctermbg=16 cterm=NONE 216 | hi ColorColumn ctermfg=NONE ctermbg=234 cterm=NONE 217 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 218 | hi CurSearch ctermfg=207 ctermbg=16 cterm=reverse 219 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 220 | hi CursorColumn ctermfg=NONE ctermbg=236 cterm=NONE 221 | hi CursorLine ctermfg=NONE ctermbg=236 cterm=NONE 222 | hi CursorLineNr ctermfg=253 ctermbg=236 cterm=NONE 223 | hi DiffAdd ctermfg=34 ctermbg=16 cterm=reverse 224 | hi DiffChange ctermfg=110 ctermbg=16 cterm=reverse 225 | hi DiffDelete ctermfg=167 ctermbg=16 cterm=reverse 226 | hi DiffText ctermfg=176 ctermbg=16 cterm=reverse 227 | hi Directory ctermfg=253 ctermbg=NONE cterm=NONE 228 | hi EndOfBuffer ctermfg=242 ctermbg=NONE cterm=NONE 229 | hi ErrorMsg ctermfg=253 ctermbg=16 cterm=reverse 230 | hi FoldColumn ctermfg=242 ctermbg=NONE cterm=NONE 231 | hi Folded ctermfg=242 ctermbg=16 cterm=NONE 232 | hi IncSearch ctermfg=214 ctermbg=16 cterm=reverse 233 | hi LineNr ctermfg=240 ctermbg=NONE cterm=NONE 234 | hi MatchParen ctermfg=199 ctermbg=NONE cterm=bold 235 | hi ModeMsg ctermfg=253 ctermbg=NONE cterm=bold 236 | hi MoreMsg ctermfg=253 ctermbg=NONE cterm=NONE 237 | hi NonText ctermfg=242 ctermbg=NONE cterm=NONE 238 | hi Pmenu ctermfg=16 ctermbg=248 cterm=NONE 239 | hi PmenuMatch ctermfg=161 ctermbg=248 cterm=NONE 240 | hi PmenuExtra ctermfg=16 ctermbg=248 cterm=NONE 241 | hi PmenuKind ctermfg=16 ctermbg=248 cterm=bold 242 | hi PmenuSbar ctermfg=242 ctermbg=240 cterm=NONE 243 | hi PmenuSel ctermfg=16 ctermbg=253 cterm=NONE 244 | hi PmenuMatchSel ctermfg=161 ctermbg=253 cterm=bold 245 | hi PmenuExtraSel ctermfg=16 ctermbg=253 cterm=NONE 246 | hi PmenuKindSel ctermfg=16 ctermbg=253 cterm=bold 247 | hi PmenuThumb ctermfg=253 ctermbg=253 cterm=NONE 248 | hi Question ctermfg=253 ctermbg=NONE cterm=NONE 249 | hi QuickFixLine ctermfg=207 ctermbg=16 cterm=reverse 250 | hi Search ctermfg=39 ctermbg=16 cterm=reverse 251 | hi SignColumn ctermfg=253 ctermbg=NONE cterm=NONE 252 | hi SpecialKey ctermfg=242 ctermbg=NONE cterm=bold 253 | hi SpellBad ctermfg=161 ctermbg=NONE cterm=underline 254 | hi SpellCap ctermfg=32 ctermbg=NONE cterm=underline 255 | hi SpellLocal ctermfg=176 ctermbg=NONE cterm=underline 256 | hi SpellRare ctermfg=37 ctermbg=NONE cterm=underline 257 | hi StatusLine ctermfg=16 ctermbg=253 cterm=bold 258 | hi StatusLineNC ctermfg=242 ctermbg=16 cterm=reverse 259 | hi TabLine ctermfg=242 ctermbg=16 cterm=reverse 260 | hi TabLineFill ctermfg=253 ctermbg=NONE cterm=NONE 261 | hi TabLineSel ctermfg=16 ctermbg=253 cterm=bold 262 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 263 | hi VertSplit ctermfg=242 ctermbg=16 cterm=NONE 264 | hi Visual ctermfg=214 ctermbg=16 cterm=reverse 265 | hi VisualNOS ctermfg=NONE ctermbg=236 cterm=NONE 266 | hi WarningMsg ctermfg=253 ctermbg=NONE cterm=NONE 267 | hi WildMenu ctermfg=39 ctermbg=16 cterm=bold 268 | hi Comment ctermfg=242 ctermbg=NONE cterm=bold 269 | hi Constant ctermfg=253 ctermbg=NONE cterm=NONE 270 | hi Error ctermfg=197 ctermbg=16 cterm=bold,reverse 271 | hi Identifier ctermfg=253 ctermbg=NONE cterm=NONE 272 | hi Ignore ctermfg=253 ctermbg=NONE cterm=NONE 273 | hi PreProc ctermfg=253 ctermbg=NONE cterm=NONE 274 | hi Special ctermfg=253 ctermbg=NONE cterm=NONE 275 | hi Statement ctermfg=253 ctermbg=NONE cterm=NONE 276 | hi Todo ctermfg=49 ctermbg=NONE cterm=bold,reverse 277 | hi Type ctermfg=253 ctermbg=NONE cterm=NONE 278 | hi Underlined ctermfg=253 ctermbg=NONE cterm=underline 279 | hi CursorIM ctermfg=16 ctermbg=154 cterm=NONE 280 | hi ToolbarLine ctermfg=NONE ctermbg=16 cterm=NONE 281 | hi ToolbarButton ctermfg=253 ctermbg=16 cterm=bold 282 | hi NormalFloat ctermfg=253 ctermbg=234 cterm=NONE 283 | hi FloatBorder ctermfg=242 ctermbg=234 cterm=NONE 284 | " Custom 285 | hi link GitLens Comment 286 | " ----------------------------------------------------------------------------- 287 | " Dark mode overrides 288 | " ----------------------------------------------------------------------------- 289 | " Comments: inverted green tint for high visibility 290 | hi Comment guifg=#0c2919 guibg=#a8d4c3 291 | 292 | " Popup menu: muted blue-grey 293 | hi Pmenu guifg=#1a1a5a guibg=#d0d5e0 294 | hi PmenuSel guifg=#0c2919 guibg=#a8d4c3 295 | hi PmenuMatch gui=bold guifg=#8b0000 guibg=NONE 296 | hi PmenuMatchSel gui=bold guifg=#8b0000 guibg=NONE 297 | 298 | " Statusline: match comment style 299 | hi StatusLine guifg=#0c2919 guibg=#a8d4c3 300 | 301 | " Cursor: orange for visibility 302 | hi Cursor gui=none guifg=#000000 guibg=#ff5f00 303 | 304 | " Treesitter/markup 305 | hi @markup.raw guibg=NONE 306 | hi! link @comment.block Pmenu 307 | else 308 | " Light background 309 | hi Normal ctermfg=16 ctermbg=188 cterm=NONE 310 | hi ColorColumn ctermfg=NONE ctermbg=254 cterm=NONE 311 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 312 | hi CurSearch ctermfg=207 ctermbg=16 cterm=reverse 313 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 314 | hi CursorColumn ctermfg=NONE ctermbg=255 cterm=NONE 315 | hi CursorLine ctermfg=NONE ctermbg=255 cterm=NONE 316 | hi CursorLineNr ctermfg=16 ctermbg=255 cterm=NONE 317 | hi DiffAdd ctermfg=114 ctermbg=16 cterm=reverse 318 | hi DiffChange ctermfg=146 ctermbg=16 cterm=reverse 319 | hi DiffDelete ctermfg=174 ctermbg=16 cterm=reverse 320 | hi DiffText ctermfg=176 ctermbg=16 cterm=reverse 321 | hi Directory ctermfg=16 ctermbg=NONE cterm=NONE 322 | hi EndOfBuffer ctermfg=241 ctermbg=NONE cterm=NONE 323 | hi ErrorMsg ctermfg=16 ctermbg=188 cterm=reverse 324 | hi FoldColumn ctermfg=241 ctermbg=NONE cterm=NONE 325 | hi Folded ctermfg=241 ctermbg=188 cterm=NONE 326 | hi IncSearch ctermfg=214 ctermbg=16 cterm=reverse 327 | hi LineNr ctermfg=248 ctermbg=NONE cterm=NONE 328 | hi MatchParen ctermfg=199 ctermbg=188 cterm=bold 329 | hi ModeMsg ctermfg=16 ctermbg=NONE cterm=bold 330 | hi MoreMsg ctermfg=16 ctermbg=NONE cterm=NONE 331 | hi NonText ctermfg=241 ctermbg=NONE cterm=NONE 332 | hi Pmenu ctermfg=16 ctermbg=248 cterm=NONE 333 | hi PmenuMatch ctermfg=160 ctermbg=248 cterm=NONE 334 | hi PmenuExtra ctermfg=16 ctermbg=248 cterm=NONE 335 | hi PmenuKind ctermfg=16 ctermbg=248 cterm=bold 336 | hi PmenuSbar ctermfg=16 ctermbg=254 cterm=NONE 337 | hi PmenuSel ctermfg=188 ctermbg=16 cterm=NONE 338 | hi PmenuMatchSel ctermfg=160 ctermbg=16 cterm=bold 339 | hi PmenuExtraSel ctermfg=188 ctermbg=16 cterm=NONE 340 | hi PmenuKindSel ctermfg=188 ctermbg=16 cterm=bold 341 | hi PmenuThumb ctermfg=16 ctermbg=16 cterm=NONE 342 | hi Question ctermfg=16 ctermbg=NONE cterm=NONE 343 | hi QuickFixLine ctermfg=207 ctermbg=16 cterm=reverse 344 | hi Search ctermfg=39 ctermbg=16 cterm=reverse 345 | hi SignColumn ctermfg=16 ctermbg=NONE cterm=NONE 346 | hi SpecialKey ctermfg=241 ctermbg=NONE cterm=bold 347 | hi SpellBad ctermfg=124 ctermbg=188 cterm=underline 348 | hi SpellCap ctermfg=25 ctermbg=188 cterm=underline 349 | hi SpellLocal ctermfg=90 ctermbg=188 cterm=underline 350 | hi SpellRare ctermfg=30 ctermbg=188 cterm=underline 351 | hi StatusLine ctermfg=255 ctermbg=16 cterm=bold 352 | hi StatusLineNC ctermfg=16 ctermbg=248 cterm=NONE 353 | hi TabLine ctermfg=16 ctermbg=248 cterm=NONE 354 | hi TabLineFill ctermfg=16 ctermbg=188 cterm=NONE 355 | hi TabLineSel ctermfg=255 ctermbg=16 cterm=bold 356 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 357 | hi VertSplit ctermfg=241 ctermbg=188 cterm=NONE 358 | hi Visual ctermfg=214 ctermbg=16 cterm=reverse 359 | hi VisualNOS ctermfg=NONE ctermbg=255 cterm=NONE 360 | hi WarningMsg ctermfg=16 ctermbg=NONE cterm=NONE 361 | hi WildMenu ctermfg=16 ctermbg=255 cterm=bold 362 | hi Comment ctermfg=16 ctermbg=NONE cterm=bold 363 | hi Constant ctermfg=16 ctermbg=NONE cterm=NONE 364 | hi Error ctermfg=197 ctermbg=16 cterm=bold,reverse 365 | hi Identifier ctermfg=16 ctermbg=NONE cterm=NONE 366 | hi Ignore ctermfg=16 ctermbg=NONE cterm=NONE 367 | hi PreProc ctermfg=16 ctermbg=NONE cterm=NONE 368 | hi Special ctermfg=16 ctermbg=NONE cterm=NONE 369 | hi Statement ctermfg=16 ctermbg=NONE cterm=NONE 370 | hi Todo ctermfg=49 ctermbg=16 cterm=bold,reverse 371 | hi Type ctermfg=16 ctermbg=NONE cterm=NONE 372 | hi Underlined ctermfg=16 ctermbg=NONE cterm=underline 373 | hi CursorIM ctermfg=16 ctermbg=154 cterm=NONE 374 | hi ToolbarLine ctermfg=NONE ctermbg=188 cterm=NONE 375 | hi ToolbarButton ctermfg=16 ctermbg=188 cterm=bold 376 | hi NormalFloat ctermfg=16 ctermbg=254 cterm=NONE 377 | hi FloatBorder ctermfg=248 ctermbg=254 cterm=NONE 378 | " ----------------------------------------------------------------------------- 379 | " Light mode overrides 380 | " ----------------------------------------------------------------------------- 381 | " Comments: purple tint 382 | hi Comment guifg=#43105d guibg=#c897ff 383 | hi @comment.block.c guifg=#0a1a4a guibg=#c8d8f0 384 | 385 | " Popup menu: subtle grey 386 | hi Pmenu guifg=#1a1a1a guibg=#e8e8e8 387 | hi PmenuSel guifg=#0a1a4a guibg=#c8d8f0 388 | hi PmenuMatchSel guifg=#8b0000 guibg=NONE gui=bold 389 | 390 | " Line numbers: darker for readability 391 | hi LineNr guifg=#4f4f4f 392 | 393 | " Cursor: amber/gold 394 | hi Cursor gui=none guifg=#3a3a00 guibg=#dab862 395 | 396 | " Diagnostics 397 | hi DiagnosticHint guifg=#0c2919 guibg=#c8e8d8 398 | hi DiagnosticInfo guibg=DarkCyan guifg=White 399 | hi DiagnosticUnderlineHint guisp=#0c2919 400 | 401 | " Treesitter/markup 402 | hi @comment.note guifg=#0a3a3a guibg=#c8e8e8 403 | hi! link @markup.raw.block.markdown NormalFloat 404 | hi! link @comment.block Pmenu 405 | endif 406 | unlet s:t_Co 407 | finish 408 | endif 409 | 410 | if s:t_Co >= 16 411 | if &background ==# 'dark' 412 | hi Comment ctermfg=darkgrey ctermbg=NONE cterm=bold 413 | hi CurSearch ctermfg=magenta ctermbg=black cterm=reverse 414 | hi EndOfBuffer ctermfg=darkgrey ctermbg=NONE cterm=NONE 415 | hi Folded ctermfg=darkgrey ctermbg=NONE cterm=NONE 416 | hi IncSearch ctermfg=yellow ctermbg=black cterm=reverse 417 | hi LineNr ctermfg=darkgrey ctermbg=NONE cterm=NONE 418 | hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE 419 | hi PmenuSbar ctermfg=darkgrey ctermbg=NONE cterm=reverse 420 | hi Search ctermfg=cyan ctermbg=black cterm=reverse 421 | hi SpecialKey ctermfg=darkgrey ctermbg=NONE cterm=bold 422 | hi StatusLineNC ctermfg=darkgrey ctermbg=NONE cterm=reverse 423 | hi TabLine ctermfg=darkgrey ctermbg=NONE cterm=reverse 424 | hi VertSplit ctermfg=darkgrey ctermbg=NONE cterm=NONE 425 | hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE 426 | hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse 427 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 428 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 429 | hi CursorColumn ctermfg=NONE ctermbg=NONE cterm=NONE 430 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE 431 | hi CursorLineNr ctermfg=NONE ctermbg=NONE cterm=bold 432 | hi DiffAdd ctermfg=darkgreen ctermbg=black cterm=reverse 433 | hi DiffChange ctermfg=darkblue ctermbg=black cterm=reverse 434 | hi DiffDelete ctermfg=darkred ctermbg=black cterm=reverse 435 | hi DiffText ctermfg=darkmagenta ctermbg=black cterm=reverse 436 | hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE 437 | hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=bold,reverse 438 | hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE 439 | hi MatchParen ctermfg=NONE ctermbg=NONE cterm=bold,underline 440 | hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold 441 | hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE 442 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse 443 | hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse 444 | hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse 445 | hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse 446 | hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold 447 | hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold 448 | hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold 449 | hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold 450 | hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE 451 | hi Question ctermfg=NONE ctermbg=NONE cterm=standout 452 | hi QuickFixLine ctermfg=darkmagenta ctermbg=black cterm=reverse 453 | hi SignColumn ctermfg=NONE ctermbg=NONE cterm=reverse 454 | hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline 455 | hi SpellCap ctermfg=darkblue ctermbg=NONE cterm=underline 456 | hi SpellLocal ctermfg=darkmagenta ctermbg=NONE cterm=underline 457 | hi SpellRare ctermfg=darkcyan ctermbg=NONE cterm=underline 458 | hi StatusLine ctermfg=NONE ctermbg=NONE cterm=bold,reverse 459 | hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE 460 | hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold,reverse 461 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 462 | hi Visual ctermfg=darkyellow ctermbg=black cterm=reverse 463 | hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE 464 | hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=standout 465 | hi WildMenu ctermfg=NONE ctermbg=NONE cterm=bold 466 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE 467 | hi Error ctermfg=darkred ctermbg=black cterm=bold,reverse 468 | hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE 469 | hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE 470 | hi PreProc ctermfg=NONE ctermbg=NONE cterm=NONE 471 | hi Special ctermfg=NONE ctermbg=NONE cterm=NONE 472 | hi Statement ctermfg=NONE ctermbg=NONE cterm=NONE 473 | hi Todo ctermfg=NONE ctermbg=NONE cterm=bold,reverse 474 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE 475 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline 476 | hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE 477 | hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse 478 | hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse 479 | else 480 | " Light background 481 | hi CurSearch ctermfg=magenta ctermbg=black cterm=reverse 482 | hi EndOfBuffer ctermfg=darkgrey ctermbg=NONE cterm=NONE 483 | hi Folded ctermfg=darkgrey ctermbg=NONE cterm=NONE 484 | hi IncSearch ctermfg=yellow ctermbg=black cterm=reverse 485 | hi LineNr ctermfg=darkgrey ctermbg=NONE cterm=NONE 486 | hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE 487 | hi PmenuSbar ctermfg=darkgrey ctermbg=NONE cterm=reverse 488 | hi Search ctermfg=cyan ctermbg=black cterm=reverse 489 | hi SpecialKey ctermfg=darkgrey ctermbg=NONE cterm=bold 490 | hi StatusLineNC ctermfg=darkgrey ctermbg=NONE cterm=reverse 491 | hi TabLine ctermfg=darkgrey ctermbg=NONE cterm=reverse 492 | hi VertSplit ctermfg=darkgrey ctermbg=NONE cterm=NONE 493 | hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE 494 | hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse 495 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 496 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 497 | hi CursorColumn ctermfg=NONE ctermbg=NONE cterm=NONE 498 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE 499 | hi CursorLineNr ctermfg=NONE ctermbg=NONE cterm=bold 500 | hi DiffAdd ctermfg=darkgreen ctermbg=black cterm=reverse 501 | hi DiffChange ctermfg=darkblue ctermbg=black cterm=reverse 502 | hi DiffDelete ctermfg=darkred ctermbg=black cterm=reverse 503 | hi DiffText ctermfg=darkmagenta ctermbg=black cterm=reverse 504 | hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE 505 | hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=bold,reverse 506 | hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE 507 | hi MatchParen ctermfg=NONE ctermbg=NONE cterm=bold,underline 508 | hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold 509 | hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE 510 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse 511 | hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse 512 | hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse 513 | hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse 514 | hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold 515 | hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold 516 | hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold 517 | hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold 518 | hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE 519 | hi Question ctermfg=NONE ctermbg=NONE cterm=standout 520 | hi QuickFixLine ctermfg=darkmagenta ctermbg=black cterm=reverse 521 | hi SignColumn ctermfg=NONE ctermbg=NONE cterm=reverse 522 | hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline 523 | hi SpellCap ctermfg=darkblue ctermbg=NONE cterm=underline 524 | hi SpellLocal ctermfg=darkmagenta ctermbg=NONE cterm=underline 525 | hi SpellRare ctermfg=darkcyan ctermbg=NONE cterm=underline 526 | hi StatusLine ctermfg=NONE ctermbg=NONE cterm=bold,reverse 527 | hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE 528 | hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold,reverse 529 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 530 | hi Visual ctermfg=darkyellow ctermbg=black cterm=reverse 531 | hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE 532 | hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=standout 533 | hi WildMenu ctermfg=NONE ctermbg=NONE cterm=bold 534 | hi Comment ctermfg=NONE ctermbg=NONE cterm=bold 535 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE 536 | hi Error ctermfg=darkred ctermbg=black cterm=bold,reverse 537 | hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE 538 | hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE 539 | hi PreProc ctermfg=NONE ctermbg=NONE cterm=NONE 540 | hi Special ctermfg=NONE ctermbg=NONE cterm=NONE 541 | hi Statement ctermfg=NONE ctermbg=NONE cterm=NONE 542 | hi Todo ctermfg=NONE ctermbg=NONE cterm=bold,reverse 543 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE 544 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline 545 | hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE 546 | hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse 547 | hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse 548 | endif 549 | unlet s:t_Co 550 | finish 551 | endif 552 | 553 | if s:t_Co >= 8 554 | if &background ==# 'dark' 555 | hi Comment ctermfg=NONE ctermbg=NONE cterm=bold 556 | hi CurSearch ctermfg=darkmagenta ctermbg=black cterm=reverse 557 | hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE 558 | hi Folded ctermfg=NONE ctermbg=NONE cterm=NONE 559 | hi IncSearch ctermfg=darkyellow ctermbg=black cterm=reverse 560 | hi LineNr ctermfg=NONE ctermbg=NONE cterm=NONE 561 | hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE 562 | hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=reverse 563 | hi Search ctermfg=darkcyan ctermbg=black cterm=reverse 564 | hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=bold 565 | hi StatusLineNC ctermfg=NONE ctermbg=NONE cterm=bold,underline 566 | hi TabLine ctermfg=NONE ctermbg=NONE cterm=bold,underline 567 | hi VertSplit ctermfg=NONE ctermbg=NONE cterm=NONE 568 | hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE 569 | hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse 570 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 571 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 572 | hi CursorColumn ctermfg=NONE ctermbg=NONE cterm=NONE 573 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE 574 | hi CursorLineNr ctermfg=NONE ctermbg=NONE cterm=bold 575 | hi DiffAdd ctermfg=darkgreen ctermbg=black cterm=reverse 576 | hi DiffChange ctermfg=darkblue ctermbg=black cterm=reverse 577 | hi DiffDelete ctermfg=darkred ctermbg=black cterm=reverse 578 | hi DiffText ctermfg=darkmagenta ctermbg=black cterm=reverse 579 | hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE 580 | hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=bold,reverse 581 | hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE 582 | hi MatchParen ctermfg=NONE ctermbg=NONE cterm=bold,underline 583 | hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold 584 | hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE 585 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse 586 | hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse 587 | hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse 588 | hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse 589 | hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold 590 | hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold 591 | hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold 592 | hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold 593 | hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE 594 | hi Question ctermfg=NONE ctermbg=NONE cterm=standout 595 | hi QuickFixLine ctermfg=darkmagenta ctermbg=black cterm=reverse 596 | hi SignColumn ctermfg=NONE ctermbg=NONE cterm=reverse 597 | hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline 598 | hi SpellCap ctermfg=darkblue ctermbg=NONE cterm=underline 599 | hi SpellLocal ctermfg=darkmagenta ctermbg=NONE cterm=underline 600 | hi SpellRare ctermfg=darkcyan ctermbg=NONE cterm=underline 601 | hi StatusLine ctermfg=NONE ctermbg=NONE cterm=bold,reverse 602 | hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE 603 | hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold,reverse 604 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 605 | hi Visual ctermfg=darkyellow ctermbg=black cterm=reverse 606 | hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE 607 | hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=standout 608 | hi WildMenu ctermfg=NONE ctermbg=NONE cterm=bold 609 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE 610 | hi Error ctermfg=darkred ctermbg=black cterm=bold,reverse 611 | hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE 612 | hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE 613 | hi PreProc ctermfg=NONE ctermbg=NONE cterm=NONE 614 | hi Special ctermfg=NONE ctermbg=NONE cterm=NONE 615 | hi Statement ctermfg=NONE ctermbg=NONE cterm=NONE 616 | hi Todo ctermfg=NONE ctermbg=NONE cterm=bold,reverse 617 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE 618 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline 619 | hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE 620 | hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse 621 | hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse 622 | else 623 | " Light background 624 | hi CurSearch ctermfg=darkmagenta ctermbg=black cterm=reverse 625 | hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE 626 | hi Folded ctermfg=NONE ctermbg=NONE cterm=NONE 627 | hi IncSearch ctermfg=darkyellow ctermbg=black cterm=reverse 628 | hi LineNr ctermfg=NONE ctermbg=NONE cterm=NONE 629 | hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE 630 | hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=reverse 631 | hi Search ctermfg=darkcyan ctermbg=black cterm=reverse 632 | hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=bold 633 | hi StatusLineNC ctermfg=NONE ctermbg=NONE cterm=bold,underline 634 | hi TabLine ctermfg=NONE ctermbg=NONE cterm=bold,underline 635 | hi VertSplit ctermfg=NONE ctermbg=NONE cterm=NONE 636 | hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE 637 | hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse 638 | hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE 639 | hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse 640 | hi CursorColumn ctermfg=NONE ctermbg=NONE cterm=NONE 641 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=NONE 642 | hi CursorLineNr ctermfg=NONE ctermbg=NONE cterm=bold 643 | hi DiffAdd ctermfg=darkgreen ctermbg=black cterm=reverse 644 | hi DiffChange ctermfg=darkblue ctermbg=black cterm=reverse 645 | hi DiffDelete ctermfg=darkred ctermbg=black cterm=reverse 646 | hi DiffText ctermfg=darkmagenta ctermbg=black cterm=reverse 647 | hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE 648 | hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=bold,reverse 649 | hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE 650 | hi MatchParen ctermfg=NONE ctermbg=NONE cterm=bold,underline 651 | hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold 652 | hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE 653 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse 654 | hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse 655 | hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse 656 | hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse 657 | hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold 658 | hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold 659 | hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold 660 | hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold 661 | hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE 662 | hi Question ctermfg=NONE ctermbg=NONE cterm=standout 663 | hi QuickFixLine ctermfg=darkmagenta ctermbg=black cterm=reverse 664 | hi SignColumn ctermfg=NONE ctermbg=NONE cterm=reverse 665 | hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline 666 | hi SpellCap ctermfg=darkblue ctermbg=NONE cterm=underline 667 | hi SpellLocal ctermfg=darkmagenta ctermbg=NONE cterm=underline 668 | hi SpellRare ctermfg=darkcyan ctermbg=NONE cterm=underline 669 | hi StatusLine ctermfg=NONE ctermbg=NONE cterm=bold,reverse 670 | hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE 671 | hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold,reverse 672 | hi Title ctermfg=NONE ctermbg=NONE cterm=NONE 673 | hi Visual ctermfg=darkyellow ctermbg=black cterm=reverse 674 | hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE 675 | hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=standout 676 | hi WildMenu ctermfg=NONE ctermbg=NONE cterm=bold 677 | hi Comment ctermfg=NONE ctermbg=NONE cterm=bold 678 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE 679 | hi Error ctermfg=darkred ctermbg=black cterm=bold,reverse 680 | hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE 681 | hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE 682 | hi PreProc ctermfg=NONE ctermbg=NONE cterm=NONE 683 | hi Special ctermfg=NONE ctermbg=NONE cterm=NONE 684 | hi Statement ctermfg=NONE ctermbg=NONE cterm=NONE 685 | hi Todo ctermfg=NONE ctermbg=NONE cterm=bold,reverse 686 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE 687 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline 688 | hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE 689 | hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse 690 | hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse 691 | endif 692 | unlet s:t_Co 693 | finish 694 | endif 695 | 696 | if s:t_Co >= 0 697 | hi Normal term=NONE 698 | hi ColorColumn term=reverse 699 | hi Conceal term=NONE 700 | hi Cursor term=reverse 701 | hi CursorColumn term=NONE 702 | hi CursorLine term=underline 703 | hi CursorLineNr term=bold 704 | hi DiffAdd term=reverse 705 | hi DiffChange term=NONE 706 | hi DiffDelete term=reverse 707 | hi DiffText term=reverse 708 | hi Directory term=NONE 709 | hi EndOfBuffer term=NONE 710 | hi ErrorMsg term=bold,reverse 711 | hi FoldColumn term=NONE 712 | hi Folded term=NONE 713 | hi IncSearch term=bold,reverse,underline 714 | hi LineNr term=NONE 715 | hi MatchParen term=bold,underline 716 | hi ModeMsg term=bold 717 | hi MoreMsg term=NONE 718 | hi NonText term=NONE 719 | hi Pmenu term=reverse 720 | hi PmenuSbar term=reverse 721 | hi PmenuSel term=bold 722 | hi PmenuThumb term=NONE 723 | hi Question term=standout 724 | hi Search term=reverse 725 | hi SignColumn term=reverse 726 | hi SpecialKey term=bold 727 | hi SpellBad term=underline 728 | hi SpellCap term=underline 729 | hi SpellLocal term=underline 730 | hi SpellRare term=underline 731 | hi StatusLine term=bold,reverse 732 | hi StatusLineNC term=bold,underline 733 | hi TabLine term=bold,underline 734 | hi TabLineFill term=NONE 735 | hi Terminal term=NONE 736 | hi TabLineSel term=bold,reverse 737 | hi Title term=NONE 738 | hi VertSplit term=NONE 739 | hi Visual term=reverse 740 | hi VisualNOS term=NONE 741 | hi WarningMsg term=standout 742 | hi WildMenu term=bold 743 | hi CursorIM term=NONE 744 | hi ToolbarLine term=reverse 745 | hi ToolbarButton term=bold,reverse 746 | hi CurSearch term=reverse 747 | hi CursorLineFold term=underline 748 | hi CursorLineSign term=underline 749 | hi Comment term=bold 750 | hi Constant term=NONE 751 | hi Error term=bold,reverse 752 | hi Identifier term=NONE 753 | hi Ignore term=NONE 754 | hi PreProc term=NONE 755 | hi Special term=NONE 756 | hi Statement term=NONE 757 | hi Todo term=bold,reverse 758 | hi Type term=NONE 759 | hi Underlined term=underline 760 | unlet s:t_Co 761 | finish 762 | endif 763 | 764 | " Background: dark 765 | " Color: dark0 #282828 16 black 766 | " Color: dark1 #d7005f 161 darkred 767 | " Color: dark2 #00af5f 35 darkgreen 768 | " Color: dark3 #d78700 172 darkyellow 769 | " Color: dark4 #0087d7 32 darkblue 770 | " Color: dark5 #d787d7 176 darkmagenta 771 | " Color: dark6 #00afaf 37 darkcyan 772 | " Color: dark7 #fffff 253 grey 773 | " Color: dark8 #707070 242 darkgrey 774 | " Color: dark9 #ff005f 197 red 775 | " Color: dark10 #00d75f 41 green 776 | " Color: dark11 #33ff33 214 yellow 777 | " Color: dark12 #5fafff 75 blue 778 | " Color: dark13 #ff87ff 213 magenta 779 | " Color: dark14 #00d7d7 44 cyan 780 | " Color: dark15 #ffffff 231 white 781 | " Color: diffred #d75f5f 167 darkred 782 | " Color: diffgreen #00af00 34 darkgreen 783 | " Color: diffblue #87afd7 110 darkblue 784 | " Color: diffpink #d787d7 176 darkmagenta 785 | " Color: uipink #ff00af 199 magenta 786 | " Color: uilime #afff00 154 green 787 | " Color: uiteal #00ffaf 49 green 788 | " Color: uiblue #00afff 39 blue 789 | " Color: uipurple #af00ff 129 darkmagenta 790 | " Color: uiamber #33ff33 214 darkyellow 791 | " Color: uiblack #303030 236 darkgrey 792 | " Color: yasogrey #1c1c1c 234 black 793 | " Color: linenrblack #585858 240 darkgrey 794 | " Color: uicursearch #ff5fff 207 magenta 795 | " Color: invisigrey #a8a8a8 248 darkgrey 796 | " Color: errorred #ff005f 197 red 797 | " Term colors: dark0 dark1 dark2 dark3 dark4 dark5 dark6 dark7 798 | " Term colors: dark8 dark9 dark10 dark11 dark12 dark13 dark14 dark15 799 | " Background: light 800 | " Color: brightwhite #eeeeee 255 grey 801 | " Color: light0 #282828 16 black 802 | " Color: light1 #af0000 124 darkred 803 | " Color: light2 #005f00 22 darkgreen 804 | " Color: light3 #af5f00 130 darkyellow 805 | " Color: light4 #005faf 25 darkblue 806 | " Color: light5 #870087 90 darkmagenta 807 | " Color: light6 #008787 30 darkcyan 808 | " Color: light7 #d7d7d7 188 grey 809 | " Color: light8 #626262 241 darkgrey 810 | " Color: light9 #d70000 160 red 811 | " Color: light10 #008700 28 green 812 | " Color: light11 #d78700 172 yellow 813 | " Color: light12 #0087d7 32 blue 814 | " Color: light13 #af00af 127 magenta 815 | " Color: light14 #00afaf 37 cyan 816 | " Color: light15 #ffffff 231 white 817 | " Color: diffred #d78787 174 red 818 | " Color: diffgreen #87d787 114 green 819 | " Color: diffblue #afafd7 146 blue 820 | " Color: diffpink #d787d7 176 magenta 821 | " Color: uipink #ff00af 199 magenta 822 | " Color: uilime #afff00 154 green 823 | " Color: uiteal #00ffaf 49 cyan 824 | " Color: uiblue #00afff 39 blue 825 | " Color: uipurple #af00ff 129 darkmagenta 826 | " Color: uiamber #33ff33 214 yellow 827 | " Color: invisigrey #a8a8a8 248 darkgrey 828 | " Color: yasogrey #e4e4e4 254 grey 829 | " Color: uicursearch #ff5fff 207 magenta 830 | " Color: errorred #ff005f 197 red 831 | " Term colors: light0 light1 light2 light3 light4 light5 light6 light7 832 | " Term colors: light8 light9 light10 light11 light12 light13 light14 light15 833 | " Background: any 834 | --------------------------------------------------------------------------------