├── .gitignore ├── LICENSE ├── README.md ├── after └── ftplugin │ └── markdown.vim ├── init.lua ├── lazy-lock.json ├── lua ├── config │ ├── buffer.lua │ ├── clojure.lua │ ├── cpp.lua │ ├── init.lua │ ├── json.lua │ ├── lsp.lua │ ├── markdown.lua │ ├── motion.lua │ ├── options.lua │ ├── save.lua │ ├── search.lua │ ├── terminal.lua │ ├── ui.lua │ ├── util.lua │ └── wiki.lua ├── no-packages │ └── empty.lua ├── package-all │ ├── clojure.lua │ ├── colorscheme.lua │ ├── copilot.lua │ ├── cpp.lua │ ├── css.lua │ ├── d2.lua │ ├── format.lua │ ├── git.lua │ ├── lazy.lua │ ├── lint.lua │ ├── llvm.lua │ ├── lsp.lua │ ├── markdown.lua │ ├── motion.lua │ ├── search.lua │ ├── tree.lua │ ├── treesitter.lua │ ├── ui.lua │ ├── util.lua │ ├── whichkey.lua │ └── whitespace.lua └── package │ ├── clojure.lua │ ├── colorscheme.lua │ ├── cpp.lua │ ├── css.lua │ ├── d2.lua │ ├── format.lua │ ├── git.lua │ ├── lazy.lua │ ├── lint.lua │ ├── llvm.lua │ ├── lsp.lua │ ├── markdown.lua │ ├── motion.lua │ ├── search.lua │ ├── tree.lua │ ├── treesitter.lua │ ├── ui.lua │ ├── util.lua │ ├── whichkey.lua │ └── whitespace.lua └── syntax ├── clojure.vim └── jank.vim /.gitignore: -------------------------------------------------------------------------------- 1 | /bundle 2 | /.netrwhist 3 | /verbose 4 | /dein 5 | /plugged 6 | /autoload 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2017 Jesse 'Jeaye' Wilkerson. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted, free of charge, provided that the following 5 | conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | Redistributions in any form must be accompanied by information on how to obtain 15 | complete source code for the distributed software and any accompanying software 16 | that uses the distributed software. The source code must either be included in 17 | the distribution or be available free of charge. For an executable file, 18 | complete source code means the source code for all modules it contains. It does 19 | not include source code for modules or files that typically accompany the major 20 | components of the operating system on which the executable file runs. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | SOFTWARE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vimrc 2 | === 3 | This is my NeoVim configuration for both GNU/Linux and MacOS. It's built around C++ 4 | and Clojure development, primarily. 5 | 6 | ## Installation 7 | After cloning into, say, `~/projects/vimrc`, you can install with just two 8 | links. 9 | 10 | ```bash 11 | # Back up ~/.config/nvim, if it exists 12 | ln -s ~/projects/vimrc ~/.config/nvim 13 | ``` 14 | 15 | ## Installing and updating packages 16 | This config uses [lazy.nvim](https://github.com/folke/lazy.nvim), so you'll 17 | get all dependencies installed automatically. Make sure to run `:checkhealth` 18 | after installation. 19 | -------------------------------------------------------------------------------- /after/ftplugin/markdown.vim: -------------------------------------------------------------------------------- 1 | setlocal spell 2 | " English dictionary, ignoring East Asian characters. 3 | setlocal spelllang=en,cjk 4 | setlocal textwidth=80 5 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | if not vim.loop.fs_stat(lazypath) then 3 | vim.fn.system({ 4 | "git", 5 | "clone", 6 | "--filter=blob:none", 7 | "https://github.com/folke/lazy.nvim.git", 8 | "--branch=stable", 9 | lazypath, 10 | }) 11 | end 12 | vim.opt.rtp:prepend(lazypath) 13 | 14 | for _, v in pairs(vim.api.nvim_get_runtime_file("lua/config/*", true)) do 15 | local module = v:gsub(".*lua/config/", "config/") 16 | module = module:gsub("%.lua$", "") 17 | module = module:gsub("/", ".") 18 | --print("Loading module", module) 19 | require(module) 20 | end 21 | 22 | require("lazy").setup("package") 23 | --require("lazy").setup("no-packages") 24 | -------------------------------------------------------------------------------- /lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "ack.vim": { "branch": "master", "commit": "36e40f9ec91bdbf6f1adf408522a73a6925c3042" }, 3 | "ale": { "branch": "master", "commit": "2f4a8665916e8bf44a30bbdc8a820692edd9f652" }, 4 | "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, 5 | "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, 6 | "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, 7 | "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, 8 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 9 | "conjure": { "branch": "master", "commit": "a81977726f726b21d4bd75cea5bbbb7022005507" }, 10 | "d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" }, 11 | "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, 12 | "ebnf.vim": { "branch": "master", "commit": "f3e5ba3fee6a07493afd9c4b805f11fca1c14edd" }, 13 | "follow-md-links.nvim": { "branch": "main", "commit": "ce8735a15dc3e5fc5bb052ec51b849c03e57df53" }, 14 | "gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" }, 15 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 16 | "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, 17 | "matchit.zip": { "branch": "master", "commit": "60067c225e3656d9c72fe42c9173777d2d8ff35b" }, 18 | "mini.indentscope": { "branch": "main", "commit": "8af2569a7d7fd37300dfa760e44e71efbbf322fd" }, 19 | "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, 20 | "neoconf.nvim": { "branch": "main", "commit": "424abe9dfbc91cdaf186551ec482b7dbc3915b6e" }, 21 | "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, 22 | "neoformat": { "branch": "master", "commit": "33cab6962999ca74824ee6dc6e627f406139d6ee" }, 23 | "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, 24 | "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, 25 | "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, 26 | "nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" }, 27 | "nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" }, 28 | "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, 29 | "nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" }, 30 | "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, 31 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "b0debd5c424969b4baeabdc8f54db3036c691732" }, 32 | "nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" }, 33 | "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 34 | "quickfix-reflector.vim": { "branch": "master", "commit": "6a6a9e28e1713b9e9db99eec1e6672e5666c01b9" }, 35 | "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, 36 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, 37 | "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, 38 | "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, 39 | "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, 40 | "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, 41 | "vim-better-whitespace": { "branch": "master", "commit": "de99b55a6fe8c96a69f9376f16b1d5d627a56e81" }, 42 | "vim-cpp-enhanced-highlight": { "branch": "master", "commit": "4b7314a497ea2dd0a6911ccb94ce83b2d8684617" }, 43 | "vim-fswitch": { "branch": "master", "commit": "94acdd8bc92458d3bf7e6557df8d93b533564491" }, 44 | "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, 45 | "vim-llvm": { "branch": "master", "commit": "7bb02ef3c6c41aa5510d4aa9817fd40936be8209" }, 46 | "vim-lsp-ale": { "branch": "master", "commit": "db0f9a8a33c0480988dc420cd2fba8a07743e4a4" }, 47 | "vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" }, 48 | "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, 49 | "vim-sexp": { "branch": "master", "commit": "14464d4580af43424ed8f2614d94e62bfa40bb4d" }, 50 | "vim-sexp-mappings-for-regular-people": { "branch": "master", "commit": "cc5923e357373ea6ef0c13eae82f44e6b9b1d374" }, 51 | "vim-surround": { "branch": "master", "commit": "aeb933272e72617f7c4d35e1f003be16836b948d" }, 52 | "vim-visual-increment": { "branch": "master", "commit": "0e55bb4054cdd5eefc0bb870f3e3c249673817cb" } 53 | } 54 | -------------------------------------------------------------------------------- /lua/config/buffer.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | opt.modeline = false 4 | -- Work nicely with the system clipboard 5 | opt.clipboard = "unnamedplus" 6 | -------------------------------------------------------------------------------- /lua/config/clojure.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | autocmd BufNewFile,BufRead *.jank setfiletype clojure 3 | 4 | " How many lines to consider for indentation correctness; it's large. 5 | let g:clojure_maxlines = 10000 6 | 7 | " Line up doc strings vertically. 8 | let g:clojure_align_multiline_strings = 1 9 | 10 | " Detect which bodies to indent, rather than hang. 11 | let g:clojure_fuzzy_indent = 1 12 | let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let', '^box', '^h-box', '^v-box', '^fn\*', '^when-'] 13 | 14 | " Conjure options. 15 | let g:conjure_log_direction = "horizontal" 16 | let g:conjure#log#botright = "false" 17 | let g:conjure_log_blacklist = ["up", "ret", "ret-multiline", "load-file", "eval"] 18 | let g:conjure_log_size_small = 25 19 | let g:conjure_log_size_large = 25 20 | ]]) 21 | -------------------------------------------------------------------------------- /lua/config/cpp.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | " Header guards on new .h files 3 | function! s:insert_gates() 4 | execute "normal! i#pragma once" 5 | normal! gg 6 | endfunction 7 | autocmd! BufNewFile *.{h,hpp} call s:insert_gates() 8 | 9 | let g:cpp_class_scope_highlight = 1 10 | let g:cpp_member_variable_highlight = 1 11 | let g:cpp_class_decl_highlight = 1 12 | let g:cpp_posix_standard = 1 13 | let g:cpp_experimental_template_highlight = 1 14 | let g:cpp_concepts_highlight = 1 15 | ]]) 16 | -------------------------------------------------------------------------------- /lua/config/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local options = { 4 | icons = { 5 | diagnostics = { 6 | Error = " ", 7 | Warn = " ", 8 | Hint = " ", 9 | Info = " ", 10 | }, 11 | git = { 12 | added = " ", 13 | modified = " ", 14 | removed = " ", 15 | }, 16 | kinds = { 17 | Array = " ", 18 | Boolean = " ", 19 | Class = " ", 20 | Color = " ", 21 | Constant = " ", 22 | Constructor = " ", 23 | Copilot = " ", 24 | Enum = " ", 25 | EnumMember = " ", 26 | Event = " ", 27 | Field = " ", 28 | File = " ", 29 | Folder = " ", 30 | Function = " ", 31 | Interface = " ", 32 | Key = " ", 33 | Keyword = " ", 34 | Method = " ", 35 | Module = " ", 36 | Namespace = " ", 37 | Null = "ﳠ ", 38 | Number = " ", 39 | Object = " ", 40 | Operator = " ", 41 | Package = " ", 42 | Property = " ", 43 | Reference = " ", 44 | Snippet = " ", 45 | String = " ", 46 | Struct = " ", 47 | Text = " ", 48 | TypeParameter = " ", 49 | Unit = " ", 50 | Value = " ", 51 | Variable = " ", 52 | }, 53 | }, 54 | } 55 | 56 | setmetatable(M, { 57 | __index = function(_, key) 58 | return vim.deepcopy(options)[key] 59 | end, 60 | }) 61 | 62 | return M 63 | -------------------------------------------------------------------------------- /lua/config/json.lua: -------------------------------------------------------------------------------- 1 | vim.api.nvim_create_autocmd({"FileType"}, { 2 | pattern = {"json"}, 3 | command = "set formatprg=jq", 4 | }) 5 | -------------------------------------------------------------------------------- /lua/config/lsp.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | " Automatically open and close the popup menu / preview window 3 | au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif 4 | 5 | " Completion window showing 6 | " menu: show all possible completions 7 | " menuone: show even when there is a single option 8 | " preview: show extra info in the preview window 9 | set completeopt=menuone,menu,preview 10 | 11 | " Syntastic 12 | "set statusline+=%#warningmsg# 13 | "set statusline+=%{SyntasticStatuslineFlag()} 14 | "set statusline+=%* 15 | 16 | " Close preview once completion is finished. 17 | autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif 18 | 19 | " Only run linters named in ale_linters settings. 20 | let g:ale_linters_explicit = 1 21 | " A markdown linter I sometimes use: 'vale' 22 | let g:ale_linters = { 'javascript': ['vim-lsp', 'eslint'], 'sh': ['vim-lsp', 'shellcheck'], 'markdown': [] } 23 | let g:ale_c_build_dir_names = ["build"] 24 | let g:ale_sh_shellcheck_options = '-o all' 25 | ]]) 26 | -------------------------------------------------------------------------------- /lua/config/markdown.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | let g:vim_markdown_frontmatter = 1 3 | let g:vim_markdown_strikethrough = 1 4 | let g:vim_markdown_new_list_item_indent = 2 5 | let g:vim_markdown_no_extensions_in_markdown = 1 6 | let g:vim_markdown_folding_disabled = 1 7 | 8 | function! s:enable_markdown_folding() 9 | setlocal foldlevelstart=1 10 | setlocal foldenable 11 | ownsyntax off 12 | endfunction 13 | autocmd! FileType markdown call s:enable_markdown_folding() 14 | ]]) 15 | -------------------------------------------------------------------------------- /lua/config/motion.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | " Number formats, for incrementing 3 | set nrformats=octal,hex 4 | 5 | " Use a short timeout for incomplete mappings 6 | set ttimeout 7 | set ttimeoutlen=500 8 | 9 | " Highlight the current line 10 | set cursorline 11 | 12 | " Ignore full page jumps, since I accidentally hit it when wanting C-v. 13 | nnoremap 14 | 15 | " Go to file in a new tab 16 | nnoremap gF gF 17 | 18 | " Delete lines without adding them to the yank stack 19 | nnoremap ,d "_d 20 | vnoremap ,d "_d 21 | 22 | " Paste from the yank buffer 23 | nnoremap ,p "0p 24 | vnoremap ,p "0p 25 | nnoremap ,P "0P 26 | vnoremap ,P "0P 27 | 28 | nnoremap Y y$ 29 | 30 | " Delete comment character(s) when joining commented lines 31 | set formatoptions+=j 32 | 33 | " Move based on display lines 34 | noremap k gk 35 | noremap j gj 36 | noremap 0 g0 37 | noremap $ g$ 38 | 39 | " Try not to use escape 40 | inoremap jk 41 | inoremap kj 42 | ]]) 43 | -------------------------------------------------------------------------------- /lua/config/options.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = " " 2 | vim.g.maplocalleader = " " 3 | 4 | local opt = vim.opt 5 | 6 | opt.autowrite = true -- Enable auto write 7 | opt.clipboard = "unnamedplus" -- Sync with system clipboard 8 | opt.colorcolumn = "101,101" 9 | opt.completeopt = "menu,menuone,noselect" 10 | opt.conceallevel = 3 -- Hide * markup for bold and italic 11 | opt.confirm = true -- Confirm to save changes before exiting modified buffer 12 | opt.cursorline = true -- Enable highlighting of the current line 13 | opt.expandtab = true -- Use spaces instead of tabs 14 | opt.formatoptions = "jcroqlnt" -- tcqj 15 | opt.grepformat = "%f:%l:%c:%m" 16 | opt.grepprg = "ag --smart-case --vimgrep" 17 | opt.hlsearch = false 18 | opt.ignorecase = true -- Ignore case 19 | opt.inccommand = "nosplit" -- preview incremental substitute 20 | opt.laststatus = 0 21 | --opt.list = true -- Show some invisible characters (tabs... 22 | opt.mouse = "a" -- Enable mouse mode 23 | opt.mousemodel = "extend" 24 | opt.number = true -- Print line number 25 | opt.pumblend = 10 -- Popup blend 26 | opt.pumheight = 10 -- Maximum number of entries in a popup 27 | opt.relativenumber = false -- Relative line numbers 28 | opt.scrolloff = 4 -- Lines of context 29 | opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } 30 | opt.shiftround = true -- Round indent 31 | opt.shiftwidth = 2 -- Size of an indent 32 | opt.shortmess:append { W = true, I = true, c = true } 33 | opt.showmode = false -- Dont show mode since we have a statusline 34 | opt.sidescrolloff = 8 -- Columns of context 35 | opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time 36 | opt.smartcase = true -- Don't ignore case with capitals 37 | opt.smartindent = true -- Insert indents automatically 38 | opt.spelllang = { "en" } 39 | opt.splitbelow = false -- Put new windows below current 40 | opt.splitright = true -- Put new windows right of current 41 | opt.tabstop = 2 -- Number of spaces tabs count for 42 | opt.termguicolors = true -- True color support 43 | opt.undofile = true 44 | opt.undolevels = 10000 45 | opt.updatetime = 200 -- Save swap file and trigger CursorHold 46 | opt.wildmode = "longest:full,full" -- Command-line completion mode 47 | opt.winminwidth = 5 -- Minimum window width 48 | opt.wrap = true -- Line wrap 49 | 50 | if vim.fn.has("nvim-0.9.0") == 1 51 | then 52 | opt.splitkeep = "screen" 53 | opt.shortmess:append { C = true } 54 | end 55 | 56 | -- Fix markdown indentation settings 57 | vim.g.markdown_recommended_style = 0 58 | -------------------------------------------------------------------------------- /lua/config/save.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | " Automatically reload files from disk 3 | set autoread 4 | if has('nvim') 5 | " NeoVim doesn't check for changed files automatically. For now, hack it in. 6 | " This only works with a GUI though. 7 | " https://github.com/neovim/neovim/issues/1936 8 | au FocusGained * :checktime 9 | endif 10 | 11 | set noswapfile 12 | set nobackup 13 | set nowritebackup 14 | set directory=/tmp 15 | 16 | " Persist undo history. 17 | if !isdirectory($HOME . "/.vim-undo") 18 | call mkdir($HOME . "/.vim-undo", "", 0700) 19 | endif 20 | set undodir=~/.vim-undo 21 | set undofile 22 | 23 | " Don't unload abandoned buffers 24 | set hidden 25 | 26 | set history=1000 27 | 28 | " Tell vim to remember certain things when we exit 29 | " '10 : marks will be remembered for up to 10 previously edited files 30 | " "100 : will save up to 100 lines for each register 31 | " :20 : up to 20 lines of command-line history will be remembered 32 | " % : saves and restores the buffer list 33 | " n... : where to save the viminfo files 34 | if has('nvim') 35 | set viminfo='10,<100,:20,%,n~/.nviminfo 36 | else 37 | set viminfo='10,\"100,:20,%,n~/.viminfo 38 | endif 39 | 40 | function! ResCur() 41 | if line("'\"") <= line("$") && !&diff 42 | normal! g`" 43 | return 1 44 | endif 45 | endfunction 46 | augroup resCur 47 | autocmd! 48 | autocmd BufWinEnter * call ResCur() 49 | augroup END 50 | 51 | " Allow saving as root 52 | command! Wsudo w !sudo -S tee % > /dev/null 53 | 54 | " Common typos 55 | command! W w 56 | command! Wa wa 57 | command! Wq wq 58 | command! Wqa wqa 59 | 60 | " Make the proper directories when writing a file 61 | function! s:MkNonExDir(file, buf) 62 | if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/' 63 | let dir=fnamemodify(a:file, ':h') 64 | if !isdirectory(dir) 65 | call mkdir(dir, 'p') 66 | endif 67 | endif 68 | endfunction 69 | augroup BWCCreateDir 70 | autocmd! 71 | autocmd BufWritePre * :call s:MkNonExDir(expand(''), +expand('')) 72 | augroup END 73 | ]]) 74 | -------------------------------------------------------------------------------- /lua/config/search.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | " No highlights after searches 3 | set nohls 4 | " Search while typing 5 | set incsearch 6 | 7 | " Ignore case (but be smart) 8 | set ignorecase 9 | set smartcase 10 | 11 | " Ignore certain patterns while searching 12 | set wildignore+=target,out,build_debug,build_release,build 13 | set wildignore+=Library,*.csproject,*.meta 14 | set wildignore+=_site,vendor,node_modules 15 | set wildignore+=*.o,*.d,*.a,*.c3b,*.ccz,Resource,*.jar,*.strings,*.plist,*.filters 16 | set wildignore+=*.xcscheme,*.xcworkspacedata,*.xcscmblueprint,*.properties,*.keystore 17 | set wildignore+=boost_*,googletest,protobuf,Frameworks,*.framework 18 | set wildignore+=*.vcxitems,*.xib,*.nib,*.pbxproj,*.xcuserstate,*.props 19 | set wildignore+=*.apk,*.iml 20 | set wildignore+=*.ogg,*.wav,*.mp3,*.mid,*.png,*.jpg,*.jpeg 21 | 22 | """ CtrlP 23 | " Don't change cwd while I move around 24 | let g:ctrlp_working_path_mode = 'rw' 25 | 26 | " Don't limit results as much 27 | let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:20' 28 | let g:ctrlp_max_files = 0 29 | let g:ctrlp_max_depth = 100 30 | 31 | " Allow easy opening of multiple files in tabs 32 | let g:ctrlp_open_multiple_files = 't' 33 | 34 | " Follow symlinks, but don't loop 35 | let g:ctrlp_follow_symlinks = 1 36 | 37 | " Use a faster matcher for CtrlP 38 | if !has('python') && !has('python3') 39 | echo 'In order to use pymatcher plugin, you need +python compiled vim' 40 | else 41 | let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' } 42 | endif 43 | 44 | " Ignore files in .gitignore 45 | let g:ctrlp_user_command = ['.git', 'cd %s; git ls-files . -co --exclude-standard; for submodule in $(git submodule status | rev | cut -d" " -f2 | rev); do cd "$submodule"; git ls-files . -co --exclude-standard | sed "s#^#$submodule/#"; cd "$OLDPWD"; done', 'find %s -type f'] 46 | 47 | " Keep file cache between sessions 48 | let g:ctrlp_clear_cache_on_exit = 0 49 | 50 | let g:ctrlp_extensions = ['line'] 51 | 52 | " Fuzzy find in the current file 53 | nnoremap :execute 'CtrlPLine ' . (expand('%')) 54 | 55 | """ Ack/Ag 56 | let g:ackprg = 'ag --smart-case --vimgrep' 57 | 58 | " Don't jump to first result 59 | cnoreabbrev Ag Ack! 60 | let g:ackhighlight = 0 61 | 62 | " Disable terminal output of ag as it runs 63 | set shellpipe=> 64 | 65 | nnoremap :Ack! 66 | 67 | " Count word occurrences in a file 68 | map ,* *:%s///gn 69 | 70 | " Use tags, when present 71 | set tags+=tags;$HOME 72 | ]]) 73 | -------------------------------------------------------------------------------- /lua/config/terminal.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | vim.cmd([[ 4 | tnoremap 5 | tnoremap jk 6 | tnoremap kj 7 | ]]) 8 | -------------------------------------------------------------------------------- /lua/config/ui.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | -- Color conceal characters nicely 4 | opt.conceallevel = 2 5 | 6 | -- Improves speed of drawing and smoothness of scrolling 7 | opt.ttyfast = true 8 | -- Noice cannot have this be true 9 | opt.lazyredraw = false 10 | 11 | vim.cmd([[ 12 | hi Conceal guifg=green ctermfg=green 13 | 14 | " Show incomplete commands as I type 15 | set showcmd 16 | 17 | " Show command completion with tab 18 | set wildmenu 19 | 20 | " GUI tabs 21 | nnoremap ,t :tabnew 22 | nnoremap :tabn 23 | nnoremap :tabp 24 | nnoremap :execute 'silent! tabmove ' . (tabpagenr()-2) 25 | nnoremap :execute 'silent! tabmove ' . (tabpagenr()+1) 26 | 27 | " Allow a lot of tabs to be opened by -p 28 | set tabpagemax=50 29 | 30 | " Allow tab duplication 31 | function! s:copy_tab() 32 | tabnew %:p 33 | endfunction! 34 | nnoremap ,T :call copy_tab() 35 | 36 | " No visual bell 37 | set noerrorbells 38 | set visualbell t_vb= 39 | au GuiEnter * set visualbell t_vb= 40 | 41 | " Enable mouse 42 | set mouse=a 43 | set mousemodel=popup_setpos 44 | 45 | " Unixy pasting 46 | noremap! 47 | 48 | " Disable arrow keys 49 | nnoremap 50 | nnoremap 51 | nnoremap 52 | nnoremap 53 | 54 | " Show line numbers 55 | set number 56 | " Don't show the current mode - it's already displayed by airline 57 | set noshowmode 58 | 59 | " UTF8 please 60 | if has('vim_starting') 61 | set fileencoding=utf-8 62 | set encoding=utf-8 63 | endif 64 | 65 | " Idle time before CursorHold is sent 66 | set updatetime=1000 67 | 68 | " 80 column 69 | let &colorcolumn="101,101" 70 | set synmaxcol=128 71 | 72 | " Enter in the quickfix window doesn't focus the new buffer. 73 | " This is convenient for quickly looking at code and following the 74 | " quickfix buffer without having to manually switch back. 75 | au BufReadPost quickfix noremap p 76 | 77 | if has('nvim') 78 | " Allow escaping terminal mode. 79 | tnoremap 80 | " Make terminal windows as big as possible. 81 | set scrollback=100000 82 | au BufWinEnter * if &buftype == 'terminal' | exec "resize " . &lines | endif 83 | endif 84 | ]]) 85 | 86 | -- UFO folding 87 | -- vim.o.foldcolumn = "1" -- '0' is not bad 88 | -- vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value 89 | -- vim.o.foldlevelstart = 99 90 | -- vim.o.foldenable = false 91 | -- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]] 92 | 93 | -- Normal folding 94 | --vim.o.foldcolumn = "0" 95 | --vim.wo.foldmethod = 'expr' 96 | --vim.o.foldlevelstart = 1 97 | --vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' 98 | -------------------------------------------------------------------------------- /lua/config/util.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.root_patterns = { ".git", "lua" } 4 | 5 | -- returns the root directory based on: 6 | -- * lsp workspace folders 7 | -- * lsp root_dir 8 | -- * root pattern of filename of the current buffer 9 | -- * root pattern of cwd 10 | ---@return string 11 | function M.get_root() 12 | ---@type string? 13 | local path = vim.api.nvim_buf_get_name(0) 14 | path = path ~= "" and vim.loop.fs_realpath(path) or nil 15 | ---@type string[] 16 | local roots = {} 17 | if path then 18 | for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do 19 | local workspace = client.config.workspace_folders 20 | local paths = workspace and vim.tbl_map(function(ws) 21 | return vim.uri_to_fname(ws.uri) 22 | end, workspace) or client.config.root_dir and { client.config.root_dir } or {} 23 | for _, p in ipairs(paths) do 24 | local r = vim.loop.fs_realpath(p) 25 | if path:find(r, 1, true) then 26 | roots[#roots + 1] = r 27 | end 28 | end 29 | end 30 | end 31 | table.sort(roots, function(a, b) 32 | return #a > #b 33 | end) 34 | ---@type string? 35 | local root = roots[1] 36 | if not root then 37 | path = path and vim.fs.dirname(path) or vim.loop.cwd() 38 | ---@type string? 39 | root = vim.fs.find(M.root_patterns, { path = path, upward = true })[1] 40 | root = root and vim.fs.dirname(root) or vim.loop.cwd() 41 | end 42 | ---@cast root string 43 | return root 44 | end 45 | 46 | -- this will return a function that calls telescope. 47 | -- cwd will default to get_root 48 | -- for `files`, git_files or find_files will be chosen depending on .git 49 | function M.telescope(builtin, opts) 50 | local params = { builtin = builtin, opts = opts } 51 | return function() 52 | builtin = params.builtin 53 | opts = params.opts 54 | --opts = vim.tbl_deep_extend("force", { cwd = M.get_root() }, opts or {}) 55 | opts = vim.tbl_deep_extend("force", { }, opts or {}) 56 | if builtin == "files" then 57 | if vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.git") then 58 | opts.show_untracked = true 59 | builtin = "git_files" 60 | else 61 | builtin = "find_files" 62 | end 63 | end 64 | require("telescope.builtin")[builtin](opts) 65 | end 66 | end 67 | 68 | 69 | function M.on_attach(on_attach) 70 | vim.api.nvim_create_autocmd("LspAttach", { 71 | callback = function(args) 72 | local buffer = args.buf 73 | local client = vim.lsp.get_client_by_id(args.data.client_id) 74 | on_attach(client, buffer) 75 | end, 76 | }) 77 | end 78 | 79 | function M.has(plugin) 80 | return require("lazy.core.config").plugins[plugin] ~= nil 81 | end 82 | 83 | function M.on_very_lazy(fn) 84 | vim.api.nvim_create_autocmd("User", { 85 | pattern = "VeryLazy", 86 | callback = function() 87 | fn() 88 | end, 89 | }) 90 | end 91 | 92 | return M 93 | -------------------------------------------------------------------------------- /lua/config/wiki.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | function! MakeDiaryLink() 3 | return "~/vimwiki/diary/" . strftime('%Y-%m-%d') . ".md" 4 | endfunction 5 | 6 | nmap ww :e ~/vimwiki/index.md 7 | nmap wi :e ~/vimwiki/diary/diary.md 8 | nmap ww :exec "e " . MakeDiaryLink() 9 | ]]) 10 | -------------------------------------------------------------------------------- /lua/no-packages/empty.lua: -------------------------------------------------------------------------------- 1 | return {} 2 | -------------------------------------------------------------------------------- /lua/package-all/clojure.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tpope/vim-sexp-mappings-for-regular-people", 4 | dependencies = { "guns/vim-sexp" }, 5 | ft = "clojure", 6 | }, 7 | { "Olical/conjure", tag = "v4.52.1", ft = "clojure" }, 8 | -- Easily view JVM class files. 9 | --{ "udalov/javap-vim", ft = "java" }, 10 | --{ "vim-scripts/JavaDecompiler.vim" }, 11 | } 12 | -------------------------------------------------------------------------------- /lua/package-all/colorscheme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "vim-scripts/ebnf.vim" }, 3 | { 4 | "ellisonleao/gruvbox.nvim", 5 | config = function() 6 | --vim.cmd([[ 7 | -- let g:gruvbox_contrast_light = 'hard' 8 | -- autocmd ColorScheme * highlight Normal guibg=#FFFFFF 9 | -- set background=light 10 | -- set nocursorline 11 | --]]) 12 | vim.opt.scrolloff = 0 13 | vim.cmd.colorscheme("gruvbox") 14 | end 15 | }, 16 | --{ 17 | -- "catppuccin/nvim", 18 | -- name = "catppuccin", 19 | -- priority = 1000, 20 | -- config = function() 21 | -- vim.cmd([[ 22 | -- "autocmd ColorScheme * highlight Normal guibg=#FFFFFF 23 | -- set background=light 24 | -- set nocursorline 25 | -- ]]) 26 | -- --vim.cmd.colorscheme("catppuccin") 27 | -- end 28 | --} 29 | } 30 | -------------------------------------------------------------------------------- /lua/package-all/copilot.lua: -------------------------------------------------------------------------------- 1 | return { 2 | --{ "github/copilot.vim" }, 3 | { 4 | "CopilotC-Nvim/CopilotChat.nvim", 5 | branch = "canary", 6 | dependencies = { 7 | { "zbirenbaum/copilot.lua" }, -- or github/copilot.vim 8 | { "nvim-lua/plenary.nvim" }, -- for curl, log wrapper 9 | }, 10 | opts = { 11 | debug = true, -- Enable debugging 12 | -- See Configuration section for rest 13 | }, 14 | -- See Commands section for default commands if you want to lazy load on them 15 | config = function() 16 | require('copilot').setup({ 17 | panel = { 18 | enabled = false, 19 | auto_refresh = false, 20 | keymap = { 21 | jump_prev = "[[", 22 | jump_next = "]]", 23 | accept = "", 24 | refresh = "gr", 25 | open = "" 26 | }, 27 | layout = { 28 | position = "bottom", -- | top | left | right 29 | ratio = 0.4 30 | }, 31 | }, 32 | suggestion = { 33 | enabled = false, 34 | auto_trigger = false, 35 | debounce = 75, 36 | keymap = { 37 | accept = "", 38 | accept_word = false, 39 | accept_line = false, 40 | next = "", 41 | prev = "", 42 | dismiss = "", 43 | }, 44 | }, 45 | filetypes = { 46 | markdown = true, 47 | gitcommit = true, 48 | clojure = true, 49 | javascript = true, 50 | html = true, 51 | sh = true, 52 | ["*"] = false, 53 | }, 54 | copilot_node_command = 'node', -- Node.js version must be > 18.x 55 | server_opts_overrides = {}, 56 | }) 57 | require("CopilotChat").setup { 58 | debug = true, -- Enable debugging 59 | -- See Configuration section for rest 60 | } 61 | end 62 | }, 63 | { 64 | "zbirenbaum/copilot-cmp", 65 | config = function () 66 | require("copilot_cmp").setup() 67 | end 68 | }, 69 | } 70 | -------------------------------------------------------------------------------- /lua/package-all/cpp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "derekwyatt/vim-fswitch", 4 | ft = { "c", "cpp", "objc", "objcpp" }, 5 | keys = 6 | { 7 | -- TODO: C-z doesn't work with alacritty. :( 8 | { "", ":FSHere", desc = "Swap between header/source", silent = true }, 9 | }, 10 | config = function() 11 | --vim.g.fsnonewfiles = "on" 12 | vim.g.c_no_curly_error = 1 13 | end 14 | }, 15 | { 16 | "octol/vim-cpp-enhanced-highlight" 17 | }, 18 | 19 | --{ 20 | -- "puremourning/vimspector", 21 | -- config = function() 22 | -- vim.cmd([[ 23 | -- let g:vimspector_enable_mappings = 'HUMAN' 24 | -- nnoremap dl :call vimspector#Launch() 25 | -- nnoremap dr :call vimspector#Reset() 26 | -- nnoremap dc :call vimspector#Continue() 27 | 28 | -- nnoremap db :call vimspector#ToggleBreakpoint() 29 | -- nnoremap dB :call vimspector#ClearBreakpoints() 30 | 31 | -- " nmap dr VimspectorRestart 32 | -- nmap do VimspectorStepOut 33 | -- nmap di VimspectorStepInto 34 | -- nmap dn VimspectorStepOver 35 | -- ]]) 36 | -- end 37 | --} 38 | 39 | --{ 40 | -- "rcarriga/nvim-dap-ui", 41 | -- dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"}, 42 | -- config = function() 43 | -- local dap = require("dap") 44 | -- dap.adapters.gdb = { 45 | -- type = "executable", 46 | -- command = "gdb", 47 | -- args = { "--interpreter=dap", "--eval-command", "set print pretty on" } 48 | -- } 49 | -- dap.adapters.codelldb = { 50 | -- type = "server", 51 | -- port = "${port}", 52 | -- executable = { 53 | -- command = "codelldb", 54 | -- args = { "--port", "${port}" }, 55 | -- }, 56 | -- } 57 | -- dap.configurations.cpp = { 58 | -- --{ 59 | -- -- name = "Launch an executable", 60 | -- -- type = "gdb", 61 | -- -- request = "launch", 62 | -- -- cwd = "${workspaceFolder}", 63 | -- -- program = function() 64 | -- -- return coroutine.create(function(coro) 65 | -- -- local opts = {} 66 | -- -- pickers 67 | -- -- .new(opts, { 68 | -- -- prompt_title = "Path to executable", 69 | -- -- finder = finders.new_oneshot_job({ "fd", "--hidden", "--no-ignore", "--type", "x" }, {}), 70 | -- -- sorter = conf.generic_sorter(opts), 71 | -- -- attach_mappings = function(buffer_number) 72 | -- -- actions.select_default:replace(function() 73 | -- -- actions.close(buffer_number) 74 | -- -- coroutine.resume(coro, action_state.get_selected_entry()[1]) 75 | -- -- end) 76 | -- -- return true 77 | -- -- end, 78 | -- -- }) 79 | -- -- :find() 80 | -- -- end) 81 | -- -- end, 82 | -- --}, 83 | -- } 84 | -- local dapui = require("dapui") 85 | -- dap.listeners.after.event_initialized["dapui_config"]=function() 86 | -- dapui.open() 87 | -- end 88 | -- dap.listeners.before.event_terminated["dapui_config"]=function() 89 | -- dapui.close() 90 | -- end 91 | -- dap.listeners.before.event_exited["dapui_config"]=function() 92 | -- dapui.close() 93 | -- end 94 | -- dap.set_log_level('DEBUG') 95 | 96 | -- -- Nicer looking breakpoints. 97 | -- vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''}) 98 | -- vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''}) 99 | 100 | -- local n = "n" 101 | -- vim.keymap.set(n, 'dk', function() require('dap').continue() end) 102 | -- vim.keymap.set(n, 'di', function() require('dap').step_into() end) 103 | -- vim.keymap.set(n, 'do', function() require('dap').step_out() end) 104 | -- vim.keymap.set(n, 'dl', function() require('dap').run_last() end) 105 | -- vim.keymap.set(n, 'db', function() require('dap').toggle_breakpoint() end) 106 | -- vim.keymap.set(n, 'dr', function() require('dap').repl_open() end) 107 | -- vim.keymap.set(n, 'du', function() require('dapui').toggle() end) 108 | -- end 109 | --}, 110 | --{ 111 | -- "theHamsta/nvim-dap-virtual-text", 112 | -- opts = { 113 | -- commented = true 114 | -- } 115 | --} 116 | } 117 | -------------------------------------------------------------------------------- /lua/package-all/css.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | 'brenoprata10/nvim-highlight-colors', 4 | config = function() 5 | require('nvim-highlight-colors').setup({ 6 | render = 'virtual' 7 | }) 8 | end 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lua/package-all/d2.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "terrastruct/d2-vim" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lua/package-all/format.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "sbdchd/neoformat", 4 | ft = { "c", "cpp" }, 5 | config = function() 6 | vim.cmd([[ 7 | let g:neoformat_enabled_cpp = ['clangformat'] 8 | let g:neoformat_enabled_c = ['clangformat'] 9 | let g:neoformat_only_msg_on_error = 1 10 | 11 | let g:neoformat_cpp_clangformat = { 12 | \ 'exe': 'clang-format', 13 | \ 'args': ['-assume-filename=' . expand('"%"')], 14 | \ 'stdin': 1, 15 | \ } 16 | 17 | augroup fmt 18 | autocmd! 19 | autocmd BufWritePre * undojoin | Neoformat 20 | augroup END 21 | 22 | command NeoformatDisable execute 'let g:neoformat_enabled_cpp = []' 23 | ]]) 24 | end 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /lua/package-all/git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tpope/vim-fugitive" 4 | } 5 | --{ 6 | -- "TimUntersberger/neogit", 7 | -- dependencies = 8 | -- { 9 | -- "nvim-lua/plenary.nvim", 10 | -- "sindrets/diffview.nvim", 11 | -- }, 12 | -- opts = 13 | -- { 14 | -- integrations = 15 | -- { 16 | -- diffview = true, 17 | -- }, 18 | -- }, 19 | -- config = function() 20 | -- -- TODO: Look into why this doesn't work. 21 | -- vim.cmd([[ 22 | -- "hi def NeogitDiffAddHighlight guibg=#404040 guifg=#859900 23 | -- hi! link NeogitDiffAddHighlight GruvboxGreen 24 | -- "hi def NeogitDiffDeleteHighlight guibg=#404040 guifg=#dc322f 25 | -- hi! link NeogitDiffDeleteHighlight GruvboxRed 26 | -- "hi def NeogitDiffContextHighlight guibg=#333333 guifg=#b2b2b2 27 | -- "hi def NeogitHunkHeader guifg=#cccccc guibg=#404040 28 | -- "hi def NeogitHunkHeaderHighlight guifg=#cccccc guibg=#4d4d4d 29 | -- ]]) 30 | -- end 31 | --}, 32 | } 33 | -------------------------------------------------------------------------------- /lua/package-all/lazy.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "folke/lazy.nvim", version = "*" }, 3 | } 4 | -------------------------------------------------------------------------------- /lua/package-all/lint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- better diagnostics list and others 3 | { 4 | "folke/trouble.nvim", 5 | cmd = { "TroubleToggle", "Trouble" }, 6 | opts = { use_diagnostic_signs = true }, 7 | keys = function() 8 | return { 9 | { "xx", "TroubleToggle document_diagnostics", desc = "Document Diagnostics (Trouble)" }, 10 | { "xX", "TroubleToggle workspace_diagnostics", desc = "Workspace Diagnostics (Trouble)" }, 11 | { "xL", "TroubleToggle loclist", desc = "Location List (Trouble)" }, 12 | { "xQ", "TroubleToggle quickfix", desc = "Quickfix List (Trouble)" }, 13 | { 14 | "[Q", 15 | function() 16 | if require("trouble").is_open() then 17 | require("trouble").first({ skip_groups = true, jump = true }) 18 | else 19 | vim.cmd.cfirst() 20 | end 21 | end, 22 | desc = "First trouble/quickfix item", 23 | }, 24 | { 25 | "[q", 26 | function() 27 | if require("trouble").is_open() then 28 | require("trouble").previous({ skip_groups = true, jump = true }) 29 | else 30 | vim.cmd.cprev() 31 | end 32 | end, 33 | desc = "Previous trouble/quickfix item", 34 | }, 35 | { 36 | "]q", 37 | function() 38 | if require("trouble").is_open() then 39 | require("trouble").next({ skip_groups = true, jump = true }) 40 | else 41 | vim.cmd.cnext() 42 | end 43 | end, 44 | desc = "Next trouble/quickfix item", 45 | }, 46 | { 47 | "]Q", 48 | function() 49 | if require("trouble").is_open() then 50 | require("trouble").last({ skip_groups = true, jump = true }) 51 | else 52 | vim.cmd.clast() 53 | end 54 | end, 55 | desc = "Last trouble/quickfix item", 56 | }, 57 | } 58 | end, 59 | }, 60 | 61 | -- todo comments 62 | { 63 | "folke/todo-comments.nvim", 64 | cmd = { "TodoTrouble", "TodoTelescope" }, 65 | event = { "BufReadPost", "BufNewFile" }, 66 | config = true, 67 | -- stylua: ignore 68 | keys = { 69 | { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, 70 | { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, 71 | { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, 72 | { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, 73 | { "st", "TodoTelescope", desc = "Todo" }, 74 | }, 75 | }, 76 | } 77 | -------------------------------------------------------------------------------- /lua/package-all/llvm.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "rhysd/vim-llvm", ft = "llvm" } 3 | } 4 | -------------------------------------------------------------------------------- /lua/package-all/lsp.lua: -------------------------------------------------------------------------------- 1 | local function has_words_before() 2 | unpack = unpack or table.unpack 3 | local line, col = unpack(vim.api.nvim_win_get_cursor(0)) 4 | return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil 5 | end 6 | local function words_before() 7 | unpack = unpack or table.unpack 8 | local line, col = unpack(vim.api.nvim_win_get_cursor(0)) 9 | return vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') 10 | end 11 | 12 | return { 13 | { 14 | 'neovim/nvim-lspconfig', 15 | event = { "BufReadPre", "BufNewFile" }, 16 | dependencies = { 17 | { "folke/neoconf.nvim", cmd = "Neoconf", config = true }, 18 | { "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } }, 19 | --{ 20 | -- "L3MON4D3/LuaSnip", 21 | -- version = ".*", 22 | -- --build = "make install_jsregexp" 23 | --}, 24 | }, 25 | opts = { 26 | -- options for vim.diagnostic.config() 27 | diagnostics = { 28 | underline = true, 29 | update_in_insert = false, 30 | virtual_text = { spacing = 2, prefix = "●" }, 31 | severity_sort = true, 32 | }, 33 | -- Automatically format on save 34 | autoformat = true, 35 | -- options for vim.lsp.buf.format 36 | -- `bufnr` and `filter` is handled by the LazyVim formatter, 37 | -- but can be also overridden when specified 38 | format = { 39 | formatting_options = nil, 40 | timeout_ms = nil, 41 | }, 42 | }, 43 | servers = { 44 | jsonls = {}, 45 | lua_ls = { 46 | mason = false, 47 | settings = { 48 | Lua = { 49 | workspace = { 50 | checkThirdParty = false, 51 | }, 52 | completion = { 53 | callSnippet = "Replace", 54 | }, 55 | }, 56 | }, 57 | }, 58 | --clojure_lsp = {}, 59 | clangd = { 60 | -- Use system clangd, not one from mason. 61 | -- https://discourse.nixos.org/t/clang-clang-and-clangd-cant-find-headers-even-with-compile-commands-json/54657/2 62 | mason = false, 63 | }, 64 | --tsserver = {}, 65 | eslint = {}, 66 | }, 67 | config = function() 68 | -- Add additional capabilities supported by nvim-cmp 69 | local capabilities = require('cmp_nvim_lsp').default_capabilities() 70 | 71 | local opts = { noremap=true, silent=true } 72 | vim.api.nvim_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) 73 | vim.api.nvim_set_keymap('n', '[d', 'lua vim.diagnostic.goto_prev()', opts) 74 | vim.api.nvim_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) 75 | vim.api.nvim_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) 76 | 77 | -- Use an on_attach function to only map the following keys 78 | -- after the language server attaches to the current buffer 79 | local on_attach = function(_client, bufnr) 80 | -- Enable completion triggered by 81 | vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') 82 | 83 | -- Mappings. 84 | -- See `:help vim.lsp.*` for documentation on any of the below functions 85 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) 86 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) 87 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) 88 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) 89 | --vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) 90 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) 91 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) 92 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) 93 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) 94 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) 95 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) 96 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) 97 | vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', opts) 98 | end 99 | 100 | local lspconfig = require('lspconfig') 101 | lspconfig.clangd.setup { 102 | capabilities = capabilities, 103 | on_attach = on_attach, 104 | init_options = { 105 | compilationDatabaseDirectory = "build"; 106 | index = { 107 | threads = 0; 108 | }; 109 | clang = { 110 | excludeArgs = {}; 111 | }; 112 | } 113 | } 114 | 115 | --lspconfig.tsserver.setup { 116 | -- on_attach = on_attach, 117 | -- capabilities = capabilities, 118 | -- filetypes = { "typescript", "typescriptreact", "typescript.tsx" }, 119 | -- cmd = { "typescript-language-server", "--stdio" } 120 | --} 121 | 122 | lspconfig.eslint.setup { 123 | on_attach = on_attach, 124 | capabilities = capabilities, 125 | filetypes = { "javascript" }, 126 | cmd = { "vscode-eslint-language-server", "--stdio" }, 127 | } 128 | 129 | lspconfig.clojure_lsp.setup{ 130 | capabilities = capabilities, 131 | on_attach = on_attach 132 | } 133 | 134 | end 135 | }, 136 | { 137 | "hrsh7th/nvim-cmp", 138 | version = false, -- last release is way too old 139 | event = "InsertEnter", 140 | dependencies = { 141 | "hrsh7th/cmp-nvim-lsp", 142 | "hrsh7th/cmp-buffer", 143 | "hrsh7th/cmp-path", 144 | "saadparwaiz1/cmp_luasnip", 145 | }, 146 | opts = function() 147 | local cmp = require("cmp") 148 | return { 149 | completion = { 150 | completeopt = "menu,menuone,noselect", 151 | }, 152 | snippet = { 153 | expand = function(args) 154 | require("luasnip").lsp_expand(args.body) 155 | end, 156 | }, 157 | mapping = cmp.mapping.preset.insert({ 158 | [""] = cmp.mapping.confirm({ select = true }), 159 | [''] = cmp.mapping.scroll_docs(-4), 160 | [''] = cmp.mapping.scroll_docs(4), 161 | [''] = cmp.mapping.complete(), 162 | [''] = cmp.mapping.confirm { 163 | behavior = cmp.ConfirmBehavior.Replace, 164 | select = false, 165 | }, 166 | [''] = cmp.mapping(function(fallback) 167 | if cmp.visible() then 168 | cmp.select_next_item() 169 | elseif has_words_before() then 170 | cmp.complete() 171 | else 172 | fallback() 173 | end 174 | end, { 'i', 's' }), 175 | [''] = cmp.mapping(function(fallback) 176 | if cmp.visible() then 177 | cmp.select_prev_item() 178 | else 179 | fallback() 180 | end 181 | end, { 'i', 's' }), 182 | }), 183 | sources = cmp.config.sources({ 184 | { name = "nvim_lsp" }, 185 | { name = "luasnip" }, 186 | { name = "buffer" }, 187 | { name = "path" }, 188 | { name = "copilot" }, 189 | }), 190 | formatting = { 191 | format = function(_, item) 192 | local icons = require("config").icons.kinds 193 | if icons[item.kind] then 194 | item.kind = icons[item.kind] .. item.kind 195 | end 196 | return item 197 | end, 198 | }, 199 | experimental = { 200 | ghost_text = { 201 | hl_group = "LspCodeLens", 202 | }, 203 | }, 204 | } 205 | end, 206 | }, 207 | -- Linting 208 | { 'dense-analysis/ale' }, 209 | -- Syncing ALE with nvim-lsp 210 | { 'rhysd/vim-lsp-ale' }, 211 | 212 | ---- lspconfig 213 | --{ 214 | -- "neovim/nvim-lspconfig", 215 | -- event = { "BufReadPre", "BufNewFile" }, 216 | -- dependencies = { 217 | -- { "folke/neoconf.nvim", cmd = "Neoconf", config = true }, 218 | -- { "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } }, 219 | -- "mason.nvim", 220 | -- "williamboman/mason-lspconfig.nvim", 221 | -- { 222 | -- "hrsh7th/cmp-nvim-lsp", 223 | -- cond = function() 224 | -- return require("config.util").has("nvim-cmp") 225 | -- end, 226 | -- }, 227 | -- }, 228 | -- ---@class PluginLspOpts 229 | -- opts = { 230 | -- -- options for vim.diagnostic.config() 231 | -- diagnostics = { 232 | -- underline = true, 233 | -- update_in_insert = false, 234 | -- virtual_text = { spacing = 2, prefix = "●" }, 235 | -- severity_sort = true, 236 | -- }, 237 | -- -- Automatically format on save 238 | -- autoformat = true, 239 | -- -- options for vim.lsp.buf.format 240 | -- -- `bufnr` and `filter` is handled by the LazyVim formatter, 241 | -- -- but can be also overridden when specified 242 | -- format = { 243 | -- formatting_options = nil, 244 | -- timeout_ms = nil, 245 | -- }, 246 | -- -- LSP Server Settings 247 | -- ---@type lspconfig.options 248 | -- servers = { 249 | -- jsonls = {}, 250 | -- lua_ls = { 251 | -- -- mason = false, -- set to false if you don't want this server to be installed with mason 252 | -- settings = { 253 | -- Lua = { 254 | -- workspace = { 255 | -- checkThirdParty = false, 256 | -- }, 257 | -- completion = { 258 | -- callSnippet = "Replace", 259 | -- }, 260 | -- }, 261 | -- }, 262 | -- }, 263 | -- clojure_lsp = {}, 264 | -- clangd = {}, 265 | -- }, 266 | -- -- you can do any additional lsp server setup here 267 | -- -- return true if you don't want this server to be setup with lspconfig 268 | -- ---@type table 269 | -- setup = { 270 | -- -- example to setup with typescript.nvim 271 | -- -- tsserver = function(_, opts) 272 | -- -- require("typescript").setup({ server = opts }) 273 | -- -- return true 274 | -- -- end, 275 | -- -- Specify * to use this function as a fallback for any server 276 | -- -- ["*"] = function(server, opts) end, 277 | -- }, 278 | -- }, 279 | -- ---@param opts PluginLspOpts 280 | -- config = function(plugin, opts) 281 | -- -- diagnostics 282 | -- for name, icon in pairs(require("config").icons.diagnostics) do 283 | -- name = "DiagnosticSign" .. name 284 | -- vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) 285 | -- end 286 | -- vim.diagnostic.config(opts.diagnostics) 287 | 288 | -- local servers = opts.servers 289 | -- local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) 290 | 291 | -- local function setup(server) 292 | -- local server_opts = vim.tbl_deep_extend("force", { 293 | -- capabilities = vim.deepcopy(capabilities), 294 | -- }, servers[server] or {}) 295 | 296 | -- if opts.setup[server] then 297 | -- if opts.setup[server](server, server_opts) then 298 | -- return 299 | -- end 300 | -- elseif opts.setup["*"] then 301 | -- if opts.setup["*"](server, server_opts) then 302 | -- return 303 | -- end 304 | -- end 305 | -- require("lspconfig")[server].setup(server_opts) 306 | -- end 307 | 308 | -- -- temp fix for lspconfig rename 309 | -- -- https://github.com/neovim/nvim-lspconfig/pull/2439 310 | -- local mappings = require("mason-lspconfig.mappings.server") 311 | -- if not mappings.lspconfig_to_package.lua_ls then 312 | -- mappings.lspconfig_to_package.lua_ls = "lua-language-server" 313 | -- mappings.package_to_lspconfig["lua-language-server"] = "lua_ls" 314 | -- end 315 | 316 | -- local mlsp = require("mason-lspconfig") 317 | -- local available = mlsp.get_available_servers() 318 | 319 | -- local ensure_installed = {} ---@type string[] 320 | -- for server, server_opts in pairs(servers) do 321 | -- if server_opts then 322 | -- server_opts = server_opts == true and {} or server_opts 323 | -- -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig 324 | -- if server_opts.mason == false or not vim.tbl_contains(available, server) then 325 | -- setup(server) 326 | -- else 327 | -- ensure_installed[#ensure_installed + 1] = server 328 | -- end 329 | -- end 330 | -- end 331 | 332 | -- require("mason-lspconfig").setup({ ensure_installed = ensure_installed }) 333 | -- require("mason-lspconfig").setup_handlers({ setup }) 334 | -- end, 335 | --}, 336 | 337 | ---- formatters 338 | --{ 339 | -- "jose-elias-alvarez/null-ls.nvim", 340 | -- event = { "BufReadPre", "BufNewFile" }, 341 | -- dependencies = { "mason.nvim" }, 342 | -- opts = function() 343 | -- local nls = require("null-ls") 344 | -- return { 345 | -- sources = { 346 | -- nls.builtins.diagnostics.clj_kondo, 347 | -- nls.builtins.diagnostics.cmake_lint, 348 | -- nls.builtins.diagnostics.jsonlint, 349 | -- nls.builtins.diagnostics.markdownlint, 350 | -- nls.builtins.diagnostics.shellcheck, 351 | -- }, 352 | -- } 353 | -- end, 354 | --}, 355 | 356 | ---- cmdline tools and lsp servers 357 | --{ 358 | -- "williamboman/mason.nvim", 359 | -- cmd = "Mason", 360 | -- keys = { { "cm", "Mason", desc = "Mason" } }, 361 | -- opts = { 362 | -- ensure_installed = { 363 | -- "shellcheck", 364 | -- "clojure-lsp", 365 | -- "clangd" 366 | -- }, 367 | -- }, 368 | -- ---@param opts MasonSettings | {ensure_installed: string[]} 369 | -- config = function(plugin, opts) 370 | -- require("mason").setup(opts) 371 | -- local mr = require("mason-registry") 372 | -- for _, tool in ipairs(opts.ensure_installed) do 373 | -- local p = mr.get_package(tool) 374 | -- if not p:is_installed() then 375 | -- p:install() 376 | -- end 377 | -- end 378 | -- end, 379 | --}, 380 | } 381 | -------------------------------------------------------------------------------- /lua/package-all/markdown.lua: -------------------------------------------------------------------------------- 1 | return { 2 | --{ "preservim/vim-markdown" }, 3 | --{ 4 | -- "godlygeek/tabular", 5 | -- dependencies = { "preservim/vim-markdown" }, 6 | -- ft = { "markdown" }, 7 | --}, 8 | { 9 | "jghauser/follow-md-links.nvim", 10 | ft = { "markdown" }, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /lua/package-all/motion.lua: -------------------------------------------------------------------------------- 1 | return { 2 | --{ "bkad/camelcasemotion" }, 3 | --{ "tpope/vim-unimpaired", lazy = false }, 4 | { "tpope/vim-surround", tag = "v2.2" }, 5 | { "tpope/vim-repeat" }, 6 | { "triglav/vim-visual-increment" }, 7 | { "benjifisher/matchit.zip" }, 8 | } 9 | -------------------------------------------------------------------------------- /lua/package-all/search.lua: -------------------------------------------------------------------------------- 1 | local util = require('config.util') 2 | 3 | return { 4 | -- Pattern finding. 5 | { 6 | 'mileszs/ack.vim', 7 | keys = 8 | { 9 | { "", ":Ack! ", desc = "Search with Ack" }, 10 | } 11 | }, 12 | 13 | -- File finding. 14 | { 15 | "nvim-telescope/telescope-fzf-native.nvim", 16 | build = "make" 17 | }, 18 | { 19 | "nvim-telescope/telescope.nvim", 20 | cmd = "Telescope", 21 | version = false, -- telescope did only one release, so use HEAD for now 22 | keys = { 23 | { ",", "Telescope buffers show_all_buffers=true", desc = "Switch Buffer" }, 24 | --{ "/", util.telescope("live_grep"), desc = "Find in Files (Grep)" }, 25 | { "/", "Telescope live_grep", desc = "Find in Files (Grep)" }, 26 | { ":", "Telescope command_history", desc = "Command History" }, 27 | -- find 28 | { "fb", "Telescope buffers", desc = "Buffers" }, 29 | { "", util.telescope("files"), desc = "Find Files (root dir)" }, 30 | --{ "", "Telescope find_files", desc = "Find Files (root dir)" }, 31 | { "fr", "Telescope oldfiles", desc = "Recent" }, 32 | -- git 33 | { "gc", "Telescope git_commits", desc = "commits" }, 34 | { "gs", "Telescope git_status", desc = "status" }, 35 | -- search 36 | { "sa", "Telescope autocommands", desc = "Auto Commands" }, 37 | { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, 38 | { "sc", "Telescope command_history", desc = "Command History" }, 39 | { "sC", "Telescope commands", desc = "Commands" }, 40 | { "sd", "Telescope diagnostics", desc = "Diagnostics" }, 41 | { "sg", util.telescope("live_grep"), desc = "Grep (root dir)" }, 42 | { "sG", util.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" }, 43 | { "sh", "Telescope help_tags", desc = "Help Pages" }, 44 | { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, 45 | { "sk", "Telescope keymaps", desc = "Key Maps" }, 46 | { "sM", "Telescope man_pages", desc = "Man Pages" }, 47 | { "sm", "Telescope marks", desc = "Jump to Mark" }, 48 | { "so", "Telescope vim_options", desc = "Options" }, 49 | { "sR", "Telescope resume", desc = "Resume" }, 50 | { "sw", util.telescope("grep_string"), desc = "Word (root dir)" }, 51 | { "sW", util.telescope("grep_string", { cwd = false }), desc = "Word (cwd)" }, 52 | { "uC", util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" }, 53 | { 54 | "ss", 55 | util.telescope("lsp_document_symbols", { 56 | symbols = { 57 | "Class", 58 | "Function", 59 | "Method", 60 | "Constructor", 61 | "Interface", 62 | "Module", 63 | "Struct", 64 | "Trait", 65 | "Field", 66 | "Property", 67 | }, 68 | }), 69 | desc = "Goto Symbol", 70 | }, 71 | { 72 | "sS", 73 | util.telescope("lsp_workspace_symbols", { 74 | symbols = { 75 | "Class", 76 | "Function", 77 | "Method", 78 | "Constructor", 79 | "Interface", 80 | "Module", 81 | "Struct", 82 | "Trait", 83 | "Field", 84 | "Property", 85 | }, 86 | }), 87 | desc = "Goto Symbol (Workspace)", 88 | }, 89 | }, 90 | opts = { 91 | defaults = { 92 | prompt_prefix = " ", 93 | selection_caret = " ", 94 | mappings = { 95 | i = { 96 | --[""] = function(...) 97 | -- return require("trouble.providers.telescope").open_with_trouble(...) 98 | --end, 99 | [""] = function(...) 100 | return require("trouble.providers.telescope").open_selected_with_trouble(...) 101 | end, 102 | [""] = function() 103 | util.telescope("find_files", { no_ignore = true })() 104 | end, 105 | [""] = function() 106 | util.telescope("find_files", { hidden = true })() 107 | end, 108 | [""] = function(...) 109 | return require("telescope.actions").cycle_history_next(...) 110 | end, 111 | [""] = function(...) 112 | return require("telescope.actions").cycle_history_prev(...) 113 | end, 114 | [""] = function(...) 115 | return require("telescope.actions").cycle_history_prev(...) 116 | end, 117 | [""] = function(...) 118 | return require("telescope.actions").preview_scrolling_down(...) 119 | end, 120 | [""] = function(...) 121 | return require("telescope.actions").preview_scrolling_up(...) 122 | end, 123 | -- Clear prompt. 124 | [""] = false, 125 | [""] = function(...) 126 | return require("telescope.actions").close(...) 127 | end, 128 | }, 129 | n = { 130 | ["q"] = function(...) 131 | return require("telescope.actions").close(...) 132 | end, 133 | }, 134 | }, 135 | }, 136 | }, 137 | }, 138 | 139 | -- Buffer changing 140 | { 'stefandtw/quickfix-reflector.vim' }, 141 | } 142 | -------------------------------------------------------------------------------- /lua/package-all/tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-neo-tree/neo-tree.nvim", 4 | cmd = "Neotree", 5 | keys = { 6 | { 7 | "fe", 8 | function() 9 | require("neo-tree.command").execute({ toggle = true, dir = require("config.util").get_root() }) 10 | end, 11 | desc = "Explorer NeoTree (root dir)", 12 | }, 13 | { 14 | "fE", 15 | function() 16 | require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() }) 17 | end, 18 | desc = "Explorer NeoTree (cwd)", 19 | }, 20 | { "e", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, 21 | { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, 22 | }, 23 | deactivate = function() 24 | vim.cmd([[Neotree close]]) 25 | end, 26 | init = function() 27 | vim.g.neo_tree_remove_legacy_commands = 1 28 | if vim.fn.argc() == 1 then 29 | local stat = vim.loop.fs_stat(vim.fn.argv(0)) 30 | if stat and stat.type == "directory" then 31 | require("neo-tree") 32 | end 33 | end 34 | end, 35 | opts = { 36 | filesystem = { 37 | bind_to_cwd = false, 38 | follow_current_file = true, 39 | }, 40 | window = { 41 | mappings = { 42 | [""] = "none", 43 | }, 44 | }, 45 | default_component_configs = { 46 | indent = { 47 | with_expanders = true, -- if nil and file nesting is enabled, will enable expanders 48 | expander_collapsed = "", 49 | expander_expanded = "", 50 | expander_highlight = "NeoTreeExpander", 51 | }, 52 | }, 53 | }, 54 | }, 55 | } 56 | -------------------------------------------------------------------------------- /lua/package-all/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-treesitter/nvim-treesitter", 4 | version = false, -- last release is way too old and doesn't work on Windows 5 | build = ":TSUpdate", 6 | event = { "BufReadPost", "BufNewFile" }, 7 | dependencies = { 8 | { 9 | "nvim-treesitter/nvim-treesitter-textobjects", 10 | init = function() 11 | -- PERF: no need to load the plugin, if we only need its queries for mini.ai 12 | local plugin = require("lazy.core.config").spec.plugins["nvim-treesitter"] 13 | local opts = require("lazy.core.plugin").values(plugin, "opts", false) 14 | local enabled = false 15 | if opts.textobjects then 16 | for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do 17 | if opts.textobjects[mod] and opts.textobjects[mod].enable then 18 | enabled = true 19 | break 20 | end 21 | end 22 | end 23 | if not enabled then 24 | require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") 25 | end 26 | end, 27 | }, 28 | }, 29 | keys = { 30 | { "", desc = "Increment selection" }, 31 | { "", desc = "Schrink selection", mode = "x" }, 32 | }, 33 | ---@type TSConfig 34 | opts = { 35 | highlight = { 36 | enable = true, 37 | disable = function(lang, buf) 38 | --if lang == "markdown" then 39 | -- return true 40 | --end 41 | local max_filesize = 100 * 1024 -- 100 KB 42 | local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) 43 | if ok and stats and stats.size > max_filesize then 44 | return true 45 | end 46 | end, 47 | additional_vim_regex_highlighting = false, 48 | }, 49 | indent = { enable = false, disable = { } }, 50 | context_commentstring = { enable = true, enable_autocmd = false }, 51 | ensure_installed = { 52 | "bash", 53 | "c", 54 | "cmake", 55 | "cpp", 56 | "clojure", 57 | "help", 58 | "html", 59 | "javascript", 60 | "json", 61 | "lua", 62 | "markdown", 63 | "markdown_inline", 64 | "python", 65 | "query", 66 | "regex", 67 | "rust", 68 | "tsx", 69 | "typescript", 70 | "vim", 71 | "yaml", 72 | }, 73 | incremental_selection = { 74 | enable = true, 75 | keymaps = { 76 | init_selection = "", 77 | node_incremental = "", 78 | scope_incremental = "", 79 | node_decremental = "", 80 | }, 81 | }, 82 | }, 83 | ---@param opts TSConfig 84 | config = function(_, opts) 85 | require("nvim-treesitter.configs").setup(opts) 86 | end, 87 | }, 88 | } 89 | -------------------------------------------------------------------------------- /lua/package-all/ui.lua: -------------------------------------------------------------------------------- 1 | local fold_text_handler = function(virtText, lnum, endLnum, width, truncate) 2 | local newVirtText = {} 3 | local suffix = (' 󰁂 %d lines '):format(endLnum - lnum) 4 | local sufWidth = vim.fn.strdisplaywidth(suffix) 5 | local targetWidth = width - sufWidth 6 | local curWidth = 0 7 | for _, chunk in ipairs(virtText) do 8 | local chunkText = chunk[1] 9 | local chunkWidth = vim.fn.strdisplaywidth(chunkText) 10 | if targetWidth > curWidth + chunkWidth then 11 | table.insert(newVirtText, chunk) 12 | else 13 | chunkText = truncate(chunkText, targetWidth - curWidth) 14 | local hlGroup = chunk[2] 15 | table.insert(newVirtText, {chunkText, hlGroup}) 16 | chunkWidth = vim.fn.strdisplaywidth(chunkText) 17 | -- str width returned from truncate() may less than 2nd argument, need padding 18 | if curWidth + chunkWidth < targetWidth then 19 | suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth) 20 | end 21 | break 22 | end 23 | curWidth = curWidth + chunkWidth 24 | end 25 | table.insert(newVirtText, {suffix, 'MoreMsg'}) 26 | return newVirtText 27 | end 28 | 29 | return { 30 | -- Better `vim.notify()` 31 | { 32 | "rcarriga/nvim-notify", 33 | keys = { 34 | { 35 | "un", 36 | function() 37 | require("notify").dismiss({ silent = true, pending = true }) 38 | end, 39 | desc = "Delete all Notifications", 40 | }, 41 | }, 42 | opts = { 43 | timeout = 3000, 44 | background_colour = "#000000", 45 | max_height = function() 46 | return math.floor(vim.o.lines * 0.33) 47 | end, 48 | max_width = function() 49 | return math.floor(vim.o.columns * 0.33) 50 | end, 51 | }, 52 | init = function() 53 | -- when noice is not enabled, install notify on VeryLazy 54 | local Util = require("config.util") 55 | if not Util.has("noice.nvim") then 56 | Util.on_very_lazy(function() 57 | vim.notify = require("notify") 58 | end) 59 | end 60 | end, 61 | }, 62 | 63 | -- better vim.ui 64 | { 65 | "stevearc/dressing.nvim", 66 | lazy = true, 67 | init = function() 68 | ---@diagnostic disable-next-line: duplicate-set-field 69 | vim.ui.select = function(...) 70 | require("lazy").load({ plugins = { "dressing.nvim" } }) 71 | return vim.ui.select(...) 72 | end 73 | ---@diagnostic disable-next-line: duplicate-set-field 74 | vim.ui.input = function(...) 75 | require("lazy").load({ plugins = { "dressing.nvim" } }) 76 | return vim.ui.input(...) 77 | end 78 | end, 79 | }, 80 | 81 | -- bufferline 82 | { 83 | "akinsho/bufferline.nvim", 84 | event = "VeryLazy", 85 | keys = { 86 | { "bp", "BufferLineTogglePin", desc = "Toggle pin" }, 87 | { "bP", "BufferLineGroupClose ungrouped", desc = "Delete non-pinned buffers" }, 88 | }, 89 | opts = { 90 | options = { 91 | mode = "tabs", 92 | diagnostics = "nvim_lsp", 93 | always_show_bufferline = false, 94 | diagnostics_indicator = function(_, _, diag) 95 | local icons = require("config").icons.diagnostics 96 | local ret = (diag.error and icons.Error .. diag.error .. " " or "") 97 | .. (diag.warning and icons.Warn .. diag.warning or "") 98 | return vim.trim(ret) 99 | end, 100 | offsets = { 101 | { 102 | filetype = "neo-tree", 103 | text = "Neo-tree", 104 | highlight = "Directory", 105 | text_align = "left", 106 | }, 107 | }, 108 | }, 109 | }, 110 | }, 111 | 112 | -- statusline 113 | { 114 | "nvim-lualine/lualine.nvim", 115 | event = "VeryLazy", 116 | opts = function(plugin) 117 | local icons = require("config").icons 118 | 119 | local function fg(name) 120 | return function() 121 | ---@type {foreground?:number}? 122 | local hl = vim.api.nvim_get_hl_by_name(name, true) 123 | return hl and hl.foreground and { fg = string.format("#%06x", hl.foreground) } 124 | end 125 | end 126 | 127 | return { 128 | options = { 129 | theme = "auto", 130 | globalstatus = true, 131 | disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } }, 132 | }, 133 | sections = { 134 | lualine_a = { "mode" }, 135 | lualine_b = { }, 136 | lualine_c = { 137 | { 138 | "diagnostics", 139 | symbols = { 140 | error = icons.diagnostics.Error, 141 | warn = icons.diagnostics.Warn, 142 | info = icons.diagnostics.Info, 143 | hint = icons.diagnostics.Hint, 144 | }, 145 | }, 146 | { "filename", path = 1, symbols = { modified = "", readonly = "", unnamed = "" } }, 147 | -- stylua: ignore 148 | { 149 | function() return require("nvim-navic").get_location() end, 150 | cond = function() return package.loaded["nvim-navic"] and require("nvim-navic").is_available() end, 151 | }, 152 | }, 153 | lualine_x = { 154 | -- stylua: ignore 155 | { 156 | function() return require("noice").api.status.command.get() end, 157 | cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, 158 | color = fg("Statement") 159 | }, 160 | -- stylua: ignore 161 | { 162 | function() return require("noice").api.status.mode.get() end, 163 | cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, 164 | color = fg("Constant") , 165 | }, 166 | { "filetype", icon_only = false, separator = "", }, 167 | }, 168 | lualine_y = { "progress" }, 169 | lualine_z = { "location" }, 170 | }, 171 | extensions = { "neo-tree" }, 172 | } 173 | end, 174 | }, 175 | 176 | -- indent guides for Neovim 177 | --{ 178 | -- "lukas-reineke/indent-blankline.nvim", 179 | -- event = { "BufReadPost", "BufNewFile" }, 180 | -- opts = { 181 | -- -- char = "▏", 182 | -- char = "│", 183 | -- filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" }, 184 | -- show_trailing_blankline_indent = false, 185 | -- show_current_context = true, 186 | -- }, 187 | --}, 188 | 189 | -- active indent guide and indent text objects 190 | { 191 | "echasnovski/mini.indentscope", 192 | version = false, -- wait till new 0.7.0 release to put it back on semver 193 | event = { "BufReadPre", "BufNewFile" }, 194 | opts = { 195 | -- symbol = "▏", 196 | symbol = "│", 197 | options = { try_as_border = true }, 198 | }, 199 | init = function() 200 | vim.api.nvim_create_autocmd("FileType", { 201 | pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" }, 202 | callback = function() 203 | vim.b.miniindentscope_disable = true 204 | end, 205 | }) 206 | end, 207 | config = function(_, opts) 208 | require("mini.indentscope").setup(opts) 209 | end, 210 | }, 211 | 212 | -- noicer ui 213 | { 214 | "folke/noice.nvim", 215 | event = "VeryLazy", 216 | opts = { 217 | lsp = { 218 | override = { 219 | ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 220 | ["vim.lsp.util.stylize_markdown"] = true, 221 | }, 222 | }, 223 | presets = { 224 | bottom_search = true, 225 | command_palette = true, 226 | long_message_to_split = true, 227 | }, 228 | }, 229 | -- stylua: ignore 230 | keys = { 231 | { "", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" }, 232 | { "snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" }, 233 | { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, 234 | { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, 235 | --{ "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} }, 236 | --{ "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}}, 237 | }, 238 | }, 239 | 240 | -- lsp symbol navigation for lualine 241 | { 242 | "SmiteshP/nvim-navic", 243 | lazy = true, 244 | init = function() 245 | --vim.g.navic_silence = true 246 | require("config.util").on_attach(function(client, buffer) 247 | if client.server_capabilities.documentSymbolProvider then 248 | require("nvim-navic").attach(client, buffer) 249 | end 250 | end) 251 | end, 252 | opts = function() 253 | return { 254 | separator = ".", 255 | highlight = false, 256 | depth_limit = 5, 257 | --icons = require("config").icons.kinds, 258 | icons = { 259 | File = "", 260 | Module = "", 261 | Namespace = "", 262 | Package = "", 263 | Class = "", 264 | Method = "", 265 | Property = "", 266 | Field = "", 267 | Constructor = "", 268 | Enum = "", 269 | Interface = "", 270 | Function = "", 271 | Variable = "", 272 | Constant = "", 273 | String = "", 274 | Number = "", 275 | Boolean = "", 276 | Array = "", 277 | Object = "", 278 | Key = "", 279 | Null = "", 280 | EnumMember = "", 281 | Struct = "", 282 | Event = "", 283 | Operator = "", 284 | TypeParameter = "", 285 | }, 286 | } 287 | end, 288 | }, 289 | 290 | -- icons 291 | { "nvim-tree/nvim-web-devicons", lazy = true }, 292 | 293 | -- ui components 294 | { "MunifTanjim/nui.nvim", lazy = true }, 295 | 296 | -- Doesn't properly detect the headings to fold. Maybe it's tripped up 297 | -- by some of the things I have. 298 | --{ "masukomi/vim-markdown-folding" }, 299 | 300 | -- UFO folding 301 | -- Collapses pretty well, but gets into buggy states where I can't leave normal 302 | -- mode without it collapsing everything again. Very tough to get working for 303 | -- only markdown. 304 | --{ 305 | -- "kevinhwang91/nvim-ufo", 306 | -- lazy = false, 307 | -- dependencies = { 308 | -- "kevinhwang91/promise-async", 309 | -- { 310 | -- "luukvbaal/statuscol.nvim", 311 | -- config = function() 312 | -- local builtin = require("statuscol.builtin") 313 | -- require("statuscol").setup({ 314 | -- relculright = true, 315 | -- ft_ignore = { "NeogitStatus", "c", "cpp" }, 316 | -- segments = { 317 | -- { text = { builtin.foldfunc }, click = "v:lua.ScFa" }, 318 | -- { text = { "%s" }, click = "v:lua.ScSa" }, 319 | -- { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" }, 320 | -- }, 321 | -- }) 322 | -- end, 323 | -- }, 324 | -- }, 325 | -- event = "BufReadPost", 326 | -- opts = { 327 | -- provider_selector = function() 328 | -- return { "treesitter", "indent" } 329 | -- end, 330 | -- fold_virt_text_handler = fold_text_handler 331 | -- }, 332 | 333 | -- init = function() 334 | -- vim.keymap.set("n", "zR", require("ufo").openAllFolds) 335 | -- vim.keymap.set("n", "zM", require("ufo").closeAllFolds) 336 | -- vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds) 337 | 338 | -- vim.api.nvim_create_autocmd('FileType', { 339 | -- pattern = { 'NeogitStatus', "c", "cpp" }, 340 | -- callback = function() 341 | -- require('ufo').detach() 342 | -- vim.opt_local.foldenable = false 343 | -- vim.opt_local.foldcolumn = '0' 344 | -- end, 345 | -- }) 346 | -- end, 347 | --}, 348 | } 349 | -------------------------------------------------------------------------------- /lua/package-all/util.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- Library used by other plugins. 3 | { "nvim-lua/plenary.nvim", lazy = true }, 4 | 5 | -- Makes some plugins dot-repeatable like leap. 6 | { "tpope/vim-repeat", event = "VeryLazy" }, 7 | 8 | { "mbbill/undotree" } 9 | } 10 | -------------------------------------------------------------------------------- /lua/package-all/whichkey.lua: -------------------------------------------------------------------------------- 1 | local util = require("config.util") 2 | 3 | return { 4 | --{ 5 | -- "folke/which-key.nvim", 6 | -- event = "VeryLazy", 7 | -- opts = { 8 | -- presets = { 9 | -- operators = false, -- adds help for operators like d, y, ... 10 | -- motions = false, -- adds help for motions 11 | -- text_objects = false, -- help for text objects triggered after entering an operator 12 | -- windows = false, -- default bindings on 13 | -- nav = false, -- misc bindings to work with windows 14 | -- z = false, -- bindings for folds, spelling and others prefixed with z 15 | -- g = true, -- bindings for prefixed with g 16 | -- }, 17 | -- plugins = { spelling = true }, 18 | -- }, 19 | -- config = function(_, opts) 20 | -- local wk = require("which-key") 21 | -- wk.setup(opts) 22 | -- local keymaps = { 23 | -- mode = { "n", "v" }, 24 | -- ["g"] = { name = "+goto" }, 25 | -- ["gz"] = { name = "+surround" }, 26 | -- ["]"] = { name = "+next" }, 27 | -- ["["] = { name = "+prev" }, 28 | -- [""] = { name = "+tabs" }, 29 | -- ["b"] = { name = "+buffer" }, 30 | -- ["c"] = { name = "+code" }, 31 | -- ["f"] = { name = "+file/find" }, 32 | -- ["g"] = { name = "+git" }, 33 | -- ["gh"] = { name = "+hunks" }, 34 | -- ["q"] = { name = "+quit/session" }, 35 | -- ["s"] = { name = "+search" }, 36 | -- ["u"] = { name = "+ui" }, 37 | -- ["w"] = { name = "+windows" }, 38 | -- ["x"] = { name = "+diagnostics/quickfix" }, 39 | -- } 40 | -- if util.has("noice.nvim") then 41 | -- keymaps["sn"] = { name = "+noice" } 42 | -- end 43 | -- wk.register(keymaps) 44 | -- end, 45 | --}, 46 | } 47 | -------------------------------------------------------------------------------- /lua/package-all/whitespace.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "ntpeters/vim-better-whitespace", 4 | config = function() 5 | --vim.g.better_whitespace_filetypes_blacklist = { "terminal" } 6 | vim.cmd([[autocmd FileType terminal DisableWhitespace]]) 7 | end 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /lua/package/clojure.lua: -------------------------------------------------------------------------------- 1 | ../package-all/clojure.lua -------------------------------------------------------------------------------- /lua/package/colorscheme.lua: -------------------------------------------------------------------------------- 1 | ../package-all/colorscheme.lua -------------------------------------------------------------------------------- /lua/package/cpp.lua: -------------------------------------------------------------------------------- 1 | ../package-all/cpp.lua -------------------------------------------------------------------------------- /lua/package/css.lua: -------------------------------------------------------------------------------- 1 | ../package-all/css.lua -------------------------------------------------------------------------------- /lua/package/d2.lua: -------------------------------------------------------------------------------- 1 | ../package-all/d2.lua -------------------------------------------------------------------------------- /lua/package/format.lua: -------------------------------------------------------------------------------- 1 | ../package-all/format.lua -------------------------------------------------------------------------------- /lua/package/git.lua: -------------------------------------------------------------------------------- 1 | ../package-all/git.lua -------------------------------------------------------------------------------- /lua/package/lazy.lua: -------------------------------------------------------------------------------- 1 | ../package-all/lazy.lua -------------------------------------------------------------------------------- /lua/package/lint.lua: -------------------------------------------------------------------------------- 1 | ../package-all/lint.lua -------------------------------------------------------------------------------- /lua/package/llvm.lua: -------------------------------------------------------------------------------- 1 | ../package-all/llvm.lua -------------------------------------------------------------------------------- /lua/package/lsp.lua: -------------------------------------------------------------------------------- 1 | ../package-all/lsp.lua -------------------------------------------------------------------------------- /lua/package/markdown.lua: -------------------------------------------------------------------------------- 1 | ../package-all/markdown.lua -------------------------------------------------------------------------------- /lua/package/motion.lua: -------------------------------------------------------------------------------- 1 | ../package-all/motion.lua -------------------------------------------------------------------------------- /lua/package/search.lua: -------------------------------------------------------------------------------- 1 | ../package-all/search.lua -------------------------------------------------------------------------------- /lua/package/tree.lua: -------------------------------------------------------------------------------- 1 | ../package-all/tree.lua -------------------------------------------------------------------------------- /lua/package/treesitter.lua: -------------------------------------------------------------------------------- 1 | ../package-all/treesitter.lua -------------------------------------------------------------------------------- /lua/package/ui.lua: -------------------------------------------------------------------------------- 1 | ../package-all/ui.lua -------------------------------------------------------------------------------- /lua/package/util.lua: -------------------------------------------------------------------------------- 1 | ../package-all/util.lua -------------------------------------------------------------------------------- /lua/package/whichkey.lua: -------------------------------------------------------------------------------- 1 | ../package-all/whichkey.lua -------------------------------------------------------------------------------- /lua/package/whitespace.lua: -------------------------------------------------------------------------------- 1 | ../package-all/whitespace.lua -------------------------------------------------------------------------------- /syntax/clojure.vim: -------------------------------------------------------------------------------- 1 | /home/jeaye/.vim/syntax/jank.vim -------------------------------------------------------------------------------- /syntax/jank.vim: -------------------------------------------------------------------------------- 1 | " Vim indent file 2 | " Language: Clojure 3 | " Maintainer: Alex Vear 4 | " Former Maintainers: Sung Pae 5 | " Meikel Brandmeyer 6 | " Toralf Wittner 7 | " Contributors: Joel Holdbrooks (Regexp support, bug fixes) 8 | " URL: https://github.com/clojure-vim/clojure.vim 9 | " License: Vim (see :h license) 10 | " Last Change: 2022-03-24 11 | 12 | if exists("b:current_syntax") 13 | finish 14 | endif 15 | 16 | let s:cpo_sav = &cpo 17 | set cpo&vim 18 | 19 | if has("folding") && exists("g:clojure_fold") && g:clojure_fold > 0 20 | setlocal foldmethod=syntax 21 | endif 22 | 23 | " -*- KEYWORDS -*- 24 | " Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj 25 | " Clojure version 1.11.0 26 | let s:clojure_syntax_keywords = { 27 | \ 'clojureBoolean': ["false","true"], 28 | \ 'clojureCond': ["case","case*","clojure.core/case","clojure.core/cond","clojure.core/cond->","clojure.core/cond->>","clojure.core/condp","clojure.core/if-let","clojure.core/if-not","clojure.core/if-some","clojure.core/when","clojure.core/when-first","clojure.core/when-let","clojure.core/when-not","clojure.core/when-some","cond","cond->","cond->>","condp","if","if-let","if-not","if-some","when","when-first","when-let","when-not","when-some"], 29 | \ 'clojureConstant': ["nil"], 30 | \ 'clojureDefine': ["clojure.core/definline","clojure.core/definterface","clojure.core/defmacro","clojure.core/defmethod","clojure.core/defmulti","clojure.core/defn","clojure.core/defn-","clojure.core/defonce","clojure.core/defprotocol","clojure.core/defrecord","clojure.core/defstruct","clojure.core/deftype","def","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","deftype*"], 31 | \ 'clojureException': ["catch","finally","throw","try"], 32 | \ 'clojureFunc': ["*","*'","+","+'","-","-'","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","/","<","<=","=","==",">",">=","NaN?","PrintWriter-on","StackTraceElement->vec","Throwable->map","abs","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","ancestors","any?","apply","array-map","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","cast","cat","char","char-array","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","clojure.core/*","clojure.core/*'","clojure.core/+","clojure.core/+'","clojure.core/-","clojure.core/-'","clojure.core/->ArrayChunk","clojure.core/->Eduction","clojure.core/->Vec","clojure.core/->VecNode","clojure.core/->VecSeq","clojure.core/-cache-protocol-fn","clojure.core/-reset-methods","clojure.core//","clojure.core/<","clojure.core/<=","clojure.core/=","clojure.core/==","clojure.core/>","clojure.core/>=","clojure.core/NaN?","clojure.core/PrintWriter-on","clojure.core/StackTraceElement->vec","clojure.core/Throwable->map","clojure.core/abs","clojure.core/accessor","clojure.core/aclone","clojure.core/add-classpath","clojure.core/add-tap","clojure.core/add-watch","clojure.core/agent","clojure.core/agent-error","clojure.core/agent-errors","clojure.core/aget","clojure.core/alength","clojure.core/alias","clojure.core/all-ns","clojure.core/alter","clojure.core/alter-meta!","clojure.core/alter-var-root","clojure.core/ancestors","clojure.core/any?","clojure.core/apply","clojure.core/array-map","clojure.core/aset","clojure.core/aset-boolean","clojure.core/aset-byte","clojure.core/aset-char","clojure.core/aset-double","clojure.core/aset-float","clojure.core/aset-int","clojure.core/aset-long","clojure.core/aset-short","clojure.core/assoc","clojure.core/assoc!","clojure.core/assoc-in","clojure.core/associative?","clojure.core/atom","clojure.core/await","clojure.core/await-for","clojure.core/await1","clojure.core/bases","clojure.core/bean","clojure.core/bigdec","clojure.core/bigint","clojure.core/biginteger","clojure.core/bit-and","clojure.core/bit-and-not","clojure.core/bit-clear","clojure.core/bit-flip","clojure.core/bit-not","clojure.core/bit-or","clojure.core/bit-set","clojure.core/bit-shift-left","clojure.core/bit-shift-right","clojure.core/bit-test","clojure.core/bit-xor","clojure.core/boolean","clojure.core/boolean-array","clojure.core/boolean?","clojure.core/booleans","clojure.core/bound-fn*","clojure.core/bound?","clojure.core/bounded-count","clojure.core/butlast","clojure.core/byte","clojure.core/byte-array","clojure.core/bytes","clojure.core/bytes?","clojure.core/cast","clojure.core/cat","clojure.core/char","clojure.core/char-array","clojure.core/char?","clojure.core/chars","clojure.core/chunk","clojure.core/chunk-append","clojure.core/chunk-buffer","clojure.core/chunk-cons","clojure.core/chunk-first","clojure.core/chunk-next","clojure.core/chunk-rest","clojure.core/chunked-seq?","clojure.core/class","clojure.core/class?","clojure.core/clear-agent-errors","clojure.core/clojure-version","clojure.core/coll?","clojure.core/commute","clojure.core/comp","clojure.core/comparator","clojure.core/compare","clojure.core/compare-and-set!","clojure.core/compile","clojure.core/complement","clojure.core/completing","clojure.core/concat","clojure.core/conj","clojure.core/conj!","clojure.core/cons","clojure.core/constantly","clojure.core/construct-proxy","clojure.core/contains?","clojure.core/count","clojure.core/counted?","clojure.core/create-ns","clojure.core/create-struct","clojure.core/cycle","clojure.core/dec","clojure.core/dec'","clojure.core/decimal?","clojure.core/dedupe","clojure.core/delay?","clojure.core/deliver","clojure.core/denominator","clojure.core/deref","clojure.core/derive","clojure.core/descendants","clojure.core/destructure","clojure.core/disj","clojure.core/disj!","clojure.core/dissoc","clojure.core/dissoc!","clojure.core/distinct","clojure.core/distinct?","clojure.core/doall","clojure.core/dorun","clojure.core/double","clojure.core/double-array","clojure.core/double?","clojure.core/doubles","clojure.core/drop","clojure.core/drop-last","clojure.core/drop-while","clojure.core/eduction","clojure.core/empty","clojure.core/empty?","clojure.core/ensure","clojure.core/ensure-reduced","clojure.core/enumeration-seq","clojure.core/error-handler","clojure.core/error-mode","clojure.core/eval","clojure.core/even?","clojure.core/every-pred","clojure.core/every?","clojure.core/ex-cause","clojure.core/ex-data","clojure.core/ex-info","clojure.core/ex-message","clojure.core/extend","clojure.core/extenders","clojure.core/extends?","clojure.core/false?","clojure.core/ffirst","clojure.core/file-seq","clojure.core/filter","clojure.core/filterv","clojure.core/find","clojure.core/find-keyword","clojure.core/find-ns","clojure.core/find-protocol-impl","clojure.core/find-protocol-method","clojure.core/find-var","clojure.core/first","clojure.core/flatten","clojure.core/float","clojure.core/float-array","clojure.core/float?","clojure.core/floats","clojure.core/flush","clojure.core/fn?","clojure.core/fnext","clojure.core/fnil","clojure.core/force","clojure.core/format","clojure.core/frequencies","clojure.core/future-call","clojure.core/future-cancel","clojure.core/future-cancelled?","clojure.core/future-done?","clojure.core/future?","clojure.core/gensym","clojure.core/get","clojure.core/get-in","clojure.core/get-method","clojure.core/get-proxy-class","clojure.core/get-thread-bindings","clojure.core/get-validator","clojure.core/group-by","clojure.core/halt-when","clojure.core/hash","clojure.core/hash-combine","clojure.core/hash-map","clojure.core/hash-ordered-coll","clojure.core/hash-set","clojure.core/hash-unordered-coll","clojure.core/ident?","clojure.core/identical?","clojure.core/identity","clojure.core/ifn?","clojure.core/in-ns","clojure.core/inc","clojure.core/inc'","clojure.core/indexed?","clojure.core/infinite?","clojure.core/init-proxy","clojure.core/inst-ms","clojure.core/inst-ms*","clojure.core/inst?","clojure.core/instance?","clojure.core/int","clojure.core/int-array","clojure.core/int?","clojure.core/integer?","clojure.core/interleave","clojure.core/intern","clojure.core/interpose","clojure.core/into","clojure.core/into-array","clojure.core/ints","clojure.core/isa?","clojure.core/iterate","clojure.core/iteration","clojure.core/iterator-seq","clojure.core/juxt","clojure.core/keep","clojure.core/keep-indexed","clojure.core/key","clojure.core/keys","clojure.core/keyword","clojure.core/keyword?","clojure.core/last","clojure.core/line-seq","clojure.core/list","clojure.core/list*","clojure.core/list?","clojure.core/load","clojure.core/load-file","clojure.core/load-reader","clojure.core/load-string","clojure.core/loaded-libs","clojure.core/long","clojure.core/long-array","clojure.core/longs","clojure.core/macroexpand","clojure.core/macroexpand-1","clojure.core/make-array","clojure.core/make-hierarchy","clojure.core/map","clojure.core/map-entry?","clojure.core/map-indexed","clojure.core/map?","clojure.core/mapcat","clojure.core/mapv","clojure.core/max","clojure.core/max-key","clojure.core/memoize","clojure.core/merge","clojure.core/merge-with","clojure.core/meta","clojure.core/method-sig","clojure.core/methods","clojure.core/min","clojure.core/min-key","clojure.core/mix-collection-hash","clojure.core/mod","clojure.core/munge","clojure.core/name","clojure.core/namespace","clojure.core/namespace-munge","clojure.core/nat-int?","clojure.core/neg-int?","clojure.core/neg?","clojure.core/newline","clojure.core/next","clojure.core/nfirst","clojure.core/nil?","clojure.core/nnext","clojure.core/not","clojure.core/not-any?","clojure.core/not-empty","clojure.core/not-every?","clojure.core/not=","clojure.core/ns-aliases","clojure.core/ns-imports","clojure.core/ns-interns","clojure.core/ns-map","clojure.core/ns-name","clojure.core/ns-publics","clojure.core/ns-refers","clojure.core/ns-resolve","clojure.core/ns-unalias","clojure.core/ns-unmap","clojure.core/nth","clojure.core/nthnext","clojure.core/nthrest","clojure.core/num","clojure.core/number?","clojure.core/numerator","clojure.core/object-array","clojure.core/odd?","clojure.core/parents","clojure.core/parse-boolean","clojure.core/parse-double","clojure.core/parse-long","clojure.core/parse-uuid","clojure.core/partial","clojure.core/partition","clojure.core/partition-all","clojure.core/partition-by","clojure.core/pcalls","clojure.core/peek","clojure.core/persistent!","clojure.core/pmap","clojure.core/pop","clojure.core/pop!","clojure.core/pop-thread-bindings","clojure.core/pos-int?","clojure.core/pos?","clojure.core/pr","clojure.core/pr-str","clojure.core/prefer-method","clojure.core/prefers","clojure.core/print","clojure.core/print-ctor","clojure.core/print-dup","clojure.core/print-method","clojure.core/print-simple","clojure.core/print-str","clojure.core/printf","clojure.core/println","clojure.core/println-str","clojure.core/prn","clojure.core/prn-str","clojure.core/promise","clojure.core/proxy-call-with-super","clojure.core/proxy-mappings","clojure.core/proxy-name","clojure.core/push-thread-bindings","clojure.core/qualified-ident?","clojure.core/qualified-keyword?","clojure.core/qualified-symbol?","clojure.core/quot","clojure.core/rand","clojure.core/rand-int","clojure.core/rand-nth","clojure.core/random-sample","clojure.core/random-uuid","clojure.core/range","clojure.core/ratio?","clojure.core/rational?","clojure.core/rationalize","clojure.core/re-find","clojure.core/re-groups","clojure.core/re-matcher","clojure.core/re-matches","clojure.core/re-pattern","clojure.core/re-seq","clojure.core/read","clojure.core/read+string","clojure.core/read-line","clojure.core/read-string","clojure.core/reader-conditional","clojure.core/reader-conditional?","clojure.core/realized?","clojure.core/record?","clojure.core/reduce","clojure.core/reduce-kv","clojure.core/reduced","clojure.core/reduced?","clojure.core/reductions","clojure.core/ref","clojure.core/ref-history-count","clojure.core/ref-max-history","clojure.core/ref-min-history","clojure.core/ref-set","clojure.core/refer","clojure.core/release-pending-sends","clojure.core/rem","clojure.core/remove","clojure.core/remove-all-methods","clojure.core/remove-method","clojure.core/remove-ns","clojure.core/remove-tap","clojure.core/remove-watch","clojure.core/repeat","clojure.core/repeatedly","clojure.core/replace","clojure.core/replicate","clojure.core/require","clojure.core/requiring-resolve","clojure.core/reset!","clojure.core/reset-meta!","clojure.core/reset-vals!","clojure.core/resolve","clojure.core/rest","clojure.core/restart-agent","clojure.core/resultset-seq","clojure.core/reverse","clojure.core/reversible?","clojure.core/rseq","clojure.core/rsubseq","clojure.core/run!","clojure.core/satisfies?","clojure.core/second","clojure.core/select-keys","clojure.core/send","clojure.core/send-off","clojure.core/send-via","clojure.core/seq","clojure.core/seq-to-map-for-destructuring","clojure.core/seq?","clojure.core/seqable?","clojure.core/seque","clojure.core/sequence","clojure.core/sequential?","clojure.core/set","clojure.core/set-agent-send-executor!","clojure.core/set-agent-send-off-executor!","clojure.core/set-error-handler!","clojure.core/set-error-mode!","clojure.core/set-validator!","clojure.core/set?","clojure.core/short","clojure.core/short-array","clojure.core/shorts","clojure.core/shuffle","clojure.core/shutdown-agents","clojure.core/simple-ident?","clojure.core/simple-keyword?","clojure.core/simple-symbol?","clojure.core/slurp","clojure.core/some","clojure.core/some-fn","clojure.core/some?","clojure.core/sort","clojure.core/sort-by","clojure.core/sorted-map","clojure.core/sorted-map-by","clojure.core/sorted-set","clojure.core/sorted-set-by","clojure.core/sorted?","clojure.core/special-symbol?","clojure.core/spit","clojure.core/split-at","clojure.core/split-with","clojure.core/str","clojure.core/string?","clojure.core/struct","clojure.core/struct-map","clojure.core/subs","clojure.core/subseq","clojure.core/subvec","clojure.core/supers","clojure.core/swap!","clojure.core/swap-vals!","clojure.core/symbol","clojure.core/symbol?","clojure.core/tagged-literal","clojure.core/tagged-literal?","clojure.core/take","clojure.core/take-last","clojure.core/take-nth","clojure.core/take-while","clojure.core/tap>","clojure.core/test","clojure.core/the-ns","clojure.core/thread-bound?","clojure.core/to-array","clojure.core/to-array-2d","clojure.core/trampoline","clojure.core/transduce","clojure.core/transient","clojure.core/tree-seq","clojure.core/true?","clojure.core/type","clojure.core/unchecked-add","clojure.core/unchecked-add-int","clojure.core/unchecked-byte","clojure.core/unchecked-char","clojure.core/unchecked-dec","clojure.core/unchecked-dec-int","clojure.core/unchecked-divide-int","clojure.core/unchecked-double","clojure.core/unchecked-float","clojure.core/unchecked-inc","clojure.core/unchecked-inc-int","clojure.core/unchecked-int","clojure.core/unchecked-long","clojure.core/unchecked-multiply","clojure.core/unchecked-multiply-int","clojure.core/unchecked-negate","clojure.core/unchecked-negate-int","clojure.core/unchecked-remainder-int","clojure.core/unchecked-short","clojure.core/unchecked-subtract","clojure.core/unchecked-subtract-int","clojure.core/underive","clojure.core/unreduced","clojure.core/unsigned-bit-shift-right","clojure.core/update","clojure.core/update-in","clojure.core/update-keys","clojure.core/update-proxy","clojure.core/update-vals","clojure.core/uri?","clojure.core/use","clojure.core/uuid?","clojure.core/val","clojure.core/vals","clojure.core/var-get","clojure.core/var-set","clojure.core/var?","clojure.core/vary-meta","clojure.core/vec","clojure.core/vector","clojure.core/vector-of","clojure.core/vector?","clojure.core/volatile!","clojure.core/volatile?","clojure.core/vreset!","clojure.core/with-bindings*","clojure.core/with-meta","clojure.core/with-redefs-fn","clojure.core/xml-seq","clojure.core/zero?","clojure.core/zipmap","coll?","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","dedupe","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-cause","ex-data","ex-info","ex-message","extend","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn?","fnext","fnil","force","format","frequencies","future-call","future-cancel","future-cancelled?","future-done?","future?","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","ifn?","in-ns","inc","inc'","indexed?","infinite?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","isa?","iterate","iteration","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","long","long-array","longs","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","parents","parse-boolean","parse-double","parse-long","parse-uuid","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy-call-with-super","proxy-mappings","proxy-name","push-thread-bindings","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","random-uuid","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read+string","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-tap","remove-watch","repeat","repeatedly","replace","replicate","require","requiring-resolve","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq-to-map-for-destructuring","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","tap>","test","the-ns","thread-bound?","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unreduced","unsigned-bit-shift-right","update","update-in","update-keys","update-proxy","update-vals","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","with-bindings*","with-meta","with-redefs-fn","xml-seq","zero?","zipmap"], 33 | \ 'clojureMacro': ["->","->>","..","amap","and","areduce","as->","assert","binding","bound-fn","clojure.core/->","clojure.core/->>","clojure.core/..","clojure.core/amap","clojure.core/and","clojure.core/areduce","clojure.core/as->","clojure.core/assert","clojure.core/binding","clojure.core/bound-fn","clojure.core/comment","clojure.core/declare","clojure.core/delay","clojure.core/dosync","clojure.core/doto","clojure.core/extend-protocol","clojure.core/extend-type","clojure.core/for","clojure.core/future","clojure.core/gen-class","clojure.core/gen-interface","clojure.core/import","clojure.core/io!","clojure.core/lazy-cat","clojure.core/lazy-seq","clojure.core/locking","clojure.core/memfn","clojure.core/ns","clojure.core/or","clojure.core/proxy","clojure.core/proxy-super","clojure.core/pvalues","clojure.core/refer-clojure","clojure.core/reify","clojure.core/some->","clojure.core/some->>","clojure.core/sync","clojure.core/time","clojure.core/vswap!","clojure.core/with-bindings","clojure.core/with-in-str","clojure.core/with-loading-context","clojure.core/with-local-vars","clojure.core/with-open","clojure.core/with-out-str","clojure.core/with-precision","clojure.core/with-redefs","comment","declare","delay","dosync","doto","extend-protocol","extend-type","for","future","gen-class","gen-interface","import","io!","lazy-cat","lazy-seq","locking","memfn","ns","or","proxy","proxy-super","pvalues","refer-clojure","reify","some->","some->>","sync","time","vswap!","with-bindings","with-in-str","with-loading-context","with-local-vars","with-open","with-out-str","with-precision","with-redefs"], 34 | \ 'clojureRepeat': ["clojure.core/doseq","clojure.core/dotimes","clojure.core/loop","clojure.core/while","doseq","dotimes","loop","loop*","recur","while"], 35 | \ 'clojureSpecial': ["&",".","clojure.core/fn","clojure.core/import*","clojure.core/let","clojure.core/letfn","do","fn","fn*","let","let*","letfn","letfn*","monitor-enter","monitor-exit","new","quote","reify*","set!","var"], 36 | \ 'clojureVariable': ["*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","EMPTY-NODE","Inst","char-escape-string","char-name-string","clojure.core/*1","clojure.core/*2","clojure.core/*3","clojure.core/*agent*","clojure.core/*allow-unresolved-vars*","clojure.core/*assert*","clojure.core/*clojure-version*","clojure.core/*command-line-args*","clojure.core/*compile-files*","clojure.core/*compile-path*","clojure.core/*compiler-options*","clojure.core/*data-readers*","clojure.core/*default-data-reader-fn*","clojure.core/*e","clojure.core/*err*","clojure.core/*file*","clojure.core/*flush-on-newline*","clojure.core/*fn-loader*","clojure.core/*in*","clojure.core/*math-context*","clojure.core/*ns*","clojure.core/*out*","clojure.core/*print-dup*","clojure.core/*print-length*","clojure.core/*print-level*","clojure.core/*print-meta*","clojure.core/*print-namespace-maps*","clojure.core/*print-readably*","clojure.core/*read-eval*","clojure.core/*reader-resolver*","clojure.core/*source-path*","clojure.core/*suppress-read*","clojure.core/*unchecked-math*","clojure.core/*use-context-classloader*","clojure.core/*verbose-defrecords*","clojure.core/*warn-on-reflection*","clojure.core/EMPTY-NODE","clojure.core/Inst","clojure.core/char-escape-string","clojure.core/char-name-string","clojure.core/default-data-readers","clojure.core/primitives-classnames","clojure.core/print-dup","clojure.core/print-method","clojure.core/unquote","clojure.core/unquote-splicing","default-data-readers","primitives-classnames","print-dup","print-method","unquote","unquote-splicing"] 37 | \ } 38 | 39 | function! s:syntax_keyword(dict) 40 | for key in keys(a:dict) 41 | execute 'syntax keyword' key join(a:dict[key], ' ') 42 | endfor 43 | endfunction 44 | 45 | if exists('b:clojure_syntax_without_core_keywords') && b:clojure_syntax_without_core_keywords 46 | " Only match language specials and primitives 47 | for s:key in ['clojureBoolean', 'clojureConstant', 'clojureException', 'clojureSpecial'] 48 | execute 'syntax keyword' s:key join(s:clojure_syntax_keywords[s:key], ' ') 49 | endfor 50 | else 51 | call s:syntax_keyword(s:clojure_syntax_keywords) 52 | endif 53 | 54 | if exists('g:clojure_syntax_keywords') 55 | call s:syntax_keyword(g:clojure_syntax_keywords) 56 | endif 57 | 58 | if exists('b:clojure_syntax_keywords') 59 | call s:syntax_keyword(b:clojure_syntax_keywords) 60 | endif 61 | 62 | unlet! s:key 63 | delfunction s:syntax_keyword 64 | 65 | " Keywords are symbols: 66 | " static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)"); 67 | " But they: 68 | " * Must not end in a : or / 69 | " * Must not have two adjacent colons except at the beginning 70 | " * Must not contain any reader metacharacters except for ' and # 71 | syntax match clojureKeyword "\v<:{1,2}([^ \n\r\t()\[\]{}";@^`~\\/]+/)*[^ \n\r\t()\[\]{}";@^`~\\/]+:@1" 72 | 73 | syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained 74 | 75 | syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell 76 | 77 | syntax match clojureCharacter "\v\\%(o%([0-3]\o{2}|\o{1,2})|u\x{4}|newline|tab|space|return|backspace|formfeed|.)" 78 | 79 | syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@1" 83 | 84 | syntax match clojureQuote "\v['`]" 85 | syntax match clojureUnquote "\v\~\@?" 86 | syntax match clojureMeta "\^" 87 | syntax match clojureDeref "@" 88 | syntax match clojureDispatch "\v#[\^'=<_]?" 89 | 90 | " Clojure permits no more than 20 anonymous params. 91 | syntax match clojureAnonArg "%\(20\|1\d\|[1-9]\|&\)\?" 92 | 93 | syntax match clojureRegexpEscape "\v\\%([\\tnrfae.()\[\]{}^$*?+]|c\u|0[0-3]?\o{1,2}|x%(\x{2}|\{\x{1,6}\})|u\x{4})" contained display 94 | syntax region clojureRegexpQuoted start=/\\Q/ms=e+1 skip=/\\\\\|\\"/ end=/\\E/me=s-1 end=/"/me=s-1 contained 95 | syntax region clojureRegexpQuote start=/\\Q/ skip=/\\\\\|\\"/ end=/\\E/ end=/"/me=s-1 contains=clojureRegexpQuoted keepend contained 96 | 97 | " -*- CHARACTER PROPERTY CLASSES -*- 98 | " Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj 99 | " Java version 17.0.2 100 | syntax match clojureRegexpPosixCharClass "\v\\[pP]\{%(Cntrl|A%(l%(pha|num)|SCII)|Space|Graph|Upper|P%(rint|unct)|Blank|XDigit|Digit|Lower)\}" contained display 101 | syntax match clojureRegexpJavaCharClass "\v\\[pP]\{java%(Whitespace|JavaIdentifier%(Part|Start)|SpaceChar|Mirrored|TitleCase|I%(SOControl|de%(ographic|ntifierIgnorable))|D%(efined|igit)|U%(pperCase|nicodeIdentifier%(Part|Start))|L%(etter%(OrDigit)?|owerCase)|Alphabetic)\}" contained display 102 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\cIs%(l%(owercase|etter)|hex%(digit|_digit)|w%(hite%(_space|space)|ord)|noncharacter%(_code_point|codepoint)|p%(rint|unctuation)|ideographic|graph|a%(l%(num|phabetic)|ssigned)|uppercase|join%(control|_control)|titlecase|blank|digit|control)\}" contained display 103 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP][NSCMZPL]" contained display 104 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display 105 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(Is|gc\=|general_category\=)?%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display 106 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(Is|sc\=|script\=)%(k%(its|h%(oj%(ki)?|m%(r|er)|itan_small_script|udawadi|ar%(oshthi)?)|a%(li|n%(a|nada)|takana%(_or_hiragana)?|yah_li|ithi)|nda|thi)|r%(ohg|un%(ic|r)|ejang|jng)|l%(epc%(ha)?|i%(mbu?|n%([ab]|ear_[ab])|su)|y%([dc]i%(an)?)|a%(t%(n|in)|na|oo?))|t%(elu%(gu)?|ha%(i|a%(na)?)|i%(finagh|rh%(uta)?|b%(t|etan))|fng|glg|a%(i_%(le|tham|viet)|g%(alog|b%(anwa)?)|vt|kri?|ng%(ut)?|l[ue]|m%(il|l)))|vaii?|y%(i%(ii)?|ezi%(di)?)|e%(thi%(opic)?|l%(ym%(aic)?|ba%(san)?)|gyp%(tian_hieroglyphs)?)|u%(gar%(itic)?|nknown)|h%(ung|ira%(gana)?|rkt|mn[gp]|a%(n%(i%(fi_rohingya)?|unoo|o|g%(ul)?)?|tr%(an)?)|luw|ebr%(ew)?)|g%(r%(e%(k|ek)|an%(tha)?)|lag%(olitic)?|eor%(gian)?|o%(n[mg]|th%(ic)?)|u%(j%(arati|r)|r%(u|mukhi)|njala_gondi))|m%(lym|a%(n%(d%(aic)?|i%(chaean)?)|saram_gondi|h%(ajani|j)|ka%(sar)?|rc%(hen)?|layalam)|o%(di|ng%(olian)?)|e%(r%(c|o%(itic_%(hieroglyphs|cursive))?)|etei_mayek|nd%(e_kikakui)?|d%(f|efaidrin))|roo?|y%(anmar|mr)|tei|iao|ult%(ani)?)|d%(upl%(oyan)?|srt|i%(ak|ves_akuru)|ogra?|e%(seret|va%(nagari)?))|z%(an%(abazar_square|b)|inh|yyy|zzz)|n%(yiakeng_puachue_hmong|bat|koo?|ew%(_tai_lue|a)|ushu|shu|a%(bataean|rb|nd%(inagari)?))|s%(h%(rd|a%(vian|rada|w))|o%(yo%(mbo)?|g%(d%(ian)?|o)|ra%(_sompeng)?)|i%(n%(d|h%(ala)?)|dd%(ham)?|gnwriting)|a%(ur%(ashtra)?|m%(r|aritan)|rb)|y%(r%(c|iac)|lo%(ti_nagri)?)|und%(anese)?|gnw)|w%(cho|a%(ncho|ra%(ng_citi)?))|c%(y%(priot|r%(l|illic))|h%(er%(okee)?|a%(m|kma)|rs|orasmian)|a%(km|ucasian_albanian|n%(adian_aboriginal|s)|ri%(an)?)|prt|uneiform|o%(pt%(ic)?|mmon))|i%(n%(scriptional_pa%(rthian|hlavi)|herited)|mperial_aramaic|tal)|p%(h%(l[ip]|oenician|ag%(s_pa)?|nx)|a%(lm%(yrene)?|u%(_cin_hau|c)|hawh_hmong)|rti|salter_pahlavi|lrd|erm)|x%(peo|sux)|b%(eng%(ali)?|ra%(i%(lle)?|h%(mi)?)|opo%(mofo)?|u%(gi%(nese)?|h%(d|id))|h%(ks|aiksuki)|a%(ss%(a_vah)?|t%(ak|k)|li%(nese)?|mum?))|java%(nese)?|o%(g%(am|ham)|s%(age|ge|ma%(nya)?)|l%(d_%(hungarian|north_arabian|so%(gdian|uth_arabian)|per%(mic|sian)|italic|turkic)|ck|_chiki)|r%(iya|kh|ya))|a%(r%(ab%(ic)?|m%([ni]|enian))|dl%(m|am)|natolian_hieroglyphs|hom|v%(st|estan)|ghb))\}" contained display 107 | syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(In|blk\=|block\=)%(zanabazar%([ _]square|square)|javanese|h%(a%(lfwidth%( and fullwidth forms|andfullwidthforms|_and_fullwidth_forms)|tran|n%(unoo|gul%(compatibilityjamo|syllables|jamo%(extended\-[ab])?|_%(syllables|jamo%(_extended_[ab])?|compatibility_jamo)| %(syllables|compatibility jamo|jamo%( extended\-[ab])?))|ifi%([_ ]rohingya|rohingya)))|i%(ragana|gh%( %(private use surrogates|surrogates)|_%(private_use_surrogates|surrogates)|surrogates|privateusesurrogates))|ebrew)|i%(pa%([ _]extensions|extensions)|n%(scriptional%(%([ _]pa%(rthian|hlavi))|pa%(rthian|hlavi))|dic%(siyaqnumbers|_siyaq_numbers| siyaq numbers))|deographic%(symbolsandpunctuation|_%(description_characters|symbols_and_punctuation)| %(description characters|symbols and punctuation)|descriptioncharacters)|mperial%(aramaic|[_ ]aramaic))|c%(o%(ntrol%(pictures|[ _]pictures)|ptic%(epactnumbers|_epact_numbers| epact numbers)?|m%(mon%(_indic_number_forms|indicnumberforms| indic number forms)|bining%(halfmarks|_%(diacritical_marks%(_%(supplement|for_symbols|extended))?|marks_for_symbols|half_marks)| %(half marks|diacritical marks%( %(supplement|for symbols|extended))?|marks for symbols)|diacriticalmarks%(supplement|forsymbols|extended)?|marksforsymbols))|unting%( rod numerals|_rod_numerals|rodnumerals))|a%(rian|ucasian%([ _]albanian|albanian))|jk%(unifiedideographs%(extension[dgacfbe])?|s%(ymbolsandpunctuation|trokes)|_%(s%(trokes|ymbols_and_punctuation)|radicals_supplement|unified_ideographs%(_extension_[dgacfbe])?|compatibility%(_%(forms|ideographs%(_supplement)?))?)|compatibility%(forms|ideographs%(supplement)?)?|radicalssupplement| %(compatibility%( %(ideographs%( supplement)?|forms))?|unified ideographs%( extension [dgacfbe])?|radicals supplement|s%(ymbols and punctuation|trokes)))|y%(rillic%(supplement%(ary)?| %(supplement%(ary)?|extended\-[acb])|extended\-[acb]|_%(extended_[acb]|supplement%(ary)?))?|priot%(syllabary|[ _]syllabary))|u%(rrency%([_ ]symbols|symbols)|neiform%(_numbers_and_punctuation|numbersandpunctuation| numbers and punctuation)?)|h%(e%(ss%([_ ]symbols|symbols)|rokee%(supplement|[ _]supplement)?)|a%(m|kma)|orasmian))|g%(othic|u%(njala%(gondi|[_ ]gondi)|jarati|rmukhi)|lagolitic%(supplement|[ _]supplement)?|e%(o%(rgian%(supplement|%([_ ]%(supplement|extended))|extended)?|metric%( shapes%( extended)?|shapes%(extended)?|_shapes%(_extended)?))|neral%([_ ]punctuation|punctuation))|r%(eek%( %(and coptic|extended)|andcoptic|_%(and_coptic|extended)|extended)?|antha))|s%(h%(orthand%( format controls|_format_controls|formatcontrols)|a%(vian|rada))|u%(ndanese%(supplement|[ _]supplement)?|p%(erscripts%(_and_subscripts|andsubscripts| and subscripts)|plementa%(ry%(_private_use_area_[ab]|privateusearea\-[ab]| private use area\-[ab])|l%( %(mathematical operators|symbols and pictographs|punctuation|arrows\-[acb])|symbolsandpictographs|mathematicaloperators|punctuation|arrows\-[acb]|_%(arrows_[acb]|symbols_and_pictographs|mathematical_operators|punctuation))))|tton%(signwriting|[_ ]signwriting))|i%(nhala%( archaic numbers|archaicnumbers|_archaic_numbers)?|ddham)|y%(loti%([_ ]nagri|nagri)|mbols%( %(for legacy computing|and pictographs extended\-a)|forlegacycomputing|andpictographsextended\-a|_%(and_pictographs_extended_a|for_legacy_computing))|riac%(supplement|[ _]supplement)?)|p%(acing%(_modifier_letters| modifier letters|modifierletters)|ecials)|a%(maritan|urashtra)|o%(yombo|gdian|ra%(sompeng|[ _]sompeng))|mall%(kanaextension| %(kana extension|form variants)|_%(kana_extension|form_variants)|formvariants))|y%(i%(syllables|%([_ ]%(syllables|radicals))|radicals|jing%(hexagramsymbols| hexagram symbols|_hexagram_symbols))|ezidi)|p%(h%(o%(enician|netic%( extensions%( supplement)?|extensions%(supplement)?|_extensions%(_supplement)?))|a%(istos%([ _]disc|disc)|gs[_\-]pa))|laying%(cards|[_ ]cards)|rivate%(usearea| use area|_use_area)|a%(hawh%(hmong|[_ ]hmong)|u%(_cin_hau|cinhau| cin hau)|lmyrene)|salter%(pahlavi|[ _]pahlavi))|e%(l%(basan|ymaic)|arly%(_dynastic_cuneiform|dynasticcuneiform| dynastic cuneiform)|moticons|gyptian%(hieroglyph%(formatcontrols|s)| hieroglyph%( format controls|s)|_hieroglyph%(_format_controls|s))|nclosed%( %(cjk letters and months|ideographic supplement|alphanumeric%( supplement|s))|cjklettersandmonths|_%(ideographic_supplement|alphanumeric%(_supplement|s)|cjk_letters_and_months)|alphanumerics%(upplement)?|ideographicsupplement)|thiopic%(supplement|_%(supplement|extended%(_a)?)| %(supplement|extended%(\-a)?)|extended%(\-a)?)?)|r%(u%(nic|mi%(numeralsymbols| numeral symbols|_numeral_symbols))|ejang)|d%(o%(gra|mino%([ _]tiles|tiles))|e%(seret|vanagari%([ _]extended|extended)?)|uployan|i%(ngbats|ves%([_ ]akuru|akuru)))|m%(e%(defaidrin|nde%([ _]kikakui|kikakui)|etei%(mayek%(extensions)?|_mayek%(_extensions)?| mayek%( extensions)?)|roitic%(hieroglyphs|%([_ ]%(hieroglyphs|cursive))|cursive))|o%(ngolian%(supplement|[ _]supplement)?|di%(fier%(_tone_letters| tone letters|toneletters))?)|ro|u%(ltani|sical%([_ ]symbols|symbols))|i%(ao|scellaneous%(technical|symbols%(and%(pictographs|arrows))?|mathematicalsymbols\-[ab]| %(technical|mathematical symbols\-[ab]|symbols%( and %(pictographs|arrows))?)|_%(technical|symbols%(_and_%(pictographs|arrows))?|mathematical_symbols_[ab])))|yanmar%( extended\-[ab]|extended\-[ab]|_extended_[ab])?|a%(h%(ajani|jong%([ _]tiles|tiles))|rchen|n%(daic|ichaean)|yan%([_ ]numerals|numerals)|saram%(gondi|[_ ]gondi)|layalam|thematical%(alphanumericsymbols| %(alphanumeric symbols|operators)|_%(alphanumeric_symbols|operators)|operators)|kasar))|o%(s%(age|manya)|ttoman%(siyaqnumbers|_siyaq_numbers| siyaq numbers)|r%(namental%([ _]dingbats|dingbats)|iya)|ptical%( character recognition|_character_recognition|characterrecognition)|gham|l%([ _]chiki|d%(hungarian| %(hungarian|so%(uth arabian|gdian)|per%(mic|sian)|north arabian|italic|turkic)|per%(mic|sian)|so%(utharabian|gdian)|italic|turkic|_%(hungarian|north_arabian|so%(gdian|uth_arabian)|per%(mic|sian)|italic|turkic)|northarabian)|chiki))|n%(ew%(_tai_lue|a|tailue| tai lue)|ko|yiakeng%( puachue hmong|puachuehmong|_puachue_hmong)|a%(bataean|ndinagari)|u%(shu|mber%(forms|[ _]forms)))|b%(u%(ginese|hid)|a%(s%(sa%([ _]vah|vah)|ic%([ _]latin|latin))|linese|mum%(supplement|[ _]supplement)?|tak)|ra%(hmi|ille%(patterns|[_ ]patterns))|o%(x%([ _]drawing|drawing)|pomofo%([ _]extended|extended)?)|lock%([ _]elements|elements)|haiksuki|yzantine%( musical symbols|musicalsymbols|_musical_symbols)|engali)|l%(i%(mbu|near%(a| %(a|b %(ideograms|syllabary))|b%(ideograms|syllabary)|_%(a|b_%(ideograms|syllabary)))|su%(supplement|[ _]supplement)?)|a%(tin%(extended%(\-[dacbe]|additional)|_%(extended_%([dcbe]|a%(dditional)?)|1_supplement)|\-1%(supplement| supplement)| extended%(\-[dacbe]| additional))|o)|e%(tterlike%([_ ]symbols|symbols)|pcha)|ow%([_ ]surrogates|surrogates)|y[cd]ian)|k%(h%(aroshthi|ojki|mer%([_ ]symbols|symbols)?|udawadi|itan%( small script|smallscript|_small_script))|a%(takana%(_phonetic_extensions|phoneticextensions| phonetic extensions)?|n%(gxi%([_ ]radicals|radicals)|a%(extended\-a|supplement| %(extended\-a|supplement)|_%(supplement|extended_a))|bun|nada)|ithi|yah%([ _]li|li)))|wa%(ncho|rang%(citi|[ _]citi))|t%(elugu|ransport%( and map symbols|_and_map_symbols|andmapsymbols)|i%(rhuta|betan|finagh)|a%(mil%(supplement|[ _]supplement)?|kri|ngut%(supplement|%([ _]%(supplement|components))|components)?|i%(xuanjingsymbols|_%(le|xuan_jing_symbols|tham|viet)|le| %(xuan jing symbols|le|tham|viet)|tham|viet)|g%(alog|s|banwa))|ha%(i|ana))|a%(l%(chemical%([_ ]symbols|symbols)|phabetic%( presentation forms|_presentation_forms|presentationforms))|n%(cient%(_%(greek_%(musical_notation|numbers)|symbols)|greek%(numbers|musicalnotation)| %(greek %(numbers|musical notation)|symbols)|symbols)|atolian%([ _]hieroglyphs|hieroglyphs))|dlam|r%(menian|abic%(extended\-a|mathematicalalphabeticsymbols|supplement|_%(presentation_forms_[ab]|supplement|extended_a|mathematical_alphabetic_symbols)| %(extended\-a|mathematical alphabetic symbols|supplement|presentation forms\-[ab])|presentationforms\-[ab])?|rows)|egean%(numbers|[ _]numbers)|vestan|hom)|u%(garitic|nified%(canadianaboriginalsyllabics%(extended)?|_canadian_aboriginal_syllabics%(_extended)?| canadian aboriginal syllabics%( extended)?))|v%(a%(i|riation%( selectors%( supplement)?|selectors%(supplement)?|_selectors%(_supplement)?))|e%(rtical%(forms|[ _]forms)|dic%([ _]extensions|extensions))))\}" contained display 108 | 109 | syntax match clojureRegexpPredefinedCharClass "\v%(\\[dDsSwW]|\.)" contained display 110 | syntax cluster clojureRegexpCharPropertyClasses contains=clojureRegexpPosixCharClass,clojureRegexpJavaCharClass,clojureRegexpUnicodeCharClass 111 | syntax cluster clojureRegexpCharClasses contains=clojureRegexpPredefinedCharClass,clojureRegexpCharClass,@clojureRegexpCharPropertyClasses 112 | syntax region clojureRegexpCharClass start="\[" skip=/\\\\\|\\]/ end="]" contained contains=clojureRegexpPredefinedCharClass,@clojureRegexpCharPropertyClasses 113 | syntax match clojureRegexpBoundary "\\[bBAGZz]" contained display 114 | syntax match clojureRegexpBoundary "[$^]" contained display 115 | syntax match clojureRegexpQuantifier "[?*+][?+]\=" contained display 116 | syntax match clojureRegexpQuantifier "\v\{\d+%(,|,\d+)?}\??" contained display 117 | syntax match clojureRegexpOr "|" contained display 118 | syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[[:alpha:]]+\>)" contained display 119 | 120 | " Mode modifiers, mode-modified spans, lookaround, regular and atomic 121 | " grouping, and named-capturing. 122 | syntax match clojureRegexpMod "\v\(@<=\?:" contained display 123 | syntax match clojureRegexpMod "\v\(@<=\?[xdsmiuU]*-?[xdsmiuU]+:?" contained display 124 | syntax match clojureRegexpMod "\v\(@<=\?%(\)" contained display 125 | syntax match clojureRegexpMod "\v\(@<=\?\<[[:alpha:]]+\>" contained display 126 | 127 | syntax region clojureRegexpGroup start="(" skip=/\\\\\|\\)/ end=")" matchgroup=clojureRegexpGroup contained contains=clojureRegexpMod,clojureRegexpQuantifier,clojureRegexpBoundary,clojureRegexpEscape,@clojureRegexpCharClasses 128 | syntax region clojureRegexp matchgroup=clojureRegexpDelimiter start=/\#"/ skip=/\\\\\|\\"/ end=/"/ contains=@clojureRegexpCharClasses,clojureRegexpEscape,clojureRegexpQuote,clojureRegexpBoundary,clojureRegexpQuantifier,clojureRegexpOr,clojureRegexpBackRef,clojureRegexpGroup keepend 129 | 130 | syntax keyword clojureCommentTodo contained FIXME XXX TODO BUG NOTE HACK FIXME: XXX: TODO: BUG: NOTE: HACK: 131 | 132 | syntax match clojureComment ";.*$" contains=clojureCommentTodo,@Spell 133 | syntax match clojureComment "#!.*$" 134 | syntax match clojureComment "," 135 | 136 | " Comment out discarded forms. 137 | if exists('g:clojure_discard_macro') && g:clojure_discard_macro 138 | syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*/ end=/[, \t\n()\[\]{}";]/me=e-1 139 | syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*"/ skip=/\\[\\"]/ end=/"/ 140 | syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*(/ end=/)/ contains=clojureDiscardForm 141 | syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*\[/ end=/\]/ contains=clojureDiscardForm 142 | syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*{/ end=/}/ contains=clojureDiscardForm 143 | 144 | syntax region clojureDiscardForm start="(" end=")" contained contains=clojureDiscardForm 145 | syntax region clojureDiscardForm start="{" end="}" contained contains=clojureDiscardForm 146 | syntax region clojureDiscardForm start="\[" end="\]" contained contains=clojureDiscardForm 147 | endif 148 | 149 | " -*- TOP CLUSTER -*- 150 | " Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj 151 | syntax cluster clojureTop contains=@Spell,clojureAnonArg,clojureBoolean,clojureCharacter,clojureComment,clojureCond,clojureConstant,clojureDefine,clojureDeref,clojureDiscard,clojureDispatch,clojureError,clojureException,clojureFunc,clojureKeyword,clojureMacro,clojureMap,clojureMeta,clojureNumber,clojureQuote,clojureRegexp,clojureRepeat,clojureSexp,clojureSpecial,clojureString,clojureSymbol,clojureUnquote,clojureVariable,clojureVector,jankNativeRaw 152 | 153 | syntax region clojureSexp matchgroup=clojureParen start="(" end=")" contains=@clojureTop fold 154 | syntax region clojureVector matchgroup=clojureParen start="\[" end="]" contains=@clojureTop fold 155 | syntax region clojureMap matchgroup=clojureParen start="{" end="}" contains=@clojureTop fold 156 | 157 | " Highlight superfluous closing parens, brackets and braces. 158 | syntax match clojureError "]\|}\|)" 159 | 160 | syn include @CPP syntax/cpp.vim 161 | "syntax region jankNativeRawString start=+"+ end=+"+ contained contains=@CPP 162 | "syn match jankNativeRawString +"\zs[^"]*\ze"+ contains=@CPP 163 | syn match jankNativeRawString +"\zs\_.\{-}\ze"+ contains=@CPP 164 | "syn match jankNativeRawString +"\zs[^\"]\{-}\ze"+ contains=@CPP 165 | syntax region jankNativeRaw matchgroup=Special start=+(native/raw+ end=+)+ contains=jankNativeRawString 166 | 167 | syntax sync fromstart 168 | 169 | highlight default link clojureConstant Constant 170 | highlight default link clojureBoolean Boolean 171 | highlight default link clojureCharacter Character 172 | highlight default link clojureKeyword Keyword 173 | highlight default link clojureNumber Number 174 | highlight default link clojureString String 175 | highlight default link clojureStringDelimiter String 176 | highlight default link clojureStringEscape Character 177 | 178 | highlight default link clojureRegexp Constant 179 | highlight default link clojureRegexpDelimiter Constant 180 | highlight default link clojureRegexpEscape Character 181 | highlight default link clojureRegexpCharClass SpecialChar 182 | highlight default link clojureRegexpPosixCharClass clojureRegexpCharClass 183 | highlight default link clojureRegexpJavaCharClass clojureRegexpCharClass 184 | highlight default link clojureRegexpUnicodeCharClass clojureRegexpCharClass 185 | highlight default link clojureRegexpPredefinedCharClass clojureRegexpCharClass 186 | highlight default link clojureRegexpBoundary SpecialChar 187 | highlight default link clojureRegexpQuantifier SpecialChar 188 | highlight default link clojureRegexpMod SpecialChar 189 | highlight default link clojureRegexpOr SpecialChar 190 | highlight default link clojureRegexpBackRef SpecialChar 191 | highlight default link clojureRegexpGroup clojureRegexp 192 | highlight default link clojureRegexpQuoted clojureString 193 | highlight default link clojureRegexpQuote clojureRegexpBoundary 194 | 195 | highlight default link clojureVariable Identifier 196 | highlight default link clojureCond Conditional 197 | highlight default link clojureDefine Define 198 | highlight default link clojureException Exception 199 | highlight default link clojureFunc Function 200 | highlight default link clojureMacro Macro 201 | highlight default link clojureRepeat Repeat 202 | 203 | highlight default link clojureSpecial Special 204 | highlight default link clojureQuote SpecialChar 205 | highlight default link clojureUnquote SpecialChar 206 | highlight default link clojureMeta SpecialChar 207 | highlight default link clojureDeref SpecialChar 208 | highlight default link clojureAnonArg SpecialChar 209 | highlight default link clojureDispatch SpecialChar 210 | 211 | highlight default link clojureComment Comment 212 | highlight default link clojureCommentTodo Todo 213 | highlight default link clojureDiscard clojureComment 214 | highlight default link clojureDiscardForm clojureDiscard 215 | 216 | highlight default link clojureError Error 217 | 218 | highlight default link clojureParen Delimiter 219 | 220 | let b:current_syntax = "jank" 221 | 222 | let &cpo = s:cpo_sav 223 | unlet! s:cpo_sav 224 | 225 | " vim:sts=8:sw=8:ts=8:noet 226 | --------------------------------------------------------------------------------