diff --git a/dot_vim/after/ftplugin/coffee/folding.vim b/dot_vim/after/ftplugin/coffee/folding.vim new file mode 100644 index 0000000..a7007b8 --- /dev/null +++ b/dot_vim/after/ftplugin/coffee/folding.vim @@ -0,0 +1,37 @@ +function! CoffeeIndentLevel(lnum) + return indent(a:lnum) / &shiftwidth +endfunction + +function! NextNonBlankLine(lnum) + let numlines = line('$') + let current = a:lnum + 1 + + while current <= numlines + if getline(current) =~? '\v\S' + return current + endif + + let current += 1 + endwhile + + return -2 +endfunction + +function! CoffeeFolds() + if getline(v:lnum) =~ '\v^\s*$' + return '-1' + endif + + let this_indent = IndentLevel(a:lnum) + let next_indent = IndentLevel(NextNonBlankLine(a:lnum)) + + if next_indent == this_indent + return this_indent + elseif next_indent < this_indent + return this_indent + elseif next_indent > this_indent + return '>' . next_indent + endif +endfunction +setlocal foldmethod=expr +setlocal foldexpr=CoffeeFolds() diff --git a/dot_vim/after/plugin/ale.vim b/dot_vim/after/plugin/ale.vim new file mode 100644 index 0000000..dbde9f9 --- /dev/null +++ b/dot_vim/after/plugin/ale.vim @@ -0,0 +1,16 @@ +let g:ale_completion_enabled = 1 +let g:ale_completion_autoimport = 1 +let g:ale_fixers = { + \ '*': ['remove_trailing_lines', 'trim_whitespace'], +\ 'javascript': ['eslint'], +\ 'rust': ['rustfmt'], +\ 'dart': ['dartfmt'], +\} +let g:ale_rust_analyzer_executable = '/home/linly/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rust-analyzer' +let g:ale_linters = {'rust': ['cargo', 'analyzer']} +let g:rustfmt_autosave = 1 +let g:rust_clip_command = 'xclip -selection clipboard' +let g:ale_fix_on_save = 1 +let g:ale_sign_error = '>>' +let g:ale_sign_warning = '--' +let g:ale_virtualtext_cursor = 'current' diff --git a/dot_vim/autoload/pathogen.vim b/dot_vim/autoload/pathogen.vim new file mode 100644 index 0000000..df4f22d --- /dev/null +++ b/dot_vim/autoload/pathogen.vim @@ -0,0 +1,245 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.0 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc +" prior to `filetype plugin indent on` is the only other setup necessary. +" +" The API is documented inline below. For maximum ease of reading, +" :set foldmethod=marker + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a directory name to invoke +" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path +" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards, +" pathogen#cycle_filetype() is invoked. +function! pathogen#infect(...) abort " {{{1 + let source_path = a:0 ? a:1 : 'bundle' + if source_path =~# '[\\/]' + call pathogen#runtime_prepend_subdirectories(source_path) + else + call pathogen#runtime_append_all_bundles(source_path) + endif + call pathogen#cycle_filetype() +endfunction " }}}1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction " }}}1 + +function! s:find(count,cmd,file,lcd) " {{{1 + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + elseif a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) + else + return a:cmd.' '.pathogen#fnameescape(file) + endif +endfunction " }}}1 + +function! s:Findcomplete(A,L,P) " {{{1 + let sep = pathogen#separator() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction " }}}1 + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set ft=vim ts=8 sw=2 sts=2: diff --git a/dot_vim/autoload/plug.vim b/dot_vim/autoload/plug.vim new file mode 100644 index 0000000..652caa8 --- /dev/null +++ b/dot_vim/autoload/plug.vim @@ -0,0 +1,2812 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-default branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or ``-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand(':p')) + set shellslash +else + let s:me = resolve(expand(':p')) +endif +let s:base_spec = { 'branch': '', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! s:is_powershell(shell) + return a:shell =~# 'powershell\(\.exe\)\?$' || a:shell =~# 'pwsh\(\.exe\)\?$' +endfunction + +function! s:isabsolute(dir) abort + return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') +endfunction + +function! s:git_dir(dir) abort + let gitdir = s:trim(a:dir) . '/.git' + if isdirectory(gitdir) + return gitdir + endif + if !filereadable(gitdir) + return '' + endif + let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') + if len(gitdir) && !s:isabsolute(gitdir) + let gitdir = a:dir . '/' . gitdir + endif + return isdirectory(gitdir) ? gitdir : '' +endfunction + +function! s:git_origin_url(dir) abort + let gitdir = s:git_dir(a:dir) + let config = gitdir . '/config' + if empty(gitdir) || !filereadable(config) + return '' + endif + return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') +endfunction + +function! s:git_revision(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + + let line = get(readfile(head), 0, '') + let ref = matchstr(line, '^ref: \zs.*') + if empty(ref) + return line + endif + + if filereadable(gitdir . '/' . ref) + return get(readfile(gitdir . '/' . ref), 0, '') + endif + + if filereadable(gitdir . '/packed-refs') + for line in readfile(gitdir . '/packed-refs') + if line =~# ' ' . ref + return matchstr(line, '^[0-9a-f]*') + endif + endfor + endif + + return '' +endfunction + +function! s:git_local_branch(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') + return len(branch) ? branch : 'HEAD' +endfunction + +function! s:git_origin_branch(spec) + if len(a:spec.branch) + return a:spec.branch + endif + + " The file may not be present if this is a local repository + let gitdir = s:git_dir(a:spec.dir) + let origin_head = gitdir.'/refs/remotes/origin/HEAD' + if len(gitdir) && filereadable(origin_head) + return matchstr(get(readfile(origin_head), 0, ''), + \ '^ref: refs/remotes/origin/\zs.*') + endif + + " The command may not return the name of a branch in detached HEAD state + let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) + return v:shell_error ? '' : result[-1] +endfunction + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif has('nvim') + let home = stdpath('data') . '/plugged' + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#() + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\(\.exe\)\?$' || s:is_powershell(&shell)) + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=0 -bar -bang PlugClean call s:clean(0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if get(g:, 'did_load_filetypes', 0) + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^', "\", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(repo . ' ' . v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' + if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif + let opts.tag = a:arg + elseif type == s:TYPE.dict + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(a:arg, opt) + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(a:arg, opt) + \ && type(a:arg[opt]) != s:TYPE.list + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(a:arg, 'do') + \ && type(a:arg.do) != s:TYPE.funcref + \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-\{1}\ / + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn match plugH2 /^-\{2,}/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap R :call retry() + nnoremap D :PlugDiff + nnoremap S :PlugStatus + nnoremap U :call status_update() + xnoremap U :call status_update() + nnoremap ]] :silent! call section('') + nnoremap [[ :silent! call section('b') +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap q :call close_pane() + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap ' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:close_pane() + if b:plug_preview == 1 + pc + let b:plug_preview = -1 + else + bd + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if s:is_powershell(&shell) + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\\" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + call s:load_plugin(spec) + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:git_revision(a:spec.dir) + if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) + let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' + let output = s:system( + \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + " Set remote name, overriding a possible user git config's clone.defaultRemoteName + let s:clone_opt = ['--origin', 'origin'] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = s:git_origin_branch(spec) + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\(\.exe\)\?$' + return s:shellesc_cmd(a:arg, script) + elseif s:is_powershell(shell) + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] + let remote = result[-1] + if empty(remote) + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let sha = s:git_revision(a:spec.dir) + if empty(sha) + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let current_branch = result[0] + " Check tag + let origin_branch = s:git_origin_branch(a:spec) + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif origin_branch !=# current_branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ current_branch, origin_branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', origin_branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ origin_branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + return s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap d :set opfunc=delete_opg@ + nmap dd d_ + xnoremap d :call delete_op(visualmode(), 1) + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + let err_count = 0 + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + let err = s:rm_rf(line[2:]) + setlocal modifiable + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap L :call status_load(line('.')) + xnoremap L :call status_load(line('.')) + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$') + if empty(name) + return + endif + let title = 'HEAD@{1}..' + let command = 'git diff --no-color HEAD@{1}' + else + let title = sha + let command = 'git show --no-color --pretty=medium '.sha + let name = s:find_name(line('.')) + endif + + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' title + else + execute 'pedit' title + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap q :q + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let branch = s:git_origin_branch(v) + if len(branch) + let range = origin ? '..origin/'.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap (plug-preview) :silent! call preview_commit() + if empty(maparg("\", 'n')) + nmap (plug-preview) + endif + if empty(maparg('o', 'n')) + nmap o (plug-preview) + endif + endif + if cnts[0] + nnoremap X :call revert() + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@= 1.5. Some older versions might work but it is recommeded to use at least version 1.5. + +## Platform-specific Plugins + +* [vim-vroom](https://github.com/skalnik/vim-vroom) runner for rspec, cucumber and test/unit; vimux support via `g:vroom_use_vimux` +* [vimux-ruby-test](https://github.com/pgr0ss/vimux-ruby-test) a set of commands to easily run ruby tests +* [vimux-cucumber](https://github.com/cloud8421/vimux-cucumber) run Cucumber Features through Vimux +* [vim-turbux](https://github.com/jgdavey/vim-turbux) Turbo Ruby testing with tmux +* [vimux-pyutils](https://github.com/julienr/vimux-pyutils) A set of functions for vimux that allow to run code blocks in ipython +* [vimux-nose-test](https://github.com/pitluga/vimux-nose-test) Run nose tests in vimux +* [vimux-golang](https://github.com/benmills/vimux-golang) Run go tests in vimux +* [vimux-zeus](https://github.com/jingweno/vimux-zeus) Run zeus commands in vimux +* [vimix](https://github.com/spiegela/vimix) Run Elixir mix commands in vimux + +## Usage + +The full documentation is available [online](https://raw.github.com/benmills/vimux/master/doc/vimux.txt) and accessible inside vim `:help vimux` diff --git a/dot_vim/bundle/vimux.git/doc/vimux.txt b/dot_vim/bundle/vimux.git/doc/vimux.txt new file mode 100644 index 0000000..6b2e1f1 --- /dev/null +++ b/dot_vim/bundle/vimux.git/doc/vimux.txt @@ -0,0 +1,355 @@ +*vimux.txt* easily interact with tmux + + Vimux + effortless vim and tmux interaction + +============================================================================== +CONTENTS *vimux-contents* + + 1. About............................ |VimuxAbout| + 2. Usage ........................... |VimuxUsage| + 2.1 .............................. |VimuxPromptCommand| + 2.2 .............................. |VimuxRunLastCommand| + 2.3 .............................. |VimuxInspectRunner| + 2.4 .............................. |VimuxCloseRunner| + 2.5 .............................. |VimuxInterruptRunner| + 2.6 .............................. |VimuxClearRunnerHistory| + 2.7 .............................. |VimuxZoomRunner| + 2.8 .............................. |VimuxRunCommandInDir| + 3. Misc ............................ |VimuxMisc| + 3.1 Example Keybinding............ |VimuxExampleKeybinding| + 3.2 Tslime Replacement............ |VimuxTslimeReplacement| + 4. Configuration ................... |VimuxConfiguration| + + +============================================================================== +ABOUT (1) *VimuxAbout* + +Vimux -- Easily interact with tmux from vim. + +What inspired me to write vimux was tslime.vim [1], a plugin that lets you +send input to tmux. While tslime.vim works well, I felt it wasn't optimized +for my primary use case which was having a smaller tmux pane that I would use +to run tests or play with a REPL. + +My goal with vimux is to make interacting with tmux from vim effortless. By +default when you call `VimuxRunCommand` vimux will create a 20% tall +horizontal pane under your current tmux pane and execute a command in it +without losing focus of vim. Once that pane exists whenever you call +`VimuxRunCommand` again the command will be executed in that pane. As I was +using vimux myself I wanted to rerun commands over and over. An example of +this was running the current file through rspec. Rather than typing that over +and over I wrote `VimuxRunLastCommand` that will execute the last command +you called with `VimuxRunCommand`. + +Other auxiliary functions and the ones I talked about above can be found +bellow with a full description and example key binds for your vimrc. + +[1] https://github.com/kikijump/tslime.vim + + +============================================================================== +USAGE (2) *VimuxUsage* + +The function VimuxRunCommand(command) is the core of Vimux. It will +create a split pane in the current window and run the passed command in it. +> + :call VimuxRunCommand("ls") +< +This will run the command in a split pane without losing focus of vim. If the +command takes a long time to return you can continue to use vim while the +process finishes and will see the output in the pane when it's finished. + +Furthermore there are several handy commands all starting with 'Vimux': + - |VimuxRunCommand| + - |VimuxSendText| + - |VimuxSendKeys| + - |VimuxOpenPane| + - |VimuxRunLastCommand| + - |VimuxCloseRunner| + - |VimuxInspectRunner| + - |VimuxInterruptRunner| + - |VimuxPromptCommand| + - |VimuxClearRunnerHistory| + - |VimuxZoomRunner| + - |VimuxRunCommandInDir| + +------------------------------------------------------------------------------ + *VimuxRunCommand* +VimuxRunCommand~ + +Run a system command in a small horizontal split bellow +the current pane vim is in. You can optionally pass a second argument to stop +vimux from automatically sending a return after the command. +> + " Run the current file with rspec + map rb :call VimuxRunCommand("clear; rspec " . bufname("%")) + " Run command without sending a return + map rq :call VimuxRunCommand("clear; rspec " . bufname("%"), 0) +< + +------------------------------------------------------------------------------ + *VimuxSendText* +VimuxSendText~ + +Send raw text to the runer pane. This command will not open a new pane if one +does not already exist. You will need to use VimuxOpenPane to do this. This +command can be used to interact with REPLs or other interactive terminal +programs that are not shells. + + +------------------------------------------------------------------------------ + *VimuxSendKeys* +VimuxSendKeys~ + +Send keys to the runner pane. This command will not open a new pane if one +does not already exist. You will need to use VimuxOpenPane to do this. You can +use this command to send keys such as "Enter" or "C-c" to the runner pane. + +------------------------------------------------------------------------------ + *VimuxOpenPane* +VimuxOpenPane~ + +This will either open a new pane or use the nearest pane and set it as the +vimux runner pane for the other vimux commands. You can control if this command +uses the nearest pane or always creates a new one with g:VimuxUseNearest + +------------------------------------------------------------------------------ + *VimuxPromptCommand* +VimuxPromptCommand~ + +Prompt for a command and run it in a small horizontal split bellow the current +pane. A parameter can be supplied to predefine a command or a part of the +command which can be edited in the prompt. +> + " Prompt for a command to run map + map vp :VimuxPromptCommand + map vm :VimuxPromptCommand("make ") +< + +------------------------------------------------------------------------------ + *VimuxRunLastCommand* +VimuxRunLastCommand~ + +Run the last command executed by `VimuxRunCommand` +> + " Run last command executed by VimuxRunCommand + map vl :VimuxRunLastCommand +< + +------------------------------------------------------------------------------ + *VimuxInspectRunner* +VimuxInspectRunner~ + +Move into the tmux runner pane created by `VimuxRunCommand` and enter copy +pmode (scroll mode). +> + " Inspect runner pane map + map vi :VimuxInspectRunner +< + +------------------------------------------------------------------------------ + *VimuxCloseRunner* +VimuxCloseRunner~ + +Close the tmux runner created by `VimuxRunCommand` +> + " Close vim tmux runner opened by VimuxRunCommand + map vq :VimuxCloseRunner +< + +------------------------------------------------------------------------------ + *VimuxInterruptRunner* +VimuxInterruptRunner~ + +Interrupt any command that is running inside the +runner pane. +> + " Interrupt any command running in the runner pane map + map vs :VimuxInterruptRunner +< + + + +------------------------------------------------------------------------------ + *VimuxClearRunnerHistory* +VimuxClearRunnerHistory~ + +Clear the tmux history of the runner pane for when +you enter tmux scroll mode inside the runner pane. +> + " Clear the tmux history of the runner pane + map vc :VimuxClearRunnerHistory +< + +------------------------------------------------------------------------------ + *VimuxZoomRunner* +VimuxZoomRunner~ + +Zoom the runner pane. Once its zoomed, you will need +to use tmux " z" to restore the runner pane. +Zoom requires tmux version >= 1.8 +> + + " Zoom the tmux runner page + map vz :VimuxZoomRunner +< + +------------------------------------------------------------------------------ + *VimuxRunCommandInDir* +VimuxRunCommandInDir~ + +Runs the specified command inside the directory of +the currently opened file. Takes two arguments. command and inFile + +command: The command to run +inFile: If 1 the filename will be appended to the command +> + + " Compile currently opened latex file to pdf + autocmd Filetype tex nnoremap rr :update:call VimuxRunCommandInDir('latexmk -pdf', 1) + " Push the repository of the currently opened file + nnoremap gp :call VimuxRunCommandInDir("git push", 0) +< + +============================================================================== +MISC (3) *VimuxMisc* + +------------------------------------------------------------------------------ + *VimuxExampleKeybinding* +Full Keybind Example~ + +> + " Run the current file with rspec + map rb :call VimuxRunCommand("clear; rspec " . bufname("%")) + + " Prompt for a command to run + map vp :VimuxPromptCommand + + " Run last command executed by VimuxRunCommand + map vl :VimuxRunLastCommand + + " Inspect runner pane + map vi :VimuxInspectRunner + + " Close vim tmux runner opened by VimuxRunCommand + map vq :VimuxCloseRunner + + " Interrupt any command running in the runner pane + map vx :VimuxInterruptRunner + + " Zoom the runner pane (use z to restore runner pane) + map vz :call VimuxZoomRunner() +> + +------------------------------------------------------------------------------ + *VimuxTslimeReplacement* +Vimux as tslime replacement~ + +Here is how to use vimux to send code to a REPL. This is similar to tslime. +First, add some helpful mappings. + +> + function! VimuxSlime() + call VimuxSendText(@v) + call VimuxSendKeys("Enter") + endfunction + + " If text is selected, save it in the v buffer and send that buffer it to tmux + vmap vs "vy :call VimuxSlime() + + " Select current paragraph and send it to tmux + nmap vs vipvs +< + +Now, open a clojure file. Let's say your leader is backslash (\). Type \vp, +and then type lein repl at the prompt. This opens a tmux split running a REPL. +Then, select text or put the cursor on a function and type \vs. This will send +it to the REPL and evaluate it. The reason we pass `0` to `VimuxRunCommand` +is to stop the normal return that is sent to the runner pane and use our own +new line so the clojure REPL will evaluate the selected text without adding an +extra return. Thanks to @trptcolin for discovering this issue. + + +============================================================================== +CONFIGURATION (4) *VimuxConfiguration* + +You can configure Vimux like this: + +------------------------------------------------------------------------------ + *VimuxConfiguration_height* +2.1 g:VimuxHeight~ + +The percent of the screen the split pane Vimux will spawn should take up. + + let g:VimuxHeight = "40" + +Default: "20" + +------------------------------------------------------------------------------ + *VimuxConfiguration_orientation* +2.2 g:VimuxOrientation~ + +The default orientation of the split tmux pane. This tells tmux to make the +pane either vertically or horizontally, which is backward from how Vim handles +creating splits. + + let g:VimuxOrientation = "h" + +Options: + "v": vertical + "h": horizontal + +Default: "v" + +------------------------------------------------------------------------------ + *VimuxConfiguration_use_nearest* +2.3 g:VimuxUseNearest + +Use exising pane or window (not used by vim) if found instead of running +split-window. + + let VimuxUseNearest = 1 + +Default: 1 + +------------------------------------------------------------------------------ + *VimuxConfiguration_reset_sequence* +2.4 g:VimuxResetSequence~ + +The keys sent to the runner pane before running a command. By default it sends +`q` to make sure the pane is not in scroll-mode and `C-u` to clear the line. + + let VimuxResetSequence = "" + +Default: "q C-u" + +------------------------------------------------------------------------------ + *VimuxPromptString* +2.5 g:VimuxPromptString~ + +The string presented in the vim command line when Vimux is invoked. Be sure +to put a space at the end of the string to allow for distinction between +the prompt and your input. + + let g:VimuxPromptString = "" + +Default: "Command? " + +------------------------------------------------------------------------------ + *VimuxRunnerType* +2.6 g:VimuxRunnerType~ + +The type of view object Vimux should use for the runner. For reference, a +tmux session is a group of windows, and a window is a layout of panes. + + let g:VimuxRunnerType = "window" + +Options: + "pane": for panes + "window": for windows + +Default: "pane" + +============================================================================== +vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl: diff --git a/dot_vim/bundle/vimux.git/dot_gitignore b/dot_vim/bundle/vimux.git/dot_gitignore new file mode 100644 index 0000000..926ccaa --- /dev/null +++ b/dot_vim/bundle/vimux.git/dot_gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/dot_vim/bundle/vimux.git/plugin/vimux.vim b/dot_vim/bundle/vimux.git/plugin/vimux.vim new file mode 100644 index 0000000..12ae004 --- /dev/null +++ b/dot_vim/bundle/vimux.git/plugin/vimux.vim @@ -0,0 +1,198 @@ +if exists("g:loaded_vimux") || &cp + finish +endif +let g:loaded_vimux = 1 + +command -nargs=* VimuxRunCommand :call VimuxRunCommand() +command VimuxRunLastCommand :call VimuxRunLastCommand() +command VimuxCloseRunner :call VimuxCloseRunner() +command VimuxZoomRunner :call VimuxZoomRunner() +command VimuxInspectRunner :call VimuxInspectRunner() +command VimuxScrollUpInspect :call VimuxScrollUpInspect() +command VimuxScrollDownInspect :call VimuxScrollDownInspect() +command VimuxInterruptRunner :call VimuxInterruptRunner() +command -nargs=? VimuxPromptCommand :call VimuxPromptCommand() +command VimuxClearRunnerHistory :call VimuxClearRunnerHistory() +command VimuxTogglePane :call VimuxTogglePane() + +function! VimuxRunCommandInDir(command, useFile) + let l:file = "" + if a:useFile ==# 1 + let l:file = shellescape(expand('%:t'), 1) + endif + call VimuxRunCommand("cd ".shellescape(expand('%:p:h'), 1)." && ".a:command." ".l:file." && cd - > /dev/null") +endfunction + +function! VimuxRunLastCommand() + if exists("g:VimuxRunnerIndex") + call VimuxRunCommand(g:VimuxLastCommand) + else + echo "No last vimux command." + endif +endfunction + +function! VimuxRunCommand(command, ...) + if !exists("g:VimuxRunnerIndex") || _VimuxHasRunner(g:VimuxRunnerIndex) == -1 + call VimuxOpenRunner() + endif + + let l:autoreturn = 1 + if exists("a:1") + let l:autoreturn = a:1 + endif + + let resetSequence = _VimuxOption("g:VimuxResetSequence", "q C-u") + let g:VimuxLastCommand = a:command + + call VimuxSendKeys(resetSequence) + call VimuxSendText(a:command) + + if l:autoreturn == 1 + call VimuxSendKeys("Enter") + endif +endfunction + +function! VimuxSendText(text) + call VimuxSendKeys('"'.escape(a:text, '"$').'"') +endfunction + +function! VimuxSendKeys(keys) + if exists("g:VimuxRunnerIndex") + call system("tmux send-keys -t ".g:VimuxRunnerIndex." ".a:keys) + else + echo "No vimux runner pane/window. Create one with VimuxOpenRunner" + endif +endfunction + +function! VimuxOpenRunner() + let nearestIndex = _VimuxNearestIndex() + + if _VimuxOption("g:VimuxUseNearest", 1) == 1 && nearestIndex != -1 + let g:VimuxRunnerIndex = nearestIndex + else + if _VimuxRunnerType() == "pane" + let height = _VimuxOption("g:VimuxHeight", 20) + let orientation = _VimuxOption("g:VimuxOrientation", "v") + call system("tmux split-window -p ".height." -".orientation) + elseif _VimuxRunnerType() == "window" + call system("tmux new-window") + endif + + let g:VimuxRunnerIndex = _VimuxTmuxIndex() + call system("tmux last-"._VimuxRunnerType()) + endif +endfunction + +function! VimuxCloseRunner() + if exists("g:VimuxRunnerIndex") + call system("tmux kill-"._VimuxRunnerType()." -t ".g:VimuxRunnerIndex) + unlet g:VimuxRunnerIndex + endif +endfunction + +function! VimuxTogglePane() + if exists("g:VimuxRunnerIndex") + if _VimuxRunnerType() == "window" + call system("tmux join-pane -d -s ".g:VimuxRunnerIndex." -p "._VimuxOption("g:VimuxHeight", 20)) + let g:VimuxRunnerType = "pane" + elseif _VimuxRunnerType() == "pane" + let g:VimuxRunnerIndex=substitute(system("tmux break-pane -d -t ".g:VimuxRunnerIndex." -P -F '#{window_index}'"), "\n", "", "") + let g:VimuxRunnerType = "window" + endif + endif +endfunction + +function! VimuxZoomRunner() + if exists("g:VimuxRunnerIndex") + if _VimuxRunnerType() == "pane" + call system("tmux resize-pane -Z -t ".g:VimuxRunnerIndex) + elseif _VimuxRunnerType() == "window" + call system("tmux select-window -t ".g:VimuxRunnerIndex) + endif + endif +endfunction + +function! VimuxInspectRunner() + call system("tmux select-"._VimuxRunnerType()." -t ".g:VimuxRunnerIndex) + call system("tmux copy-mode") +endfunction + +function! VimuxScrollUpInspect() + call VimuxInspectRunner() + call system("tmux last-"._VimuxRunnerType()) + call VimuxSendKeys("C-u") +endfunction + +function! VimuxScrollDownInspect() + call VimuxInspectRunner() + call system("tmux last-"._VimuxRunnerType()) + call VimuxSendKeys("C-d") +endfunction + +function! VimuxInterruptRunner() + call VimuxSendKeys("^c") +endfunction + +function! VimuxClearRunnerHistory() + if exists("g:VimuxRunnerIndex") + call system("tmux clear-history -t ".g:VimuxRunnerIndex) + endif +endfunction + +function! VimuxPromptCommand(...) + let command = a:0 == 1 ? a:1 : "" + let l:command = input(_VimuxOption("g:VimuxPromptString", "Command? "), command) + call VimuxRunCommand(l:command) +endfunction + +function! _VimuxTmuxSession() + return _VimuxTmuxProperty("#S") +endfunction + +function! _VimuxTmuxIndex() + if _VimuxRunnerType() == "pane" + return _VimuxTmuxPaneIndex() + else + return _VimuxTmuxWindowIndex() + end +endfunction + +function! _VimuxTmuxPaneIndex() + return _VimuxTmuxProperty("#I.#P") +endfunction + +function! _VimuxTmuxWindowIndex() + return _VimuxTmuxProperty("#I") +endfunction + +function! _VimuxNearestIndex() + let views = split(system("tmux list-"._VimuxRunnerType()."s"), "\n") + + for view in views + if match(view, "(active)") == -1 + return split(view, ":")[0] + endif + endfor + + return -1 +endfunction + +function! _VimuxRunnerType() + return _VimuxOption("g:VimuxRunnerType", "pane") +endfunction + +function! _VimuxOption(option, default) + if exists(a:option) + return eval(a:option) + else + return a:default + endif +endfunction + +function! _VimuxTmuxProperty(property) + return substitute(system("tmux display -p '".a:property."'"), '\n$', '', '') +endfunction + +function! _VimuxHasRunner(index) + return match(system("tmux list-"._VimuxRunnerType()."s -a"), a:index.":") +endfunction diff --git a/dot_vim/colors/Tomorrow-Night-Blue.vim b/dot_vim/colors/Tomorrow-Night-Blue.vim new file mode 100644 index 0000000..911c99d --- /dev/null +++ b/dot_vim/colors/Tomorrow-Night-Blue.vim @@ -0,0 +1,347 @@ +" Tomorrow Night Blue - Full Colour and 256 Colour +" http://chriskempson.com +" +" Hex colour conversion functions borrowed from the theme "Desert256"" + +" Default GUI Colours +let s:foreground = "ffffff" +let s:background = "002451" +let s:selection = "003f8e" +let s:line = "00346e" +let s:comment = "7285b7" +let s:red = "ff9da4" +let s:orange = "ffc58f" +let s:yellow = "ffeead" +let s:green = "d1f1a9" +let s:aqua = "99ffff" +let s:blue = "bbdaff" +let s:purple = "ebbbff" +let s:window = "4d5057" + +set background=dark +hi clear +syntax reset + +let g:colors_name = "Tomorrow-Night-Blue" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " Returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " Returns the palette index for the given grey index + fun grey_colour(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " Returns an approximate colour index for the given colour level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual colour level for the given colour index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " Returns the palette index for the given R/G/B colour indices + fun rgb_colour(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " Returns the palette index to approximate the given R/G/B colour levels + fun colour(r, g, b) + " Get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " Get the closest colour + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " There are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " Use the grey + return grey_colour(l:gx) + else + " Use the colour + return rgb_colour(l:x, l:y, l:z) + endif + else + " Only one possibility + return rgb_colour(l:x, l:y, l:z) + endif + endfun + + " Returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return colour(l:r, l:g, l:b) + endfun + + " Sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + + " Vim Highlighting + call X("Normal", s:foreground, s:background, "") + call X("LineNr", s:selection, "", "") + call X("NonText", s:selection, "", "") + call X("SpecialKey", s:selection, "", "") + call X("Search", s:background, s:yellow, "") + call X("TabLine", s:foreground, s:background, "reverse") + call X("StatusLine", s:window, s:yellow, "reverse") + call X("StatusLineNC", s:window, s:foreground, "reverse") + call X("VertSplit", s:window, s:window, "none") + call X("Visual", "", s:selection, "") + call X("Directory", s:blue, "", "") + call X("ModeMsg", s:green, "", "") + call X("MoreMsg", s:green, "", "") + call X("Question", s:green, "", "") + call X("WarningMsg", s:red, "", "") + call X("MatchParen", "", s:selection, "") + call X("Folded", s:comment, s:background, "") + call X("FoldColumn", "", s:background, "") + if version >= 700 + call X("CursorLine", "", s:line, "none") + call X("CursorColumn", "", s:line, "none") + call X("PMenu", s:foreground, s:selection, "none") + call X("PMenuSel", s:foreground, s:selection, "reverse") + end + if version >= 703 + call X("ColorColumn", "", s:line, "none") + end + + " Standard Highlighting + call X("Comment", s:comment, "", "") + call X("Todo", s:comment, s:background, "") + call X("Title", s:comment, "", "") + call X("Identifier", s:red, "", "none") + call X("Statement", s:foreground, "", "") + call X("Conditional", s:foreground, "", "") + call X("Repeat", s:foreground, "", "") + call X("Structure", s:purple, "", "") + call X("Function", s:blue, "", "") + call X("Constant", s:orange, "", "") + call X("String", s:green, "", "") + call X("Special", s:foreground, "", "") + call X("PreProc", s:purple, "", "") + call X("Operator", s:aqua, "", "none") + call X("Type", s:blue, "", "none") + call X("Define", s:purple, "", "none") + call X("Include", s:blue, "", "") + "call X("Ignore", "666666", "", "") + + " Vim Highlighting + call X("vimCommand", s:red, "", "none") + + " C Highlighting + call X("cType", s:yellow, "", "") + call X("cStorageClass", s:purple, "", "") + call X("cConditional", s:purple, "", "") + call X("cRepeat", s:purple, "", "") + + " PHP Highlighting + call X("phpVarSelector", s:red, "", "") + call X("phpKeyword", s:purple, "", "") + call X("phpRepeat", s:purple, "", "") + call X("phpConditional", s:purple, "", "") + call X("phpStatement", s:purple, "", "") + call X("phpMemberSelector", s:foreground, "", "") + + " Ruby Highlighting + call X("rubySymbol", s:green, "", "") + call X("rubyConstant", s:yellow, "", "") + call X("rubyAttribute", s:blue, "", "") + call X("rubyInclude", s:blue, "", "") + call X("rubyLocalVariableOrMethod", s:orange, "", "") + call X("rubyCurlyBlock", s:orange, "", "") + call X("rubyStringDelimiter", s:green, "", "") + call X("rubyInterpolationDelimiter", s:orange, "", "") + call X("rubyConditional", s:purple, "", "") + call X("rubyRepeat", s:purple, "", "") + + " Python Highlighting + call X("pythonInclude", s:purple, "", "") + call X("pythonStatement", s:purple, "", "") + call X("pythonConditional", s:purple, "", "") + call X("pythonFunction", s:blue, "", "") + + " JavaScript Highlighting + call X("javaScriptBraces", s:foreground, "", "") + call X("javaScriptFunction", s:purple, "", "") + call X("javaScriptConditional", s:purple, "", "") + call X("javaScriptRepeat", s:purple, "", "") + call X("javaScriptNumber", s:orange, "", "") + call X("javaScriptMember", s:orange, "", "") + + " HTML Highlighting + call X("htmlTag", s:red, "", "") + call X("htmlTagName", s:red, "", "") + call X("htmlArg", s:red, "", "") + call X("htmlScriptTag", s:red, "", "") + + " Diff Highlighting + call X("diffAdded", s:green, "", "") + call X("diffRemoved", s:red, "", "") + + " Delete Functions + delf X + delf rgb + delf colour + delf rgb_colour + delf rgb_level + delf rgb_number + delf grey_colour + delf grey_level + delf grey_number +endif diff --git a/dot_vim/colors/Tomorrow-Night-Bright.vim b/dot_vim/colors/Tomorrow-Night-Bright.vim new file mode 100644 index 0000000..c222f4e --- /dev/null +++ b/dot_vim/colors/Tomorrow-Night-Bright.vim @@ -0,0 +1,347 @@ +" Tomorrow Night Bright - Full Colour and 256 Colour +" http://chriskempson.com +" +" Hex colour conversion functions borrowed from the theme "Desert256"" + +" Default GUI Colours +let s:foreground = "eaeaea" +let s:background = "000000" +let s:selection = "424242" +let s:line = "2a2a2a" +let s:comment = "969896" +let s:red = "d54e53" +let s:orange = "e78c45" +let s:yellow = "e7c547" +let s:green = "b9ca4a" +let s:aqua = "70c0b1" +let s:blue = "7aa6da" +let s:purple = "c397d8" +let s:window = "4d5057" + +set background=dark +hi clear +syntax reset + +let g:colors_name = "Tomorrow-Night-Bright" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " Returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " Returns the palette index for the given grey index + fun grey_colour(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " Returns an approximate colour index for the given colour level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual colour level for the given colour index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " Returns the palette index for the given R/G/B colour indices + fun rgb_colour(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " Returns the palette index to approximate the given R/G/B colour levels + fun colour(r, g, b) + " Get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " Get the closest colour + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " There are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " Use the grey + return grey_colour(l:gx) + else + " Use the colour + return rgb_colour(l:x, l:y, l:z) + endif + else + " Only one possibility + return rgb_colour(l:x, l:y, l:z) + endif + endfun + + " Returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return colour(l:r, l:g, l:b) + endfun + + " Sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + + " Vim Highlighting + call X("Normal", s:foreground, s:background, "") + call X("LineNr", s:selection, "", "") + call X("NonText", s:selection, "", "") + call X("SpecialKey", s:selection, "", "") + call X("Search", s:background, s:yellow, "") + call X("TabLine", s:foreground, s:background, "reverse") + call X("StatusLine", s:window, s:yellow, "reverse") + call X("StatusLineNC", s:window, s:foreground, "reverse") + call X("VertSplit", s:window, s:window, "none") + call X("Visual", "", s:selection, "") + call X("Directory", s:blue, "", "") + call X("ModeMsg", s:green, "", "") + call X("MoreMsg", s:green, "", "") + call X("Question", s:green, "", "") + call X("WarningMsg", s:red, "", "") + call X("MatchParen", "", s:selection, "") + call X("Folded", s:comment, s:background, "") + call X("FoldColumn", "", s:background, "") + if version >= 700 + call X("CursorLine", "", s:line, "none") + call X("CursorColumn", "", s:line, "none") + call X("PMenu", s:foreground, s:selection, "none") + call X("PMenuSel", s:foreground, s:selection, "reverse") + end + if version >= 703 + call X("ColorColumn", "", s:line, "none") + end + + " Standard Highlighting + call X("Comment", s:comment, "", "") + call X("Todo", s:comment, s:background, "") + call X("Title", s:comment, "", "") + call X("Identifier", s:red, "", "none") + call X("Statement", s:foreground, "", "") + call X("Conditional", s:foreground, "", "") + call X("Repeat", s:foreground, "", "") + call X("Structure", s:purple, "", "") + call X("Function", s:blue, "", "") + call X("Constant", s:orange, "", "") + call X("String", s:green, "", "") + call X("Special", s:foreground, "", "") + call X("PreProc", s:purple, "", "") + call X("Operator", s:aqua, "", "none") + call X("Type", s:blue, "", "none") + call X("Define", s:purple, "", "none") + call X("Include", s:blue, "", "") + "call X("Ignore", "666666", "", "") + + " Vim Highlighting + call X("vimCommand", s:red, "", "none") + + " C Highlighting + call X("cType", s:yellow, "", "") + call X("cStorageClass", s:purple, "", "") + call X("cConditional", s:purple, "", "") + call X("cRepeat", s:purple, "", "") + + " PHP Highlighting + call X("phpVarSelector", s:red, "", "") + call X("phpKeyword", s:purple, "", "") + call X("phpRepeat", s:purple, "", "") + call X("phpConditional", s:purple, "", "") + call X("phpStatement", s:purple, "", "") + call X("phpMemberSelector", s:foreground, "", "") + + " Ruby Highlighting + call X("rubySymbol", s:green, "", "") + call X("rubyConstant", s:yellow, "", "") + call X("rubyAttribute", s:blue, "", "") + call X("rubyInclude", s:blue, "", "") + call X("rubyLocalVariableOrMethod", s:orange, "", "") + call X("rubyCurlyBlock", s:orange, "", "") + call X("rubyStringDelimiter", s:green, "", "") + call X("rubyInterpolationDelimiter", s:orange, "", "") + call X("rubyConditional", s:purple, "", "") + call X("rubyRepeat", s:purple, "", "") + + " Python Highlighting + call X("pythonInclude", s:purple, "", "") + call X("pythonStatement", s:purple, "", "") + call X("pythonConditional", s:purple, "", "") + call X("pythonFunction", s:blue, "", "") + + " JavaScript Highlighting + call X("javaScriptBraces", s:foreground, "", "") + call X("javaScriptFunction", s:purple, "", "") + call X("javaScriptConditional", s:purple, "", "") + call X("javaScriptRepeat", s:purple, "", "") + call X("javaScriptNumber", s:orange, "", "") + call X("javaScriptMember", s:orange, "", "") + + " HTML Highlighting + call X("htmlTag", s:red, "", "") + call X("htmlTagName", s:red, "", "") + call X("htmlArg", s:red, "", "") + call X("htmlScriptTag", s:red, "", "") + + " Diff Highlighting + call X("diffAdded", s:green, "", "") + call X("diffRemoved", s:red, "", "") + + " Delete Functions + delf X + delf rgb + delf colour + delf rgb_colour + delf rgb_level + delf rgb_number + delf grey_colour + delf grey_level + delf grey_number +endif diff --git a/dot_vim/colors/Tomorrow-Night-Eighties.vim b/dot_vim/colors/Tomorrow-Night-Eighties.vim new file mode 100644 index 0000000..7426924 --- /dev/null +++ b/dot_vim/colors/Tomorrow-Night-Eighties.vim @@ -0,0 +1,347 @@ +" Tomorrow Night Eighties - Full Colour and 256 Colour +" http://chriskempson.com +" +" Hex colour conversion functions borrowed from the theme "Desert256"" + +" Default GUI Colours +let s:foreground = "cccccc" +let s:background = "2d2d2d" +let s:selection = "515151" +let s:line = "393939" +let s:comment = "999999" +let s:red = "f2777a" +let s:orange = "f99157" +let s:yellow = "ffcc66" +let s:green = "99cc99" +let s:aqua = "009999" +let s:blue = "99cccc" +let s:purple = "cc99cc" +let s:window = "4d5057" + +set background=dark +hi clear +syntax reset + +let g:colors_name = "Tomorrow-Night-Eighties" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " Returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " Returns the palette index for the given grey index + fun grey_colour(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " Returns an approximate colour index for the given colour level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual colour level for the given colour index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " Returns the palette index for the given R/G/B colour indices + fun rgb_colour(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " Returns the palette index to approximate the given R/G/B colour levels + fun colour(r, g, b) + " Get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " Get the closest colour + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " There are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " Use the grey + return grey_colour(l:gx) + else + " Use the colour + return rgb_colour(l:x, l:y, l:z) + endif + else + " Only one possibility + return rgb_colour(l:x, l:y, l:z) + endif + endfun + + " Returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return colour(l:r, l:g, l:b) + endfun + + " Sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + + " Vim Highlighting + call X("Normal", s:foreground, s:background, "") + call X("LineNr", s:selection, "", "") + call X("NonText", s:selection, "", "") + call X("SpecialKey", s:selection, "", "") + call X("Search", s:background, s:yellow, "") + call X("TabLine", s:foreground, s:background, "reverse") + call X("StatusLine", s:window, s:yellow, "reverse") + call X("StatusLineNC", s:window, s:foreground, "reverse") + call X("VertSplit", s:window, s:window, "none") + call X("Visual", "", s:selection, "") + call X("Directory", s:blue, "", "") + call X("ModeMsg", s:green, "", "") + call X("MoreMsg", s:green, "", "") + call X("Question", s:green, "", "") + call X("WarningMsg", s:red, "", "") + call X("MatchParen", "", s:selection, "") + call X("Folded", s:comment, s:background, "") + call X("FoldColumn", "", s:background, "") + if version >= 700 + call X("CursorLine", "", s:line, "none") + call X("CursorColumn", "", s:line, "none") + call X("PMenu", s:foreground, s:selection, "none") + call X("PMenuSel", s:foreground, s:selection, "reverse") + end + if version >= 703 + call X("ColorColumn", "", s:line, "none") + end + + " Standard Highlighting + call X("Comment", s:comment, "", "") + call X("Todo", s:comment, s:background, "") + call X("Title", s:comment, "", "") + call X("Identifier", s:red, "", "none") + call X("Statement", s:foreground, "", "") + call X("Conditional", s:foreground, "", "") + call X("Repeat", s:foreground, "", "") + call X("Structure", s:purple, "", "") + call X("Function", s:blue, "", "") + call X("Constant", s:orange, "", "") + call X("String", s:green, "", "") + call X("Special", s:foreground, "", "") + call X("PreProc", s:purple, "", "") + call X("Operator", s:aqua, "", "none") + call X("Type", s:blue, "", "none") + call X("Define", s:purple, "", "none") + call X("Include", s:blue, "", "") + "call X("Ignore", "666666", "", "") + + " Vim Highlighting + call X("vimCommand", s:red, "", "none") + + " C Highlighting + call X("cType", s:yellow, "", "") + call X("cStorageClass", s:purple, "", "") + call X("cConditional", s:purple, "", "") + call X("cRepeat", s:purple, "", "") + + " PHP Highlighting + call X("phpVarSelector", s:red, "", "") + call X("phpKeyword", s:purple, "", "") + call X("phpRepeat", s:purple, "", "") + call X("phpConditional", s:purple, "", "") + call X("phpStatement", s:purple, "", "") + call X("phpMemberSelector", s:foreground, "", "") + + " Ruby Highlighting + call X("rubySymbol", s:green, "", "") + call X("rubyConstant", s:yellow, "", "") + call X("rubyAttribute", s:blue, "", "") + call X("rubyInclude", s:blue, "", "") + call X("rubyLocalVariableOrMethod", s:orange, "", "") + call X("rubyCurlyBlock", s:orange, "", "") + call X("rubyStringDelimiter", s:green, "", "") + call X("rubyInterpolationDelimiter", s:orange, "", "") + call X("rubyConditional", s:purple, "", "") + call X("rubyRepeat", s:purple, "", "") + + " Python Highlighting + call X("pythonInclude", s:purple, "", "") + call X("pythonStatement", s:purple, "", "") + call X("pythonConditional", s:purple, "", "") + call X("pythonFunction", s:blue, "", "") + + " JavaScript Highlighting + call X("javaScriptBraces", s:foreground, "", "") + call X("javaScriptFunction", s:purple, "", "") + call X("javaScriptConditional", s:purple, "", "") + call X("javaScriptRepeat", s:purple, "", "") + call X("javaScriptNumber", s:orange, "", "") + call X("javaScriptMember", s:orange, "", "") + + " HTML Highlighting + call X("htmlTag", s:red, "", "") + call X("htmlTagName", s:red, "", "") + call X("htmlArg", s:red, "", "") + call X("htmlScriptTag", s:red, "", "") + + " Diff Highlighting + call X("diffAdded", s:green, "", "") + call X("diffRemoved", s:red, "", "") + + " Delete Functions + delf X + delf rgb + delf colour + delf rgb_colour + delf rgb_level + delf rgb_number + delf grey_colour + delf grey_level + delf grey_number +endif diff --git a/dot_vim/colors/Tomorrow-Night.vim b/dot_vim/colors/Tomorrow-Night.vim new file mode 100644 index 0000000..208b6d4 --- /dev/null +++ b/dot_vim/colors/Tomorrow-Night.vim @@ -0,0 +1,362 @@ +" Tomorrow Night - Full Colour and 256 Colour +" http://chriskempson.com +" +" Hex colour conversion functions borrowed from the theme "Desert256"" + +" Default GUI Colours +let s:foreground = "c5c8c6" +let s:background = "1d1f21" +let s:selection = "373b41" +let s:line = "282a2e" +let s:comment = "969896" +let s:red = "cc6666" +let s:orange = "de935f" +let s:yellow = "f0c674" +let s:green = "b5bd68" +let s:aqua = "8abeb7" +let s:blue = "81a2be" +let s:purple = "b294bb" +let s:window = "4d5057" + +" Console 256 Colours +if !has("gui_running") + let s:background = "303030" + let s:window = "5e5e5e" + let s:line = "3a3a3a" + let s:selection = "585858" +end + +set background=dark +hi clear +syntax reset + +let g:colors_name = "Tomorrow-Night" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " Returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " Returns the palette index for the given grey index + fun grey_colour(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " Returns an approximate colour index for the given colour level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual colour level for the given colour index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " Returns the palette index for the given R/G/B colour indices + fun rgb_colour(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " Returns the palette index to approximate the given R/G/B colour levels + fun colour(r, g, b) + " Get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " Get the closest colour + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " There are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " Use the grey + return grey_colour(l:gx) + else + " Use the colour + return rgb_colour(l:x, l:y, l:z) + endif + else + " Only one possibility + return rgb_colour(l:x, l:y, l:z) + endif + endfun + + " Returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return colour(l:r, l:g, l:b) + endfun + + " Sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + + " Vim Highlighting + call X("Normal", s:foreground, s:background, "") + call X("LineNr", s:selection, "", "") + call X("NonText", s:selection, "", "") + call X("SpecialKey", s:selection, "", "") + call X("Search", s:background, s:yellow, "") + call X("TabLine", s:foreground, s:background, "reverse") + call X("StatusLine", s:window, s:yellow, "reverse") + call X("StatusLineNC", s:window, s:foreground, "reverse") + call X("VertSplit", s:window, s:window, "none") + call X("Visual", "", s:selection, "") + call X("Directory", s:blue, "", "") + call X("ModeMsg", s:green, "", "") + call X("MoreMsg", s:green, "", "") + call X("Question", s:green, "", "") + call X("WarningMsg", s:red, "", "") + call X("MatchParen", "", s:selection, "") + call X("Folded", s:comment, s:background, "") + call X("FoldColumn", "", s:background, "") + if version >= 700 + call X("CursorLine", "", s:line, "none") + call X("CursorColumn", "", s:line, "none") + call X("PMenu", s:foreground, s:selection, "none") + call X("PMenuSel", s:foreground, s:selection, "reverse") + call X("SignColumn", "", s:background, "none") + end + if version >= 703 + call X("ColorColumn", "", s:line, "none") + end + + " Standard Highlighting + call X("Comment", s:comment, "", "") + call X("Todo", s:comment, s:background, "") + call X("Title", s:comment, "", "") + call X("Identifier", s:red, "", "none") + call X("Statement", s:foreground, "", "") + call X("Conditional", s:foreground, "", "") + call X("Repeat", s:foreground, "", "") + call X("Structure", s:purple, "", "") + call X("Function", s:blue, "", "") + call X("Constant", s:orange, "", "") + call X("String", s:green, "", "") + call X("Special", s:foreground, "", "") + call X("PreProc", s:purple, "", "") + call X("Operator", s:aqua, "", "none") + call X("Type", s:blue, "", "none") + call X("Define", s:purple, "", "none") + call X("Include", s:blue, "", "") + "call X("Ignore", "666666", "", "") + + " Vim Highlighting + call X("vimCommand", s:red, "", "none") + + " C Highlighting + call X("cType", s:yellow, "", "") + call X("cStorageClass", s:purple, "", "") + call X("cConditional", s:purple, "", "") + call X("cRepeat", s:purple, "", "") + + " PHP Highlighting + call X("phpVarSelector", s:red, "", "") + call X("phpKeyword", s:purple, "", "") + call X("phpRepeat", s:purple, "", "") + call X("phpConditional", s:purple, "", "") + call X("phpStatement", s:purple, "", "") + call X("phpMemberSelector", s:foreground, "", "") + + " Ruby Highlighting + call X("rubySymbol", s:green, "", "") + call X("rubyConstant", s:yellow, "", "") + call X("rubyAttribute", s:blue, "", "") + call X("rubyInclude", s:blue, "", "") + call X("rubyLocalVariableOrMethod", s:orange, "", "") + call X("rubyCurlyBlock", s:orange, "", "") + call X("rubyStringDelimiter", s:green, "", "") + call X("rubyInterpolationDelimiter", s:orange, "", "") + call X("rubyConditional", s:purple, "", "") + call X("rubyRepeat", s:purple, "", "") + + " Python Highlighting + call X("pythonInclude", s:purple, "", "") + call X("pythonStatement", s:purple, "", "") + call X("pythonConditional", s:purple, "", "") + call X("pythonFunction", s:blue, "", "") + + " JavaScript Highlighting + call X("javaScriptBraces", s:foreground, "", "") + call X("javaScriptFunction", s:purple, "", "") + call X("javaScriptConditional", s:purple, "", "") + call X("javaScriptRepeat", s:purple, "", "") + call X("javaScriptNumber", s:orange, "", "") + call X("javaScriptMember", s:orange, "", "") + + " HTML Highlighting + call X("htmlTag", s:red, "", "") + call X("htmlTagName", s:red, "", "") + call X("htmlArg", s:red, "", "") + call X("htmlScriptTag", s:red, "", "") + + " Diff Highlighting + call X("diffAdded", s:green, "", "") + call X("diffRemoved", s:red, "", "") + + " ShowMarks Highlighting + call X("ShowMarksHLl", s:orange, s:background, "none") + call X("ShowMarksHLo", s:purple, s:background, "none") + call X("ShowMarksHLu", s:yellow, s:background, "none") + call X("ShowMarksHLm", s:aqua, s:background, "none") + + " Delete Functions + delf X + delf rgb + delf colour + delf rgb_colour + delf rgb_level + delf rgb_number + delf grey_colour + delf grey_level + delf grey_number +endif diff --git a/dot_vim/colors/Tomorrow.vim b/dot_vim/colors/Tomorrow.vim new file mode 100644 index 0000000..fb58c5f --- /dev/null +++ b/dot_vim/colors/Tomorrow.vim @@ -0,0 +1,347 @@ +" Tomorrow - Full Colour and 256 Colour +" http://chriskempson.com +" +" Hex colour conversion functions borrowed from the theme "Desert256"" + +" Default GUI Colours +let s:foreground = "4d4d4c" +let s:background = "fafafa" +let s:selection = "d6d6d6" +let s:line = "efefef" +let s:comment = "8e908c" +let s:red = "c82829" +let s:orange = "f5871f" +let s:yellow = "eab700" +let s:green = "718c00" +let s:aqua = "3e999f" +let s:blue = "4271ae" +let s:purple = "8959a8" +let s:window = "efefef" + +set background=light +hi clear +syntax reset + +let g:colors_name = "Tomorrow" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " Returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " Returns the palette index for the given grey index + fun grey_colour(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " Returns an approximate colour index for the given colour level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " Returns the actual colour level for the given colour index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " Returns the palette index for the given R/G/B colour indices + fun rgb_colour(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " Returns the palette index to approximate the given R/G/B colour levels + fun colour(r, g, b) + " Get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " Get the closest colour + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " There are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " Use the grey + return grey_colour(l:gx) + else + " Use the colour + return rgb_colour(l:x, l:y, l:z) + endif + else + " Only one possibility + return rgb_colour(l:x, l:y, l:z) + endif + endfun + + " Returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return colour(l:r, l:g, l:b) + endfun + + " Sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + + " Vim Highlighting + call X("Normal", s:foreground, s:background, "") + highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE + call X("NonText", s:selection, "", "") + call X("SpecialKey", s:selection, "", "") + call X("Search", s:foreground, s:yellow, "") + call X("TabLine", s:foreground, s:background, "reverse") + call X("StatusLine", s:window, s:yellow, "reverse") + call X("StatusLineNC", s:window, s:foreground, "reverse") + call X("VertSplit", s:window, s:window, "none") + call X("Visual", "", s:selection, "") + call X("Directory", s:blue, "", "") + call X("ModeMsg", s:green, "", "") + call X("MoreMsg", s:green, "", "") + call X("Question", s:green, "", "") + call X("WarningMsg", s:red, "", "") + call X("MatchParen", "", s:selection, "") + call X("Folded", s:comment, s:background, "") + call X("FoldColumn", "", s:background, "") + if version >= 700 + call X("CursorLine", "", s:line, "none") + call X("CursorColumn", "", s:line, "none") + call X("PMenu", s:foreground, s:selection, "none") + call X("PMenuSel", s:foreground, s:selection, "reverse") + end + if version >= 703 + call X("ColorColumn", "", s:line, "none") + end + + " Standard Highlighting + call X("Comment", s:comment, "", "") + call X("Todo", s:comment, s:background, "") + call X("Title", s:comment, "", "") + call X("Identifier", s:red, "", "none") + call X("Statement", s:foreground, "", "") + call X("Conditional", s:foreground, "", "") + call X("Repeat", s:foreground, "", "") + call X("Structure", s:purple, "", "") + call X("Function", s:blue, "", "") + call X("Constant", s:orange, "", "") + call X("String", s:green, "", "") + call X("Special", s:foreground, "", "") + call X("PreProc", s:purple, "", "") + call X("Operator", s:aqua, "", "none") + call X("Type", s:blue, "", "none") + call X("Define", s:purple, "", "none") + call X("Include", s:blue, "", "") + "call X("Ignore", "666666", "", "") + + " Vim Highlighting + call X("vimCommand", s:red, "", "none") + + " C Highlighting + call X("cType", s:yellow, "", "") + call X("cStorageClass", s:purple, "", "") + call X("cConditional", s:purple, "", "") + call X("cRepeat", s:purple, "", "") + + " PHP Highlighting + call X("phpVarSelector", s:red, "", "") + call X("phpKeyword", s:purple, "", "") + call X("phpRepeat", s:purple, "", "") + call X("phpConditional", s:purple, "", "") + call X("phpStatement", s:purple, "", "") + call X("phpMemberSelector", s:foreground, "", "") + + " Ruby Highlighting + call X("rubySymbol", s:green, "", "") + call X("rubyConstant", s:yellow, "", "") + call X("rubyAttribute", s:blue, "", "") + call X("rubyInclude", s:blue, "", "") + call X("rubyLocalVariableOrMethod", s:orange, "", "") + call X("rubyCurlyBlock", s:orange, "", "") + call X("rubyStringDelimiter", s:green, "", "") + call X("rubyInterpolationDelimiter", s:orange, "", "") + call X("rubyConditional", s:purple, "", "") + call X("rubyRepeat", s:purple, "", "") + + " Python Highlighting + call X("pythonInclude", s:purple, "", "") + call X("pythonStatement", s:purple, "", "") + call X("pythonConditional", s:purple, "", "") + call X("pythonFunction", s:blue, "", "") + + " JavaScript Highlighting + call X("javaScriptBraces", s:foreground, "", "") + call X("javaScriptFunction", s:purple, "", "") + call X("javaScriptConditional", s:purple, "", "") + call X("javaScriptRepeat", s:purple, "", "") + call X("javaScriptNumber", s:orange, "", "") + call X("javaScriptMember", s:orange, "", "") + + " HTML Highlighting + call X("htmlTag", s:red, "", "") + call X("htmlTagName", s:red, "", "") + call X("htmlArg", s:red, "", "") + call X("htmlScriptTag", s:red, "", "") + + " Diff Highlighting + call X("diffAdded", s:green, "", "") + call X("diffRemoved", s:red, "", "") + + " Delete Functions + delf X + delf rgb + delf colour + delf rgb_colour + delf rgb_level + delf rgb_number + delf grey_colour + delf grey_level + delf grey_number +endif diff --git a/dot_vim/doc/live-latex-preview.txt b/dot_vim/doc/live-latex-preview.txt new file mode 100644 index 0000000..5bf6aba --- /dev/null +++ b/dot_vim/doc/live-latex-preview.txt @@ -0,0 +1,109 @@ +*live-latex-preview.txt* For Vim version 7.4. Last change: 2014 Feb 01 + + *live-latex-preview* + +A plugin for creating a live-updating PDF preview for a LaTeX file in MuPDF + +Default key bindings:~ + +\o = Begin/end auto-compilation and live-updating (Note: + starting live compilation will also open PDF preview.) +\p = Open/close PDF preview window. (Note: closing the + PDF preview will also stop auto-compilation.) +\s = Check the result of the last compilation; + jump to first error in case of errors. +\f = Forward search to page in PDF matching cursor + position in source. +\r = Reverse/inverse search to position in source + matching active page in MuPDF. (Very approximate.) +\c = End any compilations in progress, and begin new compilation + now. (Useful for un-"stick"ing stalled compilations.) + Note: if auto-compilation is turned off, this will still + compile and show the results inside vim. + +\, \, \, \, \, \, \G + \m, \t, \-, \+, \= = Send the corresponding keystrokes + to the MuPDF preview without losing focus on vim Window + +The '\' can be changed by changing . + +To suppress the default key mappings, insert: + + let no_tex_maps = 1 + +into your .vimrc file. You may then define your own mappings which +execute the command :call FunctionName(). The important function +names defined by the plugin are: +*LaunchMuPDF()* which opens the PDF preview; +*CloseMuPDF()* which closes the PDF preview; +*PDFViewingToggle()* which toggles the PDF preview on/off; +*UpdatingToggle()* which toggles live-updating on/off; +*CheckLiveUpdateStatus()* which returns the results of the last +compilation, and jumps to the first error, if any; and +*MuPDFForward()* and *MuPDFReverse()* for forward and reverse search. + +Autosaving~ + +Be aware that when live updating is active, your file is saved whenever +the cursor moves. Be sure to take the appropriate measures to keep +back-up saves and undo files so you can undo changes if need be. If +you would like the file to save with each keystroke even when the +preview is not active, then put + + let tex_preview_always_autosave = 1 + +into your .vimrc file. + + *LaTeX-compilation* options + +Using XeLaTeX~ + +To compile with XeLaTeX rather than PDFLaTeX, include the string +'xelatex' somewhere in the first five lines of your file (e.g., in a +comment). + +Using LaTeX > dvips > ps2pdf (for, e.g., PSTricks support)~ + +If pstricks or related pst-* package is loaded in your preamble, this option +will be automatically used. Otherwise, pdflatex or xelatex will be used. +(Thanks to Hong Ying for implementing this.) + +(Support for LuaLaTeX may be added in the future.) + +Using biber instead of bibTeX~ + +To process bibliographic citations with biber instead of bibTeX, include +the string 'biber' somewhere in the first five lines of your file (e.g., +in a comment). + +Using -shell-escape~ + +To enable the -shell-escape command-line option, to allow +LaTeX's \write18{..} command (for, e.g., the minted package), include +the string 'shell-escape' somewhere in the first five lines of your file +(e.g., in a comment). + + LaTeX *subdocuments* + LaTeX *root* + +Working with subdocuments~ + +If you want to use the live preview feature while editing a +sub-document, i.e., a document included in another document by means +of LaTeX's \input{..} or \include{..} commands, then put a comment +in the first five lines of the subdocument containing the string +'root = main.tex' (replacing 'main.tex' with the actual name +of the master file). This is meant to be compatible with the convention +adopted by other editors such as TeXworks and TeXshop, which use +the convention: + + % !TeX root = main.tex + +to indicate that the master document for a given file is named "main.tex". + +All files should be in the same folder. + + +Contact Kevin C. Klement with bug reports. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/dot_vim/doc/tags b/dot_vim/doc/tags new file mode 100644 index 0000000..aa848d4 --- /dev/null +++ b/dot_vim/doc/tags @@ -0,0 +1,77 @@ +CheckLiveUpdateStatus() live-latex-preview.txt /*CheckLiveUpdateStatus()* +CloseMuPDF() live-latex-preview.txt /*CloseMuPDF()* +LaTeX-compilation live-latex-preview.txt /*LaTeX-compilation* +LaunchMuPDF() live-latex-preview.txt /*LaunchMuPDF()* +MuPDFForward() live-latex-preview.txt /*MuPDFForward()* +MuPDFReverse() live-latex-preview.txt /*MuPDFReverse()* +PDFViewingToggle() live-latex-preview.txt /*PDFViewingToggle()* +UpdatingToggle() live-latex-preview.txt /*UpdatingToggle()* +clang_close-preview clang_complete.txt /*clang_close-preview* +clang_complete clang_complete.txt /*clang_complete* +clang_complete-author clang_complete.txt /*clang_complete-author* +clang_complete-auto_select clang_complete.txt /*clang_complete-auto_select* +clang_complete-auto_user_options clang_complete.txt /*clang_complete-auto_user_options* +clang_complete-cc_args clang_complete.txt /*clang_complete-cc_args* +clang_complete-clang_restore_cr_imap clang_complete.txt /*clang_complete-clang_restore_cr_imap* +clang_complete-clang_trailing_placeholder clang_complete.txt /*clang_complete-clang_trailing_placeholder* +clang_complete-compilation_database clang_complete.txt /*clang_complete-compilation_database* +clang_complete-compl_kinds clang_complete.txt /*clang_complete-compl_kinds* +clang_complete-complete_auto clang_complete.txt /*clang_complete-complete_auto* +clang_complete-complete_macros clang_complete.txt /*clang_complete-complete_macros* +clang_complete-complete_patterns clang_complete.txt /*clang_complete-complete_patterns* +clang_complete-conceal_snippets clang_complete.txt /*clang_complete-conceal_snippets* +clang_complete-configuration clang_complete.txt /*clang_complete-configuration* +clang_complete-copen clang_complete.txt /*clang_complete-copen* +clang_complete-description clang_complete.txt /*clang_complete-description* +clang_complete-faq clang_complete.txt /*clang_complete-faq* +clang_complete-hl_errors clang_complete.txt /*clang_complete-hl_errors* +clang_complete-issues clang_complete.txt /*clang_complete-issues* +clang_complete-jumpto_back_key clang_complete.txt /*clang_complete-jumpto_back_key* +clang_complete-jumpto_declaration_in_preview_key clang_complete.txt /*clang_complete-jumpto_declaration_in_preview_key* +clang_complete-jumpto_declaration_key clang_complete.txt /*clang_complete-jumpto_declaration_key* +clang_complete-keybindings clang_complete.txt /*clang_complete-keybindings* +clang_complete-library_path clang_complete.txt /*clang_complete-library_path* +clang_complete-license clang_complete.txt /*clang_complete-license* +clang_complete-loaded clang_complete.txt /*clang_complete-loaded* +clang_complete-make_default_keymappings clang_complete.txt /*clang_complete-make_default_keymappings* +clang_complete-omnicppcomplete_compliance clang_complete.txt /*clang_complete-omnicppcomplete_compliance* +clang_complete-optional_args_in_snippets clang_complete.txt /*clang_complete-optional_args_in_snippets* +clang_complete-options clang_complete.txt /*clang_complete-options* +clang_complete-periodic_quickfix clang_complete.txt /*clang_complete-periodic_quickfix* +clang_complete-snippets clang_complete.txt /*clang_complete-snippets* +clang_complete-snippets_engine clang_complete.txt /*clang_complete-snippets_engine* +clang_complete-sort_algo clang_complete.txt /*clang_complete-sort_algo* +clang_complete-todo clang_complete.txt /*clang_complete-todo* +clang_complete-use_library clang_complete.txt /*clang_complete-use_library* +clang_complete-user_options clang_complete.txt /*clang_complete-user_options* +clang_complete.txt clang_complete.txt /*clang_complete.txt* +g:clang_auto_select clang_complete.txt /*g:clang_auto_select* +g:clang_auto_user_options clang_complete.txt /*g:clang_auto_user_options* +g:clang_close_preview clang_complete.txt /*g:clang_close_preview* +g:clang_compilation_database clang_complete.txt /*g:clang_compilation_database* +g:clang_complete_auto clang_complete.txt /*g:clang_complete_auto* +g:clang_complete_copen clang_complete.txt /*g:clang_complete_copen* +g:clang_complete_loaded clang_complete.txt /*g:clang_complete_loaded* +g:clang_complete_macros clang_complete.txt /*g:clang_complete_macros* +g:clang_complete_optional_args_in_snippets clang_complete.txt /*g:clang_complete_optional_args_in_snippets* +g:clang_complete_patterns clang_complete.txt /*g:clang_complete_patterns* +g:clang_conceal_snippets clang_complete.txt /*g:clang_conceal_snippets* +g:clang_hl_errors clang_complete.txt /*g:clang_hl_errors* +g:clang_jumpto_back_key clang_complete.txt /*g:clang_jumpto_back_key* +g:clang_jumpto_declaration_in_preview_key clang_complete.txt /*g:clang_jumpto_declaration_in_preview_key* +g:clang_jumpto_declaration_key clang_complete.txt /*g:clang_jumpto_declaration_key* +g:clang_library_path clang_complete.txt /*g:clang_library_path* +g:clang_make_default_keymappings clang_complete.txt /*g:clang_make_default_keymappings* +g:clang_omnicppcomplete_compliance clang_complete.txt /*g:clang_omnicppcomplete_compliance* +g:clang_periodic_quickfix clang_complete.txt /*g:clang_periodic_quickfix* +g:clang_restore_cr_imap clang_complete.txt /*g:clang_restore_cr_imap* +g:clang_snippets clang_complete.txt /*g:clang_snippets* +g:clang_snippets_engine clang_complete.txt /*g:clang_snippets_engine* +g:clang_sort_algo clang_complete.txt /*g:clang_sort_algo* +g:clang_trailing_placeholder clang_complete.txt /*g:clang_trailing_placeholder* +g:clang_use_library clang_complete.txt /*g:clang_use_library* +g:clang_user_options clang_complete.txt /*g:clang_user_options* +live-latex-preview live-latex-preview.txt /*live-latex-preview* +live-latex-preview.txt live-latex-preview.txt /*live-latex-preview.txt* +root live-latex-preview.txt /*root* +subdocuments live-latex-preview.txt /*subdocuments* diff --git a/dot_vim/dot_gitignore b/dot_vim/dot_gitignore new file mode 100644 index 0000000..a0e76af --- /dev/null +++ b/dot_vim/dot_gitignore @@ -0,0 +1 @@ +.netrwhist diff --git a/dot_vim/dot_gitmodules b/dot_vim/dot_gitmodules new file mode 100644 index 0000000..4d24493 --- /dev/null +++ b/dot_vim/dot_gitmodules @@ -0,0 +1,27 @@ +[submodule "bundle/vim-colors-solarized"] + path = bundle/vim-colors-solarized + url = git://github.com/altercation/vim-colors-solarized.git +[submodule "bundle/ctrlp.vim"] + path = bundle/ctrlp.vim + url = https://github.com/kien/ctrlp.vim.git +[submodule "bundle/ctx"] + path = bundle/ctx + url = https://github.com/vim-scripts/ctx.git +[submodule "bundle/vim-surround"] + path = bundle/vim-surround + url = https://github.com/tpope/vim-surround.git +[submodule "bundle/vim-project"] + path = bundle/vim-project + url = https://github.com/shemerey/vim-project.git +[submodule "bundle/2048"] + path = bundle/2048 + url = https://github.com/AshyIsMe/2048 +[submodule "bundle/vim-coffee-script"] + path = bundle/vim-coffee-script + url = https://github.com/kchmck/vim-coffee-script.git +[submodule "bundle/nerdtree"] + path = bundle/nerdtree + url = https://github.com/scrooloose/nerdtree.git +[submodule "bundle/semantic-highlight.vim"] + path = bundle/semantic-highlight.vim + url = https://github.com/jaxbot/semantic-highlight.vim.git diff --git a/dot_vim/dot_netrwhist b/dot_vim/dot_netrwhist new file mode 100644 index 0000000..38db8ca --- /dev/null +++ b/dot_vim/dot_netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =1 +let g:netrw_dirhist_1='/home/linly/Code/RMI_THINGS/RMIServer/lib/src/main/java/rmiserver' diff --git a/dot_vim/ftplugin/lisp/limp.vim b/dot_vim/ftplugin/lisp/limp.vim new file mode 100644 index 0000000..8c5a2ec --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp.vim @@ -0,0 +1,53 @@ +" +" limp/vim/limp.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Setup the Limp environment +" +" Version: +" 0.2 +" +" Date: +" 2008-04-28 +" +" Authors: +" Mikael Jansson +" +" Changelog: +" * 2008-04-28 by Mikael Jansson +" Only change colorscheme and nocompatible when not previously set. +" +" * 2008-04-25 by Mikael Jansson +" Catch-all key for Lisp boot, connect & display +" +" * 2008-04-20 by Mikael Jansson +" Initial version. + +"------------------------------------------------------------------- + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +"------------------------------------------------------------------- +" external dependencies +"------------------------------------------------------------------- +silent! runtime plugin/matchit.vim + +"------------------------------------------------------------------- +" the Limp library +"------------------------------------------------------------------- + +runtime ftplugin/lisp/limp/cursor.vim +runtime ftplugin/lisp/limp/highlight.vim +runtime ftplugin/lisp/limp/sexp.vim +runtime ftplugin/lisp/limp/bridge.vim +runtime ftplugin/lisp/limp/autoclose.vim +runtime ftplugin/lisp/limp/keys.vim +runtime ftplugin/lisp/limp/mode.vim + + diff --git a/dot_vim/ftplugin/lisp/limp/autoclose.vim b/dot_vim/ftplugin/lisp/limp/autoclose.vim new file mode 100644 index 0000000..c00ec29 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/autoclose.vim @@ -0,0 +1,208 @@ +" +" limp/vim/autoclose.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" AutoClose, closes what's opened. +" +" This plugin closes opened parenthesis, braces, brackets, quotes as you +" type them. As of 1.1, if you type the open brace twice ({{), the closing +" brace will be pushed down to a new line. +" +" You can enable or disable this plugin by typing \a (or a if +" you've redefined your leader character) in normal mode. You'll also +" probably want to know you can type ( if mswin is set) and the next +" character you type doesn't have mappings applied. This is useful when you +" want to insert only an opening paren or something. +" +" Version: +" 0.2 +" +" Date: +" September 20, 2007 +" +" Authors: +" Karl Guertin +" Mikael Jansson +" +" Changelog: +" 2008-04-20 by Mikael Jansson +" * Factored out start/stop functions. +" * Removed the default mappings to toggle autoclose +" +" 2007-09-20 by Karl Guertin +" 1.1.2 -- Fixed a mapping typo and caught a double brace problem +" 1.1.1 -- Missed a bug in 1.1, September 19, 2007 +" 1.1 -- When not inserting at the end, previous version would eat chars +" at end of line, added double open->newline, September 19, 2007 +" 1.0.1 -- Cruft from other parts of the mapping, knew I shouldn't have +" released the first as 1.0, April 3, 2007 + +" Setup -----------------------------------------------------{{{1 + +let s:omni_active = 0 +let s:cotstate = &completeopt + +if !exists('g:autoclose_on') + let g:autoclose_on = 0 +endif + +" assume everything has been defined already if one of the functions are +" defined. +if exists("*AutoClose_start") + finish +endif + +if !exists("*AutoClose_stop") +fun! AutoClose_stop() + if g:autoclose_on + iunmap " + iunmap ( + iunmap ) + iunmap [ + iunmap ] + iunmap { + iunmap } + iunmap + iunmap + iunmap + ""iunmap + let g:autoclose_on = 0 + endif +endfun +endif + +if !exists("*AutoClose_start") +fun! AutoClose_start() + if !g:autoclose_on + inoremap " =QuoteDelim('"') + inoremap ( (=CloseStackPush(')') + inoremap ) =CloseStackPop(')') + inoremap [ [=CloseStackPush(']') + inoremap ] =CloseStackPop(']') + inoremap { =OpenSpecial('{','}') + inoremap } =CloseStackPop('}') + inoremap =OpenCloseBackspace() + inoremap =OpenCloseBackspace() + inoremap =CloseStackPop('') + inoremap =CloseStackPop('') + let g:autoclose_on = 1 + endif +endfunction +endif +let s:closeStack = [] + +" AutoClose Utilities -----------------------------------------{{{1 +if !exists("*OpenSpecial") +function OpenSpecial(ochar,cchar) " ---{{{2 + let line = getline('.') + let col = col('.') - 2 + "echom string(col).':'.line[:(col)].'|'.line[(col+1):] + if a:ochar == line[(col)] && a:cchar == line[(col+1)] "&& strlen(line) - (col) == 2 + "echom string(s:closeStack) + while len(s:closeStack) > 0 + call remove(s:closeStack, 0) + endwhile + return "\a\a\".a:cchar."\\"_xk$\"_xa" + endif + return a:ochar.CloseStackPush(a:cchar) +endfunction +endif + +if !exists("*CloseStackPush") +function CloseStackPush(char) " ---{{{2 + "echom "push" + let line = getline('.') + let col = col('.')-2 + if (col) < 0 + call setline('.',a:char.line) + else + "echom string(col).':'.line[:(col)].'|'.line[(col+1):] + call setline('.',line[:(col)].a:char.line[(col+1):]) + endif + call insert(s:closeStack, a:char) + "echom join(s:closeStack,'').' -- '.a:char + return '' +endfunction +endif + +if !exists("*CloseStackPop") +function CloseStackPop(char) " ---{{{2 + "echom "pop" + if len(s:closeStack) == 0 + return a:char + endif + let popped = '' + let lastpop = '' + "echom join(s:closeStack,'').' || '.lastpop + while len(s:closeStack) > 0 && ((lastpop == '' && popped == '') || lastpop != a:char) + let lastpop = remove(s:closeStack,0) + let popped .= lastpop + "echom join(s:closeStack,'').' || '.lastpop.' || '.popped + endwhile + "echom ' --> '.popped + let col = col('.') - 2 + let line = getline('.') + let splits = split(line[:col],popped,1) + "echom string(splits) + "echom col.' '.line[(col+2):].' '.popped + call setline('.',join(splits,popped).line[(col+strlen(popped)+1):]) + return popped +endfunction +endif + +if !exists("*QuoteDelim") +function QuoteDelim(char) " ---{{{2 + let line = getline('.') + let col = col('.') + if line[col - 2] == "\\" + "Inserting a quoted quotation mark into the string + return a:char + elseif line[col - 1] == a:char + "Escaping out of the string + return "\=".s:SID()."CloseStackPop(\"\\".a:char."\")\" + else + "Starting a string + return a:char."\=".s:SID()."CloseStackPush(\"\\".a:char."\")\" + endif +endfunction +endif + +" The strings returned from QuoteDelim aren't in scope for , so I +" have to fake it using this function (from the Vim help, but tweaked) +" +if !exists("*s:SID") +function s:SID() + return matchstr(expand(''), '\d\+_\zeSID$') +endfun +endif + +if !exists("*OpenCloseBackspace") +function OpenCloseBackspace() " ---{{{2 + "if pumvisible() + " pclose + " call StopOmni() + " return "\" + "else + let curline = getline('.') + let curpos = col('.') + let curletter = curline[curpos-1] + let prevletter = curline[curpos-2] + if (prevletter == '"' && curletter == '"') || +\ (prevletter == "'" && curletter == "'") || +\ (prevletter == "(" && curletter == ")") || +\ (prevletter == "{" && curletter == "}") || +\ (prevletter == "[" && curletter == "]") + if len(s:closeStack) > 0 + call remove(s:closeStack,0) + endif + return "\\" + else + return "\" + endif + "endif +endf +endif + diff --git a/dot_vim/ftplugin/lisp/limp/bridge.vim b/dot_vim/ftplugin/lisp/limp/bridge.vim new file mode 100644 index 0000000..f8e0fb1 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/bridge.vim @@ -0,0 +1,510 @@ +" +" limp/vim/bridge.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Handle communication between Vim and Lisp, including boot, connect and +" display. Relies on 'lisp.sh' from the Limp package. +" +" Version: +" 0.2 +" +" Date: +" 2008-04-25 +" +" Authors: +" Mikael Jansson +" Larry Clapp + +" Changelog: +" 2008-08-26 by Mikael Jansson +" * Optionally specify core at startup and exit. +" +" 2008-08-25 by Mikael Jansson +" * Now boots a new Lisp or connects to an existing via screen. +" No longer needs the funnel (although it does need a file to read to/from +" screen: it doesn't seem as if 'stuff' can handle very large amounts of +" texts) +" +" 2008-08-18 by Mikael Jansson +" * Tab-completed prompt that lets you choose the Lisp process to connect to. +" Moved the startup to before the loaded check. + +"------------------------------------------------------------------- +" startup +"------------------------------------------------------------------- +" only do these things once + +let s:Limp_version="0.3.4" + +let s:Limp_location = expand("$LIMPRUNTIME") +"if s:Limp_location == "" || s:Limp_location == "$LIMPRUNTIME" +if !filereadable(s:Limp_location . "/vim/limp.vim") + let s:Limp_location = "/usr/local/limp/" . s:Limp_version +endif + +" prefix for the pipe used for communication +let s:limp_bridge_channel_base = $HOME . "/.limp_bridge_channel-" +let s:limp_bridge_connected=0 +exe "setlocal complete+=s" . s:Limp_location . "/vim/thesaurus" + +"------------------------------------------------------------------- +" talk to multiple Lisps using LimpBridge_connect() +"------------------------------------------------------------------- +fun! LimpBridge_complete_lisp(A,L,P) + let prefix = s:limp_bridge_channel_base + "echom "ls -1 ".prefix."*" + let output = system("ls -1 ".prefix."*") + if stridx(output, prefix."*") >= 0 + echom "No Lisps started yet?" + return + endif + let files = split(output, "\n") + let names = [] + for f in files + let names += [f[strlen(prefix):]] + endfor + return names +endfun + +" optionally specify the screen id to connect to +" +" return values: +" +" -1 if user didn't want to connect +" 0 if connection wasn't possible +" 1 if the user did connect +" 2 if the user was already connected +" +fun! LimpBridge_connect(...) + if s:limp_bridge_connected == 1 + echom "Already connected to Lisp!" + return 2 + endif + if a:0 == 1 && a:1 != "" + " format: 7213.limp_listener-foo + let pid = a:1[:stridx(a:1, '.')-1] + let fullname = a:1[stridx(a:1, '.')+1:] + let name = fullname[strlen("limp_listener-"):] + + let s:limp_bridge_channel = s:limp_bridge_channel_base.name.".".pid + else + let s:limp_bridge_channel = s:limp_bridge_channel_base + let name = input("Connect to [boot new]: ", "", "customlist,LimpBridge_complete_lisp") + if name == "" + return -1 + endif + let s:limp_bridge_channel .= name + if 0 == filewritable(s:limp_bridge_channel) "|| s:limp_bridge_channel = s:limp_bridge_channel_base + echom "Not a Limp channel." + return 0 + endif + endif + " extract the PID from format: foo.104982 + " (backward from screen sty naming to ease tab completion) + + " bridge id is the file used for communication between Vim and screen + let s:limp_bridge_id = strpart(s:limp_bridge_channel, strlen(s:limp_bridge_channel_base)) + + " bridge screenid is the screen in which the Lisp is running + let s:limp_bridge_screenid = s:limp_bridge_id[strridx(s:limp_bridge_id, '.')+1:] + "let s:limp_bridge_scratch = $HOME . "/.limp_bridge_scratch-" . s:limp_bridge_id + let s:limp_bridge_test = $HOME . '/.limp_bridge_test-' . s:limp_bridge_id + + silent exe "new" s:limp_bridge_channel + if exists( "#BufEnter#*.lisp#" ) + doauto BufEnter x.lisp + endif + setlocal syntax=lisp + " XXX: in ViLisp, buftype=nowrite, but w/ limp_bridge_channel, vim + " complains about the file being write-only. + "setlocal buftype=nowrite + setlocal bufhidden=hide + setlocal nobuflisted + setlocal noswapfile + hide + + silent exe "new" s:limp_bridge_test + if exists( "#BufEnter#*.lisp#" ) + doauto BufEnter x.lisp + endif + setlocal syntax=lisp + " setlocal buftype=nofile + setlocal bufhidden=hide + setlocal nobuflisted + " setlocal noswapfile + hide + + " hide from the user that we created and deleted (hid, really) a couple of + " buffers + "normal! + redraw + + let s:limp_bridge_connected=1 + + echom "Welcome to Limp. May your journey be pleasant." + + return 1 +endfun + +fun! LimpBridge_connection_status() + if s:limp_bridge_connected == 1 + return "Connected to ".s:limp_bridge_id + else + return "Disconnected" + endif +endfun + +fun! LimpBridge_disconnect() + let s:limp_bridge_connected = 0 + let s:limp_bridge_id = "" +endfun + +" +" optionally, specify the path of the core to save to +" +fun! LimpBridge_quit_lisp(...) + " we were given a file + if a:0 == 1 && a:1 != "" + let core = a:1 + call LimpBridge_send_to_lisp("(sb-ext:save-lisp-and-die \"".core."\")\n") + echom "Lisp ".s:limp_bridge_id." is gone, core saved to ".core."." + else + call LimpBridge_send_to_lisp("(sb-ext:quit)\n") + echom "Lisp ".s:limp_bridge_id." is gone." + endif + call LimpBridge_disconnect() +endfun + +fun! LimpBridge_shutdown_lisp() + if s:limp_bridge_connected == 1 + let core = input("Name of core to save [none]: ", "", "file") + call LimpBridge_quit_lisp(core) + else + echom "Not connected." + endif +endfun + +" +" when not connected, start new or connect to existing +" otherwise, switch to Lisp (screen) +fun! LimpBridge_boot_or_connect_or_display() + if s:limp_bridge_connected + " is it still running? + let status = system("screen -ls") + if stridx(status, s:limp_bridge_screenid) == -1 + call LimpBridge_disconnect() + return + endif + let cmd = "screen -x ".s:limp_bridge_screenid + if has("gui_running") || b:listener_always_open_window == 1 + let cmd = "xterm -e " . cmd + if b:listener_keep_open == 1 + let cmd .= " &" + endif + endif + silent exe "!".cmd + redraw! + else + " connect to a fresh Lisp + let what = LimpBridge_connect() + if what <= 0 + " user didn't want to connect, let's boot! + let name = input("Name the Lisp: ") + if strlen(name) == 0 + " give up + return + endif + + let core = input("Path to core to boot [use system-default]: ", "", "file") + let core_opt = "" + if filereadable(core) + let core_opt = "-c ".core + echom "Booting ".core."..." + else + echom "Booting..." + endif + let styfile = tempname() + let cmd = s:Limp_location . "/bin/lisp.sh ".core_opt."-s ".styfile." -b ".name + call system(cmd) + while getfsize(styfile) <= len("limp_listener") + sleep 200m + endwhile + " needs to be binary, or readfile() expects a newline... + let lines = readfile(styfile, 'b') + if len(lines) < 1 + echom "Error getting screen ID!" + return + endif + + let sty = lines[0] + call delete(styfile) + call LimpBridge_connect(sty) + call LimpBridge_boot_or_connect_or_display() + endif + endif +endfun + +augroup LimpBridge + au! + autocmd BufLeave .LimpBridge_* setlocal nobuflisted + autocmd BufLeave *.lisp let g:limp_bridge_last_lisp = bufname( "%" ) +augroup END + + +"------------------------------------------------------------------- +" plugin <-> function mappings +"------------------------------------------------------------------- + +nnoremap LimpBootConnectDisplay :call LimpBridge_boot_or_connect_or_display() +nnoremap LimpDisconnect :call LimpBridge_disconnect() +nnoremap LimpShutdownLisp :call LimpBridge_shutdown_lisp() + +nnoremap EvalTop :call LimpBridge_eval_top_form() +nnoremap EvalCurrent :call LimpBridge_eval_current_form() +nnoremap EvalExpression :call LimpBridge_prompt_eval_expression() + +vnoremap EvalBlock :call LimpBridge_eval_block() + +nnoremap AbortReset :call LimpBridge_send_to_lisp( "ABORT\n" ) +nnoremap AbortInterrupt :call LimpBridge_send_to_lisp( "" ) + +nnoremap TestCurrent :call LimpBridge_stuff_current_form() +nnoremap TestTop :call LimpBridge_stuff_top_form() + +nnoremap LoadThisFile :call LimpBridge_send_to_lisp( "(load \"" . expand( "%:p" ) . "\")\n") +nnoremap LoadAnyFile :call LimpBridge_send_to_lisp( "(load \"" . expand( "%:p:r" ) . "\")\n") + +nnoremap CompileFile :w! call LimpBridge_send_to_lisp("(compile-file \"".expand("%:p")."\")\n") + +" XXX: What's the proprer syntax for calling >1 Plug? +""nnoremap CompileAndLoadFile CompileFile LoadAnyFile +nnoremap CompileAndLoadFile :w! call LimpBridge_send_to_lisp("(compile-file \"".expand("%:p")."\")\n") call LimpBridge_send_to_lisp( "(load \"" . expand( "%:p:r" ) . "\")\n") + +" Goto Test Buffer: +" Goto Split: split current buffer and goto test buffer +nnoremap GotoTestBuffer :call LimpBridge_goto_buffer_or_window(g:limp_bridge_test) +nnoremap GotoTestBufferAndSplit :sb call LimpBridge_goto_buffer_or_window(g:limp_bridge_test) + +" Goto Last: return to g:limp_bridge_last_lisp, i.e. last buffer +nnoremap GotoLastLispBuffer :call LimpBridge_goto_buffer_or_window(g:limp_bridge_last_lisp) + +" HyperSpec: +nnoremap HyperspecExact :call LimpBridge_hyperspec("exact", 0) +nnoremap HyperspecPrefix :call LimpBridge_hyperspec("prefix", 1) +nnoremap HyperspecSuffix :call LimpBridge_hyperspec("suffix", 1) +nnoremap HyperspecGrep :call LimpBridge_hyperspec("grep", 1) +nnoremap HyperspecFirstLetterIndex :call LimpBridge_hyperspec("index", 0) +nnoremap HyperspecFullIndex :call LimpBridge_hyperspec("index-page", 0) + +" Help Describe: ask Lisp about the current symbol +nnoremap HelpDescribe :call LimpBridge_send_to_lisp("(describe '".expand("").")") + + +"------------------------------------------------------------------- +" library +"------------------------------------------------------------------- +" assume that all of the file has been loaded & defined once +" if one of the functions are defined. +if exists("*LimpBridge_goto_buffer_or_window") + finish +endif + +function! LimpBridge_goto_buffer_or_window( buff ) + if -1 == bufwinnr( a:buff ) + exe "hide bu" a:buff + else + exe bufwinnr( a:buff ) . "wincmd w" + endif +endfunction + + +function! LimpBridge_get_pos() + " what buffer are we in? + let bufnr = bufnr( "%" ) + + " get current position + let c_cur = virtcol( "." ) + let l_cur = line( "." ) + normal! H + let l_top = line( "." ) + + let pos = bufnr . "|" . l_top . "," . l_cur . "," . c_cur + + " go back + exe "normal! " l_cur . "G" . c_cur . "|" + + return( pos ) +endfunction + + +function! LimpBridge_goto_pos( pos ) + let mx = '\(\d\+\)|\(\d\+\),\(\d\+\),\(\d\+\)' + let bufnr = substitute( a:pos, mx, '\1', '' ) + let l_top = substitute( a:pos, mx, '\2', '' ) + let l_cur = substitute( a:pos, mx, '\3', '' ) + let c_cur = substitute( a:pos, mx, '\4', '' ) + + silent exe "hide bu" bufnr + silent exe "normal! " . l_top . "Gzt" . l_cur . "G" . c_cur . "|" +endfunction + + +function! LimpBridge_yank( motion ) + let value = '' + + let p = LimpBridge_get_pos() + silent! exec 'normal!' a:motion + let new_p = LimpBridge_get_pos() + + " did we move? + if p != new_p + " go back + silent! exec 'normal!' a:motion + + let old_l = @l + exec 'normal! "ly' . a:motion + let value = @l + let @l = old_l + endif + + call LimpBridge_goto_pos( p ) + + return( value ) +endfunction + + +" copy an expression to a buffer +function! LimpBridge_send_sexp_to_buffer( sexp, buffer ) + let p = LimpBridge_get_pos() + + " go to the given buffer, go to the bottom + exe "hide bu" a:buffer + silent normal! G + + " tried append() -- doesn't work the way I need it to + let old_l = @l + let @l = a:sexp + silent exe "put l" + " normal! "lp + let @l = old_l + + call LimpBridge_goto_pos( p ) +endfunction + + +" destroys contents of LimpBridge_channel buffer +function! LimpBridge_send_to_lisp( sexp ) + if a:sexp == '' + return + endif + + if !s:limp_bridge_connected + echom "Not connected to Lisp!" + return + endif + + let p = LimpBridge_get_pos() + + " goto LimpBridge_channel, delete it, put s-exp, write it to lisp + try + exe "hide bu" s:limp_bridge_channel + exe "%d" + normal! 1G + + " tried append() -- doesn't work the way I need it to + let old_l = @l + let @l = a:sexp + normal! "lP + let @l = old_l + + silent exe 'w!' + call system('screen -x '.s:limp_bridge_screenid.' -p 0 -X eval "readbuf" "paste ."') + catch /^Vim:E211:/ + echom "Lisp is gone!" + " file not available, Lisp disappeared + call LimpBridge_disconnect() + endtry + + call LimpBridge_goto_pos( p ) +endfunction + +function! LimpBridge_prompt_eval_expression() + let whatwhat = input("Eval: ") + call LimpBridge_send_to_lisp(whatwhat) +endfun + + +" Actually evals current top level form +function! LimpBridge_eval_top_form() + " save position + let p = LimpBridge_get_pos() + + silent! exec "normal! 99[(" + call LimpBridge_send_to_lisp( LimpBridge_yank( "%" ) ) + + " fix cursor position, in case of error below + call LimpBridge_goto_pos( p ) +endfunction + + +function! LimpBridge_eval_current_form() + " save position + let pos = LimpBridge_get_pos() + + " find & yank current s-exp + normal! [( + let sexp = LimpBridge_yank( "%" ) + call LimpBridge_send_to_lisp( sexp ) + call LimpBridge_goto_pos( pos ) +endfunction + + +function! LimpBridge_eval_block() range + " save position + let pos = LimpBridge_get_pos() + + " yank current visual block + let old_l = @l + '<,'> yank l + let sexp = @l + let @l = old_l + + call LimpBridge_send_to_lisp( sexp ) + call LimpBridge_goto_pos( pos ) +endfunction + + +function! LimpBridge_stuff_current_form() + " save position + let pos = LimpBridge_get_pos() + + " find & yank current s-exp + normal! [( + call LimpBridge_send_sexp_to_buffer( LimpBridge_yank( "%" ), s:limp_bridge_test ) + + call LimpBridge_goto_pos( pos ) +endfunction + +function! LimpBridge_stuff_top_form() + " save position + let pos = LimpBridge_get_pos() + + " find & yank top-level s-exp + silent! exec "normal! 99[(" + call LimpBridge_send_sexp_to_buffer( LimpBridge_yank( "%" ), s:limp_bridge_test ) + + call LimpBridge_goto_pos( pos ) +endfunction + +function! LimpBridge_hyperspec(type, make_page) + " get current word under cursor + let word = expand( "" ) + let cmd = "! perl " . s:Limp_location . "/bin/limp-hyperspec.pl" + let cmd = cmd . " " . a:type . " " . a:make_page . " '" . word . "'" + silent! exe cmd + redraw! +endfunction + diff --git a/dot_vim/ftplugin/lisp/limp/cursor.vim b/dot_vim/ftplugin/lisp/limp/cursor.vim new file mode 100644 index 0000000..2890f8f --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/cursor.vim @@ -0,0 +1,207 @@ +" +" limp/vim/cursor.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Save/restore cursor position in window (mostly obsoleted by Vim7 though) +" +" Version: +" 0.2 +" +" Date: +" 2008-04-25 +" +" Authors: +" Mikael Jansson +" Charles E. Campbell, Jr. -NOSPAM +" +" Changelog: +" 2008-04-18 +" * Removed all leader mappings +" +" Usage: +" call Cursor_push() +" let cursor = Cursor_get() +" +" call Cursor_pop() +" call Cursor_set(cursor) +" + +" Load Once: {{{1 + +let s:keepcpo = &cpo +set cpo&vim + +" ----------------------- +" Public Interface: {{{1 +" ----------------------- +let s:modifier= "sil keepj " + + +" assume that all of the file has been loaded & defined once +" if one of the functions are defined. +if exists("*Cursor_get") + finish +endif + +" Cursor_get: {{{1 +" Return the current cursor (as an executable command!) +" +fun! Cursor_get() + if line(".") == 1 && getline(1) == "" + return "" + endif + + " disable various scrolling trickery + let so_keep = &so + let siso_keep = &siso + let ss_keep = &ss + set so=0 siso=0 ss=0 + + let swline = line(".") + let swcol = col(".") + let swwline = winline() - 1 + let swwcol = virtcol(".") - wincol() + let cursordata = "call Window_goto_by_buffer_number(".winbufnr(0).")|silent ".swline + let cursordata = cursordata."|".s:modifier."norm! 0z\" + if swwline > 0 + let cursordata = cursordata.":".s:modifier."norm! ".swwline."\\" + endif + if swwcol > 0 + let cursordata = cursordata.":".s:modifier."norm! 0".swwcol."zl\" + endif + let cursordata = cursordata.":".s:modifier."call cursor(".swline.",".swcol.")\" + + " restore scrolling flags + let &so = so_keep + let &siso = siso_keep + let &ss = ss_keep + + return cursordata +endfun + +" Cursor_set: {{{1 +" Set the current cursor to an old one +" +fun! Cursor_set(cursordata) + exe "silent ".a:cursordata +endfun + + +" --------------------------------------------------------------------- +" Cursor_push {{{1 +" let cursor = Cursor_push() save window position in b:cursor_position_{b:cursor_position_index} +" and return cursor. +fun! Cursor_push(...) + let cursordata = Cursor_get() + + " save window position in + " b:cursor_position_{b:cursor_position_index} (stack) + if !exists("b:cursor_position_index") + let b:cursor_position_index= 1 + else + let b:cursor_position_index = b:cursor_position_index + 1 + endif + + let b:cursor_position_{b:cursor_position_index} = cursordata + + return cursordata +endfun + +" --------------------------------------------------------------------- +" Cursor_pop: {{{1 +fun! Cursor_pop() + if line(".") == 1 && getline(1) == "" + return "" + endif + let so_keep = &so + let siso_keep = &siso + let ss_keep = &ss + set so=0 siso=0 ss=0 + + " use saved window position in b:cursor_position_{b:cursor_position_index} if it exists + if exists("b:cursor_position_index") && exists("b:cursor_position_{b:cursor_position_index}") + try + exe "silent! ".b:cursor_position_{b:cursor_position_index} + catch /^Vim\%((\a\+)\)\=:E749/ + " ignore empty buffer error messages + endtry + " normally drop top-of-stack by one + " but while new top-of-stack doesn't exist + " drop top-of-stack index by one again + if b:cursor_position_index >= 1 + unlet b:cursor_position_{b:cursor_position_index} + let b:cursor_position_index= b:cursor_position_index - 1 + while b:cursor_position_index >= 1 && !exists("b:cursor_position_{b:cursor_position_index}") + let b:cursor_position_index= b:cursor_position_index - 1 + endwhile + if b:cursor_position_index < 1 + unlet b:cursor_position_index + endif + endif + else + echohl WarningMsg + echomsg "***warning*** need to cursor_save() first!" + echohl None + endif + + " seems to be something odd: vertical motions after RWP + " cause jump to first column. Following fixes that + if wincol() > 1 + silent norm! hl + elseif virtcol(".") < virtcol("$") + silent norm! lh + endif + + let &so = so_keep + let &siso = siso_keep + let &ss = ss_keep +endfun + +" --------------------------------------------------------------------- +" Window_goto_by_buffer_number: go to window holding given buffer (by number) {{{1 +" Prefers current window; if its buffer number doesn't match, +" then will try from topleft to bottom right +fun! Window_goto_by_buffer_number(bufnum) + if winbufnr(0) == a:bufnum + return + endif + winc t + let first=1 + while winbufnr(0) != a:bufnum && (first || winnr() != 1) + winc w + let first= 0 + endwhile +endfun + + +" --------------------------------------------------------------------- +" ListWinPosn: +"fun! ListWinPosn() " Decho +" if !exists("b:cursor_position_index") || b:cursor_position_index == 0 " Decho +" call Decho("nothing on SWP stack") " Decho +" else " Decho +" let jwinposn= b:cursor_position_index " Decho +" while jwinposn >= 1 " Decho +" if exists("b:cursor_position{jwinposn}") " Decho +" call Decho("winposn{".jwinposn."}<".b:cursor_position{jwinposn}.">") " Decho +" else " Decho +" call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho +" endif " Decho +" let jwinposn= jwinposn - 1 " Decho +" endwhile " Decho +" endif " Decho +"endfun " Decho +"com! -nargs=0 LWP call ListWinPosn() " Decho + + +" --------------------------------------------------------------------- +" Restore: {{{1 +let &cpo = s:keepcpo +unlet s:keepcpo + +" --------------------------------------------------------------------- +" Modelines: {{{1 +" vim: ts=4 fdm=marker diff --git a/dot_vim/ftplugin/lisp/limp/desert256.vim b/dot_vim/ftplugin/lisp/limp/desert256.vim new file mode 100644 index 0000000..7a97742 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/desert256.vim @@ -0,0 +1,338 @@ +" Vim color file +" Maintainer: Henry So, Jr. + +" These are the colors of the "desert" theme by Hans Fugal with a few small +" modifications (namely that I lowered the intensity of the normal white and +" made the normal and nontext backgrounds black), modified to work with 88- +" and 256-color xterms. +" +" The original "desert" theme is available as part of the vim distribution or +" at http://hans.fugal.net/vim/colors/. +" +" The real feature of this color scheme, with a wink to the "inkpot" theme, is +" the programmatic approximation of the gui colors to the palettes of 88- and +" 256- color xterms. The functions that do this (folded away, for +" readability) are calibrated to the colors used for Thomas E. Dickey's xterm +" (version 200), which is available at http://dickey.his.com/xterm/xterm.html. +" +" I struggled with trying to parse the rgb.txt file to avoid the necessity of +" converting color names to #rrggbb form, but decided it was just not worth +" the effort. Maybe someone seeing this may decide otherwise... + +set background=dark +if version > 580 + " no guarantees for version 5.8 and below, but this makes it stop + " complaining + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="desert256" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " functions {{{ + " returns an approximate grey index for the given grey level + fun grey_number(x) + if &t_Co == 88 + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + else + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " returns the actual grey level represented by the grey index + fun grey_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + " returns the palette index for the given grey index + fun grey_color(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + " returns an approximate color index for the given color level + fun rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endif + endfun + + " returns the actual color level for the given color index + fun rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + " returns the palette index for the given R/G/B color indices + fun rgb_color(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + " returns the palette index to approximate the given R/G/B color levels + fun color(r, g, b) + " get the closest grey + let l:gx = grey_number(a:r) + let l:gy = grey_number(a:g) + let l:gz = grey_number(a:b) + + " get the closest color + let l:x = rgb_number(a:r) + let l:y = rgb_number(a:g) + let l:z = rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " there are two possibilities + let l:dgr = grey_level(l:gx) - a:r + let l:dgg = grey_level(l:gy) - a:g + let l:dgb = grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = rgb_level(l:gx) - a:r + let l:dg = rgb_level(l:gy) - a:g + let l:db = rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " use the grey + return grey_color(l:gx) + else + " use the color + return rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return rgb_color(l:x, l:y, l:z) + endif + endfun + + " returns the palette index to approximate the 'rrggbb' hex string + fun rgb(rgb) + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + + return color(l:r, l:g, l:b) + endfun + + " sets the highlighting for the given group + fun X(group, fg, bg, attr) + if a:fg != "" + exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) + endif + if a:bg != "" + exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + endfun + " }}} + + call X("Normal", "cccccc", "000000", "") + + " highlight groups + call X("Cursor", "708090", "f0e68c", "") + "CursorIM + "Directory + "DiffAdd + "DiffChange + "DiffDelete + "DiffText + "ErrorMsg + call X("VertSplit", "c2bfa5", "7f7f7f", "reverse") + call X("Folded", "ffd700", "4d4d4d", "") + call X("FoldColumn", "d2b48c", "4d4d4d", "") + call X("IncSearch", "708090", "f0e68c", "") + "LineNr + call X("ModeMsg", "daa520", "", "") + call X("MoreMsg", "2e8b57", "", "") + call X("NonText", "addbe7", "000000", "bold") + call X("Question", "00ff7f", "", "") + call X("Search", "f5deb3", "cd853f", "") + call X("SpecialKey", "9acd32", "", "") + call X("StatusLine", "c2bfa5", "000000", "reverse") + call X("StatusLineNC", "c2bfa5", "7f7f7f", "reverse") + call X("Title", "cd5c5c", "", "") + call X("Visual", "6b8e23", "f0e68c", "reverse") + "VisualNOS + call X("WarningMsg", "fa8072", "", "") + "WildMenu + "Menu + "Scrollbar + "Tooltip + + " syntax highlighting groups + call X("Comment", "87ceeb", "", "") + call X("Constant", "ffa0a0", "", "") + call X("Identifier", "98fb98", "", "none") + call X("Statement", "f0e68c", "", "bold") + call X("PreProc", "cd5c5c", "", "") + call X("Type", "bdb76b", "", "bold") + call X("Special", "ffdead", "", "") + "Underlined + call X("Ignore", "666666", "", "") + "Error + call X("Todo", "ff4500", "eeee00", "") + + " delete functions {{{ + delf X + delf rgb + delf color + delf rgb_color + delf rgb_level + delf rgb_number + delf grey_color + delf grey_level + delf grey_number + " }}} +else + " color terminal definitions + hi SpecialKey ctermfg=darkgreen + hi NonText cterm=bold ctermfg=darkblue + hi Directory ctermfg=darkcyan + hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 + hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green + hi Search cterm=NONE ctermfg=grey ctermbg=blue + hi MoreMsg ctermfg=darkgreen + hi ModeMsg cterm=NONE ctermfg=brown + hi LineNr ctermfg=3 + hi Question ctermfg=green + hi StatusLine cterm=bold,reverse + hi StatusLineNC cterm=reverse + hi VertSplit cterm=reverse + hi Title ctermfg=5 + hi Visual cterm=reverse + hi VisualNOS cterm=bold,underline + hi WarningMsg ctermfg=1 + hi WildMenu ctermfg=0 ctermbg=3 + hi Folded ctermfg=darkgrey ctermbg=NONE + hi FoldColumn ctermfg=darkgrey ctermbg=NONE + hi DiffAdd ctermbg=4 + hi DiffChange ctermbg=5 + hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 + hi DiffText cterm=bold ctermbg=1 + hi Comment ctermfg=darkcyan + hi Constant ctermfg=brown + hi Special ctermfg=5 + hi Identifier ctermfg=6 + hi Statement ctermfg=3 + hi PreProc ctermfg=5 + hi Type ctermfg=2 + hi Underlined cterm=underline ctermfg=5 + hi Ignore ctermfg=darkgrey + hi Error cterm=bold ctermfg=7 ctermbg=1 +endif + +" vim: set fdl=0 fdm=marker: diff --git a/dot_vim/ftplugin/lisp/limp/highlight.vim b/dot_vim/ftplugin/lisp/limp/highlight.vim new file mode 100644 index 0000000..893682b --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/highlight.vim @@ -0,0 +1,236 @@ +" +" limp/vim/highlight.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Highlight parens and containing s-exps +" +" Version: +" 0.2 +" +" Date: +" 2008-04-25 +" +" Authors: +" Mikael Jansson +" Charles E. Campbell, Jr. -NOSPAM +" +" Changelog: +" 2008-04-25 +" * Fixed regressions. Now properly highlights blocks again. +" +" 2008-04-18 +" * Removed all mappings +" * Removed < 7.00 compatibility +" * Renamed to Lim-Highlight +" * Changed from Search to Brackets[Block] +" +" Usage: {{{1 +" Before loading: +" let g:LimpHighlight = 1 +" or after loading: +" call LimpHighlight_start() +" +" --------------------------------------------------------------------- +" Load Once: {{{1 + +let s:keepcpo = &cpo +set cpo&vim + +" disable matchparen: we do that ourselves. +let g:loaded_matchparen = 1 + +" assume that all of the file has been loaded & defined once +" if one of the functions are defined. +if exists("*LimpHighlight_start") + finish +endif + +fun! LimpHighlight_start() + if exists("g:limp_highlight_active") + return + endif + let g:limp_highlight_active = 1 + + if !exists("*Cursor_get") + " due to loading order, may not have loaded yet. + " attempt to force a load now. Ditto for matchit! + silent! runtime limp/cursor.vim + endif + silent! runtime plugin/matchit.vim + + " set whichwrap + let s:wwkeep = &ww + set ww=b,s,<,>,[,] + + augroup LimpHighlight + au! + au CursorMoved * silent call s:LimpHighlight_handler() + augroup END + + set lz + call s:LimpHighlight_handler() + set nolz + +endfun + +fun! LimpHighlight_stop() + "echom "Stopping highlight" + set lz + if exists("g:limp_highlight_active") + unlet g:limp_highlight_active + endif + match none + 2match none + + " remove cursorhold event for highlighting matching bracket + augroup LimpHighlight + au! + augroup END + + let &ww = s:wwkeep + set nolz +endfun + + +" --------------------------------------------------------------------- +" LimpHighlight_handler: this routine actually performs the highlighting of {{{1 +" the matching bracket. +fun! LimpHighlight_handler() + if mode() =~ '['."\".'vV]' + " don't try to highlight matching/surrounding brackets while in + " visual-block mode + return + endif + + + " save + let magickeep = &magic + let regdq = @" + let regunnamed = @@ + let sokeep = &so + let sskeep = &ss + let sisokeep = &siso + let solkeep = &sol + let t_vbkeep = &t_vb + let vbkeep = &vb + silent! let regpaste = @* + + " turn beep/visual flash off + set nosol vb t_vb= so=0 siso=0 ss=0 magic + + " remove every other character from the mps option set + let mps = substitute(&mps,'\(.\).','\1','g') + + " grab a copy of the character under the cursor into @0 + silent! norm! yl + + " if the character grabbed in @0 is in the mps option set, then highlight + " the matching character + if stridx(mps,@0) != -1 + "------------------------------------------ + " We are at a bracket character + "------------------------------------------ + let curchr = @0 + " determine match line, column. + " Restrict search to currently visible portion of window. + if &mps =~ curchr.':' + let stopline = line("w$") + let chrmatch = substitute(&mps,'^.*'.curchr.':\(.\).*$','\1','') + let [mtchline,mtchcol] = searchpairpos(escape(curchr,'[]'),'',escape(chrmatch,'[]'),'n','synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"',stopline) + else + let stopline = line("w0") + let chrmatch = substitute(&mps,'^.*\(.\):'.curchr.'.*$','\1','') + let [mtchline,mtchcol] = searchpairpos(escape(chrmatch,'[]'),'',escape(curchr,'[]'),'bn','synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"',stopline) + endif + + if mtchline != 0 && mtchcol != 0 + let mtchline2 = line('.') + let mtchcol2 = col('.') + let mtchline1 = mtchline + let mtchcol1 = mtchcol + + call s:PerformMatch(mtchline1, mtchcol1, mtchline2, mtchcol2) + else + 2match none + match none + endif + + " if g:HiMtchBrkt_surround exists and is true, then highlight the surrounding brackets + "elseif exists("g:HiMtchBrkt_surround") && g:HiMtchBrkt_surround + else + "------------------------------------------ + " We are inside brackets! + "------------------------------------------ + let swp = Cursor_get() + let openers = '['.escape(substitute(&mps,':.,\=',"","g"),']').']' + let closers = '['.escape(substitute(&mps,',\=.:',"","g"),']').']' + call searchpair(openers,"",closers,'','synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') + silent! norm! yl + if stridx(mps,@0) != -1 + let mtchline1 = line('.') + let mtchcol1 = virtcol('.') + keepj norm! % + let mtchline2 = line('.') + let mtchcol2 = virtcol('.') + call Cursor_set(swp) + + call s:PerformMatch(mtchline1, mtchcol1, mtchline2, mtchcol2) + else + match none + 2match none + endif + endif + + " restore + let &magic = magickeep + let @" = regdq + let @@ = regunnamed + let &sol = solkeep + let &so = sokeep + let &siso = sisokeep + let &ss = sskeep + let &t_vb = t_vbkeep + let &vb = vbkeep + silent! let @* = regpaste +endfun + +fun! s:PerformMatch(line1, col1, line2, col2) + let line1 = a:line1 + let col1 = a:col1 + let line2 = a:line2 + let col2 = a:col2 + + if line1 == line2 + " at a single line => sort points on columns + if col1 > col2 + let tmp = col2 + let col2 = col1 + let col1 = tmp + let tmp = line2 + let line2 = line1 + let line1 = tmp + endif + exe '2match BracketsBlock /\%'.line1.'l\%>'.col1.'v\%<'.col2.'v/' + else + " at a single line => sort points on lines + if line1 > line2 + let tmp = line2 + let line2 = line1 + let line1 = tmp + let tmp = col2 + let col2 = col1 + let col1 = tmp + endif + exe '2match BracketsBlock /\%'.line1.'l\%>'.col1.'v\|\%>'.line1.'l\%<'.line2.'l\|\%'.line2.'l\%<'.col2.'v/' + endif + + exe 'match Brackets /\%'.line1.'l\%'.col1.'v\|\%'.line2.'l\%'.col2.'v/' +endfun + +let &cpo = s:keepcpo +unlet s:keepcpo + + diff --git a/dot_vim/ftplugin/lisp/limp/keys.vim b/dot_vim/ftplugin/lisp/limp/keys.vim new file mode 100644 index 0000000..9ff3a01 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/keys.vim @@ -0,0 +1,96 @@ +" +" limp/vim/keys.vim +" +" Description: +" Limp key bindings +" +" Authors: +" Mikael Jansson +" + +nmap LimpBootConnectDisplay +nmap LimpDisconnect +nmap LimpShutdownLisp + +" Eval Top: send top-level s-exp to Lisp +" Eval Current: send current s-exp to Lisp +" Eval Expression: send arbitrary code to Lisp +nmap et EvalTop +nmap ec EvalCurrent +nmap ex EvalExpression + +" Eval Block: visual mode +vmap et EvalBlock +vmap ec EvalBlock +vmap ex EvalBlock + +" SBCL Abort Reset: abort from the debugger +nmap ar AbortReset + +" Abort Interrupt: send ^C to interpreter +nmap ai AbortInterrupt + +" Test Current: copy current s-exp to test buffer +" Test Top: copy top s-exp to test buffer +nmap tc TestCurrent +nmap tt TestTop + +" Load File: load /this/ file into Lisp +" Load Any File: load whichever version of this file (.lisp not given) +nmap lf LoadThisFile +nmap la LoadAnyFile + +" Compile File: compile the current file +" Compile Load File: compile, then load the current file +nmap cf CompileFile +nmap cl CompileAndLoadFile + +" Goto Test Buffer: +" Goto Split: split current buffer and goto test buffer +nmap gt GotoTestBuffer +nmap gs GotoTestBufferAndSplit + +" Goto Last: return to last Lisp buffer +nmap gl GotoLastLispBuffer + +" HyperSpec: +nmap he HyperspecExact +nmap hp HyperspecPrefix +nmap hs HyperspecSuffix +nmap hg HyperspecGrep +nmap hi HyperspecFirstLetterIndex +nmap hI HyperspecFullIndex +nmap K HyperspecExact + +" Help Describe: ask Lisp about the current symbol +nmap hd HelpDescribe + +" Mark Top: mark visual block +nmap mt MarkTop + +" Format Current: reindent/format +" Format Top: +nmap fc FormatCurrent +nmap ft FormatTop + +" Sexp Wrap: wrap the current form in a list +" Sexp Peel: peel a list off the current form +nmap sw SexpWrap +nmap sp SexpPeel + +" Sexp Previous: navigate to previous s-exp +" Sexp Next: navigate to previous s-exp +nmap ( SexpPrevious +nmap ) SexpNext + +" Sexp Move Back: swap this and previous s-exp +" Sexp Move Forward: swap this and next s-exp +nmap { SexpMoveBack +nmap } SexpMoveForward + +" Sexp Comment: comment all the way from the top level +nmap sc SexpComment + +" Sexp Comment Current: comment current form +nmap sC SexpCommentCurrent + diff --git a/dot_vim/ftplugin/lisp/limp/limp.vim b/dot_vim/ftplugin/lisp/limp/limp.vim new file mode 100644 index 0000000..8c5a2ec --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/limp.vim @@ -0,0 +1,53 @@ +" +" limp/vim/limp.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Setup the Limp environment +" +" Version: +" 0.2 +" +" Date: +" 2008-04-28 +" +" Authors: +" Mikael Jansson +" +" Changelog: +" * 2008-04-28 by Mikael Jansson +" Only change colorscheme and nocompatible when not previously set. +" +" * 2008-04-25 by Mikael Jansson +" Catch-all key for Lisp boot, connect & display +" +" * 2008-04-20 by Mikael Jansson +" Initial version. + +"------------------------------------------------------------------- + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +"------------------------------------------------------------------- +" external dependencies +"------------------------------------------------------------------- +silent! runtime plugin/matchit.vim + +"------------------------------------------------------------------- +" the Limp library +"------------------------------------------------------------------- + +runtime ftplugin/lisp/limp/cursor.vim +runtime ftplugin/lisp/limp/highlight.vim +runtime ftplugin/lisp/limp/sexp.vim +runtime ftplugin/lisp/limp/bridge.vim +runtime ftplugin/lisp/limp/autoclose.vim +runtime ftplugin/lisp/limp/keys.vim +runtime ftplugin/lisp/limp/mode.vim + + diff --git a/dot_vim/ftplugin/lisp/limp/mode.vim b/dot_vim/ftplugin/lisp/limp/mode.vim new file mode 100644 index 0000000..a2884eb --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/mode.vim @@ -0,0 +1,118 @@ +" +" limp/vim/mode.vim +" +" URL: +" http://mikael.jansson.be +" +" Description: +" Lisp-mode specific functions +" +" Authors: +" Mikael Jansson +" +"Eval (say-hello 'mikael) +command! -buffer -nargs=* Eval silent call LimpBridge_send_to_lisp() + +let b:listener_always_open_window=0 +let b:listener_keep_open=0 + +let g:lisp_mode_active = 0 +fun! LimpMode_start() + if g:lisp_mode_active + return + endif + let g:lisp_mode_active = 1 + "------------------------------------------------------------------- + " coloring + "------------------------------------------------------------------- + let g:lisp_rainbow=1 + + set t_Co=256 + if !exists("g:colors_name") + colorscheme desert256 + endif + + hi Brackets ctermbg=53 ctermfg=white + hi BracketsBlock ctermbg=235 guibg=lightgray + hi StatusLine ctermbg=white ctermfg=160 + hi StatusLineNC ctermbg=black ctermfg=gray + hi Pmenu ctermbg=53 ctermfg=255 + hi PmenuSel ctermbg=255 ctermfg=53 + + " + " set all parens to gray + " + hi hlLevel0 ctermfg=238 + hi hlLevel1 ctermfg=238 + hi hlLevel2 ctermfg=238 + hi hlLevel3 ctermfg=238 + hi hlLevel4 ctermfg=238 + hi hlLevel5 ctermfg=238 + hi hlLevel6 ctermfg=238 + hi hlLevel7 ctermfg=238 + hi hlLevel8 ctermfg=238 + hi hlLevel9 ctermfg=238 + hi hlLevel10 ctermfg=238 + hi hlLevel11 ctermfg=238 + + call LimpHighlight_start() + call AutoClose_start() + + " for whatever reason, nocursorline isn't set after pressing F12... (i.e., + " switching back to the buffer) + setlocal nocursorline +endfun + +fun! LimpMode_stop() + let g:lisp_mode_active = 0 + call LimpHighlight_stop() + call AutoClose_stop() +endfun + +augroup LimpMode + au! + au BufEnter * :if &filetype == "lisp" | call LimpMode_start() | endif + au BufLeave * :if &filetype == "lisp" | call LimpMode_stop() | endif +augroup END + + +"------------------------------------------------------------------- +" init filetype plugin +"------------------------------------------------------------------- +syntax on +setlocal nocompatible nocursorline +setlocal lisp syntax=lisp +setlocal ls=2 bs=2 si et sw=2 ts=2 tw=0 +setlocal statusline=%<%f\ \(%{LimpBridge_connection_status()}\)\ %h%m%r%=%-14.(%l,%c%V%)\ %P\ of\ %L\ \(%.45{getcwd()}\) +setlocal iskeyword=&,*,+,45,/,48-57,:,<,=,>,@,A-Z,a-z,_ +setlocal cpoptions=-mp +setlocal foldmethod=marker foldmarker=(,) foldminlines=1 + + +" This allows gf and :find to work. Fix path to your needs +setlocal suffixesadd=.lisp,cl path=/home/mikael/hacking/lisp/** + +" This allows [d [i [D [I work across files if an ASDF buffer is opened +" If I used load, it would be there too. +setlocal include=(:file\ + +"------------------------------------------------------------------- +" reset to previous values +"------------------------------------------------------------------- + +let s:save_cpo = &cpo +set cpo&vim + +let b:undo_ftplugin = "setlocal syntax< lisp< ls< bs< si< et< sw< " + \ . "ts< tw< complete< nocursorline< nocompatible< statusline< iskeyword< " + \ . "cpoptions< foldmethod< foldmarker< foldminlines< " + \ . "suffixesadd< path< include< " + +let &cpo = s:save_cpo +unlet s:save_cpo + + +"------------- boot! + +call LimpMode_start() + diff --git a/dot_vim/ftplugin/lisp/limp/sexp.vim b/dot_vim/ftplugin/lisp/limp/sexp.vim new file mode 100644 index 0000000..0dd5415 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/sexp.vim @@ -0,0 +1,308 @@ +" +" limp/vim/sexp.vim +" +" URL: +" http://mikael.jansson.be/hacking +" +" Description: +" Things to help you out with s-exps. +" +" Version: +" 0.2 +" +" Date: +" 2008-04-20 +" +" Authors: +" Mikael Jansson +" +" Changelog: +" 2008-04-20 +" * Initial version. +" * Based on ViLisp.vim by Larry Clapp + +" Mark Top: mark visual block +nnoremap MarkTop 99[(V% + +" Format Current: reindent/format +" Format Top: +nnoremap FormatCurrent [(=%`' +nnoremap FormatTop 99[(=%`' + +" Sexp Wrap: wrap the current form in a list +" Sexp Peel: peel a list off the current form +nnoremap SexpWrap :call Cursor_push()[(%a)h%i(:call Cursor_pop() +nnoremap SexpPeel :call Cursor_push()[(:call Cursor_push()%x:call Cursor_pop()x:call Cursor_pop() + +" Sexp Previous: navigate to previous s-exp +" Sexp Next: navigate to previous s-exp +nnoremap SexpPrevious :call Sexp_Previous() +nnoremap SexpNext :call Sexp_Next() + +" Sexp Move Back: swap this and previous s-exp +" Sexp Move Forward: swap this and next s-exp +nnoremap SexpMoveBack :call Sexp_MoveBack() +nnoremap SexpMoveForward :call Sexp_MoveForward() + +" Sexp Comment: comment all the way from the top level +nnoremap SexpComment :call Cursor_push()99[(%a\|#hh%i#\|:call Cursor_pop() + +" Sexp Comment Current: comment current form +nnoremap SexpCommentCurrent :call Cursor_push()[(%a\|#hh%i#\|:call Cursor_pop() + + +"------------------------------------------------------------------- + +fun! Sexp_Next() + let [l, c] = Sexp_get_Next() + call cursor(l, c) +endfun + +fun! Sexp_Previous() + let [l, c] = Sexp_get_Previous() + if l == 0 && c == 0 + return + endif + call cursor(l, c) + return +endfun + +" return the position of the next s-exp +fun! Sexp_get_Next() + return searchpos('(', 'nW') +endfun + +" return the position of the previous s-exp +fun! Sexp_get_Previous() + let p = getpos(".") + + " If outside of *any* s-exps, move to the previous s-exp first. + let [l, c] = searchpairpos('(', '', ')', 'bnW') + if l == 0 && c == 0 + call searchpos(')', 'Wb') + endif + + " now, move to the start of this s-exp, wherever it may be. + let [l, c] = searchpos('(', 'Wnb') + + call setpos(".", p) + + return [l, c] +endfun + +"XXX: MoveBack/MoveForward share much code + +fun! Sexp_MoveBack() + " Inside an s-exp? + let [l, c] = searchpairpos('(', '', ')', 'bcnW') + if l == 0 || c == 0 + " Nope, + return + endif + + silent! let regs = @* + + " mark the start of this s-exp + silent! norm! yl + if @0 != "(" + call Sexp_Previous() + endif + + " + " Find out if the previous s-exp is the parent of the current + " + " This by searching to the previous s-exp, doing a % and checking either + " of the following conditions: + " + " * prev_line2 == this_line2 && prev_col2 > this_col2 + " * prev_line2 > this_line2 + " + " where prev_line2/prev_col2 = the ) of the previous match, and + " this_line2/this_col2 = the ) of the current s-exp. + " + + " so we can get back. + silent! norm! ma + let [b, this_line1, this_col1, o] = getpos('.') + + " where does the *current* s-exp end? + silent! norm! % + let [b, this_line2, this_col2, o] = getpos('.') + silent! norm! % + + " where does the previous s-exp end? + call Sexp_Previous() + silent! norm! mb + + let [b, prev_line1, prev_col1, o] = getpos('.') + silent! norm! % + let [b, prev_line2, prev_col2, o] = getpos('.') + + if (prev_line2 == this_line2 && prev_col2 > this_col2) || (prev_line2 > this_line2) + " For now, just do nothing + echom "Error: Trying to transpose s-exp backwards with parent." + silent! norm! `a + return + endif + + " -------------------------------------------------------- + + " get the s-exps + silent! norm! `a + silent! norm! "ayab + silent! norm! `b + silent! norm! "byab + + " copy and replace current s-exp with whitespace + let @c = Fill(" ", len(@b)) + let @d = Fill(" ", len(@a)) + + silent! norm! `a"_dab + silent! norm! `a"cP + + silent! norm! `b"_dab + silent! norm! `b"dP + + if this_line1 == prev_line1 + + let diff = len(@a) - len(@b) + if diff > 0 + let movement = ''.diff.'l' + elseif diff < 0 + let movement = ''.(-diff).'h' + else + let movement = '' + endif + + silent! norm! `b"aPl + silent! exe 'norm! '.len(@a).'x' + + silent! exe 'norm! `a'.movement.'"bPl' + silent! exe 'norm! '.len(@b).'x' + + silent! norm! `b + else + " different lines, so a simple paste will do + + silent! norm! `a"bP + silent! exe 'norm! l'.len(@a).'x' + silent! norm! `b"aP + silent! exe 'norm! l'.len(@b).'x' + silent! norm! `b + endif + + silent! let @* = regs +endfun + +fun! Sexp_MoveForward() + " Inside an s-exp? + let [l, c] = searchpairpos('(', '', ')', 'bcnW') + if l == 0 || c == 0 + " Nope, + return + endif + + silent! let regs = @* + + " mark the start of this s-exp + silent! norm! yl + if @0 != "(" + call Sexp_Previous() + endif + + " + " Find out if the next s-exp is the parent of the current. + " + " Search for the next ')', then see where the matching '(' ends. + " Check for any of the following conditions. + " + " * prev_line1 == this_line1 && prev_col1 < this_col1 + " * prev_line1 < this_line1 + " + " where prev_line1/prev_col1 = the ( of the previous match, and + " this_line1/this_col1 = the ( of the current s-exp. + " + + " so we can get back. + silent! norm! ma + let [b, this_line1, this_col1, o] = getpos('.') + + " where does the *current* s-exp end? + silent! norm! % + let [b, this_line2, this_col2, o] = getpos('.') + + " where does the next s-exp end? + call search(')', 'W') + + let [b, prev_line2, prev_col2, o] = getpos('.') + silent! norm! % + + silent! norm! mb + let [b, prev_line1, prev_col1, o] = getpos('.') + + if (prev_line1 == this_line1 && prev_col1 < this_col1) || (prev_line1 < this_line1) + " For now, just do nothing + echom "Error: Trying to transpose s-exp forward with parent." + silent! norm! `a + return + endif + + " -------------------------------------------------------- + + " get the s-exps + silent! norm! `a + silent! norm! "ayab + silent! norm! `b + silent! norm! "byab + + " copy and replace current s-exp with whitespace + let @c = Fill(" ", len(@b)) + let @d = Fill(" ", len(@a)) + + silent! norm! `b"_dab + silent! norm! `b"dP + + silent! norm! `a"_dab + silent! norm! `a"cP + + if this_line1 == prev_line1 + + let diff = len(@a) - len(@b) + if diff > 0 + let movement = ''.diff.'h' + elseif diff < 0 + let movement = ''.(-diff).'l' + else + let movement = '' + endif + + silent! norm! `a"bPl + silent! exe 'norm! '.len(@b).'x' + + silent! exe 'norm! `b'.movement.'"aPl' + silent! exe 'norm! '.len(@a).'x' + + silent! exe 'norm! `b'.movement + else + " different lines, so a simple paste will do + + silent! norm! `a"bP + silent! exe 'norm! l'.len(@a).'x' + silent! norm! `b"aP + silent! exe 'norm! l'.len(@b).'x' + silent! norm! `b + endif + + silent! let @* = regs +endfun + +fun! Fill(c, n) + let s = "" + let n = a:n + while n > 0 + let s = s.a:c + let n = n-1 + endwhile + return s +endfun + diff --git a/dot_vim/ftplugin/lisp/limp/thesaurus b/dot_vim/ftplugin/lisp/limp/thesaurus new file mode 100644 index 0000000..94a3ca9 --- /dev/null +++ b/dot_vim/ftplugin/lisp/limp/thesaurus @@ -0,0 +1,1339 @@ +&aux +&key +acos +aref +asin +atan +atom +byte +caar +cadr +case +cdar +cddr +char +cond +cons +cosh +decf +endp +eval +expt +fill +find +flet +getf +incf +last +let* +list +load +loop +mapc +mapl +null +oddp +open +prog +push +read +real +remf +rest +room +sbit +setf +setq +sinh +some +sort +sqrt +step +tanh +time +type +warn +when +&body +&rest +abort +acons +acosh +apply +array +asinh +assoc +atanh +block +boole +break +caaar +caadr +cadar +caddr +catch +ccase +cdaar +cdadr +cddar +cdddr +char< +char= +char> +class +close +consp +count +debug +defun +ecase +equal +error +evenp +every +fifth +first +float +floor +ftype +isqrt +ldiff +list* +listp +merge +nconc +ninth +phase +plusp +prin1 +princ +print +prog* +prog1 +prog2 +progn +progv +psetf +psetq +quote +ratio +realp +round +schar +sixth +sleep +space +speed +subst +svref +tailp +tenth +third +throw +trace +typep +union +write +zerop +&whole +adjoin +append +arrayp +assert +bignum +boundp +caaaar +caaadr +caadar +caaddr +cadaar +cadadr +caddar +cadddr +cdaaar +cdaadr +cdadar +cdaddr +cddaar +cddadr +cdddar +cddddr +cerror +char/= +char<= +char>= +coerce +defvar +delete +dolist +eighth +equalp +export +ffloor +fixnum +floatp +format +fourth +fround +gensym +ignore +import +inline +intern +labels +lambda +length +listen +logand +logeqv +logior +lognor +lognot +logxor +mapcan +mapcar +mapcon +member +method +minusp +notany +nsubst +nthcdr +number +nunion +pprint +random +rassoc +reduce +remove +return +rplaca +rplacd +safety +search +second +shadow +shiftf +signal +signum +stream +string +sublis +subseq +sxhash +symbol +terpri +unless +values +vector +apropos +bit-and +bit-eqv +bit-ior +bit-nor +bit-not +bit-xor +boole-1 +boole-2 +boolean +butlast +ceiling +clrhash +compile +complex +declaim +declare +defsetf +deftype +dotimes +dribble +fboundp +find-if +funcall +gentemp +gethash +inspect +integer +keyword +locally +logbitp +lognand +logorc1 +logorc2 +logtest +maphash +maplist +nreconc +nsublis +numberp +package +pairlis +provide +pushnew +remhash +remprop +replace +require +restart +reverse +rotatef +seventh +special +streamp +string< +string= +string> +stringp +subsetp +symbolp +tagbody +type-of +untrace +vectorp +warning +assoc-if +bit-nand +bit-orc1 +bit-orc2 +boole-c1 +boole-c2 +char-int +class-of +complexp +continue +copy-seq +count-if +defclass +defmacro +describe +fceiling +function +identity +imagpart +integerp +keywordp +ldb-test +logandc1 +logandc2 +logcount +macrolet +map-into +mismatch +nbutlast +notevery +nreverse +optimize +packagep +pathname +position +proclaim +rational +realpart +sequence +standard +string/= +string<= +string>= +subst-if +subtypep +truename +truncate +typecase +unexport +unintern +variable +y-or-n-p +&optional +*modules* +*package* +base-char +bit-andc1 +bit-andc2 +boole-and +boole-clr +boole-eqv +boole-ior +boole-nor +boole-set +boole-xor +byte-size +char-code +char-name +character +code-char +condition +conjugate +constantp +copy-list +copy-tree +ctypecase +defmethod +defstruct +delete-if +directory +etypecase +eval-when +formatter +ftruncate +functionp +ignorable +make-list +member-if +name-char +notinline +nsubst-if +nth-value +numerator +otherwise +pathnamep +peek-char +rassoc-if +rationalp +read-byte +read-char +read-line +readtable +remove-if +revappend +satisfies +structure +use-value +*debug-io* +*features* +*query-io* +add-method +array-rank +bit-vector +boole-nand +boole-orc1 +boole-orc2 +cell-error +char-equal +char-lessp +characterp +check-type +class-name +complement +constantly +copy-alist +defgeneric +defpackage +digit-char +do-symbols +file-error +find-class +float-sign +fresh-line +hash-table +in-package +long-float +make-array +makunbound +mask-field +namestring +pprint-pop +pprint-tab +probe-file +readtablep +slot-value +substitute +tree-equal +type-error +vector-pop +with-slots +write-byte +write-char +write-line +*read-base* +*read-eval* +*readtable* +base-string +boole-andc1 +boole-andc2 +both-case-p +call-method +char-upcase +clear-input +concatenate +copy-symbol +declaration +defconstant +delete-file +denominator +disassemble +echo-stream +end-of-file +fdefinition +file-author +file-length +file-stream +find-if-not +find-method +find-symbol +float-radix +fmakunbound +list-length +loop-finish +macroexpand +make-method +make-string +make-symbol +nsubstitute +parse-error +position-if +pprint-fill +rationalize +rename-file +return-from +scale-float +short-float +signed-byte +slot-boundp +stable-sort +store-value +string-trim +symbol-name +unread-char +use-package +values-list +vector-push +yes-or-no-p +&environment +*load-print* +*print-base* +*print-case* +adjust-array +alpha-char-p +apropos-list +assoc-if-not +bit-vector-p +change-class +clear-output +compile-file +count-if-not +decode-float +defparameter +digit-char-p +double-float +fill-pointer +find-package +find-restart +float-digits +force-output +handler-bind +handler-case +hash-table-p +intersection +lower-case-p +machine-type +make-package +package-name +print-object +random-state +reader-error +restart-bind +restart-case +restart-name +simple-array +simple-error +single-float +slot-missing +slot-unbound +stream-error +string-equal +string-lessp +subst-if-not +symbol-plist +symbol-value +unbound-slot +upper-case-p +write-string +*print-array* +*print-level* +*print-lines* +*print-radix* +*terminal-io* +alphanumericp +byte-position +char-downcase +char-greaterp +control-error +delete-if-not +deposit-field +documentation +extended-char +file-position +finish-output +ignore-errors +macroexpand-1 +make-instance +make-pathname +make-sequence +member-if-not +next-method-p +nintersection +nsubst-if-not +open-stream-p +package-error +parse-integer +pathname-host +pathname-name +pathname-type +pprint-indent +pprint-linear +program-error +rassoc-if-not +read-sequence +remove-if-not +remove-method +simple-string +simple-vector +slot-exists-p +software-type +standard-char +string-stream +string-upcase +style-warning +substitute-if +unsigned-byte +unuse-package +*error-output* +*load-verbose* +*print-circle* +*print-escape* +*print-gensym* +*print-length* +*print-pretty* +*random-state* +*trace-output* +built-in-class +char-not-equal +char-not-lessp +compiler-macro +copy-readtable +copy-structure +delete-package +do-all-symbols +dynamic-extent +get-properties +graphic-char-p +input-stream-p +integer-length +invoke-restart +long-site-name +macro-function +make-condition +make-load-form +muffle-warning +no-next-method +nstring-upcase +nsubstitute-if +pprint-newline +pprint-tabular +random-state-p +readtable-case +rename-package +row-major-aref +set-difference +simple-warning +standard-class +symbol-package +synonym-stream +two-way-stream +unwind-protect +with-accessors +with-open-file +write-sequence +*compile-print* +*debugger-hook* +*load-pathname* +*load-truename* +*read-suppress* +array-dimension +cell-error-name +char-code-limit +describe-object +file-namestring +file-write-date +float-precision +hash-table-size +hash-table-test +host-namestring +invoke-debugger +load-time-value +machine-version +make-hash-table +merge-pathnames +nset-difference +output-stream-p +pathname-device +position-if-not +pprint-dispatch +prin1-to-string +princ-to-string +short-site-name +simple-string-p +simple-vector-p +slot-makunbound +standard-char-p +standard-method +standard-object +string-downcase +string-greaterp +structure-class +symbol-function +symbol-macrolet +wild-pathname-p +write-to-string +*gensym-counter* +*print-readably* +*standard-input* +arithmetic-error +array-dimensions +array-rank-limit +array-total-size +broadcast-stream +call-next-method +compute-restarts +define-condition +division-by-zero +find-all-symbols +generic-function +get-decoded-time +hash-table-count +logical-pathname +machine-instance +make-echo-stream +nstring-downcase +package-use-list +parse-namestring +pathname-match-p +pathname-version +read-from-string +set-exclusive-or +shadowing-import +simple-condition +software-version +string-left-trim +string-not-equal +string-not-lessp +structure-object +type-error-datum +unbound-variable +with-open-stream +&allow-other-keys +*compile-verbose* +*standard-output* +allocate-instance +array-in-bounds-p +char-not-greaterp +compilation-speed +compiled-function +delete-duplicates +enough-namestring +function-keywords +list-all-packages +make-random-state +method-qualifiers +nset-exclusive-or +package-nicknames +read-char-no-hang +remove-duplicates +serious-condition +shared-initialize +simple-bit-vector +simple-type-error +storage-condition +string-capitalize +string-right-trim +substitute-if-not +*break-on-signals* +*macroexpand-hook* +adjustable-array-p +array-displacement +array-element-type +destructuring-bind +file-string-length +get-setf-expansion +get-universal-time +long-float-epsilon +method-combination +nstring-capitalize +nsubstitute-if-not +pathname-directory +print-not-readable +simple-base-string +special-operator-p +translate-pathname +undefined-function +vector-push-extend +*print-miser-width* +compiled-function-p +concatenated-stream +define-modify-macro +define-symbol-macro +do-external-symbols +file-error-pathname +get-macro-character +initialize-instance +make-synonym-stream +make-two-way-stream +multiple-value-bind +multiple-value-call +multiple-value-list +multiple-value-setq +read-delimited-list +set-macro-character +set-pprint-dispatch +short-float-epsilon +simple-bit-vector-p +stream-element-type +stream-error-stream +string-not-greaterp +with-simple-restart +*print-right-margin* +call-arguments-limit +copy-pprint-dispatch +define-setf-expander +directory-namestring +double-float-epsilon +integer-decode-float +interactive-stream-p +invalid-method-error +lambda-list-keywords +most-negative-fixnum +most-positive-fixnum +multiple-value-prog1 +no-applicable-method +package-used-by-list +pprint-logical-block +set-syntax-from-char +single-float-epsilon +array-dimension-limit +array-row-major-index +compile-file-pathname +decode-universal-time +define-compiler-macro +encode-universal-time +get-internal-run-time +make-broadcast-stream +multiple-values-limit +package-error-package +reinitialize-instance +synonym-stream-symbol +unbound-slot-instance +user-homedir-pathname +with-compilation-unit +with-output-to-string +with-package-iterator +array-total-size-limit +floating-point-inexact +get-internal-real-time +hash-table-rehash-size +stream-external-format +with-input-from-string +*compile-file-pathname* +*compile-file-truename* +*print-pprint-dispatch* +compiler-macro-function +ensure-generic-function +floating-point-overflow +lambda-parameters-limit +make-instances-obsolete +print-unreadable-object +with-condition-restarts +with-standard-io-syntax +array-has-fill-pointer-p +broadcast-stream-streams +echo-stream-input-stream +ensure-directories-exist +floating-point-underflow +get-output-stream-string +lisp-implementation-type +make-concatenated-stream +make-string-input-stream +method-combination-error +most-negative-long-float +most-positive-long-float +type-error-expected-type +with-hash-table-iterator +arithmetic-error-operands +define-method-combination +echo-stream-output-stream +least-negative-long-float +least-positive-long-float +make-string-output-stream +most-negative-short-float +most-positive-short-float +package-shadowing-symbols +print-not-readable-object +standard-generic-function +arithmetic-error-operation +compute-applicable-methods +function-lambda-expression +least-negative-short-float +least-positive-short-float +most-negative-double-float +most-negative-single-float +most-positive-double-float +most-positive-single-float +read-preserving-whitespace +translate-logical-pathname +upgraded-complex-part-type +*default-pathname-defaults* +*read-default-float-format* +concatenated-stream-streams +hash-table-rehash-threshold +least-negative-double-float +least-negative-single-float +least-positive-double-float +least-positive-single-float +lisp-implementation-version +long-float-negative-epsilon +make-load-form-saving-slots +two-way-stream-input-stream +upgraded-array-element-type +get-dispatch-macro-character +invoke-restart-interactively +set-dispatch-macro-character +short-float-negative-epsilon +two-way-stream-output-stream +double-float-negative-epsilon +logical-pathname-translations +make-dispatch-macro-character +pprint-exit-if-list-exhausted +single-float-negative-epsilon +internal-time-units-per-second +simple-condition-format-control +floating-point-invalid-operation +simple-condition-format-arguments +load-logical-pathname-translations +update-instance-for-different-class +update-instance-for-redefined-class +least-negative-normalized-long-float +least-positive-normalized-long-float +least-negative-normalized-short-float +least-positive-normalized-short-float +least-negative-normalized-double-float +least-negative-normalized-single-float +least-positive-normalized-double-float +least-positive-normalized-single-float +&a-o-k &allow-other-keys +*b-o-s *break-on-signals* +*c-f-p *compile-file-pathname* +*c-f-t *compile-file-truename* +*c-p *compile-print* +*c-v *compile-verbose* +*d-h *debugger-hook* +*d-i *debug-io* +*d-p-d *default-pathname-defaults* +*e-o *error-output* +*g-c *gensym-counter* +*l-p *load-print* *load-pathname* +*l-t *load-truename* +*l-v *load-verbose* +*m-h *macroexpand-hook* +*p-a *print-array* +*p-b *print-base* +*p-c *print-case* *print-circle* +*p-e *print-escape* +*p-g *print-gensym* +*p-l *print-level* *print-lines* *print-length* +*p-m-w *print-miser-width* +*p-p *print-pretty* +*p-p-d *print-pprint-dispatch* +*p-r *print-radix* *print-readably* +*p-r-m *print-right-margin* +*q-i *query-io* +*r-b *read-base* +*r-d-f-f *read-default-float-format* +*r-e *read-eval* +*r-s *random-state* *read-suppress* +*s-i *standard-input* +*s-o *standard-output* +*t-i *terminal-io* +*t-o *trace-output* +a-a adjust-array +a-a-p adjustable-array-p +a-c-p alpha-char-p +a-d array-dimension array-dimensions array-displacement +a-d-l array-dimension-limit +a-e arithmetic-error +a-e-o arithmetic-error-operands arithmetic-error-operation +a-e-t array-element-type +a-h-f-p-p array-has-fill-pointer-p +a-i assoc-if allocate-instance +a-i-b-p array-in-bounds-p +a-i-n assoc-if-not +a-l apropos-list +a-m add-method +a-o-k &allow-other-keys +a-r array-rank +a-r-l array-rank-limit +a-r-m-i array-row-major-index +a-t-s array-total-size +a-t-s-l array-total-size-limit +b-1 boole-1 +b-2 boole-2 +b-a bit-and bit-andc1 bit-andc2 boole-and boole-andc1 boole-andc2 +b-c boole-c1 boole-c2 base-char boole-clr +b-c-p both-case-p +b-e bit-eqv boole-eqv +b-i bit-ior boole-ior +b-i-c built-in-class +b-n bit-nor bit-not bit-nand boole-nor boole-nand +b-o bit-orc1 bit-orc2 boole-orc1 boole-orc2 +b-o-s *break-on-signals* +b-p byte-position +b-s boole-set byte-size base-string broadcast-stream +b-s-s broadcast-stream-streams +b-v bit-vector +b-v-p bit-vector-p +b-x bit-xor boole-xor +c-a copy-alist +c-a-l call-arguments-limit +c-a-m compute-applicable-methods +c-c char-code code-char change-class +c-c-l char-code-limit +c-d char-downcase +c-e cell-error char-equal control-error +c-e-n cell-error-name +c-f compile-file compiled-function +c-f-p compiled-function-p compile-file-pathname *compile-file-pathname* +c-f-t *compile-file-truename* +c-g char-greaterp +c-i char-int count-if clear-input +c-i-n count-if-not +c-l copy-list char-lessp +c-m call-method compiler-macro +c-m-f compiler-macro-function +c-n char-name class-name +c-n-e char-not-equal +c-n-g char-not-greaterp +c-n-l char-not-lessp +c-n-m call-next-method +c-o class-of clear-output +c-p *compile-print* +c-p-d copy-pprint-dispatch +c-r copy-readtable compute-restarts +c-s copy-seq copy-symbol copy-structure compilation-speed concatenated-stream +c-s-s concatenated-stream-streams +c-t copy-tree check-type +c-u char-upcase +c-v *compile-verbose* +d-a-s do-all-symbols +d-b destructuring-bind +d-b-z division-by-zero +d-c digit-char define-condition +d-c-m define-compiler-macro +d-c-p digit-char-p +d-d delete-duplicates +d-e dynamic-extent +d-e-s do-external-symbols +d-f delete-file decode-float double-float deposit-field +d-f-e double-float-epsilon +d-f-n-e double-float-negative-epsilon +d-h *debugger-hook* +d-i delete-if *debug-io* +d-i-n delete-if-not +d-m-c define-method-combination +d-m-m define-modify-macro +d-n directory-namestring +d-o describe-object +d-p delete-package +d-p-d *default-pathname-defaults* +d-s do-symbols +d-s-e define-setf-expander +d-s-m define-symbol-macro +d-u-t decode-universal-time +e-c extended-char +e-d-e ensure-directories-exist +e-g-f ensure-generic-function +e-n enough-namestring +e-o *error-output* +e-o-f end-of-file +e-s echo-stream +e-s-i-s echo-stream-input-stream +e-s-o-s echo-stream-output-stream +e-u-t encode-universal-time +e-w eval-when +f-a file-author +f-a-s find-all-symbols +f-c find-class +f-d float-digits +f-e file-error +f-e-p file-error-pathname +f-i find-if +f-i-n find-if-not +f-k function-keywords +f-l fresh-line file-length +f-l-e function-lambda-expression +f-m find-method +f-n file-namestring +f-o force-output finish-output +f-p fill-pointer find-package file-position float-precision +f-p-i floating-point-inexact +f-p-i-o floating-point-invalid-operation +f-p-o floating-point-overflow +f-p-u floating-point-underflow +f-r float-radix find-restart +f-s float-sign file-stream find-symbol +f-s-l file-string-length +f-w-d file-write-date +g-c *gensym-counter* +g-c-p graphic-char-p +g-d-m-c get-dispatch-macro-character +g-d-t get-decoded-time +g-f generic-function +g-i-r-t get-internal-run-time get-internal-real-time +g-m-c get-macro-character +g-o-s-s get-output-stream-string +g-p get-properties +g-s-e get-setf-expansion +g-u-t get-universal-time +h-b handler-bind +h-c handler-case +h-n host-namestring +h-t hash-table +h-t-c hash-table-count +h-t-p hash-table-p +h-t-r-s hash-table-rehash-size +h-t-r-t hash-table-rehash-threshold +h-t-s hash-table-size +h-t-t hash-table-test +i-d invoke-debugger +i-d-f integer-decode-float +i-e ignore-errors +i-i initialize-instance +i-l integer-length +i-m-e invalid-method-error +i-p in-package +i-r invoke-restart +i-r-i invoke-restart-interactively +i-s-p input-stream-p interactive-stream-p +i-t-u-p-s internal-time-units-per-second +l-a-p list-all-packages +l-c-p lower-case-p +l-f long-float loop-finish +l-f-e long-float-epsilon +l-f-n-e long-float-negative-epsilon +l-i-t lisp-implementation-type +l-i-v lisp-implementation-version +l-l list-length +l-l-k lambda-list-keywords +l-l-p-t load-logical-pathname-translations +l-n-d-f least-negative-double-float +l-n-l-f least-negative-long-float +l-n-n-d-f least-negative-normalized-double-float +l-n-n-l-f least-negative-normalized-long-float +l-n-n-s-f least-negative-normalized-short-float least-negative-normalized-single-float +l-n-s-f least-negative-short-float least-negative-single-float +l-p *load-print* *load-pathname* logical-pathname +l-p-d-f least-positive-double-float +l-p-l lambda-parameters-limit +l-p-l-f least-positive-long-float +l-p-n-d-f least-positive-normalized-double-float +l-p-n-l-f least-positive-normalized-long-float +l-p-n-s-f least-positive-normalized-short-float least-positive-normalized-single-float +l-p-s-f least-positive-short-float least-positive-single-float +l-p-t logical-pathname-translations +l-s-n long-site-name +l-t ldb-test *load-truename* +l-t-v load-time-value +l-v *load-verbose* +m-1 macroexpand-1 +m-a make-array +m-b-s make-broadcast-stream +m-c make-condition method-combination +m-c-e method-combination-error +m-c-s make-concatenated-stream +m-d-m-c make-dispatch-macro-character +m-e-s make-echo-stream +m-f mask-field macro-function +m-h *macroexpand-hook* +m-h-t make-hash-table +m-i map-into member-if make-instance machine-instance +m-i-n member-if-not +m-i-o make-instances-obsolete +m-l make-list +m-l-f make-load-form +m-l-f-s-s make-load-form-saving-slots +m-m make-method +m-n-d-f most-negative-double-float +m-n-f most-negative-fixnum +m-n-l-f most-negative-long-float +m-n-s-f most-negative-short-float most-negative-single-float +m-p make-package make-pathname merge-pathnames +m-p-d-f most-positive-double-float +m-p-f most-positive-fixnum +m-p-l-f most-positive-long-float +m-p-s-f most-positive-short-float most-positive-single-float +m-q method-qualifiers +m-r-s make-random-state +m-s make-string make-symbol make-sequence +m-s-i-s make-string-input-stream +m-s-o-s make-string-output-stream +m-s-s make-synonym-stream +m-t machine-type +m-t-w-s make-two-way-stream +m-v machine-version +m-v-b multiple-value-bind +m-v-c multiple-value-call +m-v-l multiple-value-list multiple-values-limit +m-v-p multiple-value-prog1 +m-v-s multiple-value-setq +m-w muffle-warning +n-a-m no-applicable-method +n-c name-char nstring-capitalize +n-d nset-difference nstring-downcase +n-e-o nset-exclusive-or +n-i nsubst-if nsubstitute-if +n-i-n nsubst-if-not nsubstitute-if-not +n-m-p next-method-p +n-n-m no-next-method +n-u nstring-upcase +n-v nth-value +o-s-p open-stream-p output-stream-p +p-a *print-array* +p-b *print-base* +p-c peek-char *print-case* *print-circle* +p-d pathname-device pprint-dispatch pathname-directory +p-e parse-error package-error program-error *print-escape* +p-e-i-l-e pprint-exit-if-list-exhausted +p-e-p package-error-package +p-f probe-file pprint-fill +p-g *print-gensym* +p-h pathname-host +p-i position-if parse-integer pprint-indent +p-i-n position-if-not +p-l *print-level* *print-lines* pprint-linear *print-length* +p-l-b pprint-logical-block +p-m-p pathname-match-p +p-m-w *print-miser-width* +p-n package-name pathname-name pprint-newline parse-namestring package-nicknames +p-n-r print-not-readable +p-n-r-o print-not-readable-object +p-o print-object +p-p pprint-pop *print-pretty* +p-p-d *print-pprint-dispatch* +p-r *print-radix* *print-readably* +p-r-m *print-right-margin* +p-s-s package-shadowing-symbols +p-t pprint-tab pathname-type pprint-tabular +p-t-s prin1-to-string princ-to-string +p-u-b-l package-used-by-list +p-u-l package-use-list +p-u-o print-unreadable-object +p-v pathname-version +q-i *query-io* +r-b read-byte *read-base* restart-bind +r-c read-char restart-case readtable-case +r-c-n-h read-char-no-hang +r-d remove-duplicates +r-d-f-f *read-default-float-format* +r-d-l read-delimited-list +r-e *read-eval* reader-error +r-f rename-file return-from +r-f-s read-from-string +r-i rassoc-if remove-if reinitialize-instance +r-i-n rassoc-if-not remove-if-not +r-l read-line +r-m remove-method +r-m-a row-major-aref +r-n restart-name +r-p rename-package +r-p-w read-preserving-whitespace +r-s random-state read-sequence *random-state* *read-suppress* +r-s-p random-state-p +s-a simple-array +s-b signed-byte slot-boundp +s-b-s simple-base-string +s-b-v simple-bit-vector +s-b-v-p simple-bit-vector-p +s-c standard-char standard-class structure-class simple-condition serious-condition storage-condition string-capitalize +s-c-f-a simple-condition-format-arguments +s-c-f-c simple-condition-format-control +s-c-p standard-char-p +s-d set-difference string-downcase +s-d-m-c set-dispatch-macro-character +s-e simple-error stream-error string-equal +s-e-f stream-external-format +s-e-o set-exclusive-or +s-e-p slot-exists-p +s-e-s stream-error-stream +s-e-t stream-element-type +s-f scale-float short-float single-float symbol-function +s-f-e short-float-epsilon single-float-epsilon +s-f-n-e short-float-negative-epsilon single-float-negative-epsilon +s-g string-greaterp +s-g-f standard-generic-function +s-i subst-if substitute-if *standard-input* shadowing-import shared-initialize +s-i-n subst-if-not substitute-if-not +s-l string-lessp +s-l-t string-left-trim +s-m slot-missing slot-makunbound standard-method symbol-macrolet +s-m-c set-macro-character +s-n symbol-name +s-n-e string-not-equal +s-n-g string-not-greaterp +s-n-l string-not-lessp +s-o standard-object structure-object *standard-output* +s-o-p special-operator-p +s-p symbol-plist symbol-package +s-p-d set-pprint-dispatch +s-r-t string-right-trim +s-s stable-sort simple-string string-stream synonym-stream +s-s-f-c set-syntax-from-char +s-s-n short-site-name +s-s-p simple-string-p +s-s-s synonym-stream-symbol +s-t string-trim software-type +s-t-e simple-type-error +s-u slot-unbound string-upcase +s-v slot-value store-value symbol-value simple-vector software-version +s-v-p simple-vector-p +s-w style-warning simple-warning +t-e tree-equal type-error +t-e-d type-error-datum +t-e-e-t type-error-expected-type +t-i *terminal-io* +t-l-p translate-logical-pathname +t-o type-of *trace-output* +t-p translate-pathname +t-w-s two-way-stream +t-w-s-i-s two-way-stream-input-stream +t-w-s-o-s two-way-stream-output-stream +u-a-e-t upgraded-array-element-type +u-b unsigned-byte +u-c unread-char +u-c-p upper-case-p +u-c-p-t upgraded-complex-part-type +u-f undefined-function +u-h-p user-homedir-pathname +u-i-f-d-c update-instance-for-different-class +u-i-f-r-c update-instance-for-redefined-class +u-p use-package unuse-package unwind-protect +u-s unbound-slot +u-s-i unbound-slot-instance +u-v use-value unbound-variable +v-l values-list +v-p vector-pop vector-push +v-p-e vector-push-extend +w-a with-accessors +w-b write-byte +w-c write-char +w-c-r with-condition-restarts +w-c-u with-compilation-unit +w-h-t-i with-hash-table-iterator +w-i-f-s with-input-from-string +w-l write-line +w-o-f with-open-file +w-o-s with-open-stream +w-o-t-s with-output-to-string +w-p-i with-package-iterator +w-p-p wild-pathname-p +w-s with-slots write-string write-sequence +w-s-i-s with-standard-io-syntax +w-s-r with-simple-restart +w-t-s write-to-string +y-o-n-p y-or-n-p yes-or-no-p diff --git a/dot_vim/gvimrc b/dot_vim/gvimrc new file mode 100644 index 0000000..35d703f --- /dev/null +++ b/dot_vim/gvimrc @@ -0,0 +1,5 @@ +runtime vimrc + +set gfn=Source\ Code\ Pro\ 9 +set go-=T + diff --git a/dot_vim/indent/cpp.vim b/dot_vim/indent/cpp.vim new file mode 100644 index 0000000..8609692 --- /dev/null +++ b/dot_vim/indent/cpp.vim @@ -0,0 +1,43 @@ +" Vim indent file +" Language: C++ +" Maintainer: Charles Banas +" Last Change: 2010 May 27 +" Version: 1.0.1 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +function! GreyfadeCppIndent() + let l:cline_num = line('.') + let l:pline_num = prevnonblank(l:cline_num - 1) + let l:pline = getline(l:pline_num) + while l:pline =~# '\(^\s*{\s*\|^\s*//\|^\s*/\*\|\*/\s*$\)' + let l:pline_num = prevnonblank(l:pline_num - 1) + let l:pline = getline(l:pline_num) + endwhile + let l:retv = cindent('.') + if l:pline =~# '^\s*template.*' + let l:retv = cindent(l:pline_num) + elseif l:pline =~# '^\s*namespace.*' + let l:retv = 0 + endif + + return l:retv +endfunction + +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal noexpandtab +setlocal textwidth=80 +setlocal nowrap + +setlocal cindent +setlocal cinoptions=l1,g0,t0,i6,+6,(0,w1,W6 + +setlocal indentexpr=GreyfadeCppIndent() + +let b:undo_indent = "setl sw< ts< sts< et< tw< wrap< cin< cino< inde<" + diff --git a/dot_vim/init.vim b/dot_vim/init.vim new file mode 100644 index 0000000..8a14ef1 --- /dev/null +++ b/dot_vim/init.vim @@ -0,0 +1 @@ +runtime vimrc diff --git a/dot_vim/plugged/ale/Dockerfile b/dot_vim/plugged/ale/Dockerfile new file mode 100644 index 0000000..2985ecc --- /dev/null +++ b/dot_vim/plugged/ale/Dockerfile @@ -0,0 +1,27 @@ +FROM testbed/vim:24 + +RUN install_vim -tag v8.0.0027 -build \ + -tag v9.0.0297 -build \ + -tag neovim:v0.2.0 -build \ + -tag neovim:v0.8.0 -build + +ENV PACKAGES="\ + bash \ + git \ + python2 \ + python3 \ + py3-pip \ + grep \ + sed \ +" +RUN apk --update add $PACKAGES && \ + rm -rf /var/cache/apk/* /tmp/* /var/tmp/* + +RUN pip install vim-vint==0.3.21 + +RUN git clone https://github.com/junegunn/vader.vim vader && \ + cd vader && git checkout c6243dd81c98350df4dec608fa972df98fa2a3af + +ARG GIT_VERSION +LABEL Version=${GIT_VERSION} +LABEL Name=denseanalysis/ale diff --git a/dot_vim/plugged/ale/LICENSE b/dot_vim/plugged/ale/LICENSE new file mode 100644 index 0000000..584cc5b --- /dev/null +++ b/dot_vim/plugged/ale/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2016-2023, Dense Analysis +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dot_vim/plugged/ale/README.md b/dot_vim/plugged/ale/README.md new file mode 100644 index 0000000..0236944 --- /dev/null +++ b/dot_vim/plugged/ale/README.md @@ -0,0 +1,963 @@ +# Asynchronous Lint Engine [![GitHub Build Status](https://github.com/dense-analysis/ale/workflows/CI/badge.svg)](https://github.com/dense-analysis/ale/actions?query=event%3Apush+workflow%3ACI+branch%3Amaster++) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/dense-analysis/ale) [![Join the Dense Analysis Discord server](https://img.shields.io/badge/chat-Discord-5865F2)](https://discord.gg/5zFD6pQxDk) + + +![ALE Logo by Mark Grealish - https://www.bhalash.com/](https://user-images.githubusercontent.com/3518142/59195920-2c339500-8b85-11e9-9c22-f6b7f69637b8.jpg) + +ALE (Asynchronous Lint Engine) is a plugin providing linting (syntax checking +and semantic errors) in NeoVim 0.2.0+ and Vim 8 while you edit your text files, +and acts as a Vim [Language Server Protocol](https://langserver.org/) client. + + + +ALE makes use of NeoVim and Vim 8 job control functions and timers to +run linters on the contents of text buffers and return errors as +text is changed in Vim. This allows for displaying warnings and +errors in files being edited in Vim before files have been saved +back to a filesystem. + +In other words, this plugin allows you to lint while you type. + +ALE offers support for fixing code with command line tools in a non-blocking +manner with the `:ALEFix` feature, supporting tools in many languages, like +`prettier`, `eslint`, `autopep8`, and more. + +ALE acts as a "language client" to support a variety of Language Server Protocol +features, including: + +* Diagnostics (via Language Server Protocol linters) +* Go To Definition (`:ALEGoToDefinition`) +* Completion (Built in completion support, or with Deoplete) +* Finding references (`:ALEFindReferences`) +* Hover information (`:ALEHover`) +* Symbol search (`:ALESymbolSearch`) + +If you don't care about Language Server Protocol, ALE won't load any of the code +for working with it unless needed. One of ALE's general missions is that you +won't pay for the features that you don't use. + +**Help Wanted:** If you would like to help maintain this plugin by managing the +many issues and pull requests that are submitted, please send the author an +email at [dev@w0rp.com](mailto:dev@w0rp.com?subject=Helping%20with%20ALE). + +If you enjoy this plugin, feel free to contribute or check out the author's +other content at [w0rp.com](https://w0rp.com). + +## Table of Contents + +1. [Supported Languages and Tools](#supported-languages) +2. [Usage](#usage) + 1. [Linting](#usage-linting) + 2. [Fixing](#usage-fixing) + 3. [Completion](#usage-completion) + 4. [Go To Definition](#usage-go-to-definition) + 5. [Find References](#usage-find-references) + 6. [Hovering](#usage-hover) + 7. [Symbol Search](#usage-symbol-search) + 8. [Refactoring: Rename, Actions](#usage-refactoring) +3. [Installation](#installation) + 1. [Installation with Vim package management](#standard-installation) + 2. [Installation with Pathogen](#installation-with-pathogen) + 3. [Installation with Vundle](#installation-with-vundle) + 4. [Installation with Vim-Plug](#installation-with-vim-plug) +4. [Contributing](#contributing) +5. [FAQ](#faq) + 1. [How do I disable particular linters?](#faq-disable-linters) + 2. [How can I see what ALE has configured for the current file?](#faq-get-info) + 3. [How can I use ALE and coc.nvim together?](#faq-coc-nvim) + 4. [How can I keep the sign gutter open?](#faq-keep-signs) + 5. [How can I change the signs ALE uses?](#faq-change-signs) + 6. [How can I change or disable the highlights ALE uses?](#faq-change-highlights) + 7. [How can I show errors or warnings in my statusline?](#faq-statusline) + 8. [How can I show errors or warnings in my lightline?](#faq-lightline) + 9. [How can I change the format for echo messages?](#faq-echo-format) + 10. [How can I execute some code when ALE starts or stops linting?](#faq-autocmd) + 11. [How can I navigate between errors quickly?](#faq-navigation) + 12. [How can I run linters only when I save files?](#faq-lint-on-save) + 13. [How can I use the quickfix list instead of the loclist?](#faq-quickfix) + 14. [How can I check JSX files with both stylelint and eslint?](#faq-jsx-stylelint-eslint) + 15. [How can I check Vue files with ESLint?](#faq-vue-eslint) + 16. [Will this plugin eat all of my laptop battery power?](#faq-my-battery-is-sad) + 17. [How can I configure my C or C++ project?](#faq-c-configuration) + 18. [How can I configure ALE differently for different buffers?](#faq-buffer-configuration) + 19. [How can I configure the height of the list in which ALE displays errors?](#faq-list-window-height) + 20. [How can I run linters or fixers via Docker or a VM?](#faq-vm) + 21. [How can I change the borders for floating preview windows?](#faq-window-borders) + 22. [How can I use ALE and vim-lsp together?](#faq-vim-lsp) + + + +## 1. Supported Languages and Tools + +ALE supports a wide variety of languages and tools. See the +[full list](supported-tools.md) in the +[Supported Languages and Tools](supported-tools.md) page. + + + +## 2. Usage + + + +### 2.i Linting + +Once this plugin is installed, while editing your files in supported +languages and tools which have been correctly installed, +this plugin will send the contents of your text buffers to a variety of +programs for checking the syntax and semantics of your programs. By default, +linters will be re-run in the background to check your syntax when you open +new buffers or as you make edits to your files. + +The behavior of linting can be configured with a variety of options, +documented in [the Vim help file](doc/ale.txt). For more information on the +options ALE offers, consult `:help ale-options` for global options and `:help +ale-integration-options` for options specified to particular linters. + + + +### 2.ii Fixing + +ALE can fix files with the `ALEFix` command. Functions need to be configured +either in each buffer with a `b:ale_fixers`, or globally with `g:ale_fixers`. + +The recommended way to configure fixers is to define a List in an ftplugin file. + +```vim +" In ~/.vim/ftplugin/javascript.vim, or somewhere similar. + +" Fix files with prettier, and then ESLint. +let b:ale_fixers = ['prettier', 'eslint'] +" Equivalent to the above. +let b:ale_fixers = {'javascript': ['prettier', 'eslint']} +``` + +You can also configure your fixers from vimrc using `g:ale_fixers`, before or +after ALE has been loaded. + +A `*` in place of the filetype will apply a List of fixers to all files which +do not match some filetype in the Dictionary. + +Note that using a plain List for `g:ale_fixers` is not supported. + +```vim +" In ~/.vim/vimrc, or somewhere similar. +let g:ale_fixers = { +\ '*': ['remove_trailing_lines', 'trim_whitespace'], +\ 'javascript': ['eslint'], +\} +``` + +If you want to automatically fix files when you save them, you need to turn +a setting on in vimrc. + +```vim +" Set this variable to 1 to fix files when you save them. +let g:ale_fix_on_save = 1 +``` + +The `:ALEFixSuggest` command will suggest some supported tools for fixing code. +Both `g:ale_fixers` and `b:ale_fixers` can also accept functions, including +lambda functions, as fixers, for fixing files with custom tools. + +See `:help ale-fix` for complete information on how to fix files with ALE. + + + +### 2.iii Completion + +ALE offers some support for completion via hijacking of omnicompletion while you +type. All of ALE's completion information must come from Language Server +Protocol linters, or from `tsserver` for TypeScript. + +ALE integrates with [Deoplete](https://github.com/Shougo/deoplete.nvim) as a +completion source, named `'ale'`. You can configure Deoplete to only use ALE as +the source of completion information, or mix it with other sources. + +```vim +" Use ALE and also some plugin 'foobar' as completion sources for all code. +call deoplete#custom#option('sources', { +\ '_': ['ale', 'foobar'], +\}) +``` + +ALE also offers its own automatic completion support, which does not require any +other plugins, and can be enabled by changing a setting before ALE is loaded. + +```vim +" Enable completion where available. +" This setting must be set before ALE is loaded. +" +" You should not turn this setting on if you wish to use ALE as a completion +" source for other completion plugins, like Deoplete. +let g:ale_completion_enabled = 1 +``` + +ALE provides an omni-completion function you can use for triggering +completion manually with ``. + +```vim +set omnifunc=ale#completion#OmniFunc +``` + +ALE supports automatic imports from external modules. This behavior is enabled +by default and can be disabled by setting: + +```vim +let g:ale_completion_autoimport = 0 +``` + +Note that disabling auto import can result in missing completion items from some +LSP servers (e.g. eclipselsp). See `:help ale-completion` for more information. + + + +### 2.iv Go To Definition + +ALE supports jumping to the definition of words under your cursor with the +`:ALEGoToDefinition` command using any enabled Language Server Protocol linters +and `tsserver`. + +See `:help ale-go-to-definition` for more information. + + + +### 2.v Find References + +ALE supports finding references for words under your cursor with the +`:ALEFindReferences` command using any enabled Language Server Protocol linters +and `tsserver`. + +See `:help ale-find-references` for more information. + + + +### 2.vi Hovering + +ALE supports "hover" information for printing brief information about symbols at +the cursor taken from Language Server Protocol linters and `tsserver` with the +`ALEHover` command. + +Truncated information will be displayed when the cursor rests on a symbol by +default, as long as there are no problems on the same line. + +The information can be displayed in a `balloon` tooltip in Vim or GVim by +hovering your mouse over symbols. Mouse hovering is enabled by default in GVim, +and needs to be configured for Vim 8.1+ in terminals. + +See `:help ale-hover` for more information. + + + +### 2.vii Symbol Search + +ALE supports searching for workspace symbols via Language Server Protocol +linters with the `ALESymbolSearch` command. + +Search queries can be performed to find functions, types, and more which are +similar to a given query string. + +See `:help ale-symbol-search` for more information. + + + +### 2.viii Refactoring: Rename, Actions + +ALE supports renaming symbols in symbols in code such as variables or class +names with the `ALERename` command. + +`ALEFileRename` will rename file and fix import paths (tsserver +only). + +`ALECodeAction` will execute actions on the cursor or applied to a visual +range selection, such as automatically fixing errors. + +See `:help ale-refactor` for more information. + + + +## 3. Installation + +To install this plugin, you should use one of the following methods. +For Windows users, replace usage of the Unix `~/.vim` directory with +`%USERPROFILE%\vimfiles`, or another directory if you have configured +Vim differently. On Windows, your `~/.vimrc` file will be similarly +stored in `%USERPROFILE%\_vimrc`. + + + +### 3.i. Installation with Vim package management + +In Vim 8 and NeoVim, you can install plugins easily without needing to use +any other tools. Simply clone the plugin into your `pack` directory. + +#### Vim 8 on Unix + +```bash +mkdir -p ~/.vim/pack/git-plugins/start +git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/git-plugins/start/ale +``` + +#### NeoVim on Unix + +```bash +mkdir -p ~/.local/share/nvim/site/pack/git-plugins/start +git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.local/share/nvim/site/pack/git-plugins/start/ale +``` + +#### Vim 8 on Windows + +```bash +# Run these commands in the "Git for Windows" Bash terminal +mkdir -p ~/vimfiles/pack/git-plugins/start +git clone --depth 1 https://github.com/dense-analysis/ale.git ~/vimfiles/pack/git-plugins/start/ale +``` + +#### Generating Vim help files + +You can add the following line to your vimrc files to generate documentation +tags automatically, if you don't have something similar already, so you can use +the `:help` command to consult ALE's online documentation: + +```vim +" Put these lines at the very end of your vimrc file. + +" Load all plugins now. +" Plugins need to be added to runtimepath before helptags can be generated. +packloadall +" Load all of the helptags now, after plugins have been loaded. +" All messages and errors will be ignored. +silent! helptags ALL +``` + + + +### 3.ii. Installation with Pathogen + +To install this module with [Pathogen](https://github.com/tpope/vim-pathogen), +you should clone this repository to your bundle directory, and ensure +you have the line `execute pathogen#infect()` in your `~/.vimrc` file. +You can run the following commands in your terminal to do so: + +```bash +cd ~/.vim/bundle +git clone https://github.com/dense-analysis/ale.git +``` + + + +### 3.iii. Installation with Vundle + +You can install this plugin using [Vundle](https://github.com/VundleVim/Vundle.vim) +by adding the GitHub path for this repository to your `~/.vimrc`: + +```vim +Plugin 'dense-analysis/ale' +``` + +Then run the command `:PluginInstall` in Vim. + +See the Vundle documentation for more information. + + + +### 3.iv. Installation with Vim-Plug + +You can install this plugin using [Vim-Plug](https://github.com/junegunn/vim-plug) +by adding the GitHub path for this repository to your `~/.vimrc`: + +```vim +Plug 'dense-analysis/ale' +``` + +Then run the command `:PlugInstall` in Vim. + +See the Vim-Plug documentation for more information. + + + +## 4. Contributing + +If you would like to see support for more languages and tools, please +[create an issue](https://github.com/dense-analysis/ale/issues) +or [create a pull request](https://github.com/dense-analysis/ale/pulls). +If your tool can read from stdin or you have code to suggest which is good, +support can be happily added for it. + +If you are interested in the general direction of the project, check out the +[wiki home page](https://github.com/dense-analysis/ale/wiki). The wiki includes +a Roadmap for the future, and more. + +If you'd liked to discuss ALE and more check out the Dense Analysis Discord +server here: https://discord.gg/5zFD6pQxDk + + + +## 5. FAQ + + + +### 5.i. How do I disable particular linters? + +By default, all available tools for all supported languages will be run. If you +want to only select a subset of the tools, you can define `b:ale_linters` for a +single buffer, or `g:ale_linters` globally. + +The recommended way to configure linters is to define a List in an ftplugin +file. + +```vim +" In ~/.vim/ftplugin/javascript.vim, or somewhere similar. + +" Enable ESLint only for JavaScript. +let b:ale_linters = ['eslint'] + +" Equivalent to the above. +let b:ale_linters = {'javascript': ['eslint']} +``` + +You can also declare which linters you want to run in your vimrc file, before or +after ALE has been loaded. + +```vim +" In ~/.vim/vimrc, or somewhere similar. +let g:ale_linters = { +\ 'javascript': ['eslint'], +\} +``` + +For all languages unspecified in the dictionary, all possible linters will +be run for those languages, just as when the dictionary is not defined. +Running many linters should not typically obstruct editing in Vim, +as they will all be executed in separate processes simultaneously. + +If you don't want ALE to run anything other than what you've explicitly asked +for, you can set `g:ale_linters_explicit` to `1`. + +```vim +" Only run linters named in ale_linters settings. +let g:ale_linters_explicit = 1 +``` + +This plugin will look for linters in the [`ale_linters`](ale_linters) directory. +Each directory within corresponds to a particular filetype in Vim, and each file +in each directory corresponds to the name of a particular linter. + + + +### 5.ii. How can I see what ALE has configured for the current file? + +Run the following to see what is currently configured: + +```vim +:ALEInfo +``` + + + +### 5.iii. How can I use ALE and coc.nvim together? + +[coc.nvim](https://github.com/neoclide/coc.nvim) is a popular Vim plugin written +in TypeScript and dependent on the [npm](https://www.npmjs.com/) ecosystem for +providing full IDE features to Vim. Both ALE and coc.nvim implement +[Language Server Protocol](https://microsoft.github.io/language-server-protocol/) +(LSP) clients for supporting diagnostics (linting with a live server), and other +features like auto-completion, and others listed above. + +ALE is primarily focused on integrating with external programs through virtually +any means, provided the plugin remains almost entirely written in Vim script. +coc.nvim is primarily focused on bringing IDE features to Vim. If you want to +run external programs on your files to check for errors, and also use the most +advanced IDE features, you might want to use both plugins at the same time. + +The easiest way to get both plugins to work together is to configure coc.nvim to +send diagnostics to ALE, so ALE controls how all problems are presented to you, +and to disable all LSP features in ALE, so ALE doesn't try to provide LSP +features already provided by coc.nvim, such as auto-completion. + +1. Open your coc.nvim configuration file with `:CocConfig` and add + `"diagnostic.displayByAle": true` to your settings. +2. Add `let g:ale_disable_lsp = 1` to your vimrc file, before plugins are + loaded. + +You can also use `b:ale_disable_lsp` in your ftplugin files to enable or disable +LSP features in ALE for different filetypes. After you configure coc.nvim and +ALE this way, you can further configure how problems appear to you by using all +of the settings mentioned in ALE's help file, including how often diagnostics +are requested. See `:help ale-lint`. + +The integration between ALE and coc.nvim works using an API ALE offers for +letting any other plugin integrate with ALE. If you are interested in writing a +similar integration, see `:help ale-lint-other-sources`. + + + +### 5.iv. How can I keep the sign gutter open? + +You can keep the sign gutter open at all times by setting the +`g:ale_sign_column_always` to 1 + +```vim +let g:ale_sign_column_always = 1 +``` + + + +### 5.v. How can I change the signs ALE uses? + +Use these options to specify what text should be used for signs: + +```vim +let g:ale_sign_error = '>>' +let g:ale_sign_warning = '--' +``` + +ALE sets some background colors automatically for warnings and errors +in the sign gutter, with the names `ALEErrorSign` and `ALEWarningSign`. +These colors can be customised, or even removed completely: + +```vim +highlight clear ALEErrorSign +highlight clear ALEWarningSign +``` + + + +### 5.vi. How can I change or disable the highlights ALE uses? + +ALE's highlights problems with highlight groups which link to `SpellBad`, +`SpellCap`, `error`, and `todo` groups by default. The characters that are +highlighted depend on the linters being used, and the information provided to +ALE. + +Highlighting can be disabled completely by setting `g:ale_set_highlights` to +`0`. + +```vim +" Set this in your vimrc file to disabling highlighting +let g:ale_set_highlights = 0 +``` + +You can control all of the highlights ALE uses, say if you are using a different +color scheme which produces ugly highlights. For example: + +```vim +highlight ALEWarning ctermbg=DarkMagenta +``` + +See `:help ale-highlights` for more information. + + + +### 5.vii. How can I show errors or warnings in my statusline? + +[vim-airline](https://github.com/vim-airline/vim-airline) integrates with ALE +for displaying error information in the status bar. If you want to see the +status for ALE in a nice format, it is recommended to use vim-airline with ALE. +The airline extension can be enabled by adding the following to your vimrc: + +```vim +" Set this. Airline will handle the rest. +let g:airline#extensions#ale#enabled = 1 +``` + +If you don't want to use vim-airline, you can implement your own statusline +function without adding any other plugins. ALE provides some functions to +assist in this endeavour, including: + +* `ale#statusline#Count`: Which returns the number of problems found by ALE + for a specified buffer. +* `ale#statusline#FirstProblem`: Which returns a dictionary containing the + full loclist details of the first problem of a specified type found by ALE + in a buffer. (e.g. The first style warning in the current buffer.) + This can be useful for displaying more detailed information such as the + line number of the first problem in a file. + +Say you want to display all errors as one figure, and all non-errors as another +figure. You can do the following: + +```vim +function! LinterStatus() abort + let l:counts = ale#statusline#Count(bufnr('')) + + let l:all_errors = l:counts.error + l:counts.style_error + let l:all_non_errors = l:counts.total - l:all_errors + + return l:counts.total == 0 ? 'OK' : printf( + \ '%dW %dE', + \ all_non_errors, + \ all_errors + \) +endfunction + +set statusline=%{LinterStatus()} +``` + +See `:help ale#statusline#Count()` or `:help ale#statusline#FirstProblem()` +for more information. + + + +### 5.viii. How can I show errors or warnings in my lightline? + +[lightline](https://github.com/itchyny/lightline.vim) does not have built-in +support for ALE, nevertheless there is a plugin that adds this functionality: [maximbaz/lightline-ale](https://github.com/maximbaz/lightline-ale). + +For more information, check out the sources of that plugin, `:help ale#statusline#Count()` and [lightline documentation](https://github.com/itchyny/lightline.vim#advanced-configuration). + + + +### 5.ix. How can I change the format for echo messages? + +There are 3 global options that allow customizing the echoed message. + +- `g:ale_echo_msg_format` where: + * `%s` is the error message itself + * `%...code...%` is an optional error code, and most characters can be + written between the `%` characters. + * `%linter%` is the linter name + * `%severity%` is the severity type +- `g:ale_echo_msg_error_str` is the string used for error severity. +- `g:ale_echo_msg_warning_str` is the string used for warning severity. + +So for example this: + +```vim +let g:ale_echo_msg_error_str = 'E' +let g:ale_echo_msg_warning_str = 'W' +let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' +``` + +Will give you: + +![Echoed message](https://user-images.githubusercontent.com/3518142/59195927-348bd000-8b85-11e9-88b6-508a094f1548.png) + +See `:help g:ale_echo_msg_format` for more information. + + + +### 5.x. How can I execute some code when ALE starts or stops linting? + +ALE runs its own [autocmd](http://vimdoc.sourceforge.net/htmldoc/autocmd.html) +events when a lint or fix cycle are started and stopped. There is also an event +that runs when a linter job has been successfully started. These events can be +used to call arbitrary functions during these respective parts of the ALE's +operation. + +```vim +augroup YourGroup + autocmd! + autocmd User ALELintPre call YourFunction() + autocmd User ALELintPost call YourFunction() + + autocmd User ALEJobStarted call YourFunction() + + autocmd User ALEFixPre call YourFunction() + autocmd User ALEFixPost call YourFunction() +augroup END +``` + + + +### 5.xi. How can I navigate between errors quickly? + +ALE offers some commands with `` keybinds for moving between warnings and +errors quickly. You can map the keys Ctrl+j and Ctrl+k to moving between errors +for example: + +```vim +nmap (ale_previous_wrap) +nmap (ale_next_wrap) +``` + +For more information, consult the online documentation with +`:help ale-navigation-commands`. + + + +### 5.xii. How can I run linters only when I save files? + +ALE offers an option `g:ale_lint_on_save` for enabling running the linters +when files are saved. This option is enabled by default. If you only +wish to run linters when files are saved, you can turn the other +options off. + +```vim +" Write this in your vimrc file +let g:ale_lint_on_text_changed = 'never' +let g:ale_lint_on_insert_leave = 0 +" You can disable this option too +" if you don't want linters to run on opening a file +let g:ale_lint_on_enter = 0 +``` + +If for whatever reason you don't wish to run linters again when you save +files, you can set `g:ale_lint_on_save` to `0`. + + + +### 5.xiii. How can I use the quickfix list instead of the loclist? + +The quickfix list can be enabled by turning the `g:ale_set_quickfix` +option on. If you wish to also disable the loclist, you can disable +the `g:ale_set_loclist` option. + +```vim +" Write this in your vimrc file +let g:ale_set_loclist = 0 +let g:ale_set_quickfix = 1 +``` + +If you wish to show Vim windows for the loclist or quickfix items +when a file contains warnings or errors, `g:ale_open_list` can be +set to `1`. `g:ale_keep_list_window_open` can be set to `1` +if you wish to keep the window open even after errors disappear. + +```vim +let g:ale_open_list = 1 +" Set this if you want to. +" This can be useful if you are combining ALE with +" some other plugin which sets quickfix errors, etc. +let g:ale_keep_list_window_open = 1 +``` + +You can also set `let g:ale_list_vertical = 1` to open the windows vertically +instead of the default horizontally. + + + +### 5.xiv. How can I check JSX files with both stylelint and eslint? + +If you configure ALE options correctly in your vimrc file, and install +the right tools, you can check JSX files with stylelint and eslint. + +First, install eslint and install stylelint with +[stylelint-processor-styled-components](https://github.com/styled-components/stylelint-processor-styled-components). + +Supposing you have installed both tools correctly, configure your .jsx files so +`jsx` is included in the filetype. You can use an `autocmd` for this. + +```vim +augroup FiletypeGroup + autocmd! + au BufNewFile,BufRead *.jsx set filetype=javascript.jsx +augroup END +``` + +Supposing the filetype has been set correctly, you can set the following +options in a jsx.vim ftplugin file. + +```vim +" In ~/.vim/ftplugin/jsx.vim, or somewhere similar. +let b:ale_linter_aliases = ['css', 'javascript'] +let b:ale_linters = ['stylelint', 'eslint'] +``` + +Or if you want, you can configure the linters from your vimrc file. + +```vim +" In ~/.vim/vimrc, or somewhere similar. +let g:ale_linter_aliases = {'jsx': ['css', 'javascript']} +let g:ale_linters = {'jsx': ['stylelint', 'eslint']} +``` + +ALE will alias the `jsx` filetype so it uses the `css` filetype linters, and +use the original Array of selected linters for `jsx` from the `g:ale_linters` +object. All available linters will be used for the filetype `javascript`, and +no linter will be run twice for the same file. + + + +### 5.xv. How can I check Vue files with ESLint? + +To check Vue files with ESLint, your ESLint project configuration file must be +configured to use the [Vue plugin](https://github.com/vuejs/eslint-plugin-vue). +After that, you need to configure ALE so it will run the JavaScript ESLint +linter on your files. The settings you need are similar to the settings needed +for checking JSX code with both stylelint and ESLint, in the previous section. + +```vim +" In ~/.vim/ftplugin/vue.vim, or somewhere similar. + +" Run both javascript and vue linters for vue files. +let b:ale_linter_aliases = ['javascript', 'vue'] +" Select the eslint and vls linters. +let b:ale_linters = ['eslint', 'vls'] +``` + +Run `:ALEInfo` to see which linters are available after telling ALE to run +JavaScript linters on Vue files. Not all linters support checking Vue files. + +If you don't want to configure your linters in ftplugin files for some reason, +you can configure them from your vimrc file instead. + +```vim +" In ~/.vim/vimrc, or somewhere similar. +let g:ale_linter_aliases = {'vue': ['vue', 'javascript']} +let g:ale_linters = {'vue': ['eslint', 'vls']} +``` + + + +### 5.xvi. Will this plugin eat all of my laptop battery power? + +ALE takes advantage of the power of various tools to check your code. This of +course means that CPU time will be used to continuously check your code. If you +are concerned about the CPU time ALE will spend, which will of course imply +some cost to battery life, you can adjust your settings to make your CPU do +less work. + +First, consider increasing the delay before which ALE will run any linters +while you type. ALE uses a timeout which is cancelled and reset every time you +type, and this delay can be increased so linters are run less often. See +`:help g:ale_lint_delay` for more information. + +If you don't wish to run linters while you type, you can disable that behavior. +Set `g:ale_lint_on_text_changed` to `never`. You won't get as frequent error +checking, but ALE shouldn't block your ability to edit a document after you save +a file, so the asynchronous nature of the plugin will still be an advantage. + +If you are still concerned, you can turn the automatic linting off altogether, +including the option `g:ale_lint_on_enter`, and you can run ALE manually with +`:ALELint`. + + + +### 5.xvii. How can I configure my C or C++ project? + +The structure of C and C++ projects varies wildly from project to project, with +many different build tools being used for building them, and many different +formats for project configuration files. ALE can run compilers easily, but +ALE cannot easily detect which compiler flags to use. + +Some tools and build configurations can generate +[compile_commands.json](https://clang.llvm.org/docs/JSONCompilationDatabase.html) +files. The `cppcheck`, `clangcheck`, `clangtidy` and `cquery` linters can read +these files for automatically determining the appropriate compiler flags to +use. + +For linting with compilers like `gcc` and `clang`, and with other tools, you +will need to tell ALE which compiler flags to use yourself. You can use +different options for different projects with the `g:ale_pattern_options` +setting. Consult the documentation for that setting for more information. +`b:ale_linters` can be used to select which tools you want to run, say if you +want to use only `gcc` for one project, and only `clang` for another. + +ALE will attempt to parse `compile_commands.json` files to discover compiler +flags to use when linting code. See `:help g:ale_c_parse_compile_commands` for +more information. See Clang's documentation for +[compile_commands.json files](https://clang.llvm.org/docs/JSONCompilationDatabase.html). +You should strongly consider generating them in your builds, which is easy to do +with CMake. + +You can also configure ALE to automatically run `make -n` to run dry runs on +`Makefile`s to discover compiler flags. This can execute arbitrary code, so the +option is disabled by default. See `:help g:ale_c_parse_makefile`. + +You may also configure buffer-local settings for linters with project-specific +vimrc files. [local_vimrc](https://github.com/LucHermitte/local_vimrc) can be +used for executing local vimrc files which can be shared in your project. + + + +### 5.xviii. How can I configure ALE differently for different buffers? + +ALE offers various ways to configure which linters or fixers are run, and +other settings. For the majority of ALE's settings, they can either be +configured globally with a `g:` variable prefix, or for a specific buffer +with a `b:` variable prefix. For example, you can configure a Python ftplugin +file like so. + +```vim +" In ~/.vim/ftplugin/python.vim + +" Check Python files with flake8 and pylint. +let b:ale_linters = ['flake8', 'pylint'] +" Fix Python files with autopep8 and yapf. +let b:ale_fixers = ['autopep8', 'yapf'] +" Disable warnings about trailing whitespace for Python files. +let b:ale_warn_about_trailing_whitespace = 0 +``` + +For configuring files based on regular expression patterns matched against the +absolute path to a file, you can use `g:ale_pattern_options`. + +```vim +" Do not lint or fix minified files. +let g:ale_pattern_options = { +\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []}, +\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []}, +\} +" If you configure g:ale_pattern_options outside of vimrc, you need this. +let g:ale_pattern_options_enabled = 1 +``` + +Buffer-local variables for settings always override the global settings. + + + +### 5.xix. How can I configure the height of the list in which ALE displays errors? + +To set a default height for the error list, use the `g:ale_list_window_size` variable. + +```vim +" Show 5 lines of errors (default: 10) +let g:ale_list_window_size = 5 +``` + + + +### 5.xx. How can I run linters or fixers via Docker or a VM? + +ALE supports running linters or fixers via Docker, virtual machines, or in +combination with any remote machine with a different file system, so long as the +tools are well-integrated with ALE, and ALE is properly configured to run the +correct commands and map filename paths between different file systems. See +`:help ale-lint-other-machines` for the full documentation on how to configure +ALE to support this. + + + +### 5.xxi. How can I change the borders for floating preview windows? + +Borders for floating preview windows are enabled by default. You can use the +`g:ale_floating_window_border` setting to configure them. + +You could disable the border with an empty list. + +```vim +let g:ale_floating_window_border = [] +``` + +If the terminal supports Unicode, you might try setting the value like below, to +make it look nicer. + +```vim +let g:ale_floating_window_border = ['│', '─', 'â•­', 'â•®', '╯', 'â•°', '│', '─'] +``` + +Since vim's default uses nice unicode characters when possible, you can trick +ale into using that default with + +```vim +let g:ale_floating_window_border = repeat([''], 8) +``` + + + +### 5.xxii. How can I use ALE and vim-lsp together? + +[vim-lsp](https://github.com/prabirshrestha/vim-lsp) is a popular plugin as +implementation of Language Server Protocol (LSP) client for Vim. It provides +all the LSP features including auto completion, diagnostics, go to definitions, +etc. + +ALE also provides LSP support for diagnostics. When you use both ALE and +vim-lsp, one option is disabling ALE's LSP support by +`let g:ale_disable_lsp = 1`. However ALE provides integration of external +programs. Showing errors from language servers by vim-lsp and showing errors +from other external programs by ALE are confusing and problematic. + +[vim-lsp-ale](https://github.com/rhysd/vim-lsp-ale) is a bridge plugin to solve +the problem when using both ALE and vim-lsp. With the plugin, diagnostics are +provided by vim-lsp and ALE can handle all the errors. Please read +[vim-lsp-ale's documentation](https://github.com/rhysd/vim-lsp-ale/blob/master/doc/vim-lsp-ale.txt) +for more details. diff --git a/dot_vim/plugged/ale/ale_linters/ada/adals.vim b/dot_vim/plugged/ale/ale_linters/ada/adals.vim new file mode 100644 index 0000000..9a41e1d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ada/adals.vim @@ -0,0 +1,26 @@ +" Author: Bartek Jasicki http://github.com/thindil +" Description: Support for Ada Language Server + +call ale#Set('ada_adals_executable', 'ada_language_server') +call ale#Set('ada_adals_project', 'default.gpr') +call ale#Set('ada_adals_encoding', 'utf-8') + +function! ale_linters#ada#adals#GetAdaLSConfig(buffer) abort + return { + \ 'ada.projectFile': ale#Var(a:buffer, 'ada_adals_project'), + \ 'ada.defaultCharset': ale#Var(a:buffer, 'ada_adals_encoding') + \} +endfunction + +function! ale_linters#ada#adals#GetRootDirectory(buffer) abort + return fnamemodify(bufname(a:buffer), ':p:h') +endfunction + +call ale#linter#Define('ada', { +\ 'name': 'adals', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'ada_adals_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#ada#adals#GetRootDirectory'), +\ 'lsp_config': function('ale_linters#ada#adals#GetAdaLSConfig') +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ada/cspell.vim b/dot_vim/plugged/ale/ale_linters/ada/cspell.vim new file mode 100644 index 0000000..7342d2b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ada/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Ada files. + +call ale#handlers#cspell#DefineLinter('ada') diff --git a/dot_vim/plugged/ale/ale_linters/ada/gcc.vim b/dot_vim/plugged/ale/ale_linters/ada/gcc.vim new file mode 100644 index 0000000..5afc9ae --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ada/gcc.vim @@ -0,0 +1,54 @@ +" Author: Martino Pilia +" Description: Lint Ada files with GCC + +call ale#Set('ada_gcc_executable', 'gcc') + +" -gnatwa: activate most optional warnings +" -gnatq: try semantic analysis even if syntax errors have been found +call ale#Set('ada_gcc_options', '-gnatwa -gnatq') + +function! ale_linters#ada#gcc#GetCommand(buffer) abort + " Build a suitable output file name. The output file is specified because + " the .ali file may be created even if no code generation is attempted. + " The output file name must match the source file name (except for the + " extension), so here we cannot use the null file as output. + let l:tmp_dir = fnamemodify(ale#command#CreateDirectory(a:buffer), ':p') + let l:out_file = l:tmp_dir . fnamemodify(bufname(a:buffer), ':t:r') . '.o' + + " -gnatc: Check syntax and semantics only (no code generation attempted) + return '%e -x ada -c -gnatc' + \ . ' -o ' . ale#Escape(l:out_file) + \ . ' -I %s:h' + \ . ale#Pad(ale#Var(a:buffer, 'ada_gcc_options')) + \ . ' %t' +endfunction + +" For the message format please refer to: +" https://gcc.gnu.org/onlinedocs/gnat_ugn/Output-and-Error-Message-Control.html +" https://gcc.gnu.org/onlinedocs/gnat_ugn/Warning-Message-Control.html +function! ale_linters#ada#gcc#Handle(buffer, lines) abort + " Error format: ::: + " Warning format: ::: warning: + let l:re = '\v(.+):([0-9]+):([0-9]+):\s+(warning:)?\s*(.+)\s*' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:re) + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': str2nr(l:match[2]), + \ 'col': str2nr(l:match[3]), + \ 'type': l:match[4] is# 'warning:' ? 'W' : 'E', + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('ada', { +\ 'name': 'gcc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'ada_gcc_executable')}, +\ 'command': function('ale_linters#ada#gcc#GetCommand'), +\ 'callback': 'ale_linters#ada#gcc#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ansible/ansible_language_server.vim b/dot_vim/plugged/ale/ale_linters/ansible/ansible_language_server.vim new file mode 100644 index 0000000..d1f3fb7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ansible/ansible_language_server.vim @@ -0,0 +1,46 @@ +" Author: Horacio Sanson +" Description: Support ansible language server https://github.com/ansible/ansible-language-server/ + +call ale#Set('ansible_language_server_executable', 'ansible-language-server') +call ale#Set('ansible_language_server_config', {}) + +function! ale_linters#ansible#ansible_language_server#Executable(buffer) abort + return ale#Var(a:buffer, 'ansible_language_server_executable') +endfunction + +function! ale_linters#ansible#ansible_language_server#GetCommand(buffer) abort + let l:executable = ale_linters#ansible#ansible_language_server#Executable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +function! ale_linters#ansible#ansible_language_server#FindProjectRoot(buffer) abort + let l:dir = fnamemodify( + \ ale#path#FindNearestFile(a:buffer, 'ansible.cfg'), + \ ':h' + \) + + if l:dir isnot# '.' && isdirectory(l:dir) + return l:dir + endif + + let l:dir = fnamemodify( + \ ale#path#FindNearestDirectory(a:buffer, '.git'), + \ ':h:h' + \) + + if l:dir isnot# '.' && isdirectory(l:dir) + return l:dir + endif + + return '' +endfunction + +call ale#linter#Define('ansible', { +\ 'name': 'ansible-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#ansible#ansible_language_server#Executable'), +\ 'command': function('ale_linters#ansible#ansible_language_server#GetCommand'), +\ 'project_root': function('ale_linters#ansible#ansible_language_server#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'ansible_language_server_config')} +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ansible/ansible_lint.vim b/dot_vim/plugged/ale/ale_linters/ansible/ansible_lint.vim new file mode 100644 index 0000000..bdfbee3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ansible/ansible_lint.vim @@ -0,0 +1,128 @@ +" Authors: Bjorn Neergaard , Vytautas Macionis +" Description: ansible-lint for ansible-yaml files + +call ale#Set('ansible_ansible_lint_executable', 'ansible-lint') + +function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'ansible_ansible_lint_executable') +endfunction + +function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort + for l:line in a:lines[:10] + if match(l:line, '^Traceback') >= 0 + return [{ + \ 'lnum': 1, + \ 'text': 'An exception was thrown. See :ALEDetail', + \ 'detail': join(a:lines, "\n"), + \}] + endif + endfor + + let l:version_group = ale#semver#GTE(a:version, [6, 0, 0]) ? '>=6.0.0' : + \ ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' : + \ '<5.0.0' + let l:output = [] + + if '>=6.0.0' is# l:version_group + let l:error_codes = { 'blocker': 'E', 'critical': 'E', 'major': 'W', 'minor': 'W', 'info': 'I' } + let l:linter_issues = ale#util#FuzzyJSONDecode(a:lines, []) + + for l:issue in l:linter_issues + if ale#path#IsBufferPath(a:buffer, l:issue.location.path) + call add(l:output, { + \ 'lnum': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.line : + \ l:issue.location.lines.begin, + \ 'col': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.column : 0, + \ 'text': l:issue.check_name, + \ 'detail': l:issue.description, + \ 'code': l:issue.severity, + \ 'type': l:error_codes[l:issue.severity], + \}) + endif + endfor + endif + + if '>=5.0.0' is# l:version_group + " Matches patterns line the following: + " test.yml:3:148: syntax-check 'var' is not a valid attribute for a Play + " roles/test/tasks/test.yml:8: [package-latest] [VERY_LOW] Package installs should not use latest + " D:\test\tasks\test.yml:8: [package-latest] [VERY_LOW] package installs should not use latest + let l:pattern = '\v^(%([a-zA-Z]:)?[^:]+):(\d+):%((\d+):)? %(\[([-[:alnum:]]+)\]) %(\[([_[:alnum:]]+)\]) (.*)$' + let l:error_codes = { 'VERY_HIGH': 'E', 'HIGH': 'E', 'MEDIUM': 'W', 'LOW': 'W', 'VERY_LOW': 'W', 'INFO': 'I' } + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if ale#path#IsBufferPath(a:buffer, l:match[1]) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[6], + \ 'code': l:match[4], + \ 'type': l:error_codes[l:match[5]], + \}) + endif + endfor + endif + + if '<5.0.0' is# l:version_group + " Matches patterns line the following: + " test.yml:35: [EANSIBLE0002] Trailing whitespace + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[4] + + if l:code is# 'EANSIBLE0002' + \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if ale#path#IsBufferPath(a:buffer, l:match[1]) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[5], + \ 'code': l:code, + \ 'type': l:code[:0] is# 'E' ? 'E' : 'W', + \}) + endif + endfor + endif + + return l:output +endfunction + +function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort + let l:commands = { + \ '>=6.0.0': '%e --nocolor -f json -x yaml %s', + \ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s', + \ '<5.0.0': '%e --nocolor -p %t' + \} + let l:command = ale#semver#GTE(a:version, [6, 0]) ? l:commands['>=6.0.0'] : + \ ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : + \ l:commands['<5.0.0'] + + return l:command +endfunction + +call ale#linter#Define('ansible', { +\ 'name': 'ansible_lint', +\ 'aliases': ['ansible', 'ansible-lint'], +\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#ansible#ansible_lint#GetExecutable(buffer), +\ '%e --version', +\ function('ale_linters#ansible#ansible_lint#GetCommand'), +\ )}, +\ 'lint_file': 1, +\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#ansible#ansible_lint#GetExecutable(buffer), +\ '%e --version', +\ {buffer, version -> ale_linters#ansible#ansible_lint#Handle( +\ buffer, +\ l:version, +\ lines)}, +\ )}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/apiblueprint/drafter.vim b/dot_vim/plugged/ale/ale_linters/apiblueprint/drafter.vim new file mode 100644 index 0000000..5d40c53 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/apiblueprint/drafter.vim @@ -0,0 +1,38 @@ +" Author: nametake https://nametake.github.io +" Description: apiblueprint parser + +function! ale_linters#apiblueprint#drafter#HandleErrors(buffer, lines) abort + " Matches patterns line the following: + " + " warning: (3) unable to parse response signature, expected 'response [] [()]'; line 4, column 3k - line 4, column 22 + " warning: (10) message-body asset is expected to be a pre-formatted code block, separate it by a newline and indent every of its line by 12 spaces or 3 tabs; line 30, column 5 - line 30, column 9; line 31, column 9 - line 31, column 14; line 32, column 9 - line 32, column 14 + let l:pattern = '\(^.*\): (\d\+) \(.\{-\}\); line \(\d\+\), column \(\d\+\) - line \d\+, column \d\+\(.*; line \d\+, column \d\+ - line \(\d\+\), column \(\d\+\)\)\{-\}$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines[2:], l:pattern) + let l:item = { + \ 'type': l:match[1] is# 'warning' ? 'W' : 'E', + \ 'text': l:match[2], + \ 'lnum': l:match[3] + 0, + \ 'col': l:match[4] + 0, + \} + + if l:match[5] isnot# '' + let l:item.end_lnum = l:match[6] + 0 + let l:item.end_col = l:match[7] + 0 + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + + +call ale#linter#Define('apiblueprint', { +\ 'name': 'drafter', +\ 'output_stream': 'stderr', +\ 'executable': 'drafter', +\ 'command': 'drafter --use-line-num --validate', +\ 'callback': 'ale_linters#apiblueprint#drafter#HandleErrors', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/apkbuild/apkbuild_lint.vim b/dot_vim/plugged/ale/ale_linters/apkbuild/apkbuild_lint.vim new file mode 100644 index 0000000..285f553 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/apkbuild/apkbuild_lint.vim @@ -0,0 +1,12 @@ +" Author: Leo +" Description: apkbuild-lint from atools linter for APKBUILDs + +call ale#Set('apkbuild_apkbuild_lint_executable', 'apkbuild-lint') + +call ale#linter#Define('apkbuild', { +\ 'name': 'apkbuild_lint', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'apkbuild_apkbuild_lint_executable')}, +\ 'command': '%e %t', +\ 'callback': 'ale#handlers#atools#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/apkbuild/secfixes_check.vim b/dot_vim/plugged/ale/ale_linters/apkbuild/secfixes_check.vim new file mode 100644 index 0000000..c65267f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/apkbuild/secfixes_check.vim @@ -0,0 +1,12 @@ +" Author: Leo +" Description: secfixes-check from atools linter for APKBUILDs + +call ale#Set('apkbuild_secfixes_check_executable', 'secfixes-check') + +call ale#linter#Define('apkbuild', { +\ 'name': 'secfixes_check', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'apkbuild_secfixes_check_executable')}, +\ 'command': '%e %t', +\ 'callback': 'ale#handlers#atools#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/alex.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/alex.vim new file mode 100644 index 0000000..97976b2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for asciidoc files + +call ale#handlers#alex#DefineLinter('asciidoc', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/cspell.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/cspell.vim new file mode 100644 index 0000000..b228b2e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for ASCIIDoc files. + +call ale#handlers#cspell#DefineLinter('asciidoc') diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/languagetool.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/languagetool.vim new file mode 100644 index 0000000..8e8de7f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/languagetool.vim @@ -0,0 +1,5 @@ +" Author: Horacio Sanson (hsanson [ät] gmail.com) +" Description: languagetool for asciidoc files, copied from markdown. + + +call ale#handlers#languagetool#DefineLinter('asciidoc') diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/proselint.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/proselint.vim new file mode 100644 index 0000000..b636c06 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for AsciiDoc files + +call ale#linter#Define('asciidoc', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/redpen.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/redpen.vim new file mode 100644 index 0000000..819e385 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('asciidoc', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f asciidoc -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/textlint.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/textlint.vim new file mode 100644 index 0000000..308a3a2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/textlint.vim @@ -0,0 +1,9 @@ +" Author: TANIGUCHI Masaya +" Description: textlint for AsciiDoc files + +call ale#linter#Define('asciidoc', { +\ 'name': 'textlint', +\ 'executable': function('ale#handlers#textlint#GetExecutable'), +\ 'command': function('ale#handlers#textlint#GetCommand'), +\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/vale.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/vale.vim new file mode 100644 index 0000000..b3cf454 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/vale.vim @@ -0,0 +1,9 @@ +" Author: Jeff Kreeftmeijer https://github.com/jeffkreeftmeijer +" Description: vale for AsciiDoc files + +call ale#linter#Define('asciidoc', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=line %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/asciidoc/writegood.vim b/dot_vim/plugged/ale/ale_linters/asciidoc/writegood.vim new file mode 100644 index 0000000..a29b7e9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asciidoc/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for AsciiDoc files + +call ale#handlers#writegood#DefineLinter('asciidoc') diff --git a/dot_vim/plugged/ale/ale_linters/asm/gcc.vim b/dot_vim/plugged/ale/ale_linters/asm/gcc.vim new file mode 100644 index 0000000..cda3892 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/asm/gcc.vim @@ -0,0 +1,37 @@ +" Author: Lucas Kolstad +" Description: gcc linter for asm files + +call ale#Set('asm_gcc_executable', 'gcc') +call ale#Set('asm_gcc_options', '-Wall') + +function! ale_linters#asm#gcc#GetCommand(buffer) abort + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -x assembler' + \ . ' -o ' . g:ale#util#nul_file + \ . '-iquote %s:h' + \ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -' +endfunction + +function! ale_linters#asm#gcc#Handle(buffer, lines) abort + let l:pattern = '^.\+:\(\d\+\): \([^:]\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2] =~? 'error' ? 'E' : 'W', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('asm', { +\ 'name': 'gcc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'asm_gcc_executable')}, +\ 'command': function('ale_linters#asm#gcc#GetCommand'), +\ 'callback': 'ale_linters#asm#gcc#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/avra/avra.vim b/dot_vim/plugged/ale/ale_linters/avra/avra.vim new file mode 100644 index 0000000..edf15c0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/avra/avra.vim @@ -0,0 +1,36 @@ +" Author: Utkarsh Verma +" Description: AVRA linter for avra syntax. + +call ale#Set('avra_avra_executable', 'avra') +call ale#Set('avra_avra_options', '') + +function! ale_linters#avra#avra#GetCommand(buffer) abort + return '%e' + \ . ' %t' + \ . ale#Pad(ale#Var(a:buffer, 'avra_avra_options')) + \ . ' -o ' . g:ale#util#nul_file +endfunction + +function! ale_linters#avra#avra#Handle(buffer, lines) abort + " Note that we treat 'fatal' as errors. + let l:pattern = '^\S\+(\(\d\+\))\s\+:\s\+\(\S\+\)\s\+:\s\+\(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2] =~? 'Error' ? 'E' : 'W', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('avra', { +\ 'name': 'avra', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'avra_avra_executable')}, +\ 'command': function('ale_linters#avra#avra#GetCommand'), +\ 'callback': 'ale_linters#avra#avra#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/awk/gawk.vim b/dot_vim/plugged/ale/ale_linters/awk/gawk.vim new file mode 100644 index 0000000..0c3212f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/awk/gawk.vim @@ -0,0 +1,23 @@ +" Author: kmarc +" Description: This file adds support for using GNU awk with scripts. + +call ale#Set('awk_gawk_executable', 'gawk') +call ale#Set('awk_gawk_options', '') + +function! ale_linters#awk#gawk#GetCommand(buffer) abort + " note the --source 'BEGIN ...' is to prevent + " gawk from attempting to execute the body of the script + " it is linting. + return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') + \ . ' --lint' + \ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options')) + \ . ' -f %t /dev/null' +endfunction + +call ale#linter#Define('awk', { +\ 'name': 'gawk', +\ 'executable': {b -> ale#Var(b, 'awk_gawk_executable')}, +\ 'command': function('ale_linters#awk#gawk#GetCommand'), +\ 'callback': 'ale#handlers#gawk#HandleGawkFormat', +\ 'output_stream': 'both' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/bats/shellcheck.vim b/dot_vim/plugged/ale/ale_linters/bats/shellcheck.vim new file mode 100644 index 0000000..5c2a0ea --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/bats/shellcheck.vim @@ -0,0 +1,4 @@ +" Author: Ian2020 +" Description: shellcheck linter for bats scripts. + +call ale#handlers#shellcheck#DefineLinter('bats') diff --git a/dot_vim/plugged/ale/ale_linters/bib/bibclean.vim b/dot_vim/plugged/ale/ale_linters/bib/bibclean.vim new file mode 100644 index 0000000..f1610e0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/bib/bibclean.vim @@ -0,0 +1,80 @@ +" Author: Horacio Sanson - https://github.com/hsanson +" Description: Support for bibclean linter for BibTeX files. + +call ale#Set('bib_bibclean_executable', 'bibclean') + +function! ale_linters#bib#bibclean#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'bib_bibclean_executable') + + return ale#Escape(l:executable) . ' -file-position ' +endfunction + +function! ale_linters#bib#bibclean#get_type(str) abort + if a:str is# '??' + return 'E' + else + return 'W' + endif +endfunction + +function! ale_linters#bib#bibclean#match_msg(line) abort + " Legacy message pattern works for bibclean <= v2.11.4. If empty, try + " the new message pattern for bibtex > v2.11.4 + let l:matches_legacy = matchlist(a:line, '^\(.*\) "stdin", line \(\d\+\): \(.*\)$') + + return ! empty(l:matches_legacy) ? l:matches_legacy + \ : matchlist(a:line, '^\(.*\) stdin:\(\d\+\):\(.*\)$') +endfunction + +function! ale_linters#bib#bibclean#match_entry(line) abort + return matchlist(a:line, 'Entry input byte=.* line=\(.*\) column=\(.*\) output .*$') +endfunction + +function! ale_linters#bib#bibclean#match_value(line) abort + return matchlist(a:line, 'Value input byte=.* line=\(.*\) column=\(.*\) output .*$') +endfunction + +function! ale_linters#bib#bibclean#Handle(buffer, lines) abort + let l:output = [] + + let l:type = 'E' + let l:msg = '' + + for l:line in a:lines + if empty(l:msg) + let l:mlist = ale_linters#bib#bibclean#match_msg(l:line) + + if !empty(l:mlist) + let l:msg = l:mlist[3] + let l:type = ale_linters#bib#bibclean#get_type(l:mlist[1]) + endif + else + if l:type is# 'E' + let l:mlist = ale_linters#bib#bibclean#match_entry(l:line) + else + let l:mlist = ale_linters#bib#bibclean#match_value(l:line) + endif + + if !empty(l:mlist) + call add(l:output, { + \ 'lnum': l:mlist[1], + \ 'col': l:mlist[2], + \ 'text': l:msg, + \ 'type': l:type + \}) + + let l:msg = '' + endif + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('bib', { +\ 'name': 'bibclean', +\ 'executable': {b -> ale#Var(b, 'bib_bibclean_executable')}, +\ 'command': function('ale_linters#bib#bibclean#GetCommand'), +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#bib#bibclean#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/bicep/bicep.vim b/dot_vim/plugged/ale/ale_linters/bicep/bicep.vim new file mode 100644 index 0000000..91cc198 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/bicep/bicep.vim @@ -0,0 +1,64 @@ +" Author: Carl Smedstad +" Description: bicep for bicep files + +let g:ale_bicep_bicep_executable = +\ get(g:, 'ale_bicep_bicep_executable', 'bicep') + +let g:ale_bicep_bicep_options = +\ get(g:, 'ale_bicep_bicep_options', '') + +function! ale_linters#bicep#bicep#Executable(buffer) abort + return ale#Var(a:buffer, 'bicep_bicep_executable') +endfunction + +function! ale_linters#bicep#bicep#Command(buffer) abort + let l:executable = ale_linters#bicep#bicep#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'bicep_bicep_options') + + if has('win32') + let l:nullfile = 'NUL' + else + let l:nullfile = '/dev/null' + endif + + return ale#Escape(l:executable) + \ . ' build --outfile ' + \ . l:nullfile + \ . ' ' + \ . l:options + \ . ' %s' +endfunction + +function! ale_linters#bicep#bicep#Handle(buffer, lines) abort + let l:pattern = '\v^.*\((\d+),(\d+)\)\s:\s([a-zA-Z]*)\s([-a-zA-Z0-9]*):\s(.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if l:match[3] is# 'Error' + let l:type = 'E' + elseif l:match[3] is# 'Warning' + let l:type = 'W' + else + let l:type = 'I' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:type, + \ 'code': l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('bicep', { +\ 'name': 'bicep', +\ 'executable': function('ale_linters#bicep#bicep#Executable'), +\ 'command': function('ale_linters#bicep#bicep#Command'), +\ 'callback': 'ale_linters#bicep#bicep#Handle', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/bitbake/oelint_adv.vim b/dot_vim/plugged/ale/ale_linters/bitbake/oelint_adv.vim new file mode 100644 index 0000000..fb85a9b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/bitbake/oelint_adv.vim @@ -0,0 +1,47 @@ +" Author: offa +" Description: oelint-adv for BitBake files + +call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv') +call ale#Set('bitbake_oelint_adv_options', '') +call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg') + +function! ale_linters#bitbake#oelint_adv#Command(buffer) abort + let l:config_file = ale#path#FindNearestFile(a:buffer, + \ ale#Var(a:buffer, 'bitbake_oelint_adv_config')) + + return ((!empty(l:config_file)) + \ ? 'OELINT_CONFIG=' . ale#Escape(l:config_file) . ' ' + \ : '') + \ . '%e --quiet ' + \ . ale#Pad(ale#Var(a:buffer, 'bitbake_oelint_adv_options')) . '%s' +endfunction + +function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort + let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[2]), + \ 'type': l:match[3] is# 'error' + \ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'), + \ 'text': StripAnsiCodes(l:match[5]), + \ 'code': l:match[4] + \ }) + endfor + + return l:output +endfunction + +function! StripAnsiCodes(line) abort + return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g') +endfunction + +call ale#linter#Define('bitbake', { +\ 'name': 'oelint_adv', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'bitbake_oelint_adv_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#bitbake#oelint_adv#Command'), +\ 'callback': 'ale_linters#bitbake#oelint_adv#Handle', +\ }) diff --git a/dot_vim/plugged/ale/ale_linters/c/cc.vim b/dot_vim/plugged/ale/ale_linters/c/cc.vim new file mode 100644 index 0000000..35125f2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/cc.vim @@ -0,0 +1,67 @@ +" Author: w0rp +" Description: A C compiler linter for C files with gcc/clang, etc. + +call ale#Set('c_cc_executable', '') +call ale#Set('c_cc_options', '-std=c11 -Wall') +call ale#Set('c_cc_use_header_lang_flag', -1) +call ale#Set('c_cc_header_exts', ['h']) + +function! ale_linters#c#cc#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'c_cc_executable') + + " Default to either clang or gcc. + if l:executable is# '' + if ale#engine#IsExecutable(a:buffer, 'clang') + let l:executable = 'clang' + else + let l:executable = 'gcc' + endif + endif + + return l:executable +endfunction + +function! ale_linters#c#cc#GetCommand(buffer, output) abort + let l:cflags = ale#c#GetCFlags(a:buffer, a:output) + let l:ale_flags = ale#Var(a:buffer, 'c_cc_options') + + if l:cflags =~# '-std=' + let l:ale_flags = substitute( + \ l:ale_flags, + \ '-std=\(c\|gnu\)[0-9]\{2\}', + \ '', + \ 'g') + endif + + " Select the correct language flag depending on the executable, options + " and file extension + let l:executable = ale_linters#c#cc#GetExecutable(a:buffer) + let l:use_header_lang_flag = ale#Var(a:buffer, 'c_cc_use_header_lang_flag') + let l:header_exts = ale#Var(a:buffer, 'c_cc_header_exts') + let l:lang_flag = ale#c#GetLanguageFlag( + \ a:buffer, + \ l:executable, + \ l:use_header_lang_flag, + \ l:header_exts, + \ 'c') + + " -iquote with the directory the file is in makes #include work for + " headers in the same directory. + " + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -S -x ' . l:lang_flag + \ . ' -o ' . g:ale#util#nul_file + \ . ' -iquote %s:h' + \ . ale#Pad(l:cflags) + \ . ale#Pad(l:ale_flags) . ' -' +endfunction + +call ale#linter#Define('c', { +\ 'name': 'cc', +\ 'aliases': ['gcc', 'clang'], +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#c#cc#GetExecutable'), +\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#c#cc#GetCommand'))}, +\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/ccls.vim b/dot_vim/plugged/ale/ale_linters/c/ccls.vim new file mode 100644 index 0000000..9f10571 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/ccls.vim @@ -0,0 +1,15 @@ +" Author: Ye Jingchen , Ben Falconer , jtalowell +" Description: A language server for C + +call ale#Set('c_ccls_executable', 'ccls') +call ale#Set('c_ccls_init_options', {}) +call ale#Set('c_build_dir', '') + +call ale#linter#Define('c', { +\ 'name': 'ccls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'c_ccls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), +\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'c_ccls_init_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/clangd.vim b/dot_vim/plugged/ale/ale_linters/c/clangd.vim new file mode 100644 index 0000000..c42d449 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/clangd.vim @@ -0,0 +1,22 @@ +" Author: Andrey Melentyev +" Description: Clangd language server + +call ale#Set('c_clangd_executable', 'clangd') +call ale#Set('c_clangd_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#c#clangd#GetCommand(buffer) abort + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'c_clangd_options')) + \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') +endfunction + +call ale#linter#Define('c', { +\ 'name': 'clangd', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'c_clangd_executable')}, +\ 'command': function('ale_linters#c#clangd#GetCommand'), +\ 'project_root': function('ale#c#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/clangtidy.vim b/dot_vim/plugged/ale/ale_linters/c/clangtidy.vim new file mode 100644 index 0000000..553cc23 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/clangtidy.vim @@ -0,0 +1,52 @@ +" Author: vdeurzen , w0rp , +" gagbo , Andrej Radovic +" Description: clang-tidy linter for c files + +call ale#Set('c_clangtidy_executable', 'clang-tidy') +" Set this option to check the checks clang-tidy will apply. +" The number of checks that can be applied to C files is limited in contrast to +" C++ +" +" Consult the check list in clang-tidy's documentation: +" http://clang.llvm.org/extra/clang-tidy/checks/list.html + +call ale#Set('c_clangtidy_checks', []) +" Set this option to manually set some options for clang-tidy to use as compile +" flags. +" This will disable compile_commands.json detection. +call ale#Set('c_clangtidy_options', '') +" Set this option to manually set options for clang-tidy directly. +call ale#Set('c_clangtidy_extra_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#c#clangtidy#GetCommand(buffer, output) abort + let l:checks = join(ale#Var(a:buffer, 'c_clangtidy_checks'), ',') + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + let l:options = '' + + " Get the extra options if we couldn't find a build directory. + if empty(l:build_dir) + let l:options = ale#Var(a:buffer, 'c_clangtidy_options') + let l:cflags = ale#c#GetCFlags(a:buffer, a:output) + let l:options .= !empty(l:options) ? ale#Pad(l:cflags) : l:cflags + endif + + " Get the options to pass directly to clang-tidy + let l:extra_options = ale#Var(a:buffer, 'c_clangtidy_extra_options') + + return '%e' + \ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '') + \ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '') + \ . ' %s' + \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') + \ . (!empty(l:options) ? ' -- ' . l:options : '') +endfunction + +call ale#linter#Define('c', { +\ 'name': 'clangtidy', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'c_clangtidy_executable')}, +\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#c#clangtidy#GetCommand'))}, +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/cppcheck.vim b/dot_vim/plugged/ale/ale_linters/c/cppcheck.vim new file mode 100644 index 0000000..28c2861 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/cppcheck.vim @@ -0,0 +1,29 @@ +" Author: Bart Libert +" Description: cppcheck linter for c files + +call ale#Set('c_cppcheck_executable', 'cppcheck') +call ale#Set('c_cppcheck_options', '--enable=style') + +function! ale_linters#c#cppcheck#GetCommand(buffer) abort + let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer) + let l:buffer_path_include = empty(l:compile_commands_option) + \ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) + \ : '' + let l:template = ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + + return '%e -q --language=c' + \ . l:template + \ . ale#Pad(l:compile_commands_option) + \ . ale#Pad(ale#Var(a:buffer, 'c_cppcheck_options')) + \ . l:buffer_path_include + \ . ' %t' +endfunction + +call ale#linter#Define('c', { +\ 'name': 'cppcheck', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'c_cppcheck_executable')}, +\ 'cwd': function('ale#handlers#cppcheck#GetCwd'), +\ 'command': function('ale_linters#c#cppcheck#GetCommand'), +\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/cpplint.vim b/dot_vim/plugged/ale/ale_linters/c/cpplint.vim new file mode 100644 index 0000000..4b99794 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/cpplint.vim @@ -0,0 +1,20 @@ +" Author: Justin Huang +" Description: cpplint for c files + +call ale#Set('c_cpplint_executable', 'cpplint') +call ale#Set('c_cpplint_options', '') + +function! ale_linters#c#cpplint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'c_cpplint_options') + + return '%e' . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('c', { +\ 'name': 'cpplint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'c_cpplint_executable')}, +\ 'command': function('ale_linters#c#cpplint#GetCommand'), +\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/cquery.vim b/dot_vim/plugged/ale/ale_linters/c/cquery.vim new file mode 100644 index 0000000..ff0f34a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/cquery.vim @@ -0,0 +1,30 @@ +" Author: Ben Falconer , jtalowell +" Description: A language server for C + +call ale#Set('c_cquery_executable', 'cquery') +call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery')) + +function! ale_linters#c#cquery#GetProjectRoot(buffer) abort + " Try to find cquery configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.cquery') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) +endfunction + +function! ale_linters#c#cquery#GetInitializationOptions(buffer) abort + return {'cacheDirectory': ale#Var(a:buffer, 'c_cquery_cache_directory')} +endfunction + +call ale#linter#Define('c', { +\ 'name': 'cquery', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'c_cquery_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#c#cquery#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#c#cquery#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/c/cspell.vim b/dot_vim/plugged/ale/ale_linters/c/cspell.vim new file mode 100644 index 0000000..5f01654 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C files. + +call ale#handlers#cspell#DefineLinter('c') diff --git a/dot_vim/plugged/ale/ale_linters/c/flawfinder.vim b/dot_vim/plugged/ale/ale_linters/c/flawfinder.vim new file mode 100644 index 0000000..53c3671 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/c/flawfinder.vim @@ -0,0 +1,25 @@ +" Author: Christian Gibbons +" Description: flawfinder linter for c files + +call ale#Set('c_flawfinder_executable', 'flawfinder') +call ale#Set('c_flawfinder_options', '') +call ale#Set('c_flawfinder_minlevel', 1) +call ale#Set('c_flawfinder_error_severity', 6) + +function! ale_linters#c#flawfinder#GetCommand(buffer) abort + " Set the minimum vulnerability level for flawfinder to bother with + let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel') + + return '%e -CDQS' + \ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options')) + \ . l:minlevel + \ . ' %t' +endfunction + +call ale#linter#Define('c', { +\ 'name': 'flawfinder', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'c_flawfinder_executable')}, +\ 'command': function('ale_linters#c#flawfinder#GetCommand'), +\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cairo/starknet.vim b/dot_vim/plugged/ale/ale_linters/cairo/starknet.vim new file mode 100644 index 0000000..990bda6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cairo/starknet.vim @@ -0,0 +1,37 @@ +" Author: 0xHyoga <0xHyoga@gmx.com> +" Description: Report starknet-compile errors in cairo code + +call ale#Set('cairo_starknet_executable', 'starknet-compile') +call ale#Set('cairo_starknet_options', '') + +function! ale_linters#cairo#starknet#Handle(buffer, lines) abort + " Error always on the first line + " e.g ex01.cairo:20:6: Could not find module 'contracts.utils.ex00_base'. Searched in the following paths: + let l:pattern = '\v\.cairo:(\d+):(\d+):+ (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'type': 'E', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +function! ale_linters#cairo#starknet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'cairo_starknet_executable') + + return l:executable . ale#Pad(ale#Var(a:buffer, 'cairo_starknet_options')) . ' %s' +endfunction + +call ale#linter#Define('cairo', { +\ 'name': 'starknet', +\ 'executable': {b -> ale#Var(b, 'cairo_starknet_executable')}, +\ 'command': function('ale_linters#cairo#starknet#GetCommand'), +\ 'callback': 'ale_linters#cairo#starknet#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/chef/cookstyle.vim b/dot_vim/plugged/ale/ale_linters/chef/cookstyle.vim new file mode 100644 index 0000000..50bae2a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/chef/cookstyle.vim @@ -0,0 +1,54 @@ +" Author: Raphael Hoegger - https://github.com/pfuender +" Description: Cookstyle (RuboCop based), a code style analyzer for Ruby files + +call ale#Set('chef_cookstyle_executable', 'cookstyle') +call ale#Set('chef_cookstyle_options', '') + +function! ale_linters#chef#cookstyle#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'chef_cookstyle_options') + + return '%e' . ale#Pad(escape(l:options, '~')) . ' --force-exclusion --format json --stdin ' . ' %s' +endfunction + +function! ale_linters#chef#cookstyle#Handle(buffer, lines) abort + if len(a:lines) == 0 + return [] + endif + + let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], {}) + + if !has_key(l:errors, 'summary') + \|| l:errors['summary']['offense_count'] == 0 + \|| empty(l:errors['files']) + return [] + endif + + let l:output = [] + + for l:error in l:errors['files'][0]['offenses'] + let l:start_col = str2nr(l:error['location']['start_column']) + let l:end_col = str2nr(l:error['location']['last_column']) + + if !l:end_col + let l:end_col = l:start_col + 1 + endif + + call add(l:output, { + \ 'lnum': str2nr(l:error['location']['line']), + \ 'col': l:start_col, + \ 'end_col': l:end_col, + \ 'code': l:error['cop_name'], + \ 'text': l:error['message'], + \ 'type': l:error['severity'] is? 'convention' ? 'W' : 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('chef', { +\ 'name': 'cookstyle', +\ 'executable': {b -> ale#Var(b, 'chef_cookstyle_executable')}, +\ 'command': function('ale_linters#chef#cookstyle#GetCommand'), +\ 'callback': 'ale_linters#chef#cookstyle#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/chef/foodcritic.vim b/dot_vim/plugged/ale/ale_linters/chef/foodcritic.vim new file mode 100644 index 0000000..48beba7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/chef/foodcritic.vim @@ -0,0 +1,41 @@ +" Author: Edward Larkey +" Author: Jose Junior +" Author: w0rp +" Description: This file adds the foodcritic linter for Chef files. + +call ale#Set('chef_foodcritic_executable', 'foodcritic') +call ale#Set('chef_foodcritic_options', '') + +function! ale_linters#chef#foodcritic#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'chef_foodcritic_options') + + return '%e' . ale#Pad(escape(l:options, '~')) . ' %s' +endfunction + +function! ale_linters#chef#foodcritic#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " FC002: Avoid string interpolation where not required: httpd.rb:13 + let l:pattern = '\v([^:]+): (.+): ([a-zA-Z]?:?[^:]+):(\d+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'code': l:match[1], + \ 'text': l:match[2], + \ 'filename': l:match[3], + \ 'lnum': l:match[4] + 0, + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('chef', { +\ 'name': 'foodcritic', +\ 'executable': {b -> ale#Var(b, 'chef_foodcritic_executable')}, +\ 'command': function('ale_linters#chef#foodcritic#GetCommand'), +\ 'callback': 'ale_linters#chef#foodcritic#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/clojure/clj_kondo.vim b/dot_vim/plugged/ale/ale_linters/clojure/clj_kondo.vim new file mode 100644 index 0000000..b470cf0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/clojure/clj_kondo.vim @@ -0,0 +1,47 @@ +" Author: Masashi Iizuka +" Description: linter for clojure using clj-kondo https://github.com/borkdude/clj-kondo + +call ale#Set('clojure_clj_kondo_options', '--cache') + +function! ale_linters#clojure#clj_kondo#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'clojure_clj_kondo_options') + + let l:command = 'clj-kondo' + \ . ale#Pad(l:options) + \ . ' --lint -' + \ . ' --filename %s' + + return l:command +endfunction + +function! ale_linters#clojure#clj_kondo#HandleCljKondoFormat(buffer, lines) abort + " output format + " ::: : + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+)?:(\d+)?:? ((Exception|error|warning): ?(.+))$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:type = 'E' + + if l:match[4] is? 'warning' + let l:type = 'W' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('clojure', { +\ 'name': 'clj-kondo', +\ 'output_stream': 'stdout', +\ 'executable': 'clj-kondo', +\ 'command': function('ale_linters#clojure#clj_kondo#GetCommand'), +\ 'callback': 'ale_linters#clojure#clj_kondo#HandleCljKondoFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/clojure/joker.vim b/dot_vim/plugged/ale/ale_linters/clojure/joker.vim new file mode 100644 index 0000000..1f17cd3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/clojure/joker.vim @@ -0,0 +1,34 @@ +" Author: Nic West +" Description: linter for clojure using joker https://github.com/candid82/joker + +function! ale_linters#clojure#joker#HandleJokerFormat(buffer, lines) abort + " output format + " ::: : + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):? ((Read error|Parse error|Parse warning|Exception): ?(.+))$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:type = 'E' + + if l:match[4] is? 'Parse warning' + let l:type = 'W' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('clojure', { +\ 'name': 'joker', +\ 'output_stream': 'stderr', +\ 'executable': 'joker', +\ 'command': 'joker --working-dir %s --lint %t', +\ 'callback': 'ale_linters#clojure#joker#HandleJokerFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cloudformation/cfn_python_lint.vim b/dot_vim/plugged/ale/ale_linters/cloudformation/cfn_python_lint.vim new file mode 100644 index 0000000..1684143 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cloudformation/cfn_python_lint.vim @@ -0,0 +1,36 @@ +" Author: Yasuhiro Kiyota +" Description: Support cfn-python-lint for AWS Cloudformation template file + +function! ale_linters#cloudformation#cfn_python_lint#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " sample.template.yaml:96:7:96:15:E3012:Property Resources/Sample/Properties/FromPort should be of type Integer + let l:pattern = '\v^(.*):(\d+):(\d+):(\d+):(\d+):([[:alnum:]]+):(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[6] + + if ale#path#IsBufferPath(a:buffer, l:match[1]) + call add(l:output, { + \ 'lnum': l:match[2], + \ 'col': l:match[3], + \ 'end_lnum': l:match[4], + \ 'end_col': l:match[5], + \ 'code': l:code, + \ 'type': l:code[:0] is# 'E' ? 'E' : 'W', + \ 'text': l:match[7] + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('cloudformation', { +\ 'name': 'cloudformation', +\ 'aliases': ['cfn-lint'], +\ 'executable': 'cfn-lint', +\ 'command': 'cfn-lint --template %t --format parseable', +\ 'callback': 'ale_linters#cloudformation#cfn_python_lint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cmake/cmake_lint.vim b/dot_vim/plugged/ale/ale_linters/cmake/cmake_lint.vim new file mode 100644 index 0000000..3c44c92 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cmake/cmake_lint.vim @@ -0,0 +1,43 @@ +" Author: Carl Smedstad +" Description: cmake-lint for cmake files + +let g:ale_cmake_cmake_lint_executable = +\ get(g:, 'ale_cmake_cmake_lint_executable', 'cmake-lint') + +let g:ale_cmake_cmake_lint_options = +\ get(g:, 'ale_cmake_cmake_lint_options', '') + +function! ale_linters#cmake#cmake_lint#Executable(buffer) abort + return ale#Var(a:buffer, 'cmake_cmake_lint_executable') +endfunction + +function! ale_linters#cmake#cmake_lint#Command(buffer) abort + let l:executable = ale_linters#cmake#cmake_lint#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'cmake_cmake_lint_options') + + return ale#Escape(l:executable) . ' ' . l:options . ' %t' +endfunction + +function! ale_linters#cmake#cmake_lint#Handle(buffer, lines) abort + let l:pattern = '\v^[^:]+:(\d+),?(\d+)?:\s\[([A-Z]\d+)\]\s(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': 'W', + \ 'code': l:match[3], + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('cmake', { +\ 'name': 'cmake_lint', +\ 'executable': function('ale_linters#cmake#cmake_lint#Executable'), +\ 'command': function('ale_linters#cmake#cmake_lint#Command'), +\ 'callback': 'ale_linters#cmake#cmake_lint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cmake/cmakelint.vim b/dot_vim/plugged/ale/ale_linters/cmake/cmakelint.vim new file mode 100644 index 0000000..d955a26 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cmake/cmakelint.vim @@ -0,0 +1,24 @@ +" Author: Kenneth Benzie +" Description: cmakelint for cmake files + +let g:ale_cmake_cmakelint_executable = +\ get(g:, 'ale_cmake_cmakelint_executable', 'cmakelint') + +let g:ale_cmake_cmakelint_options = +\ get(g:, 'ale_cmake_cmakelint_options', '') + +function! ale_linters#cmake#cmakelint#Executable(buffer) abort + return ale#Var(a:buffer, 'cmake_cmakelint_executable') +endfunction + +function! ale_linters#cmake#cmakelint#Command(buffer) abort + return ale_linters#cmake#cmakelint#Executable(a:buffer) + \ . ' ' . ale#Var(a:buffer, 'cmake_cmakelint_options') . ' %t' +endfunction + +call ale#linter#Define('cmake', { +\ 'name': 'cmakelint', +\ 'executable': function('ale_linters#cmake#cmakelint#Executable'), +\ 'command': function('ale_linters#cmake#cmakelint#Command'), +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/coffee/coffee.vim b/dot_vim/plugged/ale/ale_linters/coffee/coffee.vim new file mode 100644 index 0000000..8e89163 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/coffee/coffee.vim @@ -0,0 +1,23 @@ +" Author: KabbAmine - https://github.com/KabbAmine +" Description: Coffee for checking coffee files + +function! ale_linters#coffee#coffee#GetExecutable(buffer) abort + return ale#path#ResolveLocalPath( + \ a:buffer, + \ 'node_modules/.bin/coffee', + \ 'coffee' + \) +endfunction + +function! ale_linters#coffee#coffee#GetCommand(buffer) abort + return ale_linters#coffee#coffee#GetExecutable(a:buffer) + \ . ' -cp -s' +endfunction + +call ale#linter#Define('coffee', { +\ 'name': 'coffee', +\ 'executable': function('ale_linters#coffee#coffee#GetExecutable'), +\ 'command': function('ale_linters#coffee#coffee#GetCommand'), +\ 'output_stream': 'stderr', +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/coffee/coffeelint.vim b/dot_vim/plugged/ale/ale_linters/coffee/coffeelint.vim new file mode 100644 index 0000000..b7c85fa --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/coffee/coffeelint.vim @@ -0,0 +1,43 @@ +" Author: Prashanth Chandra https://github.com/prashcr +" Description: coffeelint linter for coffeescript files + +function! ale_linters#coffee#coffeelint#GetExecutable(buffer) abort + return ale#path#ResolveLocalPath( + \ a:buffer, + \ 'node_modules/.bin/coffeelint', + \ 'coffeelint' + \) +endfunction + +function! ale_linters#coffee#coffeelint#GetCommand(buffer) abort + return ale_linters#coffee#coffeelint#GetExecutable(a:buffer) + \ . ' --stdin --reporter csv' +endfunction + +function! ale_linters#coffee#coffeelint#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " path,lineNumber,lineNumberEnd,level,message + " stdin,14,,error,Throwing strings is forbidden + " + " Note that we currently ignore lineNumberEnd for multiline errors + let l:pattern = 'stdin,\(\d\+\),\(\d*\),\(.\{-1,}\),\(.\+\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('coffee', { +\ 'name': 'coffeelint', +\ 'executable': function('ale_linters#coffee#coffeelint#GetExecutable'), +\ 'command': function('ale_linters#coffee#coffeelint#GetCommand'), +\ 'callback': 'ale_linters#coffee#coffeelint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/cc.vim b/dot_vim/plugged/ale/ale_linters/cpp/cc.vim new file mode 100644 index 0000000..1d35bb6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/cc.vim @@ -0,0 +1,67 @@ +" Author: w0rp +" Description: A C++ compiler linter for C++ files with gcc/clang, etc. + +call ale#Set('cpp_cc_executable', '') +call ale#Set('cpp_cc_options', '-std=c++14 -Wall') +call ale#Set('cpp_cc_use_header_lang_flag', -1) +call ale#Set('cpp_cc_header_exts', ['h', 'hpp']) + +function! ale_linters#cpp#cc#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'cpp_cc_executable') + + " Default to either clang++ or gcc. + if l:executable is# '' + if ale#engine#IsExecutable(a:buffer, 'clang++') + let l:executable = 'clang++' + else + let l:executable = 'gcc' + endif + endif + + return l:executable +endfunction + +function! ale_linters#cpp#cc#GetCommand(buffer, output) abort + let l:cflags = ale#c#GetCFlags(a:buffer, a:output) + let l:ale_flags = ale#Var(a:buffer, 'cpp_cc_options') + + if l:cflags =~# '-std=' + let l:ale_flags = substitute( + \ l:ale_flags, + \ '-std=\(c\|gnu\)++[0-9]\{2\}', + \ '', + \ 'g') + endif + + " Select the correct language flag depending on the executable, options + " and file extension + let l:executable = ale_linters#cpp#cc#GetExecutable(a:buffer) + let l:use_header_lang_flag = ale#Var(a:buffer, 'cpp_cc_use_header_lang_flag') + let l:header_exts = ale#Var(a:buffer, 'cpp_cc_header_exts') + let l:lang_flag = ale#c#GetLanguageFlag( + \ a:buffer, + \ l:executable, + \ l:use_header_lang_flag, + \ l:header_exts, + \ 'c++') + + " -iquote with the directory the file is in makes #include work for + " headers in the same directory. + " + " `-o /dev/null` or `-o null` is needed to catch all errors, + " -fsyntax-only doesn't catch everything. + return '%e -S -x ' . l:lang_flag + \ . ' -o ' . g:ale#util#nul_file + \ . ' -iquote %s:h' + \ . ale#Pad(l:cflags) + \ . ale#Pad(l:ale_flags) . ' -' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'cc', +\ 'aliases': ['gcc', 'clang', 'g++', 'clang++'], +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#cpp#cc#GetExecutable'), +\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#cpp#cc#GetCommand'))}, +\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/ccls.vim b/dot_vim/plugged/ale/ale_linters/cpp/ccls.vim new file mode 100644 index 0000000..38f8df9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/ccls.vim @@ -0,0 +1,15 @@ +" Author: Ye Jingchen , Ben Falconer , jtalowell +" Description: A language server for C++ + +call ale#Set('cpp_ccls_executable', 'ccls') +call ale#Set('cpp_ccls_init_options', {}) +call ale#Set('c_build_dir', '') + +call ale#linter#Define('cpp', { +\ 'name': 'ccls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'cpp_ccls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), +\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'cpp_ccls_init_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/clangcheck.vim b/dot_vim/plugged/ale/ale_linters/cpp/clangcheck.vim new file mode 100644 index 0000000..4cb0486 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/clangcheck.vim @@ -0,0 +1,35 @@ +" Author: gagbo +" Description: clang-check linter for cpp files + +call ale#Set('cpp_clangcheck_executable', 'clang-check') +call ale#Set('cpp_clangcheck_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort + let l:user_options = ale#Var(a:buffer, 'cpp_clangcheck_options') + + " Try to find compilation database to link automatically + let l:build_dir = ale#Var(a:buffer, 'c_build_dir') + + if empty(l:build_dir) + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + let l:build_dir = ale#path#Dirname(l:json_file) + endif + + " The extra arguments in the command are used to prevent .plist files from + " being generated. These are only added if no build directory can be + " detected. + return '%e -analyze %s' + \ . (empty(l:build_dir) ? ' --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics': '') + \ . ale#Pad(l:user_options) + \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'clangcheck', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'cpp_clangcheck_executable')}, +\ 'command': function('ale_linters#cpp#clangcheck#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/clangd.vim b/dot_vim/plugged/ale/ale_linters/cpp/clangd.vim new file mode 100644 index 0000000..14f3fe5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/clangd.vim @@ -0,0 +1,22 @@ +" Author: Andrey Melentyev +" Description: Clangd language server + +call ale#Set('cpp_clangd_executable', 'clangd') +call ale#Set('cpp_clangd_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#cpp#clangd#GetCommand(buffer) abort + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options')) + \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'clangd', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'cpp_clangd_executable')}, +\ 'command': function('ale_linters#cpp#clangd#GetCommand'), +\ 'project_root': function('ale#c#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/clangtidy.vim b/dot_vim/plugged/ale/ale_linters/cpp/clangtidy.vim new file mode 100644 index 0000000..fa9f8e3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/clangtidy.vim @@ -0,0 +1,53 @@ +" Author: vdeurzen , w0rp , +" gagbo +" Description: clang-tidy linter for cpp files + +call ale#Set('cpp_clangtidy_executable', 'clang-tidy') +" Set this option to check the checks clang-tidy will apply. +call ale#Set('cpp_clangtidy_checks', []) +" Set this option to manually set some options for clang-tidy to use as compile +" flags. +" This will disable compile_commands.json detection. +call ale#Set('cpp_clangtidy_options', '') +" Set this option to manually set options for clang-tidy directly. +call ale#Set('cpp_clangtidy_extra_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#cpp#clangtidy#GetCommand(buffer, output) abort + let l:checks = join(ale#Var(a:buffer, 'cpp_clangtidy_checks'), ',') + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + let l:options = '' + + " Get the extra options if we couldn't find a build directory. + if empty(l:build_dir) + let l:options = ale#Var(a:buffer, 'cpp_clangtidy_options') + let l:cflags = ale#c#GetCFlags(a:buffer, a:output) + let l:options .= !empty(l:options) ? ale#Pad(l:cflags) : l:cflags + + " Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file + " only when compile-commands.json file is not there. Adding these + " flags makes clang-tidy completely ignore compile commands. + if expand('#' . a:buffer) =~# '\.h$' + let l:options .= !empty(l:options) ? ' -x c++' : '-x c++' + endif + endif + + " Get the options to pass directly to clang-tidy + let l:extra_options = ale#Var(a:buffer, 'cpp_clangtidy_extra_options') + + return '%e' + \ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '') + \ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '') + \ . ' %s' + \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') + \ . (!empty(l:options) ? ' -- ' . l:options : '') +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'clangtidy', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'cpp_clangtidy_executable')}, +\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#cpp#clangtidy#GetCommand'))}, +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/clazy.vim b/dot_vim/plugged/ale/ale_linters/cpp/clazy.vim new file mode 100644 index 0000000..9b29ac9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/clazy.vim @@ -0,0 +1,32 @@ +" Description: clazy linter for cpp files (clang-based and Qt-oriented) + +call ale#Set('cpp_clazy_executable', 'clazy-standalone') +" Set this option to check the checks clazy will apply. +call ale#Set('cpp_clazy_checks', ['level1']) +" Set this option to manually set some options for clazy. +" This will disable compile_commands.json detection. +call ale#Set('cpp_clazy_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#cpp#clazy#GetCommand(buffer) abort + let l:checks = join(ale#Var(a:buffer, 'cpp_clazy_checks'), ',') + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + + " Get the extra options if we couldn't find a build directory. + let l:options = ale#Var(a:buffer, 'cpp_clazy_options') + + return '%e' + \ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '') + \ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %s' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'clazy', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'cpp_clazy_executable')}, +\ 'command': function('ale_linters#cpp#clazy#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/cppcheck.vim b/dot_vim/plugged/ale/ale_linters/cpp/cppcheck.vim new file mode 100644 index 0000000..eb86adf --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/cppcheck.vim @@ -0,0 +1,29 @@ +" Author: Bart Libert +" Description: cppcheck linter for cpp files + +call ale#Set('cpp_cppcheck_executable', 'cppcheck') +call ale#Set('cpp_cppcheck_options', '--enable=style') + +function! ale_linters#cpp#cppcheck#GetCommand(buffer) abort + let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer) + let l:buffer_path_include = empty(l:compile_commands_option) + \ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) + \ : '' + let l:template = ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + + return '%e -q --language=c++' + \ . l:template + \ . ale#Pad(l:compile_commands_option) + \ . ale#Pad(ale#Var(a:buffer, 'cpp_cppcheck_options')) + \ . l:buffer_path_include + \ . ' %t' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'cppcheck', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'cpp_cppcheck_executable')}, +\ 'cwd': function('ale#handlers#cppcheck#GetCwd'), +\ 'command': function('ale_linters#cpp#cppcheck#GetCommand'), +\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/cpplint.vim b/dot_vim/plugged/ale/ale_linters/cpp/cpplint.vim new file mode 100644 index 0000000..f1f6ce7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/cpplint.vim @@ -0,0 +1,20 @@ +" Author: Dawid Kurek https://github.com/dawikur +" Description: cpplint for cpp files + +call ale#Set('cpp_cpplint_executable', 'cpplint') +call ale#Set('cpp_cpplint_options', '') + +function! ale_linters#cpp#cpplint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'cpp_cpplint_options') + + return '%e' . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'cpplint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'cpp_cpplint_executable')}, +\ 'command': function('ale_linters#cpp#cpplint#GetCommand'), +\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/cquery.vim b/dot_vim/plugged/ale/ale_linters/cpp/cquery.vim new file mode 100644 index 0000000..2971cdc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/cquery.vim @@ -0,0 +1,30 @@ +" Author: Ben Falconer +" Description: A language server for C++ + +call ale#Set('cpp_cquery_executable', 'cquery') +call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery')) + +function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort + " Try to find cquery configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.cquery') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) +endfunction + +function! ale_linters#cpp#cquery#GetInitializationOptions(buffer) abort + return {'cacheDirectory': ale#Var(a:buffer, 'cpp_cquery_cache_directory')} +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'cquery', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'cpp_cquery_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#cpp#cquery#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#cpp#cquery#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cpp/cspell.vim b/dot_vim/plugged/ale/ale_linters/cpp/cspell.vim new file mode 100644 index 0000000..ace4c3b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C++ files. + +call ale#handlers#cspell#DefineLinter('cpp') diff --git a/dot_vim/plugged/ale/ale_linters/cpp/flawfinder.vim b/dot_vim/plugged/ale/ale_linters/cpp/flawfinder.vim new file mode 100644 index 0000000..5bfdea2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cpp/flawfinder.vim @@ -0,0 +1,25 @@ +" Author: Christian Gibbons +" Description: flawfinder linter for c++ files + +call ale#Set('cpp_flawfinder_executable', 'flawfinder') +call ale#Set('cpp_flawfinder_options', '') +call ale#Set('cpp_flawfinder_minlevel', 1) +call ale#Set('c_flawfinder_error_severity', 6) + +function! ale_linters#cpp#flawfinder#GetCommand(buffer) abort + " Set the minimum vulnerability level for flawfinder to bother with + let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'cpp_flawfinder_minlevel') + + return '%e -CDQS' + \ . ale#Var(a:buffer, 'cpp_flawfinder_options') + \ . l:minlevel + \ . ' %t' +endfunction + +call ale#linter#Define('cpp', { +\ 'name': 'flawfinder', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'cpp_flawfinder_executable')}, +\ 'command': function('ale_linters#cpp#flawfinder#GetCommand'), +\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/crystal/ameba.vim b/dot_vim/plugged/ale/ale_linters/crystal/ameba.vim new file mode 100644 index 0000000..5dfc7f4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/crystal/ameba.vim @@ -0,0 +1,57 @@ +" Author: Harrison Bachrach - https://github.com/HarrisonB +" Description: Ameba, a linter for crystal files + +call ale#Set('crystal_ameba_executable', 'bin/ameba') + +function! ale_linters#crystal#ameba#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'crystal_ameba_executable') + + return ale#Escape(l:executable) + \ . ' --format json ' + \ . ale#Escape(expand('#' . a:buffer . ':p')) +endfunction + +" Handle output from ameba +function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort + if len(a:lines) == 0 + return [] + endif + + let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], {}) + + if !has_key(l:errors, 'summary') + \|| l:errors['summary']['issues_count'] == 0 + \|| empty(l:errors['sources']) + return [] + endif + + let l:output = [] + + for l:error in l:errors['sources'][0]['issues'] + let l:start_col = str2nr(l:error['location']['column']) + let l:end_col = str2nr(l:error['end_location']['column']) + + if !l:end_col + let l:end_col = l:start_col + 1 + endif + + call add(l:output, { + \ 'lnum': str2nr(l:error['location']['line']), + \ 'col': l:start_col, + \ 'end_col': l:end_col, + \ 'code': l:error['rule_name'], + \ 'text': l:error['message'], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('crystal', { +\ 'name': 'ameba', +\ 'executable': {b -> ale#Var(b, 'crystal_ameba_executable')}, +\ 'command': function('ale_linters#crystal#ameba#GetCommand'), +\ 'callback': 'ale_linters#crystal#ameba#HandleAmebaOutput', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/crystal/crystal.vim b/dot_vim/plugged/ale/ale_linters/crystal/crystal.vim new file mode 100644 index 0000000..8a905b1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/crystal/crystal.vim @@ -0,0 +1,35 @@ +" Author: Jordan Andree , David Alexander +" Description: This file adds support for checking Crystal with crystal build + +function! ale_linters#crystal#crystal#Handle(buffer, lines) abort + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + if !has_key(l:error, 'file') + continue + endif + + call add(l:output, { + \ 'lnum': l:error.line + 0, + \ 'col': l:error.column + 0, + \ 'text': l:error.message, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#crystal#crystal#GetCommand(buffer) abort + return 'crystal build -f json --no-codegen --no-color -o ' + \ . ale#Escape(g:ale#util#nul_file) + \ . ' %s' +endfunction + +call ale#linter#Define('crystal', { +\ 'name': 'crystal', +\ 'executable': 'crystal', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\ 'command': function('ale_linters#crystal#crystal#GetCommand'), +\ 'callback': 'ale_linters#crystal#crystal#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cs/csc.vim b/dot_vim/plugged/ale/ale_linters/cs/csc.vim new file mode 100644 index 0000000..5ee3de2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cs/csc.vim @@ -0,0 +1,90 @@ +call ale#Set('cs_csc_options', '') +call ale#Set('cs_csc_source', '') +call ale#Set('cs_csc_assembly_path', []) +call ale#Set('cs_csc_assemblies', []) + +function! ale_linters#cs#csc#GetCwd(buffer) abort + let l:cwd = ale#Var(a:buffer, 'cs_csc_source') + + return !empty(l:cwd) ? l:cwd : expand('#' . a:buffer . ':p:h') +endfunction + +function! ale_linters#cs#csc#GetCommand(buffer) abort + " Pass assembly paths via the -lib: parameter. + let l:path_list = ale#Var(a:buffer, 'cs_csc_assembly_path') + + let l:lib_option = !empty(l:path_list) + \ ? '/lib:' . join(map(copy(l:path_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " Pass paths to DLL files via the -r: parameter. + let l:assembly_list = ale#Var(a:buffer, 'cs_csc_assemblies') + + let l:r_option = !empty(l:assembly_list) + \ ? '/r:' . join(map(copy(l:assembly_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " register temporary module target file with ale + " register temporary module target file with ALE. + let l:out = ale#command#CreateFile(a:buffer) + + " The code is compiled as a module and the output is redirected to a + " temporary file. + return 'csc /unsafe' + \ . ale#Pad(ale#Var(a:buffer, 'cs_csc_options')) + \ . ale#Pad(l:lib_option) + \ . ale#Pad(l:r_option) + \ . ' /out:' . l:out + \ . ' /t:module' + \ . ' /recurse:' . ale#Escape('*.cs') +endfunction + +function! ale_linters#cs#csc#Handle(buffer, lines) abort + " Look for lines like the following. + " + " Tests.cs(12,29): error CSXXXX: ; expected + " + " NOTE: pattern also captures file name as linter compiles all + " files within the source tree rooted at the specified source + " path and not just the file loaded in the buffer + let l:patterns = [ + \ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$', + \ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$', + \] + let l:output = [] + let l:dir = ale_linters#cs#csc#GetCwd(a:buffer) + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS' + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6] , + \}) + elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS' + call add(l:output, { + \ 'filename':'', + \ 'lnum': -1, + \ 'col': -1, + \ 'type': l:match[1] is# 'error' ? 'E' : 'W', + \ 'code': l:match[2], + \ 'text': l:match[3], + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('cs',{ +\ 'name': 'csc', +\ 'output_stream': 'stdout', +\ 'executable': 'csc', +\ 'cwd': function('ale_linters#cs#csc#GetCwd'), +\ 'command': function('ale_linters#cs#csc#GetCommand'), +\ 'callback': 'ale_linters#cs#csc#Handle', +\ 'lint_file': 1 +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cs/cspell.vim b/dot_vim/plugged/ale/ale_linters/cs/cspell.vim new file mode 100644 index 0000000..c62dd11 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cs/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for C# files. + +call ale#handlers#cspell#DefineLinter('cs') diff --git a/dot_vim/plugged/ale/ale_linters/cs/mcs.vim b/dot_vim/plugged/ale/ale_linters/cs/mcs.vim new file mode 100644 index 0000000..1b373e7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cs/mcs.vim @@ -0,0 +1,37 @@ +let g:ale_cs_mcs_options = get(g:, 'ale_cs_mcs_options', '') + +function! ale_linters#cs#mcs#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'cs_mcs_options') + + return 'mcs -unsafe --parse' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +function! ale_linters#cs#mcs#Handle(buffer, lines) abort + " Look for lines like the following. + " + " Tests.cs(12,29): error CSXXXX: ; expected + let l:pattern = '^\v(.+\.cs)\((\d+),(\d+)\)\: ([^ ]+) ([^ ]+): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('cs',{ +\ 'name': 'mcs', +\ 'output_stream': 'stderr', +\ 'executable': 'mcs', +\ 'command': function('ale_linters#cs#mcs#GetCommand'), +\ 'callback': 'ale_linters#cs#mcs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cs/mcsc.vim b/dot_vim/plugged/ale/ale_linters/cs/mcsc.vim new file mode 100644 index 0000000..2dd4666 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cs/mcsc.vim @@ -0,0 +1,91 @@ +call ale#Set('cs_mcsc_options', '') +call ale#Set('cs_mcsc_source', '') +call ale#Set('cs_mcsc_assembly_path', []) +call ale#Set('cs_mcsc_assemblies', []) + +function! ale_linters#cs#mcsc#GetCwd(buffer) abort + let l:cwd = ale#Var(a:buffer, 'cs_mcsc_source') + + return !empty(l:cwd) ? l:cwd : expand('#' . a:buffer . ':p:h') +endfunction + +function! ale_linters#cs#mcsc#GetCommand(buffer) abort + " Pass assembly paths via the -lib: parameter. + let l:path_list = ale#Var(a:buffer, 'cs_mcsc_assembly_path') + + let l:lib_option = !empty(l:path_list) + \ ? '-lib:' . join(map(copy(l:path_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " Pass paths to DLL files via the -r: parameter. + let l:assembly_list = ale#Var(a:buffer, 'cs_mcsc_assemblies') + + let l:r_option = !empty(l:assembly_list) + \ ? '-r:' . join(map(copy(l:assembly_list), 'ale#Escape(v:val)'), ',') + \ : '' + + " register temporary module target file with ale + " register temporary module target file with ALE. + let l:out = ale#command#CreateFile(a:buffer) + + " The code is compiled as a module and the output is redirected to a + " temporary file. + return 'mcs -unsafe' + \ . ale#Pad(ale#Var(a:buffer, 'cs_mcsc_options')) + \ . ale#Pad(l:lib_option) + \ . ale#Pad(l:r_option) + \ . ' -out:' . l:out + \ . ' -t:module' + \ . ' -recurse:' . ale#Escape('*.cs') +endfunction + +function! ale_linters#cs#mcsc#Handle(buffer, lines) abort + " Look for lines like the following. + " + " Tests.cs(12,29): error CSXXXX: ; expected + " + " NOTE: pattern also captures file name as linter compiles all + " files within the source tree rooted at the specified source + " path and not just the file loaded in the buffer + let l:patterns = [ + \ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$', + \ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$', + \] + let l:output = [] + + let l:dir = ale_linters#cs#mcsc#GetCwd(a:buffer) + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS' + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6] , + \}) + elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS' + call add(l:output, { + \ 'filename':'', + \ 'lnum': -1, + \ 'col': -1, + \ 'type': l:match[1] is# 'error' ? 'E' : 'W', + \ 'code': l:match[2], + \ 'text': l:match[3], + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('cs',{ +\ 'name': 'mcsc', +\ 'output_stream': 'stderr', +\ 'executable': 'mcs', +\ 'cwd': function('ale_linters#cs#mcsc#GetCwd'), +\ 'command': function('ale_linters#cs#mcsc#GetCommand'), +\ 'callback': 'ale_linters#cs#mcsc#Handle', +\ 'lint_file': 1 +\}) diff --git a/dot_vim/plugged/ale/ale_linters/css/cspell.vim b/dot_vim/plugged/ale/ale_linters/css/cspell.vim new file mode 100644 index 0000000..d42375b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/css/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for CSS files. + +call ale#handlers#cspell#DefineLinter('css') diff --git a/dot_vim/plugged/ale/ale_linters/css/csslint.vim b/dot_vim/plugged/ale/ale_linters/css/csslint.vim new file mode 100644 index 0000000..50c21ce --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/css/csslint.vim @@ -0,0 +1,18 @@ +" Author: w0rp +" Description: This file adds support for checking CSS code with csslint. + +function! ale_linters#css#csslint#GetCommand(buffer) abort + let l:csslintrc = ale#path#FindNearestFile(a:buffer, '.csslintrc') + let l:config_option = !empty(l:csslintrc) + \ ? '--config=' . ale#Escape(l:csslintrc) + \ : '' + + return 'csslint --format=compact ' . l:config_option . ' %t' +endfunction + +call ale#linter#Define('css', { +\ 'name': 'csslint', +\ 'executable': 'csslint', +\ 'command': function('ale_linters#css#csslint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleCSSLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/css/fecs.vim b/dot_vim/plugged/ale/ale_linters/css/fecs.vim new file mode 100644 index 0000000..511847c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/css/fecs.vim @@ -0,0 +1,9 @@ +" Author: harttle +" Description: fecs for CSS files + +call ale#linter#Define('css', { +\ 'name': 'fecs', +\ 'executable': function('ale#handlers#fecs#GetExecutable'), +\ 'command': function('ale#handlers#fecs#GetCommand'), +\ 'callback': 'ale#handlers#fecs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/css/stylelint.vim b/dot_vim/plugged/ale/ale_linters/css/stylelint.vim new file mode 100644 index 0000000..e508f39 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/css/stylelint.vim @@ -0,0 +1,19 @@ +" Author: diartyz + +call ale#Set('css_stylelint_executable', 'stylelint') +call ale#Set('css_stylelint_options', '') +call ale#Set('css_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#css#stylelint#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'css_stylelint_options')) + \ . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('css', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'css_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': function('ale_linters#css#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/css/vscodecss.vim b/dot_vim/plugged/ale/ale_linters/css/vscodecss.vim new file mode 100644 index 0000000..2d59adf --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/css/vscodecss.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode css language server + +function! ale_linters#css#vscodecss#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('css', { +\ 'name': 'vscodecss', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-css-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#css#vscodecss#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cucumber/cucumber.vim b/dot_vim/plugged/ale/ale_linters/cucumber/cucumber.vim new file mode 100644 index 0000000..0cfd815 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cucumber/cucumber.vim @@ -0,0 +1,46 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: Cucumber, a BDD test tool + +function! ale_linters#cucumber#cucumber#GetCommand(buffer) abort + let l:features_dir = ale#path#FindNearestDirectory(a:buffer, 'features') + + if !empty(l:features_dir) + let l:features_arg = '-r ' . ale#Escape(l:features_dir) + else + let l:features_arg = '' + endif + + return 'cucumber --dry-run --quiet --strict --format=json ' + \ . l:features_arg . ' %t' +endfunction + +function! ale_linters#cucumber#cucumber#Handle(buffer, lines) abort + try + let l:json = ale#util#FuzzyJSONDecode(a:lines, {})[0] + catch + return [] + endtry + + let l:output = [] + + for l:element in get(l:json, 'elements', []) + for l:step in l:element['steps'] + if l:step['result']['status'] is# 'undefined' + call add(l:output, { + \ 'lnum': l:step['line'], + \ 'code': 'E', + \ 'text': 'Undefined step' + \}) + endif + endfor + endfor + + return l:output +endfunction + +call ale#linter#Define('cucumber', { +\ 'name': 'cucumber', +\ 'executable': 'cucumber', +\ 'command': function('ale_linters#cucumber#cucumber#GetCommand'), +\ 'callback': 'ale_linters#cucumber#cucumber#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cuda/clangd.vim b/dot_vim/plugged/ale/ale_linters/cuda/clangd.vim new file mode 100644 index 0000000..bfda821 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cuda/clangd.vim @@ -0,0 +1,23 @@ +" Author: Tommy Chiang +" Description: Clangd language server for CUDA (modified from Andrey +" Melentyev's implementation for C++) + +call ale#Set('cuda_clangd_executable', 'clangd') +call ale#Set('cuda_clangd_options', '') +call ale#Set('c_build_dir', '') + +function! ale_linters#cuda#clangd#GetCommand(buffer) abort + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'cuda_clangd_options')) + \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') +endfunction + +call ale#linter#Define('cuda', { +\ 'name': 'clangd', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'cuda_clangd_executable')}, +\ 'command': function('ale_linters#cuda#clangd#GetCommand'), +\ 'project_root': function('ale#c#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cuda/nvcc.vim b/dot_vim/plugged/ale/ale_linters/cuda/nvcc.vim new file mode 100644 index 0000000..2734f6e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cuda/nvcc.vim @@ -0,0 +1,46 @@ +" Author: blahgeek +" Description: NVCC linter for cuda files + +call ale#Set('cuda_nvcc_executable', 'nvcc') +call ale#Set('cuda_nvcc_options', '-std=c++11') + +function! ale_linters#cuda#nvcc#GetCommand(buffer) abort + return '%e -cuda' + \ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer))) + \ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options')) + \ . ' %s -o ' . g:ale#util#nul_file +endfunction + +function! ale_linters#cuda#nvcc#HandleNVCCFormat(buffer, lines) abort + " Look for lines like the following. + " + " test.cu(8): error: argument of type "void *" is incompatible with parameter of type "int *" + let l:pattern = '\v^([^:\(\)]+):?\(?(\d+)\)?:(\d+)?:?\s*\w*\s*(error|warning): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': str2nr(l:match[2]), + \ 'type': l:match[4] =~# 'error' ? 'E' : 'W', + \ 'text': l:match[5], + \ 'filename': fnamemodify(l:match[1], ':p'), + \} + + if !empty(l:match[3]) + let l:item.col = str2nr(l:match[3]) + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('cuda', { +\ 'name': 'nvcc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'cuda_nvcc_executable')}, +\ 'command': function('ale_linters#cuda#nvcc#GetCommand'), +\ 'callback': 'ale_linters#cuda#nvcc#HandleNVCCFormat', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/cypher/cypher_lint.vim b/dot_vim/plugged/ale/ale_linters/cypher/cypher_lint.vim new file mode 100644 index 0000000..408ddd6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/cypher/cypher_lint.vim @@ -0,0 +1,26 @@ +" Author: Francisco Lopes +" Description: Linting for Neo4j's Cypher + +function! ale_linters#cypher#cypher_lint#Handle(buffer, lines) abort + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+): (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('cypher', { +\ 'name': 'cypher_lint', +\ 'executable': 'cypher-lint', +\ 'command': 'cypher-lint', +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#cypher#cypher_lint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/d/dls.vim b/dot_vim/plugged/ale/ale_linters/d/dls.vim new file mode 100644 index 0000000..78d1c15 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/d/dls.vim @@ -0,0 +1,22 @@ +" Author: aurieh +" Description: A Language Server implementation for D + +call ale#Set('d_dls_executable', 'dls') + +function! ale_linters#d#dls#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'd_dls_executable') +endfunction + +function! ale_linters#d#dls#FindProjectRoot(buffer) abort + " Note: this will return . if dub config is empty + " dls can run outside DUB projects just fine + return fnamemodify(ale#d#FindDUBConfig(a:buffer), ':h') +endfunction + +call ale#linter#Define('d', { +\ 'name': 'dls', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#d#dls#GetExecutable'), +\ 'command': function('ale_linters#d#dls#GetExecutable'), +\ 'project_root': function('ale_linters#d#dls#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/d/dmd.vim b/dot_vim/plugged/ale/ale_linters/d/dmd.vim new file mode 100644 index 0000000..f38e812 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/d/dmd.vim @@ -0,0 +1,116 @@ +" Author: w0rp +" Description: "dmd for D files" + +function! s:GetDUBCommand(buffer) abort + " If we can't run dub, then skip this command. + if executable('dub') + " Returning an empty string skips to the DMD command. + let l:config = ale#d#FindDUBConfig(a:buffer) + + " To support older dub versions, we just change the directory to the + " directory where we found the dub config, and then run `dub describe` + " from that directory. + if !empty(l:config) + return [fnamemodify(l:config, ':h'), 'dub describe --data-list + \ --data=import-paths + \ --data=string-import-paths + \ --data=versions + \ --data=debug-versions + \'] + endif + endif + + return ['', ''] +endfunction + +function! ale_linters#d#dmd#RunDUBCommand(buffer) abort + let [l:cwd, l:command] = s:GetDUBCommand(a:buffer) + + if empty(l:command) + " If we can't run DUB, just run DMD. + return ale_linters#d#dmd#DMDCommand(a:buffer, [], {}) + endif + + return ale#command#Run( + \ a:buffer, + \ l:command, + \ function('ale_linters#d#dmd#DMDCommand'), + \ {'cwd': l:cwd}, + \) +endfunction + +function! ale_linters#d#dmd#DMDCommand(buffer, dub_output, meta) abort + let l:import_list = [] + let l:str_import_list = [] + let l:versions_list = [] + let l:deb_versions_list = [] + let l:list_ind = 1 + let l:seen_line = 0 + + " Build a list of options generated from DUB, if available. + " DUB output each path or version on a single line. + " Each list is separated by a blank line. + " Empty list are represented by a blank line (followed and/or + " preceded by a separation blank line) + for l:line in a:dub_output + " line still has end of line char on windows + let l:line = substitute(l:line, '[\r\n]*$', '', '') + + if !empty(l:line) + if l:list_ind == 1 + call add(l:import_list, '-I' . ale#Escape(l:line)) + elseif l:list_ind == 2 + call add(l:str_import_list, '-J' . ale#Escape(l:line)) + elseif l:list_ind == 3 + call add(l:versions_list, '-version=' . ale#Escape(l:line)) + elseif l:list_ind == 4 + call add(l:deb_versions_list, '-debug=' . ale#Escape(l:line)) + endif + + let l:seen_line = 1 + elseif !l:seen_line + " if list is empty must skip one empty line + let l:seen_line = 1 + else + let l:seen_line = 0 + let l:list_ind += 1 + endif + endfor + + return 'dmd ' . join(l:import_list) . ' ' . + \ join(l:str_import_list) . ' ' . + \ join(l:versions_list) . ' ' . + \ join(l:deb_versions_list) . ' -o- -wi -vcolumns -c %t' +endfunction + +function! ale_linters#d#dmd#Handle(buffer, lines) abort + " Matches patterns lines like the following: + " /tmp/tmp.qclsa7qLP7/file.d(1): Error: function declaration without return type. (Note that constructors are always named 'this') + " /tmp/tmp.G1L5xIizvB.d(8,8): Error: module weak_reference is in file 'dstruct/weak_reference.d' which cannot be read + let l:pattern = '\v^(\f+)\((\d+)(,(\d+))?\): (\w+): (.+)$' + let l:output = [] + let l:dir = expand('#' . a:buffer . ':p:h') + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " If dmd was invoked with relative path, match[1] is relative, otherwise it is absolute. + " As we invoke dmd with the buffer path (in /tmp), this will generally be absolute already + let l:fname = ale#path#GetAbsPath(l:dir, l:match[1]) + call add(l:output, { + \ 'filename': l:fname, + \ 'lnum': l:match[2], + \ 'col': l:match[4], + \ 'type': l:match[5] is# 'Warning' || l:match[5] is# 'Deprecation' ? 'W' : 'E', + \ 'text': l:match[6], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('d', { +\ 'name': 'dmd', +\ 'executable': 'dmd', +\ 'command': function('ale_linters#d#dmd#RunDUBCommand'), +\ 'callback': 'ale_linters#d#dmd#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/dafny/dafny.vim b/dot_vim/plugged/ale/ale_linters/dafny/dafny.vim new file mode 100644 index 0000000..2a9f761 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dafny/dafny.vim @@ -0,0 +1,41 @@ +" Author: Taylor Blau + +function! ale_linters#dafny#dafny#Handle(buffer, lines) abort + let l:pattern = '\v(.*)\((\d+),(\d+)\): (.*): (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'filename': l:match[1], + \ 'col': l:match[3] + 0, + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[5], + \ 'type': l:match[4] =~# '^Error' ? 'E' : 'W' + \ }) + endfor + + for l:match in ale#util#GetMatches(a:lines, '\v(.*)\((\d+),(\d+)\): (Verification of .{-} timed out after \d+ seconds)') + call add(l:output, { + \ 'filename': l:match[1], + \ 'col': l:match[3] + 0, + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': 'E', + \ }) + endfor + + return l:output +endfunction + +function! ale_linters#dafny#dafny#GetCommand(buffer) abort + return printf('dafny %%s /compile:0 /timeLimit:%d', ale#Var(a:buffer, 'dafny_dafny_timelimit')) +endfunction + +call ale#Set('dafny_dafny_timelimit', 10) +call ale#linter#Define('dafny', { +\ 'name': 'dafny', +\ 'executable': 'dafny', +\ 'command': function('ale_linters#dafny#dafny#GetCommand'), +\ 'callback': 'ale_linters#dafny#dafny#Handle', +\ 'lint_file': 1, +\ }) diff --git a/dot_vim/plugged/ale/ale_linters/dart/analysis_server.vim b/dot_vim/plugged/ale/ale_linters/dart/analysis_server.vim new file mode 100644 index 0000000..a6870da --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dart/analysis_server.vim @@ -0,0 +1,29 @@ +" Author: Nelson Yeung +" Description: Check Dart files with dart analysis server LSP + +call ale#Set('dart_analysis_server_executable', 'dart') + +function! ale_linters#dart#analysis_server#GetProjectRoot(buffer) abort + " Note: pub only looks for pubspec.yaml, there's no point in adding + " support for pubspec.yml + let l:pubspec = ale#path#FindNearestFile(a:buffer, 'pubspec.yaml') + + return !empty(l:pubspec) ? fnamemodify(l:pubspec, ':h:h') : '.' +endfunction + +function! ale_linters#dart#analysis_server#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'dart_analysis_server_executable') + let l:dart = resolve(exepath(l:executable)) + + return '%e ' + \ . fnamemodify(l:dart, ':h') . '/snapshots/analysis_server.dart.snapshot' + \ . ' --lsp' +endfunction + +call ale#linter#Define('dart', { +\ 'name': 'analysis_server', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'dart_analysis_server_executable')}, +\ 'command': function('ale_linters#dart#analysis_server#GetCommand'), +\ 'project_root': function('ale_linters#dart#analysis_server#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/dart/dart_analyze.vim b/dot_vim/plugged/ale/ale_linters/dart/dart_analyze.vim new file mode 100644 index 0000000..7d67c31 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dart/dart_analyze.vim @@ -0,0 +1,29 @@ +" Author: ghsang +" Description: Check Dart files with dart analyze + +call ale#Set('dart_analyze_executable', 'dart') + +function! ale_linters#dart#dart_analyze#Handle(buffer, lines) abort + let l:pattern = '\v([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let [l:type, l:filename, l:lnum, l:col, l:message, l:code] = l:match[1:6] + call add(l:output, { + \ 'type': l:type is# 'error' ? 'E' : l:type is# 'info' ? 'I' : 'W', + \ 'text': l:code . ': ' . l:message, + \ 'lnum': str2nr(l:lnum), + \ 'col': str2nr(l:col), + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('dart', { +\ 'name': 'dart_analyze', +\ 'executable': {b -> ale#Var(b, 'dart_analyze_executable')}, +\ 'command': '%e analyze --fatal-infos %s', +\ 'callback': 'ale_linters#dart#dart_analyze#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/dart/language_server.vim b/dot_vim/plugged/ale/ale_linters/dart/language_server.vim new file mode 100644 index 0000000..d0e639c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dart/language_server.vim @@ -0,0 +1,20 @@ +" Author: aurieh +" Description: A language server for dart + +call ale#Set('dart_language_server_executable', 'dart_language_server') + +function! ale_linters#dart#language_server#GetProjectRoot(buffer) abort + " Note: pub only looks for pubspec.yaml, there's no point in adding + " support for pubspec.yml + let l:pubspec = ale#path#FindNearestFile(a:buffer, 'pubspec.yaml') + + return !empty(l:pubspec) ? fnamemodify(l:pubspec, ':h:h') : '' +endfunction + +call ale#linter#Define('dart', { +\ 'name': 'language_server', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'dart_language_server_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#dart#language_server#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/desktop/desktop_file_validate.vim b/dot_vim/plugged/ale/ale_linters/desktop/desktop_file_validate.vim new file mode 100644 index 0000000..5a97d31 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/desktop/desktop_file_validate.vim @@ -0,0 +1,31 @@ +call ale#Set('desktop_desktop_file_validate_options', '') + +" Example matches for pattern: +" +" foo.desktop: warning: key "TerminalOptions" in group ... +" foo.desktop: error: action "new-private-window" is defined, ... +let s:pattern = '\v^(.+): ([a-z]+): (.+)$' + +function! ale_linters#desktop#desktop_file_validate#Handle(buffer, lines) abort + " The error format doesn't specify lines, so we can just put all of the + " errors on line 1. + return ale#util#MapMatches(a:lines, s:pattern, {match -> { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': match[2] is? 'error' ? 'E' : 'W', + \ 'text': match[3], + \}}) +endfunction + +call ale#linter#Define('desktop', { +\ 'name': 'desktop_file_validate', +\ 'aliases': ['desktop-file-validate'], +\ 'executable': 'desktop-file-validate', +\ 'command': {b -> +\ '%e' +\ . ale#Pad(ale#Var(b, 'desktop_desktop_file_validate_options')) +\ . ' %t' +\ }, +\ 'callback': 'ale_linters#desktop#desktop_file_validate#Handle', +\ 'output_stream': 'both', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/dockerfile/dockerfile_lint.vim b/dot_vim/plugged/ale/ale_linters/dockerfile/dockerfile_lint.vim new file mode 100644 index 0000000..0c0ad53 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dockerfile/dockerfile_lint.vim @@ -0,0 +1,76 @@ +" Author: Alexander Olofsson + +call ale#Set('dockerfile_dockerfile_lint_executable', 'dockerfile_lint') +call ale#Set('dockerfile_dockerfile_lint_options', '') + +function! ale_linters#dockerfile#dockerfile_lint#GetType(type) abort + if a:type is? 'error' + return 'E' + elseif a:type is? 'warn' + return 'W' + endif + + return 'I' +endfunction + +function! ale_linters#dockerfile#dockerfile_lint#Handle(buffer, lines) abort + try + let l:data = json_decode(join(a:lines, '')) + catch + return [] + endtry + + if empty(l:data) + " Should never happen, but it's better to be on the safe side + return [] + endif + + let l:messages = [] + + for l:type in ['error', 'warn', 'info'] + for l:object in l:data[l:type]['data'] + let l:line = get(l:object, 'line', -1) + let l:message = l:object['message'] + + let l:link = get(l:object, 'reference_url', '') + + if type(l:link) == v:t_list + " Somehow, reference_url is returned as two-part list. + " Anchor markers in that list are sometimes duplicated. + " See https://github.com/projectatomic/dockerfile_lint/issues/134 + let l:link = join(l:link, '') + let l:link = substitute(l:link, '##', '#', '') + endif + + let l:detail = l:message + + if get(l:object, 'description', 'None') isnot# 'None' + let l:detail .= "\n\n" . l:object['description'] + endif + + let l:detail .= "\n\n" . l:link + + call add(l:messages, { + \ 'lnum': l:line, + \ 'text': l:message, + \ 'type': ale_linters#dockerfile#dockerfile_lint#GetType(l:type), + \ 'detail': l:detail, + \}) + endfor + endfor + + return l:messages +endfunction + +function! ale_linters#dockerfile#dockerfile_lint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'dockerfile_dockerfile_lint_options')) + \ . ' -p -j -f' + \ . ' %t' +endfunction + +call ale#linter#Define('dockerfile', { +\ 'name': 'dockerfile_lint', +\ 'executable': {b -> ale#Var(b, 'dockerfile_dockerfile_lint_executable')}, +\ 'command': function('ale_linters#dockerfile#dockerfile_lint#GetCommand'), +\ 'callback': 'ale_linters#dockerfile#dockerfile_lint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/dockerfile/hadolint.vim b/dot_vim/plugged/ale/ale_linters/dockerfile/hadolint.vim new file mode 100644 index 0000000..9a6a625 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/dockerfile/hadolint.vim @@ -0,0 +1,123 @@ +" Author: hauleth - https://github.com/hauleth + +" always, yes, never +call ale#Set('dockerfile_hadolint_use_docker', 'never') +call ale#Set('dockerfile_hadolint_docker_image', 'hadolint/hadolint') +call ale#Set('dockerfile_hadolint_options', '') + +function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " -:19 DL3001 warning: Pipe chain should start with a raw value. + " /dev/stdin:19:3 unexpected thing + let l:pattern = '\v^%(/dev/stdin|-):(\d+):?(\d+)? ((DL|SC)(\d+) )?((.+)?: )?(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:lnum = 0 + let l:colnum = 0 + + if l:match[1] isnot# '' + let l:lnum = l:match[1] + 0 + endif + + if l:match[2] isnot# '' + let l:colnum = l:match[2] + 0 + endif + + " Shellcheck knows a 'style' severity - pin it to info level as well. + if l:match[7] is# 'style' + let l:type = 'I' + elseif l:match[7] is# 'info' + let l:type = 'I' + elseif l:match[7] is# 'warning' + let l:type = 'W' + else + let l:type = 'E' + endif + + let l:text = l:match[8] + let l:detail = l:match[8] + let l:domain = 'https://github.com/hadolint/hadolint/wiki/' + let l:code = '' + let l:link = '' + + if l:match[4] is# 'SC' + let l:domain = 'https://github.com/koalaman/shellcheck/wiki/' + endif + + if l:match[5] isnot# '' + let l:code = l:match[4] . l:match[5] + let l:link = ' ( ' . l:domain . l:code . ' )' + let l:text = l:code . ': ' . l:detail + let l:detail = l:code . l:link . "\n\n" . l:detail + else + let l:type = 'E' + let l:detail = 'hadolint could not parse the file because of a syntax error.' + endif + + let l:line_output = { + \ 'lnum': l:lnum, + \ 'col': l:colnum, + \ 'type': l:type, + \ 'text': l:text, + \ 'detail': l:detail + \} + + if l:code isnot# '' + let l:line_output['code'] = l:code + endif + + call add(l:output, l:line_output) + endfor + + return l:output +endfunction + +" This is a little different than the typical 'executable' callback. We want +" to afford the user the chance to say always use docker, never use docker, +" and use docker if the hadolint executable is not present on the system. +" +" In the case of neither docker nor hadolint executables being present, it +" really doesn't matter which we return -- either will have the effect of +" 'nope, can't use this linter!'. + +function! ale_linters#dockerfile#hadolint#GetExecutable(buffer) abort + let l:use_docker = ale#Var(a:buffer, 'dockerfile_hadolint_use_docker') + + " check for mandatory directives + if l:use_docker is# 'never' + return 'hadolint' + elseif l:use_docker is# 'always' + return 'docker' + endif + + " if we reach here, we want to use 'hadolint' if present... + if executable('hadolint') + return 'hadolint' + endif + + "... and 'docker' as a fallback. + return 'docker' +endfunction + +function! ale_linters#dockerfile#hadolint#GetCommand(buffer) abort + let l:command = ale_linters#dockerfile#hadolint#GetExecutable(a:buffer) + let l:opts = ale#Var(a:buffer, 'dockerfile_hadolint_options') . ' --no-color -' + + if l:command is# 'docker' + return printf('docker run --rm -i %s hadolint %s', + \ ale#Var(a:buffer, 'dockerfile_hadolint_docker_image'), + \ l:opts) + endif + + return 'hadolint ' . l:opts +endfunction + + +call ale#linter#Define('dockerfile', { +\ 'name': 'hadolint', +\ 'executable': function('ale_linters#dockerfile#hadolint#GetExecutable'), +\ 'command': function('ale_linters#dockerfile#hadolint#GetCommand'), +\ 'callback': 'ale_linters#dockerfile#hadolint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elixir/credo.vim b/dot_vim/plugged/ale/ale_linters/elixir/credo.vim new file mode 100644 index 0000000..d6a861f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/credo.vim @@ -0,0 +1,71 @@ +" Author: hauleth - https://github.com/hauleth + +function! ale_linters#elixir#credo#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " lib/filename.ex:19:7: F: Pipe chain should start with a raw value. + let l:pattern = '\v:(\d+):?(\d+)?: (.): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:type = l:match[3] + let l:text = l:match[4] + + " Refactoring opportunities + if l:type is# 'F' + let l:type = 'W' + " Consistency + elseif l:type is# 'C' + let l:type = 'W' + " Software Design + elseif l:type is# 'D' + let l:type = 'I' + " Code Readability + elseif l:type is# 'R' + let l:type = 'I' + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:type, + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#elixir#credo#GetMode() abort + if get(g:, 'ale_elixir_credo_strict', 0) + return '--strict' + else + return 'suggest' + endif +endfunction + +function! ale_linters#elixir#credo#GetConfigFile() abort + let l:config_file = get(g:, 'ale_elixir_credo_config_file', '') + + if empty(l:config_file) + return '' + endif + + return ' --config-file ' . l:config_file +endfunction + +function! ale_linters#elixir#credo#GetCommand(buffer) abort + return 'mix help credo && ' + \ . 'mix credo ' . ale_linters#elixir#credo#GetMode() + \ . ale_linters#elixir#credo#GetConfigFile() + \ . ' --format=flycheck --read-from-stdin %s' +endfunction + +call ale#linter#Define('elixir', { +\ 'name': 'credo', +\ 'executable': 'mix', +\ 'cwd': function('ale#handlers#elixir#FindMixUmbrellaRoot'), +\ 'command': function('ale_linters#elixir#credo#GetCommand'), +\ 'callback': 'ale_linters#elixir#credo#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elixir/cspell.vim b/dot_vim/plugged/ale/ale_linters/elixir/cspell.vim new file mode 100644 index 0000000..12dc271 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Elixir files. + +call ale#handlers#cspell#DefineLinter('elixir') diff --git a/dot_vim/plugged/ale/ale_linters/elixir/dialyxir.vim b/dot_vim/plugged/ale/ale_linters/elixir/dialyxir.vim new file mode 100644 index 0000000..9b8a5cd --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/dialyxir.vim @@ -0,0 +1,34 @@ +" Author: Fran C. - https://github.com/franciscoj +" Description: Add dialyzer support for elixir through dialyxir +" https://github.com/jeremyjh/dialyxir + +function! ale_linters#elixir#dialyxir#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " lib/filename.ex:19: Function fname/1 has no local return + let l:pattern = '\v(.+):(\d+): (.+)$' + let l:output = [] + let l:type = 'W' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if bufname(a:buffer) == l:match[1] + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[2] + 0, + \ 'col': 0, + \ 'type': l:type, + \ 'text': l:match[3], + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('elixir', { +\ 'name': 'dialyxir', +\ 'executable': 'mix', +\ 'cwd': function('ale#handlers#elixir#FindMixProjectRoot'), +\ 'command': 'mix help dialyzer && mix dialyzer', +\ 'callback': 'ale_linters#elixir#dialyxir#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elixir/dogma.vim b/dot_vim/plugged/ale/ale_linters/elixir/dogma.vim new file mode 100644 index 0000000..28e7f42 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/dogma.vim @@ -0,0 +1,39 @@ +" Author: archseer - https://github.com/archSeer + +function! ale_linters#elixir#dogma#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " lib/filename.ex:19:7: F: Pipe chain should start with a raw value. + let l:pattern = '\v:(\d+):?(\d+)?: (.): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:type = l:match[3] + let l:text = l:match[4] + + if l:type is# 'C' + let l:type = 'E' + elseif l:type is# 'R' + let l:type = 'W' + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:type, + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('elixir', { +\ 'name': 'dogma', +\ 'executable': 'mix', +\ 'cwd': function('ale#handlers#elixir#FindMixProjectRoot'), +\ 'command': 'mix help dogma && mix dogma %s --format=flycheck', +\ 'lint_file': 1, +\ 'callback': 'ale_linters#elixir#dogma#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elixir/elixir_ls.vim b/dot_vim/plugged/ale/ale_linters/elixir/elixir_ls.vim new file mode 100644 index 0000000..d5517de --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/elixir_ls.vim @@ -0,0 +1,21 @@ +" Author: Jon Parise +" Description: ElixirLS integration (https://github.com/JakeBecker/elixir-ls) + +call ale#Set('elixir_elixir_ls_release', 'elixir-ls') +call ale#Set('elixir_elixir_ls_config', {}) + +function! ale_linters#elixir#elixir_ls#GetExecutable(buffer) abort + let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_elixir_ls_release')) + let l:cmd = has('win32') ? '\language_server.bat' : '/language_server.sh' + + return l:dir . l:cmd +endfunction + +call ale#linter#Define('elixir', { +\ 'name': 'elixir-ls', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#elixir#elixir_ls#GetExecutable'), +\ 'command': function('ale_linters#elixir#elixir_ls#GetExecutable'), +\ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'elixir_elixir_ls_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elixir/mix.vim b/dot_vim/plugged/ale/ale_linters/elixir/mix.vim new file mode 100644 index 0000000..948c6d3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elixir/mix.vim @@ -0,0 +1,45 @@ +" Author: evnu - https://github.com/evnu +" Author: colbydehart - https://github.com/colbydehart +" Description: Mix compile checking for Elixir files + +function! ale_linters#elixir#mix#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " Error format + " ** (CompileError) apps/sim/lib/sim/server.ex:87: undefined function update_in/4 + " + " TODO: Warning format + " warning: variable "foobar" does not exist and is being expanded to "foobar()", please use parentheses to remove the ambiguity or change the variable name + let l:pattern = '\v\(([^\)]+Error)\) ([^:]+):([^:]+): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:type = 'E' + let l:text = l:match[4] + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[3] + 0, + \ 'col': 0, + \ 'type': l:type, + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#elixir#mix#GetCommand(buffer) abort + let l:temp_dir = ale#command#CreateDirectory(a:buffer) + + return ale#Env('MIX_BUILD_PATH', l:temp_dir) . 'mix compile %s' +endfunction + +call ale#linter#Define('elixir', { +\ 'name': 'mix', +\ 'executable': 'mix', +\ 'cwd': function('ale#handlers#elixir#FindMixProjectRoot'), +\ 'command': function('ale_linters#elixir#mix#GetCommand'), +\ 'callback': 'ale_linters#elixir#mix#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elm/elm_ls.vim b/dot_vim/plugged/ale/ale_linters/elm/elm_ls.vim new file mode 100644 index 0000000..a02dbf4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elm/elm_ls.vim @@ -0,0 +1,40 @@ +" Author: antew - https://github.com/antew +" Description: elm-language-server integration for elm (diagnostics, formatting, and more) + +call ale#Set('elm_ls_executable', 'elm-language-server') +call ale#Set('elm_ls_use_global', get(g:, 'ale_use_global_executables', 1)) + +" elm-language-server will search for local and global binaries, if empty +call ale#Set('elm_ls_elm_path', '') +call ale#Set('elm_ls_elm_format_path', '') +call ale#Set('elm_ls_elm_test_path', '') +call ale#Set('elm_ls_elm_analyse_trigger', 'change') + +function! elm_ls#GetRootDir(buffer) abort + let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json') + + return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : '' +endfunction + +function! elm_ls#GetOptions(buffer) abort + return { + \ 'elmPath': ale#Var(a:buffer, 'elm_ls_elm_path'), + \ 'elmFormatPath': ale#Var(a:buffer, 'elm_ls_elm_format_path'), + \ 'elmTestPath': ale#Var(a:buffer, 'elm_ls_elm_test_path'), + \ 'elmAnalyseTrigger': ale#Var(a:buffer, 'elm_ls_elm_analyse_trigger'), + \} +endfunction + +call ale#linter#Define('elm', { +\ 'name': 'elm_ls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'elm_ls', [ +\ 'node_modules/.bin/elm-language-server', +\ 'node_modules/.bin/elm-lsp', +\ 'elm-lsp' +\ ])}, +\ 'command': '%e --stdio', +\ 'project_root': function('elm_ls#GetRootDir'), +\ 'language': 'elm', +\ 'initialization_options': function('elm_ls#GetOptions') +\}) diff --git a/dot_vim/plugged/ale/ale_linters/elm/make.vim b/dot_vim/plugged/ale/ale_linters/elm/make.vim new file mode 100644 index 0000000..a7f9ea7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/elm/make.vim @@ -0,0 +1,242 @@ +" Author: buffalocoder - https://github.com/buffalocoder, soywod - https://github.com/soywod, hecrj - https://github.com/hecrj +" Description: Elm linting in Ale. Closely follows the Syntastic checker in https://github.com/ElmCast/elm-vim. + +call ale#Set('elm_make_executable', 'elm') +call ale#Set('elm_make_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#elm#make#Handle(buffer, lines) abort + let l:output = [] + let l:unparsed_lines = [] + + for l:line in a:lines + if l:line[0] is# '{' + " Elm 0.19 + call ale_linters#elm#make#HandleElm019Line(l:line, l:output) + elseif l:line[0] is# '[' + " Elm 0.18 + call ale_linters#elm#make#HandleElm018Line(l:line, l:output) + elseif l:line isnot# 'Successfully generated /dev/null' + call add(l:unparsed_lines, l:line) + endif + endfor + + if len(l:unparsed_lines) > 0 + call add(l:output, { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': l:unparsed_lines[0], + \ 'detail': join(l:unparsed_lines, "\n") + \}) + endif + + return l:output +endfunction + +function! ale_linters#elm#make#HandleElm019Line(line, output) abort + let l:report = json_decode(a:line) + + if l:report.type is? 'error' + " General problem + let l:details = ale_linters#elm#make#ParseMessage(l:report.message) + + if empty(l:report.path) + let l:report.path = 'Elm' + endif + + if ale_linters#elm#make#FileIsBuffer(l:report.path) + call add(a:output, { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': l:details, + \}) + else + call add(a:output, { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': l:report.path .' - '. l:details, + \ 'detail': l:report.path ." ----------\n\n". l:details, + \}) + endif + else + " Compilation errors + for l:error in l:report.errors + let l:file_is_buffer = ale_linters#elm#make#FileIsBuffer(l:error.path) + + for l:problem in l:error.problems + let l:details = ale_linters#elm#make#ParseMessage(l:problem.message) + + if l:file_is_buffer + " Buffer module has problems + call add(a:output, { + \ 'lnum': l:problem.region.start.line, + \ 'col': l:problem.region.start.column, + \ 'end_lnum': l:problem.region.end.line, + \ 'end_col': l:problem.region.end.column, + \ 'type': 'E', + \ 'text': l:details, + \}) + else + " Imported module has problems + let l:location = l:error.path .':'. l:problem.region.start.line + call add(a:output, { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': l:location .' - '. l:details, + \ 'detail': l:location ." ----------\n\n". l:details, + \}) + endif + endfor + endfor + endif +endfunction + +function! ale_linters#elm#make#HandleElm018Line(line, output) abort + let l:errors = json_decode(a:line) + + for l:error in l:errors + let l:file_is_buffer = ale_linters#elm#make#FileIsBuffer(l:error.file) + + if l:file_is_buffer + " Current buffer has problems + call add(a:output, { + \ 'lnum': l:error.region.start.line, + \ 'col': l:error.region.start.column, + \ 'end_lnum': l:error.region.end.line, + \ 'end_col': l:error.region.end.column, + \ 'type': (l:error.type is? 'error') ? 'E' : 'W', + \ 'text': l:error.overview, + \ 'detail': l:error.overview . "\n\n" . l:error.details + \}) + elseif l:error.type is? 'error' + " Imported module has errors + let l:location = l:error.file .':'. l:error.region.start.line + + call add(a:output, { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': l:location .' - '. l:error.overview, + \ 'detail': l:location ." ----------\n\n". l:error.overview . "\n\n" . l:error.details + \}) + endif + endfor +endfunction + +function! ale_linters#elm#make#FileIsBuffer(path) abort + return ale#path#IsTempName(a:path) +endfunction + +function! ale_linters#elm#make#ParseMessage(message) abort + return join(map(copy(a:message), 'ale_linters#elm#make#ParseMessageItem(v:val)'), '') +endfunction + +function! ale_linters#elm#make#ParseMessageItem(item) abort + if type(a:item) is v:t_string + return a:item + else + return a:item.string + endif +endfunction + +function! ale_linters#elm#make#GetPackageFile(buffer) abort + let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json') + + if empty(l:elm_json) + " Fallback to Elm 0.18 + let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm-package.json') + endif + + return l:elm_json +endfunction + +function! ale_linters#elm#make#IsVersionGte19(buffer) abort + let l:elm_json = ale_linters#elm#make#GetPackageFile(a:buffer) + + if l:elm_json =~# '-package' + return 0 + else + return 1 + endif +endfunction + +function! ale_linters#elm#make#GetRootDir(buffer) abort + let l:elm_json = ale_linters#elm#make#GetPackageFile(a:buffer) + + if empty(l:elm_json) + return '' + else + return fnamemodify(l:elm_json, ':p:h') + endif +endfunction + +function! ale_linters#elm#make#IsTest(buffer) abort + let l:root_dir = ale_linters#elm#make#GetRootDir(a:buffer) + + if empty(l:root_dir) + return 0 + endif + + let l:tests_dir = join([l:root_dir, 'tests', ''], has('win32') ? '\' : '/') + + let l:buffer_path = fnamemodify(bufname(a:buffer), ':p') + + if stridx(l:buffer_path, l:tests_dir) == 0 + return 1 + else + return 0 + endif +endfunction + +function! ale_linters#elm#make#GetCwd(buffer) abort + let l:root_dir = ale_linters#elm#make#GetRootDir(a:buffer) + + return !empty(l:root_dir) ? l:root_dir : '' +endfunction + +" Return the command to execute the linter in the projects directory. +" If it doesn't, then this will fail when imports are needed. +function! ale_linters#elm#make#GetCommand(buffer) abort + let l:executable = ale_linters#elm#make#GetExecutable(a:buffer) + let l:is_v19 = ale_linters#elm#make#IsVersionGte19(a:buffer) + let l:is_using_elm_test = l:executable =~# 'elm-test$' + + " elm-test needs to know the path of elm-make if elm isn't installed globally. + " https://github.com/rtfeldman/node-test-runner/blob/57728f10668f2d2ab3179e7e3208bcfa9a1f19aa/README.md#--compiler + if l:is_v19 && l:is_using_elm_test + let l:elm_make_executable = ale#path#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) + let l:elm_test_compiler_flag = ' --compiler ' . l:elm_make_executable . ' ' + else + let l:elm_test_compiler_flag = ' ' + endif + + " The elm compiler, at the time of this writing, uses '/dev/null' as + " a sort of flag to tell the compiler not to generate an output file, + " which is why this is hard coded here. + " Source: https://github.com/elm-lang/elm-compiler/blob/19d5a769b30ec0b2fc4475985abb4cd94cd1d6c3/builder/src/Generate/Output.hs#L253 + return '%e make --report=json --output=/dev/null' + \ . l:elm_test_compiler_flag + \ . '%t' +endfunction + +function! ale_linters#elm#make#GetExecutable(buffer) abort + let l:is_test = ale_linters#elm#make#IsTest(a:buffer) + let l:is_v19 = ale_linters#elm#make#IsVersionGte19(a:buffer) + + if l:is_test && l:is_v19 + return ale#path#FindExecutable( + \ a:buffer, + \ 'elm_make', + \ ['node_modules/.bin/elm-test', 'node_modules/.bin/elm'] + \) + else + return ale#path#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) + endif +endfunction + +call ale#linter#Define('elm', { +\ 'name': 'make', +\ 'executable': function('ale_linters#elm#make#GetExecutable'), +\ 'output_stream': 'both', +\ 'cwd': function('ale_linters#elm#make#GetCwd'), +\ 'command': function('ale_linters#elm#make#GetCommand'), +\ 'callback': 'ale_linters#elm#make#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/erlang/dialyzer.vim b/dot_vim/plugged/ale/ale_linters/erlang/dialyzer.vim new file mode 100644 index 0000000..a97c952 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/erlang/dialyzer.vim @@ -0,0 +1,97 @@ +" Author: Autoine Gagne - https://github.com/AntoineGagne +" Description: Define a checker that runs dialyzer on Erlang files. + +let g:ale_erlang_dialyzer_executable = +\ get(g:, 'ale_erlang_dialyzer_executable', 'dialyzer') +let g:ale_erlang_dialyzer_options = +\ get(g:, 'ale_erlang_dialyzer_options', '-Wunmatched_returns' +\ . ' -Werror_handling' +\ . ' -Wrace_conditions' +\ . ' -Wunderspecs') +let g:ale_erlang_dialyzer_plt_file = +\ get(g:, 'ale_erlang_dialyzer_plt_file', '') +let g:ale_erlang_dialyzer_rebar3_profile = +\ get(g:, 'ale_erlang_dialyzer_rebar3_profile', 'default') + +function! ale_linters#erlang#dialyzer#GetRebar3Profile(buffer) abort + return ale#Var(a:buffer, 'erlang_dialyzer_rebar3_profile') +endfunction + +function! ale_linters#erlang#dialyzer#FindPlt(buffer) abort + let l:plt_file = '' + let l:rebar3_profile = ale_linters#erlang#dialyzer#GetRebar3Profile(a:buffer) + let l:plt_file_directory = ale#path#FindNearestDirectory(a:buffer, '_build/' . l:rebar3_profile) + + if !empty(l:plt_file_directory) + let l:plt_file = globpath(l:plt_file_directory, '*_plt', 0, 1) + endif + + if !empty(l:plt_file) + return l:plt_file[0] + endif + + if !empty($REBAR_PLT_DIR) + return expand('$REBAR_PLT_DIR/dialyzer/plt') + endif + + return expand('$HOME/.dialyzer_plt') +endfunction + +function! ale_linters#erlang#dialyzer#GetPlt(buffer) abort + let l:plt_file = ale#Var(a:buffer, 'erlang_dialyzer_plt_file') + + if !empty(l:plt_file) + return l:plt_file + endif + + return ale_linters#erlang#dialyzer#FindPlt(a:buffer) +endfunction + +function! ale_linters#erlang#dialyzer#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'erlang_dialyzer_executable') +endfunction + +function! ale_linters#erlang#dialyzer#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'erlang_dialyzer_options') + + let l:command = ale#Escape(ale_linters#erlang#dialyzer#GetExecutable(a:buffer)) + \ . ' -n' + \ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer)) + \ . ' ' . l:options + \ . ' %s' + + return l:command +endfunction + +function! ale_linters#erlang#dialyzer#Handle(buffer, lines) abort + " Match patterns like the following: + " + " erl_tidy_prv_fmt.erl:3: Callback info about the provider behaviour is not available + let l:pattern = '^\S\+:\(\d\+\): \(.\+\)$' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) != 0 + let l:code = l:match[2] + + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'lcol': 0, + \ 'text': l:code, + \ 'type': 'W' + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'dialyzer', +\ 'executable': function('ale_linters#erlang#dialyzer#GetExecutable'), +\ 'command': function('ale_linters#erlang#dialyzer#GetCommand'), +\ 'callback': function('ale_linters#erlang#dialyzer#Handle'), +\ 'lint_file': 1 +\}) diff --git a/dot_vim/plugged/ale/ale_linters/erlang/elvis.vim b/dot_vim/plugged/ale/ale_linters/erlang/elvis.vim new file mode 100644 index 0000000..0fb85c0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/erlang/elvis.vim @@ -0,0 +1,40 @@ +" Author: Dmitri Vereshchagin +" Description: Elvis linter for Erlang files + +call ale#Set('erlang_elvis_executable', 'elvis') + +function! ale_linters#erlang#elvis#Handle(buffer, lines) abort + let l:pattern = '\v:(\d+):[^:]+:(.+)' + let l:loclist = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:loclist, { + \ 'lnum': str2nr(l:match[1]), + \ 'text': s:AbbreviateMessage(l:match[2]), + \ 'type': 'W', + \ 'sub_type': 'style', + \}) + endfor + + return l:loclist +endfunction + +function! s:AbbreviateMessage(text) abort + let l:pattern = '\v\c^(line \d+ is too long):.*$' + + return substitute(a:text, l:pattern, '\1.', '') +endfunction + +function! s:GetCommand(buffer) abort + let l:file = ale#Escape(expand('#' . a:buffer . ':.')) + + return '%e rock --output-format=parsable ' . l:file +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'elvis', +\ 'callback': 'ale_linters#erlang#elvis#Handle', +\ 'executable': {b -> ale#Var(b, 'erlang_elvis_executable')}, +\ 'command': function('s:GetCommand'), +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/erlang/erlang_ls.vim b/dot_vim/plugged/ale/ale_linters/erlang/erlang_ls.vim new file mode 100644 index 0000000..b747e45 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/erlang/erlang_ls.vim @@ -0,0 +1,49 @@ +" Author: Dmitri Vereshchagin +" Description: LSP linter for Erlang files + +call ale#Set('erlang_erlang_ls_executable', 'erlang_ls') +call ale#Set('erlang_erlang_ls_log_dir', '') +call ale#Set('erlang_erlang_ls_log_level', 'info') + +function! s:GetCommand(buffer) abort + let l:log_dir = ale#Var(a:buffer, 'erlang_erlang_ls_log_dir') + let l:log_level = ale#Var(a:buffer, 'erlang_erlang_ls_log_level') + + let l:command = '%e' + + if !empty(l:log_dir) + let l:command .= ' --log-dir=' . ale#Escape(l:log_dir) + endif + + let l:command .= ' --log-level=' . ale#Escape(l:log_level) + + return l:command +endfunction + +function! s:FindProjectRoot(buffer) abort + let l:markers = ['_build/', 'erlang_ls.config', 'rebar.lock'] + + " This is a way to find Erlang/OTP root (the one that is managed + " by kerl or asdf). Useful if :ALEGoToDefinition takes us there. + let l:markers += ['.kerl_config'] + + for l:marker in l:markers + let l:path = l:marker[-1:] is# '/' + \ ? ale#path#FindNearestDirectory(a:buffer, l:marker) + \ : ale#path#FindNearestFile(a:buffer, l:marker) + + if !empty(l:path) + return ale#path#Dirname(l:path) + endif + endfor + + return '' +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'erlang_ls', +\ 'executable': {b -> ale#Var(b, 'erlang_erlang_ls_executable')}, +\ 'command': function('s:GetCommand'), +\ 'lsp': 'stdio', +\ 'project_root': function('s:FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/erlang/erlc.vim b/dot_vim/plugged/ale/ale_linters/erlang/erlc.vim new file mode 100644 index 0000000..0c67a73 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/erlang/erlc.vim @@ -0,0 +1,104 @@ +" Author: Magnus Ottenklinger - https://github.com/evnu + +let g:ale_erlang_erlc_executable = get(g:, 'ale_erlang_erlc_executable', 'erlc') +let g:ale_erlang_erlc_options = get(g:, 'ale_erlang_erlc_options', '') + +function! ale_linters#erlang#erlc#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'erlang_erlc_executable') +endfunction + +function! ale_linters#erlang#erlc#GetCommand(buffer) abort + let l:output_file = ale#util#Tempname() + call ale#command#ManageFile(a:buffer, l:output_file) + + let l:command = ale#Escape(ale_linters#erlang#erlc#GetExecutable(a:buffer)) + \ . ' -o ' . ale#Escape(l:output_file) + \ . ' ' . ale#Var(a:buffer, 'erlang_erlc_options') + \ . ' %t' + + return l:command +endfunction + +function! ale_linters#erlang#erlc#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " error.erl:4: variable 'B' is unbound + " error.erl:3: Warning: function main/0 is unused + " error.erl:4: Warning: variable 'A' is unused + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+:)? (Warning: )?(.+)$' + + " parse_transforms are a special case. The error message does not indicate a location: + " error.erl: undefined parse transform 'some_parse_transform' + let l:pattern_parse_transform = '\v(undefined parse transform .*)$' + let l:output = [] + + let l:pattern_no_module_definition = '\v(no module definition)$' + let l:pattern_unused = '\v(.* is unused)$' + + let l:is_hrl = fnamemodify(bufname(a:buffer), ':e') is# 'hrl' + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + " Determine if the output indicates an error. We distinguish between two cases: + " + " 1) normal errors match l:pattern + " 2) parse_transform errors match l:pattern_parse_transform + " + " If none of the patterns above match, the line can be ignored + if len(l:match) == 0 " not a 'normal' warning or error + let l:match_parse_transform = matchlist(l:line, l:pattern_parse_transform) + + if len(l:match_parse_transform) == 0 " also not a parse_transform error + continue + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': l:match_parse_transform[0], + \}) + + continue + endif + + let l:line = l:match[2] + let l:warning_or_text = l:match[4] + let l:text = l:match[5] + + " If this file is a header .hrl, ignore the following expected messages: + " - 'no module definition' + " - 'X is unused' + if l:is_hrl && ( + \ match(l:text, l:pattern_no_module_definition) != -1 + \ || match(l:text, l:pattern_unused) != -1 + \) + continue + endif + + if !empty(l:warning_or_text) + let l:type = 'W' + else + let l:type = 'E' + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:line, + \ 'col': 0, + \ 'type': l:type, + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'erlc', +\ 'executable': function('ale_linters#erlang#erlc#GetExecutable'), +\ 'command': function('ale_linters#erlang#erlc#GetCommand'), +\ 'callback': 'ale_linters#erlang#erlc#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/erlang/syntaxerl.vim b/dot_vim/plugged/ale/ale_linters/erlang/syntaxerl.vim new file mode 100644 index 0000000..5d555a8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/erlang/syntaxerl.vim @@ -0,0 +1,42 @@ +" Author: Dmitri Vereshchagin +" Description: SyntaxErl linter for Erlang files + +call ale#Set('erlang_syntaxerl_executable', 'syntaxerl') + +function! ale_linters#erlang#syntaxerl#RunHelpCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'erlang_syntaxerl_executable') + + return ale#command#Run( + \ a:buffer, + \ ale#Escape(l:executable) . ' -h', + \ function('ale_linters#erlang#syntaxerl#GetCommand'), + \) +endfunction + +function! ale_linters#erlang#syntaxerl#GetCommand(buffer, output, meta) abort + let l:use_b_option = match(a:output, '\C\V-b, --base\>') > -1 + + return '%e' . (l:use_b_option ? ' -b %s %t' : ' %t') +endfunction + +function! ale_linters#erlang#syntaxerl#Handle(buffer, lines) abort + let l:pattern = '\v\C:(\d+):( warning:)? (.+)' + let l:loclist = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:loclist, { + \ 'lnum': l:match[1] + 0, + \ 'text': l:match[3], + \ 'type': empty(l:match[2]) ? 'E' : 'W', + \}) + endfor + + return l:loclist +endfunction + +call ale#linter#Define('erlang', { +\ 'name': 'syntaxerl', +\ 'executable': {b -> ale#Var(b, 'erlang_syntaxerl_executable')}, +\ 'command': {b -> ale_linters#erlang#syntaxerl#RunHelpCommand(b)}, +\ 'callback': 'ale_linters#erlang#syntaxerl#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/eruby/erb.vim b/dot_vim/plugged/ale/ale_linters/eruby/erb.vim new file mode 100644 index 0000000..f343832 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/eruby/erb.vim @@ -0,0 +1,25 @@ +" Author: Matthias Guenther - https://wikimatze.de, Eddie Lebow https://github.com/elebow +" Description: ERB from the Ruby standard library, for eruby/erb files + +function! ale_linters#eruby#erb#GetCommand(buffer) abort + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + if empty(l:rails_root) + return 'erb -P -T - -x %t | ruby -c' + endif + + " Rails-flavored eRuby does not comply with the standard as understood by + " ERB, so we'll have to do some substitution. This does not reduce the + " effectiveness of the linter—the translated code is still evaluated. + return 'ruby -r erb -e ' . ale#Escape('puts ERB.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c' +endfunction + +call ale#linter#Define('eruby', { +\ 'name': 'erb', +\ 'aliases': ['erubylint'], +\ 'executable': 'erb', +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#eruby#erb#GetCommand'), +\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors', +\}) + diff --git a/dot_vim/plugged/ale/ale_linters/eruby/erblint.vim b/dot_vim/plugged/ale/ale_linters/eruby/erblint.vim new file mode 100644 index 0000000..1996018 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/eruby/erblint.vim @@ -0,0 +1,51 @@ +" Author: Roeland Moors - https://github.com/roelandmoors +" based on the ale ruumba and robocop linters +" Description: ERB Lint, support for https://github.com/Shopify/erb-lint + +call ale#Set('eruby_erblint_executable', 'erblint') +call ale#Set('eruby_erblint_options', '') + +function! ale_linters#eruby#erblint#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'eruby_erblint_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'erblint') + \ . ' --format json ' + \ . ale#Var(a:buffer, 'eruby_erblint_options') + \ . ' --stdin %s' +endfunction + +function! ale_linters#eruby#erblint#Handle(buffer, lines) abort + if empty(a:lines) + return [] + endif + + let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], []) + + if !has_key(l:errors, 'summary') + \|| l:errors['summary']['offenses'] == 0 + \|| empty(l:errors['files']) + return [] + endif + + let l:output = [] + + for l:error in l:errors['files'][0]['offenses'] + call add(l:output, { + \ 'lnum': l:error['location']['start_line'] + 0, + \ 'col': l:error['location']['start_column'] + 0, + \ 'end_col': l:error['location']['last_column'] + 0, + \ 'code': l:error['linter'], + \ 'text': l:error['message'], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('eruby', { +\ 'name': 'erblint', +\ 'executable': {b -> ale#Var(b, 'eruby_erblint_executable')}, +\ 'command': function('ale_linters#eruby#erblint#GetCommand'), +\ 'callback': 'ale_linters#eruby#erblint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/eruby/erubi.vim b/dot_vim/plugged/ale/ale_linters/eruby/erubi.vim new file mode 100644 index 0000000..ddca3f6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/eruby/erubi.vim @@ -0,0 +1,32 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: eruby checker using `erubi` + +function! ale_linters#eruby#erubi#GetCommand(buffer, output, meta) abort + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + if !empty(a:output) + " The empty command in CheckErubi returns nothing if erubi runs and + " emits an error if erubi is not present + return '' + endif + + if empty(l:rails_root) + return 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read).src') . '< %t | ruby -c' + endif + + " Rails-flavored eRuby does not comply with the standard as understood by + " Erubi, so we'll have to do some substitution. This does not reduce the + " effectiveness of the linter---the translated code is still evaluated. + return 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c' +endfunction + +call ale#linter#Define('eruby', { +\ 'name': 'erubi', +\ 'executable': 'ruby', +\ 'command': {buffer -> ale#command#Run( +\ buffer, +\ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'), +\ function('ale_linters#eruby#erubi#GetCommand'), +\ )}, +\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/eruby/erubis.vim b/dot_vim/plugged/ale/ale_linters/eruby/erubis.vim new file mode 100644 index 0000000..755c580 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/eruby/erubis.vim @@ -0,0 +1,23 @@ +" Author: Jake Zimmerman , Eddie Lebow https://github.com/elebow +" Description: eruby checker using `erubis`, instead of `erb` + +function! ale_linters#eruby#erubis#GetCommand(buffer) abort + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + if empty(l:rails_root) + return 'erubis -x %t | ruby -c' + endif + + " Rails-flavored eRuby does not comply with the standard as understood by + " Erubis, so we'll have to do some substitution. This does not reduce the + " effectiveness of the linter - the translated code is still evaluated. + return 'ruby -r erubis -e ' . ale#Escape('puts Erubis::Eruby.new($stdin.read.gsub(%{<%=},%{<%})).src') . '< %t | ruby -c' +endfunction + +call ale#linter#Define('eruby', { +\ 'name': 'erubis', +\ 'executable': 'erubis', +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#eruby#erubis#GetCommand'), +\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/eruby/ruumba.vim b/dot_vim/plugged/ale/ale_linters/eruby/ruumba.vim new file mode 100644 index 0000000..f415f1a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/eruby/ruumba.vim @@ -0,0 +1,62 @@ +" Author: aclemons - https://github.com/aclemons +" based on the ale rubocop linter +" Description: Ruumba, RuboCop linting for ERB templates. + +call ale#Set('eruby_ruumba_executable', 'ruumba') +call ale#Set('eruby_ruumba_options', '') + +function! ale_linters#eruby#ruumba#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'eruby_ruumba_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'ruumba') + \ . ' --format json --force-exclusion ' + \ . ale#Var(a:buffer, 'eruby_ruumba_options') + \ . ' --stdin %s' +endfunction + +function! ale_linters#eruby#ruumba#Handle(buffer, lines) abort + try + let l:errors = json_decode(a:lines[0]) + catch + return [] + endtry + + if !has_key(l:errors, 'summary') + \|| l:errors['summary']['offense_count'] == 0 + \|| empty(l:errors['files']) + return [] + endif + + let l:output = [] + + for l:error in l:errors['files'][0]['offenses'] + let l:start_col = l:error['location']['column'] + 0 + call add(l:output, { + \ 'lnum': l:error['location']['line'] + 0, + \ 'col': l:start_col, + \ 'end_col': l:start_col + l:error['location']['length'] - 1, + \ 'code': l:error['cop_name'], + \ 'text': l:error['message'], + \ 'type': ale_linters#eruby#ruumba#GetType(l:error['severity']), + \}) + endfor + + return l:output +endfunction + +function! ale_linters#eruby#ruumba#GetType(severity) abort + if a:severity is? 'convention' + \|| a:severity is? 'warning' + \|| a:severity is? 'refactor' + return 'W' + endif + + return 'E' +endfunction + +call ale#linter#Define('eruby', { +\ 'name': 'ruumba', +\ 'executable': {b -> ale#Var(b, 'eruby_ruumba_executable')}, +\ 'command': function('ale_linters#eruby#ruumba#GetCommand'), +\ 'callback': 'ale_linters#eruby#ruumba#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/fish/fish.vim b/dot_vim/plugged/ale/ale_linters/fish/fish.vim new file mode 100644 index 0000000..87ede29 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/fish/fish.vim @@ -0,0 +1,67 @@ +" Author: Niraj Thapaliya - https://github.com/nthapaliya +" Description: Lints fish files using fish -n + +function! ale_linters#fish#fish#Handle(buffer, lines) abort + " Matches patterns such as: + " + " home/.config/fish/functions/foo.fish (line 1): Missing end to balance this function definition + " function foo + " ^ + " + " OR, patterns such as: + " + " Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'. + " /tmp/vLz620o/258/test.fish (line 2): if set -q SSH_CLIENT || set -q SSH_TTY + " ^ + " + " fish -n can return errors in either format. + let l:pattern = '^\(.* (line \(\d\+\)): \)\(.*\)$' + let l:column_pattern = '^ *\^' + let l:output = [] + let l:column_offset = 0 + let l:last_line_with_message = '' + + for l:line in a:lines + " Look for error lines first. + let l:match = matchlist(l:line, l:pattern) + + if !empty(l:match) + if !empty(l:last_line_with_message) + let l:text = l:last_line_with_message + else + let l:text = l:match[3] + endif + + let l:column_offset = len(l:match[1]) + + let l:last_line_with_message = '' + call add(l:output, { + \ 'col': 0, + \ 'lnum': str2nr(l:match[2]), + \ 'text': l:text, + \}) + else + " Look for column markers like ' ^' second. + " The column index will be set according to how long the line is. + let l:column_match = matchstr(l:line, l:column_pattern) + + if !empty(l:column_match) && !empty(l:output) + let l:output[-1].col = len(l:column_match) - l:column_offset + let l:last_line_with_message = '' + else + let l:last_line_with_message = l:line + let l:column_offset = 0 + endif + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('fish', { +\ 'name': 'fish', +\ 'output_stream': 'stderr', +\ 'executable': 'fish', +\ 'command': 'fish -n %t', +\ 'callback': 'ale_linters#fish#fish#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/fortran/gcc.vim b/dot_vim/plugged/ale/ale_linters/fortran/gcc.vim new file mode 100644 index 0000000..6e97d6f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/fortran/gcc.vim @@ -0,0 +1,72 @@ +" Author: w0rp +" Description: gcc for Fortran files + +" This option can be set to 0 to use -ffixed-form +call ale#Set('fortran_gcc_use_free_form', 1) +call ale#Set('fortran_gcc_executable', 'gcc') +" Set this option to change the GCC options for warnings for Fortran. +call ale#Set('fortran_gcc_options', '-Wall') + +function! ale_linters#fortran#gcc#Handle(buffer, lines) abort + " We have to match a starting line and a later ending line together, + " like so. + " + " :21.34: + " Error: Expected comma in I/O list at (1) + let l:line_marker_pattern = ':\(\d\+\)[.:]\=\(\d\+\)\=:\=$' + let l:message_pattern = '^\(Error\|Warning\): \(.\+\)$' + let l:looking_for_message = 0 + let l:last_loclist_obj = {} + + let l:output = [] + + for l:line in a:lines + if l:looking_for_message + let l:match = matchlist(l:line, l:message_pattern) + else + let l:match = matchlist(l:line, l:line_marker_pattern) + endif + + if len(l:match) == 0 + continue + endif + + if l:looking_for_message + let l:looking_for_message = 0 + + " Now we have the text, we can set it and add the error. + let l:last_loclist_obj.text = l:match[2] + let l:last_loclist_obj.type = l:match[1] is# 'Warning' ? 'W' : 'E' + call add(l:output, l:last_loclist_obj) + else + let l:last_loclist_obj = { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \} + + " Start looking for the message and error type. + let l:looking_for_message = 1 + endif + endfor + + return l:output +endfunction + +function! ale_linters#fortran#gcc#GetCommand(buffer) abort + let l:layout_option = ale#Var(a:buffer, 'fortran_gcc_use_free_form') + \ ? '-ffree-form' + \ : '-ffixed-form' + + return '%e -S -x f95 -fsyntax-only ' . l:layout_option + \ . ale#Pad(ale#Var(a:buffer, 'fortran_gcc_options')) + \ . ' -' +endfunction + +call ale#linter#Define('fortran', { +\ 'name': 'gcc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'fortran_gcc_executable')}, +\ 'command': function('ale_linters#fortran#gcc#GetCommand'), +\ 'callback': 'ale_linters#fortran#gcc#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/fortran/language_server.vim b/dot_vim/plugged/ale/ale_linters/fortran/language_server.vim new file mode 100644 index 0000000..00aa057 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/fortran/language_server.vim @@ -0,0 +1,19 @@ +" Author: unpairedbracket ben.spiers22@gmail.com +" Description: A language server for fortran + +call ale#Set('fortran_language_server_executable', 'fortls') +call ale#Set('fortran_language_server_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#fortran#language_server#GetProjectRoot(buffer) abort + let l:fortls_file = ale#path#FindNearestFile(a:buffer, '.fortls') + + return !empty(l:fortls_file) ? fnamemodify(l:fortls_file, ':h') : '' +endfunction + +call ale#linter#Define('fortran', { +\ 'name': 'language_server', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'fortran_language_server_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#fortran#language_server#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/fountain/proselint.vim b/dot_vim/plugged/ale/ale_linters/fountain/proselint.vim new file mode 100644 index 0000000..353a2e5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/fountain/proselint.vim @@ -0,0 +1,9 @@ +" Author: Jansen Mitchell https://github.com/JansenMitchell +" Description: proselint for Fountain files + +call ale#linter#Define('fountain', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/fuse/fusionlint.vim b/dot_vim/plugged/ale/ale_linters/fuse/fusionlint.vim new file mode 100644 index 0000000..ffb25d3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/fuse/fusionlint.vim @@ -0,0 +1,33 @@ +" Author: RyanSquared +" Description: `fusion-lint` linter for FusionScript files + +call ale#Set('fuse_fusionlint_executable', 'fusion-lint') +call ale#Set('fuse_fusionlint_options', '') + +function! ale_linters#fuse#fusionlint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'fuse_fusionlint_options')) + \ . ' --filename %s -i' +endfunction + +function! ale_linters#fuse#fusionlint#Handle(buffer, lines) abort + let l:pattern = '^.*:\(\d\+\):\(\d\+\): (\([WE]\)\d\+) \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('fuse', { +\ 'name': 'fusionlint', +\ 'executable': {b -> ale#Var(b, 'fuse_fusionlint_executable')}, +\ 'command': function('ale_linters#fuse#fusionlint#GetCommand'), +\ 'callback': 'ale_linters#fuse#fusionlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/gitcommit/gitlint.vim b/dot_vim/plugged/ale/ale_linters/gitcommit/gitlint.vim new file mode 100644 index 0000000..4b9cec6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/gitcommit/gitlint.vim @@ -0,0 +1,51 @@ +" Author: Nick Yamane +" Description: gitlint for git commit message files + +call ale#Set('gitcommit_gitlint_executable', 'gitlint') +call ale#Set('gitcommit_gitlint_options', '') +call ale#Set('gitcommit_gitlint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#gitcommit#gitlint#GetExecutable(buffer) abort + return ale#python#FindExecutable(a:buffer, 'gitcommit_gitlint', ['gitlint']) +endfunction + +function! ale_linters#gitcommit#gitlint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'gitcommit_gitlint_options') + + return '%e' . ale#Pad(l:options) . ' lint' +endfunction + +function! ale_linters#gitcommit#gitlint#Handle(buffer, lines) abort + " Matches patterns line the following: + let l:pattern = '\v^(\d+): (\w+) (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[2] + + if !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + if l:code is# 'T2' || l:code is# 'B2' + continue + endif + endif + + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'text': l:match[3], + \ 'code': l:code, + \ 'type': 'E', + \} + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('gitcommit', { +\ 'name': 'gitlint', +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#gitcommit#gitlint#GetExecutable'), +\ 'command': function('ale_linters#gitcommit#gitlint#GetCommand'), +\ 'callback': 'ale_linters#gitcommit#gitlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/glsl/glslang.vim b/dot_vim/plugged/ale/ale_linters/glsl/glslang.vim new file mode 100644 index 0000000..bbddce9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/glsl/glslang.vim @@ -0,0 +1,40 @@ +" Author: Sven-Hendrik Haase +" Description: glslang-based linter for glsl files +" +" TODO: Once https://github.com/KhronosGroup/glslang/pull/1047 is accepted, +" we can use stdin. + +call ale#Set('glsl_glslang_executable', 'glslangValidator') +call ale#Set('glsl_glslang_options', '') + +function! ale_linters#glsl#glslang#GetCommand(buffer) abort + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'glsl_glslang_options')) + \ . ' -C %t' +endfunction + +function! ale_linters#glsl#glslang#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " ERROR: 0:5: 'foo' : undeclared identifier + let l:pattern = '^\(.\+\): \(\d\+\):\(\d\+\): \(.\+\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[3]), + \ 'col': str2nr(l:match[2]), + \ 'text': l:match[4], + \ 'type': l:match[1] is# 'ERROR' ? 'E' : 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('glsl', { +\ 'name': 'glslang', +\ 'executable': {b -> ale#Var(b, 'glsl_glslang_executable')}, +\ 'command': function('ale_linters#glsl#glslang#GetCommand'), +\ 'callback': 'ale_linters#glsl#glslang#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/glsl/glslls.vim b/dot_vim/plugged/ale/ale_linters/glsl/glslls.vim new file mode 100644 index 0000000..b62844c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/glsl/glslls.vim @@ -0,0 +1,30 @@ +" Author: Sven-Hendrik Haase +" Description: A language server for glsl + +call ale#Set('glsl_glslls_executable', 'glslls') +call ale#Set('glsl_glslls_logfile', '') + +function! ale_linters#glsl#glslls#GetCommand(buffer) abort + let l:logfile = ale#Var(a:buffer, 'glsl_glslls_logfile') + let l:logfile_args = '' + + if l:logfile isnot# '' + let l:logfile_args = ' --verbose -l ' . l:logfile + endif + + return '%e' . l:logfile_args . ' --stdin' +endfunction + +function! ale_linters#glsl#glslls#GetProjectRoot(buffer) abort + let l:project_root = ale#c#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h:h') : '' +endfunction + +call ale#linter#Define('glsl', { +\ 'name': 'glslls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'glsl_glslls_executable')}, +\ 'command': function('ale_linters#glsl#glslls#GetCommand'), +\ 'project_root': function('ale_linters#glsl#glslls#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/bingo.vim b/dot_vim/plugged/ale/ale_linters/go/bingo.vim new file mode 100644 index 0000000..1e43f8e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/bingo.vim @@ -0,0 +1,31 @@ +" Author: Jerko Steiner +" Description: https://github.com/saibing/bingo + +call ale#Set('go_bingo_executable', 'bingo') +call ale#Set('go_bingo_options', '--mode stdio') + +function! ale_linters#go#bingo#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) . '%e' . ale#Pad(ale#Var(a:buffer, 'go_bingo_options')) +endfunction + +function! ale_linters#go#bingo#FindProjectRoot(buffer) abort + let l:go_modules_off = ale#Var(a:buffer, 'go_go111module') is# 'off' + let l:project_root = l:go_modules_off ? + \ '' : ale#path#FindNearestFile(a:buffer, 'go.mod') + let l:mods = ':h' + + if empty(l:project_root) + let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') + let l:mods = ':h:h' + endif + + return !empty(l:project_root) ? fnamemodify(l:project_root, l:mods) : '' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'bingo', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'go_bingo_executable')}, +\ 'command': function('ale_linters#go#bingo#GetCommand'), +\ 'project_root': function('ale_linters#go#bingo#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/cspell.vim b/dot_vim/plugged/ale/ale_linters/go/cspell.vim new file mode 100644 index 0000000..f986a31 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Go files. + +call ale#handlers#cspell#DefineLinter('go') diff --git a/dot_vim/plugged/ale/ale_linters/go/gobuild.vim b/dot_vim/plugged/ale/ale_linters/go/gobuild.vim new file mode 100644 index 0000000..5210c5a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gobuild.vim @@ -0,0 +1,57 @@ +" Author: Joshua Rubin , Ben Reedy , +" Jeff Willette +" Description: go build for Go files +" inspired by work from dzhou121 + +call ale#Set('go_go_executable', 'go') +call ale#Set('go_gobuild_options', '') + +function! ale_linters#go#gobuild#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'go_gobuild_options') + + " Run go test in local directory with relative path + return ale#go#EnvString(a:buffer) + \ . ale#Var(a:buffer, 'go_go_executable') . ' test' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -c -o /dev/null ./' +endfunction + +function! ale_linters#go#gobuild#GetMatches(lines) abort + " Matches patterns like the following: + " + " file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args + " file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) + " file.go:5:2: expected declaration, found 'STRING' "log" + " go test returns relative paths so use tail of filename as part of pattern matcher + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:? (.+)$' + + return ale#util#GetMatches(a:lines, l:pattern) +endfunction + +function! ale_linters#go#gobuild#Handler(buffer, lines) abort + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + for l:match in ale_linters#go#gobuild#GetMatches(a:lines) + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gobuild', +\ 'aliases': ['go build'], +\ 'executable': {b -> ale#Var(b, 'go_go_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#gobuild#GetCommand'), +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#go#gobuild#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/gofmt.vim b/dot_vim/plugged/ale/ale_linters/go/gofmt.vim new file mode 100644 index 0000000..b313f9c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gofmt.vim @@ -0,0 +1,15 @@ +" Author: neersighted +" Description: gofmt for Go files + +function! ale_linters#go#gofmt#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) + \ . '%e -e %t' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gofmt', +\ 'output_stream': 'stderr', +\ 'executable': 'gofmt', +\ 'command': function('ale_linters#go#gofmt#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/golangci_lint.vim b/dot_vim/plugged/ale/ale_linters/go/golangci_lint.vim new file mode 100644 index 0000000..80431b9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/golangci_lint.vim @@ -0,0 +1,64 @@ +" Author: Sascha Grunert +" Description: Adds support of golangci-lint + +call ale#Set('go_golangci_lint_options', '--enable-all') +call ale#Set('go_golangci_lint_executable', 'golangci-lint') +call ale#Set('go_golangci_lint_package', 0) + +function! ale_linters#go#golangci_lint#GetCommand(buffer) abort + let l:filename = expand('#' . a:buffer . ':t') + let l:options = ale#Var(a:buffer, 'go_golangci_lint_options') + let l:lint_package = ale#Var(a:buffer, 'go_golangci_lint_package') + + + if l:lint_package + return ale#go#EnvString(a:buffer) + \ . '%e run ' + \ . l:options + endif + + return ale#go#EnvString(a:buffer) + \ . '%e run ' + \ . ale#Escape(l:filename) + \ . ' ' . l:options +endfunction + +function! ale_linters#go#golangci_lint#GetMatches(lines) abort + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)\s+\((.+)\)$' + + return ale#util#GetMatches(a:lines, l:pattern) +endfunction + +function! ale_linters#go#golangci_lint#Handler(buffer, lines) abort + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + for l:match in ale_linters#go#golangci_lint#GetMatches(a:lines) + if l:match[5] is# 'typecheck' + let l:msg_type = 'E' + else + let l:msg_type = 'W' + endif + + " l:match[1] will already be an absolute path, output from + " golangci_lint + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:msg_type, + \ 'text': l:match[4] . ' (' . l:match[5] . ')', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('go', { +\ 'name': 'golangci-lint', +\ 'executable': {b -> ale#Var(b, 'go_golangci_lint_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#golangci_lint#GetCommand'), +\ 'callback': 'ale_linters#go#golangci_lint#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/golint.vim b/dot_vim/plugged/ale/ale_linters/go/golint.vim new file mode 100644 index 0000000..79bfaeb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/golint.vim @@ -0,0 +1,21 @@ +" Author: neersighted +" Description: golint for Go files + +call ale#Set('go_golint_executable', 'golint') +call ale#Set('go_golint_options', '') + +function! ale_linters#go#golint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'go_golint_options') + + return ale#go#EnvString(a:buffer) . '%e' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'golint', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'go_golint_executable')}, +\ 'command': function('ale_linters#go#golint#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/gometalinter.vim b/dot_vim/plugged/ale/ale_linters/go/gometalinter.vim new file mode 100644 index 0000000..ac33a9f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gometalinter.vim @@ -0,0 +1,58 @@ +" Author: Ben Reedy , Jeff Willette +" Description: Adds support for the gometalinter suite for Go files + +call ale#Set('go_gometalinter_options', '') +call ale#Set('go_gometalinter_executable', 'gometalinter') +call ale#Set('go_gometalinter_lint_package', 0) + +function! ale_linters#go#gometalinter#GetCommand(buffer) abort + let l:filename = expand('#' . a:buffer . ':t') + let l:options = ale#Var(a:buffer, 'go_gometalinter_options') + let l:lint_package = ale#Var(a:buffer, 'go_gometalinter_lint_package') + + " BufferCdString is used so that we can be sure the paths output from gometalinter can + " be calculated to absolute paths in the Handler + if l:lint_package + return ale#go#EnvString(a:buffer) + \ . '%e' + \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' + endif + + return ale#go#EnvString(a:buffer) + \ . '%e' + \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(l:filename)) + \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' +endfunction + +function! ale_linters#go#gometalinter#GetMatches(lines) abort + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?(warning|error):?\s\*?(.+)$' + + return ale#util#GetMatches(a:lines, l:pattern) +endfunction + +function! ale_linters#go#gometalinter#Handler(buffer, lines) abort + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + for l:match in ale_linters#go#gometalinter#GetMatches(a:lines) + " l:match[1] will already be an absolute path, output from gometalinter + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': tolower(l:match[4]) is# 'warning' ? 'W' : 'E', + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gometalinter', +\ 'executable': {b -> ale#Var(b, 'go_gometalinter_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#gometalinter#GetCommand'), +\ 'callback': 'ale_linters#go#gometalinter#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/gopls.vim b/dot_vim/plugged/ale/ale_linters/go/gopls.vim new file mode 100644 index 0000000..8090983 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gopls.vim @@ -0,0 +1,39 @@ +" Author: w0rp +" Author: Jerko Steiner +" Description: https://github.com/saibing/gopls + +call ale#Set('go_gopls_executable', 'gopls') +call ale#Set('go_gopls_options', '--mode stdio') +call ale#Set('go_gopls_init_options', {}) +call ale#Set('go_gopls_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#go#gopls#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) + \ . '%e' + \ . ale#Pad(ale#Var(a:buffer, 'go_gopls_options')) +endfunction + +function! ale_linters#go#gopls#FindProjectRoot(buffer) abort + let l:go_modules_off = ale#Var(a:buffer, 'go_go111module') is# 'off' + let l:project_root = l:go_modules_off ? + \ '' : ale#path#FindNearestFile(a:buffer, 'go.mod') + let l:mods = ':h' + + if empty(l:project_root) + let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') + let l:mods = ':h:h' + endif + + return !empty(l:project_root) ? fnamemodify(l:project_root, l:mods) : '' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gopls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'go_gopls', [ +\ ale#go#GetGoPathExecutable('bin/gopls'), +\ ])}, +\ 'command': function('ale_linters#go#gopls#GetCommand'), +\ 'project_root': function('ale_linters#go#gopls#FindProjectRoot'), +\ 'initialization_options': {b -> ale#Var(b, 'go_gopls_init_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/gosimple.vim b/dot_vim/plugged/ale/ale_linters/go/gosimple.vim new file mode 100644 index 0000000..490d15a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gosimple.vim @@ -0,0 +1,12 @@ +" Author: Ben Reedy +" Description: gosimple for Go files + +call ale#linter#Define('go', { +\ 'name': 'gosimple', +\ 'executable': 'gosimple', +\ 'cwd': '%s:h', +\ 'command': {b -> ale#go#EnvString(b) . 'gosimple .'}, +\ 'callback': 'ale#handlers#go#Handler', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/gotype.vim b/dot_vim/plugged/ale/ale_linters/go/gotype.vim new file mode 100644 index 0000000..8fd6df2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/gotype.vim @@ -0,0 +1,24 @@ +" Author: Jelte Fennema +" Description: gotype for Go files + +function! ale_linters#go#gotype#GetExecutable(buffer) abort + if expand('#' . a:buffer . ':p') =~# '_test\.go$' + return '' + endif + + return 'gotype' +endfunction + +function! ale_linters#go#gotype#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) . 'gotype -e .' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gotype', +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#go#gotype#GetExecutable'), +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#gotype#GetCommand'), +\ 'callback': 'ale#handlers#go#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/govet.vim b/dot_vim/plugged/ale/ale_linters/go/govet.vim new file mode 100644 index 0000000..5da8261 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/govet.vim @@ -0,0 +1,28 @@ +" Author: neersighted +" Description: go vet for Go files +" +" Author: John Eikenberry +" Description: updated to work with go1.10 + +call ale#Set('go_go_executable', 'go') +call ale#Set('go_govet_options', '') + +function! ale_linters#go#govet#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'go_govet_options') + + return ale#go#EnvString(a:buffer) + \ . ale#Var(a:buffer, 'go_go_executable') . ' vet ' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' .' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'govet', +\ 'aliases': ['go vet'], +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'go_go_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#govet#GetCommand'), +\ 'callback': 'ale#handlers#go#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/langserver.vim b/dot_vim/plugged/ale/ale_linters/go/langserver.vim new file mode 100644 index 0000000..7130db4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/langserver.vim @@ -0,0 +1,29 @@ +" Author: Horacio Sanson +" Description: Support for go-langserver https://github.com/sourcegraph/go-langserver + +call ale#Set('go_langserver_executable', 'go-langserver') +call ale#Set('go_langserver_options', '') + +function! ale_linters#go#langserver#GetCommand(buffer) abort + let l:executable = [ale#Escape(ale#Var(a:buffer, 'go_langserver_executable'))] + let l:options = ale#Var(a:buffer, 'go_langserver_options') + let l:options = substitute(l:options, '-gocodecompletion', '', 'g') + let l:options = filter(split(l:options, ' '), 'empty(v:val) != 1') + + if ale#Var(a:buffer, 'completion_enabled') + call add(l:options, '-gocodecompletion') + endif + + let l:options = uniq(sort(l:options)) + let l:env = ale#go#EnvString(a:buffer) + + return l:env . join(extend(l:executable, l:options), ' ') +endfunction + +call ale#linter#Define('go', { +\ 'name': 'golangserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'go_langserver_executable')}, +\ 'command': function('ale_linters#go#langserver#GetCommand'), +\ 'project_root': function('ale#go#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/revive.vim b/dot_vim/plugged/ale/ale_linters/go/revive.vim new file mode 100644 index 0000000..b14b5ab --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/revive.vim @@ -0,0 +1,21 @@ +" Author: Penghui Liao +" Description: Adds support for revive + +call ale#Set('go_revive_executable', 'revive') +call ale#Set('go_revive_options', '') + +function! ale_linters#go#revive#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'go_revive_options') + + return ale#go#EnvString(a:buffer) . '%e' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'revive', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'go_revive_executable')}, +\ 'command': function('ale_linters#go#revive#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/go/staticcheck.vim b/dot_vim/plugged/ale/ale_linters/go/staticcheck.vim new file mode 100644 index 0000000..3662244 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/go/staticcheck.vim @@ -0,0 +1,34 @@ +" Author: Ben Reedy +" Description: staticcheck for Go files + +call ale#Set('go_staticcheck_executable', 'staticcheck') +call ale#Set('go_staticcheck_options', '') +call ale#Set('go_staticcheck_lint_package', 1) +call ale#Set('go_staticcheck_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#go#staticcheck#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'go_staticcheck_options') + let l:lint_package = ale#Var(a:buffer, 'go_staticcheck_lint_package') + let l:env = ale#go#EnvString(a:buffer) + + if l:lint_package + return l:env . '%e' + \ . (!empty(l:options) ? ' ' . l:options : '') . ' .' + endif + + return l:env . '%e' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %s:t' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'staticcheck', +\ 'executable': {b -> ale#path#FindExecutable(b, 'go_staticcheck', [ +\ ale#go#GetGoPathExecutable('bin/staticcheck'), +\ ])}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#go#staticcheck#GetCommand'), +\ 'callback': 'ale#handlers#go#Handler', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/graphql/eslint.vim b/dot_vim/plugged/ale/ale_linters/graphql/eslint.vim new file mode 100644 index 0000000..a98233e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/graphql/eslint.vim @@ -0,0 +1,10 @@ +" Author: Benjie Gillam +" Description: eslint for GraphQL files + +call ale#linter#Define('graphql', { +\ 'name': 'eslint', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/graphql/gqlint.vim b/dot_vim/plugged/ale/ale_linters/graphql/gqlint.vim new file mode 100644 index 0000000..6f1ca54 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/graphql/gqlint.vim @@ -0,0 +1,10 @@ +" Author: Michiel Westerbeek +" Description: Linter for GraphQL Schemas + +call ale#linter#Define('graphql', { +\ 'name': 'gqlint', +\ 'executable': 'gqlint', +\ 'cwd': '%s:h', +\ 'command': 'gqlint --reporter=simple %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/hack/hack.vim b/dot_vim/plugged/ale/ale_linters/hack/hack.vim new file mode 100644 index 0000000..822b5c8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/hack/hack.vim @@ -0,0 +1,22 @@ +" Author: Fred Emmott +" Description: Hack support via `hack lsp` + +call ale#Set('hack_hack_executable', 'hh_client') + +function! ale_linters#hack#hack#GetProjectRoot(buffer) abort + let l:hhconfig = ale#path#FindNearestFile(a:buffer, '.hhconfig') + + return !empty(l:hhconfig) ? fnamemodify(l:hhconfig, ':h') : '' +endfunction + +function! ale_linters#hack#hack#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'hack_hack_executable') +endfunction + +call ale#linter#Define('hack', { +\ 'name': 'hack', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#hack#hack#GetExecutable'), +\ 'command': '%e lsp --from vim-ale', +\ 'project_root': function('ale_linters#hack#hack#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/hack/hhast.vim b/dot_vim/plugged/ale/ale_linters/hack/hhast.vim new file mode 100644 index 0000000..5e6d4de --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/hack/hhast.vim @@ -0,0 +1,40 @@ +" Author: Fred Emmott +" Description: Hack support via `hhast lsp` + +call ale#Set('hack_hhast_executable', 'vendor/bin/hhast-lint') + +function! ale_linters#hack#hhast#GetProjectRoot(buffer) abort + " Find the hack root, then figure out if it's also an HHAST root. + " Don't try to use lint configurations from vendor/foo/bar/hhast-lint.json + let l:hhconfig = ale#path#FindNearestFile(a:buffer, '.hhconfig') + + if empty(l:hhconfig) + return '' + endif + + let l:root = fnamemodify(l:hhconfig, ':h') + let l:hhast_config = findfile('hhast-lint.json', l:root) + + return !empty(l:hhast_config) ? l:root : '' +endfunction + +function! ale_linters#hack#hhast#GetExecutable(buffer) abort + let l:root = ale_linters#hack#hhast#GetProjectRoot(a:buffer) + let l:relative = ale#Var(a:buffer, 'hack_hhast_executable') + let l:absolute = findfile(l:relative, l:root) + + return !empty(l:absolute) ? l:absolute : '' +endfunction + +function! ale_linters#hack#hhast#GetInitializationOptions(buffer) abort + return {'lintMode': 'open-files'} +endfunction + +call ale#linter#Define('hack', { +\ 'name': 'hhast', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#hack#hhast#GetExecutable'), +\ 'command': '%e --mode lsp --from vim-ale', +\ 'project_root': function('ale_linters#hack#hhast#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#hack#hhast#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haml/hamllint.vim b/dot_vim/plugged/ale/ale_linters/haml/hamllint.vim new file mode 100644 index 0000000..9fcd999 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haml/hamllint.vim @@ -0,0 +1,57 @@ +" Author: Patrick Lewis - https://github.com/patricklewis, thenoseman - https://github.com/thenoseman +" Description: haml-lint for Haml files + +call ale#Set('haml_hamllint_executable', 'haml-lint') + +function! ale_linters#haml#hamllint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'haml_hamllint_executable') +endfunction + +function! ale_linters#haml#hamllint#GetCommand(buffer) abort + let l:prefix = '' + + let l:rubocop_config_file_path = ale#path#FindNearestFile(a:buffer, '.rubocop.yml') + let l:hamllint_config_file_path = ale#path#FindNearestFile(a:buffer, '.haml-lint.yml') + + " Set HAML_LINT_RUBOCOP_CONF variable as it is needed for haml-lint to + " pick up the rubocop config. + " + " See https://github.com/brigade/haml-lint/blob/master/lib/haml_lint/linter/rubocop.rb#L89 + " HamlLint::Linter::RuboCop#rubocop_flags + if !empty(l:rubocop_config_file_path) + if has('win32') + let l:prefix = 'set HAML_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config_file_path) . ' &&' + else + let l:prefix = 'HAML_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config_file_path) + endif + endif + + return (!empty(l:prefix) ? l:prefix . ' ' : '') + \ . ale_linters#haml#hamllint#GetExecutable(a:buffer) + \ . (!empty(l:hamllint_config_file_path) ? ' --config ' . ale#Escape(l:hamllint_config_file_path) : '') + \ . ' %t' +endfunction + +function! ale_linters#haml#hamllint#Handle(buffer, lines) abort + " Matches patterns like the following: + " :51 [W] RuboCop: Use the new Ruby 1.9 hash syntax. + let l:pattern = '\v^.*:(\d+) \[([EW])\] (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2], + \ 'text': l:match[3] + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('haml', { +\ 'name': 'hamllint', +\ 'executable': function('ale_linters#haml#hamllint#GetExecutable'), +\ 'command': function('ale_linters#haml#hamllint#GetCommand'), +\ 'callback': 'ale_linters#haml#hamllint#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/handlebars/embertemplatelint.vim b/dot_vim/plugged/ale/ale_linters/handlebars/embertemplatelint.vim new file mode 100644 index 0000000..17c4d08 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/handlebars/embertemplatelint.vim @@ -0,0 +1,67 @@ +" Author: Adrian Zalewski +" Description: Ember-template-lint for checking Handlebars files + +call ale#Set('handlebars_embertemplatelint_executable', 'ember-template-lint') +call ale#Set('handlebars_embertemplatelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'handlebars_embertemplatelint', [ + \ 'node_modules/.bin/ember-template-lint', + \]) +endfunction + +function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer, version) abort + if ale#semver#GTE(a:version, [4, 0, 0]) + " --json was removed in favor of --format=json in ember-template-lint@4.0.0 + return '%e --format=json --filename %s' + endif + + if ale#semver#GTE(a:version, [1, 6, 0]) + " Reading from stdin was introduced in ember-template-lint@1.6.0 + return '%e --json --filename %s' + endif + + return '%e --json %t' +endfunction + +function! ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck(buffer) abort + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ ale_linters#handlebars#embertemplatelint#GetExecutable(a:buffer), + \ '%e --version', + \ function('ale_linters#handlebars#embertemplatelint#GetCommand'), + \) +endfunction + +function! ale_linters#handlebars#embertemplatelint#Handle(buffer, lines) abort + let l:output = [] + let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) + + for l:error in get(values(l:json), 0, []) + if has_key(l:error, 'fatal') + call add(l:output, { + \ 'lnum': get(l:error, 'line', 1), + \ 'col': get(l:error, 'column', 1), + \ 'text': l:error.message, + \ 'type': l:error.severity == 1 ? 'W' : 'E', + \}) + else + call add(l:output, { + \ 'lnum': l:error.line, + \ 'col': l:error.column, + \ 'text': l:error.rule . ': ' . l:error.message, + \ 'type': l:error.severity == 1 ? 'W' : 'E', + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('handlebars', { +\ 'name': 'embertemplatelint', +\ 'aliases': ['ember-template-lint'], +\ 'executable': function('ale_linters#handlebars#embertemplatelint#GetExecutable'), +\ 'command': function('ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck'), +\ 'callback': 'ale_linters#handlebars#embertemplatelint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/cabal_ghc.vim b/dot_vim/plugged/ale/ale_linters/haskell/cabal_ghc.vim new file mode 100644 index 0000000..1bb31eb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/cabal_ghc.vim @@ -0,0 +1,20 @@ +" Author: Eric Wolf +" Description: ghc for Haskell files called with cabal exec + +call ale#Set('haskell_cabal_ghc_options', '-fno-code -v0') + +function! ale_linters#haskell#cabal_ghc#GetCommand(buffer) abort + return 'cabal exec -- ghc ' + \ . ale#Var(a:buffer, 'haskell_cabal_ghc_options') + \ . ' %t' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'cabal_ghc', +\ 'aliases': ['cabal-ghc'], +\ 'output_stream': 'stderr', +\ 'executable': 'cabal', +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#haskell#cabal_ghc#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/cspell.vim b/dot_vim/plugged/ale/ale_linters/haskell/cspell.vim new file mode 100644 index 0000000..b0971a9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Haskell files. + +call ale#handlers#cspell#DefineLinter('haskell') diff --git a/dot_vim/plugged/ale/ale_linters/haskell/ghc.vim b/dot_vim/plugged/ale/ale_linters/haskell/ghc.vim new file mode 100644 index 0000000..9c3906b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/ghc.vim @@ -0,0 +1,18 @@ +" Author: w0rp +" Description: ghc for Haskell files + +call ale#Set('haskell_ghc_options', '-fno-code -v0') + +function! ale_linters#haskell#ghc#GetCommand(buffer) abort + return 'ghc ' + \ . ale#Var(a:buffer, 'haskell_ghc_options') + \ . ' %t' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'ghc', +\ 'output_stream': 'stderr', +\ 'executable': 'ghc', +\ 'command': function('ale_linters#haskell#ghc#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/ghc_mod.vim b/dot_vim/plugged/ale/ale_linters/haskell/ghc_mod.vim new file mode 100644 index 0000000..30e96b4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/ghc_mod.vim @@ -0,0 +1,19 @@ +" Author: wizzup +" Description: ghc-mod for Haskell files + +call ale#Set('haskell_ghc_mod_executable', 'ghc-mod') + +function! ale_linters#haskell#ghc_mod#GetCommand (buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_ghc_mod_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'ghc-mod') + \ . ' --map-file %s=%t check %s' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'ghc_mod', +\ 'aliases': ['ghc-mod'], +\ 'executable': {b -> ale#Var(b, 'haskell_ghc_mod_executable')}, +\ 'command': function('ale_linters#haskell#ghc_mod#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/hdevtools.vim b/dot_vim/plugged/ale/ale_linters/haskell/hdevtools.vim new file mode 100644 index 0000000..3e55e4f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/hdevtools.vim @@ -0,0 +1,20 @@ +" Author: rob-b, Takano Akio +" Description: hdevtools for Haskell files + +call ale#Set('haskell_hdevtools_executable', 'hdevtools') +call ale#Set('haskell_hdevtools_options', get(g:, 'hdevtools_options', '-g -Wall')) + +function! ale_linters#haskell#hdevtools#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hdevtools_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hdevtools') + \ . ' check' . ale#Pad(ale#Var(a:buffer, 'haskell_hdevtools_options')) + \ . ' -p %s %t' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'hdevtools', +\ 'executable': {b -> ale#Var(b, 'haskell_hdevtools_executable')}, +\ 'command': function('ale_linters#haskell#hdevtools#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/hie.vim b/dot_vim/plugged/ale/ale_linters/haskell/hie.vim new file mode 100644 index 0000000..c4b5f1d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/hie.vim @@ -0,0 +1,41 @@ +" Author: Luxed +" Description: A language server for Haskell + +call ale#Set('haskell_hie_executable', 'hie') + +function! ale_linters#haskell#hie#GetProjectRoot(buffer) abort + " Search for the stack file first + let l:project_file = ale#path#FindNearestFile(a:buffer, 'stack.yaml') + + " If it's empty, search for the cabal file + if empty(l:project_file) + " Search all of the paths except for the root filesystem path. + let l:paths = join( + \ ale#path#Upwards(expand('#' . a:buffer . ':p:h'))[:-2], + \ ',' + \) + let l:project_file = globpath(l:paths, '*.cabal') + endif + + " If we still can't find one, use the current file. + if empty(l:project_file) + let l:project_file = expand('#' . a:buffer . ':p') + endif + + return fnamemodify(l:project_file, ':h') +endfunction + +function! ale_linters#haskell#hie#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hie_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hie') + \ . ' --lsp' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'hie', +\ 'lsp': 'stdio', +\ 'command': function('ale_linters#haskell#hie#GetCommand'), +\ 'executable': {b -> ale#Var(b, 'haskell_hie_executable')}, +\ 'project_root': function('ale_linters#haskell#hie#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/hlint.vim b/dot_vim/plugged/ale/ale_linters/haskell/hlint.vim new file mode 100644 index 0000000..1425251 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/hlint.vim @@ -0,0 +1,46 @@ +" Author: jparoz +" Description: hlint for Haskell files + +call ale#Set('haskell_hlint_executable', 'hlint') +call ale#Set('haskell_hlint_options', get(g:, 'hlint_options', '')) + +function! ale_linters#haskell#hlint#Handle(buffer, lines) abort + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + if l:error.severity is# 'Error' + let l:type = 'E' + elseif l:error.severity is# 'Suggestion' + let l:type = 'I' + else + let l:type = 'W' + endif + + call add(l:output, { + \ 'lnum': str2nr(l:error.startLine), + \ 'col': str2nr(l:error.startColumn), + \ 'end_lnum': str2nr(l:error.endLine), + \ 'end_col': str2nr(l:error.endColumn), + \ 'text': l:error.severity . ': ' . l:error.hint . '. Found: ' . l:error.from . ' Why not: ' . l:error.to, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#haskell#hlint#GetCommand(buffer) abort + let l:hlintopts = '--color=never --json' + + return ale#handlers#hlint#GetExecutable(a:buffer) + \ . ' ' . ale#Var(a:buffer, 'haskell_hlint_options') + \ . ' ' . l:hlintopts + \ . ' -' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'hlint', +\ 'executable': {b -> ale#Var(b, 'haskell_hlint_executable')}, +\ 'command': function('ale_linters#haskell#hlint#GetCommand') , +\ 'callback': 'ale_linters#haskell#hlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/hls.vim b/dot_vim/plugged/ale/ale_linters/haskell/hls.vim new file mode 100644 index 0000000..7f9efc3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/hls.vim @@ -0,0 +1,65 @@ +" Author: Yen3 +" Description: A language server for haskell +" The file is based on hie.vim (author: Luxed +" ). It search more project root files. +" +call ale#Set('haskell_hls_executable', 'haskell-language-server-wrapper') +call ale#Set('haskell_hls_config', {}) + +function! ale_linters#haskell#hls#FindRootFile(buffer) abort + let l:serach_root_files = [ + \ 'stack.yaml', + \ 'cabal.project', + \ 'package.yaml', + \ 'hie.yaml' + \ ] + + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + for l:root_file in l:serach_root_files + if filereadable(l:path . l:root_file) + return l:path + endif + endfor + endfor + + return '' +endfunction + +function! ale_linters#haskell#hls#GetProjectRoot(buffer) abort + " Search for the project file first + let l:project_file = ale_linters#haskell#hls#FindRootFile(a:buffer) + + " If it's empty, search for the cabal file + if empty(l:project_file) + " Search all of the paths except for the root filesystem path. + let l:paths = join( + \ ale#path#Upwards(expand('#' . a:buffer . ':p:h'))[:-2], + \ ',' + \) + let l:project_file = globpath(l:paths, '*.cabal') + endif + + " If we still can't find one, use the current file. + if empty(l:project_file) + let l:project_file = expand('#' . a:buffer . ':p') + endif + + return fnamemodify(l:project_file, ':h') +endfunction + +function! ale_linters#haskell#hls#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hls_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, + \ 'haskell-language-server-wrapper') + \ . ' --lsp' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'hls', +\ 'lsp': 'stdio', +\ 'command': function('ale_linters#haskell#hls#GetCommand'), +\ 'executable': {b -> ale#Var(b, 'haskell_hls_executable')}, +\ 'project_root': function('ale_linters#haskell#hls#GetProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'haskell_hls_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/stack_build.vim b/dot_vim/plugged/ale/ale_linters/haskell/stack_build.vim new file mode 100644 index 0000000..8f2d9fd --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/stack_build.vim @@ -0,0 +1,23 @@ +" Author: Jake Zimmerman +" Description: Like stack-ghc, but for entire projects +" +" Note: Ideally, this would *only* typecheck. Right now, it also does codegen. +" See . + +call ale#Set('haskell_stack_build_options', '--fast') + +function! ale_linters#haskell#stack_build#GetCommand(buffer) abort + let l:flags = ale#Var(a:buffer, 'haskell_stack_build_options') + + return 'stack build ' . l:flags +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'stack_build', +\ 'aliases': ['stack-build'], +\ 'output_stream': 'stderr', +\ 'executable': function('ale#handlers#haskell#GetStackExecutable'), +\ 'command': function('ale_linters#haskell#stack_build#GetCommand'), +\ 'lint_file': 1, +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/haskell/stack_ghc.vim b/dot_vim/plugged/ale/ale_linters/haskell/stack_ghc.vim new file mode 100644 index 0000000..51ecc74 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/haskell/stack_ghc.vim @@ -0,0 +1,21 @@ +" Author: w0rp +" Description: ghc for Haskell files, using Stack + +call ale#Set('haskell_stack_ghc_options', '-fno-code -v0') + +function! ale_linters#haskell#stack_ghc#GetCommand(buffer) abort + return ale#handlers#haskell#GetStackExecutable(a:buffer) + \ . ' ghc -- ' + \ . ale#Var(a:buffer, 'haskell_stack_ghc_options') + \ . ' %t' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'stack_ghc', +\ 'aliases': ['stack-ghc'], +\ 'output_stream': 'stderr', +\ 'executable': function('ale#handlers#haskell#GetStackExecutable'), +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#haskell#stack_ghc#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/help/alex.vim b/dot_vim/plugged/ale/ale_linters/help/alex.vim new file mode 100644 index 0000000..9be00a8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/help/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for help files + +call ale#handlers#alex#DefineLinter('help', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/help/cspell.vim b/dot_vim/plugged/ale/ale_linters/help/cspell.vim new file mode 100644 index 0000000..92eb950 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/help/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for help files. + +call ale#handlers#cspell#DefineLinter('help') diff --git a/dot_vim/plugged/ale/ale_linters/help/proselint.vim b/dot_vim/plugged/ale/ale_linters/help/proselint.vim new file mode 100644 index 0000000..6212450 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/help/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for Vim help files + +call ale#linter#Define('help', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/help/writegood.vim b/dot_vim/plugged/ale/ale_linters/help/writegood.vim new file mode 100644 index 0000000..eeb21a7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/help/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for vim Help files + +call ale#handlers#writegood#DefineLinter('help') diff --git a/dot_vim/plugged/ale/ale_linters/html/alex.vim b/dot_vim/plugged/ale/ale_linters/html/alex.vim new file mode 100644 index 0000000..9775675 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for HTML files + +call ale#handlers#alex#DefineLinter('html', '--html') diff --git a/dot_vim/plugged/ale/ale_linters/html/angular.vim b/dot_vim/plugged/ale/ale_linters/html/angular.vim new file mode 100644 index 0000000..4f368fb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/angular.vim @@ -0,0 +1,56 @@ +" Author: w0rp +" Description: tsserver integration for ALE + +call ale#Set('html_angular_executable', 'ngserver') +call ale#Set('html_angular_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#html#angular#GetProjectRoot(buffer) abort + return ale#path#Dirname( + \ ale#path#FindNearestDirectory(a:buffer, 'node_modules') + \) +endfunction + +function! ale_linters#html#angular#GetExecutable(buffer) abort + return 'node' +endfunction + +function! ale_linters#html#angular#GetCommand(buffer) abort + let l:language_service_dir = ale#path#Simplify( + \ ale#path#FindNearestDirectory( + \ a:buffer, + \ 'node_modules/@angular/language-service' + \ ) + \) + + if empty(l:language_service_dir) + return '' + endif + + let l:language_service_dir = fnamemodify(l:language_service_dir, ':h') + let l:typescript_dir = ale#path#Simplify( + \ fnamemodify(l:language_service_dir, ':h:h') + \ . '/typescript' + \) + let l:script = ale#path#FindExecutable(a:buffer, 'html_angular', [ + \ 'node_modules/@angular/language-server/bin/ngserver', + \ 'node_modules/@angular/language-server/index.js', + \]) + + if !filereadable(l:script) + return '' + endif + + return ale#Escape('node') . ' ' . ale#Escape(l:script) + \ . ' --ngProbeLocations ' . ale#Escape(l:language_service_dir) + \ . ' --tsProbeLocations ' . ale#Escape(l:typescript_dir) + \ . ' --stdio' +endfunction + +call ale#linter#Define('html', { +\ 'name': 'angular', +\ 'aliases': ['angular-language-server'], +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#html#angular#GetExecutable'), +\ 'command': function('ale_linters#html#angular#GetCommand'), +\ 'project_root': function('ale_linters#html#angular#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/cspell.vim b/dot_vim/plugged/ale/ale_linters/html/cspell.vim new file mode 100644 index 0000000..743350e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for HTML files. + +call ale#handlers#cspell#DefineLinter('html') diff --git a/dot_vim/plugged/ale/ale_linters/html/fecs.vim b/dot_vim/plugged/ale/ale_linters/html/fecs.vim new file mode 100644 index 0000000..15e00e1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/fecs.vim @@ -0,0 +1,9 @@ +" Author: harttle +" Description: fecs for HTMl files + +call ale#linter#Define('html', { +\ 'name': 'fecs', +\ 'executable': function('ale#handlers#fecs#GetExecutable'), +\ 'command': function('ale#handlers#fecs#GetCommand'), +\ 'callback': 'ale#handlers#fecs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/htmlhint.vim b/dot_vim/plugged/ale/ale_linters/html/htmlhint.vim new file mode 100644 index 0000000..25bf513 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/htmlhint.vim @@ -0,0 +1,32 @@ +" Author: KabbAmine , deathmaz <00maz1987@gmail.com>, diartyz +" Description: HTMLHint for checking html files + +call ale#Set('html_htmlhint_options', '') +call ale#Set('html_htmlhint_executable', 'htmlhint') +call ale#Set('html_htmlhint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#html#htmlhint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'html_htmlhint_options') + let l:config = l:options !~# '--config' + \ ? ale#path#FindNearestFile(a:buffer, '.htmlhintrc') + \ : '' + + if !empty(l:config) + let l:options .= ' --config ' . ale#Escape(l:config) + endif + + if !empty(l:options) + let l:options = substitute(l:options, '--format=unix', '', '') + endif + + return '%e' . ale#Pad(l:options) . ' --format=unix %t' +endfunction + +call ale#linter#Define('html', { +\ 'name': 'htmlhint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'html_htmlhint', [ +\ 'node_modules/.bin/htmlhint', +\ ])}, +\ 'command': function('ale_linters#html#htmlhint#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/proselint.vim b/dot_vim/plugged/ale/ale_linters/html/proselint.vim new file mode 100644 index 0000000..9fd7d67 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for HTML files + +call ale#linter#Define('html', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/stylelint.vim b/dot_vim/plugged/ale/ale_linters/html/stylelint.vim new file mode 100644 index 0000000..6b7aba4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/stylelint.vim @@ -0,0 +1,27 @@ +" Author: Filipe Kiss http://github.com/filipekiss + +call ale#Set('html_stylelint_executable', 'stylelint') +call ale#Set('html_stylelint_options', '') +call ale#Set('html_stylelint_use_global', 0) + +function! ale_linters#html#stylelint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'html_stylelint', [ + \ 'node_modules/.bin/stylelint', + \]) +endfunction + +function! ale_linters#html#stylelint#GetCommand(buffer) abort + let l:executable = ale_linters#html#stylelint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'html_stylelint_options') + + return ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('html', { +\ 'name': 'stylelint', +\ 'executable': function('ale_linters#html#stylelint#GetExecutable'), +\ 'command': function('ale_linters#html#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/tidy.vim b/dot_vim/plugged/ale/ale_linters/html/tidy.vim new file mode 100644 index 0000000..1e476d4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/tidy.vim @@ -0,0 +1,70 @@ +" Author: KabbAmine +" Description: This file adds support for checking HTML code with tidy. + +let g:ale_html_tidy_executable = get(g:, 'ale_html_tidy_executable', 'tidy') +let g:ale_html_tidy_options = get(g:, 'ale_html_tidy_options', '-q -e -language en') + +function! ale_linters#html#tidy#GetCommand(buffer) abort + " Specify file encoding in options + " (Idea taken from https://github.com/scrooloose/syntastic/blob/master/syntax_checkers/html/tidy.vim) + let l:file_encoding = get({ + \ 'ascii': '-ascii', + \ 'big5': '-big5', + \ 'cp1252': '-win1252', + \ 'cp850': '-ibm858', + \ 'cp932': '-shiftjis', + \ 'iso-2022-jp': '-iso-2022', + \ 'latin1': '-latin1', + \ 'macroman': '-mac', + \ 'sjis': '-shiftjis', + \ 'utf-16le': '-utf16le', + \ 'utf-16': '-utf16', + \ 'utf-8': '-utf8', + \ }, &fileencoding, '-utf8') + + " On macOS, old tidy (released on 31 Oct 2006) is installed. It does not + " consider HTML5 so we should avoid it. + let l:executable = ale#Var(a:buffer, 'html_tidy_executable') + + if has('mac') && l:executable is# 'tidy' && exists('*exepath') + \ && exepath(l:executable) is# '/usr/bin/tidy' + return '' + endif + + return printf('%s %s %s -', + \ l:executable, + \ ale#Var(a:buffer, 'html_tidy_options'), + \ l:file_encoding + \) +endfunction + +function! ale_linters#html#tidy#Handle(buffer, lines) abort + " Matches patterns lines like the following: + " line 7 column 5 - Warning: missing before + let l:pattern = '^line \(\d\+\) column \(\d\+\) - \(Warning\|Error\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:line = l:match[1] + 0 + let l:col = l:match[2] + 0 + let l:type = l:match[3] is# 'Error' ? 'E' : 'W' + let l:text = l:match[4] + + call add(l:output, { + \ 'lnum': l:line, + \ 'col': l:col, + \ 'text': l:text, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('html', { +\ 'name': 'tidy', +\ 'executable': {b -> ale#Var(b, 'html_tidy_executable')}, +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#html#tidy#GetCommand'), +\ 'callback': 'ale_linters#html#tidy#Handle', +\ }) diff --git a/dot_vim/plugged/ale/ale_linters/html/vscodehtml.vim b/dot_vim/plugged/ale/ale_linters/html/vscodehtml.vim new file mode 100644 index 0000000..46814a0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/vscodehtml.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode html language server + +function! ale_linters#html#vscodehtml#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('html', { +\ 'name': 'vscodehtml', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-html-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#html#vscodehtml#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/html/writegood.vim b/dot_vim/plugged/ale/ale_linters/html/writegood.vim new file mode 100644 index 0000000..6a2bd8e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/html/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for html files + +call ale#handlers#writegood#DefineLinter('html') diff --git a/dot_vim/plugged/ale/ale_linters/idris/idris.vim b/dot_vim/plugged/ale/ale_linters/idris/idris.vim new file mode 100644 index 0000000..879e92f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/idris/idris.vim @@ -0,0 +1,81 @@ +" Author: Scott Bonds +" Description: default Idris compiler + +call ale#Set('idris_idris_executable', 'idris') +call ale#Set('idris_idris_options', '--total --warnpartial --warnreach --warnipkg') + +function! ale_linters#idris#idris#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'idris_idris_options') + + return '%e' . ale#Pad(l:options) . ' --check %s' +endfunction + +function! ale_linters#idris#idris#Handle(buffer, lines) abort + " This was copied almost verbatim from ale#handlers#haskell#HandleGHCFormat + " + " Look for lines like the following: + " foo.idr:2:6:When checking right hand side of main with expected type + " bar.idr:11:11-13: + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)(-\d+)?:(.*)?$' + let l:output = [] + + let l:corrected_lines = [] + + for l:line in a:lines + if len(matchlist(l:line, l:pattern)) > 0 + call add(l:corrected_lines, l:line) + elseif len(l:corrected_lines) > 0 + if l:line is# '' + let l:corrected_lines[-1] .= ' ' " turn a blank line into a space + else + let l:corrected_lines[-1] .= l:line + endif + + let l:corrected_lines[-1] = substitute(l:corrected_lines[-1], '\s\+', ' ', 'g') + endif + endfor + + for l:line in l:corrected_lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + continue + endif + + if !ale#path#IsBufferPath(a:buffer, l:match[1]) + continue + endif + + let l:errors = matchlist(l:match[5], '\v([wW]arning|[eE]rror) - ?(.*)') + + if len(l:errors) > 0 + let l:ghc_type = l:errors[1] + let l:text = l:errors[2] + else + let l:ghc_type = '' + let l:text = l:match[5][:0] is# ' ' ? l:match[5][1:] : l:match[5] + endif + + if l:ghc_type is? 'Warning' + let l:type = 'W' + else + let l:type = 'E' + endif + + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:text, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('idris', { +\ 'name': 'idris', +\ 'executable': {b -> ale#Var(b, 'idris_idris_executable')}, +\ 'command': function('ale_linters#idris#idris#GetCommand'), +\ 'callback': 'ale_linters#idris#idris#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ink/ls.vim b/dot_vim/plugged/ale/ale_linters/ink/ls.vim new file mode 100644 index 0000000..00b2f32 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ink/ls.vim @@ -0,0 +1,35 @@ +" Author: Andreww Hayworth +" Description: Integrate ALE with ink-language-server + +call ale#Set('ink_ls_executable', 'ink-language-server') +call ale#Set('ink_ls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('ink_ls_initialization_options', {}) + +function! ale_linters#ink#ls#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'ink_ls', [ + \ 'ink-language-server', + \ 'node_modules/.bin/ink-language-server', + \]) +endfunction + +function! ale_linters#ink#ls#GetCommand(buffer) abort + let l:executable = ale_linters#ink#ls#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +function! ale_linters#ink#ls#FindProjectRoot(buffer) abort + let l:main_file = get(ale#Var(a:buffer, 'ink_ls_initialization_options'), 'mainStoryPath', 'main.ink') + let l:config = ale#path#ResolveLocalPath(a:buffer, l:main_file, expand('#' . a:buffer . ':p')) + + return ale#path#Dirname(l:config) +endfunction + +call ale#linter#Define('ink', { +\ 'name': 'ink-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#ink#ls#GetExecutable'), +\ 'command': function('ale_linters#ink#ls#GetCommand'), +\ 'project_root': function('ale_linters#ink#ls#FindProjectRoot'), +\ 'initialization_options': {b -> ale#Var(b, 'ink_ls_initialization_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/inko/inko.vim b/dot_vim/plugged/ale/ale_linters/inko/inko.vim new file mode 100644 index 0000000..1155889 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/inko/inko.vim @@ -0,0 +1,33 @@ +" Author: Yorick Peterse +" Description: linting of Inko source code using the Inko compiler + +call ale#Set('inko_inko_executable', 'inko') + +function! ale_linters#inko#inko#GetCommand(buffer) abort + let l:include = '' + + " Include the tests source directory, but only for test files. + if expand('#' . a:buffer . ':p') =~? '\vtests[/\\]test[/\\]' + let l:test_dir = ale#path#FindNearestDirectory(a:buffer, 'tests') + + if isdirectory(l:test_dir) + let l:include = '--include ' . ale#Escape(l:test_dir) + endif + endif + + " We use %s instead of %t so the compiler determines the correct module + " names for the file being edited. Not doing so may lead to errors in + " certain cases. + return '%e build --check --format=json' + \ . ale#Pad(l:include) + \ . ' %s' +endfunction + +call ale#linter#Define('inko', { +\ 'name': 'inko', +\ 'executable': {b -> ale#Var(b, 'inko_inko_executable')}, +\ 'command': function('ale_linters#inko#inko#GetCommand'), +\ 'callback': 'ale#handlers#inko#Handle', +\ 'output_stream': 'stderr', +\ 'lint_file': 1 +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ispc/ispc.vim b/dot_vim/plugged/ale/ale_linters/ispc/ispc.vim new file mode 100644 index 0000000..eb36511 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ispc/ispc.vim @@ -0,0 +1,45 @@ +" Author: Martino Pilia +" Description: Lint ispc files with the Intel(R) SPMD Program Compiler + +call ale#Set('ispc_ispc_executable', 'ispc') +call ale#Set('ispc_ispc_options', '') + +function! ale_linters#ispc#ispc#GetCommand(buffer) abort + " --nowrap: do not wrap message lines + return '%e --nowrap' + \ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer))) + \ . ale#Pad(ale#Var(a:buffer, 'ispc_ispc_options')) + \ . ' %s' +endfunction + +" Note that we ignore the two warnings in the beginning of the compiler output +" ('no output file specified' and 'no --target specified'), since they have +" nothing to do with linting. +function! ale_linters#ispc#ispc#Handle(buffer, lines) abort + " Message format: :: : + " As far as I know, can be any of: + " 'error', 'Error', 'fatal error', 'Warning', 'Performance Warning' + let l:re = '\v.+:([0-9]+):([0-9]+):\s+([^:]+):\s+(.+)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:re) + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'type': l:match[3] =~? 'error' ? 'E' : 'W', + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('ispc', { +\ 'name': 'ispc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'ispc_ispc_executable')}, +\ 'command': function('ale_linters#ispc#ispc#GetCommand'), +\ 'callback': 'ale_linters#ispc#ispc#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/java/checkstyle.vim b/dot_vim/plugged/ale/ale_linters/java/checkstyle.vim new file mode 100644 index 0000000..1ccbc50 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/checkstyle.vim @@ -0,0 +1,73 @@ +" Author: Devon Meunier +" Description: checkstyle for Java files + +call ale#Set('java_checkstyle_executable', 'checkstyle') +call ale#Set('java_checkstyle_config', '/google_checks.xml') +call ale#Set('java_checkstyle_options', '') + +function! ale_linters#java#checkstyle#Handle(buffer, lines) abort + let l:output = [] + + " modern checkstyle versions + let l:pattern = '\v\[(WARN|ERROR)\] [a-zA-Z]?:?[^:]+:(\d+):(\d+)?:? (.*) \[(.+)\]' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'type': l:match[1] is? 'WARN' ? 'W' : 'E', + \ 'sub_type': 'style', + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'code': l:match[5], + \}) + endfor + + if !empty(l:output) + return l:output + endif + + " old checkstyle versions + let l:pattern = '\v(.+):(\d+): ([^:]+): (.+)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'type': l:match[3] is? 'warning' ? 'W' : 'E', + \ 'sub_type': 'style', + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +function! s:GetConfig(buffer, config) abort + if ale#path#IsAbsolute(a:config) + return a:config + endif + + let s:file = ale#path#FindNearestFile(a:buffer, a:config) + + return !empty(s:file) ? s:file : a:config +endfunction + +function! ale_linters#java#checkstyle#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'java_checkstyle_options') + let l:config_option = ale#Var(a:buffer, 'java_checkstyle_config') + let l:config = l:options !~# '\v(^| )-c ' && !empty(l:config_option) + \ ? s:GetConfig(a:buffer, l:config_option) + \ : '' + + return '%e' + \ . ale#Pad(l:options) + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') + \ . ' %s' +endfunction + +call ale#linter#Define('java', { +\ 'name': 'checkstyle', +\ 'executable': {b -> ale#Var(b, 'java_checkstyle_executable')}, +\ 'command': function('ale_linters#java#checkstyle#GetCommand'), +\ 'callback': 'ale_linters#java#checkstyle#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/java/cspell.vim b/dot_vim/plugged/ale/ale_linters/java/cspell.vim new file mode 100644 index 0000000..a6eecc0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Java files. + +call ale#handlers#cspell#DefineLinter('java') diff --git a/dot_vim/plugged/ale/ale_linters/java/eclipselsp.vim b/dot_vim/plugged/ale/ale_linters/java/eclipselsp.vim new file mode 100644 index 0000000..ad7cbeb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/eclipselsp.vim @@ -0,0 +1,200 @@ +" Author: Horacio Sanson +" Description: Support for the Eclipse language server https://github.com/eclipse/eclipse.jdt.ls + +let s:version_cache = {} + +call ale#Set('java_eclipselsp_path', ale#path#Simplify($HOME . '/eclipse.jdt.ls')) +call ale#Set('java_eclipselsp_config_path', '') +call ale#Set('java_eclipselsp_workspace_path', '') +call ale#Set('java_eclipselsp_executable', 'java') +call ale#Set('java_eclipselsp_javaagent', '') + +function! ale_linters#java#eclipselsp#Executable(buffer) abort + return ale#Var(a:buffer, 'java_eclipselsp_executable') +endfunction + +function! ale_linters#java#eclipselsp#TargetPath(buffer) abort + return ale#Var(a:buffer, 'java_eclipselsp_path') +endfunction + +function! ale_linters#java#eclipselsp#JarPath(buffer) abort + let l:path = ale_linters#java#eclipselsp#TargetPath(a:buffer) + + if has('win32') + let l:platform = 'win32' + elseif has('macunix') + let l:platform = 'macosx' + else + let l:platform = 'linux' + endif + + " Search jar file within repository path when manually built using mvn + let l:files = globpath(l:path, '**/'.l:platform.'/**/plugins/org.eclipse.equinox.launcher_*\.jar', 1, 1) + + if len(l:files) >= 1 + return l:files[0] + endif + + " Search jar file within VSCode extensions folder. + let l:files = globpath(l:path, '**/'.l:platform.'/plugins/org.eclipse.equinox.launcher_*\.jar', 1, 1) + + if len(l:files) >= 1 + return l:files[0] + endif + + " Search jar file within unzipped tar.gz file + let l:files = globpath(l:path, 'plugins/org.eclipse.equinox.launcher_*\.jar', 1, 1) + + if len(l:files) >= 1 + return l:files[0] + endif + + " Search jar file within system package path + let l:files = globpath('/usr/share/java/jdtls/plugins', 'org.eclipse.equinox.launcher_*\.jar', 1, 1) + + if len(l:files) >= 1 + return l:files[0] + endif + + return '' +endfunction + +function! ale_linters#java#eclipselsp#ConfigurationPath(buffer) abort + let l:path = fnamemodify(ale_linters#java#eclipselsp#JarPath(a:buffer), ':p:h:h') + let l:config_path = ale#Var(a:buffer, 'java_eclipselsp_config_path') + + if !empty(l:config_path) + return ale#path#Simplify(l:config_path) + endif + + if has('win32') + let l:path = l:path . '/config_win' + elseif has('macunix') + let l:path = l:path . '/config_mac' + else + let l:path = l:path . '/config_linux' + endif + + return ale#path#Simplify(l:path) +endfunction + +function! ale_linters#java#eclipselsp#VersionCheck(version_lines) abort + return s:GetVersion('', a:version_lines) +endfunction + +function! s:GetVersion(executable, version_lines) abort + let l:version = [] + + for l:line in a:version_lines + let l:match = matchlist(l:line, '\(\d\+\)\.\(\d\+\)\.\(\d\+\)') + + if !empty(l:match) + let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[3] + 0] + let s:version_cache[a:executable] = l:version + break + endif + endfor + + return l:version +endfunction + +function! ale_linters#java#eclipselsp#CommandWithVersion(buffer, version_lines, meta) abort + let l:executable = ale_linters#java#eclipselsp#Executable(a:buffer) + let l:version = s:GetVersion(l:executable, a:version_lines) + + return ale_linters#java#eclipselsp#Command(a:buffer, l:version) +endfunction + +function! ale_linters#java#eclipselsp#WorkspacePath(buffer) abort + let l:wspath = ale#Var(a:buffer, 'java_eclipselsp_workspace_path') + + if !empty(l:wspath) + return l:wspath + endif + + return ale#path#Dirname(ale#java#FindProjectRoot(a:buffer)) +endfunction + +function! ale_linters#java#eclipselsp#Javaagent(buffer) abort + let l:rets = [] + let l:raw = ale#Var(a:buffer, 'java_eclipselsp_javaagent') + + if empty(l:raw) + return '' + endif + + let l:jars = split(l:raw) + + for l:jar in l:jars + call add(l:rets, ale#Escape('-javaagent:' . l:jar)) + endfor + + return join(l:rets, ' ') +endfunction + +function! ale_linters#java#eclipselsp#Command(buffer, version) abort + let l:path = ale#Var(a:buffer, 'java_eclipselsp_path') + + let l:executable = ale_linters#java#eclipselsp#Executable(a:buffer) + + let l:cmd = [ ale#Escape(l:executable), + \ ale_linters#java#eclipselsp#Javaagent(a:buffer), + \ '-Declipse.application=org.eclipse.jdt.ls.core.id1', + \ '-Dosgi.bundles.defaultStartLevel=4', + \ '-Declipse.product=org.eclipse.jdt.ls.core.product', + \ '-Dlog.level=ALL', + \ '-noverify', + \ '-Xmx1G', + \ '-jar', + \ ale#Escape(ale_linters#java#eclipselsp#JarPath(a:buffer)), + \ '-configuration', + \ ale#Escape(ale_linters#java#eclipselsp#ConfigurationPath(a:buffer)), + \ '-data', + \ ale#Escape(ale_linters#java#eclipselsp#WorkspacePath(a:buffer)) + \ ] + + if ale#semver#GTE(a:version, [1, 9]) + call add(l:cmd, '--add-modules=ALL-SYSTEM') + call add(l:cmd, '--add-opens java.base/java.util=ALL-UNNAMED') + call add(l:cmd, '--add-opens java.base/java.lang=ALL-UNNAMED') + endif + + return join(l:cmd, ' ') +endfunction + +function! ale_linters#java#eclipselsp#RunWithVersionCheck(buffer) abort + let l:executable = ale_linters#java#eclipselsp#Executable(a:buffer) + + if empty(l:executable) + return '' + endif + + let l:cache = s:version_cache + + if has_key(s:version_cache, l:executable) + return ale_linters#java#eclipselsp#Command(a:buffer, s:version_cache[l:executable]) + endif + + let l:command = ale#Escape(l:executable) . ' -version' + + return ale#command#Run( + \ a:buffer, + \ l:command, + \ function('ale_linters#java#eclipselsp#CommandWithVersion'), + \ { 'output_stream': 'both' } + \) +endfunction + +call ale#linter#Define('java', { +\ 'name': 'eclipselsp', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#java#eclipselsp#Executable'), +\ 'command': function('ale_linters#java#eclipselsp#RunWithVersionCheck'), +\ 'language': 'java', +\ 'project_root': function('ale#java#FindProjectRoot'), +\ 'initialization_options': { +\ 'extendedClientCapabilities': { +\ 'classFileContentsSupport': v:true +\ } +\ } +\}) diff --git a/dot_vim/plugged/ale/ale_linters/java/javac.vim b/dot_vim/plugged/ale/ale_linters/java/javac.vim new file mode 100644 index 0000000..971e8de --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/javac.vim @@ -0,0 +1,163 @@ +" Author: farenjihn , w0rp +" Description: Lints java files using javac + +let s:classpath_sep = has('unix') ? ':' : ';' + +call ale#Set('java_javac_executable', 'javac') +call ale#Set('java_javac_options', '') +call ale#Set('java_javac_classpath', '') +call ale#Set('java_javac_sourcepath', '') + +function! ale_linters#java#javac#RunWithImportPaths(buffer) abort + let [l:cwd, l:command] = ale#maven#BuildClasspathCommand(a:buffer) + + " Try to use Gradle if Maven isn't available. + if empty(l:command) + let [l:cwd, l:command] = ale#gradle#BuildClasspathCommand(a:buffer) + endif + + " Try to use Ant if Gradle and Maven aren't available + if empty(l:command) + let [l:cwd, l:command] = ale#ant#BuildClasspathCommand(a:buffer) + endif + + if empty(l:command) + return ale_linters#java#javac#GetCommand(a:buffer, [], {}) + endif + + return ale#command#Run( + \ a:buffer, + \ l:command, + \ function('ale_linters#java#javac#GetCommand'), + \ {'cwd': l:cwd}, + \) +endfunction + +function! s:BuildClassPathOption(buffer, import_paths) abort + " Filter out lines like [INFO], etc. + let l:class_paths = filter(a:import_paths[:], 'v:val !~# ''[''') + let l:cls_path = ale#Var(a:buffer, 'java_javac_classpath') + + if !empty(l:cls_path) && type(l:cls_path) is v:t_string + call extend(l:class_paths, split(l:cls_path, s:classpath_sep)) + endif + + if !empty(l:cls_path) && type(l:cls_path) is v:t_list + call extend(l:class_paths, l:cls_path) + endif + + return !empty(l:class_paths) + \ ? '-cp ' . ale#Escape(join(l:class_paths, s:classpath_sep)) + \ : '' +endfunction + +function! ale_linters#java#javac#GetCommand(buffer, import_paths, meta) abort + let l:cp_option = s:BuildClassPathOption(a:buffer, a:import_paths) + let l:sp_option = '' + + " Find the src directory, for files in this project. + let l:src_dir = ale#path#FindNearestDirectory(a:buffer, 'src/main/java') + let l:sp_dirs = [] + + if !empty(l:src_dir) + call add(l:sp_dirs, l:src_dir) + + " Automatically include the jaxb directory too, if it's there. + let l:jaxb_dir = fnamemodify(l:src_dir, ':h:h') + \ . (has('win32') ? '\jaxb\' : '/jaxb/') + + if isdirectory(l:jaxb_dir) + call add(l:sp_dirs, l:jaxb_dir) + endif + endif + + " Automatically include the test directory, but only for test code. + if expand('#' . a:buffer . ':p') =~? '\vsrc[/\\]test[/\\]java' + let l:test_dir = ale#path#FindNearestDirectory(a:buffer, 'src/test/java') + + if isdirectory(l:test_dir) + call add(l:sp_dirs, l:test_dir) + endif + endif + + let l:source_paths = [] + let l:source_path = ale#Var(a:buffer, 'java_javac_sourcepath') + + if !empty(l:source_path) && type(l:source_path) is v:t_string + let l:source_paths = split(l:source_path, s:classpath_sep) + endif + + if !empty(l:source_path) && type(l:source_path) is v:t_list + let l:source_paths = l:source_path + endif + + if !empty(l:source_paths) + for l:path in l:source_paths + let l:sp_path = ale#path#FindNearestDirectory(a:buffer, l:path) + + if !empty(l:sp_path) + call add(l:sp_dirs, l:sp_path) + endif + endfor + endif + + if !empty(l:sp_dirs) + let l:sp_option = '-sourcepath ' + \ . ale#Escape(join(l:sp_dirs, s:classpath_sep)) + endif + + " Create .class files in a temporary directory, which we will delete later. + let l:class_file_directory = ale#command#CreateDirectory(a:buffer) + + " Always run javac from the directory the file is in, so we can resolve + " relative paths correctly. + return '%e -Xlint' + \ . ale#Pad(l:cp_option) + \ . ale#Pad(l:sp_option) + \ . ' -d ' . ale#Escape(l:class_file_directory) + \ . ale#Pad(ale#Var(a:buffer, 'java_javac_options')) + \ . ' %t' +endfunction + +function! ale_linters#java#javac#Handle(buffer, lines) abort + " Look for lines like the following. + " + " Main.java:13: warning: [deprecation] donaught() in Testclass has been deprecated + " Main.java:16: error: ';' expected + let l:directory = expand('#' . a:buffer . ':p:h') + let l:pattern = '\v^(.*):(\d+): (.{-1,}):(.+)$' + let l:col_pattern = '\v^(\s*\^)$' + let l:symbol_pattern = '\v^ +symbol: *(class|method) +([^ ]+)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:col_pattern, l:symbol_pattern]) + if empty(l:match[2]) && empty(l:match[3]) + if !empty(l:match[1]) && !empty(l:output) + let l:output[-1].col = len(l:match[1]) + endif + elseif empty(l:match[3]) + " Add symbols to 'cannot find symbol' errors. + if l:output[-1].text is# 'error: cannot find symbol' + let l:output[-1].text .= ': ' . l:match[2] + endif + else + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:directory, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[3] . ':' . l:match[4], + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('java', { +\ 'name': 'javac', +\ 'executable': {b -> ale#Var(b, 'java_javac_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#java#javac#RunWithImportPaths'), +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#java#javac#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/java/javalsp.vim b/dot_vim/plugged/ale/ale_linters/java/javalsp.vim new file mode 100644 index 0000000..baf584c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/javalsp.vim @@ -0,0 +1,55 @@ +" Author: Horacio Sanson +" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac + +call ale#Set('java_javalsp_executable', '') +call ale#Set('java_javalsp_config', {}) + +function! ale_linters#java#javalsp#Executable(buffer) abort + return ale#Var(a:buffer, 'java_javalsp_executable') +endfunction + +function! ale_linters#java#javalsp#Config(buffer) abort + let l:defaults = { 'java': { 'classPath': [], 'externalDependencies': [] } } + let l:config = ale#Var(a:buffer, 'java_javalsp_config') + + " Ensure the config dictionary contains both classPath and + " externalDependencies keys to avoid a NPE crash on Java Language Server. + call extend(l:config, l:defaults, 'keep') + call extend(l:config['java'], l:defaults['java'], 'keep') + + return l:config +endfunction + +function! ale_linters#java#javalsp#Command(buffer) abort + let l:executable = ale_linters#java#javalsp#Executable(a:buffer) + + if fnamemodify(l:executable, ':t') is# 'java' + " For backward compatibility. + let l:cmd = [ + \ ale#Escape(l:executable), + \ '--add-exports jdk.compiler/com.sun.tools.javac.api=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.code=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.main=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.model=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.util=javacs', + \ '--add-opens jdk.compiler/com.sun.tools.javac.api=javacs', + \ '-m javacs/org.javacs.Main', + \] + + return join(l:cmd, ' ') + else + return ale#Escape(l:executable) + endif +endfunction + +call ale#linter#Define('java', { +\ 'name': 'javalsp', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#java#javalsp#Executable'), +\ 'command': function('ale_linters#java#javalsp#Command'), +\ 'language': 'java', +\ 'project_root': function('ale#java#FindProjectRoot'), +\ 'lsp_config': function('ale_linters#java#javalsp#Config') +\}) diff --git a/dot_vim/plugged/ale/ale_linters/java/pmd.vim b/dot_vim/plugged/ale/ale_linters/java/pmd.vim new file mode 100644 index 0000000..a1f4c93 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/java/pmd.vim @@ -0,0 +1,36 @@ +" Author: Johannes Wienke +" Description: PMD for Java files + +function! ale_linters#java#pmd#Handle(buffer, lines) abort + let l:pattern = '"\(\d\+\)",".*","\(.\+\)","\(\d\+\)","\(\d\+\)","\(.\+\)","\(.\+\)","\(.\+\)"$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'type': 'W', + \ 'lnum': l:match[4] + 0, + \ 'text': l:match[5], + \ 'code': l:match[6] . ' - ' . l:match[7], + \}) + endfor + + return l:output +endfunction + +function! ale_linters#java#pmd#GetCommand(buffer) abort + return 'pmd ' + \ . ale#Var(a:buffer, 'java_pmd_options') + \ . ' -f csv' + \ . ' -d %t' +endfunction + +if !exists('g:ale_java_pmd_options') + let g:ale_java_pmd_options = '-R category/java/bestpractices.xml' +endif + +call ale#linter#Define('java', { +\ 'name': 'pmd', +\ 'executable': 'pmd', +\ 'command': function('ale_linters#java#pmd#GetCommand'), +\ 'callback': 'ale_linters#java#pmd#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/cspell.vim b/dot_vim/plugged/ale/ale_linters/javascript/cspell.vim new file mode 100644 index 0000000..5a49677 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for JavaScript files. + +call ale#handlers#cspell#DefineLinter('javascript') diff --git a/dot_vim/plugged/ale/ale_linters/javascript/deno.vim b/dot_vim/plugged/ale/ale_linters/javascript/deno.vim new file mode 100644 index 0000000..659eb85 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/deno.vim @@ -0,0 +1,11 @@ +" Author: Arnold Chand +" Description: Deno lsp linter for JavaScript files. + +call ale#linter#Define('javascript', { +\ 'name': 'deno', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#deno#GetExecutable'), +\ 'command': '%e lsp', +\ 'project_root': function('ale#handlers#deno#GetProjectRoot'), +\ 'initialization_options': function('ale#handlers#deno#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/eslint.vim b/dot_vim/plugged/ale/ale_linters/javascript/eslint.vim new file mode 100644 index 0000000..cf4de6e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/eslint.vim @@ -0,0 +1,11 @@ +" Author: w0rp +" Description: eslint for JavaScript files + +call ale#linter#Define('javascript', { +\ 'name': 'eslint', +\ 'output_stream': 'both', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/fecs.vim b/dot_vim/plugged/ale/ale_linters/javascript/fecs.vim new file mode 100644 index 0000000..e47c0a0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/fecs.vim @@ -0,0 +1,10 @@ +" Author: harttle +" Description: fecs for JavaScript files + +call ale#linter#Define('javascript', { +\ 'name': 'fecs', +\ 'executable': function('ale#handlers#fecs#GetExecutable'), +\ 'command': function('ale#handlers#fecs#GetCommand'), +\ 'read_buffer': 0, +\ 'callback': 'ale#handlers#fecs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/flow.vim b/dot_vim/plugged/ale/ale_linters/javascript/flow.vim new file mode 100644 index 0000000..601bac3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/flow.vim @@ -0,0 +1,160 @@ +" Author: Zach Perrault -- @zperrault +" Author: Florian Beeres +" Description: FlowType checking for JavaScript files + +call ale#Set('javascript_flow_executable', 'flow') +call ale#Set('javascript_flow_use_home_config', 0) +call ale#Set('javascript_flow_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_flow_use_respect_pragma', 1) + +function! ale_linters#javascript#flow#GetExecutable(buffer) abort + let l:flow_config = ale#path#FindNearestFile(a:buffer, '.flowconfig') + + if empty(l:flow_config) + " Don't run Flow if we can't find a .flowconfig file. + return '' + endif + + " Don't run Flow with a configuration file from the home directory by + " default, which can eat all of your RAM. + if fnamemodify(l:flow_config, ':h') is? $HOME + \&& !ale#Var(a:buffer, 'javascript_flow_use_home_config') + return '' + endif + + return ale#path#FindExecutable(a:buffer, 'javascript_flow', [ + \ 'node_modules/.bin/flow', + \]) +endfunction + +function! ale_linters#javascript#flow#GetCommand(buffer, version) abort + " If we can parse the version number, then only use --respect-pragma + " if the version is >= 0.36.0, which added the argument. + let l:use_respect_pragma = ale#Var(a:buffer, 'javascript_flow_use_respect_pragma') + \ && (empty(a:version) || ale#semver#GTE(a:version, [0, 36])) + + return '%e check-contents' + \ . (l:use_respect_pragma ? ' --respect-pragma': '') + \ . ' --json --from ale %s < %t' + \ . (!has('win32') ? '; echo' : '') +endfunction + +" Filter lines of flow output until we find the first line where the JSON +" output starts. +function! s:GetJSONLines(lines) abort + let l:start_index = 0 + + for l:line in a:lines + if l:line[:0] is# '{' + break + endif + + let l:start_index += 1 + endfor + + return a:lines[l:start_index :] +endfunction + +function! s:ExtraErrorMsg(current, new) abort + let l:newMsg = '' + + if a:current is# '' + " extra messages appear to already have a : + let l:newMsg = a:new + else + let l:newMsg = a:current . ' ' . a:new + endif + + return l:newMsg +endfunction + +function! s:GetDetails(error) abort + let l:detail = '' + + for l:extra_error in a:error.extra + if has_key(l:extra_error, 'message') + for l:extra_message in l:extra_error.message + let l:detail = s:ExtraErrorMsg(l:detail, l:extra_message.descr) + endfor + endif + + if has_key(l:extra_error, 'children') + for l:child in l:extra_error.children + for l:child_message in l:child.message + let l:detail = l:detail . ' ' . l:child_message.descr + endfor + endfor + endif + endfor + + return l:detail +endfunction + +function! ale_linters#javascript#flow#Handle(buffer, lines) abort + let l:str = join(s:GetJSONLines(a:lines), '') + + if empty(l:str) + return [] + endif + + let l:flow_output = json_decode(l:str) + let l:output = [] + + for l:error in get(l:flow_output, 'errors', []) + " Each error is broken up into parts + let l:text = '' + let l:line = 0 + let l:col = 0 + + for l:message in l:error.message + " Comments have no line of column information, so we skip them. + " In certain cases, `l:message.loc.source` points to a different path + " than the buffer one, thus we skip this loc information too. + if has_key(l:message, 'loc') + \&& l:line is# 0 + \&& ale#path#IsBufferPath(a:buffer, l:message.loc.source) + let l:line = l:message.loc.start.line + 0 + let l:col = l:message.loc.start.column + 0 + endif + + if l:text is# '' + let l:text = l:message.descr . ':' + else + let l:text = l:text . ' ' . l:message.descr + endif + endfor + + if has_key(l:error, 'operation') + let l:text = l:text . ' See also: ' . l:error.operation.descr + endif + + let l:errorToAdd = { + \ 'lnum': l:line, + \ 'col': l:col, + \ 'text': l:text, + \ 'type': has_key(l:error, 'level') && l:error.level is# 'error' ? 'E' : 'W', + \} + + if has_key(l:error, 'extra') + let l:errorToAdd.detail = l:errorToAdd.text + \ . "\n" . s:GetDetails(l:error) + endif + + call add(l:output, l:errorToAdd) + endfor + + return l:output +endfunction + +call ale#linter#Define('javascript', { +\ 'name': 'flow', +\ 'executable': function('ale_linters#javascript#flow#GetExecutable'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#javascript#flow#GetExecutable(buffer), +\ '%e --version', +\ function('ale_linters#javascript#flow#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#javascript#flow#Handle', +\ 'read_buffer': 0, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/flow_ls.vim b/dot_vim/plugged/ale/ale_linters/javascript/flow_ls.vim new file mode 100644 index 0000000..fec3401 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/flow_ls.vim @@ -0,0 +1,28 @@ +" Author: t_t +" Description: Integrate ALE with flow-language-server. + +call ale#Set('javascript_flow_ls_executable', 'flow') +call ale#Set('javascript_flow_ls_use_global', +\ get(g:, 'ale_use_global_executables', 0) +\) + +function! ale_linters#javascript#flow_ls#FindProjectRoot(buffer) abort + let l:flow_config = ale#path#FindNearestFile(a:buffer, '.flowconfig') + + if !empty(l:flow_config) + return fnamemodify(l:flow_config, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('javascript', { +\ 'name': 'flow-language-server', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_flow_ls', [ +\ 'node_modules/.bin/flow', +\ ])}, +\ 'command': '%e lsp --from ale-lsp', +\ 'project_root': function('ale_linters#javascript#flow_ls#FindProjectRoot'), +\ 'language': 'javascript', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/jscs.vim b/dot_vim/plugged/ale/ale_linters/javascript/jscs.vim new file mode 100644 index 0000000..ae3be68 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/jscs.vim @@ -0,0 +1,61 @@ +" Author: Chris Kyrouac - https://github.com/fijshion +" Description: jscs for JavaScript files + +call ale#Set('javascript_jscs_executable', 'jscs') +call ale#Set('javascript_jscs_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#javascript#jscs#GetCommand(buffer) abort + " Search for a local JShint config locaation, and default to a global one. + let l:jscs_config = ale#path#ResolveLocalPath( + \ a:buffer, + \ '.jscsrc', + \ get(g:, 'ale_jscs_config_loc', '') + \) + + let l:command = '%e --reporter inline --no-colors' + + if !empty(l:jscs_config) + let l:command .= ' --config ' . ale#Escape(l:jscs_config) + endif + + let l:command .= ' -' + + return l:command +endfunction + +function! ale_linters#javascript#jscs#Handle(buffer, lines) abort + " Matches patterns looking like the following + " + " foobar.js: line 2, col 1, Expected indentation of 1 characters + " + let l:pattern = '\v^.*:\s+line (\d+),\s+col\s+(\d+),\s+(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:obj = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3] + \} + + let l:code_match = matchlist(l:match[3], '\v([^ :]+): (.+)$') + + if !empty(l:code_match) + let l:obj.code = l:code_match[1] + let l:obj.text = l:code_match[2] + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + +call ale#linter#Define('javascript', { +\ 'name': 'jscs', +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_jscs', [ +\ 'node_modules/.bin/jscs', +\ ])}, +\ 'command': function('ale_linters#javascript#jscs#GetCommand'), +\ 'callback': 'ale_linters#javascript#jscs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/jshint.vim b/dot_vim/plugged/ale/ale_linters/javascript/jshint.vim new file mode 100644 index 0000000..26d4fda --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/jshint.vim @@ -0,0 +1,33 @@ +" Author: Chris Kyrouac - https://github.com/fijshion +" Description: JSHint for Javascript files + +call ale#Set('javascript_jshint_executable', 'jshint') +call ale#Set('javascript_jshint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#javascript#jshint#GetCommand(buffer) abort + " Search for a local JShint config locaation, and default to a global one. + let l:jshint_config = ale#path#ResolveLocalPath( + \ a:buffer, + \ '.jshintrc', + \ get(g:, 'ale_jshint_config_loc', '') + \) + + let l:command = '%e --reporter unix --extract auto' + + if !empty(l:jshint_config) + let l:command .= ' --config ' . ale#Escape(l:jshint_config) + endif + + let l:command .= ' --filename %s -' + + return l:command +endfunction + +call ale#linter#Define('javascript', { +\ 'name': 'jshint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_jshint', [ +\ 'node_modules/.bin/jshint', +\ ])}, +\ 'command': function('ale_linters#javascript#jshint#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/standard.vim b/dot_vim/plugged/ale/ale_linters/javascript/standard.vim new file mode 100644 index 0000000..addf41d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/standard.vim @@ -0,0 +1,32 @@ +" Author: Ahmed El Gabri <@ahmedelgabri> +" Description: standardjs for JavaScript files + +call ale#Set('javascript_standard_executable', 'standard') +call ale#Set('javascript_standard_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_standard_options', '') + +function! ale_linters#javascript#standard#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_standard', [ + \ 'node_modules/standardx/bin/cmd.js', + \ 'node_modules/standard/bin/cmd.js', + \ 'node_modules/semistandard/bin/cmd.js', + \ 'node_modules/.bin/standard', + \]) +endfunction + +function! ale_linters#javascript#standard#GetCommand(buffer) abort + let l:executable = ale_linters#javascript#standard#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'javascript_standard_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin %s' +endfunction + +" standard uses eslint and the output format is the same +call ale#linter#Define('javascript', { +\ 'name': 'standard', +\ 'executable': function('ale_linters#javascript#standard#GetExecutable'), +\ 'command': function('ale_linters#javascript#standard#GetCommand'), +\ 'callback': 'ale#handlers#eslint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/tsserver.vim b/dot_vim/plugged/ale/ale_linters/javascript/tsserver.vim new file mode 100644 index 0000000..caf6972 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/tsserver.vim @@ -0,0 +1,17 @@ +" Author: Chaucerbao, w0rp +" Description: tsserver integration for ALE + +call ale#Set('javascript_tsserver_executable', 'tsserver') +call ale#Set('javascript_tsserver_config_path', '') +call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('javascript', { +\ 'name': 'tsserver', +\ 'lsp': 'tsserver', +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_tsserver', [ +\ 'node_modules/.bin/tsserver', +\ ])}, +\ 'command': '%e', +\ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'), +\ 'language': '', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/javascript/xo.vim b/dot_vim/plugged/ale/ale_linters/javascript/xo.vim new file mode 100644 index 0000000..5e04ad5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/javascript/xo.vim @@ -0,0 +1,9 @@ +" Author: Daniel Lupu +" Description: xo for JavaScript files + +call ale#linter#Define('javascript', { +\ 'name': 'xo', +\ 'executable': function('ale#handlers#xo#GetExecutable'), +\ 'command': function('ale#handlers#xo#GetLintCommand'), +\ 'callback': 'ale#handlers#xo#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json/cspell.vim b/dot_vim/plugged/ale/ale_linters/json/cspell.vim new file mode 100644 index 0000000..0d7314a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for JSON files. + +call ale#handlers#cspell#DefineLinter('json') diff --git a/dot_vim/plugged/ale/ale_linters/json/eslint.vim b/dot_vim/plugged/ale/ale_linters/json/eslint.vim new file mode 100644 index 0000000..bdabb9f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/eslint.vim @@ -0,0 +1,16 @@ +" Author: João Pesce +" Description: eslint for JSON files. +" +" Requires eslint-plugin-jsonc or a similar plugin to work +" +" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp +" + +call ale#linter#Define('json', { +\ 'name': 'eslint', +\ 'output_stream': 'both', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json/jq.vim b/dot_vim/plugged/ale/ale_linters/json/jq.vim new file mode 100644 index 0000000..2f36a29 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/jq.vim @@ -0,0 +1,24 @@ +" Author: jD91mZM2 +call ale#Set('json_jq_executable', 'jq') +call ale#Set('json_jq_options', '') +call ale#Set('json_jq_filters', '.') + +" Matches patterns like the following: +" parse error: Expected another key-value pair at line 4, column 3 +let s:pattern = '^parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$' + +function! ale_linters#json#jq#Handle(buffer, lines) abort + return ale#util#MapMatches(a:lines, s:pattern, {match -> { + \ 'text': match[1], + \ 'lnum': match[2] + 0, + \ 'col': match[3] + 0, + \}}) +endfunction + +call ale#linter#Define('json', { +\ 'name': 'jq', +\ 'executable': {b -> ale#Var(b, 'json_jq_executable')}, +\ 'output_stream': 'stderr', +\ 'command': '%e', +\ 'callback': 'ale_linters#json#jq#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json/jsonlint.vim b/dot_vim/plugged/ale/ale_linters/json/jsonlint.vim new file mode 100644 index 0000000..812540a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/jsonlint.vim @@ -0,0 +1,43 @@ +" Author: KabbAmine , David Sierra + +call ale#Set('json_jsonlint_executable', 'jsonlint') +call ale#Set('json_jsonlint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#json#jsonlint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'json_jsonlint', [ + \ 'node_modules/.bin/jsonlint', + \ 'node_modules/jsonlint/lib/cli.js', + \]) +endfunction + +function! ale_linters#json#jsonlint#GetCommand(buffer) abort + let l:executable = ale_linters#json#jsonlint#GetExecutable(a:buffer) + + return ale#node#Executable(a:buffer, l:executable) + \ . ' --compact -' +endfunction + +function! ale_linters#json#jsonlint#Handle(buffer, lines) abort + " Matches patterns like the following: + " line 2, col 15, found: 'STRING' - expected: 'EOF', '}', ',', ']'. + let l:pattern = '^line \(\d\+\), col \(\d*\), \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('json', { +\ 'name': 'jsonlint', +\ 'executable': function('ale_linters#json#jsonlint#GetExecutable'), +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#json#jsonlint#GetCommand'), +\ 'callback': 'ale_linters#json#jsonlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json/spectral.vim b/dot_vim/plugged/ale/ale_linters/json/spectral.vim new file mode 100644 index 0000000..14129c5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/spectral.vim @@ -0,0 +1,14 @@ +" Author: t2h5 +" Description: Integration of Stoplight Spectral CLI with ALE. + +call ale#Set('json_spectral_executable', 'spectral') +call ale#Set('json_spectral_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('json', { +\ 'name': 'spectral', +\ 'executable': {b -> ale#path#FindExecutable(b, 'json_spectral', [ +\ 'node_modules/.bin/spectral', +\ ])}, +\ 'command': '%e lint --ignore-unknown-format -q -f text %t', +\ 'callback': 'ale#handlers#spectral#HandleSpectralOutput' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json/vscodejson.vim b/dot_vim/plugged/ale/ale_linters/json/vscodejson.vim new file mode 100644 index 0000000..dcaee01 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json/vscodejson.vim @@ -0,0 +1,16 @@ +" Author: Dalius Dobravolskas +" Description: VSCode json language server + +function! ale_linters#json#vscodejson#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('json', { +\ 'name': 'vscodejson', +\ 'lsp': 'stdio', +\ 'executable': 'vscode-json-language-server', +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#json#vscodejson#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/json5/eslint.vim b/dot_vim/plugged/ale/ale_linters/json5/eslint.vim new file mode 100644 index 0000000..6207f2d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/json5/eslint.vim @@ -0,0 +1,16 @@ +" Author: João Pesce +" Description: eslint for JSON5 files. +" +" Requires eslint-plugin-jsonc or a similar plugin to work +" +" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp +" + +call ale#linter#Define('json5', { +\ 'name': 'eslint', +\ 'output_stream': 'both', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/jsonc/eslint.vim b/dot_vim/plugged/ale/ale_linters/jsonc/eslint.vim new file mode 100644 index 0000000..1a5cc52 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/jsonc/eslint.vim @@ -0,0 +1,16 @@ +" Author: João Pesce +" Description: eslint for JSONC files. +" +" Requires eslint-plugin-jsonc or a similar plugin to work +" +" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp +" + +call ale#linter#Define('jsonc', { +\ 'name': 'eslint', +\ 'output_stream': 'both', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnet_lint.vim b/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnet_lint.vim new file mode 100644 index 0000000..a5ebdc3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnet_lint.vim @@ -0,0 +1,59 @@ +" Author: Trevor Whitney +" Description: jsonnet-lint for jsonnet files + +call ale#Set('jsonnet_jsonnet_lint_executable', 'jsonnet-lint') +call ale#Set('jsonnet_jsonnet_lint_options', '') + +function! ale_linters#jsonnet#jsonnet_lint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'jsonnet_jsonnet_lint_options') + + return '%e' + \ . ale#Pad(l:options) + \ . ' %t' +endfunction + + +function! ale_linters#jsonnet#jsonnet_lint#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " ERROR: foo.jsonnet:22:3-12 expected token OPERATOR but got (IDENTIFIER, "bar") + " ERROR: hoge.jsonnet:20:3 unexpected: "}" while parsing terminal + " ERROR: main.jsonnet:212:1-14 Expected , or ; but got (IDENTIFIER, "older_cluster") + let l:pattern = '^ERROR: [^:]*:\(\d\+\):\(\d\+\)\(-\d\+\)* \(.*\)' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + continue + endif + + let line_number = l:match[1] + 0 + let column = l:match[2] + 0 + " l:match[3] has optional -14, when linter is showing a range + let text = l:match[4] + + + " vcol is Needed to indicate that the column is a character. + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': line_number, + \ 'vcol': 0, + \ 'col': column, + \ 'text': text, + \ 'type': 'E', + \ 'nr': -1, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('jsonnet', { +\ 'name': 'jsonnet_lint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'jsonnet_jsonnet_lint_executable')}, +\ 'command': function('ale_linters#jsonnet#jsonnet_lint#GetCommand'), +\ 'callback': 'ale_linters#jsonnet#jsonnet_lint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnetfmt.vim b/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnetfmt.vim new file mode 100644 index 0000000..8904019 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/jsonnet/jsonnetfmt.vim @@ -0,0 +1,52 @@ +" Authors: Trevor Whitney and Takuya Kosugiyama +" Description: jsonnetfmt for jsonnet files + +call ale#Set('jsonnet_jsonnetfmt_executable', 'jsonnetfmt') +call ale#Set('jsonnet_jsonnetfmt_options', '') + +function! ale_linters#jsonnet#jsonnetfmt#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_options') + + return '%e' + \ . ale#Pad(l:options) + \ . ' %t' +endfunction + + +function! ale_linters#jsonnet#jsonnetfmt#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " STATIC ERROR: foo.jsonnet:22:3-12: expected token OPERATOR but got (IDENTIFIER, "bar") + " STATIC ERROR: hoge.jsonnet:20:3: unexpected: "}" while parsing terminal + let l:pattern = '^STATIC ERROR:[^:]*:\(\d\+\):\(\d\+\):*\(-\d\+\)* \(.*\)' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + continue + endif + + " vcol is Needed to indicate that the column is a character. + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'vcol': 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': 'E', + \ 'nr': -1, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('jsonnet', { +\ 'name': 'jsonnetfmt', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'jsonnet_jsonnetfmt_executable')}, +\ 'command': function('ale_linters#jsonnet#jsonnetfmt#GetCommand'), +\ 'callback': 'ale_linters#jsonnet#jsonnetfmt#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/julia/languageserver.vim b/dot_vim/plugged/ale/ale_linters/julia/languageserver.vim new file mode 100644 index 0000000..999ad81 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/julia/languageserver.vim @@ -0,0 +1,21 @@ +" Author: Bartolomeo Stellato +" Description: A language server for Julia + +" Set julia executable variable +call ale#Set('julia_executable', 'julia') + +function! ale_linters#julia#languageserver#GetCommand(buffer) abort + let l:julia_executable = ale#Var(a:buffer, 'julia_executable') + let l:cmd_string = 'using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);' + + return ale#Escape(l:julia_executable) . ' --project=@. --startup-file=no --history-file=no -e ' . ale#Escape(l:cmd_string) +endfunction + +call ale#linter#Define('julia', { +\ 'name': 'languageserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'julia_executable')}, +\ 'command': function('ale_linters#julia#languageserver#GetCommand'), +\ 'language': 'julia', +\ 'project_root': function('ale#julia#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/kotlin/kotlinc.vim b/dot_vim/plugged/ale/ale_linters/kotlin/kotlinc.vim new file mode 100644 index 0000000..e8bc924 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/kotlin/kotlinc.vim @@ -0,0 +1,177 @@ +" Author: Francis Agyapong +" Description: A linter for the Kotlin programming language that uses kotlinc + +let g:ale_kotlin_kotlinc_options = get(g:, 'ale_kotlin_kotlinc_options', '') +let g:ale_kotlin_kotlinc_enable_config = get(g:, 'ale_kotlin_kotlinc_enable_config', 0) +let g:ale_kotlin_kotlinc_config_file = get(g:, 'ale_kotlin_kotlinc_config_file', '.ale_kotlinc_config') +let g:ale_kotlin_kotlinc_classpath = get(g:, 'ale_kotlin_kotlinc_classpath', '') +let g:ale_kotlin_kotlinc_sourcepath = get(g:, 'ale_kotlin_kotlinc_sourcepath', '') +let g:ale_kotlin_kotlinc_use_module_file = get(g:, 'ale_kotlin_kotlinc_use_module_file', 0) +let g:ale_kotlin_kotlinc_module_filename = get(g:, 'ale_kotlin_kotlinc_module_filename', 'module.xml') + +let s:classpath_sep = has('unix') ? ':' : ';' + +function! ale_linters#kotlin#kotlinc#RunWithImportPaths(buffer) abort + let l:command = '' + + " exec maven/gradle only if classpath is not set + if !empty(ale#Var(a:buffer, 'kotlin_kotlinc_classpath')) + return ale_linters#kotlin#kotlinc#GetCommand(a:buffer, [], {}) + endif + + let [l:cwd, l:command] = ale#maven#BuildClasspathCommand(a:buffer) + + " Try to use Gradle if Maven isn't available. + if empty(l:command) + let [l:cwd, l:command] = ale#gradle#BuildClasspathCommand(a:buffer) + endif + + if empty(l:command) + return ale_linters#kotlin#kotlinc#GetCommand(a:buffer, [], {}) + endif + + return ale#command#Run( + \ a:buffer, + \ l:command, + \ function('ale_linters#kotlin#kotlinc#GetCommand'), + \ {'cwd': l:cwd}, + \) +endfunction + +function! s:BuildClassPathOption(buffer, import_paths) abort + " Filter out lines like [INFO], etc. + let l:class_paths = filter(a:import_paths[:], 'v:val !~# ''[''') + call extend( + \ l:class_paths, + \ split(ale#Var(a:buffer, 'kotlin_kotlinc_classpath'), s:classpath_sep), + \) + + return !empty(l:class_paths) + \ ? ' -cp ' . ale#Escape(join(l:class_paths, s:classpath_sep)) + \ : '' +endfunction + +function! ale_linters#kotlin#kotlinc#GetCommand(buffer, import_paths, meta) abort + let l:kotlinc_opts = ale#Var(a:buffer, 'kotlin_kotlinc_options') + let l:command = 'kotlinc ' + + " If the config file is enabled and readable, source it + if ale#Var(a:buffer, 'kotlin_kotlinc_enable_config') + let l:conf = expand(ale#Var(a:buffer, 'kotlin_kotlinc_config_file'), 1) + + if filereadable(l:conf) + execute 'source ' . fnameescape(l:conf) + endif + endif + + " If use module and module file is readable use that and return + if ale#Var(a:buffer, 'kotlin_kotlinc_use_module_file') + let l:module_filename = ale#Escape(expand(ale#Var(a:buffer, 'kotlin_kotlinc_module_filename'), 1)) + + if filereadable(l:module_filename) + let l:kotlinc_opts .= ' -module ' . l:module_filename + let l:command .= 'kotlinc ' . l:kotlinc_opts + + return l:command + endif + endif + + " We only get here if not using module or the module file not readable + if ale#Var(a:buffer, 'kotlin_kotlinc_classpath') isnot# '' + let l:kotlinc_opts .= ' -cp ' . ale#Var(a:buffer, 'kotlin_kotlinc_classpath') + else + " get classpath from maven/gradle + let l:kotlinc_opts .= s:BuildClassPathOption(a:buffer, a:import_paths) + endif + + let l:fname = '' + + if ale#Var(a:buffer, 'kotlin_kotlinc_sourcepath') isnot# '' + let l:fname .= expand(ale#Var(a:buffer, 'kotlin_kotlinc_sourcepath'), 1) . ' ' + else + " Find the src directory for files in this project. + let l:project_root = ale#gradle#FindProjectRoot(a:buffer) + + if !empty(l:project_root) + let l:src_dir = l:project_root + else + let l:src_dir = ale#path#FindNearestDirectory(a:buffer, 'src/main/java') + \ . ' ' . ale#path#FindNearestDirectory(a:buffer, 'src/main/kotlin') + endif + + let l:fname .= expand(l:src_dir, 1) . ' ' + endif + + let l:fname .= ale#Escape(expand('#' . a:buffer . ':p')) + let l:command .= l:kotlinc_opts . ' ' . l:fname + + return l:command +endfunction + +function! ale_linters#kotlin#kotlinc#Handle(buffer, lines) abort + let l:code_pattern = '^\(.*\):\([0-9]\+\):\([0-9]\+\):\s\+\(error\|warning\):\s\+\(.*\)' + let l:general_pattern = '^\(warning\|error\|info\):\s*\(.*\)' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:code_pattern) + + if len(l:match) == 0 + continue + endif + + let l:file = l:match[1] + let l:line = l:match[2] + 0 + let l:column = l:match[3] + 0 + let l:type = l:match[4] + let l:text = l:match[5] + + let l:buf_abspath = fnamemodify(l:file, ':p') + let l:curbuf_abspath = expand('#' . a:buffer . ':p') + + " Skip if file is not loaded + if l:buf_abspath isnot# l:curbuf_abspath + continue + endif + + let l:type_marker_str = l:type is# 'warning' ? 'W' : 'E' + + call add(l:output, { + \ 'lnum': l:line, + \ 'col': l:column, + \ 'text': l:text, + \ 'type': l:type_marker_str, + \}) + endfor + + " Non-code related messages + for l:line in a:lines + let l:match = matchlist(l:line, l:general_pattern) + + if len(l:match) == 0 + continue + endif + + let l:type = l:match[1] + let l:text = l:match[2] + + let l:type_marker_str = l:type is# 'warning' || l:type is# 'info' ? 'W' : 'E' + + call add(l:output, { + \ 'lnum': 1, + \ 'text': l:text, + \ 'type': l:type_marker_str, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('kotlin', { +\ 'name': 'kotlinc', +\ 'executable': 'kotlinc', +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#kotlin#kotlinc#RunWithImportPaths'), +\ 'callback': 'ale_linters#kotlin#kotlinc#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/kotlin/ktlint.vim b/dot_vim/plugged/ale/ale_linters/kotlin/ktlint.vim new file mode 100644 index 0000000..0bb64b1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/kotlin/ktlint.vim @@ -0,0 +1,10 @@ +" Author: Francis Agyapong +" Description: Lint kotlin files using ktlint + +call ale#linter#Define('kotlin', { +\ 'name': 'ktlint', +\ 'executable': 'ktlint', +\ 'command': function('ale#handlers#ktlint#GetCommand'), +\ 'callback': 'ale#handlers#ktlint#Handle', +\ 'output_stream': 'stderr' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/kotlin/languageserver.vim b/dot_vim/plugged/ale/ale_linters/kotlin/languageserver.vim new file mode 100644 index 0000000..af78c0e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/kotlin/languageserver.vim @@ -0,0 +1,29 @@ +" Author: MTDL9 +" Description: Support for the Kotlin language server https://github.com/fwcd/KotlinLanguageServer + +call ale#Set('kotlin_languageserver_executable', 'kotlin-language-server') + +function! ale_linters#kotlin#languageserver#GetProjectRoot(buffer) abort + let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer) + + if !empty(l:gradle_root) + return l:gradle_root + endif + + let l:maven_pom_file = ale#path#FindNearestFile(a:buffer, 'pom.xml') + + if !empty(l:maven_pom_file) + return fnamemodify(l:maven_pom_file, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('kotlin', { +\ 'name': 'languageserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'kotlin_languageserver_executable')}, +\ 'command': '%e', +\ 'language': 'kotlin', +\ 'project_root': function('ale_linters#kotlin#languageserver#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/less/lessc.vim b/dot_vim/plugged/ale/ale_linters/less/lessc.vim new file mode 100644 index 0000000..8e21f5b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/less/lessc.vim @@ -0,0 +1,47 @@ +" Author: zanona , w0rp +" Description: This file adds support for checking Less code with lessc. + +call ale#Set('less_lessc_executable', 'lessc') +call ale#Set('less_lessc_options', '') +call ale#Set('less_lessc_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#less#lessc#GetCommand(buffer) abort + return '%e --no-color --lint' + \ . ' --include-path=' . ale#Escape(expand('#' . a:buffer . ':p:h')) + \ . ale#Pad(ale#Var(a:buffer, 'less_lessc_options')) + \ . ' -' +endfunction + +function! ale_linters#less#lessc#Handle(buffer, lines) abort + let l:dir = expand('#' . a:buffer . ':p:h') + " Matches patterns like the following: + let l:pattern = '^\(\w\+\): \(.\{-}\) in \(.\{-}\) on line \(\d\+\), column \(\d\+\):$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[4] + 0, + \ 'col': l:match[5] + 0, + \ 'text': l:match[2], + \ 'type': 'E', + \} + + if l:match[3] isnot# '-' + let l:item.filename = ale#path#GetAbsPath(l:dir, l:match[3]) + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('less', { +\ 'name': 'lessc', +\ 'executable': {b -> ale#path#FindExecutable(b, 'less_lessc', [ +\ 'node_modules/.bin/lessc', +\ ])}, +\ 'command': function('ale_linters#less#lessc#GetCommand'), +\ 'callback': 'ale_linters#less#lessc#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/less/stylelint.vim b/dot_vim/plugged/ale/ale_linters/less/stylelint.vim new file mode 100644 index 0000000..83f784c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/less/stylelint.vim @@ -0,0 +1,20 @@ +" Author: diartyz , w0rp + +call ale#Set('less_stylelint_executable', 'stylelint') +call ale#Set('less_stylelint_options', '') +call ale#Set('less_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#less#stylelint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'less_stylelint_options') + + return '%e' . ale#Pad(l:options) . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('less', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'less_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': function('ale_linters#less#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/llvm/llc.vim b/dot_vim/plugged/ale/ale_linters/llvm/llc.vim new file mode 100644 index 0000000..594be06 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/llvm/llc.vim @@ -0,0 +1,24 @@ +" Author: rhysd +" Description: Support for checking LLVM IR with llc + +call ale#Set('llvm_llc_executable', 'llc') + +function! ale_linters#llvm#llc#HandleErrors(buffer, lines) abort + " Handle '{path}: {file}:{line}:{col}: error: {message}' format + let l:pattern = '\v^[a-zA-Z]?:?[^:]+: [^:]+:(\d+):(\d+): (.+)$' + + return map(ale#util#GetMatches(a:lines, l:pattern), "{ + \ 'lnum': str2nr(v:val[1]), + \ 'col': str2nr(v:val[2]), + \ 'text': v:val[3], + \ 'type': 'E', + \}") +endfunction + +call ale#linter#Define('llvm', { +\ 'name': 'llc', +\ 'executable': {b -> ale#Var(b, 'llvm_llc_executable')}, +\ 'output_stream': 'stderr', +\ 'command': {-> '%e -filetype=null -o=' . g:ale#util#nul_file}, +\ 'callback': 'ale_linters#llvm#llc#HandleErrors', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/lua/cspell.vim b/dot_vim/plugged/ale/ale_linters/lua/cspell.vim new file mode 100644 index 0000000..215b82f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/lua/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Lua files. + +call ale#handlers#cspell#DefineLinter('lua') diff --git a/dot_vim/plugged/ale/ale_linters/lua/luac.vim b/dot_vim/plugged/ale/ale_linters/lua/luac.vim new file mode 100644 index 0000000..41674a4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/lua/luac.vim @@ -0,0 +1,31 @@ +" Author: Jon Xie https://github.com/xiejiangzhi +" Description: luac linter for lua files + +call ale#Set('lua_luac_executable', 'luac') + +function! ale_linters#lua#luac#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " luac: stdin:5: '=' expected near ')' + " luac: stdin:8: ')' expected (to close '(' at line 6) near '123' + let l:pattern = '\v^.*:(\d+): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': 'E', + \ 'text': l:match[2], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('lua', { +\ 'name': 'luac', +\ 'executable': {b -> ale#Var(b, 'lua_luac_executable')}, +\ 'command': '%e -p -', +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#lua#luac#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/lua/luacheck.vim b/dot_vim/plugged/ale/ale_linters/lua/luacheck.vim new file mode 100644 index 0000000..34be2b5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/lua/luacheck.vim @@ -0,0 +1,44 @@ +" Author: Sol Bekic https://github.com/s-ol +" Description: luacheck linter for lua files + +call ale#Set('lua_luacheck_executable', 'luacheck') +call ale#Set('lua_luacheck_options', '') + +function! ale_linters#lua#luacheck#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'lua_luacheck_options')) + \ . ' --formatter plain --codes --filename %s -' +endfunction + +function! ale_linters#lua#luacheck#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " artal.lua:159:17: (W111) shadowing definition of loop variable 'i' on line 106 + " artal.lua:182:7: (W213) unused loop variable 'i' + let l:pattern = '^.*:\(\d\+\):\(\d\+\): (\([WE]\)\(\d\+\)) \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + \ && l:match[3] is# 'W' + \ && index(range(611, 614), str2nr(l:match[4])) >= 0 + continue + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3], + \ 'code': l:match[3] . l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('lua', { +\ 'name': 'luacheck', +\ 'executable': {b -> ale#Var(b, 'lua_luacheck_executable')}, +\ 'command': function('ale_linters#lua#luacheck#GetCommand'), +\ 'callback': 'ale_linters#lua#luacheck#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/lua/selene.vim b/dot_vim/plugged/ale/ale_linters/lua/selene.vim new file mode 100644 index 0000000..6b33cbf --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/lua/selene.vim @@ -0,0 +1,46 @@ +call ale#Set('lua_selene_executable', 'selene') +call ale#Set('lua_selene_options', '') + +function! ale_linters#lua#selene#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'lua_selene_options')) + \ . ' --display-style=json -' +endfunction + +function! ale_linters#lua#selene#Handle(buffer, lines) abort + let l:output = [] + + for l:line in a:lines + " as of version 0.17.0, selene has no way to suppress summary + " information when outputting json, so stop processing when we hit it + " (PR for this here: https://github.com/Kampfkarren/selene/pull/356) + if l:line is# 'Results:' + break + endif + + let l:json = json_decode(l:line) + let l:lint = { + \ 'lnum': l:json.primary_label.span.start_line + 1, + \ 'end_lnum': l:json.primary_label.span.end_line + 1, + \ 'col': l:json.primary_label.span.start_column + 1, + \ 'end_col': l:json.primary_label.span.end_column, + \ 'text': l:json.message, + \ 'code': l:json.code, + \ 'type': l:json.severity is# 'Warning' ? 'W' : 'E', + \} + + if has_key(l:json, 'notes') && len(l:json.notes) > 0 + let l:lint.detail = l:lint.text . "\n\n" . join(l:json.notes, "\n") + endif + + call add(l:output, l:lint) + endfor + + return l:output +endfunction + +call ale#linter#Define('lua', { +\ 'name': 'selene', +\ 'executable': {b -> ale#Var(b, 'lua_selene_executable')}, +\ 'command': function('ale_linters#lua#selene#GetCommand'), +\ 'callback': 'ale_linters#lua#selene#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/mail/alex.vim b/dot_vim/plugged/ale/ale_linters/mail/alex.vim new file mode 100644 index 0000000..0fceea7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/mail/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for mail files + +call ale#handlers#alex#DefineLinter('mail', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/mail/languagetool.vim b/dot_vim/plugged/ale/ale_linters/mail/languagetool.vim new file mode 100644 index 0000000..f68dab7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/mail/languagetool.vim @@ -0,0 +1,5 @@ +" Author: Vincent (wahrwolf [at] wolfpit.net) +" Description: languagetool for mails + + +call ale#handlers#languagetool#DefineLinter('mail') diff --git a/dot_vim/plugged/ale/ale_linters/mail/proselint.vim b/dot_vim/plugged/ale/ale_linters/mail/proselint.vim new file mode 100644 index 0000000..82c8d1f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/mail/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for mail files + +call ale#linter#Define('mail', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/mail/vale.vim b/dot_vim/plugged/ale/ale_linters/mail/vale.vim new file mode 100644 index 0000000..e6dfd2e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/mail/vale.vim @@ -0,0 +1,9 @@ +" Author: chew-z https://github.com/chew-z +" Description: vale for Markdown files + +call ale#linter#Define('mail', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=JSON %t', +\ 'callback': 'ale#handlers#vale#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/make/checkmake.vim b/dot_vim/plugged/ale/ale_linters/make/checkmake.vim new file mode 100644 index 0000000..fed01b5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/make/checkmake.vim @@ -0,0 +1,37 @@ +" Author: aurieh - https://github.com/aurieh + +call ale#Set('make_checkmake_config', '') + +function! ale_linters#make#checkmake#Handle(buffer, lines) abort + let l:pattern = '\v^(\d+):(.+):(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'type': 'E', + \ 'code': l:match[2], + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +function! ale_linters#make#checkmake#GetCommand(buffer) abort + let l:config = ale#Var(a:buffer, 'make_checkmake_config') + let l:cmd = 'checkmake' + \ . ' --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"' + \ . (!empty(l:config) ? ' --config="' . l:config . '"' : '') + \ . ' %s' + + return l:cmd +endfunction + +call ale#linter#Define('make', { +\ 'name': 'checkmake', +\ 'executable': 'checkmake', +\ 'command': function('ale_linters#make#checkmake#GetCommand'), +\ 'callback': 'ale_linters#make#checkmake#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/alex.vim b/dot_vim/plugged/ale/ale_linters/markdown/alex.vim new file mode 100644 index 0000000..63769b5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for markdown files + +call ale#handlers#alex#DefineLinter('markdown', '') diff --git a/dot_vim/plugged/ale/ale_linters/markdown/cspell.vim b/dot_vim/plugged/ale/ale_linters/markdown/cspell.vim new file mode 100644 index 0000000..45c586c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Markdown files. + +call ale#handlers#cspell#DefineLinter('markdown') diff --git a/dot_vim/plugged/ale/ale_linters/markdown/languagetool.vim b/dot_vim/plugged/ale/ale_linters/markdown/languagetool.vim new file mode 100644 index 0000000..422a38c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/languagetool.vim @@ -0,0 +1,5 @@ +" Author: Vincent (wahrwolf [at] wolfpit.net) +" Description: languagetool for markdown files + + +call ale#handlers#languagetool#DefineLinter('markdown') diff --git a/dot_vim/plugged/ale/ale_linters/markdown/markdownlint.vim b/dot_vim/plugged/ale/ale_linters/markdown/markdownlint.vim new file mode 100644 index 0000000..424c9f2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/markdownlint.vim @@ -0,0 +1,27 @@ +" Author: Ty-Lucas Kelley +" Description: Adds support for markdownlint + +call ale#Set('markdown_markdownlint_executable', 'markdownlint') +call ale#Set('markdown_markdownlint_options', '') + +function! ale_linters#markdown#markdownlint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'markdown_markdownlint_executable') +endfunction + +function! ale_linters#markdown#markdownlint#GetCommand(buffer) abort + let l:executable = ale_linters#markdown#markdownlint#GetExecutable(a:buffer) + + let l:options = ale#Var(a:buffer, 'markdown_markdownlint_options') + + return ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') . ' %s' +endfunction + +call ale#linter#Define('markdown', { +\ 'name': 'markdownlint', +\ 'executable': function('ale_linters#markdown#markdownlint#GetExecutable'), +\ 'lint_file': 1, +\ 'output_stream': 'both', +\ 'command': function('ale_linters#markdown#markdownlint#GetCommand'), +\ 'callback': 'ale#handlers#markdownlint#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/mdl.vim b/dot_vim/plugged/ale/ale_linters/markdown/mdl.vim new file mode 100644 index 0000000..fd44de6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/mdl.vim @@ -0,0 +1,43 @@ +" Author: Steve Dignam , Josh Leeb-du Toit +" Description: Support for mdl, a markdown linter. + +call ale#Set('markdown_mdl_executable', 'mdl') +call ale#Set('markdown_mdl_options', '') + +function! ale_linters#markdown#mdl#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'markdown_mdl_executable') +endfunction + +function! ale_linters#markdown#mdl#GetCommand(buffer) abort + let l:executable = ale_linters#markdown#mdl#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'bundle$' + \ ? ' exec mdl' + \ : '' + + let l:options = ale#Var(a:buffer, 'markdown_mdl_options') + + return ale#Escape(l:executable) . l:exec_args + \ . ' -j' . (!empty(l:options) ? ' ' . l:options : '') +endfunction + +function! ale_linters#markdown#mdl#Handle(buffer, lines) abort + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + call add(l:output, { + \ 'lnum': l:error['line'], + \ 'code': l:error['rule'] . '/' . join(l:error['aliases'], '/'), + \ 'text': l:error['description'], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('markdown', { +\ 'name': 'mdl', +\ 'executable': function('ale_linters#markdown#mdl#GetExecutable'), +\ 'command': function('ale_linters#markdown#mdl#GetCommand'), +\ 'callback': 'ale_linters#markdown#mdl#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/proselint.vim b/dot_vim/plugged/ale/ale_linters/markdown/proselint.vim new file mode 100644 index 0000000..289d881 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/proselint.vim @@ -0,0 +1,9 @@ +" Author: poohzrn https://github.com/poohzrn +" Description: proselint for Markdown files + +call ale#linter#Define('markdown', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/redpen.vim b/dot_vim/plugged/ale/ale_linters/markdown/redpen.vim new file mode 100644 index 0000000..ff2cbaf --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('markdown', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f markdown -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/remark_lint.vim b/dot_vim/plugged/ale/ale_linters/markdown/remark_lint.vim new file mode 100644 index 0000000..6085e7e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/remark_lint.vim @@ -0,0 +1,48 @@ +scriptencoding utf-8 +" Author rhysd https://rhysd.github.io/, Dirk Roorda (dirkroorda), Adrián González Rus (@adrigzr) +" Description: remark-lint for Markdown files +call ale#Set('markdown_remark_lint_executable', 'remark') +call ale#Set('markdown_remark_lint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('markdown_remark_lint_options', '') + +function! ale_linters#markdown#remark_lint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'markdown_remark_lint_options') + + return '%e' . ale#Pad(l:options) . ' --no-stdout --no-color' +endfunction + +function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort + " matches: ' 1:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint' + " matches: ' 18:71-19:1 error Missing new line after list item list-item-spacing remark-lint', + let l:pattern = '^ \+\(\d\+\):\(\d\+\)\(-\(\d\+\):\(\d\+\)\)\? \(warning\|error\) \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[6] is# 'error' ? 'E' : 'W', + \ 'text': l:match[7], + \} + + if l:match[3] isnot# '' + let l:item.end_lnum = l:match[4] + 0 + let l:item.end_col = l:match[5] + 0 + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('markdown', { +\ 'name': 'remark_lint', +\ 'aliases': ['remark-lint'], +\ 'executable': {b -> ale#path#FindExecutable(b, 'markdown_remark_lint', [ +\ 'node_modules/.bin/remark', +\ ])}, +\ 'command': function('ale_linters#markdown#remark_lint#GetCommand'), +\ 'callback': 'ale_linters#markdown#remark_lint#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/textlint.vim b/dot_vim/plugged/ale/ale_linters/markdown/textlint.vim new file mode 100644 index 0000000..613c841 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/textlint.vim @@ -0,0 +1,9 @@ +" Author: tokida https://rouger.info, Yasuhiro Kiyota +" Description: textlint, a proofreading tool (https://textlint.github.io/) + +call ale#linter#Define('markdown', { +\ 'name': 'textlint', +\ 'executable': function('ale#handlers#textlint#GetExecutable'), +\ 'command': function('ale#handlers#textlint#GetCommand'), +\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/vale.vim b/dot_vim/plugged/ale/ale_linters/markdown/vale.vim new file mode 100644 index 0000000..06a6441 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/vale.vim @@ -0,0 +1,24 @@ +" Author: chew-z https://github.com/chew-z +" Description: vale for Markdown files + +call ale#Set('markdown_vale_executable', 'vale') +call ale#Set('markdown_vale_input_file', '%t') +call ale#Set('markdown_vale_options', '') + +function! ale_linters#markdown#vale#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'markdown_vale_executable') + let l:input_file = ale#Var(a:buffer, 'markdown_vale_input_file') + + " Defaults to `vale --output=JSON %t` + return ale#Escape(l:executable) + \ . ' --output=JSON ' + \ . ale#Var(a:buffer, 'markdown_vale_options') + \ . ' ' . l:input_file +endfunction + +call ale#linter#Define('markdown', { +\ 'name': 'vale', +\ 'executable': {b -> ale#Var(b, 'markdown_vale_executable')}, +\ 'command': function('ale_linters#markdown#vale#GetCommand'), +\ 'callback': 'ale#handlers#vale#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/markdown/writegood.vim b/dot_vim/plugged/ale/ale_linters/markdown/writegood.vim new file mode 100644 index 0000000..7108e7a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/markdown/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for Markdown files + +call ale#handlers#writegood#DefineLinter('markdown') diff --git a/dot_vim/plugged/ale/ale_linters/matlab/mlint.vim b/dot_vim/plugged/ale/ale_linters/matlab/mlint.vim new file mode 100644 index 0000000..e7daf37 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/matlab/mlint.vim @@ -0,0 +1,44 @@ +" Author: awlayton +" Description: mlint for MATLAB files + +call ale#Set('matlab_mlint_executable', 'mlint') + +function! ale_linters#matlab#mlint#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " L 27 (C 1): FNDEF: Terminate statement with semicolon to suppress output. + " L 30 (C 13-15): FNDEF: A quoted string is unterminated. + let l:pattern = '^L \(\d\+\) (C \([0-9-]\+\)): \([A-Z]\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:lnum = l:match[1] + 0 + let l:col = l:match[2] + 0 + let l:code = l:match[3] + let l:text = l:match[4] + + " Suppress erroneous warning about filename + " TODO: Enable this error when copying filename is supported + if l:code is# 'FNDEF' + continue + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:lnum, + \ 'col': l:col, + \ 'text': l:text, + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('matlab', { +\ 'name': 'mlint', +\ 'executable': {b -> ale#Var(b, 'matlab_mlint_executable')}, +\ 'command': '%e -id %t', +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#matlab#mlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/mercury/mmc.vim b/dot_vim/plugged/ale/ale_linters/mercury/mmc.vim new file mode 100644 index 0000000..85969e1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/mercury/mmc.vim @@ -0,0 +1,38 @@ +" Author: stewy33 +" Description: Lints mercury files using mmc + +call ale#Set('mercury_mmc_executable', 'mmc') +call ale#Set('mercury_mmc_options', '--make --output-compile-error-lines 100') + +function! ale_linters#mercury#mmc#GetCommand(buffer) abort + return '%e --errorcheck-only ' + \ . ale#Var(a:buffer, 'mercury_mmc_options') + \ . ' %s:t:r' +endfunction + +function! ale_linters#mercury#mmc#Handle(buffer, lines) abort + " output format + " :: : + let l:pattern = '\v^\w+\.m:(\d+):\s+([W|w]arning|.*[E|e]rror.*): (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': substitute(l:match[1], '\v^0*', '', '') + 0, + \ 'type': l:match[2][0] =~? 'W' ? 'W' : 'E', + \ 'text': l:match[2] . ': ' . l:match[3] + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('mercury', { +\ 'name': 'mmc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'mercury_mmc_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#mercury#mmc#GetCommand'), +\ 'callback': 'ale_linters#mercury#mmc#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nasm/nasm.vim b/dot_vim/plugged/ale/ale_linters/nasm/nasm.vim new file mode 100644 index 0000000..c4f5362 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nasm/nasm.vim @@ -0,0 +1,41 @@ +" Author: Oyvind Ingvaldsen +" Description: NASM linter for asmsyntax nasm. + +call ale#Set('nasm_nasm_executable', 'nasm') +call ale#Set('nasm_nasm_options', '') + +function! ale_linters#nasm#nasm#GetCommand(buffer) abort + " Note that NASM requires a trailing slash for the -I option. + let l:separator = has('win32') ? '\' : '/' + let l:output_null = has('win32') ? 'NUL' : '/dev/null' + + return '%e -X gnu -I %s:h' . l:separator + \ . ale#Pad(ale#Var(a:buffer, 'nasm_nasm_options')) + \ . ' %s' + \ . ' -o ' . l:output_null +endfunction + +function! ale_linters#nasm#nasm#Handle(buffer, lines) abort + " Note that we treat 'fatal' as errors. + let l:pattern = '^.\+:\(\d\+\): \([^:]\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2] =~? 'error\|fatal' ? 'E' : 'W', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('nasm', { +\ 'name': 'nasm', +\ 'output_stream': 'stderr', +\ 'lint_file': 1, +\ 'executable': {b -> ale#Var(b, 'nasm_nasm_executable')}, +\ 'command': function('ale_linters#nasm#nasm#GetCommand'), +\ 'callback': 'ale_linters#nasm#nasm#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nim/nimcheck.vim b/dot_vim/plugged/ale/ale_linters/nim/nimcheck.vim new file mode 100644 index 0000000..b739ca0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nim/nimcheck.vim @@ -0,0 +1,79 @@ +" Author: Baabelfish +" Description: Typechecking for nim files + +let s:end_col_patterns = [ +\ '\v''([^'']+)'' is declared but not used.*', +\ '\videntifier expected, but found ''([^'']+)''', +\ '\vimported and not used: ''([^'']+)''.*', +\ '\vundeclared identifier: ''([^'']+)''', +\ '\v''([^'']+)'' cannot be assigned to', +\ '\vredefinition of ''([^'']+)'';', +\] + +function! ale_linters#nim#nimcheck#Handle(buffer, lines) abort + let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p:t') + let l:pattern = '^\(.\+\.nim\)(\(\d\+\), \(\d\+\)) \(.\+\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " Only show errors of the current buffer + " NOTE: Checking filename only is OK because nim enforces unique + " module names. + let l:temp_buffer_filename = fnamemodify(l:match[1], ':p:t') + + if l:buffer_filename isnot# '' && l:temp_buffer_filename isnot# l:buffer_filename + continue + endif + + let l:item = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'W', + \} + + " Extract error type from message of type 'Error: Some error message' + let l:error_match = matchlist(l:item.text, '^\(.\{-}\): \(.\+\)$') + + if !empty(l:error_match) + if l:error_match[1] is# 'Error' + let l:item.type = 'E' + let l:item.text = l:error_match[2] + elseif l:error_match[1] is# 'Warning' + \|| l:error_match[1] is# 'Hint' + let l:item.text = l:error_match[2] + endif + endif + + let l:code_match = matchlist(l:item.text, '\v^(.+) \[([^ \[]+)\]$') + + if !empty(l:code_match) + let l:item.text = l:code_match[1] + let l:item.code = l:code_match[2] + endif + + " Find position end_col. + for l:col_match in ale#util#GetMatches(l:item.text, s:end_col_patterns) + let l:item.end_col = l:item.col + len(l:col_match[1]) - 1 + endfor + + call add(l:output, l:item) + endfor + + return l:output +endfunction + + +function! ale_linters#nim#nimcheck#GetCommand(buffer) abort + return 'nim check --verbosity:0 --colors:off --listFullPaths %s' +endfunction + + +call ale#linter#Define('nim', { +\ 'name': 'nimcheck', +\ 'executable': 'nim', +\ 'output_stream': 'both', +\ 'command': function('ale_linters#nim#nimcheck#GetCommand'), +\ 'callback': 'ale_linters#nim#nimcheck#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nim/nimlsp.vim b/dot_vim/plugged/ale/ale_linters/nim/nimlsp.vim new file mode 100644 index 0000000..5d04104 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nim/nimlsp.vim @@ -0,0 +1,33 @@ +" Author: jeremija +" Description: Support for nimlsp (language server for nim) + +call ale#Set('nim_nimlsp_nim_sources', '') + +function! ale_linters#nim#nimlsp#GetProjectRoot(buffer) abort + let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') + + if !empty(l:project_root) + return fnamemodify(l:project_root, ':h:h') + endif + + return '' +endfunction + +function! ale_linters#nim#nimlsp#GetCommand(buffer) abort + let l:nim_sources = ale#Var(a:buffer, 'nim_nimlsp_nim_sources') + + if !empty(l:nim_sources) + let l:nim_sources = ale#Escape(l:nim_sources) + endif + + return '%e' . ale#Pad(l:nim_sources) +endfunction + +call ale#linter#Define('nim', { +\ 'name': 'nimlsp', +\ 'lsp': 'stdio', +\ 'executable': 'nimlsp', +\ 'command': function('ale_linters#nim#nimlsp#GetCommand'), +\ 'language': 'nim', +\ 'project_root': function('ale_linters#nim#nimlsp#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nix/nix.vim b/dot_vim/plugged/ale/ale_linters/nix/nix.vim new file mode 100644 index 0000000..5d80f65 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nix/nix.vim @@ -0,0 +1,63 @@ +" Author: Alistair Bill <@alibabzo> +" Author: Maximilian Bosch +" Description: nix-instantiate linter for nix files + +function! ale_linters#nix#nix#Command(buffer, output, meta) abort + let l:version = a:output[0][22:] + + if l:version =~# '^\(1\|2.[0-3]\.\).*' + return 'nix-instantiate --parse -' + else + return 'nix-instantiate --log-format internal-json --parse -' + endif +endfunction + +function! ale_linters#nix#nix#Handle(buffer, lines) abort + let l:output = [] + + if empty(a:lines) + return l:output + endif + + if a:lines[0] =~# '^@nix .*' + for l:line in a:lines + if l:line =~# '^@nix .*' + let l:result = json_decode(strpart(l:line, 4)) + + if has_key(l:result, 'column') + call add(l:output, { + \ 'type': 'E', + \ 'lnum': l:result.line, + \ 'col': l:result.column, + \ 'text': l:result.raw_msg + \}) + endif + endif + endfor + else + let l:pattern = '^\(.\+\): \(.\+\) at .*:\(\d\+\):\(\d\+\)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[3] + 0, + \ 'col': l:match[4] + 0, + \ 'text': l:match[1] . ': ' . substitute(l:match[2], ',$', '', ''), + \ 'type': l:match[1] =~# '^error' ? 'E' : 'W', + \}) + endfor + endif + + return l:output +endfunction + +call ale#linter#Define('nix', { +\ 'name': 'nix', +\ 'output_stream': 'stderr', +\ 'executable': 'nix-instantiate', +\ 'command': {buffer -> ale#command#Run( +\ buffer, +\ 'nix-instantiate --version', +\ function('ale_linters#nix#nix#Command') +\ )}, +\ 'callback': 'ale_linters#nix#nix#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nix/rnix_lsp.vim b/dot_vim/plugged/ale/ale_linters/nix/rnix_lsp.vim new file mode 100644 index 0000000..949bed1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nix/rnix_lsp.vim @@ -0,0 +1,16 @@ +" Author: jD91mZM2 +" Description: rnix-lsp language client + +function! ale_linters#nix#rnix_lsp#GetProjectRoot(buffer) abort + " rnix-lsp does not yet use the project root, so getting it right is not + " important + return fnamemodify(a:buffer, ':h') +endfunction + +call ale#linter#Define('nix', { +\ 'name': 'rnix_lsp', +\ 'lsp': 'stdio', +\ 'executable': 'rnix-lsp', +\ 'command': '%e', +\ 'project_root': function('ale_linters#nix#rnix_lsp#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nix/statix.vim b/dot_vim/plugged/ale/ale_linters/nix/statix.vim new file mode 100644 index 0000000..a90a68a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nix/statix.vim @@ -0,0 +1,18 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: statix analysis and suggestions for Nix files + +call ale#Set('nix_statix_check_executable', 'statix') +call ale#Set('nix_statix_check_options', '') + +function! ale_linters#nix#statix#GetCommand(buffer) abort + return '%e check -o errfmt --stdin' + \ . ale#Pad(ale#Var(a:buffer, 'nix_statix_check_options')) +endfunction + +call ale#linter#Define('nix', { +\ 'name': 'statix', +\ 'executable': {b -> ale#Var(b, 'nix_statix_check_executable')}, +\ 'command': function('ale_linters#nix#statix#GetCommand'), +\ 'callback': 'ale#handlers#statix#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nroff/alex.vim b/dot_vim/plugged/ale/ale_linters/nroff/alex.vim new file mode 100644 index 0000000..3f06af2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nroff/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for nroff files + +call ale#handlers#alex#DefineLinter('nroff', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/nroff/proselint.vim b/dot_vim/plugged/ale/ale_linters/nroff/proselint.vim new file mode 100644 index 0000000..a23e56b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nroff/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for nroff files + +call ale#linter#Define('nroff', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/nroff/writegood.vim b/dot_vim/plugged/ale/ale_linters/nroff/writegood.vim new file mode 100644 index 0000000..bcf344f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/nroff/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for nroff files + +call ale#handlers#writegood#DefineLinter('nroff') diff --git a/dot_vim/plugged/ale/ale_linters/objc/ccls.vim b/dot_vim/plugged/ale/ale_linters/objc/ccls.vim new file mode 100644 index 0000000..7aef532 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/objc/ccls.vim @@ -0,0 +1,15 @@ +" Author: Ye Jingchen , Ben Falconer , jtalowell +" Description: A language server for Objective-C + +call ale#Set('objc_ccls_executable', 'ccls') +call ale#Set('objc_ccls_init_options', {}) +call ale#Set('c_build_dir', '') + +call ale#linter#Define('objc', { +\ 'name': 'ccls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'objc_ccls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), +\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'objc_ccls_init_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/objc/clang.vim b/dot_vim/plugged/ale/ale_linters/objc/clang.vim new file mode 100644 index 0000000..cafb97d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/objc/clang.vim @@ -0,0 +1,23 @@ +" Author: Bang Lee +" Description: clang linter for objc files + +" Set this option to change the Clang options for warnings for ObjC. +if !exists('g:ale_objc_clang_options') + let g:ale_objc_clang_options = '-std=c11 -Wall' +endif + +function! ale_linters#objc#clang#GetCommand(buffer) abort + " -iquote with the directory the file is in makes #include work for + " headers in the same directory. + return 'clang -S -x objective-c -fsyntax-only ' + \ . '-iquote %s:h' + \ . ' ' . ale#Var(a:buffer, 'objc_clang_options') . ' -' +endfunction + +call ale#linter#Define('objc', { +\ 'name': 'clang', +\ 'output_stream': 'stderr', +\ 'executable': 'clang', +\ 'command': function('ale_linters#objc#clang#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/objc/clangd.vim b/dot_vim/plugged/ale/ale_linters/objc/clangd.vim new file mode 100644 index 0000000..318d85b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/objc/clangd.vim @@ -0,0 +1,17 @@ +" Author: Andrey Melentyev +" Description: Clangd language server + +call ale#Set('objc_clangd_executable', 'clangd') +call ale#Set('objc_clangd_options', '') + +function! ale_linters#objc#clangd#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'objc_clangd_options')) +endfunction + +call ale#linter#Define('objc', { +\ 'name': 'clangd', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'objc_clangd_executable')}, +\ 'command': function('ale_linters#objc#clangd#GetCommand'), +\ 'project_root': function('ale#c#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/objcpp/clang.vim b/dot_vim/plugged/ale/ale_linters/objcpp/clang.vim new file mode 100644 index 0000000..35a40c6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/objcpp/clang.vim @@ -0,0 +1,23 @@ +" Author: Bang Lee +" Description: clang linter for objcpp files + +" Set this option to change the Clang options for warnings for ObjCPP. +if !exists('g:ale_objcpp_clang_options') + let g:ale_objcpp_clang_options = '-std=c++14 -Wall' +endif + +function! ale_linters#objcpp#clang#GetCommand(buffer) abort + " -iquote with the directory the file is in makes #include work for + " headers in the same directory. + return 'clang++ -S -x objective-c++ -fsyntax-only ' + \ . '-iquote %s:h' + \ . ' ' . ale#Var(a:buffer, 'objcpp_clang_options') . ' -' +endfunction + +call ale#linter#Define('objcpp', { +\ 'name': 'clang', +\ 'output_stream': 'stderr', +\ 'executable': 'clang++', +\ 'command': function('ale_linters#objcpp#clang#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/objcpp/clangd.vim b/dot_vim/plugged/ale/ale_linters/objcpp/clangd.vim new file mode 100644 index 0000000..2945532 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/objcpp/clangd.vim @@ -0,0 +1,17 @@ +" Author: Andrey Melentyev +" Description: Clangd language server + +call ale#Set('objcpp_clangd_executable', 'clangd') +call ale#Set('objcpp_clangd_options', '') + +function! ale_linters#objcpp#clangd#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'objcpp_clangd_options')) +endfunction + +call ale#linter#Define('objcpp', { +\ 'name': 'clangd', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'objcpp_clangd_executable')}, +\ 'command': function('ale_linters#objcpp#clangd#GetCommand'), +\ 'project_root': function('ale#c#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ocaml/merlin.vim b/dot_vim/plugged/ale/ale_linters/ocaml/merlin.vim new file mode 100644 index 0000000..cfec996 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ocaml/merlin.vim @@ -0,0 +1,17 @@ +" Author: Andrey Popp -- @andreypopp +" Description: Report errors in OCaml code with Merlin + +if !exists('g:merlin') + finish +endif + +function! ale_linters#ocaml#merlin#Handle(buffer, lines) abort + return merlin#ErrorLocList() +endfunction + +call ale#linter#Define('ocaml', { +\ 'name': 'merlin', +\ 'executable': 'ocamlmerlin', +\ 'command': 'true', +\ 'callback': 'ale_linters#ocaml#merlin#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ocaml/ocamllsp.vim b/dot_vim/plugged/ale/ale_linters/ocaml/ocamllsp.vim new file mode 100644 index 0000000..4ff7419 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ocaml/ocamllsp.vim @@ -0,0 +1,13 @@ +" Author: Risto Stevcev +" Description: The official language server for OCaml + +call ale#Set('ocaml_ocamllsp_use_opam', 1) + +call ale#linter#Define('ocaml', { +\ 'name': 'ocamllsp', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#ocamllsp#GetExecutable'), +\ 'command': function('ale#handlers#ocamllsp#GetCommand'), +\ 'language': function('ale#handlers#ocamllsp#GetLanguage'), +\ 'project_root': function('ale#handlers#ocamllsp#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ocaml/ols.vim b/dot_vim/plugged/ale/ale_linters/ocaml/ols.vim new file mode 100644 index 0000000..ec71bdb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ocaml/ols.vim @@ -0,0 +1,14 @@ +" Author: Michael Jungo +" Description: A language server for OCaml + +call ale#Set('ocaml_ols_executable', 'ocaml-language-server') +call ale#Set('ocaml_ols_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('ocaml', { +\ 'name': 'ols', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#ols#GetExecutable'), +\ 'command': function('ale#handlers#ols#GetCommand'), +\ 'language': function('ale#handlers#ols#GetLanguage'), +\ 'project_root': function('ale#handlers#ols#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ocamlinterface/merlin.vim b/dot_vim/plugged/ale/ale_linters/ocamlinterface/merlin.vim new file mode 100644 index 0000000..799490f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ocamlinterface/merlin.vim @@ -0,0 +1,17 @@ +" Author: Andrey Popp -- @andreypopp +" Description: Report errors in OCaml code with Merlin + +if !exists('g:merlin') + finish +endif + +function! ale_linters#ocamlinterface#merlin#Handle(buffer, lines) abort + return merlin#ErrorLocList() +endfunction + +call ale#linter#Define('ocamlinterface', { +\ 'name': 'merlin', +\ 'executable': 'ocamlmerlin', +\ 'command': 'true', +\ 'callback': 'ale_linters#ocamlinterface#merlin#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ocamlinterface/ocamllsp.vim b/dot_vim/plugged/ale/ale_linters/ocamlinterface/ocamllsp.vim new file mode 100644 index 0000000..cd4bea8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ocamlinterface/ocamllsp.vim @@ -0,0 +1,13 @@ +" Author: Risto Stevcev +" Description: The official language server for OCaml + +call ale#Set('ocaml_ocamllsp_use_opam', 1) + +call ale#linter#Define('ocamlinterface', { +\ 'name': 'ocamllsp', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#ocamllsp#GetExecutable'), +\ 'command': function('ale#handlers#ocamllsp#GetCommand'), +\ 'language': function('ale#handlers#ocamllsp#GetLanguage'), +\ 'project_root': function('ale#handlers#ocamllsp#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/openapi/ibm_validator.vim b/dot_vim/plugged/ale/ale_linters/openapi/ibm_validator.vim new file mode 100644 index 0000000..446931a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/openapi/ibm_validator.vim @@ -0,0 +1,58 @@ +" Author: Horacio Sanson + +call ale#Set('openapi_ibm_validator_executable', 'lint-openapi') +call ale#Set('openapi_ibm_validator_options', '') + +function! ale_linters#openapi#ibm_validator#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'openapi_ibm_validator_options')) + \ . ' %t' +endfunction + +function! ale_linters#openapi#ibm_validator#Handle(buffer, lines) abort + let l:output = [] + let l:type = 'E' + let l:message = '' + let l:nr = -1 + + for l:line in a:lines + let l:match = matchlist(l:line, '^errors$') + + if !empty(l:match) + let l:type = 'E' + endif + + let l:match = matchlist(l:line, '^warnings$') + + if !empty(l:match) + let l:type = 'W' + endif + + let l:match = matchlist(l:line, '^ *Message : *\(.\+\)$') + + if !empty(l:match) + let l:message = l:match[1] + endif + + let l:match = matchlist(l:line, '^ *Line *: *\(\d\+\)$') + + if !empty(l:match) + let l:nr = l:match[1] + + call add(l:output, { + \ 'lnum': l:nr + 0, + \ 'col': 0, + \ 'text': l:message, + \ 'type': l:type, + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('openapi', { +\ 'name': 'ibm_validator', +\ 'executable': {b -> ale#Var(b, 'openapi_ibm_validator_executable')}, +\ 'command': function('ale_linters#openapi#ibm_validator#GetCommand'), +\ 'callback': 'ale_linters#openapi#ibm_validator#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/openapi/yamllint.vim b/dot_vim/plugged/ale/ale_linters/openapi/yamllint.vim new file mode 100644 index 0000000..2b8952c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/openapi/yamllint.vim @@ -0,0 +1,9 @@ +call ale#Set('yaml_yamllint_executable', 'yamllint') +call ale#Set('yaml_yamllint_options', '') + +call ale#linter#Define('openapi', { +\ 'name': 'yamllint', +\ 'executable': {b -> ale#Var(b, 'yaml_yamllint_executable')}, +\ 'command': function('ale#handlers#yamllint#GetCommand'), +\ 'callback': 'ale#handlers#yamllint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/openscad/sca2d.vim b/dot_vim/plugged/ale/ale_linters/openscad/sca2d.vim new file mode 100644 index 0000000..60804a1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/openscad/sca2d.vim @@ -0,0 +1,24 @@ +" Description: SCA2D linter for OpenSCAD files + +call ale#Set('openscad_sca2d_executable', 'sca2d') +call ale#Set('openscad_sca2d_options', '') + +function! ale_linters#openscad#sca2d#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'openscad_sca2d_executable') +endfunction + +function! ale_linters#openscad#sca2d#GetCommand(buffer) abort + let l:executable = ale_linters#openscad#sca2d#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'openscad_sca2d_options') + + return ale#Escape(l:executable) . ale#Pad(l:options) . ' %s' +endfunction + +call ale#linter#Define('openscad', { +\ 'name': 'SCA2D', +\ 'aliases': ['sca2d'], +\ 'executable': function('ale_linters#openscad#sca2d#GetExecutable'), +\ 'command': function('ale_linters#openscad#sca2d#GetCommand'), +\ 'callback': 'ale#handlers#openscad#SCA2D_callback', +\ 'lint_file': 1, +\ }) diff --git a/dot_vim/plugged/ale/ale_linters/perl/perl.vim b/dot_vim/plugged/ale/ale_linters/perl/perl.vim new file mode 100644 index 0000000..0f06528 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/perl/perl.vim @@ -0,0 +1,64 @@ +" Author: Vincent Lequertier +" Description: This file adds support for checking perl syntax + +call ale#Set('perl_perl_executable', 'perl') +call ale#Set('perl_perl_options', '-c -Mwarnings -Ilib') + +function! ale_linters#perl#perl#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'perl_perl_options')) . ' %t' +endfunction + +let s:begin_failed_skip_pattern = '\v' . join([ +\ '^Compilation failed in require', +\ '^Can''t locate', +\], '|') + +function! ale_linters#perl#perl#Handle(buffer, lines) abort + if empty(a:lines) + return [] + endif + + let l:pattern = '\(..\{-}\) at \(..\{-}\) line \(\d\+\)' + let l:output = [] + let l:basename = expand('#' . a:buffer . ':t') + + let l:type = 'E' + + if a:lines[-1] =~# 'syntax OK' + let l:type = 'W' + endif + + let l:seen = {} + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:line = l:match[3] + let l:file = l:match[2] + let l:text = l:match[1] + + if ale#path#IsBufferPath(a:buffer, l:file) + \ && !has_key(l:seen,l:line) + \ && ( + \ l:text isnot# 'BEGIN failed--compilation aborted' + \ || empty(l:output) + \ || match(l:output[-1].text, s:begin_failed_skip_pattern) < 0 + \ ) + call add(l:output, { + \ 'lnum': l:line, + \ 'text': l:text, + \ 'type': l:type, + \}) + + let l:seen[l:line] = 1 + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('perl', { +\ 'name': 'perl', +\ 'executable': {b -> ale#Var(b, 'perl_perl_executable')}, +\ 'output_stream': 'both', +\ 'command': function('ale_linters#perl#perl#GetCommand'), +\ 'callback': 'ale_linters#perl#perl#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/perl/perlcritic.vim b/dot_vim/plugged/ale/ale_linters/perl/perlcritic.vim new file mode 100644 index 0000000..f3154c0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/perl/perlcritic.vim @@ -0,0 +1,61 @@ +" Author: Vincent Lequertier , Chris Weyl +" Description: This file adds support for checking perl with perl critic + +call ale#Set('perl_perlcritic_executable', 'perlcritic') +call ale#Set('perl_perlcritic_profile', '.perlcriticrc') +call ale#Set('perl_perlcritic_options', '') +call ale#Set('perl_perlcritic_showrules', 0) + +function! ale_linters#perl#perlcritic#GetProfile(buffer) abort + " first see if we've been overridden + let l:profile = ale#Var(a:buffer, 'perl_perlcritic_profile') + + if l:profile is? '' + return '' + endif + + " otherwise, iterate upwards to find it + return ale#path#FindNearestFile(a:buffer, l:profile) +endfunction + +function! ale_linters#perl#perlcritic#GetCommand(buffer) abort + let l:critic_verbosity = '%l:%c %m\n' + + if ale#Var(a:buffer, 'perl_perlcritic_showrules') + let l:critic_verbosity = '%l:%c %m [%p]\n' + endif + + let l:profile = ale_linters#perl#perlcritic#GetProfile(a:buffer) + let l:options = ale#Var(a:buffer, 'perl_perlcritic_options') + + return '%e' + \ . ' --verbose ' . ale#Escape(l:critic_verbosity) + \ . ' --nocolor' + \ . (!empty(l:profile) ? ' --profile ' . ale#Escape(l:profile) : '') + \ . ale#Pad(l:options) +endfunction + + +function! ale_linters#perl#perlcritic#Handle(buffer, lines) abort + let l:pattern = '\(\d\+\):\(\d\+\) \(.\+\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1], + \ 'col': l:match[2], + \ 'text': l:match[3], + \ 'type': 'W' + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('perl', { +\ 'name': 'perlcritic', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'perl_perlcritic_executable')}, +\ 'command': function('ale_linters#perl#perlcritic#GetCommand'), +\ 'callback': 'ale_linters#perl#perlcritic#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/perl6/perl6.vim b/dot_vim/plugged/ale/ale_linters/perl6/perl6.vim new file mode 100644 index 0000000..444ae4d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/perl6/perl6.vim @@ -0,0 +1,166 @@ +" Author:Travis Gibson +" Description: This file adds support for checking perl6 syntax + +let g:ale_perl6_perl6_executable = +\ get(g:, 'ale_perl6_perl6_executable', 'perl6') + +let g:ale_perl6_perl6_options = +\ get(g:, 'ale_perl6_perl6_options', '-c -Ilib') + +let $PERL6_EXCEPTIONS_HANDLER = 'JSON' + +let $RAKUDO_ERROR_COLOR = 0 + +function! ale_linters#perl6#perl6#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'perl6_perl6_executable') +endfunction + +function! ale_linters#perl6#perl6#GetCommand(buffer) abort + return ale_linters#perl6#perl6#GetExecutable(a:buffer) + \ . ' ' . ale#Var(a:buffer, 'perl6_perl6_options') + \ . ' %t' +endfunction + +function! ale_linters#perl6#perl6#ExtractError(dict, item, type, buffer) abort + let l:file = '' + let l:line = 1 + let l:column = '' + let l:text = '' + let l:pre = '' + let l:counter = 2 + let l:end_line = '' + let l:linepatternmessage = 'at\s\+line\s\+\(\d\+\)' + + if has_key(a:dict[a:item], 'filename') && !empty(a:dict[a:item]['filename']) + let l:file = a:dict[a:item]['filename'] + endif + + if has_key(a:dict[a:item], 'line') && !empty(a:dict[a:item]['line']) + let l:line = a:dict[a:item]['line'] + let l:counter -= 1 + endif + + if has_key(a:dict[a:item], 'column') && !empty(a:dict[a:item]['column']) + let l:column = a:dict[a:item]['column'] + endif + + if has_key(a:dict[a:item], 'message') && !empty(a:dict[a:item]['message']) + let l:text = substitute(a:dict[a:item]['message'], '\s*\n\s*', ' ', 'g') + let l:counter -= 1 + endif + + if has_key(a:dict[a:item], 'line-real') && !empty(a:dict[a:item]['line-real']) + let l:end_line = l:line + let l:line = a:dict[a:item]['line-real'] + endif + + for l:match in ale#util#GetMatches(l:text, l:linepatternmessage) + let l:line = l:match[1] + let l:counter -= 1 + endfor + +" Currently, filenames and line numbers are not always given in the error output + if l:counter < 2 + \&& ( ale#path#IsBufferPath(a:buffer, l:file) || l:file is# '' ) + return { + \ 'lnum': '' . l:line, + \ 'text': l:text, + \ 'type': a:type, + \ 'col': l:column, + \ 'end_lnum': l:end_line, + \ 'code': a:item, + \} + endif + + return '' +endfunction + +function! ale_linters#perl6#perl6#Handle(buffer, lines) abort + let l:output = [] + + if empty(a:lines) + return l:output + endif + + if a:lines[0] is# 'Syntax OK' + return l:output + endif + + try + let l:json = json_decode(join(a:lines, '')) + catch /E474\|E491/ + call add(l:output, { + \ 'lnum': '1', + \ 'text': 'Received output in the default Perl6 error format. See :ALEDetail for details', + \ 'detail': join(a:lines, "\n"), + \ 'type': 'W', + \ }) + + return l:output + endtry + + if type(l:json) is v:t_dict + for l:key in keys(l:json) + if has_key(l:json[l:key], 'sorrows') + \&& has_key(l:json[l:key], 'worries') + if !empty(l:json[l:key]['sorrows']) + for l:dictionary in get(l:json[l:key], 'sorrows') + for l:item in keys(l:dictionary) + let l:result = + \ ale_linters#perl6#perl6#ExtractError( + \ l:dictionary, + \ l:item, + \ 'E', + \ a:buffer, + \ ) + + if l:result isnot# '' + call add(l:output, l:result) + endif + endfor + endfor + endif + + if !empty(l:json[l:key]['worries']) + for l:dictionary in get(l:json[l:key], 'worries') + for l:item in keys(l:dictionary) + let l:result = + \ ale_linters#perl6#perl6#ExtractError( + \ l:dictionary, + \ l:item, + \ 'W', + \ a:buffer, + \ ) + + if l:result isnot# '' + call add(l:output, l:result) + endif + endfor + endfor + endif + else + let l:result = ale_linters#perl6#perl6#ExtractError( + \ l:json, + \ l:key, + \ 'E', + \ a:buffer, + \ ) + + if l:result isnot# '' + call add(l:output, l:result) + endif + endif + endfor + endif + + return l:output +endfunction + +call ale#linter#Define('perl6', { +\ 'name': 'perl6', +\ 'executable': function('ale_linters#perl6#perl6#GetExecutable'), +\ 'output_stream': 'both', +\ 'command': function('ale_linters#perl6#perl6#GetCommand'), +\ 'callback': 'ale_linters#perl6#perl6#Handle', +\}) + diff --git a/dot_vim/plugged/ale/ale_linters/php/cspell.vim b/dot_vim/plugged/ale/ale_linters/php/cspell.vim new file mode 100644 index 0000000..574df57 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for PHP files. + +call ale#handlers#cspell#DefineLinter('php') diff --git a/dot_vim/plugged/ale/ale_linters/php/executable_intelephense.vim b/dot_vim/plugged/ale/ale_linters/php/executable_intelephense.vim new file mode 100644 index 0000000..0fdcc93 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/executable_intelephense.vim @@ -0,0 +1,32 @@ +" Author: Eric Stern , +" Arnold Chand +" Description: Intelephense language server integration for ALE + +call ale#Set('php_intelephense_executable', 'intelephense') +call ale#Set('php_intelephense_use_global', 1) +call ale#Set('php_intelephense_config', {}) + +function! ale_linters#php#intelephense#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +function! ale_linters#php#intelephense#GetInitializationOptions(buffer) abort + return ale#Var(a:buffer, 'php_intelephense_config') +endfunction + +call ale#linter#Define('php', { +\ 'name': 'intelephense', +\ 'lsp': 'stdio', +\ 'initialization_options': function('ale_linters#php#intelephense#GetInitializationOptions'), +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_intelephense', [])}, +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#php#intelephense#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/langserver.vim b/dot_vim/plugged/ale/ale_linters/php/langserver.vim new file mode 100644 index 0000000..c3d89a0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/langserver.vim @@ -0,0 +1,27 @@ +" Author: Eric Stern +" Description: PHP Language server integration for ALE + +call ale#Set('php_langserver_executable', 'php-language-server.php') +call ale#Set('php_langserver_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#php#langserver#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('php', { +\ 'name': 'langserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_langserver', [ +\ 'vendor/bin/php-language-server.php', +\ ])}, +\ 'command': 'php %e', +\ 'project_root': function('ale_linters#php#langserver#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/phan.vim b/dot_vim/plugged/ale/ale_linters/php/phan.vim new file mode 100644 index 0000000..50c6d6e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/phan.vim @@ -0,0 +1,75 @@ +" Author: diegoholiveira , haginaga +" Description: static analyzer for PHP + +" Define the minimum severity +let g:ale_php_phan_minimum_severity = get(g:, 'ale_php_phan_minimum_severity', 0) + +let g:ale_php_phan_executable = get(g:, 'ale_php_phan_executable', 'phan') +let g:ale_php_phan_use_client = get(g:, 'ale_php_phan_use_client', 0) + +function! ale_linters#php#phan#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'php_phan_executable') + + if ale#Var(a:buffer, 'php_phan_use_client') == 1 && l:executable is# 'phan' + let l:executable = 'phan_client' + endif + + return l:executable +endfunction + +function! ale_linters#php#phan#GetCommand(buffer) abort + if ale#Var(a:buffer, 'php_phan_use_client') == 1 + let l:args = '-l ' + \ . ' %s' + else + let l:args = '-y ' + \ . ale#Var(a:buffer, 'php_phan_minimum_severity') + \ . ' %s' + endif + + let l:executable = ale_linters#php#phan#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' ' . l:args +endfunction + +function! ale_linters#php#phan#Handle(buffer, lines) abort + " Matches against lines like the following: + if ale#Var(a:buffer, 'php_phan_use_client') == 1 + " Phan error: ERRORTYPE: message in /path/to/some-filename.php on line nnn + let l:pattern = '^Phan error: \(\w\+\): \(.\+\) in \(.\+\) on line \(\d\+\)$' + else + " /path/to/some-filename.php:18 ERRORTYPE message + let l:pattern = '^\(.*\):\(\d\+\)\s\(\w\+\)\s\(.\+\)$' + endif + + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if ale#Var(a:buffer, 'php_phan_use_client') == 1 + let l:dict = { + \ 'lnum': l:match[4] + 0, + \ 'text': l:match[2], + \ 'filename': l:match[3], + \ 'type': 'W', + \} + else + let l:dict = { + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': 'W', + \ 'filename': l:match[1], + \} + endif + + call add(l:output, l:dict) + endfor + + return l:output +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phan', +\ 'executable': function('ale_linters#php#phan#GetExecutable'), +\ 'command': function('ale_linters#php#phan#GetCommand'), +\ 'callback': 'ale_linters#php#phan#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/php.vim b/dot_vim/plugged/ale/ale_linters/php/php.vim new file mode 100644 index 0000000..51a109b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/php.vim @@ -0,0 +1,39 @@ +" Author: Spencer Wood , Adriaan Zonnenberg +" Description: This file adds support for checking PHP with php-cli + +call ale#Set('php_php_executable', 'php') + +function! ale_linters#php#php#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " PHP 7.1<= - Parse error: syntax error, unexpected ';', expecting ']' in - on line 15 + " PHP 7.2>= - Parse error: syntax error, unexpected ';', expecting ']' in Standard input code on line 15 + let l:pattern = '\v^%(Fatal|Parse) error:\s+(.+unexpected ''(.+)%(expecting.+)@ ale#Var(b, 'php_php_executable')}, +\ 'output_stream': 'stdout', +\ 'command': '%e -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --', +\ 'callback': 'ale_linters#php#php#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/phpactor.vim b/dot_vim/plugged/ale/ale_linters/php/phpactor.vim new file mode 100644 index 0000000..b137eaf --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/phpactor.vim @@ -0,0 +1,23 @@ +" Author: Arizard +" Description: PHPactor integration for ALE + +" Copied from langserver.vim +function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phpactor', +\ 'lsp': 'stdio', +\ 'executable': 'phpactor', +\ 'command': '%e language-server', +\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/phpcs.vim b/dot_vim/plugged/ale/ale_linters/php/phpcs.vim new file mode 100644 index 0000000..ce47a13 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/phpcs.vim @@ -0,0 +1,54 @@ +" Author: jwilliams108 , Eric Stern +" Description: phpcs for PHP files + +let g:ale_php_phpcs_standard = get(g:, 'ale_php_phpcs_standard', '') + +call ale#Set('php_phpcs_options', '') +call ale#Set('php_phpcs_executable', 'phpcs') +call ale#Set('php_phpcs_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#php#phpcs#GetCommand(buffer) abort + let l:standard = ale#Var(a:buffer, 'php_phpcs_standard') + let l:standard_option = !empty(l:standard) + \ ? '--standard=' . ale#Escape(l:standard) + \ : '' + + return '%e -s --report=emacs --stdin-path=%s' + \ . ale#Pad(l:standard_option) + \ . ale#Pad(ale#Var(a:buffer, 'php_phpcs_options')) +endfunction + +function! ale_linters#php#phpcs#Handle(buffer, lines) abort + " Matches against lines like the following: + " + " /path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact) + let l:pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\) - \(.\+\) (\(.\+\)).*$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[5] + let l:text = l:match[4] . ' (' . l:code . ')' + let l:type = l:match[3] + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:text, + \ 'type': l:type is# 'error' ? 'E' : 'W', + \ 'sub_type': 'style', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phpcs', +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_phpcs', [ +\ 'vendor/bin/phpcs', +\ 'phpcs' +\ ])}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#php#phpcs#GetCommand'), +\ 'callback': 'ale_linters#php#phpcs#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/phpmd.vim b/dot_vim/plugged/ale/ale_linters/php/phpmd.vim new file mode 100644 index 0000000..9b1d1e4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/phpmd.vim @@ -0,0 +1,38 @@ +" Author: medains , David Sierra +" Description: phpmd for PHP files + +let g:ale_php_phpmd_executable = get(g:, 'ale_php_phpmd_executable', 'phpmd') + +" Set to change the ruleset +let g:ale_php_phpmd_ruleset = get(g:, 'ale_php_phpmd_ruleset', 'cleancode,codesize,controversial,design,naming,unusedcode') + +function! ale_linters#php#phpmd#GetCommand(buffer) abort + return '%e %s text' + \ . ale#Pad(ale#Var(a:buffer, 'php_phpmd_ruleset')) + \ . ' --ignore-violations-on-exit %t' +endfunction + +function! ale_linters#php#phpmd#Handle(buffer, lines) abort + " Matches against lines like the following: + " + " /path/to/some-filename.php:18 message + let l:pattern = '^.*:\(\d\+\)\s\+\(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'text': l:match[2], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phpmd', +\ 'executable': {b -> ale#Var(b, 'php_phpmd_executable')}, +\ 'command': function('ale_linters#php#phpmd#GetCommand'), +\ 'callback': 'ale_linters#php#phpmd#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/phpstan.vim b/dot_vim/plugged/ale/ale_linters/php/phpstan.vim new file mode 100644 index 0000000..4dce5d5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/phpstan.vim @@ -0,0 +1,89 @@ +" Author: medains , ardis , Arizard +" Description: phpstan for PHP files + +" Set to change the ruleset +let g:ale_php_phpstan_executable = get(g:, 'ale_php_phpstan_executable', 'phpstan') +let g:ale_php_phpstan_level = get(g:, 'ale_php_phpstan_level', '') +let g:ale_php_phpstan_configuration = get(g:, 'ale_php_phpstan_configuration', '') +let g:ale_php_phpstan_autoload = get(g:, 'ale_php_phpstan_autoload', '') +let g:ale_php_phpstan_memory_limit = get(g:, 'ale_php_phpstan_memory_limit', '') +call ale#Set('php_phpstan_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#php#phpstan#GetCommand(buffer, version) abort + let l:configuration = ale#Var(a:buffer, 'php_phpstan_configuration') + let l:configuration_option = !empty(l:configuration) + \ ? ' -c ' . ale#Escape(l:configuration) + \ : '' + + let l:autoload = ale#Var(a:buffer, 'php_phpstan_autoload') + let l:autoload_option = !empty(l:autoload) + \ ? ' -a ' . ale#Escape(l:autoload) + \ : '' + + let l:memory_limit = ale#Var(a:buffer, 'php_phpstan_memory_limit') + let l:memory_limit_option = !empty(l:memory_limit) + \ ? ' --memory-limit ' . ale#Escape(l:memory_limit) + \ : '' + + let l:level = ale#Var(a:buffer, 'php_phpstan_level') + let l:config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon') + let l:dist_config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist') + + if empty(l:level) && empty(l:config_file_exists) && empty(l:dist_config_file_exists) + " if no configuration file is found, then use 4 as a default level + let l:level = '4' + endif + + let l:level_option = !empty(l:level) + \ ? ' -l ' . ale#Escape(l:level) + \ : '' + + let l:error_format = ale#semver#GTE(a:version, [0, 10, 3]) + \ ? ' --error-format json' + \ : ' --errorFormat json' + + return '%e analyze --no-progress' + \ . l:error_format + \ . l:configuration_option + \ . l:autoload_option + \ . l:level_option + \ . l:memory_limit_option + \ . ' %s' +endfunction + +function! ale_linters#php#phpstan#Handle(buffer, lines) abort + let l:res = ale#util#FuzzyJSONDecode(a:lines, {'files': []}) + let l:output = [] + + if type(l:res.files) is v:t_list + return l:output + endif + + for l:err in l:res.files[expand('#' . a:buffer .':p')].messages + call add(l:output, { + \ 'lnum': l:err.line, + \ 'text': l:err.message, + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('php', { +\ 'name': 'phpstan', +\ 'executable': {buffer -> ale#path#FindExecutable(buffer, 'php_phpstan', [ +\ 'vendor/bin/phpstan', +\ 'phpstan' +\ ])}, +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#path#FindExecutable(buffer, 'php_phpstan', [ +\ 'vendor/bin/phpstan', +\ 'phpstan' +\ ]), +\ '%e --version', +\ function('ale_linters#php#phpstan#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#php#phpstan#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/psalm.vim b/dot_vim/plugged/ale/ale_linters/php/psalm.vim new file mode 100644 index 0000000..f128005 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/psalm.vim @@ -0,0 +1,32 @@ +" Author: Matt Brown +" Description: plugin for Psalm, static analyzer for PHP + +call ale#Set('php_psalm_executable', 'psalm') +call ale#Set('php_psalm_options', '') +call ale#Set('php_psalm_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#php#psalm#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if (!empty(l:composer_path)) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +function! ale_linters#php#psalm#GetCommand(buffer) abort + return '%e --language-server' . ale#Pad(ale#Var(a:buffer, 'php_psalm_options')) +endfunction + +call ale#linter#Define('php', { +\ 'name': 'psalm', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_psalm', [ +\ 'vendor/bin/psalm', +\ ])}, +\ 'command': function('ale_linters#php#psalm#GetCommand'), +\ 'project_root': function('ale_linters#php#psalm#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/php/tlint.vim b/dot_vim/plugged/ale/ale_linters/php/tlint.vim new file mode 100644 index 0000000..80bdd1f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/php/tlint.vim @@ -0,0 +1,80 @@ +" Author: Jose Soto +" +" Description: Tighten Opinionated PHP Linting +" Website: https://github.com/tightenco/tlint + +call ale#Set('php_tlint_executable', 'tlint') +call ale#Set('php_tlint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('php_tlint_options', '') + +function! ale_linters#php#tlint#GetProjectRoot(buffer) abort + let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') + + if !empty(l:composer_path) + return fnamemodify(l:composer_path, ':h') + endif + + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +function! ale_linters#php#tlint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'php_tlint', [ + \ 'vendor/bin/tlint', + \ 'tlint', + \]) +endfunction + +function! ale_linters#php#tlint#GetCommand(buffer) abort + let l:executable = ale_linters#php#tlint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'php_tlint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' lint %s' +endfunction + +function! ale_linters#php#tlint#Handle(buffer, lines) abort + " Matches against lines like the following: + " + " ! There should be 1 space around `.` concatenations, and additional lines should always start with a `.` + " 22 : ` $something = 'a'.'name';` + " + let l:loop_count = 0 + let l:messages_pattern = '^\! \(.*\)' + let l:output = [] + let l:pattern = '^\(\d\+\) \:' + let l:temp_messages = [] + + for l:message in ale#util#GetMatches(a:lines, l:messages_pattern) + call add(l:temp_messages, l:message) + endfor + + let l:loop_count = 0 + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:num = l:match[1] + let l:text = l:temp_messages[l:loop_count] + + call add(l:output, { + \ 'lnum': l:num, + \ 'col': 0, + \ 'text': l:text, + \ 'type': 'W', + \ 'sub_type': 'style', + \}) + + let l:loop_count += 1 + endfor + + return l:output +endfunction + +call ale#linter#Define('php', { +\ 'name': 'tlint', +\ 'executable': function('ale_linters#php#tlint#GetExecutable'), +\ 'command': function('ale_linters#php#tlint#GetCommand'), +\ 'callback': 'ale_linters#php#tlint#Handle', +\ 'project_root': function('ale_linters#php#tlint#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/po/alex.vim b/dot_vim/plugged/ale/ale_linters/po/alex.vim new file mode 100644 index 0000000..05c67f1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/po/alex.vim @@ -0,0 +1,4 @@ +" Author: Cian Butler https://github.com/butlerx +" Description: alex for PO files + +call ale#handlers#alex#DefineLinter('po', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/po/msgfmt.vim b/dot_vim/plugged/ale/ale_linters/po/msgfmt.vim new file mode 100644 index 0000000..8279ccd --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/po/msgfmt.vim @@ -0,0 +1,30 @@ +" Author: Cian Butler https://github.com/butlerx +" Description: msgfmt for PO files + +function! ale_linters#po#msgfmt#Handle(buffer, lines) abort + let l:results = ale#handlers#unix#HandleAsWarning(a:buffer, a:lines) + let l:index = 0 + + for l:item in l:results + if l:index > 0 && l:item.text =~? 'this is the location of the first definition' + let l:last_item = l:results[l:index - 1] + + if l:last_item.text =~? 'duplicate message definition' + let l:last_item.text = 'duplicate of message at line ' . l:item.lnum + let l:item.text = 'first location of duplicate of message at line ' . l:last_item.lnum + endif + endif + + let l:index += 1 + endfor + + return l:results +endfunction + +call ale#linter#Define('po', { +\ 'name': 'msgfmt', +\ 'executable': 'msgfmt', +\ 'output_stream': 'stderr', +\ 'command': 'msgfmt --statistics --output-file=- %t', +\ 'callback': 'ale_linters#po#msgfmt#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/po/proselint.vim b/dot_vim/plugged/ale/ale_linters/po/proselint.vim new file mode 100644 index 0000000..ce13250 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/po/proselint.vim @@ -0,0 +1,9 @@ +" Author: Cian Butler https://github.com/butlerx +" Description: proselint for PO files + +call ale#linter#Define('po', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/po/writegood.vim b/dot_vim/plugged/ale/ale_linters/po/writegood.vim new file mode 100644 index 0000000..1468647 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/po/writegood.vim @@ -0,0 +1,4 @@ +" Author: Cian Butler https://github.com/butlerx +" Description: write-good for PO files + +call ale#handlers#writegood#DefineLinter('po') diff --git a/dot_vim/plugged/ale/ale_linters/pod/alex.vim b/dot_vim/plugged/ale/ale_linters/pod/alex.vim new file mode 100644 index 0000000..c89f833 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pod/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for pod files + +call ale#handlers#alex#DefineLinter('pod', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/pod/proselint.vim b/dot_vim/plugged/ale/ale_linters/pod/proselint.vim new file mode 100644 index 0000000..2eb83f5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pod/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for Pod files + +call ale#linter#Define('pod', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/pod/writegood.vim b/dot_vim/plugged/ale/ale_linters/pod/writegood.vim new file mode 100644 index 0000000..9f5461e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pod/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for Pod files + +call ale#handlers#writegood#DefineLinter('pod') diff --git a/dot_vim/plugged/ale/ale_linters/pony/ponyc.vim b/dot_vim/plugged/ale/ale_linters/pony/ponyc.vim new file mode 100644 index 0000000..6d4594f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pony/ponyc.vim @@ -0,0 +1,16 @@ +" Description: ponyc linter for pony files + +call ale#Set('pony_ponyc_executable', 'ponyc') +call ale#Set('pony_ponyc_options', '--pass paint') + +function! ale_linters#pony#ponyc#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'pony_ponyc_options')) +endfunction + +call ale#linter#Define('pony', { +\ 'name': 'ponyc', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'pony_ponyc_executable')}, +\ 'command': function('ale_linters#pony#ponyc#GetCommand'), +\ 'callback': 'ale#handlers#pony#HandlePonycFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/powershell/cspell.vim b/dot_vim/plugged/ale/ale_linters/powershell/cspell.vim new file mode 100644 index 0000000..4a66dba --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/powershell/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for PowerShell files. + +call ale#handlers#cspell#DefineLinter('powershell') diff --git a/dot_vim/plugged/ale/ale_linters/powershell/powershell.vim b/dot_vim/plugged/ale/ale_linters/powershell/powershell.vim new file mode 100644 index 0000000..5f49f72 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/powershell/powershell.vim @@ -0,0 +1,100 @@ +" Author: Jesse Harris - https://github.com/zigford +" Description: This file adds support for powershell scripts synatax errors + +call ale#Set('powershell_powershell_executable', 'pwsh') + +function! ale_linters#powershell#powershell#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'powershell_powershell_executable') +endfunction + +" Some powershell magic to show syntax errors without executing the script +" thanks to keith hill: +" https://rkeithhill.wordpress.com/2007/10/30/powershell-quicktip-preparsing-scripts-to-check-for-syntax-errors/ +function! ale_linters#powershell#powershell#GetCommand(buffer) abort + let l:script = ['Param($Script); + \ $ErrorView = "Normal"; + \ trap {$_;continue} & { + \ $Contents = Get-Content -Path $Script; + \ $Contents = [string]::Join([Environment]::NewLine, $Contents); + \ [void]$ExecutionContext.InvokeCommand.NewScriptBlock($Contents); + \ };'] + + return ale#powershell#RunPowerShell( + \ a:buffer, 'powershell_powershell', l:script) +endfunction + +" Parse powershell error output using regex into a list of dicts +function! ale_linters#powershell#powershell#Handle(buffer, lines) abort + let l:output = [] + " Our 3 patterns we need to scrape the data for the dicts + let l:patterns = [ + \ '\v^At line:(\d+) char:(\d+)', + \ '\v^(At|\+| )@!.*', + \ '\vFullyQualifiedErrorId : (\w+)', + \] + + let l:matchcount = 0 + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + " We want to work with 3 matches per syntax error + let l:matchcount = l:matchcount + 1 + + if l:matchcount == 1 || str2nr(l:match[1]) + " First match consists of 2 capture groups, and + " can capture the line and col + if exists('l:item') + " We may be here because the last syntax + " didn't emit a code, and so only had 2 + " matches + call add(l:output, l:item) + let l:matchcount = 1 + endif + + " If the match is 0, it was a failed match + " probably due to an unexpected token which + " contained a newline. Reset matchcount. to + " continue to the next match + if !empty(l:match[1]) + let l:item = { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'type': 'E', + \} + else + let l:matchcount = 0 + endif + elseif l:matchcount == 2 + " Second match[0] grabs the full line in order + " to handles the text + let l:item['text'] = l:match[0] + else + " Final match handles the code, however + " powershell only emits 1 code for all errors + " so, we get the final code on the last error + " and loop over the previously added items to + " append the code we now know + call add(l:output, l:item) + unlet l:item + + if len(l:match[1]) > 0 + for l:i in l:output + let l:i['code'] = l:match[1] + endfor + endif + + " Reset the matchcount so we can begin gathering + " matches for the next syntax error + let l:matchcount = 0 + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('powershell', { +\ 'name': 'powershell', +\ 'executable': function('ale_linters#powershell#powershell#GetExecutable'), +\ 'command': function('ale_linters#powershell#powershell#GetCommand'), +\ 'output_stream': 'stdout', +\ 'callback': 'ale_linters#powershell#powershell#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/powershell/psscriptanalyzer.vim b/dot_vim/plugged/ale/ale_linters/powershell/psscriptanalyzer.vim new file mode 100644 index 0000000..8a8b4b4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/powershell/psscriptanalyzer.vim @@ -0,0 +1,76 @@ +" Author: Jesse Harris - https://github.com/zigford +" Description: This file adds support for lintng powershell scripts +" using the PSScriptAnalyzer module. + +" let g:ale_powershell_psscriptanalyzer_exclusions = +" \ 'PSAvoidUsingWriteHost,PSAvoidGlobalVars' +call ale#Set('powershell_psscriptanalyzer_exclusions', '') +call ale#Set('powershell_psscriptanalyzer_executable', 'pwsh') +call ale#Set('powershell_psscriptanalyzer_module', +\ 'psscriptanalyzer') + +function! ale_linters#powershell#psscriptanalyzer#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'powershell_psscriptanalyzer_executable') +endfunction + +" Run Invoke-ScriptAnalyzer and output each linting message as 4 separate lines +" for each parsing +function! ale_linters#powershell#psscriptanalyzer#GetCommand(buffer) abort + let l:exclude_option = ale#Var( + \ a:buffer, 'powershell_psscriptanalyzer_exclusions') + let l:module = ale#Var( + \ a:buffer, 'powershell_psscriptanalyzer_module') + let l:script = ['Param($Script); + \ Invoke-ScriptAnalyzer "$Script" ' + \ . (!empty(l:exclude_option) ? '-Exclude ' . l:exclude_option : '') + \ . '| ForEach-Object { + \ $_.Line; + \ $_.Severity; + \ $_.Message; + \ $_.RuleName}'] + + return ale#powershell#RunPowerShell( + \ a:buffer, + \ 'powershell_psscriptanalyzer', + \ l:script) +endfunction + +" add every 4 lines to an item(Dict) and every item to a list +" return the list +function! ale_linters#powershell#psscriptanalyzer#Handle(buffer, lines) abort + let l:output = [] + let l:lcount = 0 + + for l:line in a:lines + if l:lcount is# 0 + " the very first line + let l:item = {'lnum': str2nr(l:line)} + elseif l:lcount is# 1 + if l:line is# 'Error' + let l:item['type'] = 'E' + elseif l:line is# 'Information' + let l:item['type'] = 'I' + else + let l:item['type'] = 'W' + endif + elseif l:lcount is# 2 + let l:item['text'] = l:line + elseif l:lcount is# 3 + let l:item['code'] = l:line + call add(l:output, l:item) + let l:lcount = -1 + endif + + let l:lcount = l:lcount + 1 + endfor + + return l:output +endfunction + +call ale#linter#Define('powershell', { +\ 'name': 'psscriptanalyzer', +\ 'executable': function('ale_linters#powershell#psscriptanalyzer#GetExecutable'), +\ 'command': function('ale_linters#powershell#psscriptanalyzer#GetCommand'), +\ 'output_stream': 'stdout', +\ 'callback': 'ale_linters#powershell#psscriptanalyzer#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/prolog/swipl.vim b/dot_vim/plugged/ale/ale_linters/prolog/swipl.vim new file mode 100644 index 0000000..82859eb --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/prolog/swipl.vim @@ -0,0 +1,110 @@ +" Author: Takuya Fujiwara +" Description: swipl syntax / semantic check for Prolog files + +call ale#Set('prolog_swipl_executable', 'swipl') +call ale#Set('prolog_swipl_load', 'current_prolog_flag(argv, [File]), load_files(File, [sandboxed(true)]), halt.') +call ale#Set('prolog_swipl_timeout', 3) +call ale#Set('prolog_swipl_alarm', 'alarm(%t, (%h), _, [])') +call ale#Set('prolog_swipl_alarm_handler', 'writeln(user_error, "ERROR: Exceeded %t seconds, Please change g:prolog_swipl_timeout to modify the limit."), halt(1)') + +function! ale_linters#prolog#swipl#GetCommand(buffer) abort + let l:goals = ale#Var(a:buffer, 'prolog_swipl_load') + let l:goals = l:goals =~# '^\s*$' ? 'halt' : l:goals + let l:timeout = ale#Var(a:buffer, 'prolog_swipl_timeout') + 0 + + if l:timeout > 0 + let l:goals = s:GetAlarm(a:buffer, l:timeout) . ', ' . l:goals + endif + + return '%e -g ' . ale#Escape(l:goals) . ' -- %s' +endfunction + +function! s:GetAlarm(buffer, timeout) abort + let l:handler = ale#Var(a:buffer, 'prolog_swipl_alarm_handler') + let l:handler = s:Subst(l:handler, {'t': a:timeout}) + let l:alarm = ale#Var(a:buffer, 'prolog_swipl_alarm') + let l:alarm = s:Subst(l:alarm, {'t': a:timeout, 'h': l:handler}) + + return l:alarm +endfunction + +function! s:Subst(format, vars) abort + let l:vars = extend(copy(a:vars), {'%': '%'}) + + return substitute(a:format, '%\(.\)', '\=get(l:vars, submatch(1), "")', 'g') +endfunction + +function! ale_linters#prolog#swipl#Handle(buffer, lines) abort + let l:output = [] + let l:i = 0 + + let l:pattern = '\v^(ERROR|Warning)+%(:\s*[^:]+:(\d+)%(:(\d+))?)?:\s*(.*)$' + + while l:i < len(a:lines) + let l:match = matchlist(a:lines[l:i], l:pattern) + + if empty(l:match) + let l:i += 1 + continue + endif + + let [l:i, l:text] = s:GetErrMsg(l:i, a:lines, l:match[4]) + let l:item = { + \ 'lnum': (l:match[2] + 0 ? l:match[2] + 0 : 1), + \ 'col': l:match[3] + 0, + \ 'text': l:text, + \ 'type': (l:match[1] is# 'ERROR' ? 'E' : 'W'), + \} + + if !s:Ignore(l:item) + call add(l:output, l:item) + endif + endwhile + + return l:output +endfunction + +" This returns [, ] +function! s:GetErrMsg(i, lines, text) abort + if a:text !~# '^\s*$' + return [a:i + 1, a:text] + endif + + let l:i = a:i + 1 + let l:text = [] + + let l:pattern = '\v^(ERROR|Warning)?:?(.*)$' + + while l:i < len(a:lines) + let l:match = matchlist(a:lines[l:i], l:pattern) + + if empty(l:match) || empty(l:match[2]) + let l:i += 1 + break + endif + + call add(l:text, s:Trim(l:match[2])) + let l:i += 1 + endwhile + + return [l:i, join(l:text, '. ')] +endfunction + +function! s:Trim(str) abort + return substitute(a:str, '\v^\s+|\s+$', '', 'g') +endfunction + +" Skip sandbox error which is caused by directives +" because what we want is syntactic or semantic check. +function! s:Ignore(item) abort + return a:item.type is# 'E' + \ && a:item.text =~# '\vNo permission to (call|directive|assert) sandboxed' +endfunction + +call ale#linter#Define('prolog', { +\ 'name': 'swipl', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'prolog_swipl_executable')}, +\ 'command': function('ale_linters#prolog#swipl#GetCommand'), +\ 'callback': 'ale_linters#prolog#swipl#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/proto/buf_lint.vim b/dot_vim/plugged/ale/ale_linters/proto/buf_lint.vim new file mode 100644 index 0000000..a22f8e5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/proto/buf_lint.vim @@ -0,0 +1,26 @@ +" Author: Alex McKinney +" Description: Run buf lint. + +call ale#Set('proto_buf_lint_executable', 'buf') +call ale#Set('proto_buf_lint_config', '') +call ale#Set('proto_buf_lint_options', '') + +function! ale_linters#proto#buf_lint#GetCommand(buffer) abort + let l:config = ale#Var(a:buffer, 'proto_buf_lint_config') + let l:options = ale#Var(a:buffer, 'proto_buf_lint_options') + + return '%e lint' + \ . (!empty(l:config) ? ' --config=' . ale#Escape(l:config) : '') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %s#include_package_files=true' +endfunction + +call ale#linter#Define('proto', { +\ 'name': 'buf_lint', +\ 'aliases': ['buf-lint'], +\ 'lint_file': 1, +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')}, +\ 'command': function('ale_linters#proto#buf_lint#GetCommand'), +\ 'callback': 'ale#handlers#go#Handler', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/proto/protoc_gen_lint.vim b/dot_vim/plugged/ale/ale_linters/proto/protoc_gen_lint.vim new file mode 100644 index 0000000..c3d1093 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/proto/protoc_gen_lint.vim @@ -0,0 +1,27 @@ +" Author: Jeff Willette +" Description: run the protoc-gen-lint plugin for the protoc binary + +call ale#Set('proto_protoc_gen_lint_options', '') + +function! ale_linters#proto#protoc_gen_lint#GetCommand(buffer) abort + let l:dirname = expand('#' . a:buffer . ':p:h') + + let l:options = ['-I ' . ale#Escape(l:dirname)] + + if !empty(ale#Var(a:buffer, 'proto_protoc_gen_lint_options')) + let l:options += [ale#Var(a:buffer, 'proto_protoc_gen_lint_options')] + endif + + let l:options += ['--lint_out=. ' . '%s'] + + return 'protoc' . ' ' . join(l:options) +endfunction + +call ale#linter#Define('proto', { +\ 'name': 'protoc-gen-lint', +\ 'lint_file': 1, +\ 'output_stream': 'stderr', +\ 'executable': 'protoc', +\ 'command': function('ale_linters#proto#protoc_gen_lint#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/proto/protolint.vim b/dot_vim/plugged/ale/ale_linters/proto/protolint.vim new file mode 100644 index 0000000..2754c7b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/proto/protolint.vim @@ -0,0 +1,24 @@ +" Author: Yohei Yoshimuta +" Description: run the protolint for Protocol Buffer files + +call ale#Set('proto_protolint_executable', 'protolint') +call ale#Set('proto_protolint_config', '') + +function! ale_linters#proto#protolint#GetCommand(buffer) abort + let l:config = ale#Var(a:buffer, 'proto_protolint_config') + + return '%e lint' + \ . (!empty(l:config) ? ' -config_path=' . ale#Escape(l:config) : '') + \ . ' -reporter=unix' + \ . ' %s' +endfunction + +call ale#linter#Define('proto', { +\ 'name': 'protolint', +\ 'lint_file': 1, +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'proto_protolint_executable')}, +\ 'command': function('ale_linters#proto#protolint#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\}) + diff --git a/dot_vim/plugged/ale/ale_linters/pug/puglint.vim b/dot_vim/plugged/ale/ale_linters/pug/puglint.vim new file mode 100644 index 0000000..b552cc0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pug/puglint.vim @@ -0,0 +1,56 @@ +" Author: w0rp - +" Description: pug-lint for checking Pug/Jade files. + +call ale#Set('pug_puglint_options', '') +call ale#Set('pug_puglint_executable', 'pug-lint') +call ale#Set('pug_puglint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! s:FindConfig(buffer) abort + for l:filename in [ + \ '.pug-lintrc', + \ '.pug-lintrc.js', + \ '.pug-lintrc.json', + \ 'package.json', + \] + let l:config = ale#path#FindNearestFile(a:buffer, l:filename) + + if !empty(l:config) + return l:config + endif + endfor + + return '' +endfunction + +function! ale_linters#pug#puglint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'pug_puglint_options') + let l:config = s:FindConfig(a:buffer) + + return '%e' . ale#Pad(l:options) + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') + \ . ' -r inline %t' +endfunction + +function! ale_linters#pug#puglint#Handle(buffer, lines) abort + for l:line in a:lines[:10] + if l:line =~# '^SyntaxError: ' + return [{ + \ 'lnum': 1, + \ 'text': 'puglint configuration error (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + endfor + + return ale#handlers#unix#HandleAsError(a:buffer, a:lines) +endfunction + +call ale#linter#Define('pug', { +\ 'name': 'puglint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'pug_puglint', [ +\ 'node_modules/.bin/pug-lint', +\ ])}, +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#pug#puglint#GetCommand'), +\ 'callback': 'ale_linters#pug#puglint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/puppet/languageserver.vim b/dot_vim/plugged/ale/ale_linters/puppet/languageserver.vim new file mode 100644 index 0000000..2078695 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/puppet/languageserver.vim @@ -0,0 +1,37 @@ +" Author: Alexander Olofsson +" Description: Puppet Language Server integration for ALE + +call ale#Set('puppet_languageserver_executable', 'puppet-languageserver') + +function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort + " Note: The metadata.json file is recommended for Puppet 4+ modules, but + " there's no requirement to have it, so fall back to the other possible + " Puppet module directories + let l:root_path = ale#path#FindNearestFile(a:buffer, 'metadata.json') + + if !empty(l:root_path) + return fnamemodify(l:root_path, ':h') + endif + + for l:test_path in [ + \ 'manifests', + \ 'templates', + \] + let l:root_path = ale#path#FindNearestDirectory(a:buffer, l:test_path) + + if !empty(l:root_path) + return fnamemodify(l:root_path, ':h:h') + endif + endfor + + return '' +endfunction + +call ale#linter#Define('puppet', { +\ 'name': 'languageserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'puppet_languageserver_executable')}, +\ 'command': '%e --stdio', +\ 'language': 'puppet', +\ 'project_root': function('ale_linters#puppet#languageserver#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/puppet/puppet.vim b/dot_vim/plugged/ale/ale_linters/puppet/puppet.vim new file mode 100644 index 0000000..59228dc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/puppet/puppet.vim @@ -0,0 +1,39 @@ +" Author: Alexander Olofsson + +call ale#Set('puppet_puppet_executable', 'puppet') +call ale#Set('puppet_puppet_options', '') + +function! ale_linters#puppet#puppet#Handle(buffer, lines) abort + " Matches patterns like the following: + " Error: Could not parse for environment production: Syntax error at ':' at /root/puppetcode/modules/nginx/manifests/init.pp:43:12 + " Error: Could not parse for environment production: Syntax error at '='; expected '}' at /root/puppetcode/modules/pancakes/manifests/init.pp:5" + " Error: Could not parse for environment production: Syntax error at 'parameter1' (file: /tmp/modules/mariadb/manifests/slave.pp, line: 4, column: 5) + " Error: Illegal attempt to assign to 'a Name'. Not an assignable reference (file: /tmp/modules/waffles/manifests/syrup.pp, line: 5, column: 11) + " Error: Could not parse for environment production: Syntax error at end of input (file: /tmp/modules/bob/manifests/init.pp) + let l:pattern = '^Error:\%(.*:\)\? \(.\+\) \((file:\|at\) .\+\.pp\(\(, line: \|:\)\(\d\+\)\(, column: \|:\)\=\(\d*\)\|)$\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[5] + 0, + \ 'col': l:match[7] + 0, + \ 'text': l:match[1], + \}) + endfor + + return l:output +endfunction + +function! ale_linters#puppet#puppet#GetCommand(buffer) abort + return '%e parser validate --color=false ' + \ . ale#Pad(ale#Var(a:buffer, 'puppet_puppet_options')) + \ . ' %t' +endfunction + +call ale#linter#Define('puppet', { +\ 'name': 'puppet', +\ 'executable': {b -> ale#Var(b, 'puppet_puppet_executable')}, +\ 'output_stream': 'stderr', +\ 'command': function('ale_linters#puppet#puppet#GetCommand'), +\ 'callback': 'ale_linters#puppet#puppet#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/puppet/puppetlint.vim b/dot_vim/plugged/ale/ale_linters/puppet/puppetlint.vim new file mode 100644 index 0000000..985d6a4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/puppet/puppetlint.vim @@ -0,0 +1,18 @@ +" Author: Alexander Olofsson , Robert Flechtner +" Description: puppet-lint for puppet files + +call ale#Set('puppet_puppetlint_executable', 'puppet-lint') +call ale#Set('puppet_puppetlint_options', '--no-autoloader_layout-check') + +function! ale_linters#puppet#puppetlint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'puppet_puppetlint_options')) + \ . ' --log-format "-:%{line}:%{column}: %{kind}: [%{check}] %{message}"' + \ . ' %t' +endfunction + +call ale#linter#Define('puppet', { +\ 'name': 'puppetlint', +\ 'executable': {b -> ale#Var(b, 'puppet_puppetlint_executable')}, +\ 'command': function('ale_linters#puppet#puppetlint#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/purescript/ls.vim b/dot_vim/plugged/ale/ale_linters/purescript/ls.vim new file mode 100644 index 0000000..a20fae4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/purescript/ls.vim @@ -0,0 +1,49 @@ +" Author: Drew Olson +" Description: Integrate ALE with purescript-language-server. + +call ale#Set('purescript_ls_executable', 'purescript-language-server') +call ale#Set('purescript_ls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('purescript_ls_config', {}) + +function! ale_linters#purescript#ls#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'purescript_ls', [ + \ 'node_modules/.bin/purescript-language-server', + \]) +endfunction + +function! ale_linters#purescript#ls#GetCommand(buffer) abort + let l:executable = ale_linters#purescript#ls#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +function! ale_linters#purescript#ls#FindProjectRoot(buffer) abort + let l:config = ale#path#FindNearestFile(a:buffer, 'bower.json') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + let l:config = ale#path#FindNearestFile(a:buffer, 'psc-package.json') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + let l:config = ale#path#FindNearestFile(a:buffer, 'spago.dhall') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('purescript', { +\ 'name': 'purescript-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#purescript#ls#GetExecutable'), +\ 'command': function('ale_linters#purescript#ls#GetCommand'), +\ 'project_root': function('ale_linters#purescript#ls#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'purescript_ls_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/pyrex/cython.vim b/dot_vim/plugged/ale/ale_linters/pyrex/cython.vim new file mode 100644 index 0000000..247c306 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/pyrex/cython.vim @@ -0,0 +1,36 @@ +" Author: w0rp , +" Nicolas Pauss +" Description: cython syntax checking for cython files. + +call ale#Set('pyrex_cython_executable', 'cython') +call ale#Set('pyrex_cython_options', '--warning-extra') + +function! ale_linters#pyrex#cython#GetCommand(buffer) abort + return '%e --working %s:h --include-dir %s:h' + \ . ale#Pad(ale#Var(a:buffer, 'pyrex_cython_options')) + \ . ' --output-file ' . g:ale#util#nul_file . ' %t' +endfunction + +function! ale_linters#pyrex#cython#Handle(buffer, lines) abort + let l:pattern = '\v^(\w+: )?[^:]+:(\d+):?(\d+)?:? ?(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': l:match[1][0] is# 'w' ? 'W' : 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('pyrex', { +\ 'name': 'cython', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'pyrex_cython_executable')}, +\ 'command': function('ale_linters#pyrex#cython#GetCommand'), +\ 'callback': 'ale_linters#pyrex#cython#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/bandit.vim b/dot_vim/plugged/ale/ale_linters/python/bandit.vim new file mode 100644 index 0000000..9cfca7c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/bandit.vim @@ -0,0 +1,76 @@ +" Author: Martino Pilia +" Description: bandit linting for python files + +call ale#Set('python_bandit_executable', 'bandit') +call ale#Set('python_bandit_options', '') +call ale#Set('python_bandit_use_config', 1) +call ale#Set('python_bandit_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_bandit_auto_pipenv', 0) +call ale#Set('python_bandit_auto_poetry', 0) + +function! ale_linters#python#bandit#GetExecutable(buffer) abort + if ( + \ ale#Var(a:buffer, 'python_auto_pipenv') + \ || ale#Var(a:buffer, 'python_bandit_auto_pipenv') + \) && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if ( + \ ale#Var(a:buffer, 'python_auto_poetry') + \ || ale#Var(a:buffer, 'python_bandit_auto_poetry') + \) && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_bandit', ['bandit']) +endfunction + +function! ale_linters#python#bandit#GetCommand(buffer) abort + let l:executable = ale_linters#python#bandit#GetExecutable(a:buffer) + let l:flags = ' --format custom' + \ . ' --msg-template "{line}:{test_id}:{severity}:{msg}" ' + + if ale#Var(a:buffer, 'python_bandit_use_config') + let l:config_path = ale#path#FindNearestFile(a:buffer, '.bandit') + + if !empty(l:config_path) + let l:flags = ' --ini ' . ale#Escape(l:config_path) . l:flags + endif + endif + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run bandit' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . l:flags + \ . ale#Pad(ale#Var(a:buffer, 'python_bandit_options')) + \ . ' -' +endfunction + +function! ale_linters#python#bandit#Handle(buffer, lines) abort + " Custom format defined in GetCommand via --msg-template + let l:pattern = '\v^([0-9]+):(B[0-9]+):([A-Z]+):(.*)$' + let l:severity = {'LOW': 'I', 'MEDIUM': 'W', 'HIGH': 'E'} + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': str2nr(l:match[1]), + \ 'code': l:match[2], + \ 'type': l:severity[l:match[3]], + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'bandit', +\ 'executable': function('ale_linters#python#bandit#GetExecutable'), +\ 'command': function('ale_linters#python#bandit#GetCommand'), +\ 'callback': 'ale_linters#python#bandit#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/cspell.vim b/dot_vim/plugged/ale/ale_linters/python/cspell.vim new file mode 100644 index 0000000..a232531 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Python files. + +call ale#handlers#cspell#DefineLinter('python') diff --git a/dot_vim/plugged/ale/ale_linters/python/flake8.vim b/dot_vim/plugged/ale/ale_linters/python/flake8.vim new file mode 100644 index 0000000..9950614 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/flake8.vim @@ -0,0 +1,170 @@ +" Author: w0rp +" Description: flake8 for python files + +call ale#Set('python_flake8_executable', 'flake8') +call ale#Set('python_flake8_options', '') +call ale#Set('python_flake8_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_flake8_change_directory', 'project') +call ale#Set('python_flake8_auto_pipenv', 0) +call ale#Set('python_flake8_auto_poetry', 0) + +function! s:UsingModule(buffer) abort + return ale#Var(a:buffer, 'python_flake8_options') =~# ' *-m flake8' +endfunction + +function! ale_linters#python#flake8#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_flake8_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_flake8_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + if !s:UsingModule(a:buffer) + return ale#python#FindExecutable(a:buffer, 'python_flake8', ['flake8']) + endif + + return ale#Var(a:buffer, 'python_flake8_executable') +endfunction + +function! ale_linters#python#flake8#RunWithVersionCheck(buffer) abort + let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) + + let l:module_string = s:UsingModule(a:buffer) ? ' -m flake8' : '' + let l:command = ale#Escape(l:executable) . l:module_string . ' --version' + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale_linters#python#flake8#GetCommand'), + \) +endfunction + +function! ale_linters#python#flake8#GetCwd(buffer) abort + let l:change_directory = ale#Var(a:buffer, 'python_flake8_change_directory') + let l:cwd = '' + + if l:change_directory is# 'project' + let l:project_root = ale#python#FindProjectRootIni(a:buffer) + + if !empty(l:project_root) + let l:cwd = l:project_root + endif + endif + + if (l:change_directory is# 'project' && empty(l:cwd)) + \|| l:change_directory is# 1 + \|| l:change_directory is# 'file' + let l:cwd = '%s:h' + endif + + return l:cwd +endfunction + +function! ale_linters#python#flake8#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run flake8' + \ : '' + + " Only include the --stdin-display-name argument if we can parse the + " flake8 version, and it is recent enough to support it. + let l:display_name_args = ale#semver#GTE(a:version, [3, 0, 0]) + \ ? ' --stdin-display-name %s' + \ : '' + + let l:options = ale#Var(a:buffer, 'python_flake8_options') + + return ale#Escape(l:executable) . l:exec_args + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --format=default' + \ . l:display_name_args . ' -' +endfunction + +let s:end_col_pattern_map = { +\ 'F405': '\(.\+\) may be undefined', +\ 'F821': 'undefined name ''\([^'']\+\)''', +\ 'F999': '^''\([^'']\+\)''', +\ 'F841': 'local variable ''\([^'']\+\)''', +\} + +function! ale_linters#python#flake8#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches patterns line the following: + " + " Matches patterns line the following: + " + " stdin:6:6: E111 indentation is not a multiple of four + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: ([[:alnum:]]+):? (.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[3] + + if (l:code is# 'W291' || l:code is# 'W293') + \ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if l:code is# 'W391' + \&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines') + " Skip warnings for trailing blank lines if the option is off + continue + endif + + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'vcol': 1, + \ 'text': l:match[4], + \ 'code': l:code, + \ 'type': 'W', + \} + + if l:code[:0] is# 'F' + if l:code isnot# 'F401' + let l:item.type = 'E' + endif + elseif l:code[:0] is# 'E' + let l:item.type = 'E' + + if l:code isnot# 'E999' && l:code isnot# 'E112' + let l:item.sub_type = 'style' + endif + elseif l:code[:0] is# 'W' + let l:item.sub_type = 'style' + endif + + let l:end_col_pattern = get(s:end_col_pattern_map, l:code, '') + + if !empty(l:end_col_pattern) + let l:end_col_match = matchlist(l:match[4], l:end_col_pattern) + + if !empty(l:end_col_match) + let l:item.end_col = l:item.col + len(l:end_col_match[1]) - 1 + endif + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'flake8', +\ 'executable': function('ale_linters#python#flake8#GetExecutable'), +\ 'cwd': function('ale_linters#python#flake8#GetCwd'), +\ 'command': function('ale_linters#python#flake8#RunWithVersionCheck'), +\ 'callback': 'ale_linters#python#flake8#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/flakehell.vim b/dot_vim/plugged/ale/ale_linters/python/flakehell.vim new file mode 100644 index 0000000..ffe87e2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/flakehell.vim @@ -0,0 +1,175 @@ +" Author: w0rp +" Description: flakehell for python files + +call ale#Set('python_flakehell_executable', 'flakehell') +call ale#Set('python_flakehell_options', '') +call ale#Set('python_flakehell_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_flakehell_change_directory', 'project') +call ale#Set('python_flakehell_auto_pipenv', 0) +call ale#Set('python_flakehell_auto_poetry', 0) + +function! s:UsingModule(buffer) abort + return ale#Var(a:buffer, 'python_flakehell_executable') is? 'python' +endfunction + +function! ale_linters#python#flakehell#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_flakehell_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_flakehell_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + if !s:UsingModule(a:buffer) + return ale#python#FindExecutable(a:buffer, 'python_flakehell', ['flakehell']) + endif + + return ale#Var(a:buffer, 'python_flakehell_executable') +endfunction + +function! ale_linters#python#flakehell#RunWithVersionCheck(buffer) abort + let l:executable = ale_linters#python#flakehell#GetExecutable(a:buffer) + + let l:module_string = s:UsingModule(a:buffer) ? ' -m flakehell' : '' + let l:command = ale#Escape(l:executable) . l:module_string . ' --version' + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale_linters#python#flakehell#GetCommand'), + \) +endfunction + +function! ale_linters#python#flakehell#GetCwd(buffer) abort + let l:change_directory = ale#Var(a:buffer, 'python_flakehell_change_directory') + let l:cwd = '' + + if l:change_directory is# 'project' + let l:project_root = ale#python#FindProjectRootIni(a:buffer) + + if !empty(l:project_root) + let l:cwd = l:project_root + endif + endif + + if (l:change_directory is# 'project' && empty(l:cwd)) + \|| l:change_directory is# 1 + \|| l:change_directory is# 'file' + let l:cwd = '%s:h' + endif + + return l:cwd +endfunction + +function! ale_linters#python#flakehell#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#flakehell#GetExecutable(a:buffer) + + if (l:executable =~? 'pipenv\|poetry$') + let l:exec_args = ' run flakehell' + elseif (l:executable is? 'python') + let l:exec_args = ' -m flakehell' + else + let l:exec_args = '' + endif + + " Only include the --stdin-display-name argument if we can parse the + " flakehell version, and it is recent enough to support it. + let l:display_name_args = ale#semver#GTE(a:version, [0, 8, 0]) + \ ? ' --stdin-display-name %s' + \ : '' + + let l:options = ale#Var(a:buffer, 'python_flakehell_options') + + return ale#Escape(l:executable) + \ . l:exec_args + \ . (!empty(l:options) ? ' lint ' . l:options : ' lint') + \ . ' --format=default' + \ . l:display_name_args . ' -' +endfunction + +let s:end_col_pattern_map = { +\ 'F405': '\(.\+\) may be undefined', +\ 'F821': 'undefined name ''\([^'']\+\)''', +\ 'F999': '^''\([^'']\+\)''', +\ 'F841': 'local variable ''\([^'']\+\)''', +\} + +function! ale_linters#python#flakehell#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches patterns line the following: + " + " Matches patterns line the following: + " + " stdin:6:6: E111 indentation is not a multiple of four + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: ([[:alnum:]]+):? (.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:code = l:match[3] + + if (l:code is# 'W291' || l:code is# 'W293') + \ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if l:code is# 'W391' + \&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines') + " Skip warnings for trailing blank lines if the option is off + continue + endif + + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'vcol': 1, + \ 'text': l:match[4], + \ 'code': l:code, + \ 'type': 'W', + \} + + if l:code[:0] is# 'F' + if l:code isnot# 'F401' + let l:item.type = 'E' + endif + elseif l:code[:0] is# 'E' + let l:item.type = 'E' + + if l:code isnot# 'E999' && l:code isnot# 'E112' + let l:item.sub_type = 'style' + endif + elseif l:code[:0] is# 'W' + let l:item.sub_type = 'style' + endif + + let l:end_col_pattern = get(s:end_col_pattern_map, l:code, '') + + if !empty(l:end_col_pattern) + let l:end_col_match = matchlist(l:match[4], l:end_col_pattern) + + if !empty(l:end_col_match) + let l:item.end_col = l:item.col + len(l:end_col_match[1]) - 1 + endif + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'flakehell', +\ 'executable': function('ale_linters#python#flakehell#GetExecutable'), +\ 'cwd': function('ale_linters#python#flakehell#GetCwd'), +\ 'command': function('ale_linters#python#flakehell#RunWithVersionCheck'), +\ 'callback': 'ale_linters#python#flakehell#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/jedils.vim b/dot_vim/plugged/ale/ale_linters/python/jedils.vim new file mode 100644 index 0000000..eae5fb0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/jedils.vim @@ -0,0 +1,34 @@ +" Author: Dalius Dobravolskas +" Description: https://github.com/pappasam/jedi-language-server + +call ale#Set('python_jedils_executable', 'jedi-language-server') +call ale#Set('python_jedils_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_jedils_auto_pipenv', 0) + +function! ale_linters#python#jedils#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_jedils_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + return ale#python#FindExecutable(a:buffer, 'python_jedils', ['jedi-language-server']) +endfunction + +function! ale_linters#python#jedils#GetCommand(buffer) abort + let l:executable = ale_linters#python#jedils#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv$' + \ ? ' run jedi-language-server' + \ : '' + + return ale#Escape(l:executable) . l:exec_args +endfunction + +call ale#linter#Define('python', { +\ 'name': 'jedils', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#python#jedils#GetExecutable'), +\ 'command': function('ale_linters#python#jedils#GetCommand'), +\ 'project_root': function('ale#python#FindProjectRoot'), +\ 'completion_filter': 'ale#completion#python#CompletionItemFilter', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/mypy.vim b/dot_vim/plugged/ale/ale_linters/python/mypy.vim new file mode 100644 index 0000000..9d469a1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/mypy.vim @@ -0,0 +1,103 @@ +" Author: Keith Smiley , w0rp +" Description: mypy support for optional python typechecking + +call ale#Set('python_mypy_executable', 'mypy') +call ale#Set('python_mypy_ignore_invalid_syntax', 0) +call ale#Set('python_mypy_show_notes', 1) +call ale#Set('python_mypy_options', '') +call ale#Set('python_mypy_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_mypy_auto_pipenv', 0) +call ale#Set('python_mypy_auto_poetry', 0) + +function! ale_linters#python#mypy#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_mypy_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_mypy_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_mypy', ['mypy']) +endfunction + +" The directory to change to before running mypy +function! ale_linters#python#mypy#GetCwd(buffer) abort + " If we find a directory with "mypy.ini" in it use that, + " else try and find the "python project" root, or failing + " that, run from the same folder as the current file + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + if filereadable(l:path . '/mypy.ini') + return l:path + endif + endfor + + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) + \ ? l:project_root + \ : expand('#' . a:buffer . ':p:h') +endfunction + +function! ale_linters#python#mypy#GetCommand(buffer) abort + let l:executable = ale_linters#python#mypy#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run mypy' + \ : '' + + return '%e' . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_mypy_options')) + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' +endfunction + +function! ale_linters#python#mypy#Handle(buffer, lines) abort + let l:dir = ale_linters#python#mypy#GetCwd(a:buffer) + " Look for lines like the following: + " + " file.py:4: error: No library stub file for module 'django.db' + " + " Lines like these should be ignored below: + " + " file.py:4: note: (Stub files are from https://github.com/python/typeshed) + + let l:types = 'error|warning' + + if ale#Var(a:buffer, 'python_mypy_show_notes') + let l:types = 'error|warning|note' + endif + + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: (' + \ . l:types + \ . '): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " Skip invalid syntax errors if the option is on. + if l:match[5] is# 'invalid syntax' + \&& ale#Var(a:buffer, 'python_mypy_ignore_invalid_syntax') + continue + endif + + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : (l:match[4] is# 'note' ? 'I': 'W'), + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'mypy', +\ 'executable': function('ale_linters#python#mypy#GetExecutable'), +\ 'cwd': function('ale_linters#python#mypy#GetCwd'), +\ 'command': function('ale_linters#python#mypy#GetCommand'), +\ 'callback': 'ale_linters#python#mypy#Handle', +\ 'output_stream': 'both' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/prospector.vim b/dot_vim/plugged/ale/ale_linters/python/prospector.vim new file mode 100644 index 0000000..3623bda --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/prospector.vim @@ -0,0 +1,106 @@ +" Author: chocoelho +" Description: prospector linter python files + +call ale#Set('python_prospector_auto_pipenv', 0) +call ale#Set('python_prospector_auto_poetry', 0) + +let g:ale_python_prospector_executable = +\ get(g:, 'ale_python_prospector_executable', 'prospector') + +let g:ale_python_prospector_options = +\ get(g:, 'ale_python_prospector_options', '') + +let g:ale_python_prospector_use_global = get(g:, 'ale_python_prospector_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#python#prospector#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_prospector_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_prospector_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_prospector', ['prospector']) +endfunction + +function! ale_linters#python#prospector#GetCommand(buffer) abort + let l:executable = ale_linters#python#prospector#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run prospector' + \ : '' + + return ale#Escape(l:executable) + \ . l:exec_args + \ . ' ' . ale#Var(a:buffer, 'python_prospector_options') + \ . ' --messages-only --absolute-paths --zero-exit --output-format json' + \ . ' %s' +endfunction + +function! ale_linters#python#prospector#Handle(buffer, lines) abort + let l:output = [] + + if empty(a:lines) + return [] + endif + + let l:prospector_error = json_decode(join(a:lines, '')) + + for l:error in l:prospector_error.messages + if (l:error.code is# 'W291' || l:error.code is# 'W293' || l:error.code is# 'trailing-whitespace') + \ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if l:error.code is# 'W391' + \&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines') + " Skip warnings for trailing blank lines if the option is off + continue + endif + + if l:error.source =~# '\v\[%(dodgy|mccabe|pep8|pep257|pyroma)\]$' + let l:sub_type = 'style' + else + let l:sub_type = '' + endif + + if l:error.source =~# '\v\[pylint\]$' + let l:type = l:error.code =~? '\m^[CRW]' ? 'W' : 'E' + elseif l:error.source =~# '\v\[%(frosted|pep8)\]$' + let l:type = l:error.code =~? '\m^W' ? 'W' : 'E' + elseif l:error.source =~# '\v\[%(dodgy|pyroma|vulture)\]$' + let l:type = 'W' + else + let l:type = 'E' + endif + + let l:item = { + \ 'lnum': l:error.location.line, + \ 'col': l:error.location.character + 1, + \ 'text': l:error.message, + \ 'code': printf('(%s) %s', l:error.source, l:error.code), + \ 'type': l:type, + \ 'sub_type': l:sub_type, + \} + + if l:sub_type is# '' + unlet l:item.sub_type + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'prospector', +\ 'executable': function('ale_linters#python#prospector#GetExecutable'), +\ 'command': function('ale_linters#python#prospector#GetCommand'), +\ 'callback': 'ale_linters#python#prospector#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pycodestyle.vim b/dot_vim/plugged/ale/ale_linters/python/pycodestyle.vim new file mode 100644 index 0000000..3fb94d6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pycodestyle.vim @@ -0,0 +1,81 @@ +" Author: Michael Thiesen +" Description: pycodestyle linting for python files + +call ale#Set('python_pycodestyle_executable', 'pycodestyle') +call ale#Set('python_pycodestyle_options', '') +call ale#Set('python_pycodestyle_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pycodestyle_auto_pipenv', 0) +call ale#Set('python_pycodestyle_auto_poetry', 0) + +function! ale_linters#python#pycodestyle#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pycodestyle_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pycodestyle_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pycodestyle', ['pycodestyle']) +endfunction + +function! ale_linters#python#pycodestyle#GetCommand(buffer) abort + let l:executable = ale_linters#python#pycodestyle#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pycodestyle' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . ' ' + \ . ale#Var(a:buffer, 'python_pycodestyle_options') + \ . ' -' +endfunction + +function! ale_linters#python#pycodestyle#Handle(buffer, lines) abort + let l:pattern = '\v^(\S*):(\d*):(\d*): ([EW]\d+) (.*)$' + let l:output = [] + + " lines are formatted as follows: + " file.py:21:26: W291 trailing whitespace + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if(l:match[4] is# 'W291' || l:match[4] is# 'W293') + \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if l:match[4] is# 'W391' + \&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines') + " Skip warnings for trailing blank lines if the option is off + continue + endif + + let l:item = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4][0], + \ 'sub_type': 'style', + \ 'text': l:match[5], + \ 'code': l:match[4], + \} + + " E999 and E112 are syntax errors. + if l:match[4] is# 'E999' || l:match[4] is# 'E112' + unlet l:item.sub_type + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pycodestyle', +\ 'executable': function('ale_linters#python#pycodestyle#GetExecutable'), +\ 'command': function('ale_linters#python#pycodestyle#GetCommand'), +\ 'callback': 'ale_linters#python#pycodestyle#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pydocstyle.vim b/dot_vim/plugged/ale/ale_linters/python/pydocstyle.vim new file mode 100644 index 0000000..ef0d818 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pydocstyle.vim @@ -0,0 +1,77 @@ +" Author: Pablo Acosta +" Description: pydocstyle for python files + +call ale#Set('python_pydocstyle_executable', 'pydocstyle') +call ale#Set('python_pydocstyle_options', '') +call ale#Set('python_pydocstyle_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pydocstyle_auto_pipenv', 0) +call ale#Set('python_pydocstyle_auto_poetry', 0) + +function! ale_linters#python#pydocstyle#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pydocstyle_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pydocstyle_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pydocstyle', ['pydocstyle']) +endfunction + +function! ale_linters#python#pydocstyle#GetCommand(buffer) abort + let l:executable = ale_linters#python#pydocstyle#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pydocstyle' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_pydocstyle_options')) + \ . ' %s' +endfunction + +function! ale_linters#python#pydocstyle#Handle(buffer, lines) abort + " Matches patterns like the following: + " mydir/myfile.py:33 in public function `myfunction`: + " DXXX: Error description + let l:line1_pattern = '\v^.*:\s*(\d+)\s+.*$' + let l:line2_pattern = '\v^.*([a-zA-Z]\d+):\s*(.*)$' + let l:output = [] + + let l:num_lines = len(a:lines) + let l:index = 0 + + while l:index < l:num_lines + let l:lnum = matchlist(a:lines[l:index], l:line1_pattern) + + if !empty(l:lnum) && (l:index + 1 < l:num_lines) + let l:desc = matchlist(a:lines[l:index + 1], l:line2_pattern) + + if !empty(l:desc) + call add(l:output, { + \ 'lnum': l:lnum[1] + 0, + \ 'col': 1, + \ 'type': 'W', + \ 'text': l:desc[2], + \ 'code': l:desc[1], + \}) + endif + + let l:index = l:index + 2 + else + let l:index = l:index + 1 + endif + endwhile + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pydocstyle', +\ 'executable': function('ale_linters#python#pydocstyle#GetExecutable'), +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#python#pydocstyle#GetCommand'), +\ 'callback': 'ale_linters#python#pydocstyle#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pyflakes.vim b/dot_vim/plugged/ale/ale_linters/python/pyflakes.vim new file mode 100644 index 0000000..2567c53 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pyflakes.vim @@ -0,0 +1,56 @@ +" Author: w0rp +" Description: pyflakes for python files + +call ale#Set('python_pyflakes_executable', 'pyflakes') +call ale#Set('python_pyflakes_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pyflakes_auto_pipenv', 0) +call ale#Set('python_pyflakes_auto_poetry', 0) + +function! ale_linters#python#pyflakes#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyflakes_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pyflakes_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pyflakes', ['pyflakes']) +endfunction + +function! ale_linters#python#pyflakes#GetCommand(buffer) abort + let l:executable = ale_linters#python#pyflakes#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pyflakes' + \ : '' + + return ale#Escape(l:executable) + \ . l:exec_args + \ . ' %t' +endfunction + +function! ale_linters#python#pyflakes#Handle(buffer, lines) abort + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+)?:? (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pyflakes', +\ 'executable': function('ale_linters#python#pyflakes#GetExecutable'), +\ 'command': function('ale_linters#python#pyflakes#GetCommand'), +\ 'callback': 'ale_linters#python#pyflakes#Handle', +\ 'output_stream': 'both', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pylama.vim b/dot_vim/plugged/ale/ale_linters/python/pylama.vim new file mode 100644 index 0000000..14f8071 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pylama.vim @@ -0,0 +1,154 @@ +" Author: Kevin Locke +" Description: pylama for python files + +call ale#Set('python_pylama_executable', 'pylama') +call ale#Set('python_pylama_options', '') +call ale#Set('python_pylama_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pylama_auto_pipenv', 0) +call ale#Set('python_pylama_auto_poetry', 0) +call ale#Set('python_pylama_change_directory', 1) + +function! ale_linters#python#pylama#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pylama_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pylama_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pylama', ['pylama']) +endfunction + +function! ale_linters#python#pylama#RunWithVersionCheck(buffer) abort + let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pylama' + \ : '' + + let l:command = ale#Escape(l:executable) . l:exec_args . ' --version' + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale_linters#python#pylama#GetCommand'), + \) +endfunction + +function! ale_linters#python#pylama#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_pylama_change_directory') + " Pylama loads its configuration from the current directory only, and + " applies file masks using paths relative to the current directory. + " Run from project root, if found, otherwise buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#pylama#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pylama' + \ : '' + + " json format is added in version 8.1.4 + " https://github.com/klen/pylama/blob/develop/Changelog + let l:format_json_args = ale#semver#GTE(a:version, [8, 1, 4]) + \ ? ' --format json' + \ : '' + + " Note: Using %t to lint changes would be preferable, but many pylama + " checks use surrounding paths (e.g. C0103 module name, E0402 relative + " import beyond top, etc.). Neither is ideal. + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_pylama_options')) + \ . l:format_json_args + \ . ' %s' +endfunction + +function! ale_linters#python#pylama#Handle(buffer, version, lines) abort + if empty(a:lines) + return [] + endif + + let l:output = ale#python#HandleTraceback(a:lines, 1) + + " First letter of error code is a pylint-compatible message type + " http://pylint.pycqa.org/en/latest/user_guide/output.html#source-code-analysis-section + " D is for Documentation (pydocstyle) + let l:pylint_type_to_ale_type = { + \ 'I': 'I', + \ 'R': 'W', + \ 'C': 'W', + \ 'W': 'W', + \ 'E': 'E', + \ 'F': 'E', + \ 'D': 'W', + \} + let l:pylint_type_to_ale_sub_type = { + \ 'R': 'style', + \ 'C': 'style', + \ 'D': 'style', + \} + + if ale#semver#GTE(a:version, [8, 1, 4]) + try + let l:errors = json_decode(join(a:lines, '')) + catch + return l:output + endtry + + if empty(l:errors) + return l:output + endif + + for l:error in l:errors + call add(l:output, { + \ 'lnum': l:error['lnum'], + \ 'col': l:error['col'], + \ 'code': l:error['number'], + \ 'type': get(l:pylint_type_to_ale_type, l:error['etype'], 'W'), + \ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:error['etype'], ''), + \ 'text': printf('%s [%s]', l:error['message'], l:error['source']), + \}) + endfor + else + let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'code': l:match[3], + \ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'), + \ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''), + \ 'text': l:match[4], + \}) + endfor + endif + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pylama', +\ 'executable': function('ale_linters#python#pylama#GetExecutable'), +\ 'cwd': function('ale_linters#python#pylama#GetCwd'), +\ 'command': function('ale_linters#python#pylama#RunWithVersionCheck'), +\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#python#pylama#GetExecutable(buffer), +\ '%e --version', +\ {buffer, version -> ale_linters#python#pylama#Handle( +\ buffer, +\ l:version, +\ lines)}, +\ )}, +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pylint.vim b/dot_vim/plugged/ale/ale_linters/python/pylint.vim new file mode 100644 index 0000000..2ce5376 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pylint.vim @@ -0,0 +1,120 @@ +" Author: keith +" Description: pylint for python files + +call ale#Set('python_pylint_executable', 'pylint') +call ale#Set('python_pylint_options', '') +call ale#Set('python_pylint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pylint_change_directory', 1) +call ale#Set('python_pylint_auto_pipenv', 0) +call ale#Set('python_pylint_auto_poetry', 0) +call ale#Set('python_pylint_use_msg_id', 0) + +function! ale_linters#python#pylint#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pylint_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pylint_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pylint', ['pylint']) +endfunction + +function! ale_linters#python#pylint#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_pylint_change_directory') + " pylint only checks for pylintrc in the packages above its current + " directory before falling back to user and global pylintrc. + " Run from project root, if found, otherwise buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#pylint#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#pylint#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pylint' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_pylint_options')) + \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n' + \ . (ale#semver#GTE(a:version, [2, 4, 0]) ? ' --from-stdin' : '') + \ . ' %s' +endfunction + +function! ale_linters#python#pylint#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches patterns like the following: + " + " test.py:4:4: W0101 (unreachable) Unreachable code + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+): ([[:alnum:]]+) \(([^(]*)\) (.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + "let l:failed = append(0, l:match) + let l:code = l:match[3] + + if (l:code is# 'C0303') + \ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + if l:code is# 'I0011' + " Skip 'Locally disabling' message + continue + endif + + if ale#Var(a:buffer, 'python_pylint_use_msg_id') is# 1 + let l:code_out = l:code + else + let l:code_out = l:match[4] + endif + + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 1, + \ 'text': l:match[5], + \ 'code': l:code_out, + \ 'type': 'W', + \} + + if l:code[:0] is# 'E' + let l:item.type = 'E' + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pylint', +\ 'executable': function('ale_linters#python#pylint#GetExecutable'), +\ 'lint_file': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#Var(buffer, 'python_pylint_executable'), +\ '%e --version', +\ {buffer, version -> !ale#semver#GTE(version, [2, 4, 0])}, +\ )}, +\ 'cwd': function('ale_linters#python#pylint#GetCwd'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#Var(buffer, 'python_pylint_executable'), +\ '%e --version', +\ function('ale_linters#python#pylint#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#python#pylint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pylsp.vim b/dot_vim/plugged/ale/ale_linters/python/pylsp.vim new file mode 100644 index 0000000..a699e4f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pylsp.vim @@ -0,0 +1,57 @@ +" Author: aurieh +" Description: A language server for Python + +call ale#Set('python_pylsp_executable', 'pylsp') +call ale#Set('python_pylsp_options', '') +call ale#Set('python_pylsp_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pylsp_auto_pipenv', 0) +call ale#Set('python_pylsp_auto_poetry', 0) +call ale#Set('python_pylsp_config', {}) + +function! ale_linters#python#pylsp#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pylsp_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pylsp_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pylsp', ['pylsp']) +endfunction + +" Force the cwd of the server to be the same as the project root to +" fix issues with treating local files matching first or third party library +" names being imported incorrectly. +function! ale_linters#python#pylsp#GetCwd(buffer) abort + let l:fake_linter = { + \ 'name': 'pylsp', + \ 'project_root': function('ale#python#FindProjectRoot'), + \} + let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter) + + return !empty(l:root) ? l:root : v:null +endfunction + +function! ale_linters#python#pylsp#GetCommand(buffer) abort + let l:executable = ale_linters#python#pylsp#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run pylsp' + \ : '' + + return ale#Escape(l:executable) . l:exec_args . ale#Pad(ale#Var(a:buffer, 'python_pylsp_options')) +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pylsp', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#python#pylsp#GetExecutable'), +\ 'cwd': function('ale_linters#python#pylsp#GetCwd'), +\ 'command': function('ale_linters#python#pylsp#GetCommand'), +\ 'project_root': function('ale#python#FindProjectRoot'), +\ 'completion_filter': 'ale#completion#python#CompletionItemFilter', +\ 'lsp_config': {b -> ale#Var(b, 'python_pylsp_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pyre.vim b/dot_vim/plugged/ale/ale_linters/python/pyre.vim new file mode 100644 index 0000000..5e5786f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pyre.vim @@ -0,0 +1,44 @@ +" Author: dsifford +" Description: A performant type-checker supporting LSP for Python 3 created by Facebook + +call ale#Set('python_pyre_executable', 'pyre') +call ale#Set('python_pyre_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pyre_auto_pipenv', 0) +call ale#Set('python_pyre_auto_poetry', 0) + +function! ale_linters#python#pyre#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyre_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pyre_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pyre', ['pyre']) +endfunction + +function! ale_linters#python#pyre#GetCommand(buffer) abort + let l:executable = ale_linters#python#pyre#GetExecutable(a:buffer) + let l:exec_args = (l:executable =~? 'pipenv\|poetry$' ? ' run pyre' : '') . ' persistent' + + return ale#Escape(l:executable) . l:exec_args +endfunction + +function! ale_linters#python#pyre#GetCwd(buffer) abort + let l:local_config = ale#path#FindNearestFile(a:buffer, '.pyre_configuration.local') + + return fnamemodify(l:local_config, ':h') +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pyre', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#python#pyre#GetExecutable'), +\ 'command': function('ale_linters#python#pyre#GetCommand'), +\ 'project_root': function('ale#python#FindProjectRoot'), +\ 'completion_filter': 'ale#completion#python#CompletionItemFilter', +\ 'cwd': function('ale_linters#python#pyre#GetCwd'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/pyright.vim b/dot_vim/plugged/ale/ale_linters/python/pyright.vim new file mode 100644 index 0000000..5ce4660 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/pyright.vim @@ -0,0 +1,57 @@ +call ale#Set('python_pyright_executable', 'pyright-langserver') +call ale#Set('python_pyright_config', {}) + +function! ale_linters#python#pyright#GetConfig(buffer) abort + let l:config = deepcopy(ale#Var(a:buffer, 'python_pyright_config')) + + if !has_key(l:config, 'python') + let l:config.python = {} + endif + + if type(l:config.python) is v:t_dict + " Automatically detect the virtualenv path and use it. + if !has_key(l:config.python, 'venvPath') + let l:venv = ale#python#FindVirtualenv(a:buffer) + + if !empty(l:venv) + let l:config.python.venvPath = l:venv + endif + endif + + " Automatically use the version of Python in virtualenv. + if type(get(l:config.python, 'venvPath')) is v:t_string + \&& !empty(l:config.python.venvPath) + \&& !has_key(l:config.python, 'pythonPath') + let l:config.python.pythonPath = ale#path#Simplify( + \ l:config.python.venvPath + \ . (has('win32') ? '/Scripts/python' : '/bin/python') + \) + endif + endif + + return l:config +endfunction + +" Force the cwd of the server to be the same as the project root to +" fix issues with treating local files matching first or third party library +" names being imported incorrectly. +function! ale_linters#python#pyright#GetCwd(buffer) abort + let l:fake_linter = { + \ 'name': 'pyright', + \ 'project_root': function('ale#python#FindProjectRoot'), + \} + let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, l:fake_linter) + + return !empty(l:root) ? l:root : v:null +endfunction + +call ale#linter#Define('python', { +\ 'name': 'pyright', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'python_pyright_executable')}, +\ 'cwd': function('ale_linters#python#pyright#GetCwd'), +\ 'command': '%e --stdio', +\ 'project_root': function('ale#python#FindProjectRoot'), +\ 'completion_filter': 'ale#completion#python#CompletionItemFilter', +\ 'lsp_config': function('ale_linters#python#pyright#GetConfig'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/refurb.vim b/dot_vim/plugged/ale/ale_linters/python/refurb.vim new file mode 100644 index 0000000..1ae77b7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/refurb.vim @@ -0,0 +1,73 @@ +" Author: Yining +" Description: refurb as linter for python files + +call ale#Set('python_refurb_executable', 'refurb') +call ale#Set('python_refurb_options', '') +call ale#Set('python_refurb_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_refurb_change_directory', 1) +call ale#Set('python_refurb_auto_pipenv', 0) +call ale#Set('python_refurb_auto_poetry', 0) + +function! ale_linters#python#refurb#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_refurb_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_refurb_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_refurb', ['refurb']) +endfunction + +function! ale_linters#python#refurb#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_refurb_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#refurb#GetCommand(buffer) abort + let l:executable = ale_linters#python#refurb#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run refurb' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_refurb_options')) + \ . ' %s' +endfunction + +function! ale_linters#python#refurb#Handle(buffer, lines) abort + "Example: path/to/file.py:3:17 [FURB109]: Replace `in [x, y, z]` with `in (x, y, z)` + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+)?:?\s*\[FURB(\d+)\]:\s*(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'code': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'refurb', +\ 'executable': function('ale_linters#python#refurb#GetExecutable'), +\ 'cwd': function('ale_linters#python#refurb#GetCwd'), +\ 'command': function('ale_linters#python#refurb#GetCommand'), +\ 'callback': 'ale_linters#python#refurb#Handle', +\ 'output_stream': 'both', +\ 'read_buffer': 0, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/ruff.vim b/dot_vim/plugged/ale/ale_linters/python/ruff.vim new file mode 100644 index 0000000..67595fe --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/ruff.vim @@ -0,0 +1,84 @@ +" Author: Yining +" Description: ruff as linter for python files + +call ale#Set('python_ruff_executable', 'ruff') +call ale#Set('python_ruff_options', '') +call ale#Set('python_ruff_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_ruff_change_directory', 1) +call ale#Set('python_ruff_auto_pipenv', 0) +call ale#Set('python_ruff_auto_poetry', 0) + +call ale#fix#registry#Add('ruff', +\ 'ale#fixers#ruff#Fix', +\ ['python'], +\ 'A python linter/fixer for Python written in Rust' +\) + +function! ale_linters#python#ruff#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_ruff_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_ruff_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff']) +endfunction + +function! ale_linters#python#ruff#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_ruff_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '' +endfunction + +function! ale_linters#python#ruff#GetCommand(buffer, version) abort + let l:executable = ale_linters#python#ruff#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run ruff' + \ : '' + + " NOTE: ruff version `0.0.69` supports liniting input from stdin + return ale#Escape(l:executable) . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_ruff_options')) + \ . ' --format text' + \ . (ale#semver#GTE(a:version, [0, 0, 69]) ? ' -' : ' %s') +endfunction + +function! ale_linters#python#ruff#Handle(buffer, lines) abort + "Example: path/to/file.py:10:5: E999 SyntaxError: unexpected indent + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+)?:? (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('python', { +\ 'name': 'ruff', +\ 'executable': function('ale_linters#python#ruff#GetExecutable'), +\ 'cwd': function('ale_linters#python#ruff#GetCwd'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#python#ruff#GetExecutable(buffer), +\ '%e --version', +\ function('ale_linters#python#ruff#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#python#ruff#Handle', +\ 'output_stream': 'both', +\ 'read_buffer': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/unimport.vim b/dot_vim/plugged/ale/ale_linters/python/unimport.vim new file mode 100644 index 0000000..71fd80f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/unimport.vim @@ -0,0 +1,75 @@ +" Author: Author: Jon Parise + +call ale#Set('python_unimport_executable', 'unimport') +call ale#Set('python_unimport_options', '') +call ale#Set('python_unimport_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_unimport_auto_pipenv', 0) +call ale#Set('python_unimport_auto_poetry', 0) + +function! ale_linters#python#unimport#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_unimport_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_unimport_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_unimport', ['unimport']) +endfunction + +function! ale_linters#python#unimport#GetCommand(buffer) abort + let l:executable = ale_linters#python#unimport#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run unimport' + \ : '' + + return '%e' . l:exec_args + \ . ale#Pad(ale#Var(a:buffer, 'python_unimport_options')) + \ . ' --check' + \ . ' %t' +endfunction + + +function! ale_linters#python#unimport#GetCwd(buffer) abort + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) + \ ? l:project_root + \ : expand('#' . a:buffer . ':p:h') +endfunction + + +function! ale_linters#python#unimport#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches lines like: + " + " urllib.parse at path/to/file.py:9 + let l:pattern = '\v(.+) at [^:]+:(\d+)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'type': 'W', + \ 'text': 'unused: ' . l:match[1], + \}) + endfor + + return l:output +endfunction + + +call ale#linter#Define('python', { +\ 'name': 'unimport', +\ 'executable': function('ale_linters#python#unimport#GetExecutable'), +\ 'cwd': function('ale_linters#python#unimport#GetCwd'), +\ 'command': function('ale_linters#python#unimport#GetCommand'), +\ 'callback': 'ale_linters#python#unimport#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/python/vulture.vim b/dot_vim/plugged/ale/ale_linters/python/vulture.vim new file mode 100644 index 0000000..a7ba186 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/python/vulture.vim @@ -0,0 +1,79 @@ +" Author: Yauheni Kirylau +" Description: vulture linting for python files + +call ale#Set('python_vulture_executable', 'vulture') +call ale#Set('python_vulture_options', '') +call ale#Set('python_vulture_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_vulture_change_directory', 1) + +" The directory to change to before running vulture +function! s:GetDir(buffer) abort + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) + \ ? l:project_root + \ : expand('#' . a:buffer . ':p:h') +endfunction + +function! ale_linters#python#vulture#GetExecutable(buffer) abort + return ale#python#FindExecutable(a:buffer, 'python_vulture', ['vulture']) +endfunction + +function! ale_linters#python#vulture#GetCwd(buffer) abort + if !ale#Var(a:buffer, 'python_vulture_change_directory') + return '' + endif + + return s:GetDir(a:buffer) +endfunction + +function! ale_linters#python#vulture#GetCommand(buffer) abort + let l:executable = ale_linters#python#vulture#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run vulture' + \ : '' + let l:lint_dest = ale#Var(a:buffer, 'python_vulture_change_directory') + \ ? ' .' + \ : ' %s' + + return ale#Escape(l:executable) . l:exec_args + \ . ' ' + \ . ale#Var(a:buffer, 'python_vulture_options') + \ . l:lint_dest +endfunction + + +function! ale_linters#python#vulture#Handle(buffer, lines) abort + let l:output = ale#python#HandleTraceback(a:lines, 10) + + if !empty(l:output) + return l:output + endif + + " Matches patterns line the following: + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+): (.*)$' + let l:dir = s:GetDir(a:buffer) + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:abspath = ale#path#GetAbsPath(l:dir, l:match[1]) + let l:item = { + \ 'filename': l:abspath, + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'W', + \} + call add(l:output, l:item) + endfor + + return l:output +endfunction + + +call ale#linter#Define('python', { +\ 'name': 'vulture', +\ 'executable': function('ale_linters#python#vulture#GetExecutable'), +\ 'cwd': function('ale_linters#python#vulture#GetCwd'), +\ 'command': function('ale_linters#python#vulture#GetCommand'), +\ 'callback': 'ale_linters#python#vulture#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/qml/qmlfmt.vim b/dot_vim/plugged/ale/ale_linters/qml/qmlfmt.vim new file mode 100644 index 0000000..11cc941 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/qml/qmlfmt.vim @@ -0,0 +1,25 @@ +" Author: pylipp (www.github.com/pylipp) +" Description: qmlfmt for QML files + +call ale#Set('qml_qmlfmt_executable', 'qmlfmt') + +" Find lines like +" Error:11:1: Expected token `}' +function! ale_linters#qml#qmlfmt#Handle(buffer, lines) abort + let l:pattern = '\v^(Error|Warning):(\d+):(\d+): (.+)$' + + return map(ale#util#GetMatches(a:lines, l:pattern), "{ + \ 'lnum': v:val[2] + 0, + \ 'col': v:val[3] + 0, + \ 'text': v:val[4], + \ 'type': v:val[1] is# 'Warning' ? 'W' : 'E', + \}") +endfunction + +call ale#linter#Define('qml', { +\ 'name': 'qmlfmt', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'qml_qmlfmt_executable')}, +\ 'command': '%e -e', +\ 'callback': 'ale_linters#qml#qmlfmt#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/qml/qmllint.vim b/dot_vim/plugged/ale/ale_linters/qml/qmllint.vim new file mode 100644 index 0000000..c2258a1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/qml/qmllint.vim @@ -0,0 +1,29 @@ +" Author: pylipp (www.github.com/pylipp) +" Description: qmllint for QML files + +" Find lines like +" /home/foo_user42/code-base/qml/Screen.qml:11 : Expected token `}' +function! ale_linters#qml#qmllint#Handle(buffer, lines) abort + let l:pattern = '\v^[/_-a-zA-z0-9\. ]+:(\d+) : (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': 0, + \ 'text': l:match[2], + \ 'type': 'E', + \} + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('qml', { +\ 'name': 'qmllint', +\ 'output_stream': 'stderr', +\ 'executable': 'qmllint', +\ 'command': 'qmllint %t', +\ 'callback': 'ale_linters#qml#qmllint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/r/languageserver.vim b/dot_vim/plugged/ale/ale_linters/r/languageserver.vim new file mode 100644 index 0000000..bab869d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/r/languageserver.vim @@ -0,0 +1,27 @@ +" Author: Eric Zhao <21zhaoe@protonmail.com> +" Author: ourigen +" Description: Implementation of the Language Server Protocol for R. + +call ale#Set('r_languageserver_cmd', 'languageserver::run()') +call ale#Set('r_languageserver_config', {}) + +function! ale_linters#r#languageserver#GetCommand(buffer) abort + let l:cmd_string = ale#Var(a:buffer, 'r_languageserver_cmd') + + return 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' . ale#Escape(l:cmd_string) +endfunction + +function! ale_linters#r#languageserver#GetProjectRoot(buffer) abort + let l:project_root = ale#path#FindNearestFile(a:buffer, '.Rprofile') + + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : fnamemodify(a:buffer, ':h') +endfunction + +call ale#linter#Define('r', { +\ 'name': 'languageserver', +\ 'lsp': 'stdio', +\ 'lsp_config': {b -> ale#Var(b, 'r_languageserver_config')}, +\ 'executable': 'Rscript', +\ 'command': function('ale_linters#r#languageserver#GetCommand'), +\ 'project_root': function('ale_linters#r#languageserver#GetProjectRoot') +\}) diff --git a/dot_vim/plugged/ale/ale_linters/r/lintr.vim b/dot_vim/plugged/ale/ale_linters/r/lintr.vim new file mode 100644 index 0000000..339ad2b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/r/lintr.vim @@ -0,0 +1,35 @@ +" Author: Michel Lang , w0rp , +" Fenner Macrae , +" ourigen +" Description: This file adds support for checking R code with lintr. + +let g:ale_r_lintr_options = get(g:, 'ale_r_lintr_options', 'with_defaults()') +" A reasonable alternative default: +" get(g:, 'ale_r_lintr_options', 'with_defaults(object_usage_linter = NULL)') + + +let g:ale_r_lintr_lint_package = get(g:, 'ale_r_lintr_lint_package', 0) + +function! ale_linters#r#lintr#GetCommand(buffer) abort + if ale#Var(a:buffer, 'r_lintr_lint_package') + let l:lint_cmd = 'lint_package(cache = FALSE, linters = ' + \ . ale#Var(a:buffer, 'r_lintr_options') . ')' + else + let l:lint_cmd = 'lint(cache = FALSE, commandArgs(TRUE), ' + \ . ale#Var(a:buffer, 'r_lintr_options') . ')' + endif + + let l:cmd_string = 'suppressPackageStartupMessages(library(lintr));' + \ . l:lint_cmd + + return 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' . ale#Escape(l:cmd_string) . ' %t' +endfunction + +call ale#linter#Define('r', { +\ 'name': 'lintr', +\ 'executable': 'Rscript', +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#r#lintr#GetCommand'), +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\ 'output_stream': 'both', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/racket/langserver.vim b/dot_vim/plugged/ale/ale_linters/racket/langserver.vim new file mode 100644 index 0000000..ec80ed7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/racket/langserver.vim @@ -0,0 +1,7 @@ +call ale#linter#Define('racket', { +\ 'name': 'racket_langserver', +\ 'lsp': 'stdio', +\ 'executable': 'racket', +\ 'command': '%e -l racket-langserver', +\ 'project_root': function('ale#racket#FindProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/racket/raco.vim b/dot_vim/plugged/ale/ale_linters/racket/raco.vim new file mode 100644 index 0000000..5b26065 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/racket/raco.vim @@ -0,0 +1,34 @@ +" Author: aqui18 +" Description: This file adds support for checking Racket code with raco. +" This is the same form of syntax-checking used by DrRacket as well. The +" downside is that it will only catch the first error, but none of the +" subsequent ones. This is due to how evaluation in Racket works. + +function! ale_linters#racket#raco#Handle(buffer, lines) abort + " Matches patterns + " :: + " eg: + " info.rkt:4:0: infotab-module: not a well-formed definition + let l:pattern = '^\(\s\)\@!\(.\+\):\(\d\+\):\(\d\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'filename': l:match[2], + \ 'lnum': l:match[3] + 0, + \ 'col': l:match[4] + 0, + \ 'type': 'E', + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('racket', { +\ 'name': 'raco', +\ 'executable': 'raco', +\ 'output_stream': 'stderr', +\ 'command': 'raco expand %s', +\ 'callback': 'ale_linters#racket#raco#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/reason/ls.vim b/dot_vim/plugged/ale/ale_linters/reason/ls.vim new file mode 100644 index 0000000..fb1114a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/reason/ls.vim @@ -0,0 +1,23 @@ +" Author: David Buchan-Swanson +" Description: Integrate ALE with reason-language-server. + +call ale#Set('reason_ls_executable', '') + +function! ale_linters#reason#ls#FindProjectRoot(buffer) abort + let l:reason_config = ale#path#FindNearestFile(a:buffer, 'bsconfig.json') + + if !empty(l:reason_config) + return fnamemodify(l:reason_config, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('reason', { +\ 'name': 'reason-language-server', +\ 'lsp': 'stdio', +\ 'executable': {buffer -> ale#Var(buffer, 'reason_ls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#reason#ls#FindProjectRoot'), +\ 'language': 'reason', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/reason/merlin.vim b/dot_vim/plugged/ale/ale_linters/reason/merlin.vim new file mode 100644 index 0000000..7bef7df --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/reason/merlin.vim @@ -0,0 +1,17 @@ +" Author: Andrey Popp -- @andreypopp +" Description: Report errors in ReasonML code with Merlin + +if !exists('g:merlin') + finish +endif + +function! ale_linters#reason#merlin#Handle(buffer, lines) abort + return merlin#ErrorLocList() +endfunction + +call ale#linter#Define('reason', { +\ 'name': 'merlin', +\ 'executable': 'ocamlmerlin', +\ 'command': 'true', +\ 'callback': 'ale_linters#reason#merlin#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/reason/ols.vim b/dot_vim/plugged/ale/ale_linters/reason/ols.vim new file mode 100644 index 0000000..9fbd9b4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/reason/ols.vim @@ -0,0 +1,14 @@ +" Author: Michael Jungo +" Description: A language server for Reason + +call ale#Set('reason_ols_executable', 'ocaml-language-server') +call ale#Set('reason_ols_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('reason', { +\ 'name': 'ols', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#ols#GetExecutable'), +\ 'command': function('ale#handlers#ols#GetCommand'), +\ 'language': function('ale#handlers#ols#GetLanguage'), +\ 'project_root': function('ale#handlers#ols#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rego/cspell.vim b/dot_vim/plugged/ale/ale_linters/rego/cspell.vim new file mode 100644 index 0000000..a54a537 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rego/cspell.vim @@ -0,0 +1,4 @@ +scriptencoding utf-8 +" Description: cspell support for rego files. + +call ale#handlers#cspell#DefineLinter('rego') diff --git a/dot_vim/plugged/ale/ale_linters/rego/opacheck.vim b/dot_vim/plugged/ale/ale_linters/rego/opacheck.vim new file mode 100644 index 0000000..77d8c93 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rego/opacheck.vim @@ -0,0 +1,56 @@ +" Description: opa check for rego files + +call ale#Set('rego_opacheck_executable', 'opa') +call ale#Set('rego_opacheck_options', '') + +function! ale_linters#rego#opacheck#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'rego_opacheck_executable') +endfunction + +function! ale_linters#rego#opacheck#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'rego_opacheck_options') + + return ale#Escape(ale_linters#rego#opacheck#GetExecutable(a:buffer)) + \ . ' check %s --format json ' + \ . (!empty(l:options) ? ' ' . l:options : '') +endfunction + +function! ale_linters#rego#opacheck#Handle(buffer, lines) abort + let l:output = [] + + let l:errors = ale#util#FuzzyJSONDecode(a:lines, {'errors': []}) + let l:dir = expand('#' . a:buffer . ':p:h') + let l:file = expand('#' . a:buffer . ':p') + + for l:error in l:errors['errors'] + if has_key(l:error, 'location') + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:error['location']['file']), + \ 'lnum': l:error['location']['row'], + \ 'col': l:error['location']['col'], + \ 'text': l:error['message'], + \ 'code': l:error['code'], + \ 'type': 'E', + \}) + else + call add(l:output, { + \ 'filename': l:file, + \ 'lnum': 0, + \ 'col': 0, + \ 'text': l:error['message'], + \ 'code': l:error['code'], + \ 'type': 'E', + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('rego', { +\ 'name': 'opacheck', +\ 'output_stream': 'both', +\ 'executable': function('ale_linters#rego#opacheck#GetExecutable'), +\ 'command': function('ale_linters#rego#opacheck#GetCommand'), +\ 'callback': 'ale_linters#rego#opacheck#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/review/redpen.vim b/dot_vim/plugged/ale/ale_linters/review/redpen.vim new file mode 100644 index 0000000..0006cab --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/review/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('review', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f review -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/robot/rflint.vim b/dot_vim/plugged/ale/ale_linters/robot/rflint.vim new file mode 100644 index 0000000..8fe2d79 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/robot/rflint.vim @@ -0,0 +1,46 @@ +" Author: Samuel Branisa +" Description: rflint linting for robot framework files + +call ale#Set('robot_rflint_executable', 'rflint') + +function! ale_linters#robot#rflint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'robot_rflint_executable') +endfunction + +function! ale_linters#robot#rflint#GetCommand(buffer) abort + let l:executable = ale_linters#robot#rflint#GetExecutable(a:buffer) + let l:flags = '--format' + \ . ' "{filename}:{severity}:{linenumber}:{char}:{rulename}:{message}"' + + return l:executable + \ . ' ' + \ . l:flags + \ . ' %s' +endfunction + +function! ale_linters#robot#rflint#Handle(buffer, lines) abort + let l:pattern = '\v^([[:alnum:][:punct:]]+):(W|E):([[:digit:]]+):([[:digit:]]+):([[:alnum:]]+):(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'filename': l:match[1], + \ 'type': l:match[2], + \ 'lnum': str2nr(l:match[3]), + \ 'col': str2nr(l:match[4]), + \ 'text': l:match[5], + \ 'detail': l:match[6], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('robot', { +\ 'name': 'rflint', +\ 'executable': function('ale_linters#robot#rflint#GetExecutable'), +\ 'command': function('ale_linters#robot#rflint#GetCommand'), +\ 'callback': 'ale_linters#robot#rflint#Handle', +\}) + diff --git a/dot_vim/plugged/ale/ale_linters/rst/alex.vim b/dot_vim/plugged/ale/ale_linters/rst/alex.vim new file mode 100644 index 0000000..e7ca6fa --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for rst files + +call ale#handlers#alex#DefineLinter('rst', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/rst/cspell.vim b/dot_vim/plugged/ale/ale_linters/rst/cspell.vim new file mode 100644 index 0000000..14cfb42 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for ReStructuredText files. + +call ale#handlers#cspell#DefineLinter('rst') diff --git a/dot_vim/plugged/ale/ale_linters/rst/proselint.vim b/dot_vim/plugged/ale/ale_linters/rst/proselint.vim new file mode 100644 index 0000000..018347a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for reStructuredText files + +call ale#linter#Define('rst', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rst/redpen.vim b/dot_vim/plugged/ale/ale_linters/rst/redpen.vim new file mode 100644 index 0000000..ac966c5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('rst', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f rest -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rst/rstcheck.vim b/dot_vim/plugged/ale/ale_linters/rst/rstcheck.vim new file mode 100644 index 0000000..e0cf079 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/rstcheck.vim @@ -0,0 +1,31 @@ +" Author: John Nduli https://github.com/jnduli +" Description: Rstcheck for reStructuredText files + +function! ale_linters#rst#rstcheck#Handle(buffer, lines) abort + " matches: 'bad_rst.rst:1: (SEVERE/4) Title overline & underline + " mismatch.' + let l:pattern = '\v^(.+):(\d*): \(([a-zA-Z]*)/\d*\) (.+)$' + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': 0, + \ 'type': l:match[3] is# 'SEVERE' ? 'E' : 'W', + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('rst', { +\ 'name': 'rstcheck', +\ 'executable': 'rstcheck', +\ 'cwd': '%s:h', +\ 'command': 'rstcheck %t', +\ 'callback': 'ale_linters#rst#rstcheck#Handle', +\ 'output_stream': 'both', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rst/textlint.vim b/dot_vim/plugged/ale/ale_linters/rst/textlint.vim new file mode 100644 index 0000000..56dd8db --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/textlint.vim @@ -0,0 +1,9 @@ +" Author: hokorobi +" Description: textlint, a proofreading tool (https://textlint.github.io/) + +call ale#linter#Define('rst', { +\ 'name': 'textlint', +\ 'executable': function('ale#handlers#textlint#GetExecutable'), +\ 'command': function('ale#handlers#textlint#GetCommand'), +\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rst/vale.vim b/dot_vim/plugged/ale/ale_linters/rst/vale.vim new file mode 100644 index 0000000..2e654dc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/vale.vim @@ -0,0 +1,9 @@ +" Author: chew-z https://github.com/chew-z +" Description: vale for RST files + +call ale#linter#Define('rst', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=JSON %t', +\ 'callback': 'ale#handlers#vale#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rst/writegood.vim b/dot_vim/plugged/ale/ale_linters/rst/writegood.vim new file mode 100644 index 0000000..26b1152 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rst/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for reStructuredText files + +call ale#handlers#writegood#DefineLinter('rst') diff --git a/dot_vim/plugged/ale/ale_linters/ruby/brakeman.vim b/dot_vim/plugged/ale/ale_linters/ruby/brakeman.vim new file mode 100644 index 0000000..2dc4874 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/brakeman.vim @@ -0,0 +1,51 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: Brakeman, a static analyzer for Rails security + +call ale#Set('ruby_brakeman_options', '') +call ale#Set('ruby_brakeman_executable', 'brakeman') +call ale#Set('ruby_brakeman_options', '') + +function! ale_linters#ruby#brakeman#Handle(buffer, lines) abort + let l:output = [] + let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) + let l:sep = has('win32') ? '\' : '/' + " Brakeman always outputs paths relative to the Rails app root + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + for l:warning in get(l:json, 'warnings', []) + let l:text = l:warning.warning_type . ' ' . l:warning.message . ' (' . l:warning.confidence . ')' + let l:line = l:warning.line != v:null ? l:warning.line : 1 + + call add(l:output, { + \ 'filename': l:rails_root . l:sep . l:warning.file, + \ 'lnum': l:line, + \ 'type': 'W', + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#ruby#brakeman#GetCommand(buffer) abort + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + if l:rails_root is? '' + return '' + endif + + let l:executable = ale#Var(a:buffer, 'ruby_brakeman_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'brakeman') + \ . ' -f json -q ' + \ . ale#Var(a:buffer, 'ruby_brakeman_options') + \ . ' -p ' . ale#Escape(l:rails_root) +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'brakeman', +\ 'executable': {b -> ale#Var(b, 'ruby_brakeman_executable')}, +\ 'command': function('ale_linters#ruby#brakeman#GetCommand'), +\ 'callback': 'ale_linters#ruby#brakeman#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/cspell.vim b/dot_vim/plugged/ale/ale_linters/ruby/cspell.vim new file mode 100644 index 0000000..780356b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Ruby files. + +call ale#handlers#cspell#DefineLinter('ruby') diff --git a/dot_vim/plugged/ale/ale_linters/ruby/debride.vim b/dot_vim/plugged/ale/ale_linters/ruby/debride.vim new file mode 100644 index 0000000..3b2cc44 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/debride.vim @@ -0,0 +1,42 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: debride, a dead method detector for Ruby files + +call ale#Set('ruby_debride_executable', 'debride') +call ale#Set('ruby_debride_options', '') + +function! ale_linters#ruby#debride#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_debride_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'debride') + \ . ale#Var(a:buffer, 'ruby_debride_options') + \ . ' %s' +endfunction + +function! ale_linters#ruby#debride#HandleOutput(buffer, lines) abort + let l:output = [] + + for l:line in a:lines + if l:line !~# '^ ' + continue + endif + + let l:elements = split(l:line) + let l:method_name = l:elements[0] + let l:lnum = split(l:elements[1], ':')[1] + + call add(l:output, { + \ 'lnum': 0 + l:lnum, + \ 'text': 'Possible unused method: ' . l:method_name, + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'debride', +\ 'executable': {b -> ale#Var(b, 'ruby_debride_executable')}, +\ 'command': function('ale_linters#ruby#debride#GetCommand'), +\ 'callback': 'ale_linters#ruby#debride#HandleOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/rails_best_practices.vim b/dot_vim/plugged/ale/ale_linters/ruby/rails_best_practices.vim new file mode 100644 index 0000000..3664664 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/rails_best_practices.vim @@ -0,0 +1,49 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: rails_best_practices, a code metric tool for rails projects + +call ale#Set('ruby_rails_best_practices_options', '') +call ale#Set('ruby_rails_best_practices_executable', 'rails_best_practices') + +function! ale_linters#ruby#rails_best_practices#Handle(buffer, lines) abort + let l:output = [] + + for l:warning in ale#util#FuzzyJSONDecode(a:lines, []) + if !ale#path#IsBufferPath(a:buffer, l:warning.filename) + continue + endif + + call add(l:output, { + \ 'lnum': l:warning.line_number + 0, + \ 'type': 'W', + \ 'text': l:warning.message, + \}) + endfor + + return l:output +endfunction + +function! ale_linters#ruby#rails_best_practices#GetCommand(buffer) abort + let l:rails_root = ale#ruby#FindRailsRoot(a:buffer) + + if l:rails_root is? '' + return '' + endif + + let l:executable = ale#Var(a:buffer, 'ruby_rails_best_practices_executable') + let l:output_file = has('win32') ? '%t ' : '/dev/stdout ' + let l:cat_file = has('win32') ? '; type %t' : '' + + return ale#ruby#EscapeExecutable(l:executable, 'rails_best_practices') + \ . ' --silent -f json --output-file ' . l:output_file + \ . ale#Var(a:buffer, 'ruby_rails_best_practices_options') + \ . ale#Escape(l:rails_root) + \ . l:cat_file +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'rails_best_practices', +\ 'executable': {b -> ale#Var(b, 'ruby_rails_best_practices_executable')}, +\ 'command': function('ale_linters#ruby#rails_best_practices#GetCommand'), +\ 'callback': 'ale_linters#ruby#rails_best_practices#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/reek.vim b/dot_vim/plugged/ale/ale_linters/ruby/reek.vim new file mode 100644 index 0000000..b6fa9d7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/reek.vim @@ -0,0 +1,69 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: Reek, a code smell detector for Ruby files + +call ale#Set('ruby_reek_show_context', 0) +call ale#Set('ruby_reek_show_wiki_link', 0) +call ale#Set('ruby_reek_options', '') +call ale#Set('ruby_reek_executable', 'reek') + +function! ale_linters#ruby#reek#GetCommand(buffer, version) abort + let l:executable = ale#Var(a:buffer, 'ruby_reek_executable') + + " Tell reek what the filename is if the version of reek is new enough. + let l:display_name_args = ale#semver#GTE(a:version, [5, 0, 0]) + \ ? ' --stdin-filename %s' + \ : '' + + return ale#ruby#EscapeExecutable(l:executable, 'reek') + \ . ' -f json --no-progress --no-color --force-exclusion' + \ . l:display_name_args +endfunction + +function! s:GetDocumentationLink(error) abort + return get(a:error, 'documentation_link', get(a:error, 'wiki_link', '')) +endfunction + +function! s:BuildText(buffer, error) abort + let l:parts = [] + + if ale#Var(a:buffer, 'ruby_reek_show_context') + call add(l:parts, a:error.context) + endif + + call add(l:parts, a:error.message) + + if ale#Var(a:buffer, 'ruby_reek_show_wiki_link') + call add(l:parts, '[' . s:GetDocumentationLink(a:error) . ']') + endif + + return join(l:parts, ' ') +endfunction + +function! ale_linters#ruby#reek#Handle(buffer, lines) abort + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + for l:location in l:error.lines + call add(l:output, { + \ 'lnum': l:location, + \ 'type': 'W', + \ 'text': s:BuildText(a:buffer, l:error), + \ 'code': l:error.smell_type, + \}) + endfor + endfor + + return l:output +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'reek', +\ 'executable': {b -> ale#Var(b, 'ruby_reek_executable')}, +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#Var(buffer, 'ruby_reek_executable'), +\ '%e --version', +\ function('ale_linters#ruby#reek#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#ruby#reek#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/rubocop.vim b/dot_vim/plugged/ale/ale_linters/ruby/rubocop.vim new file mode 100644 index 0000000..483806a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/rubocop.vim @@ -0,0 +1,31 @@ +" Author: ynonp - https://github.com/ynonp, Eddie Lebow https://github.com/elebow +" Description: RuboCop, a code style analyzer for Ruby files + +call ale#Set('ruby_rubocop_executable', 'rubocop') +call ale#Set('ruby_rubocop_options', '') + +function! ale_linters#ruby#rubocop#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'rubocop') + \ . ' --format json --force-exclusion ' + \ . ale#Var(a:buffer, 'ruby_rubocop_options') + \ . ' --stdin %s' +endfunction + +function! ale_linters#ruby#rubocop#GetType(severity) abort + if a:severity is? 'convention' + \|| a:severity is? 'warning' + \|| a:severity is? 'refactor' + return 'W' + endif + + return 'E' +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'rubocop', +\ 'executable': {b -> ale#Var(b, 'ruby_rubocop_executable')}, +\ 'command': function('ale_linters#ruby#rubocop#GetCommand'), +\ 'callback': 'ale#ruby#HandleRubocopOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/ruby.vim b/dot_vim/plugged/ale/ale_linters/ruby/ruby.vim new file mode 100644 index 0000000..621fcbc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/ruby.vim @@ -0,0 +1,12 @@ +" Author: Brandon Roehl - https://github.com/BrandonRoehl +" Description: Ruby MRI for Ruby files + +call ale#Set('ruby_ruby_executable', 'ruby') + +call ale#linter#Define('ruby', { +\ 'name': 'ruby', +\ 'executable': {b -> ale#Var(b, 'ruby_ruby_executable')}, +\ 'command': '%e -w -c %t', +\ 'output_stream': 'stderr', +\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/solargraph.vim b/dot_vim/plugged/ale/ale_linters/ruby/solargraph.vim new file mode 100644 index 0000000..bf54a55 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/solargraph.vim @@ -0,0 +1,22 @@ +" Author: Horacio Sanson - https://github.com/hsanson +" Description: Solargraph Language Server https://solargraph.org/ +" +" Author: Devon Meunier +" Description: updated to use stdio + +call ale#Set('ruby_solargraph_executable', 'solargraph') +call ale#Set('ruby_solargraph_options', {}) + +function! ale_linters#ruby#solargraph#GetCommand(buffer) abort + return '%e' . ale#Pad('stdio') +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'solargraph', +\ 'lsp': 'stdio', +\ 'language': 'ruby', +\ 'executable': {b -> ale#Var(b, 'ruby_solargraph_executable')}, +\ 'command': function('ale_linters#ruby#solargraph#GetCommand'), +\ 'project_root': function('ale#ruby#FindProjectRoot'), +\ 'initialization_options': {b -> ale#Var(b, 'ruby_solargraph_options')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/ruby/sorbet.vim b/dot_vim/plugged/ale/ale_linters/ruby/sorbet.vim new file mode 100644 index 0000000..c67e20c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/sorbet.vim @@ -0,0 +1,26 @@ +call ale#Set('ruby_sorbet_executable', 'srb') +call ale#Set('ruby_sorbet_options', '') +call ale#Set('ruby_sorbet_enable_watchman', 0) + +function! ale_linters#ruby#sorbet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable') + let l:options = ale#Var(a:buffer, 'ruby_sorbet_options') + let l:enable_watchman = ale#Var(a:buffer, 'ruby_sorbet_enable_watchman') + + return ale#ruby#EscapeExecutable(l:executable, 'srb') + \ . ' tc' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --lsp' + \ . (l:enable_watchman ? '' : ' --disable-watchman') +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'sorbet', +\ 'aliases': ['srb'], +\ 'lsp': 'stdio', +\ 'language': 'ruby', +\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')}, +\ 'command': function('ale_linters#ruby#sorbet#GetCommand'), +\ 'project_root': function('ale#ruby#FindProjectRoot') +\}) + diff --git a/dot_vim/plugged/ale/ale_linters/ruby/standardrb.vim b/dot_vim/plugged/ale/ale_linters/ruby/standardrb.vim new file mode 100644 index 0000000..6ccfd2d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/ruby/standardrb.vim @@ -0,0 +1,23 @@ +" Author: Justin Searls https://github.com/searls, ynonp - https://github.com/ynonp, Eddie Lebow https://github.com/elebow +" based on the ale rubocop linter +" Description: StandardRB - Ruby Style Guide, with linter & automatic code fixer + +call ale#Set('ruby_standardrb_executable', 'standardrb') +call ale#Set('ruby_standardrb_options', '') + +function! ale_linters#ruby#standardrb#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_standardrb_executable') + + return ale#ruby#EscapeExecutable(l:executable, 'standardrb') + \ . ' --format json --force-exclusion ' + \ . ale#Var(a:buffer, 'ruby_standardrb_options') + \ . ' --stdin %s' +endfunction + +" standardrb is based on RuboCop so the callback is the same +call ale#linter#Define('ruby', { +\ 'name': 'standardrb', +\ 'executable': {b -> ale#Var(b, 'ruby_standardrb_executable')}, +\ 'command': function('ale_linters#ruby#standardrb#GetCommand'), +\ 'callback': 'ale#ruby#HandleRubocopOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rust/analyzer.vim b/dot_vim/plugged/ale/ale_linters/rust/analyzer.vim new file mode 100644 index 0000000..3ead387 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rust/analyzer.vim @@ -0,0 +1,36 @@ +" Author: Jon Gjengset +" Description: The next generation language server for Rust + +call ale#Set('rust_analyzer_executable', 'rust-analyzer') +call ale#Set('rust_analyzer_config', {}) + +function! ale_linters#rust#analyzer#GetCommand(buffer) abort + return '%e' +endfunction + +function! ale_linters#rust#analyzer#GetProjectRoot(buffer) abort + " Try to find nearest Cargo.toml for cargo projects + let l:cargo_file = ale#path#FindNearestFile(a:buffer, 'Cargo.toml') + + if !empty(l:cargo_file) + return fnamemodify(l:cargo_file, ':h') + endif + + " Try to find nearest rust-project.json for non-cargo projects + let l:rust_project = ale#path#FindNearestFile(a:buffer, 'rust-project.json') + + if !empty(l:rust_project) + return fnamemodify(l:rust_project, ':h') + endif + + return '' +endfunction + +call ale#linter#Define('rust', { +\ 'name': 'analyzer', +\ 'lsp': 'stdio', +\ 'initialization_options': {b -> ale#Var(b, 'rust_analyzer_config')}, +\ 'executable': {b -> ale#Var(b, 'rust_analyzer_executable')}, +\ 'command': function('ale_linters#rust#analyzer#GetCommand'), +\ 'project_root': function('ale_linters#rust#analyzer#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rust/cargo.vim b/dot_vim/plugged/ale/ale_linters/rust/cargo.vim new file mode 100644 index 0000000..37fd10a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rust/cargo.vim @@ -0,0 +1,110 @@ +" Author: Daniel Schemala , +" Ivan Petkov +" Description: rustc invoked by cargo for rust files + +call ale#Set('rust_cargo_use_check', 1) +call ale#Set('rust_cargo_check_all_targets', 0) +call ale#Set('rust_cargo_check_examples', 0) +call ale#Set('rust_cargo_check_tests', 0) +call ale#Set('rust_cargo_avoid_whole_workspace', 1) +call ale#Set('rust_cargo_default_feature_behavior', 'default') +call ale#Set('rust_cargo_include_features', '') +call ale#Set('rust_cargo_use_clippy', 0) +call ale#Set('rust_cargo_clippy_options', '') +call ale#Set('rust_cargo_target_dir', '') + +function! ale_linters#rust#cargo#GetCargoExecutable(bufnr) abort + if ale#path#FindNearestFile(a:bufnr, 'Cargo.toml') isnot# '' + return 'cargo' + else + " if there is no Cargo.toml file, we don't use cargo even if it exists, + " so we return '', because executable('') apparently always fails + return '' + endif +endfunction + +function! ale_linters#rust#cargo#GetCwd(buffer) abort + if ale#Var(a:buffer, 'rust_cargo_avoid_whole_workspace') + let l:nearest_cargo = ale#path#FindNearestFile(a:buffer, 'Cargo.toml') + let l:nearest_cargo_dir = fnamemodify(l:nearest_cargo, ':h') + + if l:nearest_cargo_dir isnot# '.' + return l:nearest_cargo_dir + endif + endif + + return '' +endfunction + +function! ale_linters#rust#cargo#GetCommand(buffer, version) abort + let l:use_check = ale#Var(a:buffer, 'rust_cargo_use_check') + \ && ale#semver#GTE(a:version, [0, 17, 0]) + let l:use_all_targets = ale#Var(a:buffer, 'rust_cargo_check_all_targets') + \ && ale#semver#GTE(a:version, [0, 22, 0]) + let l:use_examples = ale#Var(a:buffer, 'rust_cargo_check_examples') + \ && ale#semver#GTE(a:version, [0, 22, 0]) + let l:use_tests = ale#Var(a:buffer, 'rust_cargo_check_tests') + \ && ale#semver#GTE(a:version, [0, 22, 0]) + let l:target_dir = ale#Var(a:buffer, 'rust_cargo_target_dir') + let l:use_target_dir = !empty(l:target_dir) + \ && ale#semver#GTE(a:version, [0, 17, 0]) + + let l:include_features = ale#Var(a:buffer, 'rust_cargo_include_features') + + if !empty(l:include_features) + let l:include_features = ' --features ' . ale#Escape(l:include_features) + endif + + let l:default_feature_behavior = ale#Var(a:buffer, 'rust_cargo_default_feature_behavior') + + if l:default_feature_behavior is# 'all' + let l:include_features = '' + let l:default_feature = ' --all-features' + elseif l:default_feature_behavior is# 'none' + let l:default_feature = ' --no-default-features' + else + let l:default_feature = '' + endif + + let l:subcommand = l:use_check ? 'check' : 'build' + let l:clippy_options = '' + + if ale#Var(a:buffer, 'rust_cargo_use_clippy') + let l:subcommand = 'clippy' + let l:clippy_options = ale#Var(a:buffer, 'rust_cargo_clippy_options') + + if l:clippy_options =~# '^-- ' + let l:clippy_options = join(split(l:clippy_options, '-- ')) + endif + + if l:clippy_options isnot# '' + let l:clippy_options = ' -- ' . l:clippy_options + endif + endif + + return 'cargo ' + \ . l:subcommand + \ . (l:use_all_targets ? ' --all-targets' : '') + \ . (l:use_examples ? ' --examples' : '') + \ . (l:use_tests ? ' --tests' : '') + \ . (l:use_target_dir ? (' --target-dir ' . ale#Escape(l:target_dir)) : '') + \ . ' --frozen --message-format=json -q' + \ . l:default_feature + \ . l:include_features + \ . l:clippy_options +endfunction + +call ale#linter#Define('rust', { +\ 'name': 'cargo', +\ 'executable': function('ale_linters#rust#cargo#GetCargoExecutable'), +\ 'cwd': function('ale_linters#rust#cargo#GetCwd'), +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale_linters#rust#cargo#GetCargoExecutable(buffer), +\ '%e --version', +\ function('ale_linters#rust#cargo#GetCommand'), +\ )}, +\ 'callback': 'ale#handlers#rust#HandleRustErrors', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rust/cspell.vim b/dot_vim/plugged/ale/ale_linters/rust/cspell.vim new file mode 100644 index 0000000..d2523c7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rust/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Rust files. + +call ale#handlers#cspell#DefineLinter('rust') diff --git a/dot_vim/plugged/ale/ale_linters/rust/rls.vim b/dot_vim/plugged/ale/ale_linters/rust/rls.vim new file mode 100644 index 0000000..111d755 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rust/rls.vim @@ -0,0 +1,27 @@ +" Author: w0rp +" Description: A language server for Rust + +call ale#Set('rust_rls_executable', 'rls') +call ale#Set('rust_rls_toolchain', '') +call ale#Set('rust_rls_config', {}) + +function! ale_linters#rust#rls#GetCommand(buffer) abort + let l:toolchain = ale#Var(a:buffer, 'rust_rls_toolchain') + + return '%e' . (!empty(l:toolchain) ? ' +' . ale#Escape(l:toolchain) : '') +endfunction + +function! ale_linters#rust#rls#GetProjectRoot(buffer) abort + let l:cargo_file = ale#path#FindNearestFile(a:buffer, 'Cargo.toml') + + return !empty(l:cargo_file) ? fnamemodify(l:cargo_file, ':h') : '' +endfunction + +call ale#linter#Define('rust', { +\ 'name': 'rls', +\ 'lsp': 'stdio', +\ 'lsp_config': {b -> ale#Var(b, 'rust_rls_config')}, +\ 'executable': {b -> ale#Var(b, 'rust_rls_executable')}, +\ 'command': function('ale_linters#rust#rls#GetCommand'), +\ 'project_root': function('ale_linters#rust#rls#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/rust/rustc.vim b/dot_vim/plugged/ale/ale_linters/rust/rustc.vim new file mode 100644 index 0000000..bc6431b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/rust/rustc.vim @@ -0,0 +1,33 @@ +" Author: Daniel Schemala +" Description: rustc for rust files + +call ale#Set('rust_rustc_options', '--emit=mir -o /dev/null') + +function! ale_linters#rust#rustc#RustcCommand(buffer) abort + " Try to guess the library search path. If the project is managed by cargo, + " it's usually /target/debug/deps/ or + " /target/release/deps/ + let l:cargo_file = ale#path#FindNearestFile(a:buffer, 'Cargo.toml') + + if l:cargo_file isnot# '' + let l:root = fnamemodify(l:cargo_file, ':h') + let l:dependencies = ' -L ' . ale#Escape(ale#path#GetAbsPath(l:root, 'target/debug/deps')) + \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(l:root, 'target/release/deps')) + else + let l:dependencies = '' + endif + + let l:options = ale#Var(a:buffer, 'rust_rustc_options') + + return 'rustc --error-format=json' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . l:dependencies . ' -' +endfunction + +call ale#linter#Define('rust', { +\ 'name': 'rustc', +\ 'executable': 'rustc', +\ 'command': function('ale_linters#rust#rustc#RustcCommand'), +\ 'callback': 'ale#handlers#rust#HandleRustErrors', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/salt/salt_lint.vim b/dot_vim/plugged/ale/ale_linters/salt/salt_lint.vim new file mode 100644 index 0000000..47f66d8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/salt/salt_lint.vim @@ -0,0 +1,33 @@ +" Author: Benjamin BINIER +" Description: salt-lint, saltstack linter + +call ale#Set('salt_salt_lint_executable', 'salt-lint') +call ale#Set('salt_salt_lint_options', '') + +function! ale_linters#salt#salt_lint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'salt_salt_lint_options')) + \ . ' --json' +endfunction + +function! ale_linters#salt#salt_lint#Handle(buffer, lines) abort + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + call add(l:output, { + \ 'lnum': l:error.linenumber + 0, + \ 'code': l:error.id + 0, + \ 'text': l:error.message, + \ 'type': l:error.severity is# 'HIGH' ? 'E' : 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('salt', { +\ 'name': 'salt_lint', +\ 'aliases': ['salt-lint'], +\ 'executable': {b -> ale#Var(b, 'salt_salt_lint_executable')}, +\ 'command': function('ale_linters#salt#salt_lint#GetCommand'), +\ 'callback': 'ale_linters#salt#salt_lint#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sass/sasslint.vim b/dot_vim/plugged/ale/ale_linters/sass/sasslint.vim new file mode 100644 index 0000000..ff396e6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sass/sasslint.vim @@ -0,0 +1,28 @@ +" Author: sQVe - https://github.com/sQVe + +call ale#Set('sass_sasslint_executable', 'sass-lint') +call ale#Set('sass_sasslint_options', '') +call ale#Set('sass_sasslint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#sass#sasslint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'sass_sasslint', [ + \ 'node_modules/sass-lint/bin/sass-lint.js', + \ 'node_modules/.bin/sass-lint', + \]) +endfunction + +function! ale_linters#sass#sasslint#GetCommand(buffer) abort + let l:executable = ale_linters#sass#sasslint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'sass_sasslint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -v -q -f compact %t' +endfunction + +call ale#linter#Define('sass', { +\ 'name': 'sasslint', +\ 'executable': function('ale_linters#sass#sasslint#GetExecutable'), +\ 'command': function('ale_linters#sass#sasslint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleCSSLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sass/stylelint.vim b/dot_vim/plugged/ale/ale_linters/sass/stylelint.vim new file mode 100644 index 0000000..22abef9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sass/stylelint.vim @@ -0,0 +1,13 @@ +" Author: diartyz + +call ale#Set('sass_stylelint_executable', 'stylelint') +call ale#Set('sass_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('sass', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'sass_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': '%e --stdin-filename %s', +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scala/cspell.vim b/dot_vim/plugged/ale/ale_linters/scala/cspell.vim new file mode 100644 index 0000000..fa09d42 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Scala files. + +call ale#handlers#cspell#DefineLinter('scala') diff --git a/dot_vim/plugged/ale/ale_linters/scala/fsc.vim b/dot_vim/plugged/ale/ale_linters/scala/fsc.vim new file mode 100644 index 0000000..9413523 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/fsc.vim @@ -0,0 +1,14 @@ +" Author: Nils Leuzinger - https://github.com/PawkyPenguin +" Description: Basic scala support using fsc + +function! s:IsSbt(buffer) abort + return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0 +endfunction + +call ale#linter#Define('scala', { +\ 'name': 'fsc', +\ 'executable': {buf -> s:IsSbt(buf) ? '' : 'fsc'}, +\ 'command': '%e -Ystop-after:parser %t', +\ 'callback': 'ale#handlers#scala#HandleScalacLintFormat', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scala/metals.vim b/dot_vim/plugged/ale/ale_linters/scala/metals.vim new file mode 100644 index 0000000..da9e855 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/metals.vim @@ -0,0 +1,50 @@ +" Author: Jeffrey Lau - https://github.com/zoonfafer +" Description: Metals Language Server for Scala https://scalameta.org/metals/ + +call ale#Set('scala_metals_executable', 'metals-vim') +call ale#Set('scala_metals_project_root', '') + +function! ale_linters#scala#metals#GetProjectRoot(buffer) abort + let l:project_root = ale#Var(a:buffer, 'scala_metals_project_root') + + if !empty(l:project_root) + return l:project_root + endif + + let l:potential_roots = [ + \ 'build.sc', + \ 'build.sbt', + \ '.bloop', + \ '.metals', + \] + + for l:root in l:potential_roots + let l:project_root = ale#path#ResolveLocalPath( + \ a:buffer, + \ l:root, + \ '' + \) + + if !empty(l:project_root) + return fnamemodify( + \ l:project_root, + \ ':h', + \) + endif + endfor + + return '' +endfunction + +function! ale_linters#scala#metals#GetCommand(buffer) abort + return '%e' . ale#Pad('stdio') +endfunction + +call ale#linter#Define('scala', { +\ 'name': 'metals', +\ 'lsp': 'stdio', +\ 'language': 'scala', +\ 'executable': {b -> ale#Var(b, 'scala_metals_executable')}, +\ 'command': function('ale_linters#scala#metals#GetCommand'), +\ 'project_root': function('ale_linters#scala#metals#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scala/sbtserver.vim b/dot_vim/plugged/ale/ale_linters/scala/sbtserver.vim new file mode 100644 index 0000000..d4f137c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/sbtserver.vim @@ -0,0 +1,31 @@ +" Author: ophirr33 +" Description: TCP lsp client for sbt Server + +call ale#Set('scala_sbtserver_address', '127.0.0.1:4273') +call ale#Set('scala_sbtserver_project_root', '') + +function! ale_linters#scala#sbtserver#GetProjectRoot(buffer) abort + let l:project_root = ale#Var(a:buffer, 'scala_sbtserver_project_root') + + if l:project_root is? '' + let l:project_root = ale#path#FindNearestFile(a:buffer, 'build.sbt') + + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' + endif + + return l:project_root +endfunction + +function! ale_linters#scala#sbtserver#GetAddress(buffer) abort + let l:address = ale#Var(a:buffer, 'scala_sbtserver_address') + + return l:address +endfunction + +call ale#linter#Define('scala', { +\ 'name': 'sbtserver', +\ 'lsp': 'socket', +\ 'address': function('ale_linters#scala#sbtserver#GetAddress'), +\ 'language': 'scala', +\ 'project_root': function('ale_linters#scala#sbtserver#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scala/scalac.vim b/dot_vim/plugged/ale/ale_linters/scala/scalac.vim new file mode 100644 index 0000000..1dd579b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/scalac.vim @@ -0,0 +1,15 @@ +" Author: Zoltan Kalmar - https://github.com/kalmiz, +" w0rp +" Description: Basic scala support using scalac + +function! s:IsSbt(buffer) abort + return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0 +endfunction + +call ale#linter#Define('scala', { +\ 'name': 'scalac', +\ 'executable': {buf -> s:IsSbt(buf) ? '' : 'scalac'}, +\ 'command': '%e -Ystop-after:parser %t', +\ 'callback': 'ale#handlers#scala#HandleScalacLintFormat', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scala/scalastyle.vim b/dot_vim/plugged/ale/ale_linters/scala/scalastyle.vim new file mode 100644 index 0000000..6e9e4c1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scala/scalastyle.vim @@ -0,0 +1,86 @@ +" Author: Kevin Kays - https://github.com/okkays +" Description: Support for the scalastyle checker. + +call ale#Set('scala_scalastyle_options', '') +" TODO: Remove support for the old option name in ALE 3.0. +call ale#Set('scala_scalastyle_config', +\ get(g:, 'ale_scalastyle_config_loc', '') +\) + +function! ale_linters#scala#scalastyle#Handle(buffer, lines) abort + " Look for help output from scalastyle first, which indicates that no + " configuration file was found. + for l:line in a:lines[:10] + if l:line =~# '-c, --config' + return [{ + \ 'lnum': 1, + \ 'text': '(See :help ale-scala-scalastyle)' + \ . ' No scalastyle configuration file was found.', + \}] + endif + endfor + + " Matches patterns like the following: + " + " warning file=/home/blurble/Doop.scala message=Missing or badly formed ScalaDoc: Extra @param foobles line=190 + let l:patterns = [ + \ '^\(.\+\) .\+ message=\(.\+\) line=\(\d\+\)$', + \ '^\(.\+\) .\+ message=\(.\+\) line=\(\d\+\) column=\(\d\+\)$', + \] + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:patterns) + let l:args = { + \ 'lnum': l:match[3] + 0, + \ 'type': l:match[1] =~? 'error' ? 'E' : 'W', + \ 'text': l:match[2] + \} + + if !empty(l:match[4]) + let l:args['col'] = l:match[4] + 1 + endif + + call add(l:output, l:args) + endfor + + return l:output +endfunction + +function! ale_linters#scala#scalastyle#GetCommand(buffer) abort + " Search for scalastyle config in parent directories. + let l:scalastyle_config = '' + let l:potential_configs = [ + \ 'scalastyle_config.xml', + \ 'scalastyle-config.xml' + \] + + for l:config in l:potential_configs + let l:scalastyle_config = ale#path#ResolveLocalPath( + \ a:buffer, + \ l:config, + \ '' + \) + + if !empty(l:scalastyle_config) + break + endif + endfor + + " If all else fails, try the global config. + if empty(l:scalastyle_config) + let l:scalastyle_config = ale#Var(a:buffer, 'scala_scalastyle_config') + endif + + return 'scalastyle' + \ . (!empty(l:scalastyle_config) ? ' --config ' . ale#Escape(l:scalastyle_config) : '') + \ . ale#Pad(ale#Var(a:buffer, 'scala_scalastyle_options')) + \ . ' %t' +endfunction + +call ale#linter#Define('scala', { +\ 'name': 'scalastyle', +\ 'executable': 'scalastyle', +\ 'output_stream': 'stdout', +\ 'command': function('ale_linters#scala#scalastyle#GetCommand'), +\ 'callback': 'ale_linters#scala#scalastyle#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scss/sasslint.vim b/dot_vim/plugged/ale/ale_linters/scss/sasslint.vim new file mode 100644 index 0000000..9902705 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scss/sasslint.vim @@ -0,0 +1,28 @@ +" Author: sQVe - https://github.com/sQVe + +call ale#Set('scss_sasslint_executable', 'sass-lint') +call ale#Set('scss_sasslint_options', '') +call ale#Set('scss_sasslint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#scss#sasslint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'scss_sasslint', [ + \ 'node_modules/sass-lint/bin/sass-lint.js', + \ 'node_modules/.bin/sass-lint', + \]) +endfunction + +function! ale_linters#scss#sasslint#GetCommand(buffer) abort + let l:executable = ale_linters#scss#sasslint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'scss_sasslint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -v -q -f compact %t' +endfunction + +call ale#linter#Define('scss', { +\ 'name': 'sasslint', +\ 'executable': function('ale_linters#scss#sasslint#GetExecutable'), +\ 'command': function('ale_linters#scss#sasslint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleCSSLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scss/scsslint.vim b/dot_vim/plugged/ale/ale_linters/scss/scsslint.vim new file mode 100644 index 0000000..7ce5724 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scss/scsslint.vim @@ -0,0 +1,34 @@ +" Author: w0rp +" Description: This file add scsslint support for SCSS support + +function! ale_linters#scss#scsslint#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " test.scss:2:1 [W] Indentation: Line should be indented 2 spaces, but was indented 4 spaces + let l:pattern = '^.*:\(\d\+\):\(\d*\) \[\([^\]]\+\)\] \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + \&& l:match[4] =~# '^TrailingWhitespace' + " Skip trailing whitespace warnings if that option is off. + continue + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': l:match[3] is# 'E' ? 'E' : 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('scss', { +\ 'name': 'scsslint', +\ 'executable': 'scss-lint', +\ 'command': 'scss-lint --stdin-file-path=%s', +\ 'callback': 'ale_linters#scss#scsslint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/scss/stylelint.vim b/dot_vim/plugged/ale/ale_linters/scss/stylelint.vim new file mode 100644 index 0000000..fea4ea8 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/scss/stylelint.vim @@ -0,0 +1,19 @@ +" Author: diartyz + +call ale#Set('scss_stylelint_executable', 'stylelint') +call ale#Set('scss_stylelint_options', '') +call ale#Set('scss_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#scss#stylelint#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'scss_stylelint_options')) + \ . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('scss', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'scss_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': function('ale_linters#scss#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sh/bashate.vim b/dot_vim/plugged/ale/ale_linters/sh/bashate.vim new file mode 100644 index 0000000..3cd8424 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sh/bashate.vim @@ -0,0 +1,43 @@ +" Author: hsanson +" Description: Lints sh files using bashate +" URL: https://github.com/openstack/bashate + +call ale#Set('sh_bashate_executable', 'bashate') +call ale#Set('sh_bashate_options', '') + +function! ale_linters#sh#bashate#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'sh_bashate_executable') +endfunction + +function! ale_linters#sh#bashate#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'sh_bashate_options') + let l:executable = ale_linters#sh#bashate#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' ' . l:options . ' ' . '%t' +endfunction + +function! ale_linters#sh#bashate#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " /path/to/script/file:694:1: E003 Indent not multiple of 4 + let l:pattern = ':\(\d\+\):\(\d\+\): \(.*\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[1]), + \ 'col': str2nr(l:match[2]), + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sh', { +\ 'name': 'bashate', +\ 'output_stream': 'stdout', +\ 'executable': function('ale_linters#sh#bashate#GetExecutable'), +\ 'command': function('ale_linters#sh#bashate#GetCommand'), +\ 'callback': 'ale_linters#sh#bashate#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sh/cspell.vim b/dot_vim/plugged/ale/ale_linters/sh/cspell.vim new file mode 100644 index 0000000..e3c5a6f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sh/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for shell scripts. + +call ale#handlers#cspell#DefineLinter('sh') diff --git a/dot_vim/plugged/ale/ale_linters/sh/language_server.vim b/dot_vim/plugged/ale/ale_linters/sh/language_server.vim new file mode 100644 index 0000000..c678158 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sh/language_server.vim @@ -0,0 +1,32 @@ +" Author: Christian Höltje (https://docwhat.org/) +" Description: BASH Language server integration for ALE +scriptencoding utf-8 + +call ale#Set('sh_language_server_executable', 'bash-language-server') +call ale#Set('sh_language_server_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#sh#language_server#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'sh_language_server', [ + \ 'node_modules/.bin/bash-language-server', + \]) +endfunction + +function! ale_linters#sh#language_server#GetCommand(buffer) abort + let l:exe = ale#Escape(ale_linters#sh#language_server#GetExecutable(a:buffer)) + + return l:exe . ' start' +endfunction + +function! ale_linters#sh#language_server#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +call ale#linter#Define('sh', { +\ 'name': 'language_server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#sh#language_server#GetExecutable'), +\ 'command': function('ale_linters#sh#language_server#GetCommand'), +\ 'project_root': function('ale_linters#sh#language_server#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sh/shell.vim b/dot_vim/plugged/ale/ale_linters/sh/shell.vim new file mode 100644 index 0000000..73ab360 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sh/shell.vim @@ -0,0 +1,59 @@ +" Author: w0rp +" Description: Lints shell files by invoking the shell with -n + +" Backwards compatibility +if exists('g:ale_linters_sh_shell_default_shell') + let g:ale_sh_shell_default_shell = g:ale_linters_sh_shell_default_shell +endif + +" This option can be changed to change the default shell when the shell +" cannot be taken from the hashbang line. +if !exists('g:ale_sh_shell_default_shell') + let g:ale_sh_shell_default_shell = fnamemodify($SHELL, ':t') + + if g:ale_sh_shell_default_shell is# '' || g:ale_sh_shell_default_shell is# 'fish' + let g:ale_sh_shell_default_shell = 'bash' + endif +endif + +function! ale_linters#sh#shell#GetExecutable(buffer) abort + let l:shell_type = ale#handlers#sh#GetShellType(a:buffer) + + if !empty(l:shell_type) + return l:shell_type + endif + + return ale#Var(a:buffer, 'sh_shell_default_shell') +endfunction + +function! ale_linters#sh#shell#GetCommand(buffer) abort + return ale_linters#sh#shell#GetExecutable(a:buffer) . ' -n %t' +endfunction + +function! ale_linters#sh#shell#Handle(buffer, lines) abort + " Matches patterns line the following: + " + " bash: line 13: syntax error near unexpected token `d' + " bash:行0: 未预期的符å·â€œdoneâ€é™„近有语法错误 + " bash: 列 90: 尋找匹é…的「"ã€æ™‚é‡åˆ°äº†æœªé æœŸçš„æª”æ¡ˆçµæŸç¬¦ + " sh: 11: Syntax error: "(" unexpected + let l:pattern = '\v([^:]+:\D*)(\d+): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': str2nr(l:match[2]), + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sh', { +\ 'name': 'shell', +\ 'output_stream': 'stderr', +\ 'executable': function('ale_linters#sh#shell#GetExecutable'), +\ 'command': function('ale_linters#sh#shell#GetCommand'), +\ 'callback': 'ale_linters#sh#shell#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sh/shellcheck.vim b/dot_vim/plugged/ale/ale_linters/sh/shellcheck.vim new file mode 100644 index 0000000..d994512 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sh/shellcheck.vim @@ -0,0 +1,4 @@ +" Author: w0rp +" Description: shellcheck linter for shell scripts. + +call ale#handlers#shellcheck#DefineLinter('sh') diff --git a/dot_vim/plugged/ale/ale_linters/slim/slimlint.vim b/dot_vim/plugged/ale/ale_linters/slim/slimlint.vim new file mode 100644 index 0000000..1b365e2 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/slim/slimlint.vim @@ -0,0 +1,55 @@ +" Author: Markus Doits - https://github.com/doits +" Description: slim-lint for Slim files + +function! ale_linters#slim#slimlint#GetCommand(buffer) abort + let l:command = 'slim-lint %t' + + let l:rubocop_config = ale#path#FindNearestFile(a:buffer, '.rubocop.yml') + + " Set SLIM_LINT_RUBOCOP_CONF variable as it is needed for slim-lint to + " pick up the rubocop config. + " + " See https://github.com/sds/slim-lint/blob/master/lib/slim_lint/linter/README.md#rubocop + if !empty(l:rubocop_config) + if has('win32') + let l:command = 'set SLIM_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config) . ' && ' . l:command + else + let l:command = 'SLIM_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config) . ' ' . l:command + endif + endif + + return l:command +endfunction + +function! ale_linters#slim#slimlint#Handle(buffer, lines) abort + " Matches patterns like the following: + " :5 [W] LineLength: Line is too long. [150/120] + let l:pattern = '\v^.*:(\d+) \[([EW])\] (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2], + \ 'text': l:match[3] + \} + + let l:code_match = matchlist(l:item.text, '\v^([^:]+): (.+)$') + + if !empty(l:code_match) + let l:item.code = l:code_match[1] + let l:item.text = l:code_match[2] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('slim', { +\ 'name': 'slimlint', +\ 'executable': 'slim-lint', +\ 'command': function('ale_linters#slim#slimlint#GetCommand'), +\ 'callback': 'ale_linters#slim#slimlint#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sml/smlnj.vim b/dot_vim/plugged/ale/ale_linters/sml/smlnj.vim new file mode 100644 index 0000000..852ea17 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sml/smlnj.vim @@ -0,0 +1,9 @@ +" Author: Paulo Alem , Jake Zimmerman +" Description: Single-file SML checking with SML/NJ compiler + +call ale#linter#Define('sml', { +\ 'name': 'smlnj', +\ 'executable': function('ale#handlers#sml#GetExecutableSmlnjFile'), +\ 'command': 'sml', +\ 'callback': 'ale#handlers#sml#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sml/smlnj_cm.vim b/dot_vim/plugged/ale/ale_linters/sml/smlnj_cm.vim new file mode 100644 index 0000000..9ad24af --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sml/smlnj_cm.vim @@ -0,0 +1,21 @@ +" Author: Jake Zimmerman +" Description: SML checking with SML/NJ Compilation Manager + +function! ale_linters#sml#smlnj_cm#GetCommand(buffer) abort + let l:cmfile = ale#handlers#sml#GetCmFile(a:buffer) + + return 'sml -m ' . l:cmfile . ' < /dev/null' +endfunction + +" Using CM requires that we set "lint_file: 1", since it reads the files +" from the disk itself. +call ale#linter#Define('sml', { +\ 'name': 'smlnj_cm', +\ 'aliases': ['smlnj-cm'], +\ 'executable': function('ale#handlers#sml#GetExecutableSmlnjCm'), +\ 'lint_file': 1, +\ 'command': function('ale_linters#sml#smlnj_cm#GetCommand'), +\ 'callback': 'ale#handlers#sml#Handle', +\}) + +" vim:ts=4:sts=4:sw=4 diff --git a/dot_vim/plugged/ale/ale_linters/solidity/solc.vim b/dot_vim/plugged/ale/ale_linters/solidity/solc.vim new file mode 100644 index 0000000..2897708 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/solidity/solc.vim @@ -0,0 +1,53 @@ +" Author: Karl Bartel - http://karl.berlin/ +" Description: Report solc compiler errors in Solidity code + +call ale#Set('solidity_solc_executable', 'solc') +call ale#Set('solidity_solc_options', '') + +function! ale_linters#solidity#solc#Handle(buffer, lines) abort + " Matches patterns like the following: + " Error: Expected ';' but got '(' + " --> /path/to/file/file.sol:1:10:) + let l:pattern = '\v(Error|Warning): (.*)$' + let l:line_and_column_pattern = '\v\.sol:(\d+):(\d+):' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + let l:match = matchlist(l:line, l:line_and_column_pattern) + + if len(l:match) > 0 + let l:index = len(l:output) - 1 + let l:output[l:index]['lnum'] = l:match[1] + 0 + let l:output[l:index]['col'] = l:match[2] + 0 + endif + else + let l:isError = l:match[1] is? 'Error' + + call add(l:output, { + \ 'lnum': 0, + \ 'col': 0, + \ 'text': l:match[2], + \ 'type': l:isError ? 'E' : 'W', + \}) + endif + endfor + + return l:output +endfunction + +function! ale_linters#solidity#solc#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'solidity_solc_executable') + + return l:executable . ale#Pad(ale#Var(a:buffer, 'solidity_solc_options')) . ' %s' +endfunction + +call ale#linter#Define('solidity', { +\ 'name': 'solc', +\ 'executable': {b -> ale#Var(b, 'solidity_solc_executable')}, +\ 'command': function('ale_linters#solidity#solc#GetCommand'), +\ 'callback': 'ale_linters#solidity#solc#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/solidity/solhint.vim b/dot_vim/plugged/ale/ale_linters/solidity/solhint.vim new file mode 100644 index 0000000..505bd5b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/solidity/solhint.vim @@ -0,0 +1,12 @@ +" Authors: Franco Victorio - https://github.com/fvictorio, Henrique Barcelos +" https://github.com/hbarcelos +" Description: Report errors in Solidity code with solhint + +call ale#linter#Define('solidity', { +\ 'name': 'solhint', +\ 'output_stream': 'both', +\ 'executable': function('ale#handlers#solhint#GetExecutable'), +\ 'cwd': function('ale#handlers#solhint#GetCwd'), +\ 'command': function('ale#handlers#solhint#GetCommand'), +\ 'callback': 'ale#handlers#solhint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/solidity/solium.vim b/dot_vim/plugged/ale/ale_linters/solidity/solium.vim new file mode 100644 index 0000000..61ab184 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/solidity/solium.vim @@ -0,0 +1,9 @@ +" Author: Jeff Sutherland - https://github.com/jdsutherland +" Description: Report errors in Solidity code with solium + +call ale#linter#Define('solidity', { +\ 'name': 'solium', +\ 'executable': 'solium', +\ 'command': 'solium --reporter gcc --file %t', +\ 'callback': 'ale#handlers#gcc#HandleGCCFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/spec/rpmlint.vim b/dot_vim/plugged/ale/ale_linters/spec/rpmlint.vim new file mode 100644 index 0000000..5594e3b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/spec/rpmlint.vim @@ -0,0 +1,90 @@ +" Author: Jason Tibbitts +" Description: Adds support for checking RPM spec files with rpmlint + +" rpmlint will produce varions types of output: +" +" Lines like the following are output when the file is simply not able to be +" parsed by rpmspec -P: +" apcupsd.spec: E: specfile-error warning: bogus date in %changelog: Mon Oct 1 2005 - Foo +" apcupsd.spec: E: specfile-error error: %changelog not in descending chronological order +" They do not contain a line number, and there's not a whole lot that can be +" done to locate them besides grep for them. rpmlint is just passing the +" output from rpm along with the filename, an error indicator, and an error +" type. +" +" Lines like the following: +" cyrus-imapd.spec:23: W: macro-in-comment %version +" cyrus-imapd.spec:18: E: hardcoded-library-path in %_prefix/lib/%name +" indicate warnings and errors, respectively. No column numbers are provided +" +" Lines like: +" apcupsd.spec: I: checking +" apcupsd.spec: I: checking-url https://downloads.sourceforge.net/apcupsd/apcupsd-3.14.14.tar.gz (timeout 10 seconds) +" are merely informational and are only output when -v is passed. But they +" may be useful in a log to know why things are taking so long. +" +" And this is always output at the end and should just be ignored: +" 0 packages and 1 specfiles checked; 4 errors, 0 warnings. + +call ale#Set('spec_rpmlint_executable', 'rpmlint') +call ale#Set('spec_rpmlint_options', '') + +function! ale_linters#spec#rpmlint#GetCommand(buffer, version) abort + if ale#semver#GTE(a:version, [2, 0, 0]) + " The -o/--option flag was removed in version 2.0.0 + let l:version_dependent_args = '' + else + let l:version_dependent_args = ' -o "NetworkEnabled False"' + endif + + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'spec_rpmlint_options')) + \ . ' -v' + \ . l:version_dependent_args + \ . ' %t' +endfunction + +function! ale_linters#spec#rpmlint#Handle(buffer, lines) abort + " let l:pat_inform = '^.\+: I: \(.+\)' + let l:pat_errwarn = '^.\+:\(\d\+\): \([EW]\): \(.\+\)' + let l:pat_baderr = '^.\+: E: \(.\+\)' + let l:output = [] + + for l:line in a:lines + let l:match_errwarn = matchlist(l:line, l:pat_errwarn) + let l:match_baderr = matchlist(l:line, l:pat_baderr) + + if len(l:match_errwarn) > 0 + let l:text = l:match_errwarn[3] + let l:type = l:match_errwarn[2] + let l:lnum = l:match_errwarn[1] + 0 + elseif len(l:match_baderr) > 0 + let l:text = l:match_baderr[1] + let l:type = 'E' + let l:lnum = 1 + else + continue + endif + + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:lnum, + \ 'text': l:text, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('spec', { +\ 'name': 'rpmlint', +\ 'executable': {b -> ale#Var(b, 'spec_rpmlint_executable')}, +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#Var(buffer, 'spec_rpmlint_executable'), +\ '%e --version', +\ function('ale_linters#spec#rpmlint#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#spec#rpmlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sql/sqlfluff.vim b/dot_vim/plugged/ale/ale_linters/sql/sqlfluff.vim new file mode 100644 index 0000000..0ec062b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sql/sqlfluff.vim @@ -0,0 +1,72 @@ +" Author: Carl Smedstad +" Description: sqlfluff for SQL files + +let g:ale_sql_sqlfluff_executable = +\ get(g:, 'ale_sql_sqlfluff_executable', 'sqlfluff') + +let g:ale_sql_sqlfluff_options = +\ get(g:, 'ale_sql_sqlfluff_options', '') + +function! ale_linters#sql#sqlfluff#Executable(buffer) abort + return ale#Var(a:buffer, 'sql_sqlfluff_executable') +endfunction + +function! ale_linters#sql#sqlfluff#Command(buffer) abort + let l:executable = ale_linters#sql#sqlfluff#Executable(a:buffer) + let l:options = ale#Var(a:buffer, 'sql_sqlfluff_options') + + let l:cmd = + \ ale#Escape(l:executable) + \ . ' lint' + + let l:config_file = ale#path#FindNearestFile(a:buffer, '.sqlfluff') + + if !empty(l:config_file) + let l:cmd .= ' --config ' . ale#Escape(l:config_file) + else + let l:cmd .= ' --dialect ansi' + endif + + let l:cmd .= + \ ' --format json ' + \ . l:options + \ . ' %t' + + return l:cmd +endfunction + +function! ale_linters#sql#sqlfluff#Handle(buffer, lines) abort + let l:output = [] + let l:json_lines = ale#util#FuzzyJSONDecode(a:lines, []) + + if empty(l:json_lines) + return l:output + endif + + let l:json = l:json_lines[0] + + " if there's no warning, 'result' is `null`. + if empty(get(l:json, 'violations')) + return l:output + endif + + for l:violation in get(l:json, 'violations', []) + call add(l:output, { + \ 'filename': l:json.filepath, + \ 'lnum': l:violation.line_no, + \ 'col': l:violation.line_pos, + \ 'text': l:violation.description, + \ 'code': l:violation.code, + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sql', { +\ 'name': 'sqlfluff', +\ 'executable': function('ale_linters#sql#sqlfluff#Executable'), +\ 'command': function('ale_linters#sql#sqlfluff#Command'), +\ 'callback': 'ale_linters#sql#sqlfluff#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sql/sqlint.vim b/dot_vim/plugged/ale/ale_linters/sql/sqlint.vim new file mode 100644 index 0000000..ca89372 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sql/sqlint.vim @@ -0,0 +1,28 @@ +" Author: Adriaan Zonnenberg +" Description: sqlint for SQL files + +function! ale_linters#sql#sqlint#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " stdin:3:1:ERROR syntax error at or near "WIBBLE" + let l:pattern = '\v^[^:]+:(\d+):(\d+):(\u+) (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3][0], + \ 'text': l:match[4], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sql', { +\ 'name': 'sqlint', +\ 'executable': 'sqlint', +\ 'command': 'sqlint', +\ 'callback': 'ale_linters#sql#sqlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sql/sqllint.vim b/dot_vim/plugged/ale/ale_linters/sql/sqllint.vim new file mode 100644 index 0000000..78396fe --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sql/sqllint.vim @@ -0,0 +1,33 @@ +" ale_linters/sql/sqllint.vim +" Author: Joe Reynolds +" Description: sql-lint for SQL files. +" sql-lint can be found at +" https://www.npmjs.com/package/sql-lint +" https://github.com/joereynolds/sql-lint + +function! ale_linters#sql#sqllint#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " stdin:1 [ER_NO_DB_ERROR] No database selected + let l:pattern = '\v^[^:]+:(\d+) (.*)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3][0], + \ 'text': l:match[0], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('sql', { +\ 'name': 'sqllint', +\ 'aliases': ['sql-lint'], +\ 'executable': 'sql-lint', +\ 'command': 'sql-lint', +\ 'callback': 'ale_linters#sql#sqllint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/stylus/stylelint.vim b/dot_vim/plugged/ale/ale_linters/stylus/stylelint.vim new file mode 100644 index 0000000..b60e38e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/stylus/stylelint.vim @@ -0,0 +1,20 @@ +" Author: diartyz , w0rp + +call ale#Set('stylus_stylelint_executable', 'stylelint') +call ale#Set('stylus_stylelint_options', '') +call ale#Set('stylus_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#stylus#stylelint#GetCommand(buffer) abort + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'stylus_stylelint_options')) + \ . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('stylus', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'stylus_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': function('ale_linters#stylus#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/sugarss/stylelint.vim b/dot_vim/plugged/ale/ale_linters/sugarss/stylelint.vim new file mode 100644 index 0000000..879ff0c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/sugarss/stylelint.vim @@ -0,0 +1,21 @@ +" Author: toastal +" Description: `stylelint` linter for SugarSS files + +call ale#Set('sugarss_stylelint_executable', 'stylelint') +call ale#Set('sugarss_stylelint_options', '') +call ale#Set('sugarss_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#sugarss#stylelint#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'sugarss_stylelint_options')) + \ . ' --syntax=sugarss' + \ . ' --stdin-filename %s' +endfunction + +call ale#linter#Define('sugarss', { +\ 'name': 'stylelint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'sugarss_stylelint', [ +\ 'node_modules/.bin/stylelint', +\ ])}, +\ 'command': function('ale_linters#sugarss#stylelint#GetCommand'), +\ 'callback': 'ale#handlers#css#HandleStyleLintFormat', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/svelte/svelteserver.vim b/dot_vim/plugged/ale/ale_linters/svelte/svelteserver.vim new file mode 100644 index 0000000..2200b58 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/svelte/svelteserver.vim @@ -0,0 +1,21 @@ +" Author: Joakim Repomaa +" Description: Svelte Language Server integration for ALE + +call ale#Set('svelte_svelteserver_executable', 'svelteserver') +call ale#Set('svelte_svelteserver_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#svelte#svelteserver#GetProjectRoot(buffer) abort + let l:package_path = ale#path#FindNearestFile(a:buffer, 'package.json') + + return !empty(l:package_path) ? fnamemodify(l:package_path, ':h') : '' +endfunction + +call ale#linter#Define('svelte', { +\ 'name': 'svelteserver', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'svelte_svelteserver', [ +\ 'node_modules/.bin/svelteserver', +\ ])}, +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#svelte#svelteserver#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/swift/appleswiftformat.vim b/dot_vim/plugged/ale/ale_linters/swift/appleswiftformat.vim new file mode 100644 index 0000000..4c61764 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/swift/appleswiftformat.vim @@ -0,0 +1,43 @@ +" Authors: Klaas Pieter Annema , bosr +" Description: Support for swift-format https://github.com/apple/swift-format + +function! ale_linters#swift#appleswiftformat#GetLinterCommand(buffer) abort + let l:command_args = ale#swift#GetAppleSwiftFormatCommand(a:buffer) . ' lint %t' + let l:config_args = ale#swift#GetAppleSwiftFormatConfigArgs(a:buffer) + + if l:config_args isnot# '' + let l:command_args = l:command_args . ' ' . l:config_args + endif + + return l:command_args +endfunction + +function! ale_linters#swift#appleswiftformat#Handle(buffer, lines) abort + " Matches the typical output of swift-format, that is lines of the following pattern: + " + " Sources/main.swift:4:21: warning: [DoNotUseSemicolons] remove ';' and move the next statement to the new line + " Sources/main.swift:3:12: warning: [Spacing] remove 1 space + let l:pattern = '\v^.*:(\d+):(\d+): (\S+): \[(\S+)\] (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \ 'code': l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('swift', { +\ 'name': 'apple-swift-format', +\ 'executable': function('ale#swift#GetAppleSwiftFormatExecutable'), +\ 'command': function('ale_linters#swift#appleswiftformat#GetLinterCommand'), +\ 'output_stream': 'stderr', +\ 'language': 'swift', +\ 'callback': 'ale_linters#swift#appleswiftformat#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/swift/cspell.vim b/dot_vim/plugged/ale/ale_linters/swift/cspell.vim new file mode 100644 index 0000000..25451e9 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/swift/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Swift files. + +call ale#handlers#cspell#DefineLinter('swift') diff --git a/dot_vim/plugged/ale/ale_linters/swift/sourcekitlsp.vim b/dot_vim/plugged/ale/ale_linters/swift/sourcekitlsp.vim new file mode 100644 index 0000000..560893b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/swift/sourcekitlsp.vim @@ -0,0 +1,13 @@ +" Author: Dan Loman +" Description: Support for sourcekit-lsp https://github.com/apple/sourcekit-lsp + +call ale#Set('sourcekit_lsp_executable', 'sourcekit-lsp') + +call ale#linter#Define('swift', { +\ 'name': 'sourcekitlsp', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'sourcekit_lsp_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale#swift#FindProjectRoot'), +\ 'language': 'swift', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/swift/swiftlint.vim b/dot_vim/plugged/ale/ale_linters/swift/swiftlint.vim new file mode 100644 index 0000000..d08c68f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/swift/swiftlint.vim @@ -0,0 +1,69 @@ +" Author: David Mohundro , Gordon Fontenot +" Description: swiftlint for swift files + +call ale#Set('swift_swiftlint_executable', 'swiftlint') +call ale#Set('swift_swiftlint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#swift#swiftlint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'swift_swiftlint', [ + \ 'Pods/SwiftLint/swiftlint', + \ 'ios/Pods/SwiftLint/swiftlint', + \ 'swiftlint', + \]) +endfunction + +function! ale_linters#swift#swiftlint#GetCommand(buffer) abort + let l:executable = ale_linters#swift#swiftlint#GetExecutable(a:buffer) + let l:args = 'lint --use-stdin' + + return ale#Escape(l:executable) + \ . ' ' .l:args +endfunction + +function! ale_linters#swift#swiftlint#Handle(buffer, lines) abort + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ([^:]+): (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': str2nr(l:match[2]), + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'text': l:match[5], + \} + + if l:match[4] is# 'error' + let l:item.type = 'E' + elseif l:match[4] is# 'note' + let l:item.type = 'I' + endif + + if !empty(l:match[3]) + let l:item.col = str2nr(l:match[3]) + endif + + " If the filename is something like , or -, then + " this is an error for the file we checked. + if l:match[1] isnot# '-' && l:match[1][0] isnot# '<' + let l:item['filename'] = l:match[1] + endif + + " Parse the code if it's there. + let l:code_match = matchlist(l:item.text, '\v^(.+) \(([^ (]+)\)$') + + if !empty(l:code_match) + let l:item.text = l:code_match[1] + let l:item.code = l:code_match[2] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('swift', { +\ 'name': 'swiftlint', +\ 'executable': function('ale_linters#swift#swiftlint#GetExecutable'), +\ 'command': function('ale_linters#swift#swiftlint#GetCommand'), +\ 'callback': 'ale_linters#swift#swiftlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/systemd/systemd_analyze.vim b/dot_vim/plugged/ale/ale_linters/systemd/systemd_analyze.vim new file mode 100644 index 0000000..64eef8c --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/systemd/systemd_analyze.vim @@ -0,0 +1,18 @@ +function! ale_linters#systemd#systemd_analyze#Handle(buffer, lines) abort + return ale#util#MapMatches(a:lines, '\v(.+):([0-9]+): (.+)', {match -> { + \ 'lnum': str2nr(match[2]), + \ 'col': 1, + \ 'type': 'W', + \ 'text': match[3], + \}}) +endfunction + +call ale#linter#Define('systemd', { +\ 'name': 'systemd_analyze', +\ 'aliases': ['systemd-analyze'], +\ 'executable': 'systemd-analyze', +\ 'command': 'SYSTEMD_LOG_COLOR=0 %e --user verify %s', +\ 'callback': 'ale_linters#systemd#systemd_analyze#Handle', +\ 'output_stream': 'both', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tcl/nagelfar.vim b/dot_vim/plugged/ale/ale_linters/tcl/nagelfar.vim new file mode 100644 index 0000000..5a4940e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tcl/nagelfar.vim @@ -0,0 +1,39 @@ +" Author: Nick James +" Description: nagelfar linter for tcl files + +call ale#Set('tcl_nagelfar_executable', 'nagelfar.tcl') +call ale#Set('tcl_nagelfar_options', '') + +function! ale_linters#tcl#nagelfar#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'tcl_nagelfar_options') + + return '%e' . ale#Pad(l:options) . ' %s' +endfunction + +function! ale_linters#tcl#nagelfar#Handle(buffer, lines) abort + " Matches patterns like the following: + " Line 5: W Found constant "bepa" which is also a variable. + " Line 13: E Wrong number of arguments (3) to "set" + " Line 93: N Close brace not aligned with line 90 (4 0) + let l:pattern = '^Line\s\+\([0-9]\+\): \([NEW]\) \(.*\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'type': l:match[2] is# 'N' ? 'W' : l:match[2], + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('tcl', { +\ 'name': 'nagelfar', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'tcl_nagelfar_executable')}, +\ 'command': function('ale_linters#tcl#nagelfar#GetCommand'), +\ 'callback': 'ale_linters#tcl#nagelfar#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/checkov.vim b/dot_vim/plugged/ale/ale_linters/terraform/checkov.vim new file mode 100644 index 0000000..568b46e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/checkov.vim @@ -0,0 +1,41 @@ +" Author: Thyme-87 +" Description: use checkov for providing warnings via ale + +call ale#Set('terraform_checkov_executable', 'checkov') +call ale#Set('terraform_checkov_options', '') + +function! ale_linters#terraform#checkov#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'terraform_checkov_executable') +endfunction + +function! ale_linters#terraform#checkov#GetCommand(buffer) abort + return '%e ' . '-f %t -o json --quiet ' . ale#Var(a:buffer, 'terraform_checkov_options') +endfunction + +function! ale_linters#terraform#checkov#Handle(buffer, lines) abort + let l:output = [] + + let l:results = get(get(ale#util#FuzzyJSONDecode(a:lines, {}), 'results', []), 'failed_checks', []) + + for l:violation in l:results + call add(l:output, { + \ 'filename': l:violation['file_path'], + \ 'lnum': l:violation['file_line_range'][0], + \ 'end_lnum': l:violation['file_line_range'][1], + \ 'text': l:violation['check_name'] . ' [' . l:violation['check_id'] . ']', + \ 'detail': l:violation['check_id'] . ': ' . l:violation['check_name'] . "\n" . + \ 'For more information, see: '. l:violation['guideline'], + \ 'type': 'W', + \ }) + endfor + + return l:output +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'checkov', +\ 'output_stream': 'stdout', +\ 'executable': function('ale_linters#terraform#checkov#GetExecutable'), +\ 'command': function('ale_linters#terraform#checkov#GetCommand'), +\ 'callback': 'ale_linters#terraform#checkov#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/terraform.vim b/dot_vim/plugged/ale/ale_linters/terraform/terraform.vim new file mode 100644 index 0000000..1beb850 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/terraform.vim @@ -0,0 +1,69 @@ +" Author: Keith Maxwell +" Description: terraform fmt to check for errors + +call ale#Set('terraform_terraform_executable', 'terraform') + +function! ale_linters#terraform#terraform#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'terraform_terraform_executable') +endfunction + +function! ale_linters#terraform#terraform#GetCommand(buffer) abort + return ale#Escape(ale_linters#terraform#terraform#GetExecutable(a:buffer)) + \ . ' validate -no-color -json ' +endfunction + +function! ale_linters#terraform#terraform#GetType(severity) abort + if a:severity is? 'warning' + return 'W' + endif + + return 'E' +endfunction + +function! ale_linters#terraform#terraform#GetDetail(error) abort + let l:detail = get(a:error, 'detail', '') + + if strlen(l:detail) > 0 + return l:detail + else + return get(a:error, 'summary', '') + endif +endfunction + +function! ale_linters#terraform#terraform#Handle(buffer, lines) abort + let l:output = [] + + let l:errors = ale#util#FuzzyJSONDecode(a:lines, {'diagnostics': []}) + let l:dir = expand('#' . a:buffer . ':p:h') + let l:file = expand('#' . a:buffer . ':p') + + for l:error in l:errors['diagnostics'] + if has_key(l:error, 'range') + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:error['range']['filename']), + \ 'lnum': l:error['range']['start']['line'], + \ 'col': l:error['range']['start']['column'], + \ 'text': ale_linters#terraform#terraform#GetDetail(l:error), + \ 'type': ale_linters#terraform#terraform#GetType(l:error['severity']), + \}) + else + call add(l:output, { + \ 'filename': l:file, + \ 'lnum': 0, + \ 'col': 0, + \ 'text': ale_linters#terraform#terraform#GetDetail(l:error), + \ 'type': ale_linters#terraform#terraform#GetType(l:error['severity']), + \}) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'terraform', +\ 'output_stream': 'stdout', +\ 'executable': function('ale_linters#terraform#terraform#GetExecutable'), +\ 'command': function('ale_linters#terraform#terraform#GetCommand'), +\ 'callback': 'ale_linters#terraform#terraform#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/terraform_ls.vim b/dot_vim/plugged/ale/ale_linters/terraform/terraform_ls.vim new file mode 100644 index 0000000..ab35126 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/terraform_ls.vim @@ -0,0 +1,38 @@ +" Author: Horacio Sanson +" Description: terraform-ls integration for ALE (cf. https://github.com/hashicorp/terraform-ls) + +call ale#Set('terraform_terraform_executable', 'terraform') +call ale#Set('terraform_ls_executable', 'terraform-ls') +call ale#Set('terraform_ls_options', '') + +function! ale_linters#terraform#terraform_ls#GetTerraformExecutable(buffer) abort + let l:terraform_executable = ale#Var(a:buffer, 'terraform_terraform_executable') + + if(ale#path#IsAbsolute(l:terraform_executable)) + return '-tf-exec ' . l:terraform_executable + endif + + return '' +endfunction + +function! ale_linters#terraform#terraform_ls#GetCommand(buffer) abort + return '%e' + \ . ale#Pad('serve') + \ . ale#Pad(ale_linters#terraform#terraform_ls#GetTerraformExecutable(a:buffer)) + \ . ale#Pad(ale#Var(a:buffer, 'terraform_ls_options')) +endfunction + +function! ale_linters#terraform#terraform_ls#GetProjectRoot(buffer) abort + let l:tf_dir = ale#path#FindNearestDirectory(a:buffer, '.terraform') + + return !empty(l:tf_dir) ? fnamemodify(l:tf_dir, ':h:h') : '' +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'terraform_ls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'terraform_ls_executable')}, +\ 'command': function('ale_linters#terraform#terraform_ls#GetCommand'), +\ 'project_root': function('ale_linters#terraform#terraform_ls#GetProjectRoot'), +\ 'language': 'terraform', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/terraform_lsp.vim b/dot_vim/plugged/ale/ale_linters/terraform/terraform_lsp.vim new file mode 100644 index 0000000..e2408c1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/terraform_lsp.vim @@ -0,0 +1,25 @@ +" Author: OJFord +" Description: terraform-lsp integration for ALE (cf. https://github.com/juliosueiras/terraform-lsp) + +call ale#Set('terraform_langserver_executable', 'terraform-lsp') +call ale#Set('terraform_langserver_options', '') + +function! ale_linters#terraform#terraform_lsp#GetCommand(buffer) abort + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'terraform_langserver_options')) +endfunction + +function! ale_linters#terraform#terraform_lsp#GetProjectRoot(buffer) abort + let l:tf_dir = ale#path#FindNearestDirectory(a:buffer, '.terraform') + + return !empty(l:tf_dir) ? fnamemodify(l:tf_dir, ':h:h') : '' +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'terraform_lsp', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'terraform_langserver_executable')}, +\ 'command': function('ale_linters#terraform#terraform_lsp#GetCommand'), +\ 'project_root': function('ale_linters#terraform#terraform_lsp#GetProjectRoot'), +\ 'language': 'terraform', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/tflint.vim b/dot_vim/plugged/ale/ale_linters/terraform/tflint.vim new file mode 100644 index 0000000..86b5b74 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/tflint.vim @@ -0,0 +1,105 @@ +" Author: Nat Williams +" Description: tflint for Terraform files +" +" See: https://www.terraform.io/ +" https://github.com/wata727/tflint + +call ale#Set('terraform_tflint_options', '') +call ale#Set('terraform_tflint_executable', 'tflint') + +function! ale_linters#terraform#tflint#Handle(buffer, lines) abort + let l:output = [] + let l:pattern = '\v^(.*):(\d+),(\d+)-(\d+)?,?(\d+): (.{-1,}); (.+)$' + let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) + + " This is a rough test for tflint's output format + " On versions prior to 0.11 it outputs all errors as a single level list + if type(l:json) is v:t_list + for l:error in l:json + if l:error.type is# 'ERROR' + let l:type = 'E' + elseif l:error.type is# 'NOTICE' + let l:type = 'I' + else + let l:type = 'W' + endif + + call add(l:output, { + \ 'lnum': l:error.line, + \ 'text': l:error.message, + \ 'type': l:type, + \ 'code': l:error.detector, + \}) + endfor + else + for l:error in get(l:json, 'errors', []) + for l:match in ale#util#GetMatches(l:error.message, [l:pattern]) + if l:match[4] is# '' + let l:match[4] = l:match[2] + endif + + call add(l:output, { + \ 'filename': l:match[1], + \ 'lnum': str2nr(l:match[2]), + \ 'col': str2nr(l:match[3]), + \ 'end_lnum': str2nr(l:match[4]), + \ 'end_col': str2nr(l:match[5]), + \ 'text': l:match[7], + \ 'code': l:match[6], + \ 'type': 'E', + \}) + endfor + endfor + + for l:error in get(l:json, 'issues', []) + if l:error.rule.severity is# 'ERROR' + let l:type = 'E' + elseif l:error.rule.severity is# 'NOTICE' + let l:type = 'I' + else + let l:type = 'W' + endif + + call add(l:output, { + \ 'filename': l:error.range.filename, + \ 'lnum': l:error.range.start.line, + \ 'col': l:error.range.start.column, + \ 'end_lnum': l:error.range.end.line, + \ 'end_col': l:error.range.end.column, + \ 'text': l:error.message, + \ 'code': l:error.rule.name, + \ 'type': l:type, + \}) + endfor + endif + + return l:output +endfunction + +function! ale_linters#terraform#tflint#GetCommand(buffer) abort + let l:cmd = '%e' + + let l:config_file = ale#path#FindNearestFile(a:buffer, '.tflint.hcl') + + if !empty(l:config_file) + let l:cmd .= ' --config ' . ale#Escape(l:config_file) + endif + + let l:opts = ale#Var(a:buffer, 'terraform_tflint_options') + + if !empty(l:opts) + let l:cmd .= ' ' . l:opts + endif + + let l:cmd .= ' -f json' + + return l:cmd +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'tflint', +\ 'executable': {b -> ale#Var(b, 'terraform_tflint_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#terraform#tflint#GetCommand'), +\ 'callback': 'ale_linters#terraform#tflint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/terraform/tfsec.vim b/dot_vim/plugged/ale/ale_linters/terraform/tfsec.vim new file mode 100644 index 0000000..d29cdd1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/terraform/tfsec.vim @@ -0,0 +1,87 @@ +" Description: tfsec for Terraform files +" +" See: https://www.terraform.io/ +" https://github.com/aquasecurity/tfsec + +call ale#Set('terraform_tfsec_options', '') +call ale#Set('terraform_tfsec_executable', 'tfsec') + +let s:separator = has('win32') ? '\' : '/' + +function! ale_linters#terraform#tfsec#Handle(buffer, lines) abort + let l:output = [] + let l:json = ale#util#FuzzyJSONDecode(a:lines, {}) + + " if there's no warning, 'result' is `null`. + if empty(get(l:json, 'results')) + return l:output + endif + + for l:result in get(l:json, 'results', []) + if l:result.severity is# 'LOW' + let l:type = 'I' + elseif l:result.severity is# 'CRITICAL' + let l:type = 'E' + else + let l:type = 'W' + endif + + call add(l:output, { + \ 'filename': l:result.location.filename, + \ 'lnum': l:result.location.start_line, + \ 'end_lnum': l:result.location.end_line, + \ 'text': l:result.description, + \ 'code': l:result.long_id, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +" Construct command arguments to tfsec with `terraform_tfsec_options`. +function! ale_linters#terraform#tfsec#GetCommand(buffer) abort + let l:cmd = '%e' + + let l:config = ale_linters#terraform#tfsec#FindConfig(a:buffer) + + if !empty(l:config) + let l:cmd .= ' --config-file ' . l:config + endif + + let l:opts = ale#Var(a:buffer, 'terraform_tfsec_options') + + if !empty(l:opts) + let l:cmd .= ' ' . l:opts + endif + + let l:cmd .= ' --format json' + + return l:cmd +endfunction + +" Find the nearest configuration file of tfsec. +function! ale_linters#terraform#tfsec#FindConfig(buffer) abort + let l:config_dir = ale#path#FindNearestDirectory(a:buffer, '.tfsec') + + if !empty(l:config_dir) + " https://aquasecurity.github.io/tfsec/v1.28.0/guides/configuration/config/ + for l:basename in ['config.yml', 'config.json'] + let l:config = ale#path#Simplify(join([l:config_dir, l:basename], s:separator)) + + if filereadable(l:config) + return ale#Escape(l:config) + endif + endfor + endif + + return '' +endfunction + +call ale#linter#Define('terraform', { +\ 'name': 'tfsec', +\ 'executable': {b -> ale#Var(b, 'terraform_tfsec_executable')}, +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#terraform#tfsec#GetCommand'), +\ 'callback': 'ale_linters#terraform#tfsec#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/testft/testlinter.vim b/dot_vim/plugged/ale/ale_linters/testft/testlinter.vim new file mode 100644 index 0000000..65e0b20 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/testft/testlinter.vim @@ -0,0 +1,10 @@ +" Author: neersighted +" Description: dummy linter to use in tests + +call ale#linter#Define('testft', { +\ 'name': 'testlinter', +\ 'output_stream': 'stdout', +\ 'executable': 'testlinter', +\ 'command': 'testlinter', +\ 'callback': 'testCB', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/alex.vim b/dot_vim/plugged/ale/ale_linters/tex/alex.vim new file mode 100644 index 0000000..5d9aec6 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for TeX files + +call ale#handlers#alex#DefineLinter('tex', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/tex/chktex.vim b/dot_vim/plugged/ale/ale_linters/tex/chktex.vim new file mode 100644 index 0000000..160baf0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/chktex.vim @@ -0,0 +1,54 @@ +" Author: Andrew Balmos - +" Description: chktex for LaTeX files + +let g:ale_tex_chktex_executable = +\ get(g:, 'ale_tex_chktex_executable', 'chktex') + +let g:ale_tex_chktex_options = +\ get(g:, 'ale_tex_chktex_options', '-I') + +function! ale_linters#tex#chktex#GetCommand(buffer) abort + " Check for optional .chktexrc + let l:chktex_config = ale#path#FindNearestFile( + \ a:buffer, + \ '.chktexrc') + + let l:command = ale#Var(a:buffer, 'tex_chktex_executable') + " Avoid bug when used without -p (last warning has gibberish for a filename) + let l:command .= ' -v0 -p stdin -q' + + if !empty(l:chktex_config) + let l:command .= ' -l ' . ale#Escape(l:chktex_config) + endif + + let l:command .= ' ' . ale#Var(a:buffer, 'tex_chktex_options') + + return l:command +endfunction + +function! ale_linters#tex#chktex#Handle(buffer, lines) abort + " Mattes lines like: + " + " stdin:499:2:24:Delete this space to maintain correct pagereferences. + " stdin:507:81:3:You should enclose the previous parenthesis with `{}'. + let l:pattern = '^stdin:\(\d\+\):\(\d\+\):\(\d\+\):\(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4] . ' (' . (l:match[3]+0) . ')', + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('tex', { +\ 'name': 'chktex', +\ 'executable': 'chktex', +\ 'command': function('ale_linters#tex#chktex#GetCommand'), +\ 'callback': 'ale_linters#tex#chktex#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/cspell.vim b/dot_vim/plugged/ale/ale_linters/tex/cspell.vim new file mode 100644 index 0000000..4cf2b08 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TeX files. + +call ale#handlers#cspell#DefineLinter('tex') diff --git a/dot_vim/plugged/ale/ale_linters/tex/lacheck.vim b/dot_vim/plugged/ale/ale_linters/tex/lacheck.vim new file mode 100644 index 0000000..35aad08 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/lacheck.vim @@ -0,0 +1,43 @@ +" Author: Andrew Balmos - +" Description: lacheck for LaTeX files + +call ale#Set('tex_lacheck_executable', 'lacheck') + +function! ale_linters#tex#lacheck#Handle(buffer, lines) abort + " Mattes lines like: + " + " "book.tex", line 37: possible unwanted space at "{" + " "book.tex", line 38: missing `\ ' after "etc." + let l:pattern = '^"\(.\+\)", line \(\d\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " lacheck follows `\input{}` commands. If the cwd is not the same as the + " file in the buffer then it will fail to find the inputted items. We do not + " want warnings from those items anyway + if !empty(matchstr(l:match[3], '^Could not open ".\+"$')) + continue + endif + + " lacheck follows `\input{}` commands. We are only interested in + " reporting errors for the current buffer only. + if empty(matchstr(fnamemodify(l:match[1], ':t'), fnamemodify(bufname(a:buffer), ':t'))) + continue + endif + + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('tex', { +\ 'name': 'lacheck', +\ 'executable': {b -> ale#Var(b, 'tex_lacheck_executable')}, +\ 'command': '%e %t', +\ 'callback': 'ale_linters#tex#lacheck#Handle' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/proselint.vim b/dot_vim/plugged/ale/ale_linters/tex/proselint.vim new file mode 100644 index 0000000..35e764e --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/proselint.vim @@ -0,0 +1,9 @@ +" Author: poohzrn https://github.com/poohzrn +" Description: proselint for TeX files + +call ale#linter#Define('tex', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/redpen.vim b/dot_vim/plugged/ale/ale_linters/tex/redpen.vim new file mode 100644 index 0000000..952a600 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('tex', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f latex -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/texlab.vim b/dot_vim/plugged/ale/ale_linters/tex/texlab.vim new file mode 100644 index 0000000..8e96b80 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/texlab.vim @@ -0,0 +1,26 @@ +" Author: Ricardo Liang +" Author: ourigen +" Description: Texlab language server (Rust rewrite) + +call ale#Set('tex_texlab_executable', 'texlab') +call ale#Set('tex_texlab_options', '') +call ale#Set('tex_texlab_config', {}) + +function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort + let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') + + return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' +endfunction + +function! ale_linters#tex#texlab#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'tex_texlab_options')) +endfunction + +call ale#linter#Define('tex', { +\ 'name': 'texlab', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')}, +\ 'command': function('ale_linters#tex#texlab#GetCommand'), +\ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'tex_texlab_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/textlint.vim b/dot_vim/plugged/ale/ale_linters/tex/textlint.vim new file mode 100644 index 0000000..5edac46 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/textlint.vim @@ -0,0 +1,9 @@ +" Author: TANIGUCHI Masaya +" Description: textlint for LaTeX files + +call ale#linter#Define('tex', { +\ 'name': 'textlint', +\ 'executable': function('ale#handlers#textlint#GetExecutable'), +\ 'command': function('ale#handlers#textlint#GetCommand'), +\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/vale.vim b/dot_vim/plugged/ale/ale_linters/tex/vale.vim new file mode 100644 index 0000000..f64e72a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/vale.vim @@ -0,0 +1,9 @@ +" Author: chew-z https://github.com/chew-z +" Description: vale for LaTeX files + +call ale#linter#Define('tex', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=JSON %t', +\ 'callback': 'ale#handlers#vale#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/tex/writegood.vim b/dot_vim/plugged/ale/ale_linters/tex/writegood.vim new file mode 100644 index 0000000..c1aeace --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/tex/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for TeX files + +call ale#handlers#writegood#DefineLinter('tex') diff --git a/dot_vim/plugged/ale/ale_linters/texinfo/alex.vim b/dot_vim/plugged/ale/ale_linters/texinfo/alex.vim new file mode 100644 index 0000000..4d24552 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/texinfo/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for texinfo files + +call ale#handlers#alex#DefineLinter('texinfo', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/texinfo/cspell.vim b/dot_vim/plugged/ale/ale_linters/texinfo/cspell.vim new file mode 100644 index 0000000..d691b3a --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/texinfo/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TeXInfo files. + +call ale#handlers#cspell#DefineLinter('texinfo') diff --git a/dot_vim/plugged/ale/ale_linters/texinfo/proselint.vim b/dot_vim/plugged/ale/ale_linters/texinfo/proselint.vim new file mode 100644 index 0000000..003e3a0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/texinfo/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for Texinfo files + +call ale#linter#Define('texinfo', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/texinfo/writegood.vim b/dot_vim/plugged/ale/ale_linters/texinfo/writegood.vim new file mode 100644 index 0000000..4427f05 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/texinfo/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for Texinfo files + +call ale#handlers#writegood#DefineLinter('texinfo') diff --git a/dot_vim/plugged/ale/ale_linters/text/alex.vim b/dot_vim/plugged/ale/ale_linters/text/alex.vim new file mode 100644 index 0000000..d87ed91 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for text files + +call ale#handlers#alex#DefineLinter('text', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/text/cspell.vim b/dot_vim/plugged/ale/ale_linters/text/cspell.vim new file mode 100644 index 0000000..813ef3b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for general text files. + +call ale#handlers#cspell#DefineLinter('text') diff --git a/dot_vim/plugged/ale/ale_linters/text/languagetool.vim b/dot_vim/plugged/ale/ale_linters/text/languagetool.vim new file mode 100644 index 0000000..58c99ba --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/languagetool.vim @@ -0,0 +1,4 @@ +" Author: Vincent (wahrwolf [ät] wolfpit.net) +" Description: languagetool for text files + +call ale#handlers#languagetool#DefineLinter('text') diff --git a/dot_vim/plugged/ale/ale_linters/text/proselint.vim b/dot_vim/plugged/ale/ale_linters/text/proselint.vim new file mode 100644 index 0000000..281b4ff --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/proselint.vim @@ -0,0 +1,9 @@ +" Author: poohzrn https://github.com/poohzrn +" Description: proselint for text files + +call ale#linter#Define('text', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/text/redpen.vim b/dot_vim/plugged/ale/ale_linters/text/redpen.vim new file mode 100644 index 0000000..ec4433b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/redpen.vim @@ -0,0 +1,9 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +call ale#linter#Define('text', { +\ 'name': 'redpen', +\ 'executable': 'redpen', +\ 'command': 'redpen -f plain -r json %t', +\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/text/textlint.vim b/dot_vim/plugged/ale/ale_linters/text/textlint.vim new file mode 100644 index 0000000..67c4e37 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/textlint.vim @@ -0,0 +1,9 @@ +" Author: Yasuhiro Kiyota +" Description: textlint, a proofreading tool (https://textlint.github.io/) + +call ale#linter#Define('text', { +\ 'name': 'textlint', +\ 'executable': function('ale#handlers#textlint#GetExecutable'), +\ 'command': function('ale#handlers#textlint#GetCommand'), +\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/text/vale.vim b/dot_vim/plugged/ale/ale_linters/text/vale.vim new file mode 100644 index 0000000..cf37c2f --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/vale.vim @@ -0,0 +1,9 @@ +" Author: chew-z https://github.com/chew-z +" Description: vale for text files + +call ale#linter#Define('text', { +\ 'name': 'vale', +\ 'executable': 'vale', +\ 'command': 'vale --output=JSON %t', +\ 'callback': 'ale#handlers#vale#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/text/writegood.vim b/dot_vim/plugged/ale/ale_linters/text/writegood.vim new file mode 100644 index 0000000..81b935d --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/text/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for text files + +call ale#handlers#writegood#DefineLinter('text') diff --git a/dot_vim/plugged/ale/ale_linters/thrift/thrift.vim b/dot_vim/plugged/ale/ale_linters/thrift/thrift.vim new file mode 100644 index 0000000..345c7ab --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/thrift/thrift.vim @@ -0,0 +1,87 @@ +" Author: Jon Parise + +call ale#Set('thrift_thrift_executable', 'thrift') +call ale#Set('thrift_thrift_generators', ['cpp']) +call ale#Set('thrift_thrift_includes', ['.']) +call ale#Set('thrift_thrift_options', '-strict') + +function! ale_linters#thrift#thrift#GetCommand(buffer) abort + let l:generators = ale#Var(a:buffer, 'thrift_thrift_generators') + let l:includes = ale#Var(a:buffer, 'thrift_thrift_includes') + + " The thrift compiler requires at least one generator. If none are set, + " fall back to our default value to avoid silently failing. We could also + " `throw` here, but that seems even less helpful. + if empty(l:generators) + let l:generators = ['cpp'] + endif + + let l:output_dir = ale#command#CreateDirectory(a:buffer) + + return '%e' + \ . ale#Pad(join(map(copy(l:generators), "'--gen ' . v:val"))) + \ . ale#Pad(join(map(copy(l:includes), "'-I ' . v:val"))) + \ . ale#Pad(ale#Var(a:buffer, 'thrift_thrift_options')) + \ . ' -out ' . ale#Escape(l:output_dir) + \ . ' %t' +endfunction + +function! ale_linters#thrift#thrift#Handle(buffer, lines) abort + " Matches lines like the following: + " + " [SEVERITY:/path/filename.thrift:31] Message text + " [ERROR:/path/filename.thrift:31] (last token was ';') + let l:pattern = '\v^\[(\u+):(.*):(\d+)\] (.*)$' + + let l:index = 0 + let l:output = [] + + " Roll our own output-matching loop instead of using ale#util#GetMatches + " because we need to support error messages that span multiple lines. + while l:index < len(a:lines) + let l:line = a:lines[l:index] + + let l:match = matchlist(l:line, l:pattern) + + if empty(l:match) + let l:index += 1 + continue + endif + + let l:severity = l:match[1] + + if l:severity is# 'WARNING' + let l:type = 'W' + else + let l:type = 'E' + endif + + " If our text looks like "(last token was ';')", the *next* line + " should contain a more descriptive error message. + let l:text = l:match[4] + + if l:text =~# '\(last token was .*\)' + let l:index += 1 + let l:text = get(a:lines, l:index, 'Unknown error ' . l:text) + endif + + call add(l:output, { + \ 'lnum': l:match[3] + 0, + \ 'col': 0, + \ 'type': l:type, + \ 'text': l:text, + \}) + + let l:index += 1 + endwhile + + return l:output +endfunction + +call ale#linter#Define('thrift', { +\ 'name': 'thrift', +\ 'output_stream': 'both', +\ 'executable': {b -> ale#Var(b, 'thrift_thrift_executable')}, +\ 'command': function('ale_linters#thrift#thrift#GetCommand'), +\ 'callback': 'ale_linters#thrift#thrift#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/thrift/thriftcheck.vim b/dot_vim/plugged/ale/ale_linters/thrift/thriftcheck.vim new file mode 100644 index 0000000..bf929d1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/thrift/thriftcheck.vim @@ -0,0 +1,46 @@ +" Author: Jon Parise + +call ale#Set('thrift_thriftcheck_executable', 'thriftcheck') +call ale#Set('thrift_thriftcheck_options', '') + +function! ale_linters#thrift#thriftcheck#GetCommand(buffer) abort + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'thrift_thriftcheck_options')) + \ . ' --stdin-filename %s' + \ . ' %t' +endfunction + +function! ale_linters#thrift#thriftcheck#Handle(buffer, lines) abort + " Matches lines like the following: + " + " file.thrift:1:1: error: "py" namespace must match "^idl\\." (namespace.pattern) + " file.thrift:3:5: warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit) + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+): ?([^:]+): (.+) \(([^\)]+)\)$' + + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if l:match[3] is# 'warning' + let l:type = 'W' + else + let l:type = 'E' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:type, + \ 'text': l:match[4], + \ 'code': l:match[5], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('thrift', { +\ 'name': 'thriftcheck', +\ 'executable': {b -> ale#Var(b, 'thrift_thriftcheck_executable')}, +\ 'command': function('ale_linters#thrift#thriftcheck#GetCommand'), +\ 'callback': 'ale_linters#thrift#thriftcheck#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/cspell.vim b/dot_vim/plugged/ale/ale_linters/typescript/cspell.vim new file mode 100644 index 0000000..6061b75 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for TypeScript files. + +call ale#handlers#cspell#DefineLinter('typescript') diff --git a/dot_vim/plugged/ale/ale_linters/typescript/deno.vim b/dot_vim/plugged/ale/ale_linters/typescript/deno.vim new file mode 100644 index 0000000..f47fac7 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/deno.vim @@ -0,0 +1,12 @@ +" Author: Mohammed Chelouti - https://github.com/motato1 +" Arnold Chand +" Description: Deno lsp linter for TypeScript files. + +call ale#linter#Define('typescript', { +\ 'name': 'deno', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#deno#GetExecutable'), +\ 'command': '%e lsp', +\ 'project_root': function('ale#handlers#deno#GetProjectRoot'), +\ 'initialization_options': function('ale#handlers#deno#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/eslint.vim b/dot_vim/plugged/ale/ale_linters/typescript/eslint.vim new file mode 100644 index 0000000..eaeac30 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/eslint.vim @@ -0,0 +1,10 @@ +" Author: w0rp +" Description: eslint for JavaScript files + +call ale#linter#Define('typescript', { +\ 'name': 'eslint', +\ 'executable': function('ale#handlers#eslint#GetExecutable'), +\ 'cwd': function('ale#handlers#eslint#GetCwd'), +\ 'command': function('ale#handlers#eslint#GetCommand'), +\ 'callback': 'ale#handlers#eslint#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/standard.vim b/dot_vim/plugged/ale/ale_linters/typescript/standard.vim new file mode 100644 index 0000000..1d524a1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/standard.vim @@ -0,0 +1,31 @@ +" Author: Ahmed El Gabri <@ahmedelgabri> +" Description: standardjs for typescript files + +call ale#Set('typescript_standard_executable', 'standard') +call ale#Set('typescript_standard_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('typescript_standard_options', '') + +function! ale_linters#typescript#standard#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'typescript_standard', [ + \ 'node_modules/standardx/bin/cmd.js', + \ 'node_modules/standard/bin/cmd.js', + \ 'node_modules/.bin/standard', + \]) +endfunction + +function! ale_linters#typescript#standard#GetCommand(buffer) abort + let l:executable = ale_linters#typescript#standard#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'typescript_standard_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin %s' +endfunction + +" standard uses eslint and the output format is the same +call ale#linter#Define('typescript', { +\ 'name': 'standard', +\ 'executable': function('ale_linters#typescript#standard#GetExecutable'), +\ 'command': function('ale_linters#typescript#standard#GetCommand'), +\ 'callback': 'ale#handlers#eslint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/tslint.vim b/dot_vim/plugged/ale/ale_linters/typescript/tslint.vim new file mode 100644 index 0000000..886a3cd --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/tslint.vim @@ -0,0 +1,75 @@ +" Author: Prashanth Chandra , Jonathan Clem +" Description: tslint for TypeScript files + +call ale#handlers#tslint#InitVariables() + +function! ale_linters#typescript#tslint#Handle(buffer, lines) abort + " Do not output any errors for empty files if the option is on. + if ale#Var(a:buffer, 'typescript_tslint_ignore_empty_files') + \&& getbufline(a:buffer, 1, '$') == [''] + return [] + endif + + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) + if get(l:error, 'ruleName', '') is# 'no-implicit-dependencies' + continue + endif + + let l:item = { + \ 'type': (get(l:error, 'ruleSeverity', '') is# 'WARNING' ? 'W' : 'E'), + \ 'text': l:error.failure, + \ 'lnum': l:error.startPosition.line + 1, + \ 'col': l:error.startPosition.character + 1, + \ 'end_lnum': l:error.endPosition.line + 1, + \ 'end_col': l:error.endPosition.character + 1, + \} + + let l:filename = ale#path#GetAbsPath(l:dir, l:error.name) + + " Assume temporary files are this file. + if !ale#path#IsTempName(l:filename) + let l:item.filename = l:filename + endif + + if has_key(l:error, 'ruleName') + let l:item.code = l:error.ruleName + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +function! ale_linters#typescript#tslint#GetCommand(buffer) abort + let l:tslint_config_path = ale#path#ResolveLocalPath( + \ a:buffer, + \ 'tslint.json', + \ ale#Var(a:buffer, 'typescript_tslint_config_path') + \) + let l:tslint_config_option = !empty(l:tslint_config_path) + \ ? ' -c ' . ale#Escape(l:tslint_config_path) + \ : '' + + let l:tslint_rules_dir = ale#Var(a:buffer, 'typescript_tslint_rules_dir') + let l:tslint_rules_option = !empty(l:tslint_rules_dir) + \ ? ' -r ' . ale#Escape(l:tslint_rules_dir) + \ : '' + + return ale#Escape(ale#handlers#tslint#GetExecutable(a:buffer)) + \ . ' --format json' + \ . l:tslint_config_option + \ . l:tslint_rules_option + \ . ' %t' +endfunction + +call ale#linter#Define('typescript', { +\ 'name': 'tslint', +\ 'executable': function('ale#handlers#tslint#GetExecutable'), +\ 'cwd': '%s:h', +\ 'command': function('ale_linters#typescript#tslint#GetCommand'), +\ 'callback': 'ale_linters#typescript#tslint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/tsserver.vim b/dot_vim/plugged/ale/ale_linters/typescript/tsserver.vim new file mode 100644 index 0000000..d97becc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/tsserver.vim @@ -0,0 +1,18 @@ +" Author: w0rp +" Description: tsserver integration for ALE + +call ale#Set('typescript_tsserver_executable', 'tsserver') +call ale#Set('typescript_tsserver_config_path', '') +call ale#Set('typescript_tsserver_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('typescript', { +\ 'name': 'tsserver', +\ 'lsp': 'tsserver', +\ 'executable': {b -> ale#path#FindExecutable(b, 'typescript_tsserver', [ +\ '.yarn/sdks/typescript/bin/tsserver', +\ 'node_modules/.bin/tsserver', +\ ])}, +\ 'command': '%e', +\ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'), +\ 'language': '', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/typecheck.vim b/dot_vim/plugged/ale/ale_linters/typescript/typecheck.vim new file mode 100644 index 0000000..2f18691 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/typecheck.vim @@ -0,0 +1,33 @@ +" Author: Prashanth Chandra https://github.com/prashcr, Aleh Kashnikau https://github.com/mkusher +" Description: type checker for TypeScript files + +function! ale_linters#typescript#typecheck#Handle(buffer, lines) abort + " Matches patterns like the following: + " + " hello.ts[7, 41]: Property 'a' does not exist on type 'A' + " hello.ts[16, 7]: Type 'A' is not assignable to type 'B' + " + let l:pattern = '.\+\.ts\[\(\d\+\), \(\d\+\)\]: \(.\+\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:line = l:match[1] + 0 + let l:column = l:match[2] + 0 + let l:text = l:match[3] + + call add(l:output, { + \ 'lnum': l:line, + \ 'col': l:column, + \ 'text': l:text, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('typescript', { +\ 'name': 'typecheck', +\ 'executable': 'typecheck', +\ 'command': 'typecheck %s', +\ 'callback': 'ale_linters#typescript#typecheck#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/typescript/xo.vim b/dot_vim/plugged/ale/ale_linters/typescript/xo.vim new file mode 100644 index 0000000..6f4ee50 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/typescript/xo.vim @@ -0,0 +1,6 @@ +call ale#linter#Define('typescript', { +\ 'name': 'xo', +\ 'executable': function('ale#handlers#xo#GetExecutable'), +\ 'command': function('ale#handlers#xo#GetLintCommand'), +\ 'callback': 'ale#handlers#xo#HandleJSON', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/v/v.vim b/dot_vim/plugged/ale/ale_linters/v/v.vim new file mode 100644 index 0000000..afa98c5 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/v/v.vim @@ -0,0 +1,82 @@ +" Author: fiatjaf +" Description: v build for V files + +call ale#Set('v_v_executable', 'v') +call ale#Set('v_v_options', '') + +function! ale_linters#v#v#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'v_v_options') + + " Run v in local directory with relative path + let l:command = ale#Var(a:buffer, 'v_v_executable') + \ . ale#Pad(l:options) + \ . ' .' . ' -o /tmp/vim-ale-v' + + return l:command +endfunction + +function! ale_linters#v#v#Handler(buffer, lines) abort + let l:dir = expand('#' . a:buffer . ':p:h') + let l:output = [] + + " Matches patterns like the following: + " + " ./const.v:4:3: warning: const names cannot contain uppercase letters, use snake_case instead + " 2 | + " 3 | const ( + " 4 | BUTTON_TEXT = 'OK' + " | ~~~~~~~~~~~ + " 5 | ) + " ./main.v:4:8: warning: module 'os' is imported but never used + " 2 | + " 3 | import ui + " 4 | import os + " | ~~ + " 5 | + " 6 | const ( + " ./main.v:20:10: error: undefined ident: `win_widt` + " 18 | mut app := &App{} + " 19 | app.window = ui.window({ + " 20 | width: win_widt + " | ~~~~~~~~ + " 21 | height: win_height + " 22 | title: 'Counter' + let l:current = {} + + for l:line in a:lines + " matches basic error description + let l:match = matchlist(l:line, + \ '\([^:]\+\):\([^:]\+\):\([^:]\+\): \([^:]\+\): \(.*\)') + + if !empty(l:match) + let l:current = { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[5], + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \} + call add(l:output, l:current) + continue + endif + + " try to get information about the ending column + let l:tildematch = matchstr(l:line, '\~\+') + + if !empty(l:tildematch) + let l:current['end_col'] = l:current['col'] + len(l:tildematch) + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('v', { +\ 'name': 'v', +\ 'aliases': [], +\ 'executable': {b -> ale#Var(b, 'v_v_executable')}, +\ 'command': function('ale_linters#v#v#GetCommand'), +\ 'output_stream': 'stderr', +\ 'callback': 'ale_linters#v#v#Handler', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vala/vala_lint.vim b/dot_vim/plugged/ale/ale_linters/vala/vala_lint.vim new file mode 100644 index 0000000..7f8a566 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vala/vala_lint.vim @@ -0,0 +1,66 @@ +" Author: Atsuya Takagi +" Description: A linter for Vala using Vala-Lint. + +call ale#Set('vala_vala_lint_config_filename', 'vala-lint.conf') +call ale#Set('vala_vala_lint_executable', 'io.elementary.vala-lint') + +function! ale_linters#vala#vala_lint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'vala_vala_lint_executable') +endfunction + +function! ale_linters#vala#vala_lint#GetCommand(buffer) abort + let l:command = ale_linters#vala#vala_lint#GetExecutable(a:buffer) + + let l:config_filename = ale#Var(a:buffer, 'vala_vala_lint_config_filename') + let l:config_path = ale#path#FindNearestFile(a:buffer, l:config_filename) + + if !empty(l:config_path) + let l:command .= ' -c ' . l:config_path + endif + + return l:command . ' %s' +endfunction + +function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort + let l:pattern = '^\s*\(\d\+\)\.\(\d\+\)\s\+\(error\|warn\)\s\+\(.\+\)\s\([A-Za-z0-9_\-]\+\)' + let l:output = [] + + for l:line in a:lines + " remove color escape sequences since vala-lint doesn't support + " output without colors + let l:cleaned_line = substitute(l:line, '\e\[[0-9;]\+[mK]', '', 'g') + let l:match = matchlist(l:cleaned_line, l:pattern) + + if len(l:match) == 0 + continue + endif + + let l:refined_type = l:match[3] is# 'warn' ? 'W' : 'E' + let l:cleaned_text = substitute(l:match[4], '^\s*\(.\{-}\)\s*$', '\1', '') + + let l:lnum = l:match[1] + 0 + let l:column = l:match[2] + 0 + let l:type = l:refined_type + let l:text = l:cleaned_text + let l:code = l:match[5] + + call add(l:output, { + \ 'lnum': l:lnum, + \ 'col': l:column, + \ 'text': l:text, + \ 'type': l:type, + \ 'code': l:code, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('vala', { +\ 'name': 'vala_lint', +\ 'output_stream': 'stdout', +\ 'executable': function('ale_linters#vala#vala_lint#GetExecutable'), +\ 'command': function('ale_linters#vala#vala_lint#GetCommand'), +\ 'callback': 'ale_linters#vala#vala_lint#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/verilog/hdl_checker.vim b/dot_vim/plugged/ale/ale_linters/verilog/hdl_checker.vim new file mode 100644 index 0000000..b05d856 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/hdl_checker.vim @@ -0,0 +1,5 @@ +" Author: suoto +" Description: Adds support for HDL Code Checker, which wraps vcom/vlog, ghdl +" or xvhdl. More info on https://github.com/suoto/hdl_checker + +call ale#handlers#hdl_checker#DefineLinter('verilog') diff --git a/dot_vim/plugged/ale/ale_linters/verilog/iverilog.vim b/dot_vim/plugged/ale/ale_linters/verilog/iverilog.vim new file mode 100644 index 0000000..e081f33 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/iverilog.vim @@ -0,0 +1,43 @@ +" Author: Masahiro H https://github.com/mshr-h +" Description: iverilog for verilog files + +call ale#Set('verilog_iverilog_options', '') + +function! ale_linters#verilog#iverilog#GetCommand(buffer) abort + return 'iverilog -t null -Wall ' + \ . ale#Var(a:buffer, 'verilog_iverilog_options') + \ . ' %t' +endfunction + +function! ale_linters#verilog#iverilog#Handle(buffer, lines) abort + " Look for lines like the following. + " + " tb_me_top.v:37: warning: Instantiating module me_top with dangling input port 1 (rst_n) floating. + " tb_me_top.v:17: syntax error + " memory_single_port.v:2: syntax error + " tb_me_top.v:17: error: Invalid module instantiation + let l:pattern = '^[^:]\+:\(\d\+\): \(warning\|error\|syntax error\)\(: \(.\+\)\)\?' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:line = l:match[1] + 0 + let l:type = l:match[2] =~# 'error' ? 'E' : 'W' + let l:text = l:match[2] is# 'syntax error' ? 'syntax error' : l:match[4] + + call add(l:output, { + \ 'lnum': l:line, + \ 'text': l:text, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('verilog', { +\ 'name': 'iverilog', +\ 'output_stream': 'stderr', +\ 'executable': 'iverilog', +\ 'command': function('ale_linters#verilog#iverilog#GetCommand'), +\ 'callback': 'ale_linters#verilog#iverilog#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/verilog/verilator.vim b/dot_vim/plugged/ale/ale_linters/verilog/verilator.vim new file mode 100644 index 0000000..006e310 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/verilator.vim @@ -0,0 +1,60 @@ +" Author: Masahiro H https://github.com/mshr-h +" Description: verilator for verilog files + +" Set this option to change Verilator lint options +if !exists('g:ale_verilog_verilator_options') + let g:ale_verilog_verilator_options = '' +endif + +function! ale_linters#verilog#verilator#GetCommand(buffer) abort + " the path to the current file is systematically added to the search path + return 'verilator --lint-only -Wall -Wno-DECLFILENAME ' + \ . '-I%s:h ' + \ . ale#Var(a:buffer, 'verilog_verilator_options') .' ' + \ . '%t' +endfunction + +function! ale_linters#verilog#verilator#Handle(buffer, lines) abort + " Look for lines like the following. + " + " %Error: addr_gen.v:3: syntax error, unexpected IDENTIFIER + " %Warning-WIDTH: addr_gen.v:26: Operator ASSIGNDLY expects 12 bits on the Assign RHS, but Assign RHS's CONST '20'h0' generates 20 bits. + " %Warning-UNUSED: test.v:3: Signal is not used: a + " %Warning-UNDRIVEN: test.v:3: Signal is not driven: clk + " %Warning-UNUSED: test.v:4: Signal is not used: dout + " %Warning-BLKSEQ: test.v:10: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=). + " Since version 4.032 (04/2020) verilator linter messages also contain the column number, + " and look like: + " %Error: /tmp/test.sv:3:1: syntax error, unexpected endmodule, expecting ';' + " + " to stay compatible with old versions of the tool, the column number is + " optional in the researched pattern + let l:pattern = '^%\(Warning\|Error\)[^:]*:\s*\([^:]\+\):\(\d\+\):\(\d\+\)\?:\? \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': str2nr(l:match[3]), + \ 'text': l:match[5], + \ 'type': l:match[1] is# 'Error' ? 'E' : 'W', + \ 'filename': l:match[2], + \} + + if !empty(l:match[4]) + let l:item.col = str2nr(l:match[4]) + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +call ale#linter#Define('verilog', { +\ 'name': 'verilator', +\ 'output_stream': 'stderr', +\ 'executable': 'verilator', +\ 'command': function('ale_linters#verilog#verilator#GetCommand'), +\ 'callback': 'ale_linters#verilog#verilator#Handle', +\ 'read_buffer': 0, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/verilog/vlog.vim b/dot_vim/plugged/ale/ale_linters/verilog/vlog.vim new file mode 100644 index 0000000..45e1977 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/vlog.vim @@ -0,0 +1,52 @@ +" Author: John Gentile +" Description: Adds support for Mentor Graphics Questa/ModelSim `vlog` Verilog compiler/checker + +call ale#Set('verilog_vlog_executable', 'vlog') +" See `$ vlog -h` for more options +call ale#Set('verilog_vlog_options', '-quiet -lint') + +function! ale_linters#verilog#vlog#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'verilog_vlog_options')) . ' %t' +endfunction + +function! ale_linters#verilog#vlog#Handle(buffer, lines) abort + "Matches patterns like the following: + "** Warning: add.v(7): (vlog-2623) Undefined variable: C. + "** Error: file.v(1): (vlog-13294) Identifier must be declared with a port mode: C. + let l:pattern = '^**\s\(\w*\): \([a-zA-Z0-9\-\.\_\/ ]\+\)(\(\d\+\)):\s\+\(.*\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[3] + 0, + \ 'type': l:match[1] is? 'Error' ? 'E' : 'W', + \ 'text': l:match[4], + \ 'filename': l:match[2], + \}) + endfor + + "Matches patterns like the following: + "** Warning: (vlog-2623) add.v(7): Undefined variable: C. + "** Error: (vlog-13294) file.v(1): Identifier must be declared with a port mode: C. + " let l:pattern = '^**\s\(\w*\):[a-zA-Z0-9\-\.\_\/ ]\+(\(\d\+\)):\s\+\(.*\)' + let l:pattern = '^**\s\(\w*\):\s\([^)]*)\) \([a-zA-Z0-9\-\.\_\/ ]\+\)(\(\d\+\)):\s\+\(.*\)' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[4] + 0, + \ 'type': l:match[1] is? 'Error' ? 'E' : 'W', + \ 'text': l:match[2] . ' ' . l:match[5], + \ 'filename': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('verilog', { +\ 'name': 'vlog', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'verilog_vlog_executable')}, +\ 'command': function('ale_linters#verilog#vlog#GetCommand'), +\ 'callback': 'ale_linters#verilog#vlog#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/verilog/xvlog.vim b/dot_vim/plugged/ale/ale_linters/verilog/xvlog.vim new file mode 100644 index 0000000..98b5aae --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/xvlog.vim @@ -0,0 +1,35 @@ +" Author: John Gentile +" Description: Adds support for Xilinx Vivado `xvlog` Verilog compiler/checker + +call ale#Set('verilog_xvlog_executable', 'xvlog') +call ale#Set('verilog_xvlog_options', '') + +function! ale_linters#verilog#xvlog#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'verilog_xvlog_options')) . ' %t' +endfunction + +function! ale_linters#verilog#xvlog#Handle(buffer, lines) abort + "Matches patterns like the following: + " ERROR: [VRFC 10-1412] syntax error near output [/path/to/file.v:5] + let l:pattern = '^ERROR:\s\+\(\[.*\)\[.*:\([0-9]\+\)\]' + let l:output = [] + + " NOTE: `xvlog` only prints 'INFO' and 'ERROR' messages + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'type': 'E', + \ 'text': l:match[1], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('verilog', { +\ 'name': 'xvlog', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'verilog_xvlog_executable')}, +\ 'command': function('ale_linters#verilog#xvlog#GetCommand'), +\ 'callback': 'ale_linters#verilog#xvlog#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/verilog/yosys.vim b/dot_vim/plugged/ale/ale_linters/verilog/yosys.vim new file mode 100644 index 0000000..2965775 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/verilog/yosys.vim @@ -0,0 +1,42 @@ +" Author: Nathan Sharp +" Description: Yosys for Verilog files + +call ale#Set('verilog_yosys_executable', 'yosys') +call ale#Set('verilog_yosys_options', '-Q -T -p ''read_verilog %s''') + +function! ale_linters#verilog#yosys#GetCommand(buffer) abort + return '%e ' . ale#Var(a:buffer, 'verilog_yosys_options') . ' 2>&1' +endfunction + +function! ale_linters#verilog#yosys#Handle(buffer, lines) abort + let l:output = [] + let l:path = fnamemodify(bufname(a:buffer), ':p') + + for l:match in ale#util#GetMatches(a:lines, '^\([^:]\+\):\(\d\+\): \(WARNING\|ERROR\): \(.\+\)$') + call add(l:output, { + \ 'lnum': str2nr(l:match[2]), + \ 'text': l:match[4], + \ 'type': l:match[3][0], + \ 'filename': l:match[1], + \}) + endfor + + for l:match in ale#util#GetMatches(a:lines, '^\(Warning\|ERROR\): \(.\+\)$') + call add(l:output, { + \ 'lnum': 1, + \ 'text': l:match[2], + \ 'type': l:match[1][0], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('verilog', { +\ 'name': 'yosys', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'verilog_yosys_executable')}, +\ 'command': function('ale_linters#verilog#yosys#GetCommand'), +\ 'callback': 'ale_linters#verilog#yosys#Handle', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vhdl/ghdl.vim b/dot_vim/plugged/ale/ale_linters/vhdl/ghdl.vim new file mode 100644 index 0000000..b09e620 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vhdl/ghdl.vim @@ -0,0 +1,37 @@ +" Author: John Gentile +" Description: Adds support for `ghdl` VHDL compiler/checker + +call ale#Set('vhdl_ghdl_executable', 'ghdl') +" Compile w/VHDL-2008 support +call ale#Set('vhdl_ghdl_options', '--std=08') + +function! ale_linters#vhdl#ghdl#GetCommand(buffer) abort + return '%e -s ' . ale#Pad(ale#Var(a:buffer, 'vhdl_ghdl_options')) . ' %t' +endfunction + +function! ale_linters#vhdl#ghdl#Handle(buffer, lines) abort + " Look for 'error' lines like the following: + " dff_en.vhd:41:5:error: 'begin' is expected instead of 'if' + " /path/to/file.vhdl:12:8: no declaration for "i0" + let l:pattern = '^[a-zA-Z0-9\-\.\_\/ ]\+:\(\d\+\):\(\d\+\):\(.*\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col' : l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('vhdl', { +\ 'name': 'ghdl', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'vhdl_ghdl_executable')}, +\ 'command': function('ale_linters#vhdl#ghdl#GetCommand'), +\ 'callback': 'ale_linters#vhdl#ghdl#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vhdl/hdl_checker.vim b/dot_vim/plugged/ale/ale_linters/vhdl/hdl_checker.vim new file mode 100644 index 0000000..c9d306b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vhdl/hdl_checker.vim @@ -0,0 +1,5 @@ +" Author: suoto +" Description: Adds support for HDL Code Checker, which wraps vcom/vlog, ghdl +" or xvhdl. More info on https://github.com/suoto/hdl_checker + +call ale#handlers#hdl_checker#DefineLinter('vhdl') diff --git a/dot_vim/plugged/ale/ale_linters/vhdl/vcom.vim b/dot_vim/plugged/ale/ale_linters/vhdl/vcom.vim new file mode 100644 index 0000000..1914fd3 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vhdl/vcom.vim @@ -0,0 +1,38 @@ +" Author: John Gentile +" Description: Adds support for Mentor Graphics Questa/ModelSim `vcom` VHDL compiler/checker + +call ale#Set('vhdl_vcom_executable', 'vcom') +" Use VHDL-2008. See `$ vcom -h` for more options +call ale#Set('vhdl_vcom_options', '-2008 -quiet -lint') + +function! ale_linters#vhdl#vcom#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'vhdl_vcom_options')) . ' %t' +endfunction + +function! ale_linters#vhdl#vcom#Handle(buffer, lines) abort + "Matches patterns like the following: + "** Warning: ../path/to/file.vhd(218): (vcom-1236) Shared variables must be of a protected type. + "** Error: tb_file.vhd(73): (vcom-1136) Unknown identifier "aresetn". + "** Error: tb_file.vhd(73): Bad resolution function (STD_LOGIC) for type (error). + "** Error: tb_file.vhd(73): near ":": (vcom-1576) expecting ';' or ')'. + let l:pattern = '^**\s\(\w*\):[a-zA-Z0-9\-\.\_\/ ]\+(\(\d\+\)):\s\+\(.*\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'type': l:match[1] is? 'Error' ? 'E' : 'W', + \ 'text': l:match[3], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('vhdl', { +\ 'name': 'vcom', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'vhdl_vcom_executable')}, +\ 'command': function('ale_linters#vhdl#vcom#GetCommand'), +\ 'callback': 'ale_linters#vhdl#vcom#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vhdl/xvhdl.vim b/dot_vim/plugged/ale/ale_linters/vhdl/xvhdl.vim new file mode 100644 index 0000000..8010ff1 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vhdl/xvhdl.vim @@ -0,0 +1,37 @@ +" Author: John Gentile +" Description: Adds support for Xilinx Vivado `xvhdl` VHDL compiler/checker + +call ale#Set('vhdl_xvhdl_executable', 'xvhdl') +" Use VHDL-2008. See `$ xvhdl -h` for more options +call ale#Set('vhdl_xvhdl_options', '--2008') + +function! ale_linters#vhdl#xvhdl#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'vhdl_xvhdl_options')) . ' %t' +endfunction + +function! ale_linters#vhdl#xvhdl#Handle(buffer, lines) abort + "Matches patterns like the following: + " ERROR: [VRFC 10-91] aresetn is not declared [/path/to/file.vhd:17] + " ERROR: [VRFC 10-91] m_axis_tx_tdata is not declared [/home/user/tx_data.vhd:128] + let l:pattern = '^ERROR:\s\+\(\[.*\)\[.*:\([0-9]\+\)\]' + let l:output = [] + + " NOTE: `xvhdl` only prints 'INFO' and 'ERROR' messages + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[2] + 0, + \ 'type': 'E', + \ 'text': l:match[1], + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('vhdl', { +\ 'name': 'xvhdl', +\ 'output_stream': 'stdout', +\ 'executable': {b -> ale#Var(b, 'vhdl_xvhdl_executable')}, +\ 'command': function('ale_linters#vhdl#xvhdl#GetCommand'), +\ 'callback': 'ale_linters#vhdl#xvhdl#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vim/ale_custom_linting_rules.vim b/dot_vim/plugged/ale/ale_linters/vim/ale_custom_linting_rules.vim new file mode 100644 index 0000000..5ca2f14 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vim/ale_custom_linting_rules.vim @@ -0,0 +1,70 @@ +" Author: w0rp +" Description: A linter for checking ALE project code itself. + +function! ale_linters#vim#ale_custom_linting_rules#GetExecutable(buffer) abort + let l:filename = expand('#' . a:buffer . ':p') + let l:dir_list = [] + + for l:dir in split(&runtimepath, ',') + if l:filename[:len(l:dir) - 1] is# l:dir + call add(l:dir_list, l:dir) + endif + endfor + + return !empty(l:dir_list) + \ ? findfile('test/script/custom-linting-rules', join(l:dir_list, ',')) + \ : '' +endfunction + +function! s:GetALEProjectDir(buffer) abort + let l:executable = ale_linters#vim#ale_custom_linting_rules#GetExecutable(a:buffer) + + return ale#path#Dirname(ale#path#Dirname(ale#path#Dirname(l:executable))) +endfunction + +function! ale_linters#vim#ale_custom_linting_rules#GetCwd(buffer) abort + let l:executable = ale_linters#vim#ale_custom_linting_rules#GetExecutable(a:buffer) + + return ale#path#Dirname(ale#path#Dirname(ale#path#Dirname(l:executable))) +endfunction + +function! ale_linters#vim#ale_custom_linting_rules#GetCommand(buffer) abort + let l:temp_dir = ale#command#CreateDirectory(a:buffer) + let l:temp_file = l:temp_dir . '/example.vim' + + let l:lines = getbufline(a:buffer, 1, '$') + call ale#util#Writefile(a:buffer, l:lines, l:temp_file) + + return '%e ' . ale#Escape(l:temp_dir) +endfunction + +function! ale_linters#vim#ale_custom_linting_rules#Handle(buffer, lines) abort + let l:dir = s:GetALEProjectDir(a:buffer) + let l:output = [] + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+) (.+)$' + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " Ignore trailing whitespace errors if we've turned them off. + if !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + \&& l:match[3] is# 'Trailing whitespace' + continue + endif + + call add(l:output, { + \ 'lnum': l:match[2], + \ 'text': l:match[3], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +call ale#linter#Define('vim', { +\ 'name': 'ale_custom_linting_rules', +\ 'executable': function('ale_linters#vim#ale_custom_linting_rules#GetExecutable'), +\ 'cwd': function('ale_linters#vim#ale_custom_linting_rules#GetCwd'), +\ 'command': function('ale_linters#vim#ale_custom_linting_rules#GetCommand'), +\ 'callback': 'ale_linters#vim#ale_custom_linting_rules#Handle', +\ 'read_buffer': 0, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vim/vimls.vim b/dot_vim/plugged/ale/ale_linters/vim/vimls.vim new file mode 100644 index 0000000..7003eb0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vim/vimls.vim @@ -0,0 +1,61 @@ +" Author: Jeffrey Lau - https://github.com/zoonfafer +" Description: Vim Language Server integration for ALE + +call ale#Set('vim_vimls_executable', 'vim-language-server') +call ale#Set('vim_vimls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('vim_vimls_config', {}) + +function! ale_linters#vim#vimls#GetProjectRoot(buffer) abort + let l:trigger_file_candidates = [ + \ '.vimrc', + \ 'init.vim', + \] + + for l:candidate in l:trigger_file_candidates + let l:trigger_file = fnamemodify(bufname(a:buffer), ':t') + + if l:trigger_file is# l:candidate + return fnamemodify( + \ bufname(a:buffer), + \ ':h', + \) + endif + endfor + + let l:trigger_dir_candidates = [ + \ 'autoload', + \ 'plugin', + \ '.git', + \] + + let l:path_upwards = ale#path#Upwards(fnamemodify(bufname(a:buffer), ':p:h')) + + for l:path in l:path_upwards + for l:candidate in l:trigger_dir_candidates + let l:trigger_dir = ale#path#Simplify( + \ l:path . '/' . l:candidate, + \) + + if isdirectory(l:trigger_dir) + return fnamemodify( + \ l:trigger_dir, + \ ':p:h:h', + \) + endif + endfor + endfor + + return '' +endfunction + +call ale#linter#Define('vim', { +\ 'name': 'vimls', +\ 'lsp': 'stdio', +\ 'lsp_config': {b -> ale#Var(b, 'vim_vimls_config')}, +\ 'executable': {b -> ale#path#FindExecutable(b, 'vim_vimls', [ +\ 'node_modules/.bin/vim-language-server', +\ ])}, +\ 'command': '%e --stdio', +\ 'language': 'vim', +\ 'project_root': function('ale_linters#vim#vimls#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vim/vint.vim b/dot_vim/plugged/ale/ale_linters/vim/vint.vim new file mode 100644 index 0000000..f7054ff --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vim/vint.vim @@ -0,0 +1,65 @@ +" Author: w0rp , KabbAmine +" Description: This file adds support for checking Vim code with Vint. + +" This flag can be used to change enable/disable style issues. +call ale#Set('vim_vint_show_style_issues', 1) +call ale#Set('vim_vint_executable', 'vint') +let s:enable_neovim = has('nvim') ? ' --enable-neovim' : '' +let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {policy_name} - {description} (see {reference})"' + +function! ale_linters#vim#vint#GetCommand(buffer, version) abort + let l:can_use_no_color_flag = empty(a:version) + \ || ale#semver#GTE(a:version, [0, 3, 7]) + + let l:warning_flag = ale#Var(a:buffer, 'vim_vint_show_style_issues') ? '-s' : '-w' + + " Use the --stdin-display-name argument if supported, temp file otherwise. + let l:stdin_or_temp = ale#semver#GTE(a:version, [0, 4, 0]) + \ ? ' --stdin-display-name %s -' + \ : ' %t' + + return '%e' + \ . ' ' . l:warning_flag + \ . (l:can_use_no_color_flag ? ' --no-color' : '') + \ . s:enable_neovim + \ . ' ' . s:format + \ . l:stdin_or_temp +endfunction + +let s:word_regex_list = [ +\ '\v^Undefined variable: ([^ ]+)', +\ '\v^Make the scope explicit like ...([^ ]+). ', +\ '\v^.*start with a capital or contain a colon: ([^ ]+)', +\ '\v.*instead of .(\=[=~]).', +\] + +function! ale_linters#vim#vint#Handle(buffer, lines) abort + let l:loclist = ale#handlers#gcc#HandleGCCFormat(a:buffer, a:lines) + + for l:item in l:loclist + let l:match = [] + + for l:regex in s:word_regex_list + let l:match = matchlist(l:item.text, l:regex) + + if !empty(l:match) + let l:item.end_col = l:item.col + len(l:match[1]) - 1 + break + endif + endfor + endfor + + return l:loclist +endfunction + +call ale#linter#Define('vim', { +\ 'name': 'vint', +\ 'executable': {buffer -> ale#Var(buffer, 'vim_vint_executable')}, +\ 'command': {buffer -> ale#semver#RunWithVersionCheck( +\ buffer, +\ ale#Var(buffer, 'vim_vint_executable'), +\ '%e --version', +\ function('ale_linters#vim#vint#GetCommand'), +\ )}, +\ 'callback': 'ale_linters#vim#vint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vue/cspell.vim b/dot_vim/plugged/ale/ale_linters/vue/cspell.vim new file mode 100644 index 0000000..2d8bfdc --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vue/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for Vue files. + +call ale#handlers#cspell#DefineLinter('vue') diff --git a/dot_vim/plugged/ale/ale_linters/vue/vls.vim b/dot_vim/plugged/ale/ale_linters/vue/vls.vim new file mode 100644 index 0000000..4bd7528 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vue/vls.vim @@ -0,0 +1,22 @@ +" Author: Alexander Olofsson +" Description: Vue vls Language Server integration for ALE + +call ale#Set('vue_vls_executable', 'vls') +call ale#Set('vue_vls_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#vue#vls#GetProjectRoot(buffer) abort + let l:package_path = ale#path#FindNearestFile(a:buffer, 'package.json') + + return !empty(l:package_path) ? fnamemodify(l:package_path, ':h') : '' +endfunction + +call ale#linter#Define('vue', { +\ 'name': 'vls', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'vue_vls', [ +\ 'node_modules/.bin/vls', +\ ])}, +\ 'command': '%e --stdio', +\ 'language': 'vue', +\ 'project_root': function('ale_linters#vue#vls#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/vue/volar.vim b/dot_vim/plugged/ale/ale_linters/vue/volar.vim new file mode 100644 index 0000000..bb41b88 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/vue/volar.vim @@ -0,0 +1,80 @@ +" Author: Arnold Chand +" Description: Volar Language Server integration for ALE adopted from +" nvim-lspconfig and volar/packages/shared/src/types.ts + +call ale#Set('vue_volar_executable', 'vue-language-server') +call ale#Set('vue_volar_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('vue_volar_init_options', { +\ 'documentFeatures': { +\ 'documentColor': v:false, +\ 'documentFormatting': { +\ 'defaultPrintWidth': 100, +\ }, +\ 'documentSymbol': v:true, +\ 'foldingRange': v:true, +\ 'linkedEditingRange': v:true, +\ 'selectionRange': v:true, +\ }, +\ 'languageFeatures': { +\ 'callHierarchy': v:true, +\ 'codeAction': v:true, +\ 'codeLens': v:true, +\ 'completion': { +\ 'defaultAttrNameCase': 'kebabCase', +\ 'defaultTagNameCase': 'both', +\ 'getDocumentNameCaseRequest': v:false, +\ 'getDocumentSelectionRequest': v:false, +\ }, +\ 'definition': v:true, +\ 'diagnostics': v:true, +\ 'documentHighlight': v:true, +\ 'documentLink': v:true, +\ 'hover': v:true, +\ 'references': v:true, +\ 'rename': v:true, +\ 'renameFileRefactoring': v:true, +\ 'schemaRequestService': v:true, +\ 'semanticTokens': v:false, +\ 'signatureHelp': v:true, +\ 'typeDefinition': v:true, +\ 'workspaceSymbol': v:false, +\ }, +\ 'typescript': { +\ 'serverPath': '', +\ 'localizedPath': v:null, +\ }, +\}) + +function! ale_linters#vue#volar#GetProjectRoot(buffer) abort + let l:project_roots = ['package.json', 'vite.config.js', '.git', bufname(a:buffer)] + + for l:project_root in l:project_roots + let l:nearest_filepath = ale#path#FindNearestFile(a:buffer, l:project_root) + + if !empty(l:nearest_filepath) + return fnamemodify(l:nearest_filepath, ':h') + endif + endfor + + return '' +endfunction + +function! ale_linters#vue#volar#GetInitializationOptions(buffer) abort + let l:tsserver_path = ale#path#FindNearestExecutable(a:buffer, [ + \ 'node_modules/typescript/lib/tsserverlibrary.js' + \ ]) + let l:init_options = ale#Var(a:buffer, 'vue_volar_init_options') + let l:init_options.typescript.serverPath = l:tsserver_path + + return l:init_options +endfunction + +call ale#linter#Define('vue', { +\ 'name': 'volar', +\ 'language': 'vue', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#path#FindExecutable(b, 'vue_volar', ['node_modules/.bin/vue-language-server'])}, +\ 'command': '%e --stdio', +\ 'project_root': function('ale_linters#vue#volar#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#vue#volar#GetInitializationOptions'), +\}) diff --git a/dot_vim/plugged/ale/ale_linters/wgsl/naga.vim b/dot_vim/plugged/ale/ale_linters/wgsl/naga.vim new file mode 100644 index 0000000..2816751 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/wgsl/naga.vim @@ -0,0 +1,12 @@ +" Author: rhysd +" Description: naga-cli linter for WGSL syntax. + +call ale#Set('wgsl_naga_executable', 'naga') + +call ale#linter#Define('wgsl', { +\ 'name': 'naga', +\ 'executable': {b -> ale#Var(b, 'wgsl_naga_executable')}, +\ 'output_stream': 'stderr', +\ 'command': {b -> '%e --stdin-file-path %s'}, +\ 'callback': 'ale#handlers#naga#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/xhtml/alex.vim b/dot_vim/plugged/ale/ale_linters/xhtml/alex.vim new file mode 100644 index 0000000..97f3b59 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/xhtml/alex.vim @@ -0,0 +1,4 @@ +" Author: Johannes Wienke +" Description: alex for XHTML files + +call ale#handlers#alex#DefineLinter('xhtml', '--text') diff --git a/dot_vim/plugged/ale/ale_linters/xhtml/cspell.vim b/dot_vim/plugged/ale/ale_linters/xhtml/cspell.vim new file mode 100644 index 0000000..c465b41 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/xhtml/cspell.vim @@ -0,0 +1,5 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: cspell support for XHTML files. + +call ale#handlers#cspell#DefineLinter('xhtml') diff --git a/dot_vim/plugged/ale/ale_linters/xhtml/proselint.vim b/dot_vim/plugged/ale/ale_linters/xhtml/proselint.vim new file mode 100644 index 0000000..dfad921 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/xhtml/proselint.vim @@ -0,0 +1,9 @@ +" Author: Daniel M. Capella https://github.com/polyzen +" Description: proselint for XHTML files + +call ale#linter#Define('xhtml', { +\ 'name': 'proselint', +\ 'executable': 'proselint', +\ 'command': 'proselint %t', +\ 'callback': 'ale#handlers#unix#HandleAsWarning', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/xhtml/writegood.vim b/dot_vim/plugged/ale/ale_linters/xhtml/writegood.vim new file mode 100644 index 0000000..1fcba18 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/xhtml/writegood.vim @@ -0,0 +1,4 @@ +" Author: Sumner Evans +" Description: write-good for XHTML files + +call ale#handlers#writegood#DefineLinter('xhtml') diff --git a/dot_vim/plugged/ale/ale_linters/xml/xmllint.vim b/dot_vim/plugged/ale/ale_linters/xml/xmllint.vim new file mode 100644 index 0000000..553d088 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/xml/xmllint.vim @@ -0,0 +1,65 @@ +" Author: q12321q +" Description: This file adds support for checking XML code with xmllint. + +" CLI options +let g:ale_xml_xmllint_executable = get(g:, 'ale_xml_xmllint_executable', 'xmllint') +let g:ale_xml_xmllint_options = get(g:, 'ale_xml_xmllint_options', '') + +function! ale_linters#xml#xmllint#GetCommand(buffer) abort + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'xml_xmllint_options')) + \ . ' --noout -' +endfunction + +function! ale_linters#xml#xmllint#Handle(buffer, lines) abort + " Matches patterns lines like the following: + " file/path:123: error level : error message + let l:pattern_message = '\v^([^:]+):(\d+):\s*(([^:]+)\s*:\s+.*)$' + + " parse column token line like that: + " file/path:123: parser error : Opening and ending tag mismatch: foo line 1 and bar + " + " ^ + let l:pattern_column_token = '\v^\s*\^$' + + let l:output = [] + + for l:line in a:lines + " Parse error/warning lines + let l:match_message = matchlist(l:line, l:pattern_message) + + if !empty(l:match_message) + let l:line = l:match_message[2] + 0 + let l:type = l:match_message[4] =~? 'warning' ? 'W' : 'E' + let l:text = l:match_message[3] + + call add(l:output, { + \ 'lnum': l:line, + \ 'text': l:text, + \ 'type': l:type, + \}) + + continue + endif + + " Parse column position + let l:match_column_token = matchlist(l:line, l:pattern_column_token) + + if !empty(l:output) && !empty(l:match_column_token) + let l:previous = l:output[len(l:output) - 1] + let l:previous['col'] = len(l:match_column_token[0]) + + continue + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('xml', { +\ 'name': 'xmllint', +\ 'output_stream': 'stderr', +\ 'executable': {b -> ale#Var(b, 'xml_xmllint_executable')}, +\ 'command': function('ale_linters#xml#xmllint#GetCommand'), +\ 'callback': 'ale_linters#xml#xmllint#Handle', +\ }) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/actionlint.vim b/dot_vim/plugged/ale/ale_linters/yaml/actionlint.vim new file mode 100644 index 0000000..1e2fda4 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/actionlint.vim @@ -0,0 +1,11 @@ +" Author: bretello + +call ale#Set('yaml_actionlint_executable', 'actionlint') +call ale#Set('yaml_actionlint_options', '') + +call ale#linter#Define('yaml', { +\ 'name': 'actionlint', +\ 'executable': {b -> ale#Var(b, 'yaml_actionlint_executable')}, +\ 'command': function('ale#handlers#actionlint#GetCommand'), +\ 'callback': 'ale#handlers#actionlint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/circleci.vim b/dot_vim/plugged/ale/ale_linters/yaml/circleci.vim new file mode 100644 index 0000000..2083545 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/circleci.vim @@ -0,0 +1,35 @@ +function! ale_linters#yaml#circleci#Handle(buffer, lines) abort + let l:match_index = -1 + let l:output = [] + + for l:index in range(len(a:lines)) + let l:line = a:lines[l:index] + + if l:line =~? 'Error: ERROR IN CONFIG FILE:' + let l:match_index = l:index + 1 + break + endif + endfor + + if l:match_index > 0 + return [{ + \ 'type': 'E', + \ 'lnum': 1, + \ 'text': a:lines[l:match_index], + \ 'detail': join(a:lines[l:match_index :], "\n"), + \}] + endif + + return [] +endfunction + +" The circleci validate requires network requests, so we'll only run it when +" files are saved to prevent the server from being hammered. +call ale#linter#Define('yaml', { +\ 'name': 'circleci', +\ 'executable': {b -> expand('#' . b . ':p') =~? '\.circleci' ? 'circleci' : ''}, +\ 'command': 'circleci --skip-update-check config validate - < %s', +\ 'callback': 'ale_linters#yaml#circleci#Handle', +\ 'output_stream': 'stderr', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/gitlablint.vim b/dot_vim/plugged/ale/ale_linters/yaml/gitlablint.vim new file mode 100644 index 0000000..ec48115 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/gitlablint.vim @@ -0,0 +1,49 @@ +call ale#Set('yaml_gitlablint_executable', 'gll') +call ale#Set('yaml_gitlablint_options', '') + +function! ale_linters#yaml#gitlablint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'yaml_gitlablint_options')) + \ . ' -p %t' +endfunction + +function! ale_linters#yaml#gitlablint#Handle(buffer, lines) abort + " Matches patterns line the following: + " (): mapping values are not allowed in this context at line 68 column 8 + " jobs:build:dev config contains unknown keys: ony + let l:pattern = '^\(.*\) at line \(\d\+\) column \(\d\+\)$' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if !empty(l:match) + let l:item = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[1], + \ 'type': 'E', + \} + call add(l:output, l:item) + else + if l:line isnot# 'GitLab CI configuration is invalid' + let l:item = { + \ 'lnum': 0, + \ 'col': 0, + \ 'text': l:line, + \ 'type': 'E', + \} + call add(l:output, l:item) + endif + endif + endfor + + return l:output +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'gitlablint', +\ 'executable': {b -> ale#Var(b, 'yaml_gitlablint_executable')}, +\ 'command': function('ale_linters#yaml#gitlablint#GetCommand'), +\ 'callback': 'ale_linters#yaml#gitlablint#Handle', +\ 'output_stream': 'stderr', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/ls.vim b/dot_vim/plugged/ale/ale_linters/yaml/ls.vim new file mode 100644 index 0000000..8e3f6d0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/ls.vim @@ -0,0 +1,34 @@ +" Author: Jeffrey Lau - https://github.com/zoonfafer +" Description: YAML Language Server https://github.com/redhat-developer/yaml-language-server + +call ale#Set('yaml_ls_executable', 'yaml-language-server') +call ale#Set('yaml_ls_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('yaml_ls_config', {}) + +function! ale_linters#yaml#ls#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'yaml_ls', [ + \ 'node_modules/.bin/yaml-language-server', + \]) +endfunction + +function! ale_linters#yaml#ls#GetCommand(buffer) abort + let l:executable = ale_linters#yaml#ls#GetExecutable(a:buffer) + + return ale#Escape(l:executable) . ' --stdio' +endfunction + +" Just use the current file +function! ale_linters#yaml#ls#FindProjectRoot(buffer) abort + let l:project_file = expand('#' . a:buffer . ':p') + + return fnamemodify(l:project_file, ':h') +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'yaml-language-server', +\ 'lsp': 'stdio', +\ 'executable': function('ale_linters#yaml#ls#GetExecutable'), +\ 'command': function('ale_linters#yaml#ls#GetCommand'), +\ 'project_root': function('ale_linters#yaml#ls#FindProjectRoot'), +\ 'lsp_config': {b -> ale#Var(b, 'yaml_ls_config')}, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/spectral.vim b/dot_vim/plugged/ale/ale_linters/yaml/spectral.vim new file mode 100644 index 0000000..13654f0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/spectral.vim @@ -0,0 +1,14 @@ +" Author: t2h5 +" Description: Integration of Stoplight Spectral CLI with ALE. + +call ale#Set('yaml_spectral_executable', 'spectral') +call ale#Set('yaml_spectral_use_global', get(g:, 'ale_use_global_executables', 0)) + +call ale#linter#Define('yaml', { +\ 'name': 'spectral', +\ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_spectral', [ +\ 'node_modules/.bin/spectral', +\ ])}, +\ 'command': '%e lint --ignore-unknown-format -q -f text %t', +\ 'callback': 'ale#handlers#spectral#HandleSpectralOutput' +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/swaglint.vim b/dot_vim/plugged/ale/ale_linters/yaml/swaglint.vim new file mode 100644 index 0000000..7fc2b43 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/swaglint.vim @@ -0,0 +1,40 @@ +" Author: Matthew Turland +" Description: This file adds support for linting Swagger / OpenAPI documents using swaglint + +call ale#Set('yaml_swaglint_executable', 'swaglint') +call ale#Set('yaml_swaglint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale_linters#yaml#swaglint#Handle(buffer, lines) abort + let l:pattern = ': \([^\s]\+\) @ \(\d\+\):\(\d\+\) - \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:obj = { + \ 'type': l:match[1] is# 'error' ? 'E' : 'W', + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \} + + " Parse the code if it's there. + let l:code_match = matchlist(l:obj.text, '\v^(.+) \(([^ (]+)\)$') + + if !empty(l:code_match) + let l:obj.text = l:code_match[1] + let l:obj.code = l:code_match[2] + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'swaglint', +\ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_swaglint', [ +\ 'node_modules/.bin/swaglint', +\ ])}, +\ 'command': '%e -r compact --stdin', +\ 'callback': 'ale_linters#yaml#swaglint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yaml/yamllint.vim b/dot_vim/plugged/ale/ale_linters/yaml/yamllint.vim new file mode 100644 index 0000000..39011df --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yaml/yamllint.vim @@ -0,0 +1,11 @@ +" Author: KabbAmine + +call ale#Set('yaml_yamllint_executable', 'yamllint') +call ale#Set('yaml_yamllint_options', '') + +call ale#linter#Define('yaml', { +\ 'name': 'yamllint', +\ 'executable': {b -> ale#Var(b, 'yaml_yamllint_executable')}, +\ 'command': function('ale#handlers#yamllint#GetCommand'), +\ 'callback': 'ale#handlers#yamllint#Handle', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/yang/yang_lsp.vim b/dot_vim/plugged/ale/ale_linters/yang/yang_lsp.vim new file mode 100644 index 0000000..81fcaa0 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/yang/yang_lsp.vim @@ -0,0 +1,15 @@ +call ale#Set('yang_lsp_executable', 'yang-language-server') + +function! ale_linters#yang#yang_lsp#GetProjectRoot(buffer) abort + let l:project_root = ale#path#FindNearestFile(a:buffer, 'yang.settings') + + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' +endfunction + +call ale#linter#Define('yang', { +\ 'name': 'yang_lsp', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'yang_lsp_executable')}, +\ 'project_root': function('ale_linters#yang#yang_lsp#GetProjectRoot'), +\ 'command': '%e', +\}) diff --git a/dot_vim/plugged/ale/ale_linters/zeek/zeek.vim b/dot_vim/plugged/ale/ale_linters/zeek/zeek.vim new file mode 100644 index 0000000..e976d75 --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/zeek/zeek.vim @@ -0,0 +1,22 @@ +" Author: Benjamin Bannier +" Description: Support for checking Zeek files. +" +call ale#Set('zeek_zeek_executable', 'zeek') + +function! ale_linters#zeek#zeek#HandleErrors(buffer, lines) abort + let l:pattern = 'error in \v.*, line (\d+): (.*)$' + + return map(ale#util#GetMatches(a:lines, l:pattern), "{ + \ 'lnum': str2nr(v:val[1]), + \ 'text': v:val[2], + \}") +endfunction + +call ale#linter#Define('zeek', { +\ 'name': 'zeek', +\ 'executable': {b -> ale#Var(b, 'zeek_zeek_executable')}, +\ 'output_stream': 'stderr', +\ 'command': {-> '%e --parse-only %s'}, +\ 'callback': 'ale_linters#zeek#zeek#HandleErrors', +\ 'lint_file': 1, +\}) diff --git a/dot_vim/plugged/ale/ale_linters/zig/zls.vim b/dot_vim/plugged/ale/ale_linters/zig/zls.vim new file mode 100644 index 0000000..1390f6b --- /dev/null +++ b/dot_vim/plugged/ale/ale_linters/zig/zls.vim @@ -0,0 +1,20 @@ +" Author: CherryMan +" Description: A language server for Zig + +call ale#Set('zig_zls_executable', 'zls') +call ale#Set('zig_zls_config', {}) + +function! ale_linters#zig#zls#GetProjectRoot(buffer) abort + let l:build_rs = ale#path#FindNearestFile(a:buffer, 'build.zig') + + return !empty(l:build_rs) ? fnamemodify(l:build_rs, ':h') : '' +endfunction + +call ale#linter#Define('zig', { +\ 'name': 'zls', +\ 'lsp': 'stdio', +\ 'lsp_config': {b -> ale#Var(b, 'zig_zls_config')}, +\ 'executable': {b -> ale#Var(b, 'zig_zls_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#zig#zls#GetProjectRoot'), +\}) diff --git a/dot_vim/plugged/ale/autoload/ale.vim b/dot_vim/plugged/ale/autoload/ale.vim new file mode 100644 index 0000000..2331591 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale.vim @@ -0,0 +1,285 @@ +" Author: w0rp , David Alexander +" Description: Primary code path for the plugin +" Manages execution of linters when requested by autocommands + +" Strings used for severity in the echoed message +let g:ale_echo_msg_error_str = get(g:, 'ale_echo_msg_error_str', 'Error') +let g:ale_echo_msg_info_str = get(g:, 'ale_echo_msg_info_str', 'Info') +let g:ale_echo_msg_log_str = get(g:, 'ale_echo_msg_log_str', 'Log') +let g:ale_echo_msg_warning_str = get(g:, 'ale_echo_msg_warning_str', 'Warning') +" Ignoring linters, for disabling some, or ignoring LSP diagnostics. +let g:ale_linters_ignore = get(g:, 'ale_linters_ignore', {}) +let g:ale_disable_lsp = get(g:, 'ale_disable_lsp', 0) + +" LSP window/showMessage format +let g:ale_lsp_show_message_format = get(g:, 'ale_lsp_show_message_format', '%severity%:%linter%: %s') +" Valid values mimic LSP definitions (error, warning and information; log is +" never shown) +let g:ale_lsp_show_message_severity = get(g:, 'ale_lsp_show_message_severity', 'error') + +let s:lint_timer = -1 +let s:getcmdwintype_exists = exists('*getcmdwintype') + +" Return 1 if a file is too large for ALE to handle. +function! ale#FileTooLarge(buffer) abort + let l:max = getbufvar(a:buffer, 'ale_maximum_file_size', get(g:, 'ale_maximum_file_size', 0)) + + return l:max > 0 ? (line2byte(line('$') + 1) > l:max) : 0 +endfunction + +" A function for checking various conditions whereby ALE just shouldn't +" attempt to do anything, say if particular buffer types are open in Vim. +function! ale#ShouldDoNothing(buffer) abort + " The checks are split into separate if statements to make it possible to + " profile each check individually with Vim's profiling tools. + " + " Do nothing if ALE is disabled. + if !getbufvar(a:buffer, 'ale_enabled', get(g:, 'ale_enabled', 0)) + return 1 + endif + + " Don't perform any checks when newer NeoVim versions are exiting. + if get(v:, 'exiting', v:null) isnot v:null + return 1 + endif + + let l:filetype = getbufvar(a:buffer, '&filetype') + + " Do nothing when there's no filetype. + if l:filetype is# '' + return 1 + endif + + " Do nothing for diff buffers. + if getbufvar(a:buffer, '&diff') + return 1 + endif + + " Do nothing for blacklisted files. + if index(get(g:, 'ale_filetype_blacklist', []), l:filetype) >= 0 + return 1 + endif + + " Do nothing if running from command mode. + if s:getcmdwintype_exists && !empty(getcmdwintype()) + return 1 + endif + + let l:filename = fnamemodify(bufname(a:buffer), ':t') + + " Do nothing for directories. + if l:filename is# '.' + return 1 + endif + + " Don't start linting and so on when an operator is pending. + if ale#util#Mode(1) is# 'no' + return 1 + endif + + " Do nothing if running in the sandbox. + if ale#util#InSandbox() + return 1 + endif + + " Do nothing if the file is too large. + if ale#FileTooLarge(a:buffer) + return 1 + endif + + " Do nothing from CtrlP buffers with CtrlP-funky. + if exists(':CtrlPFunky') is 2 + \&& getbufvar(a:buffer, '&l:statusline') =~# 'CtrlPMode.*funky' + return 1 + endif + + return 0 +endfunction + +function! s:Lint(buffer, should_lint_file, timer_id) abort + " Use the filetype from the buffer + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:linters = ale#linter#Get(l:filetype) + let l:linters = ale#linter#RemoveIgnored(a:buffer, l:filetype, l:linters) + + " Tell other sources that they can start checking the buffer now. + let g:ale_want_results_buffer = a:buffer + silent doautocmd User ALEWantResults + unlet! g:ale_want_results_buffer + + " Don't set up buffer data and so on if there are no linters to run. + if !has_key(g:ale_buffer_info, a:buffer) && empty(l:linters) + return + endif + + " Clear lint_file linters, or only run them if the file exists. + let l:lint_file = empty(l:linters) + \ || (a:should_lint_file && filereadable(expand('#' . a:buffer . ':p'))) + + call ale#engine#RunLinters(a:buffer, l:linters, l:lint_file) +endfunction + +" (delay, [linting_flag, buffer_number]) +function! ale#Queue(delay, ...) abort + if a:0 > 2 + throw 'too many arguments!' + endif + + let l:buffer = get(a:000, 1, v:null) + + if l:buffer is v:null + let l:buffer = bufnr('') + endif + + if type(l:buffer) isnot v:t_number + throw 'buffer_number must be a Number' + endif + + if ale#ShouldDoNothing(l:buffer) + return + endif + + " Default linting_flag to '' + let l:should_lint_file = get(a:000, 0) is# 'lint_file' + + if s:lint_timer != -1 + call timer_stop(s:lint_timer) + let s:lint_timer = -1 + endif + + if a:delay > 0 + let s:lint_timer = timer_start( + \ a:delay, + \ function('s:Lint', [l:buffer, l:should_lint_file]) + \) + else + call s:Lint(l:buffer, l:should_lint_file, 0) + endif +endfunction + +let s:current_ale_version = [3, 3, 0] + +" A function used to check for ALE features in files outside of the project. +function! ale#Has(feature) abort + let l:match = matchlist(a:feature, '\c\v^ale-(\d+)\.(\d+)(\.(\d+))?$') + + if !empty(l:match) + let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[4] + 0] + + return ale#semver#GTE(s:current_ale_version, l:version) + endif + + return 0 +endfunction + +" Given a buffer number and a variable name, look for that variable in the +" buffer scope, then in global scope. If the name does not exist in the global +" scope, an exception will be thrown. +" +" Every variable name will be prefixed with 'ale_'. +function! ale#Var(buffer, variable_name) abort + let l:full_name = 'ale_' . a:variable_name + let l:vars = getbufvar(str2nr(a:buffer), '', {}) + + return get(l:vars, l:full_name, g:[l:full_name]) +endfunction + +" Initialize a variable with a default value, if it isn't already set. +" +" Every variable name will be prefixed with 'ale_'. +function! ale#Set(variable_name, default) abort + let l:full_name = 'ale_' . a:variable_name + + if !has_key(g:, l:full_name) + let g:[l:full_name] = a:default + endif +endfunction + +" Given a string for adding to a command, return the string padded with a +" space on the left if it is not empty. Otherwise return an empty string. +" +" This can be used for making command strings cleaner and easier to test. +function! ale#Pad(string) abort + return !empty(a:string) ? ' ' . a:string : '' +endfunction + +" Given a environment variable name and a value, produce part of a command for +" setting an environment variable before running a command. The syntax will be +" valid for cmd on Windows, or most shells on Unix. +function! ale#Env(variable_name, value) abort + if has('win32') + return 'set ' . a:variable_name . '=' . ale#Escape(a:value) . ' && ' + endif + + return a:variable_name . '=' . ale#Escape(a:value) . ' ' +endfunction + +" Escape a string suitably for each platform. +" shellescape does not work on Windows. +function! ale#Escape(str) abort + if fnamemodify(&shell, ':t') is? 'cmd.exe' + " If the string contains spaces, it will be surrounded by quotes. + " Otherwise, special characters will be escaped with carets (^). + return substitute( + \ a:str =~# ' ' + \ ? '"' . substitute(a:str, '"', '""', 'g') . '"' + \ : substitute(a:str, '\v([&|<>^])', '^\1', 'g'), + \ '%', + \ '%%', + \ 'g', + \) + endif + + return shellescape (a:str) +endfunction + +" Get the loclist item message according to a given format string. +" +" See `:help g:ale_loclist_msg_format` and `:help g:ale_echo_msg_format` +function! ale#GetLocItemMessage(item, format_string) abort + let l:msg = a:format_string + let l:severity = g:ale_echo_msg_warning_str + let l:code = get(a:item, 'code', '') + let l:type = get(a:item, 'type', 'E') + let l:linter_name = get(a:item, 'linter_name', '') + let l:code_repl = !empty(l:code) ? '\=submatch(1) . l:code . submatch(2)' : '' + + if l:type is# 'E' + let l:severity = g:ale_echo_msg_error_str + elseif l:type is# 'I' + let l:severity = g:ale_echo_msg_info_str + endif + + " Replace special markers with certain information. + " \=l:variable is used to avoid escaping issues. + let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') + let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g') + let l:msg = substitute(l:msg, '\V%type%', '\=l:type', 'g') + let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g') + " Replace %s with the text. + let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g') + " Windows may insert carriage return line endings (^M), strip these characters. + let l:msg = substitute(l:msg, '\r', '', 'g') + + return l:msg +endfunction + +" Given a buffer and a linter or fixer name, return an Array of two-item +" Arrays describing how to map filenames to and from the local to foreign file +" systems. +function! ale#GetFilenameMappings(buffer, name) abort + let l:linter_mappings = ale#Var(a:buffer, 'filename_mappings') + + if type(l:linter_mappings) is v:t_list + return l:linter_mappings + endif + + let l:name = a:name + + if !has_key(l:linter_mappings, l:name) + " Use * as a default setting for all tools. + let l:name = '*' + endif + + return get(l:linter_mappings, l:name, []) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/ant.vim b/dot_vim/plugged/ale/autoload/ale/ant.vim new file mode 100644 index 0000000..b6d4217 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/ant.vim @@ -0,0 +1,45 @@ +" Author: Andrew Lee . +" Inspired by ale/gradle.vim by Michael Pardo +" Description: Functions for working with Ant projects. + +" Given a buffer number, find an Ant project root +function! ale#ant#FindProjectRoot(buffer) abort + let l:build_xml_path = ale#path#FindNearestFile(a:buffer, 'build.xml') + + if !empty(l:build_xml_path) + return fnamemodify(l:build_xml_path, ':h') + endif + + return '' +endfunction + +" Given a buffer number, find the path to the `ant` executable. Returns an empty +" string if cannot find the executable. +function! ale#ant#FindExecutable(buffer) abort + if executable('ant') + return 'ant' + endif + + return '' +endfunction + +" Given a buffer number, get a working directory and command to print the +" classpath of the root project. +" +" Returns an empty string for the command if Ant is not detected. +function! ale#ant#BuildClasspathCommand(buffer) abort + let l:executable = ale#ant#FindExecutable(a:buffer) + + if !empty(l:executable) + let l:project_root = ale#ant#FindProjectRoot(a:buffer) + + if !empty(l:project_root) + return [ + \ l:project_root, + \ ale#Escape(l:executable) .' classpath -S -q' + \] + endif + endif + + return ['', ''] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/args.vim b/dot_vim/plugged/ale/autoload/ale/args.vim new file mode 100644 index 0000000..70afb2e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/args.vim @@ -0,0 +1,43 @@ +" Author: w0rp +" Description: This module implements a function for parsing arguments for +" commands. + +" Given a list of valid arguments like ['foo', 'bar'] and a string to parse, +" parse the arguments from the string and return [parsed_args, remainder]. +" +" Arguments must be prefixed in the string with a single minus (-), and a +" double minus (--) denotes the end of arguments. +function! ale#args#Parse(arg_list, string) abort + let l:parsed = {} + let l:end_of_args = 0 + let l:word_list = split(a:string, ' ') + let l:index = 0 + + while l:index < len(l:word_list) + let l:word = l:word_list[l:index] + + if l:word[:0] is# '-' + let l:index += 1 + + if l:word is# '--' + break + endif + + let l:arg = l:word[1:] + + if index(a:arg_list, l:arg) >= 0 + let l:parsed[l:arg] = '' + else + throw 'Invalid argument: ' . l:word + endif + elseif l:word is# '' + let l:index += 1 + else + break + endif + endwhile + + let l:new_string = join(l:word_list[l:index :], ' ') + + return [l:parsed, l:new_string] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/assert.vim b/dot_vim/plugged/ale/autoload/ale/assert.vim new file mode 100644 index 0000000..141cd0f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/assert.vim @@ -0,0 +1,424 @@ +let s:command_output = [] + +function! ale#assert#GivenCommandOutput(...) abort + let s:command_output = a:000 +endfunction + +function! s:GetLinter() abort + let l:linters = ale#linter#GetLintersLoaded() + let l:filetype_linters = get(values(l:linters), 0, []) + + if len(l:linters) is 0 || len(l:filetype_linters) is 0 + throw 'No linters were loaded' + endif + + if len(l:linters) > 1 || len(l:filetype_linters) > 1 + throw 'More than one linter was loaded' + endif + + return l:filetype_linters[0] +endfunction + +function! s:FormatExe(command, executable) abort + return substitute(a:command, '%e', '\=ale#Escape(a:executable)', 'g') +endfunction + +function! s:ProcessDeferredCommands(initial_result) abort + let l:result = a:initial_result + let l:command_index = 0 + let l:command = [] + + while ale#command#IsDeferred(l:result) + call add(l:command, s:FormatExe(l:result.command, l:result.executable)) + + if get(g:, 'ale_run_synchronously_emulate_commands') + " Don't run commands, but simulate the results. + let l:Callback = g:ale_run_synchronously_callbacks[0] + let l:output = get(s:command_output, l:command_index, []) + call l:Callback(0, l:output) + unlet g:ale_run_synchronously_callbacks + + let l:command_index += 1 + else + " Run the commands in the shell, synchronously. + call ale#test#FlushJobs() + endif + + let l:result = l:result.value + endwhile + + call add(l:command, l:result) + + return l:command +endfunction + +function! s:ProcessDeferredCwds(initial_command, initial_cwd) abort + let l:result = a:initial_command + let l:last_cwd = v:null + let l:command_index = 0 + let l:cwd_list = [] + + while ale#command#IsDeferred(l:result) + call add(l:cwd_list, l:result.cwd) + + if get(g:, 'ale_run_synchronously_emulate_commands') + " Don't run commands, but simulate the results. + let l:Callback = g:ale_run_synchronously_callbacks[0] + let l:output = get(s:command_output, l:command_index, []) + call l:Callback(0, l:output) + unlet g:ale_run_synchronously_callbacks + + let l:command_index += 1 + else + " Run the commands in the shell, synchronously. + call ale#test#FlushJobs() + endif + + let l:result = l:result.value + endwhile + + call add(l:cwd_list, a:initial_cwd is v:null ? l:last_cwd : a:initial_cwd) + + return l:cwd_list +endfunction + +" Load the currently loaded linter for a test case, and check that the command +" matches the given string. +function! ale#assert#Linter(expected_executable, expected_command) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:executable = ale#linter#GetExecutable(l:buffer, l:linter) + + while ale#command#IsDeferred(l:executable) + call ale#test#FlushJobs() + let l:executable = l:executable.value + endwhile + + let l:command = s:ProcessDeferredCommands( + \ ale#linter#GetCommand(l:buffer, l:linter), + \) + + if type(a:expected_command) isnot v:t_list + let l:command = l:command[-1] + endif + + if type(l:command) is v:t_string + " Replace %e with the escaped executable, so tests keep passing after + " linters are changed to use %e. + let l:command = s:FormatExe(l:command, l:executable) + elseif type(l:command) is v:t_list + call map(l:command, 's:FormatExe(v:val, l:executable)') + endif + + AssertEqual + \ [a:expected_executable, a:expected_command], + \ [l:executable, l:command] +endfunction + +function! ale#assert#LinterCwd(expected_cwd) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + + let l:initial_cwd = ale#linter#GetCwd(l:buffer, l:linter) + call ale#command#SetCwd(l:buffer, l:initial_cwd) + + let l:cwd = s:ProcessDeferredCwds( + \ ale#linter#GetCommand(l:buffer, l:linter), + \ l:initial_cwd, + \) + + call ale#command#ResetCwd(l:buffer) + + if type(a:expected_cwd) isnot v:t_list + let l:cwd = l:cwd[-1] + endif + + AssertEqual a:expected_cwd, l:cwd +endfunction + +function! ale#assert#FixerCwd(expected_cwd) abort + let l:buffer = bufnr('') + let l:cwd = s:ProcessDeferredCwds(s:FixerFunction(l:buffer), v:null) + + if type(a:expected_cwd) isnot v:t_list + let l:cwd = l:cwd[-1] + endif + + AssertEqual a:expected_cwd, l:cwd +endfunction + +function! ale#assert#Fixer(expected_result) abort + let l:buffer = bufnr('') + let l:result = s:ProcessDeferredCommands(s:FixerFunction(l:buffer)) + + if type(a:expected_result) isnot v:t_list + let l:result = l:result[-1] + endif + + AssertEqual a:expected_result, l:result +endfunction + +function! ale#assert#FixerNotExecuted() abort + let l:buffer = bufnr('') + let l:result = s:ProcessDeferredCommands(s:FixerFunction(l:buffer))[-1] + + Assert empty(l:result), "The fixer will be executed when it shouldn't be" +endfunction + +function! ale#assert#LinterNotExecuted() abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:executable = ale#linter#GetExecutable(l:buffer, l:linter) + let l:executed = 1 + + if !empty(l:executable) + let l:command = ale#linter#GetCommand(l:buffer, l:linter) + + if type(l:command) is v:t_list + let l:command = l:command[-1] + endif + + let l:executed = !empty(l:command) + else + let l:executed = 0 + endif + + Assert !l:executed, "The linter will be executed when it shouldn't be" +endfunction + +function! ale#assert#LSPOptions(expected_options) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:initialization_options = ale#lsp_linter#GetOptions(l:buffer, l:linter) + + AssertEqual a:expected_options, l:initialization_options +endfunction + +function! ale#assert#LSPConfig(expected_config) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:config = ale#lsp_linter#GetConfig(l:buffer, l:linter) + + AssertEqual a:expected_config, l:config +endfunction + +function! ale#assert#LSPLanguage(expected_language) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:language = ale#linter#GetLanguage(l:buffer, l:linter) + + AssertEqual a:expected_language, l:language +endfunction + +function! ale#assert#LSPProject(expected_root) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:root = ale#lsp_linter#FindProjectRoot(l:buffer, l:linter) + + AssertEqual a:expected_root, l:root +endfunction + +function! ale#assert#LSPAddress(expected_address) abort + let l:buffer = bufnr('') + let l:linter = s:GetLinter() + let l:address = ale#linter#GetAddress(l:buffer, l:linter) + + AssertEqual a:expected_address, l:address +endfunction + +function! ale#assert#SetUpLinterTestCommands() abort + command! -nargs=+ GivenCommandOutput :call ale#assert#GivenCommandOutput() + command! -nargs=+ AssertLinterCwd :call ale#assert#LinterCwd() + command! -nargs=+ AssertLinter :call ale#assert#Linter() + command! -nargs=0 AssertLinterNotExecuted :call ale#assert#LinterNotExecuted() + command! -nargs=+ AssertLSPOptions :call ale#assert#LSPOptions() + command! -nargs=+ AssertLSPConfig :call ale#assert#LSPConfig() + command! -nargs=+ AssertLSPLanguage :call ale#assert#LSPLanguage() + command! -nargs=+ AssertLSPProject :call ale#assert#LSPProject() + command! -nargs=+ AssertLSPAddress :call ale#assert#LSPAddress() +endfunction + +function! ale#assert#SetUpFixerTestCommands() abort + command! -nargs=+ GivenCommandOutput :call ale#assert#GivenCommandOutput() + command! -nargs=+ AssertFixerCwd :call ale#assert#FixerCwd() + command! -nargs=+ AssertFixer :call ale#assert#Fixer() + command! -nargs=0 AssertFixerNotExecuted :call ale#assert#FixerNotExecuted() +endfunction + +function! ale#assert#ResetVariables(filetype, name, ...) abort + " If the suffix of the option names format is different, an additional + " argument can be used for that instead. + if a:0 > 1 + throw 'Too many arguments' + endif + + let l:option_suffix = get(a:000, 0, a:name) + let l:prefix = 'ale_' . a:filetype . '_' + \ . substitute(l:option_suffix, '-', '_', 'g') + let l:filter_expr = 'v:val[: len(l:prefix) - 1] is# l:prefix' + + " Save and clear linter variables. + " We'll load the runtime file to reset them to defaults. + for l:key in filter(keys(g:), l:filter_expr) + execute 'Save g:' . l:key + unlet g:[l:key] + endfor + + for l:key in filter(keys(b:), l:filter_expr) + unlet b:[l:key] + endfor +endfunction + +" A dummy function for making sure this module is loaded. +function! ale#assert#SetUpLinterTest(filetype, name) abort + " Set up a marker so ALE doesn't create real random temporary filenames. + let g:ale_create_dummy_temporary_file = 1 + + " Remove current linters. + call ale#linter#Reset() + call ale#linter#PreventLoading(a:filetype) + + Save g:ale_root + let g:ale_root = {} + + Save b:ale_root + unlet! b:ale_root + + call ale#assert#ResetVariables(a:filetype, a:name) + + Save g:ale_c_build_dir + unlet! g:ale_c_build_dir + unlet! b:ale_c_build_dir + + execute 'runtime ale_linters/' . a:filetype . '/' . a:name . '.vim' + + if !exists('g:dir') + call ale#test#SetDirectory('/testplugin/test/linter') + endif + + call ale#assert#SetUpLinterTestCommands() + + let g:ale_run_synchronously = 1 + let g:ale_run_synchronously_emulate_commands = 1 +endfunction + +function! ale#assert#TearDownLinterTest() abort + unlet! g:ale_create_dummy_temporary_file + unlet! g:ale_run_synchronously + unlet! g:ale_run_synchronously_callbacks + unlet! g:ale_run_synchronously_emulate_commands + unlet! g:ale_run_synchronously_command_results + let s:command_output = [] + + if exists(':GivenCommandOutput') + delcommand GivenCommandOutput + endif + + if exists(':AssertLinterCwd') + delcommand AssertLinterCwd + endif + + if exists(':AssertLinter') + delcommand AssertLinter + endif + + if exists(':AssertLinterNotExecuted') + delcommand AssertLinterNotExecuted + endif + + if exists(':AssertLSPOptions') + delcommand AssertLSPOptions + endif + + if exists(':AssertLSPConfig') + delcommand AssertLSPConfig + endif + + if exists(':AssertLSPLanguage') + delcommand AssertLSPLanguage + endif + + if exists(':AssertLSPProject') + delcommand AssertLSPProject + endif + + if exists(':AssertLSPAddress') + delcommand AssertLSPAddress + endif + + if exists('g:dir') + call ale#test#RestoreDirectory() + endif + + Restore + + call ale#linter#Reset() + + if exists('*ale#semver#ResetVersionCache') + call ale#semver#ResetVersionCache() + endif +endfunction + +function! ale#assert#SetUpFixerTest(filetype, name, ...) abort + " If the suffix of the option names format is different, an additional + " argument can be used for that instead. + if a:0 > 1 + throw 'Too many arguments' + endif + + " Set up a marker so ALE doesn't create real random temporary filenames. + let g:ale_create_dummy_temporary_file = 1 + + let l:function_name = ale#fix#registry#GetFunc(a:name) + let s:FixerFunction = function(l:function_name) + + let l:option_suffix = get(a:000, 0, a:name) + call ale#assert#ResetVariables(a:filetype, a:name, l:option_suffix) + + execute 'runtime autoload/ale/fixers/' . substitute(a:name, '-', '_', 'g') . '.vim' + + if !exists('g:dir') + call ale#test#SetDirectory('/testplugin/test/fixers') + endif + + call ale#assert#SetUpFixerTestCommands() + + let g:ale_run_synchronously = 1 + let g:ale_run_synchronously_emulate_commands = 1 +endfunction + +function! ale#assert#TearDownFixerTest() abort + unlet! g:ale_create_dummy_temporary_file + unlet! g:ale_run_synchronously + unlet! g:ale_run_synchronously_callbacks + unlet! g:ale_run_synchronously_emulate_commands + unlet! g:ale_run_synchronously_command_results + let s:command_output = [] + unlet! s:FixerFunction + + if exists('g:dir') + call ale#test#RestoreDirectory() + endif + + Restore + + if exists('*ale#semver#ResetVersionCache') + call ale#semver#ResetVersionCache() + endif + + if exists(':GivenCommandOutput') + delcommand GivenCommandOutput + endif + + if exists(':AssertFixerCwd') + delcommand AssertFixerCwd + endif + + if exists(':AssertFixer') + delcommand AssertFixer + endif + + if exists(':AssertFixerNotExecuted') + delcommand AssertFixerNotExecuted + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/balloon.vim b/dot_vim/plugged/ale/autoload/ale/balloon.vim new file mode 100644 index 0000000..8678376 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/balloon.vim @@ -0,0 +1,74 @@ +" Author: w0rp +" Description: balloonexpr support for ALE. + +function! ale#balloon#MessageForPos(bufnr, lnum, col) abort + let l:set_balloons = ale#Var(a:bufnr, 'set_balloons') + let l:show_problems = 0 + let l:show_hover = 0 + + if l:set_balloons is 1 + let l:show_problems = 1 + let l:show_hover = 1 + elseif l:set_balloons is# 'hover' + let l:show_hover = 1 + endif + + " Don't show balloons if they are disabled, or linting is disabled. + if !(l:show_problems || l:show_hover) + \|| !g:ale_enabled + \|| !getbufvar(a:bufnr, 'ale_enabled', 1) + return '' + endif + + if l:show_problems + let l:loclist = get(g:ale_buffer_info, a:bufnr, {'loclist': []}).loclist + let l:index = ale#util#BinarySearch(l:loclist, a:bufnr, a:lnum, a:col) + endif + + " Show the diagnostics message if found, 'Hover' output otherwise + if l:show_problems && l:index >= 0 + return l:loclist[l:index].text + elseif l:show_hover && ( + \ exists('*balloon_show') + \ || getbufvar( + \ a:bufnr, + \ 'ale_set_balloons_legacy_echo', + \ get(g:, 'ale_set_balloons_legacy_echo', 0) + \ ) + \) + " Request LSP/tsserver hover information, but only if this version of + " Vim supports the balloon_show function, or if we turned a legacy + " setting on. + call ale#hover#Show(a:bufnr, a:lnum, a:col, {'called_from_balloonexpr': 1}) + endif + + return '' +endfunction + +function! ale#balloon#Expr() abort + return ale#balloon#MessageForPos(v:beval_bufnr, v:beval_lnum, v:beval_col) +endfunction + +function! ale#balloon#Disable() abort + if has('balloon_eval') + set noballooneval + set balloonexpr= + endif + + if has('balloon_eval_term') + set noballoonevalterm + set balloonexpr= + endif +endfunction + +function! ale#balloon#Enable() abort + if has('balloon_eval') + set ballooneval + set balloonexpr=ale#balloon#Expr() + endif + + if has('balloon_eval_term') + set balloonevalterm + set balloonexpr=ale#balloon#Expr() + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/c.vim b/dot_vim/plugged/ale/autoload/ale/c.vim new file mode 100644 index 0000000..4a22c6f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/c.vim @@ -0,0 +1,622 @@ +" Author: gagbo , w0rp , roel0 +" Description: Functions for integrating with C-family linters. + +call ale#Set('c_parse_makefile', 0) +call ale#Set('c_always_make', has('unix') && !has('macunix')) +call ale#Set('c_parse_compile_commands', 1) + +let s:sep = has('win32') ? '\' : '/' + +" Set just so tests can override it. +let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt'] + +let g:ale_c_build_dir_names = get(g:, 'ale_c_build_dir_names', [ +\ 'build', +\ 'bin', +\]) + +function! s:CanParseMakefile(buffer) abort + " Something somewhere seems to delete this setting in tests, so ensure we + " always have a default value. + call ale#Set('c_parse_makefile', 0) + + return ale#Var(a:buffer, 'c_parse_makefile') +endfunction + +function! ale#c#GetBuildDirectory(buffer) abort + let l:build_dir = ale#Var(a:buffer, 'c_build_dir') + + " c_build_dir has the priority if defined + if !empty(l:build_dir) + return l:build_dir + endif + + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + + return ale#path#Dirname(l:json_file) +endfunction + +function! ale#c#ShellSplit(line) abort + let l:stack = [] + let l:args = [''] + let l:prev = '' + + for l:char in split(a:line, '\zs') + if l:char is# '''' + if len(l:stack) > 0 && get(l:stack, -1) is# '''' + call remove(l:stack, -1) + elseif (len(l:stack) == 0 || get(l:stack, -1) isnot# '"') && l:prev isnot# '\' + call add(l:stack, l:char) + endif + elseif (l:char is# '"' || l:char is# '`') && l:prev isnot# '\' + if len(l:stack) > 0 && get(l:stack, -1) is# l:char + call remove(l:stack, -1) + elseif len(l:stack) == 0 || get(l:stack, -1) isnot# '''' + call add(l:stack, l:char) + endif + elseif (l:char is# '(' || l:char is# '[' || l:char is# '{') && l:prev isnot# '\' + if len(l:stack) == 0 || get(l:stack, -1) isnot# '''' + call add(l:stack, l:char) + endif + elseif (l:char is# ')' || l:char is# ']' || l:char is# '}') && l:prev isnot# '\' + if len(l:stack) > 0 && get(l:stack, -1) is# {')': '(', ']': '[', '}': '{'}[l:char] + call remove(l:stack, -1) + endif + elseif l:char is# ' ' && len(l:stack) == 0 + if len(get(l:args, -1)) > 0 + call add(l:args, '') + endif + + continue + endif + + let l:args[-1] = get(l:args, -1) . l:char + endfor + + return l:args +endfunction + +" Takes the path prefix and a list of cflags and expands @file arguments to +" the contents of the file. +" +" @file arguments are command line arguments recognised by gcc and clang. For +" instance, if @./path/to/file was given to gcc, it would load .path/to/file +" and use the contents of that file as arguments. +function! ale#c#ExpandAtArgs(path_prefix, raw_split_lines) abort + let l:out_lines = [] + + for l:option in a:raw_split_lines + if stridx(l:option, '@') == 0 + " This is an argument specifying a location of a file containing other arguments + let l:path = join(split(l:option, '\zs')[1:], '') + + " Make path absolute + if !ale#path#IsAbsolute(l:path) + let l:rel_path = substitute(l:path, '"', '', 'g') + let l:rel_path = substitute(l:rel_path, '''', '', 'g') + let l:path = ale#path#GetAbsPath(a:path_prefix, l:rel_path) + endif + + " Read the file and add all the arguments + try + let l:additional_args = readfile(l:path) + catch + continue " All we can really do is skip this argument + endtry + + let l:file_lines = [] + + for l:line in l:additional_args + let l:file_lines += ale#c#ShellSplit(l:line) + endfor + + " @file arguments can include other @file arguments, so we must + " recurse. + let l:out_lines += ale#c#ExpandAtArgs(a:path_prefix, l:file_lines) + else + " This is not an @file argument, so don't touch it. + let l:out_lines += [l:option] + endif + endfor + + return l:out_lines +endfunction + +" Quote C/C++ a compiler argument, if needed. +" +" Quoting arguments might cause issues with some systems/compilers, so we only +" quote them if we need to. +function! ale#c#QuoteArg(arg) abort + if a:arg !~# '\v[#$&*()\\|[\]{};''"<>/?! ^%]' + return a:arg + endif + + return ale#Escape(a:arg) +endfunction + +function! ale#c#ParseCFlags(path_prefix, should_quote, raw_arguments) abort + " Expand @file arguments now before parsing + let l:arguments = ale#c#ExpandAtArgs(a:path_prefix, a:raw_arguments) + " A list of [already_quoted, argument] + let l:items = [] + let l:option_index = 0 + + while l:option_index < len(l:arguments) + let l:option = l:arguments[l:option_index] + let l:option_index = l:option_index + 1 + + " Include options, that may need relative path fix + if stridx(l:option, '-I') == 0 + \ || stridx(l:option, '-iquote') == 0 + \ || stridx(l:option, '-isystem') == 0 + \ || stridx(l:option, '-idirafter') == 0 + \ || stridx(l:option, '-iframework') == 0 + if stridx(l:option, '-I') == 0 && l:option isnot# '-I' + let l:arg = join(split(l:option, '\zs')[2:], '') + let l:option = '-I' + else + let l:arg = l:arguments[l:option_index] + let l:option_index = l:option_index + 1 + endif + + " Fix relative paths if needed + if !ale#path#IsAbsolute(l:arg) + let l:rel_path = substitute(l:arg, '"', '', 'g') + let l:rel_path = substitute(l:rel_path, '''', '', 'g') + let l:arg = ale#path#GetAbsPath(a:path_prefix, l:rel_path) + endif + + call add(l:items, [1, l:option]) + call add(l:items, [1, ale#Escape(l:arg)]) + " Options with arg that can be grouped with the option or separate + elseif stridx(l:option, '-D') == 0 || stridx(l:option, '-B') == 0 + if l:option is# '-D' || l:option is# '-B' + call add(l:items, [1, l:option]) + call add(l:items, [0, l:arguments[l:option_index]]) + let l:option_index = l:option_index + 1 + else + call add(l:items, [0, l:option]) + endif + " Options that have an argument (always separate) + elseif l:option is# '-iprefix' || stridx(l:option, '-iwithprefix') == 0 + \ || l:option is# '-isysroot' || l:option is# '-imultilib' + \ || l:option is# '-include' || l:option is# '-imacros' + call add(l:items, [0, l:option]) + call add(l:items, [0, l:arguments[l:option_index]]) + let l:option_index = l:option_index + 1 + " Options without argument + elseif (stridx(l:option, '-W') == 0 && stridx(l:option, '-Wa,') != 0 && stridx(l:option, '-Wl,') != 0 && stridx(l:option, '-Wp,') != 0) + \ || l:option is# '-w' || stridx(l:option, '-pedantic') == 0 + \ || l:option is# '-ansi' || stridx(l:option, '-std=') == 0 + \ || stridx(l:option, '-f') == 0 && l:option !~# '\v^-f(dump|diagnostics|no-show-column|stack-usage)' + \ || stridx(l:option, '-O') == 0 + \ || l:option is# '-C' || l:option is# '-CC' || l:option is# '-trigraphs' + \ || stridx(l:option, '-nostdinc') == 0 || stridx(l:option, '-iplugindir=') == 0 + \ || stridx(l:option, '--sysroot=') == 0 || l:option is# '--no-sysroot-suffix' + \ || stridx(l:option, '-m') == 0 + call add(l:items, [0, l:option]) + endif + endwhile + + if a:should_quote + " Quote C arguments that haven't already been quoted above. + " If and only if we've been asked to quote them. + call map(l:items, 'v:val[0] ? v:val[1] : ale#c#QuoteArg(v:val[1])') + else + call map(l:items, 'v:val[1]') + endif + + return join(l:items, ' ') +endfunction + +function! ale#c#ParseCFlagsFromMakeOutput(buffer, make_output) abort + if !s:CanParseMakefile(a:buffer) + return v:null + endif + + let l:buffer_filename = expand('#' . a:buffer . ':t') + let l:cflag_line = '' + + " Find a line matching this buffer's filename in the make output. + for l:line in a:make_output + if stridx(l:line, l:buffer_filename) >= 0 + let l:cflag_line = l:line + break + endif + endfor + + let l:makefile_path = ale#path#FindNearestFile(a:buffer, 'Makefile') + let l:makefile_dir = fnamemodify(l:makefile_path, ':p:h') + + return ale#c#ParseCFlags(l:makefile_dir, 0, ale#c#ShellSplit(l:cflag_line)) +endfunction + +" Given a buffer number, find the project directory containing +" compile_commands.json, and the path to the compile_commands.json file. +" +" If compile_commands.json cannot be found, two empty strings will be +" returned. +function! ale#c#FindCompileCommands(buffer) abort + " Look above the current source file to find compile_commands.json + let l:json_file = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + + if !empty(l:json_file) + return [fnamemodify(l:json_file, ':h'), l:json_file] + endif + + " Search in build directories if we can't find it in the project. + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + for l:dirname in ale#Var(a:buffer, 'c_build_dir_names') + let l:c_build_dir = l:path . s:sep . l:dirname + let l:json_file = l:c_build_dir . s:sep . 'compile_commands.json' + + if filereadable(l:json_file) + return [l:path, l:json_file] + endif + endfor + endfor + + return ['', ''] +endfunction + +" Find the project root for C/C++ projects. +" +" The location of compile_commands.json will be used to find project roots. +" +" If compile_commands.json cannot be found, other common configuration files +" will be used to detect the project root. +function! ale#c#FindProjectRoot(buffer) abort + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + + " Fall back on detecting the project root based on other filenames. + if empty(l:root) + for l:project_filename in g:__ale_c_project_filenames + let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) + + if !empty(l:full_path) + let l:path = fnamemodify(l:full_path, ':h') + + " Correct .git path detection. + if fnamemodify(l:path, ':t') is# '.git' + let l:path = fnamemodify(l:path, ':h') + endif + + return l:path + endif + endfor + endif + + return l:root +endfunction + +" Cache compile_commands.json data in a Dictionary, so we don't need to read +" the same files over and over again. The key in the dictionary will include +" the last modified time of the file. +if !exists('s:compile_commands_cache') + let s:compile_commands_cache = {} +endif + +function! ale#c#ResetCompileCommandsCache() abort + let s:compile_commands_cache = {} +endfunction + +function! s:GetLookupFromCompileCommandsFile(compile_commands_file) abort + let l:empty = [{}, {}] + + if empty(a:compile_commands_file) + return l:empty + endif + + let l:time = getftime(a:compile_commands_file) + + if l:time < 0 + return l:empty + endif + + let l:key = a:compile_commands_file . ':' . l:time + + if has_key(s:compile_commands_cache, l:key) + return s:compile_commands_cache[l:key] + endif + + let l:raw_data = [] + silent! let l:raw_data = json_decode(join(readfile(a:compile_commands_file), '')) + + if type(l:raw_data) isnot v:t_list + let l:raw_data = [] + endif + + let l:file_lookup = {} + let l:dir_lookup = {} + + for l:entry in (type(l:raw_data) is v:t_list ? l:raw_data : []) + let l:filename = ale#path#GetAbsPath(l:entry.directory, l:entry.file) + + " Store a key for lookups by the absolute path to the filename. + let l:file_lookup[l:filename] = get(l:file_lookup, l:filename, []) + [l:entry] + + " Store a key for fuzzy lookups by the absolute path to the directory. + let l:dirname = fnamemodify(l:filename, ':h') + let l:dir_lookup[l:dirname] = get(l:dir_lookup, l:dirname, []) + [l:entry] + + " Store a key for fuzzy lookups by just the basename of the file. + let l:basename = tolower(fnamemodify(l:entry.file, ':t')) + let l:file_lookup[l:basename] = get(l:file_lookup, l:basename, []) + [l:entry] + + " Store a key for fuzzy lookups by just the basename of the directory. + let l:dirbasename = tolower(fnamemodify(l:entry.directory, ':p:h:t')) + let l:dir_lookup[l:dirbasename] = get(l:dir_lookup, l:dirbasename, []) + [l:entry] + endfor + + if !empty(l:file_lookup) && !empty(l:dir_lookup) + let l:result = [l:file_lookup, l:dir_lookup] + let s:compile_commands_cache[l:key] = l:result + + return l:result + endif + + return l:empty +endfunction + +" Get [should_quote, arguments] from either 'command' or 'arguments' +" 'arguments' should be quoted later, the split 'command' strings should not. +function! s:GetArguments(json_item) abort + if has_key(a:json_item, 'arguments') + return [1, a:json_item.arguments] + elseif has_key(a:json_item, 'command') + return [0, ale#c#ShellSplit(a:json_item.command)] + endif + + return [0, []] +endfunction + +function! ale#c#ParseCompileCommandsFlags(buffer, file_lookup, dir_lookup) abort + let l:buffer_filename = ale#path#Simplify(expand('#' . a:buffer . ':p')) + let l:basename = tolower(fnamemodify(l:buffer_filename, ':t')) + " Look for any file in the same directory if we can't find an exact match. + let l:dir = fnamemodify(l:buffer_filename, ':h') + + " Search for an exact file match first. + let l:file_list = get(a:file_lookup, l:buffer_filename, []) + + " We may have to look for /foo/bar instead of C:\foo\bar + if empty(l:file_list) && has('win32') + let l:file_list = get( + \ a:file_lookup, + \ ale#path#RemoveDriveLetter(l:buffer_filename), + \ [] + \) + endif + + " Try the absolute path to the directory second. + let l:dir_list = get(a:dir_lookup, l:dir, []) + + if empty(l:dir_list) && has('win32') + let l:dir_list = get( + \ a:dir_lookup, + \ ale#path#RemoveDriveLetter(l:dir), + \ [] + \) + endif + + if empty(l:file_list) && empty(l:dir_list) + " If we can't find matches with the path to the file, try a + " case-insensitive match for any similarly-named file. + let l:file_list = get(a:file_lookup, l:basename, []) + + " If we can't find matches with the path to the directory, try a + " case-insensitive match for anything in similarly-named directory. + let l:dir_list = get(a:dir_lookup, tolower(fnamemodify(l:dir, ':t')), []) + endif + + " A source file matching the header filename. + let l:source_file = '' + + if empty(l:file_list) && l:basename =~? '\.h$\|\.hpp$' + for l:suffix in ['.c', '.cpp'] + " Try to find a source file by an absolute path first. + let l:key = fnamemodify(l:buffer_filename, ':r') . l:suffix + let l:file_list = get(a:file_lookup, l:key, []) + + if empty(l:file_list) && has('win32') + let l:file_list = get( + \ a:file_lookup, + \ ale#path#RemoveDriveLetter(l:key), + \ [] + \) + endif + + if empty(l:file_list) + " Look fuzzy matches on the basename second. + let l:key = fnamemodify(l:basename, ':r') . l:suffix + let l:file_list = get(a:file_lookup, l:key, []) + endif + + if !empty(l:file_list) + let l:source_file = l:key + break + endif + endfor + endif + + for l:item in l:file_list + let l:filename = ale#path#GetAbsPath(l:item.directory, l:item.file) + + " Load the flags for this file, or for a source file matching the + " header file. + if ( + \ bufnr(l:filename) is a:buffer + \ || ( + \ !empty(l:source_file) + \ && l:filename[-len(l:source_file):] is? l:source_file + \ ) + \) + let [l:should_quote, l:args] = s:GetArguments(l:item) + + return ale#c#ParseCFlags(l:item.directory, l:should_quote, l:args) + endif + endfor + + for l:item in l:dir_list + let l:filename = ale#path#GetAbsPath(l:item.directory, l:item.file) + + if ale#path#RemoveDriveLetter(fnamemodify(l:filename, ':h')) + \ is? ale#path#RemoveDriveLetter(l:dir) + let [l:should_quote, l:args] = s:GetArguments(l:item) + + return ale#c#ParseCFlags(l:item.directory, l:should_quote, l:args) + endif + endfor + + return '' +endfunction + +function! ale#c#FlagsFromCompileCommands(buffer, compile_commands_file) abort + let l:lookups = s:GetLookupFromCompileCommandsFile(a:compile_commands_file) + let l:file_lookup = l:lookups[0] + let l:dir_lookup = l:lookups[1] + + return ale#c#ParseCompileCommandsFlags(a:buffer, l:file_lookup, l:dir_lookup) +endfunction + +function! ale#c#GetCFlags(buffer, output) abort + let l:cflags = v:null + + if ale#Var(a:buffer, 'c_parse_compile_commands') + let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer) + + if !empty(l:json_file) + let l:cflags = ale#c#FlagsFromCompileCommands(a:buffer, l:json_file) + endif + endif + + if empty(l:cflags) && s:CanParseMakefile(a:buffer) && !empty(a:output) + let l:cflags = ale#c#ParseCFlagsFromMakeOutput(a:buffer, a:output) + endif + + if l:cflags is v:null + let l:cflags = ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)) + endif + + return l:cflags isnot v:null ? l:cflags : '' +endfunction + +function! ale#c#GetMakeCommand(buffer) abort + if s:CanParseMakefile(a:buffer) + let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile') + + if empty(l:path) + let l:path = ale#path#FindNearestFile(a:buffer, 'GNUmakefile') + endif + + if !empty(l:path) + let l:always_make = ale#Var(a:buffer, 'c_always_make') + + return [ + \ fnamemodify(l:path, ':h'), + \ 'make -n' . (l:always_make ? ' --always-make' : ''), + \] + endif + endif + + return ['', ''] +endfunction + +function! ale#c#RunMakeCommand(buffer, Callback) abort + let [l:cwd, l:command] = ale#c#GetMakeCommand(a:buffer) + + if empty(l:command) + return a:Callback(a:buffer, []) + endif + + return ale#command#Run( + \ a:buffer, + \ l:command, + \ {b, output -> a:Callback(a:buffer, output)}, + \ {'cwd': l:cwd}, + \) +endfunction + +" Given a buffer number, search for a project root, and output a List +" of directories to include based on some heuristics. +" +" For projects with headers in the project root, the project root will +" be returned. +" +" For projects with an 'include' directory, that directory will be returned. +function! ale#c#FindLocalHeaderPaths(buffer) abort + let l:project_root = ale#c#FindProjectRoot(a:buffer) + + if empty(l:project_root) + return [] + endif + + " See if we can find .h files directory in the project root. + " If we can, that's our include directory. + if !empty(globpath(l:project_root, '*.h', 0)) + return [l:project_root] + endif + + " Look for .hpp files too. + if !empty(globpath(l:project_root, '*.hpp', 0)) + return [l:project_root] + endif + + " If we find an 'include' directory in the project root, then use that. + if isdirectory(l:project_root . '/include') + return [ale#path#Simplify(l:project_root . s:sep . 'include')] + endif + + return [] +endfunction + +" Given a List of include paths, create a string containing the -I include +" options for those paths, with the paths escaped for use in the shell. +function! ale#c#IncludeOptions(include_paths) abort + let l:option_list = [] + + for l:path in a:include_paths + call add(l:option_list, '-I' . ale#Escape(l:path)) + endfor + + if empty(l:option_list) + return '' + endif + + return join(l:option_list) +endfunction + +" Get the language flag depending on on the executable, options and +" file extension +function! ale#c#GetLanguageFlag( +\ buffer, +\ executable, +\ use_header_lang_flag, +\ header_exts, +\ linter_lang_flag +\) abort + " Use only '-header' if the executable is 'clang' by default + if a:use_header_lang_flag == -1 + let l:use_header_lang_flag = a:executable =~# 'clang' + else + let l:use_header_lang_flag = a:use_header_lang_flag + endif + + " If we don't use the header language flag, return the default linter + " language flag + if !l:use_header_lang_flag + return a:linter_lang_flag + endif + + " Get the buffer file extension + let l:buf_ext = expand('#' . a:buffer . ':e') + + " If the buffer file is an header according to its extension, use + " the linter language flag + '-header', ex: 'c-header' + if index(a:header_exts, l:buf_ext) >= 0 + return a:linter_lang_flag . '-header' + endif + + " Else, use the default linter language flag + return a:linter_lang_flag +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/code_action.vim b/dot_vim/plugged/ale/autoload/ale/code_action.vim new file mode 100644 index 0000000..db31aad --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/code_action.vim @@ -0,0 +1,389 @@ +" Author: Jerko Steiner +" Description: Code action support for LSP / tsserver + +function! ale#code_action#ReloadBuffer() abort + let l:buffer = bufnr('') + + execute 'augroup ALECodeActionReloadGroup' . l:buffer + autocmd! + augroup END + + silent! execute 'augroup! ALECodeActionReloadGroup' . l:buffer + + call ale#util#Execute(':e!') +endfunction + +function! ale#code_action#HandleCodeAction(code_action, options) abort + let l:current_buffer = bufnr('') + let l:changes = a:code_action.changes + + for l:file_code_edit in l:changes + call ale#code_action#ApplyChanges( + \ l:file_code_edit.fileName, + \ l:file_code_edit.textChanges, + \ a:options, + \) + endfor +endfunction + +function! s:ChangeCmp(left, right) abort + if a:left.start.line < a:right.start.line + return -1 + endif + + if a:left.start.line > a:right.start.line + return 1 + endif + + if a:left.start.offset < a:right.start.offset + return -1 + endif + + if a:left.start.offset > a:right.start.offset + return 1 + endif + + if a:left.end.line < a:right.end.line + return -1 + endif + + if a:left.end.line > a:right.end.line + return 1 + endif + + if a:left.end.offset < a:right.end.offset + return -1 + endif + + if a:left.end.offset > a:right.end.offset + return 1 + endif + + return 0 +endfunction + +function! ale#code_action#ApplyChanges(filename, changes, options) abort + let l:should_save = get(a:options, 'should_save') + let l:conn_id = get(a:options, 'conn_id') + + let l:orig_buffer = bufnr('') + + " The buffer is used to determine the fileformat, if available. + let l:buffer = bufnr(a:filename) + + if l:buffer != l:orig_buffer + call ale#util#Execute('silent edit ' . a:filename) + let l:buffer = bufnr('') + endif + + let l:lines = getbufline(l:buffer, 1, '$') + + " Add empty line if there's trailing newline, like readfile() does. + if getbufvar(l:buffer, '&eol') + let l:lines += [''] + endif + + let l:pos = getpos('.')[1:2] + + " Changes have to be sorted so we apply them from bottom-to-top + for l:code_edit in reverse(sort(copy(a:changes), function('s:ChangeCmp'))) + let l:line = l:code_edit.start.line + let l:column = l:code_edit.start.offset + let l:end_line = l:code_edit.end.line + let l:end_column = l:code_edit.end.offset + let l:text = l:code_edit.newText + + let l:insertions = split(l:text, '\n', 1) + + " Fix invalid columns + let l:column = l:column > 0 ? l:column : 1 + let l:end_column = l:end_column > 0 ? l:end_column : 1 + + " Clamp start to BOF + if l:line < 1 + let [l:line, l:column] = [1, 1] + endif + + " Clamp start to EOF + if l:line > len(l:lines) || l:line == len(l:lines) && l:column > len(l:lines[-1]) + 1 + let [l:line, l:column] = [len(l:lines), len(l:lines[-1]) + 1] + " Special case when start is after EOL + elseif l:line < len(l:lines) && l:column > len(l:lines[l:line - 1]) + 1 + let [l:line, l:column] = [l:line + 1, 1] + endif + + " Adjust end: clamp if invalid and/or adjust if we moved start + if l:end_line < l:line || l:end_line == l:line && l:end_column < l:column + let [l:end_line, l:end_column] = [l:line, l:column] + endif + + " Clamp end to EOF + if l:end_line > len(l:lines) || l:end_line == len(l:lines) && l:end_column > len(l:lines[-1]) + 1 + let [l:end_line, l:end_column] = [len(l:lines), len(l:lines[-1]) + 1] + " Special case when end is after EOL + elseif l:end_line < len(l:lines) && l:end_column > len(l:lines[l:end_line - 1]) + 1 + let [l:end_line, l:end_column] = [l:end_line + 1, 1] + endif + + " Careful, [:-1] is not an empty list + let l:start = l:line is 1 ? [] : l:lines[: l:line - 2] + let l:middle = l:column is 1 ? [''] : [l:lines[l:line - 1][: l:column - 2]] + + let l:middle[-1] .= l:insertions[0] + let l:middle += l:insertions[1:] + let l:middle[-1] .= l:lines[l:end_line - 1][l:end_column - 1 :] + + let l:end_line_len = len(l:lines[l:end_line - 1]) + let l:lines_before_change = len(l:lines) + let l:lines = l:start + l:middle + l:lines[l:end_line :] + + let l:current_line_offset = len(l:lines) - l:lines_before_change + let l:column_offset = len(l:middle[-1]) - l:end_line_len + + " Keep cursor where it was (if outside of changes) or move it after + " the changed text (if inside), but don't touch it when the change + " spans the entire buffer, in which case we have no clue and it's + " better to not do anything. + if l:line isnot 1 || l:column isnot 1 + \|| l:end_line < l:lines_before_change + \|| l:end_line == l:lines_before_change && l:end_column <= l:end_line_len + let l:pos = s:UpdateCursor(l:pos, + \ [l:line, l:column], + \ [l:end_line, l:end_column], + \ [l:current_line_offset, l:column_offset]) + endif + endfor + + " Make sure to add a trailing newline if and only if it should be added. + if l:lines[-1] is# '' && getbufvar(l:buffer, '&eol') + call remove(l:lines, -1) + else + call setbufvar(l:buffer, '&eol', 0) + endif + + call ale#util#SetBufferContents(l:buffer, l:lines) + + call ale#lsp#NotifyForChanges(l:conn_id, l:buffer) + + if l:should_save + call ale#util#Execute('silent w!') + endif + + call setpos('.', [0, l:pos[0], l:pos[1], 0]) + + if l:orig_buffer != l:buffer && bufexists(l:orig_buffer) + call ale#util#Execute('silent buf ' . string(l:orig_buffer)) + endif +endfunction + +function! s:UpdateCursor(cursor, start, end, offset) abort + let l:cur_line = a:cursor[0] + let l:cur_column = a:cursor[1] + let l:line = a:start[0] + let l:column = a:start[1] + let l:end_line = a:end[0] + let l:end_column = a:end[1] + let l:line_offset = a:offset[0] + let l:column_offset = a:offset[1] + + if l:end_line < l:cur_line + " both start and end lines are before the cursor. only line offset + " needs to be updated + let l:cur_line += l:line_offset + elseif l:end_line == l:cur_line + " end line is at the same location as cursor, which means + " l:line <= l:cur_line + if l:line < l:cur_line || l:column <= l:cur_column + " updates are happening either before or around the cursor + if l:end_column < l:cur_column + " updates are happening before the cursor, update the + " column offset for cursor + let l:cur_line += l:line_offset + let l:cur_column += l:column_offset + else + " updates are happening around the cursor, move the cursor + " to the end of the changes + let l:cur_line += l:line_offset + let l:cur_column = l:end_column + l:column_offset + endif + " else is not necessary, it means modifications are happening + " after the cursor so no cursor updates need to be done + endif + else + " end line is after the cursor + if l:line < l:cur_line || l:line == l:cur_line && l:column <= l:cur_column + " changes are happening around the cursor, move the cursor + " to the end of the changes + let l:cur_line = l:end_line + l:line_offset + let l:cur_column = l:end_column + l:column_offset + " else is not necessary, it means modifications are happening + " after the cursor so no cursor updates need to be done + endif + endif + + return [l:cur_line, l:cur_column] +endfunction + +function! ale#code_action#GetChanges(workspace_edit) abort + if a:workspace_edit is v:null + return {} + endif + + let l:changes = {} + + if has_key(a:workspace_edit, 'changes') && !empty(a:workspace_edit.changes) + return a:workspace_edit.changes + elseif has_key(a:workspace_edit, 'documentChanges') + let l:document_changes = [] + + if type(a:workspace_edit.documentChanges) is v:t_dict + \ && has_key(a:workspace_edit.documentChanges, 'edits') + call add(l:document_changes, a:workspace_edit.documentChanges) + elseif type(a:workspace_edit.documentChanges) is v:t_list + let l:document_changes = a:workspace_edit.documentChanges + endif + + for l:text_document_edit in l:document_changes + let l:filename = l:text_document_edit.textDocument.uri + let l:edits = l:text_document_edit.edits + let l:changes[l:filename] = l:edits + endfor + endif + + return l:changes +endfunction + +function! ale#code_action#BuildChangesList(changes_map) abort + let l:changes = [] + + for l:file_name in keys(a:changes_map) + let l:text_edits = a:changes_map[l:file_name] + let l:text_changes = [] + + for l:edit in l:text_edits + let l:range = l:edit.range + let l:new_text = l:edit.newText + + call add(l:text_changes, { + \ 'start': { + \ 'line': l:range.start.line + 1, + \ 'offset': l:range.start.character + 1, + \ }, + \ 'end': { + \ 'line': l:range.end.line + 1, + \ 'offset': l:range.end.character + 1, + \ }, + \ 'newText': l:new_text, + \}) + endfor + + call add(l:changes, { + \ 'fileName': ale#util#ToResource(l:file_name), + \ 'textChanges': l:text_changes, + \}) + endfor + + return l:changes +endfunction + +function! s:EscapeMenuName(text) abort + return substitute(a:text, '\\\| \|\.\|&', '\\\0', 'g') +endfunction + +function! s:UpdateMenu(data, menu_items) abort + silent! aunmenu PopUp.Refactor\.\.\. + + if empty(a:data) + return + endif + + for [l:type, l:item] in a:menu_items + let l:name = l:type is# 'tsserver' ? l:item.name : l:item.title + let l:func_name = l:type is# 'tsserver' + \ ? 'ale#codefix#ApplyTSServerCodeAction' + \ : 'ale#codefix#ApplyLSPCodeAction' + + execute printf( + \ 'anoremenu PopUp.&Refactor\.\.\..%s' + \ . ' :call %s(%s, %s)', + \ s:EscapeMenuName(l:name), + \ l:func_name, + \ string(a:data), + \ string(l:item), + \) + endfor + + if empty(a:menu_items) + silent! anoremenu PopUp.Refactor\.\.\..(None) :silent + endif +endfunction + +function! s:GetCodeActions(linter, options) abort + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + let l:column = min([l:column, len(getline(l:line))]) + + let l:location = { + \ 'buffer': l:buffer, + \ 'line': l:line, + \ 'column': l:column, + \ 'end_line': l:line, + \ 'end_column': l:column, + \} + let l:Callback = function('s:OnReady', [l:location, a:options]) + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#code_action#GetCodeActions(options) abort + silent! aunmenu PopUp.Rename + silent! aunmenu PopUp.Refactor\.\.\. + + " Only display the menu items if there's an LSP server. + let l:has_lsp = 0 + + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + let l:has_lsp = 1 + + break + endif + endfor + + if l:has_lsp + if !empty(expand('')) + silent! anoremenu PopUp.Rename :ALERename + endif + + silent! anoremenu PopUp.Refactor\.\.\..(None) :silent + + call ale#codefix#Execute( + \ mode() is# 'v' || mode() is# "\", + \ function('s:UpdateMenu') + \) + endif +endfunction + +function! s:Setup(enabled) abort + augroup ALECodeActionsGroup + autocmd! + + if a:enabled + autocmd MenuPopup * :call ale#code_action#GetCodeActions({}) + endif + augroup END + + if !a:enabled + silent! augroup! ALECodeActionsGroup + + silent! aunmenu PopUp.Rename + silent! aunmenu PopUp.Refactor\.\.\. + endif +endfunction + +function! ale#code_action#EnablePopUpMenu() abort + call s:Setup(1) +endfunction + +function! ale#code_action#DisablePopUpMenu() abort + call s:Setup(0) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/codefix.vim b/dot_vim/plugged/ale/autoload/ale/codefix.vim new file mode 100644 index 0000000..34ce3e1 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/codefix.vim @@ -0,0 +1,497 @@ +" Author: Dalius Dobravolskas +" Description: Code Fix support for tsserver and LSP servers + +let s:codefix_map = {} + +" Used to get the codefix map in tests. +function! ale#codefix#GetMap() abort + return deepcopy(s:codefix_map) +endfunction + +" Used to set the codefix map in tests. +function! ale#codefix#SetMap(map) abort + let s:codefix_map = a:map +endfunction + +function! ale#codefix#ClearLSPData() abort + let s:codefix_map = {} +endfunction + +function! s:message(message) abort + call ale#util#Execute('echom ' . string(a:message)) +endfunction + +function! ale#codefix#ApplyTSServerCodeAction(data, item) abort + if has_key(a:item, 'changes') + let l:changes = a:item.changes + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'codefix', + \ 'changes': l:changes, + \ }, + \ {}, + \) + else + let l:message = ale#lsp#tsserver_message#GetEditsForRefactor( + \ a:data.buffer, + \ a:data.line, + \ a:data.column, + \ a:data.end_line, + \ a:data.end_column, + \ a:item.id[0], + \ a:item.id[1], + \) + + let l:request_id = ale#lsp#Send(a:data.connection_id, l:message) + + let s:codefix_map[l:request_id] = a:data + endif +endfunction + +function! ale#codefix#HandleTSServerResponse(conn_id, response) abort + if !has_key(a:response, 'request_seq') + \ || !has_key(s:codefix_map, a:response.request_seq) + return + endif + + let l:data = remove(s:codefix_map, a:response.request_seq) + let l:MenuCallback = get(l:data, 'menu_callback', v:null) + + if get(a:response, 'command', '') is# 'getCodeFixes' + if get(a:response, 'success', v:false) is v:false + \&& l:MenuCallback is v:null + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error while getting code fixes. Reason: ' . l:message) + + return + endif + + let l:result = get(a:response, 'body', []) + call filter(l:result, 'has_key(v:val, ''changes'')') + + if l:MenuCallback isnot v:null + call l:MenuCallback( + \ l:data, + \ map(copy(l:result), '[''tsserver'', v:val]') + \) + + return + endif + + if len(l:result) == 0 + call s:message('No code fixes available.') + + return + endif + + let l:code_fix_to_apply = 0 + + if len(l:result) == 1 + let l:code_fix_to_apply = 1 + else + let l:codefix_no = 1 + let l:codefixstring = "Code Fixes:\n" + + for l:codefix in l:result + let l:codefixstring .= l:codefix_no . ') ' + \ . l:codefix.description . "\n" + let l:codefix_no += 1 + endfor + + let l:codefixstring .= 'Type number and (empty cancels): ' + + let l:code_fix_to_apply = ale#util#Input(l:codefixstring, '') + let l:code_fix_to_apply = str2nr(l:code_fix_to_apply) + + if l:code_fix_to_apply == 0 + return + endif + endif + + call ale#codefix#ApplyTSServerCodeAction( + \ l:data, + \ l:result[l:code_fix_to_apply - 1], + \) + elseif get(a:response, 'command', '') is# 'getApplicableRefactors' + if get(a:response, 'success', v:false) is v:false + \&& l:MenuCallback is v:null + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error while getting applicable refactors. Reason: ' . l:message) + + return + endif + + let l:result = get(a:response, 'body', []) + + if len(l:result) == 0 + call s:message('No applicable refactors available.') + + return + endif + + let l:refactors = [] + + for l:item in l:result + for l:action in l:item.actions + call add(l:refactors, { + \ 'name': l:action.description, + \ 'id': [l:item.name, l:action.name], + \}) + endfor + endfor + + if l:MenuCallback isnot v:null + call l:MenuCallback( + \ l:data, + \ map(copy(l:refactors), '[''tsserver'', v:val]') + \) + + return + endif + + let l:refactor_no = 1 + let l:refactorstring = "Applicable refactors:\n" + + for l:refactor in l:refactors + let l:refactorstring .= l:refactor_no . ') ' + \ . l:refactor.name . "\n" + let l:refactor_no += 1 + endfor + + let l:refactorstring .= 'Type number and (empty cancels): ' + + let l:refactor_to_apply = ale#util#Input(l:refactorstring, '') + let l:refactor_to_apply = str2nr(l:refactor_to_apply) + + if l:refactor_to_apply == 0 + return + endif + + let l:id = l:refactors[l:refactor_to_apply - 1].id + + call ale#codefix#ApplyTSServerCodeAction( + \ l:data, + \ l:refactors[l:refactor_to_apply - 1], + \) + elseif get(a:response, 'command', '') is# 'getEditsForRefactor' + if get(a:response, 'success', v:false) is v:false + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error while getting edits for refactor. Reason: ' . l:message) + + return + endif + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'editsForRefactor', + \ 'changes': a:response.body.edits, + \ }, + \ {}, + \) + endif +endfunction + +function! ale#codefix#ApplyLSPCodeAction(data, item) abort + if has_key(a:item, 'command') + \&& type(a:item.command) == v:t_dict + let l:command = a:item.command + let l:message = ale#lsp#message#ExecuteCommand( + \ l:command.command, + \ l:command.arguments, + \) + + let l:request_id = ale#lsp#Send(a:data.connection_id, l:message) + elseif has_key(a:item, 'command') && has_key(a:item, 'arguments') + \&& type(a:item.command) == v:t_string + let l:message = ale#lsp#message#ExecuteCommand( + \ a:item.command, + \ a:item.arguments, + \) + + let l:request_id = ale#lsp#Send(a:data.connection_id, l:message) + elseif has_key(a:item, 'edit') || has_key(a:item, 'arguments') + if has_key(a:item, 'edit') + let l:topass = a:item.edit + else + let l:topass = a:item.arguments[0] + endif + + let l:changes_map = ale#code_action#GetChanges(l:topass) + + if empty(l:changes_map) + return + endif + + let l:changes = ale#code_action#BuildChangesList(l:changes_map) + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'codeaction', + \ 'changes': l:changes, + \ }, + \ {}, + \) + endif +endfunction + +function! ale#codefix#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'method') + \ && a:response.method is# 'workspace/applyEdit' + \ && has_key(a:response, 'params') + let l:params = a:response.params + + let l:changes_map = ale#code_action#GetChanges(l:params.edit) + + if empty(l:changes_map) + return + endif + + let l:changes = ale#code_action#BuildChangesList(l:changes_map) + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'applyEdit', + \ 'changes': l:changes, + \ }, + \ {} + \) + elseif has_key(a:response, 'id') + \&& has_key(s:codefix_map, a:response.id) + let l:data = remove(s:codefix_map, a:response.id) + let l:MenuCallback = get(l:data, 'menu_callback', v:null) + + let l:result = get(a:response, 'result') + + if type(l:result) != v:t_list + let l:result = [] + endif + + " Send the results to the menu callback, if set. + if l:MenuCallback isnot v:null + call l:MenuCallback( + \ l:data, + \ map(copy(l:result), '[''lsp'', v:val]') + \) + + return + endif + + if len(l:result) == 0 + call s:message('No code actions received from server') + + return + endif + + let l:codeaction_no = 1 + let l:codeactionstring = "Code Fixes:\n" + + for l:codeaction in l:result + let l:codeactionstring .= l:codeaction_no . ') ' + \ . l:codeaction.title . "\n" + let l:codeaction_no += 1 + endfor + + let l:codeactionstring .= 'Type number and (empty cancels): ' + + let l:codeaction_to_apply = ale#util#Input(l:codeactionstring, '') + let l:codeaction_to_apply = str2nr(l:codeaction_to_apply) + + if l:codeaction_to_apply == 0 + return + endif + + let l:item = l:result[l:codeaction_to_apply - 1] + + call ale#codefix#ApplyLSPCodeAction(l:data, l:item) + endif +endfunction + +function! s:FindError(buffer, line, column, end_line, end_column, linter_name) abort + let l:nearest_error = v:null + + if a:line == a:end_line + \&& a:column == a:end_column + \&& has_key(g:ale_buffer_info, a:buffer) + let l:nearest_error_diff = -1 + + for l:error in get(g:ale_buffer_info[a:buffer], 'loclist', []) + if has_key(l:error, 'code') + \ && (a:linter_name is v:null || l:error.linter_name is# a:linter_name) + \ && l:error.lnum == a:line + let l:diff = abs(l:error.col - a:column) + + if l:nearest_error_diff == -1 || l:diff < l:nearest_error_diff + let l:nearest_error_diff = l:diff + let l:nearest_error = l:error + endif + endif + endfor + endif + + return l:nearest_error +endfunction + +function! s:OnReady( +\ line, +\ column, +\ end_line, +\ end_column, +\ MenuCallback, +\ linter, +\ lsp_details, +\) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'code_actions') + return + endif + + let l:buffer = a:lsp_details.buffer + + if a:linter.lsp is# 'tsserver' + let l:nearest_error = + \ s:FindError(l:buffer, a:line, a:column, a:end_line, a:end_column, a:linter.lsp) + + if l:nearest_error isnot v:null + let l:message = ale#lsp#tsserver_message#GetCodeFixes( + \ l:buffer, + \ a:line, + \ a:column, + \ a:line, + \ a:column, + \ [l:nearest_error.code], + \) + else + let l:message = ale#lsp#tsserver_message#GetApplicableRefactors( + \ l:buffer, + \ a:line, + \ a:column, + \ a:end_line, + \ a:end_column, + \) + endif + else + " Send a message saying the buffer has changed first, otherwise + " completions won't know what text is nearby. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + let l:diagnostics = [] + let l:nearest_error = + \ s:FindError(l:buffer, a:line, a:column, a:end_line, a:end_column, v:null) + + if l:nearest_error isnot v:null + let l:diagnostics = [ + \ { + \ 'code': l:nearest_error.code, + \ 'message': l:nearest_error.text, + \ 'range': { + \ 'start': { + \ 'line': l:nearest_error.lnum - 1, + \ 'character': l:nearest_error.col - 1, + \ }, + \ 'end': { + \ 'line': get(l:nearest_error, 'end_lnum', 1) - 1, + \ 'character': get(l:nearest_error, 'end_col', 0) + \ }, + \ }, + \ }, + \] + endif + + let l:message = ale#lsp#message#CodeAction( + \ l:buffer, + \ a:line, + \ a:column, + \ a:end_line, + \ a:end_column, + \ l:diagnostics, + \) + endif + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#codefix#HandleTSServerResponse') + \ : function('ale#codefix#HandleLSPResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:codefix_map[l:request_id] = { + \ 'connection_id': l:id, + \ 'buffer': l:buffer, + \ 'line': a:line, + \ 'column': a:column, + \ 'end_line': a:end_line, + \ 'end_column': a:end_column, + \ 'menu_callback': a:MenuCallback, + \} +endfunction + +function! s:ExecuteGetCodeFix(linter, range, MenuCallback) abort + let l:buffer = bufnr('') + + if a:range == 0 + let [l:line, l:column] = getpos('.')[1:2] + let l:end_line = l:line + let l:end_column = l:column + + " Expand the range to cover the current word, if there is one. + let l:cword = expand('') + + if !empty(l:cword) + let l:search_pos = searchpos('\V' . l:cword, 'bn', l:line) + + if l:search_pos != [0, 0] + let l:column = l:search_pos[1] + let l:end_column = l:column + len(l:cword) - 1 + endif + endif + elseif mode() is# 'v' || mode() is# "\" + " You need to get the start and end in a different way when you're in + " visual mode. + let [l:line, l:column] = getpos('v')[1:2] + let [l:end_line, l:end_column] = getpos('.')[1:2] + else + let [l:line, l:column] = getpos("'<")[1:2] + let [l:end_line, l:end_column] = getpos("'>")[1:2] + endif + + let l:column = max([min([l:column, len(getline(l:line))]), 1]) + let l:end_column = min([l:end_column, len(getline(l:end_line))]) + + let l:Callback = function( + \ 's:OnReady', [l:line, l:column, l:end_line, l:end_column, a:MenuCallback] + \) + + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#codefix#Execute(range, ...) abort + if a:0 > 1 + throw 'Too many arguments' + endif + + let l:MenuCallback = get(a:000, 0, v:null) + let l:lsp_linters = [] + + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call add(l:lsp_linters, l:linter) + endif + endfor + + if empty(l:lsp_linters) + if l:MenuCallback is v:null + call s:message('No active LSPs') + else + call l:MenuCallback({}, []) + endif + + return + endif + + for l:lsp_linter in l:lsp_linters + call s:ExecuteGetCodeFix(l:lsp_linter, a:range, l:MenuCallback) + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/command.vim b/dot_vim/plugged/ale/autoload/ale/command.vim new file mode 100644 index 0000000..c9dc8d9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/command.vim @@ -0,0 +1,473 @@ +" Author: w0rp +" Description: Functions for formatting command strings, running commands, and +" managing files during linting and fixing cycles. + +" This dictionary holds lists of files and directories to remove later. +if !exists('s:buffer_data') + let s:buffer_data = {} +endif + +" The regular expression used for formatting filenames with modifiers. +let s:path_format_regex = '\v\%s(%(:h|:t|:r|:e)*)' + +" Used to get the data in tests. +function! ale#command#GetData() abort + return deepcopy(s:buffer_data) +endfunction + +function! ale#command#ClearData() abort + let s:buffer_data = {} +endfunction + +function! ale#command#InitData(buffer) abort + if !has_key(s:buffer_data, a:buffer) + let s:buffer_data[a:buffer] = { + \ 'jobs': {}, + \ 'file_list': [], + \ 'directory_list': [], + \} + endif +endfunction + +" Set the cwd for commands that are about to run. +" Used internally. +function! ale#command#SetCwd(buffer, cwd) abort + call ale#command#InitData(a:buffer) + let s:buffer_data[a:buffer].cwd = a:cwd +endfunction + +function! ale#command#ResetCwd(buffer) abort + if has_key(s:buffer_data, a:buffer) + let s:buffer_data[a:buffer].cwd = v:null + endif +endfunction + +function! ale#command#ManageFile(buffer, file) abort + call ale#command#InitData(a:buffer) + call add(s:buffer_data[a:buffer].file_list, a:file) +endfunction + +function! ale#command#ManageDirectory(buffer, directory) abort + call ale#command#InitData(a:buffer) + call add(s:buffer_data[a:buffer].directory_list, a:directory) +endfunction + +function! ale#command#CreateFile(buffer) abort + " This variable can be set to 1 in tests to stub this out. + if get(g:, 'ale_create_dummy_temporary_file') + return 'TEMP' + endif + + let l:temporary_file = ale#util#Tempname() + call ale#command#ManageFile(a:buffer, l:temporary_file) + + return l:temporary_file +endfunction + +" Create a new temporary directory and manage it in one go. +function! ale#command#CreateDirectory(buffer) abort + " This variable can be set to 1 in tests to stub this out. + if get(g:, 'ale_create_dummy_temporary_file') + return 'TEMP_DIR' + endif + + let l:temporary_directory = ale#util#Tempname() + " Create the temporary directory for the file, unreadable by 'other' + " users. + call mkdir(l:temporary_directory, '', 0750) + call ale#command#ManageDirectory(a:buffer, l:temporary_directory) + + return l:temporary_directory +endfunction + +function! ale#command#RemoveManagedFiles(buffer) abort + let l:info = get(s:buffer_data, a:buffer, {}) + + if !empty(l:info) && empty(l:info.jobs) + " We can't delete anything in a sandbox, so wait until we escape from + " it to delete temporary files and directories. + if ale#util#InSandbox() + return + endif + + " Delete files with a call akin to a plan `rm` command. + for l:filename in l:info.file_list + call delete(l:filename) + endfor + + " Delete directories like `rm -rf`. + " Directories are handled differently from files, so paths that are + " intended to be single files can be set up for automatic deletion + " without accidentally deleting entire directories. + for l:directory in l:info.directory_list + call delete(l:directory, 'rf') + endfor + + call remove(s:buffer_data, a:buffer) + endif +endfunction + +function! ale#command#CreateTempFile(buffer, temporary_file, input) abort + if empty(a:temporary_file) + " There is no file, so we didn't create anything. + return 0 + endif + + " Use an existing list of lines of input if we have it, or get the lines + " from the file. + let l:lines = a:input isnot v:null ? a:input : getbufline(a:buffer, 1, '$') + + let l:temporary_directory = fnamemodify(a:temporary_file, ':h') + " Create the temporary directory for the file, unreadable by 'other' + " users. + call mkdir(l:temporary_directory, '', 0750) + " Automatically delete the directory later. + call ale#command#ManageDirectory(a:buffer, l:temporary_directory) + " Write the buffer out to a file. + call ale#util#Writefile(a:buffer, l:lines, a:temporary_file) + + return 1 +endfunction + +function! s:TemporaryFilename(buffer) abort + let l:filename = fnamemodify(bufname(a:buffer), ':t') + + if empty(l:filename) + " If the buffer's filename is empty, create a dummy filename. + let l:ft = getbufvar(a:buffer, '&filetype') + let l:filename = 'file' . ale#filetypes#GuessExtension(l:ft) + endif + + " Create a temporary filename, / + " The file itself will not be created by this function. + return ale#util#Tempname() . (has('win32') ? '\' : '/') . l:filename +endfunction + +" Given part of a command, replace any % with %%, so that no characters in +" the string will be replaced with filenames, etc. +function! ale#command#EscapeCommandPart(command_part) abort + return substitute(a:command_part, '%', '%%', 'g') +endfunction + +" Format a filename, converting it with filename mappings, if non-empty, +" and escaping it for putting into a command string. +" +" The filename can be modified. +function! s:FormatFilename(filename, mappings, modifiers) abort + let l:filename = a:filename + + if !empty(a:mappings) + let l:filename = ale#filename_mapping#Map(l:filename, a:mappings) + endif + + if !empty(a:modifiers) + let l:filename = fnamemodify(l:filename, a:modifiers) + endif + + return ale#Escape(l:filename) +endfunction + +" Produce a command prefix to check to a particular directory for a command. +" %s format markers with filename-modifiers can be used as the directory, and +" will be returned verbatim for formatting in paths relative to files. +function! ale#command#CdString(directory) abort + let l:match = matchstrpos(a:directory, s:path_format_regex) + " Do not escape the directory here if it's a valid format string. + " This allows us to use sequences like %s:h, %s:h:h, etc. + let l:directory = l:match[1:] == [0, len(a:directory)] + \ ? a:directory + \ : ale#Escape(a:directory) + + if has('win32') + return 'cd /d ' . l:directory . ' && ' + endif + + return 'cd ' . l:directory . ' && ' +endfunction + +" Given a command string, replace every... +" %s -> with the current filename +" %t -> with the name of an unused file in a temporary directory +" %% -> with a literal % +function! ale#command#FormatCommand( +\ buffer, +\ executable, +\ command, +\ pipe_file_if_needed, +\ input, +\ cwd, +\ mappings, +\) abort + let l:temporary_file = '' + let l:command = a:command + + if !empty(a:cwd) + let l:command = ale#command#CdString(a:cwd) . l:command + endif + + " First replace all uses of %%, used for literal percent characters, + " with an ugly string. + let l:command = substitute(l:command, '%%', '<>', 'g') + + " Replace %e with the escaped executable, if available. + if !empty(a:executable) && l:command =~# '%e' + let l:command = substitute(l:command, '%e', '\=ale#Escape(a:executable)', 'g') + endif + + " Replace all %s occurrences in the string with the name of the current + " file. + if l:command =~# '%s' + let l:filename = fnamemodify(bufname(a:buffer), ':p') + let l:command = substitute( + \ l:command, + \ s:path_format_regex, + \ '\=s:FormatFilename(l:filename, a:mappings, submatch(1))', + \ 'g' + \) + endif + + if a:input isnot v:false && l:command =~# '%t' + " Create a temporary filename, / + " The file itself will not be created by this function. + let l:temporary_file = s:TemporaryFilename(a:buffer) + let l:command = substitute( + \ l:command, + \ '\v\%t(%(:h|:t|:r|:e)*)', + \ '\=s:FormatFilename(l:temporary_file, a:mappings, submatch(1))', + \ 'g' + \) + endif + + " Finish formatting so %% becomes %. + let l:command = substitute(l:command, '<>', '%', 'g') + + if a:pipe_file_if_needed && empty(l:temporary_file) + " If we are to send the Vim buffer to a command, we'll do it + " in the shell. We'll write out the file to a temporary file, + " and then read it back in, in the shell. + let l:temporary_file = s:TemporaryFilename(a:buffer) + let l:command = l:command . ' < ' . ale#Escape(l:temporary_file) + endif + + let l:file_created = ale#command#CreateTempFile( + \ a:buffer, + \ l:temporary_file, + \ a:input, + \) + + return [l:temporary_file, l:command, l:file_created] +endfunction + +function! ale#command#StopJobs(buffer, job_type) abort + let l:info = get(s:buffer_data, a:buffer, {}) + + if !empty(l:info) + let l:new_map = {} + + for [l:job_id, l:job_type] in items(l:info.jobs) + let l:job_id = str2nr(l:job_id) + + if a:job_type is# 'all' || a:job_type is# l:job_type + call ale#job#Stop(l:job_id) + else + let l:new_map[l:job_id] = l:job_type + endif + endfor + + let l:info.jobs = l:new_map + endif +endfunction + +function! s:GatherOutput(line_list, job_id, line) abort + call add(a:line_list, a:line) +endfunction + +function! s:ExitCallback(buffer, line_list, Callback, data) abort + if !has_key(s:buffer_data, a:buffer) + return + endif + + let l:jobs = s:buffer_data[a:buffer].jobs + + if !has_key(l:jobs, a:data.job_id) + return + endif + + let l:job_type = remove(l:jobs, a:data.job_id) + + if g:ale_history_enabled + call ale#history#SetExitCode(a:buffer, a:data.job_id, a:data.exit_code) + + " Log the output of the command for ALEInfo if we should. + if g:ale_history_log_output && a:data.log_output is 1 + call ale#history#RememberOutput( + \ a:buffer, + \ a:data.job_id, + \ a:line_list[:] + \) + endif + endif + + " If the callback starts any new jobs, use the same job type for them. + call setbufvar(a:buffer, 'ale_job_type', l:job_type) + let l:value = a:Callback(a:buffer, a:line_list, { + \ 'exit_code': a:data.exit_code, + \ 'temporary_file': a:data.temporary_file, + \}) + + let l:result = a:data.result + let l:result.value = l:value + + " Set the default cwd for this buffer in this call stack. + call ale#command#SetCwd(a:buffer, l:result.cwd) + + try + if get(l:result, 'result_callback', v:null) isnot v:null + call call(l:result.result_callback, [l:value]) + endif + finally + call ale#command#ResetCwd(a:buffer) + endtry +endfunction + +function! ale#command#Run(buffer, command, Callback, ...) abort + let l:options = get(a:000, 0, {}) + + if len(a:000) > 1 + throw 'Too many arguments!' + endif + + let l:output_stream = get(l:options, 'output_stream', 'stdout') + let l:line_list = [] + let l:cwd = get(l:options, 'cwd', v:null) + + if l:cwd is v:null + " Default the working directory to whatever it was for the last + " command run in the chain. + let l:cwd = get(get(s:buffer_data, a:buffer, {}), 'cwd', v:null) + endif + + let [l:temporary_file, l:command, l:file_created] = ale#command#FormatCommand( + \ a:buffer, + \ get(l:options, 'executable', ''), + \ a:command, + \ get(l:options, 'read_buffer', 0), + \ get(l:options, 'input', v:null), + \ l:cwd, + \ get(l:options, 'filename_mappings', []), + \) + let l:command = ale#job#PrepareCommand(a:buffer, l:command) + let l:job_options = { + \ 'exit_cb': {job_id, exit_code -> s:ExitCallback( + \ a:buffer, + \ l:line_list, + \ a:Callback, + \ { + \ 'job_id': job_id, + \ 'exit_code': exit_code, + \ 'temporary_file': l:temporary_file, + \ 'log_output': get(l:options, 'log_output', 1), + \ 'result': l:result, + \ } + \ )}, + \ 'mode': 'nl', + \} + + if l:output_stream is# 'stdout' + let l:job_options.out_cb = function('s:GatherOutput', [l:line_list]) + elseif l:output_stream is# 'stderr' + let l:job_options.err_cb = function('s:GatherOutput', [l:line_list]) + elseif l:output_stream is# 'both' + let l:job_options.out_cb = function('s:GatherOutput', [l:line_list]) + let l:job_options.err_cb = function('s:GatherOutput', [l:line_list]) + endif + + let l:status = 'failed' + + if get(g:, 'ale_run_synchronously') == 1 + if get(g:, 'ale_emulate_job_failure') == 1 + let l:job_id = 0 + else + " Generate a fake job ID for tests. + let s:fake_job_id = get(s:, 'fake_job_id', 0) + 1 + let l:job_id = s:fake_job_id + endif + elseif has('win32') + let l:job_id = ale#job#StartWithCmd(l:command, l:job_options) + else + let l:job_id = ale#job#Start(l:command, l:job_options) + endif + + if l:job_id + let l:status = 'started' + let l:job_type = getbufvar(a:buffer, 'ale_job_type', 'all') + + call ale#command#InitData(a:buffer) + let s:buffer_data[a:buffer].jobs[l:job_id] = l:job_type + endif + + if g:ale_history_enabled + call ale#history#Add(a:buffer, l:status, l:job_id, l:command) + endif + + if !l:job_id + return 0 + endif + + " We'll return this Dictionary. A `result_callback` can be assigned to it + " later for capturing the result of a:Callback. + " + " The `_deferred_job_id` is used for both checking the type of object, and + " for checking the job ID and status. + " + " The cwd is kept and used as the default value for the next command in + " the chain. + " + " The original command here is used in tests. + let l:result = { + \ '_deferred_job_id': l:job_id, + \ 'executable': get(l:options, 'executable', ''), + \ 'cwd': l:cwd, + \ 'command': a:command, + \} + + if get(g:, 'ale_run_synchronously') == 1 && l:job_id + if !exists('g:ale_run_synchronously_callbacks') + let g:ale_run_synchronously_callbacks = [] + endif + + if get(g:, 'ale_run_synchronously_emulate_commands', 0) + call add( + \ g:ale_run_synchronously_callbacks, + \ {exit_code, output -> [ + \ extend(l:line_list, output), + \ l:job_options.exit_cb(l:job_id, exit_code), + \ ]} + \) + else + " Run a command synchronously if this test option is set. + call extend(l:line_list, systemlist( + \ type(l:command) is v:t_list + \ ? join(l:command[0:1]) . ' ' . ale#Escape(l:command[2]) + \ : l:command + \)) + + " Don't capture output when the callbacks aren't set. + if !has_key(l:job_options, 'out_cb') + \&& !has_key(l:job_options, 'err_cb') + let l:line_list = [] + endif + + call add( + \ g:ale_run_synchronously_callbacks, + \ {-> l:job_options.exit_cb(l:job_id, v:shell_error)} + \) + endif + endif + + return l:result +endfunction + +function! ale#command#IsDeferred(value) abort + return type(a:value) is v:t_dict && has_key(a:value, '_deferred_job_id') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/completion.vim b/dot_vim/plugged/ale/autoload/ale/completion.vim new file mode 100644 index 0000000..c05ca53 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/completion.vim @@ -0,0 +1,1070 @@ +" Author: w0rp +" Description: Completion support for LSP linters +scriptencoding utf-8 + +" The omnicompletion menu is shown through a special Plug mapping which is +" only valid in Insert mode. This way, feedkeys() won't send these keys if you +" quit Insert mode quickly enough. +inoremap (ale_show_completion_menu) +" If we hit the key sequence in normal mode, then we won't show the menu, so +" we should restore the old settings right away. +nnoremap (ale_show_completion_menu) :call ale#completion#RestoreCompletionOptions() +cnoremap (ale_show_completion_menu) +vnoremap (ale_show_completion_menu) +onoremap (ale_show_completion_menu) + +let g:ale_completion_delay = get(g:, 'ale_completion_delay', 100) +let g:ale_completion_excluded_words = get(g:, 'ale_completion_excluded_words', []) +let g:ale_completion_max_suggestions = get(g:, 'ale_completion_max_suggestions', 50) +let g:ale_completion_autoimport = get(g:, 'ale_completion_autoimport', 1) +let g:ale_completion_tsserver_remove_warnings = get(g:, 'ale_completion_tsserver_remove_warnings', 0) + +let s:timer_id = -1 +let s:last_done_pos = [] + +" CompletionItemKind values from the LSP protocol. +let g:ale_lsp_types = { +\ 1: 'text', +\ 2: 'method', +\ 3: 'function', +\ 4: 'constructor', +\ 5: 'field', +\ 6: 'variable', +\ 7: 'class', +\ 8: 'interface', +\ 9: 'module', +\ 10: 'property', +\ 11: 'unit', +\ 12: 'value', +\ 13: 'enum', +\ 14: 'keyword', +\ 15: 'snippet', +\ 16: 'color', +\ 17: 'file', +\ 18: 'reference', +\ 19: 'folder', +\ 20: 'enum_member', +\ 21: 'constant', +\ 22: 'struct', +\ 23: 'event', +\ 24: 'operator', +\ 25: 'type_parameter', +\ } + +" from https://github.com/microsoft/TypeScript/blob/29becf05012bfa7ba20d50b0d16813971e46b8a6/lib/protocol.d.ts#L2472 +let g:ale_tsserver_types = { +\ 'warning': 'text', +\ 'keyword': 'keyword', +\ 'script': 'file', +\ 'module': 'module', +\ 'class': 'class', +\ 'local class': 'class', +\ 'interface': 'interface', +\ 'type': 'class', +\ 'enum': 'enum', +\ 'enum member': 'enum_member', +\ 'var': 'variable', +\ 'local var': 'variable', +\ 'function': 'function', +\ 'local function': 'function', +\ 'method': 'method', +\ 'getter': 'property', +\ 'setter': 'method', +\ 'property': 'property', +\ 'constructor': 'constructor', +\ 'call': 'method', +\ 'index': 'index', +\ 'construct': 'constructor', +\ 'parameter': 'parameter', +\ 'type parameter': 'type_parameter', +\ 'primitive type': 'unit', +\ 'label': 'text', +\ 'alias': 'class', +\ 'const': 'constant', +\ 'let': 'variable', +\ 'directory': 'folder', +\ 'external module name': 'text', +\ 'JSX attribute': 'parameter', +\ 'string': 'text' +\ } + +" For compatibility reasons, we only use built in VIM completion kinds +" See :help complete-items for Vim completion kinds +let g:ale_completion_symbols = get(g:, 'ale_completion_symbols', { +\ 'text': 'v', +\ 'method': 'f', +\ 'function': 'f', +\ 'constructor': 'f', +\ 'field': 'm', +\ 'variable': 'v', +\ 'class': 't', +\ 'interface': 't', +\ 'module': 'd', +\ 'property': 'm', +\ 'unit': 'v', +\ 'value': 'v', +\ 'enum': 't', +\ 'keyword': 'v', +\ 'snippet': 'v', +\ 'color': 'v', +\ 'file': 'v', +\ 'reference': 'v', +\ 'folder': 'v', +\ 'enum_member': 'm', +\ 'constant': 'm', +\ 'struct': 't', +\ 'event': 'v', +\ 'operator': 'f', +\ 'type_parameter': 'p', +\ '': 'v' +\ }) + +let s:LSP_INSERT_TEXT_FORMAT_PLAIN = 1 +let s:LSP_INSERT_TEXT_FORMAT_SNIPPET = 2 + +let s:lisp_regex = '\v[a-zA-Z_\-][a-zA-Z_\-0-9]*$' + +" Regular expressions for checking the characters in the line before where +" the insert cursor is. If one of these matches, we'll check for completions. +let s:should_complete_map = { +\ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$', +\ 'clojure': s:lisp_regex, +\ 'lisp': s:lisp_regex, +\ 'racket': '\k\+$', +\ 'typescript': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|''$|"$', +\ 'rust': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$', +\ 'cpp': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$|-\>$', +\ 'c': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|-\>$', +\} + +" Regular expressions for finding the start column to replace with completion. +let s:omni_start_map = { +\ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', +\ 'racket': '\k\+$', +\} + +" A map of exact characters for triggering LSP completions. Do not forget to +" update self.input_patterns in ale.py in updating entries in this map. +let s:trigger_character_map = { +\ '': ['.'], +\ 'typescript': ['.', '''', '"'], +\ 'rust': ['.', '::'], +\ 'cpp': ['.', '::', '->'], +\ 'c': ['.', '->'], +\} + +function! s:GetFiletypeValue(map, filetype) abort + for l:part in reverse(split(a:filetype, '\.')) + let l:regex = get(a:map, l:part, []) + + if !empty(l:regex) + return l:regex + endif + endfor + + " Use the default regex for other files. + return a:map[''] +endfunction + +" Check if we should look for completions for a language. +function! ale#completion#GetPrefix(filetype, line, column) abort + let l:regex = s:GetFiletypeValue(s:should_complete_map, a:filetype) + + " The column we're using completions for is where we are inserting text, + " like so: + " abc + " ^ + " So we need check the text in the column before that position. + return matchstr(getline(a:line)[: a:column - 2], l:regex) +endfunction + +function! ale#completion#GetTriggerCharacter(filetype, prefix) abort + if empty(a:prefix) + return '' + endif + + let l:char_list = s:GetFiletypeValue(s:trigger_character_map, a:filetype) + + if index(l:char_list, a:prefix) >= 0 + return a:prefix + endif + + return '' +endfunction + +function! ale#completion#Filter( +\ buffer, +\ filetype, +\ suggestions, +\ prefix, +\ exact_prefix_match, +\) abort + let l:excluded_words = ale#Var(a:buffer, 'completion_excluded_words') + + if empty(a:prefix) + let l:filtered_suggestions = a:suggestions + else + let l:triggers = s:GetFiletypeValue(s:trigger_character_map, a:filetype) + + " For completing... + " foo. + " ^ + " We need to include all of the given suggestions. + if index(l:triggers, a:prefix) >= 0 || empty(a:prefix) + let l:filtered_suggestions = a:suggestions + else + let l:filtered_suggestions = [] + + " Filter suggestions down to those starting with the prefix we + " used for finding suggestions in the first place. + " + " Some completion tools will include suggestions which don't even + " start with the characters we have already typed. + for l:item in a:suggestions + " A List of String values or a List of completion item + " Dictionaries is accepted here. + let l:word = type(l:item) is v:t_string ? l:item : l:item.word + + if a:exact_prefix_match + " Add suggestions if the word is an exact match. + if l:word is# a:prefix + call add(l:filtered_suggestions, l:item) + endif + else + " Add suggestions if the suggestion starts with a + " case-insensitive match for the prefix. + if l:word[: len(a:prefix) - 1] is? a:prefix + call add(l:filtered_suggestions, l:item) + endif + endif + endfor + endif + endif + + if !empty(l:excluded_words) + " Copy the List if needed. We don't want to modify the argument. + " We shouldn't make a copy if we don't need to. + if l:filtered_suggestions is a:suggestions + let l:filtered_suggestions = copy(a:suggestions) + endif + + " Remove suggestions with words in the exclusion List. + call filter( + \ l:filtered_suggestions, + \ 'index(l:excluded_words, type(v:val) is v:t_string ? v:val : v:val.word) < 0', + \) + endif + + return l:filtered_suggestions +endfunction + +function! s:ReplaceCompletionOptions(source) abort + " Remember the old omnifunc value, if there is one. + " If we don't store an old one, we'll just never reset the option. + " This will stop some random exceptions from appearing. + if !exists('b:ale_old_omnifunc') && !empty(&l:omnifunc) + let b:ale_old_omnifunc = &l:omnifunc + endif + + let &l:omnifunc = 'ale#completion#AutomaticOmniFunc' + + if a:source is# 'ale-automatic' + if !exists('b:ale_old_completeopt') + let b:ale_old_completeopt = &l:completeopt + endif + + let l:opt_list = split(&l:completeopt, ',') + " The menu and noinsert options must be set, or automatic completion + " will be annoying. + let l:new_opt_list = ['menu', 'menuone', 'noinsert'] + + " Permit some other completion options, provided users have set them. + for l:opt in ['preview', 'popup', 'noselect'] + if index(l:opt_list, l:opt) >= 0 + call add(l:new_opt_list, l:opt) + endif + endfor + + let &l:completeopt = join(l:new_opt_list, ',') + endif +endfunction + +function! ale#completion#RestoreCompletionOptions() abort + " Reset settings when completion is done. + if exists('b:ale_old_omnifunc') + if b:ale_old_omnifunc isnot# 'pythoncomplete#Complete' + let &l:omnifunc = b:ale_old_omnifunc + endif + + unlet b:ale_old_omnifunc + endif + + if exists('b:ale_old_completeopt') + let &l:completeopt = b:ale_old_completeopt + unlet b:ale_old_completeopt + endif +endfunction + +function! ale#completion#GetCompletionPosition() abort + if !exists('b:ale_completion_info') + return 0 + endif + + let l:line = b:ale_completion_info.line + let l:column = b:ale_completion_info.column + let l:regex = s:GetFiletypeValue(s:omni_start_map, &filetype) + let l:up_to_column = getline(l:line)[: l:column - 2] + let l:match = matchstr(l:up_to_column, l:regex) + + return l:column - len(l:match) - 1 +endfunction + +function! ale#completion#GetCompletionPositionForDeoplete(input) abort + return match(a:input, '\k*$') +endfunction + +function! ale#completion#GetCompletionResult() abort + if exists('b:ale_completion_result') + return b:ale_completion_result + endif + + return v:null +endfunction + +function! ale#completion#AutomaticOmniFunc(findstart, base) abort + if a:findstart + return ale#completion#GetCompletionPosition() + else + let l:result = ale#completion#GetCompletionResult() + + let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '') + + if l:source is# 'ale-automatic' || l:source is# 'ale-manual' + call s:ReplaceCompletionOptions(l:source) + endif + + return l:result isnot v:null ? l:result : [] + endif +endfunction + +function! s:OpenCompletionMenu(...) abort + if !&l:paste + call ale#util#FeedKeys("\(ale_show_completion_menu)") + endif +endfunction + +function! ale#completion#Show(result) abort + let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '') + + if ale#util#Mode() isnot# 'i' && l:source isnot# 'ale-import' + return + endif + + " Set the list in the buffer. + let b:ale_completion_result = a:result + + " Don't try to open the completion menu if there's nothing to show. + if empty(b:ale_completion_result) + if l:source is# 'ale-import' + " If we ran completion from :ALEImport, + " tell the user that nothing is going to happen. + call s:message('No possible imports found.') + endif + + return + endif + + " Replace completion options shortly before opening the menu. + if l:source is# 'ale-automatic' || l:source is# 'ale-manual' + call s:ReplaceCompletionOptions(l:source) + + call timer_start(0, function('s:OpenCompletionMenu')) + endif + + if l:source is# 'ale-callback' + call b:CompleteCallback(b:ale_completion_result) + endif + + if l:source is# 'ale-import' + call ale#completion#HandleUserData(b:ale_completion_result[0]) + + let l:text_changed = '' . g:ale_lint_on_text_changed + + " Check the buffer again right away, if linting is enabled. + if g:ale_enabled + \&& ( + \ l:text_changed is# '1' + \ || l:text_changed is# 'always' + \ || l:text_changed is# 'normal' + \ || l:text_changed is# 'insert' + \) + call ale#Queue(0, '') + endif + endif +endfunction + +function! ale#completion#GetAllTriggers() abort + return deepcopy(s:trigger_character_map) +endfunction + +function! ale#completion#GetCompletionKind(kind) abort + let l:lsp_symbol = get(g:ale_lsp_types, a:kind, '') + + if !empty(l:lsp_symbol) + return l:lsp_symbol + endif + + return get(g:ale_tsserver_types, a:kind, '') +endfunction + +function! ale#completion#GetCompletionSymbols(kind) abort + let l:kind = ale#completion#GetCompletionKind(a:kind) + let l:symbol = get(g:ale_completion_symbols, l:kind, '') + + if !empty(l:symbol) + return l:symbol + endif + + return get(g:ale_completion_symbols, '', 'v') +endfunction + +function! s:CompletionStillValid(request_id) abort + let [l:line, l:column] = getpos('.')[1:2] + + return has_key(b:, 'ale_completion_info') + \&& ( + \ ale#util#Mode() is# 'i' + \ || b:ale_completion_info.source is# 'ale-import' + \) + \&& b:ale_completion_info.request_id == a:request_id + \&& b:ale_completion_info.line == l:line + \&& ( + \ b:ale_completion_info.column == l:column + \ || b:ale_completion_info.source is# 'ale-omnifunc' + \ || b:ale_completion_info.source is# 'ale-callback' + \ || b:ale_completion_info.source is# 'ale-import' + \) +endfunction + +function! ale#completion#ParseTSServerCompletions(response) abort + let l:names = [] + + for l:suggestion in a:response.body + let l:kind = get(l:suggestion, 'kind', '') + + if g:ale_completion_tsserver_remove_warnings == 0 || l:kind isnot# 'warning' + call add(l:names, { + \ 'word': l:suggestion.name, + \ 'source': get(l:suggestion, 'source', ''), + \}) + endif + endfor + + return l:names +endfunction + +function! ale#completion#ParseTSServerCompletionEntryDetails(response) abort + let l:buffer = bufnr('') + let l:results = [] + let l:names_with_details = [] + let l:info = get(b:, 'ale_completion_info', {}) + + for l:suggestion in a:response.body + let l:displayParts = [] + let l:local_name = v:null + + for l:action in get(l:suggestion, 'codeActions', []) + call add(l:displayParts, l:action.description . ' ') + endfor + + for l:part in l:suggestion.displayParts + " Stop on stop on line breaks for the menu. + if get(l:part, 'kind') is# 'lineBreak' + break + endif + + if get(l:part, 'kind') is# 'localName' + let l:local_name = l:part.text + endif + + call add(l:displayParts, l:part.text) + endfor + + " Each one of these parts has 'kind' properties + let l:documentationParts = [] + + for l:part in get(l:suggestion, 'documentation', []) + call add(l:documentationParts, l:part.text) + endfor + + " See :help complete-items + let l:result = { + \ 'word': ( + \ l:suggestion.name is# 'default' + \ && l:suggestion.kind is# 'alias' + \ && !empty(l:local_name) + \ ? l:local_name + \ : l:suggestion.name + \ ), + \ 'kind': ale#completion#GetCompletionSymbols(l:suggestion.kind), + \ 'icase': 1, + \ 'menu': join(l:displayParts, ''), + \ 'dup': get(l:info, 'additional_edits_only', 0) + \ || g:ale_completion_autoimport, + \ 'info': join(l:documentationParts, ''), + \} + " This flag is used to tell if this completion came from ALE or not. + let l:user_data = {'_ale_completion_item': 1} + + if has_key(l:suggestion, 'codeActions') + let l:user_data.code_actions = l:suggestion.codeActions + endif + + let l:result.user_data = json_encode(l:user_data) + + " Include this item if we'll accept any items, + " or if we only want items with additional edits, and this has them. + if !get(l:info, 'additional_edits_only', 0) + \|| has_key(l:user_data, 'code_actions') + call add(l:results, l:result) + endif + endfor + + let l:names = getbufvar(l:buffer, 'ale_tsserver_completion_names', []) + + if !empty(l:names) && len(l:names) != len(l:results) + let l:names_with_details = map(copy(l:results), 'v:val.word') + let l:missing_names = filter( + \ copy(l:names), + \ 'index(l:names_with_details, v:val.word) < 0', + \) + + for l:name in l:missing_names + call add(l:results, { + \ 'word': l:name.word, + \ 'kind': 'v', + \ 'icase': 1, + \ 'menu': '', + \ 'info': '', + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \}) + endfor + endif + + return l:results +endfunction + +function! ale#completion#NullFilter(buffer, item) abort + return 1 +endfunction + +function! ale#completion#ParseLSPCompletions(response) abort + let l:buffer = bufnr('') + let l:info = get(b:, 'ale_completion_info', {}) + let l:Filter = get(l:info, 'completion_filter', v:null) + + if l:Filter is v:null + let l:Filter = function('ale#completion#NullFilter') + else + let l:Filter = ale#util#GetFunction(l:Filter) + endif + + let l:item_list = [] + + if type(get(a:response, 'result')) is v:t_list + let l:item_list = a:response.result + elseif type(get(a:response, 'result')) is v:t_dict + \&& type(get(a:response.result, 'items')) is v:t_list + let l:item_list = a:response.result.items + endif + + let l:results = [] + + for l:item in l:item_list + if !call(l:Filter, [l:buffer, l:item]) + continue + endif + + if get(l:item, 'insertTextFormat', s:LSP_INSERT_TEXT_FORMAT_PLAIN) is s:LSP_INSERT_TEXT_FORMAT_PLAIN + \&& type(get(l:item, 'textEdit')) is v:t_dict + let l:text = l:item.textEdit.newText + elseif type(get(l:item, 'insertText')) is v:t_string + let l:text = l:item.insertText + else + let l:text = l:item.label + endif + + let l:word = matchstr(l:text, '\v^[^(]+') + + if empty(l:word) + continue + endif + + " Don't use LSP items with additional text edits when autoimport for + " completions is turned off. + if !empty(get(l:item, 'additionalTextEdits')) + \&& !( + \ get(l:info, 'additional_edits_only', 0) + \ || g:ale_completion_autoimport + \) + continue + endif + + let l:doc = get(l:item, 'documentation', '') + + if type(l:doc) is v:t_dict && has_key(l:doc, 'value') + let l:doc = l:doc.value + endif + + " Collapse whitespaces and line breaks into a single space. + let l:detail = substitute(get(l:item, 'detail', ''), '\_s\+', ' ', 'g') + + let l:result = { + \ 'word': l:word, + \ 'kind': ale#completion#GetCompletionSymbols(get(l:item, 'kind', '')), + \ 'icase': 1, + \ 'menu': l:detail, + \ 'dup': get(l:info, 'additional_edits_only', 0) + \ || g:ale_completion_autoimport, + \ 'info': (type(l:doc) is v:t_string ? l:doc : ''), + \} + " This flag is used to tell if this completion came from ALE or not. + let l:user_data = {'_ale_completion_item': 1} + + if has_key(l:item, 'additionalTextEdits') + \ && l:item.additionalTextEdits isnot v:null + let l:text_changes = [] + + for l:edit in l:item.additionalTextEdits + call add(l:text_changes, { + \ 'start': { + \ 'line': l:edit.range.start.line + 1, + \ 'offset': l:edit.range.start.character + 1, + \ }, + \ 'end': { + \ 'line': l:edit.range.end.line + 1, + \ 'offset': l:edit.range.end.character + 1, + \ }, + \ 'newText': l:edit.newText, + \}) + endfor + + if !empty(l:text_changes) + let l:user_data.code_actions = [{ + \ 'description': 'completion', + \ 'changes': [ + \ { + \ 'fileName': expand('#' . l:buffer . ':p'), + \ 'textChanges': l:text_changes, + \ }, + \ ], + \}] + endif + endif + + let l:result.user_data = json_encode(l:user_data) + + " Include this item if we'll accept any items, + " or if we only want items with additional edits, and this has them. + if !get(l:info, 'additional_edits_only', 0) + \|| has_key(l:user_data, 'code_actions') + call add(l:results, l:result) + endif + endfor + + if has_key(l:info, 'prefix') + let l:results = ale#completion#Filter( + \ l:buffer, + \ &filetype, + \ l:results, + \ l:info.prefix, + \ get(l:info, 'additional_edits_only', 0), + \) + endif + + return l:results[: g:ale_completion_max_suggestions - 1] +endfunction + +function! ale#completion#HandleTSServerResponse(conn_id, response) abort + if !s:CompletionStillValid(get(a:response, 'request_seq')) + return + endif + + if !has_key(a:response, 'body') + return + endif + + let l:buffer = bufnr('') + let l:command = get(a:response, 'command', '') + + if l:command is# 'completions' + let l:names = ale#completion#Filter( + \ l:buffer, + \ &filetype, + \ ale#completion#ParseTSServerCompletions(a:response), + \ b:ale_completion_info.prefix, + \ get(b:ale_completion_info, 'additional_edits_only', 0), + \)[: g:ale_completion_max_suggestions - 1] + + " We need to remember some names for tsserver, as it doesn't send + " details back for everything we send. + call setbufvar(l:buffer, 'ale_tsserver_completion_names', l:names) + + if empty(l:names) + " Response with no results now and skip making a redundant request + " for nothing. + call ale#completion#Show([]) + else + let l:identifiers = [] + + for l:name in l:names + let l:identifier = { + \ 'name': l:name.word, + \} + let l:source = get(l:name, 'source', '') + + " Empty source results in no details for the completed item + if !empty(l:source) + call extend(l:identifier, { 'source': l:source }) + endif + + call add(l:identifiers, l:identifier) + endfor + + let b:ale_completion_info.request_id = ale#lsp#Send( + \ b:ale_completion_info.conn_id, + \ ale#lsp#tsserver_message#CompletionEntryDetails( + \ l:buffer, + \ b:ale_completion_info.line, + \ b:ale_completion_info.column, + \ l:identifiers, + \ ), + \) + endif + elseif l:command is# 'completionEntryDetails' + call ale#completion#Show( + \ ale#completion#ParseTSServerCompletionEntryDetails(a:response), + \) + endif +endfunction + + +function! ale#completion#HandleLSPResponse(conn_id, response) abort + if !s:CompletionStillValid(get(a:response, 'id')) + return + endif + + call ale#completion#Show( + \ ale#completion#ParseLSPCompletions(a:response), + \) +endfunction + +function! s:OnReady(linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'completion') + return + endif + + let l:buffer = a:lsp_details.buffer + + " If we have sent a completion request already, don't send another. + if b:ale_completion_info.request_id + return + endif + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#completion#HandleTSServerResponse') + \ : function('ale#completion#HandleLSPResponse') + call ale#lsp#RegisterCallback(l:id, l:Callback) + + if a:linter.lsp is# 'tsserver' + if get(g:, 'ale_completion_tsserver_autoimport') is 1 + " no-custom-checks + echom '`g:ale_completion_tsserver_autoimport` is deprecated. Use `g:ale_completion_autoimport` instead.' + endif + + let l:message = ale#lsp#tsserver_message#Completions( + \ l:buffer, + \ b:ale_completion_info.line, + \ b:ale_completion_info.column, + \ b:ale_completion_info.prefix, + \ get(b:ale_completion_info, 'additional_edits_only', 0) + \ || g:ale_completion_autoimport, + \) + else + " Send a message saying the buffer has changed first, otherwise + " completions won't know what text is nearby. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + " For LSP completions, we need to clamp the column to the length of + " the line. python-language-server and perhaps others do not implement + " this correctly. + let l:message = ale#lsp#message#Completion( + \ l:buffer, + \ b:ale_completion_info.line, + \ b:ale_completion_info.column, + \ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix), + \) + endif + + let l:request_id = ale#lsp#Send(l:id, l:message) + + if l:request_id + let b:ale_completion_info.conn_id = l:id + let b:ale_completion_info.request_id = l:request_id + + if has_key(a:linter, 'completion_filter') + let b:ale_completion_info.completion_filter = a:linter.completion_filter + endif + endif +endfunction + +" This function can be called to check if ALE can provide completion data for +" the current buffer. 1 will be returned if there's a potential source of +" completion data ALE can use, and 0 will be returned otherwise. +function! ale#completion#CanProvideCompletions() abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + return 1 + endif + endfor + + return 0 +endfunction + +" This function can be used to manually trigger autocomplete, even when +" g:ale_completion_enabled is set to false +function! ale#completion#GetCompletions(...) abort + let l:source = get(a:000, 0, '') + let l:options = get(a:000, 1, {}) + + if len(a:000) > 2 + throw 'Too many arguments!' + endif + + let l:CompleteCallback = get(l:options, 'callback', v:null) + + if l:CompleteCallback isnot v:null + let b:CompleteCallback = l:CompleteCallback + endif + + if has_key(l:options, 'line') && has_key(l:options, 'column') + " Use a provided line and column, if given. + let l:line = l:options.line + let l:column = l:options.column + else + let [l:line, l:column] = getpos('.')[1:2] + endif + + if has_key(l:options, 'prefix') + let l:prefix = l:options.prefix + else + let l:prefix = ale#completion#GetPrefix(&filetype, l:line, l:column) + endif + + if l:source is# 'ale-automatic' && empty(l:prefix) + return 0 + endif + + let l:line_length = len(getline('.')) + + let b:ale_completion_info = { + \ 'line': l:line, + \ 'line_length': l:line_length, + \ 'column': l:column, + \ 'prefix': l:prefix, + \ 'conn_id': 0, + \ 'request_id': 0, + \ 'source': l:source, + \} + unlet! b:ale_completion_result + + if has_key(l:options, 'additional_edits_only') + let b:ale_completion_info.additional_edits_only = + \ l:options.additional_edits_only + endif + + let l:buffer = bufnr('') + let l:Callback = function('s:OnReady') + + let l:started = 0 + + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + if ale#lsp_linter#StartLSP(l:buffer, l:linter, l:Callback) + let l:started = 1 + endif + endif + endfor + + return l:started +endfunction + +function! s:message(message) abort + call ale#util#Execute('echom ' . string(a:message)) +endfunction + +" This function implements the :ALEImport command. +function! ale#completion#Import() abort + let l:word = expand('') + + if empty(l:word) + call s:message('Nothing to complete at cursor!') + + return + endif + + let [l:line, l:column] = getpos('.')[1:2] + let l:column = searchpos('\V' . escape(l:word, '/\'), 'bnc', l:line)[1] + let l:column = l:column + len(l:word) - 1 + + if l:column isnot 0 + let l:started = ale#completion#GetCompletions('ale-import', { + \ 'line': l:line, + \ 'column': l:column, + \ 'prefix': l:word, + \ 'additional_edits_only': 1, + \}) + + if !l:started + call s:message('No completion providers are available.') + endif + endif +endfunction + +function! ale#completion#OmniFunc(findstart, base) abort + if a:findstart + let l:started = ale#completion#GetCompletions('ale-omnifunc') + + if !l:started + " This is the special value for cancelling completions silently. + " See :help complete-functions + return -3 + endif + + return ale#completion#GetCompletionPosition() + else + let l:result = ale#completion#GetCompletionResult() + + while l:result is v:null && !complete_check() + sleep 2ms + let l:result = ale#completion#GetCompletionResult() + endwhile + + return l:result isnot v:null ? l:result : [] + endif +endfunction + +function! s:TimerHandler(...) abort + if !get(b:, 'ale_completion_enabled', g:ale_completion_enabled) + return + endif + + let s:timer_id = -1 + + let [l:line, l:column] = getpos('.')[1:2] + + " When running the timer callback, we have to be sure that the cursor + " hasn't moved from where it was when we requested completions by typing. + if s:timer_pos == [l:line, l:column] && ale#util#Mode() is# 'i' + call ale#completion#GetCompletions('ale-automatic') + endif +endfunction + +" Stop any completion timer that is queued. This is useful for tests. +function! ale#completion#StopTimer() abort + if s:timer_id != -1 + call timer_stop(s:timer_id) + endif + + let s:timer_id = -1 +endfunction + +function! ale#completion#Queue() abort + if !get(b:, 'ale_completion_enabled', g:ale_completion_enabled) + return + endif + + let s:timer_pos = getpos('.')[1:2] + + if s:timer_pos == s:last_done_pos + " Do not ask for completions if the cursor rests on the position we + " last completed on. + return + endif + + " If we changed the text again while we're still waiting for a response, + " then invalidate the requests before the timer ticks again. + if exists('b:ale_completion_info') + let b:ale_completion_info.request_id = 0 + endif + + call ale#completion#StopTimer() + + let s:timer_id = timer_start(g:ale_completion_delay, function('s:TimerHandler')) +endfunction + +function! ale#completion#HandleUserData(completed_item) abort + let l:user_data_json = get(a:completed_item, 'user_data', '') + let l:user_data = type(l:user_data_json) is v:t_dict + \ ? l:user_data_json + \ : ale#util#FuzzyJSONDecode(l:user_data_json, {}) + + if !has_key(l:user_data, '_ale_completion_item') + return + endif + + let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '') + + if l:source is# 'ale-automatic' + \|| l:source is# 'ale-manual' + \|| l:source is# 'ale-callback' + \|| l:source is# 'ale-import' + \|| l:source is# 'ale-omnifunc' + for l:code_action in get(l:user_data, 'code_actions', []) + call ale#code_action#HandleCodeAction(l:code_action, {}) + endfor + endif + + silent doautocmd User ALECompletePost +endfunction + +function! ale#completion#Done() abort + silent! pclose + + call ale#completion#RestoreCompletionOptions() + + let s:last_done_pos = getpos('.')[1:2] +endfunction + +augroup ALECompletionActions + autocmd! + + autocmd CompleteDone * call ale#completion#HandleUserData(v:completed_item) +augroup END + +function! s:Setup(enabled) abort + augroup ALECompletionGroup + autocmd! + + if a:enabled + autocmd TextChangedI * call ale#completion#Queue() + autocmd CompleteDone * call ale#completion#Done() + endif + augroup END + + if !a:enabled + augroup! ALECompletionGroup + endif +endfunction + +function! ale#completion#Enable() abort + let g:ale_completion_enabled = 1 + call s:Setup(1) +endfunction + +function! ale#completion#Disable() abort + let g:ale_completion_enabled = 0 + call s:Setup(0) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/completion/python.vim b/dot_vim/plugged/ale/autoload/ale/completion/python.vim new file mode 100644 index 0000000..6b65c5b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/completion/python.vim @@ -0,0 +1,3 @@ +function! ale#completion#python#CompletionItemFilter(buffer, item) abort + return a:item.label !~# '\v^__[a-z_]+__' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/cursor.vim b/dot_vim/plugged/ale/autoload/ale/cursor.vim new file mode 100644 index 0000000..c83bbcb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/cursor.vim @@ -0,0 +1,189 @@ +scriptencoding utf-8 +" Author: w0rp +" Author: João Paulo S. de Souza +" Description: Echoes lint message for the current line, if any + +" Controls the milliseconds delay before echoing a message. +let g:ale_echo_delay = get(g:, 'ale_echo_delay', 10) +" A string format for the echoed message. +let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%code: %%s') + +let s:cursor_timer = -1 + +" A wrapper for echon so we can test messages we echo in Vader tests. +function! ale#cursor#Echom(message) abort + " no-custom-checks + exec "norm! :echom a:message\n" +endfunction + +function! ale#cursor#TruncatedEcho(original_message) abort + let l:message = a:original_message + " Change tabs to spaces. + let l:message = substitute(l:message, "\t", ' ', 'g') + " Remove any newlines in the message. + let l:message = substitute(l:message, "\n", '', 'g') + " Convert indentation groups into single spaces for better legibility when + " put on a single line + let l:message = substitute(l:message, ' \+', ' ', 'g') + + " We need to remember the setting for shortmess and reset it again. + let l:shortmess_options = &l:shortmess + + try + let l:cursor_position = getpos('.') + + " The message is truncated and saved to the history. + silent! setlocal shortmess+=T + + try + call ale#cursor#Echom(l:message) + catch /^Vim\%((\a\+)\)\=:E523/ + " Fallback into manual truncate (#1987) + let l:winwidth = winwidth(0) + + if l:winwidth < strdisplaywidth(l:message) + " Truncate message longer than window width with trailing '...' + let l:message = l:message[:l:winwidth - 4] . '...' + endif + + exec 'echomsg l:message' + catch /E481/ + " Do nothing if running from a visual selection. + endtry + + " Reset the cursor position if we moved off the end of the line. + " Using :norm and :echomsg can move the cursor off the end of the + " line. + if l:cursor_position != getpos('.') + call setpos('.', l:cursor_position) + endif + finally + let &l:shortmess = l:shortmess_options + endtry +endfunction + +function! s:StopCursorTimer() abort + if s:cursor_timer != -1 + call timer_stop(s:cursor_timer) + let s:cursor_timer = -1 + endif +endfunction + +function! ale#cursor#EchoCursorWarning(...) abort + let l:buffer = bufnr('') + + if !g:ale_echo_cursor && !g:ale_cursor_detail + return + endif + + " Only echo the warnings in normal mode, otherwise we will get problems. + if mode(1) isnot# 'n' + return + endif + + if ale#ShouldDoNothing(l:buffer) + return + endif + + let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) + + if g:ale_echo_cursor + if !empty(l:loc) + let l:format = ale#Var(l:buffer, 'echo_msg_format') + let l:msg = ale#GetLocItemMessage(l:loc, l:format) + call ale#cursor#TruncatedEcho(l:msg) + let l:info.echoed = 1 + elseif get(l:info, 'echoed') + " We'll only clear the echoed message when moving off errors once, + " so we don't continually clear the echo line. + " + " no-custom-checks + echo + let l:info.echoed = 0 + endif + endif + + if g:ale_cursor_detail + if !empty(l:loc) + call s:ShowCursorDetailForItem(l:loc, {'stay_here': 1}) + else + call ale#preview#CloseIfTypeMatches('ale-preview') + endif + endif +endfunction + +function! ale#cursor#EchoCursorWarningWithDelay() abort + let l:buffer = bufnr('') + + if !g:ale_echo_cursor && !g:ale_cursor_detail + return + endif + + " Only echo the warnings in normal mode, otherwise we will get problems. + if mode(1) isnot# 'n' + return + endif + + call s:StopCursorTimer() + + let l:pos = getpos('.')[0:2] + + if !exists('w:last_pos') + let w:last_pos = [0, 0, 0] + endif + + " Check the current buffer, line, and column number against the last + " recorded position. If the position has actually changed, *then* + " we should echo something. Otherwise we can end up doing processing + " the echo message far too frequently. + if l:pos != w:last_pos + let l:delay = ale#Var(l:buffer, 'echo_delay') + + let w:last_pos = l:pos + let s:cursor_timer = timer_start( + \ l:delay, + \ function('ale#cursor#EchoCursorWarning') + \) + endif +endfunction + +function! s:ShowCursorDetailForItem(loc, options) abort + let l:stay_here = get(a:options, 'stay_here', 0) + + let s:last_detailed_line = line('.') + let l:message = get(a:loc, 'detail', a:loc.text) + let l:lines = split(l:message, "\n") + + if g:ale_floating_preview || g:ale_detail_to_floating_preview + call ale#floating_preview#Show(l:lines) + else + call ale#preview#Show(l:lines, {'stay_here': l:stay_here}) + + " Clear the echo message if we manually displayed details. + if !l:stay_here + " no-custom-checks + echo + endif + endif +endfunction + +function! ale#cursor#ShowCursorDetail() abort + let l:buffer = bufnr('') + + " Only echo the warnings in normal mode, otherwise we will get problems. + if mode() isnot# 'n' + return + endif + + if ale#ShouldDoNothing(l:buffer) + return + endif + + call s:StopCursorTimer() + + let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) + + if !empty(l:loc) + call s:ShowCursorDetailForItem(l:loc, {'stay_here': 0}) + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/d.vim b/dot_vim/plugged/ale/autoload/ale/d.vim new file mode 100644 index 0000000..0e23220 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/d.vim @@ -0,0 +1,16 @@ +" Author: Auri +" Description: Functions for integrating with D linters. + +function! ale#d#FindDUBConfig(buffer) abort + " Find a DUB configuration file in ancestor paths. + " The most DUB-specific names will be tried first. + for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json'] + let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename) + + if !empty(l:dub_file) + return l:dub_file + endif + endfor + + return '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/debugging.vim b/dot_vim/plugged/ale/autoload/ale/debugging.vim new file mode 100644 index 0000000..31f3078 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/debugging.vim @@ -0,0 +1,276 @@ +" Author: w0rp +" Description: This file implements debugging information for ALE + +let s:global_variable_list = [ +\ 'ale_cache_executable_check_failures', +\ 'ale_change_sign_column_color', +\ 'ale_command_wrapper', +\ 'ale_completion_delay', +\ 'ale_completion_enabled', +\ 'ale_completion_max_suggestions', +\ 'ale_disable_lsp', +\ 'ale_echo_cursor', +\ 'ale_echo_msg_error_str', +\ 'ale_echo_msg_format', +\ 'ale_echo_msg_info_str', +\ 'ale_echo_msg_warning_str', +\ 'ale_enabled', +\ 'ale_fix_on_save', +\ 'ale_fixers', +\ 'ale_history_enabled', +\ 'ale_history_log_output', +\ 'ale_keep_list_window_open', +\ 'ale_lint_delay', +\ 'ale_lint_on_enter', +\ 'ale_lint_on_filetype_changed', +\ 'ale_lint_on_insert_leave', +\ 'ale_lint_on_save', +\ 'ale_lint_on_text_changed', +\ 'ale_linter_aliases', +\ 'ale_linters', +\ 'ale_linters_explicit', +\ 'ale_linters_ignore', +\ 'ale_list_vertical', +\ 'ale_list_window_size', +\ 'ale_loclist_msg_format', +\ 'ale_max_buffer_history_size', +\ 'ale_max_signs', +\ 'ale_maximum_file_size', +\ 'ale_open_list', +\ 'ale_pattern_options', +\ 'ale_pattern_options_enabled', +\ 'ale_root', +\ 'ale_set_balloons', +\ 'ale_set_highlights', +\ 'ale_set_loclist', +\ 'ale_set_quickfix', +\ 'ale_set_signs', +\ 'ale_sign_column_always', +\ 'ale_sign_error', +\ 'ale_sign_info', +\ 'ale_sign_offset', +\ 'ale_sign_style_error', +\ 'ale_sign_style_warning', +\ 'ale_sign_warning', +\ 'ale_sign_highlight_linenrs', +\ 'ale_statusline_format', +\ 'ale_type_map', +\ 'ale_use_global_executables', +\ 'ale_virtualtext_cursor', +\ 'ale_warn_about_trailing_blank_lines', +\ 'ale_warn_about_trailing_whitespace', +\] + +function! s:Echo(message) abort + " no-custom-checks + echo a:message +endfunction + +function! s:GetLinterVariables(filetype, exclude_linter_names) abort + let l:variable_list = [] + let l:filetype_parts = split(a:filetype, '\.') + + for l:key in keys(g:) + " Extract variable names like: 'ale_python_flake8_executable' + let l:match = matchlist(l:key, '\v^ale_([^_]+)_([^_]+)_.+$') + + " Include matching variables. + if !empty(l:match) + \&& index(l:filetype_parts, l:match[1]) >= 0 + \&& index(a:exclude_linter_names, l:match[2]) == -1 + call add(l:variable_list, l:key) + endif + endfor + + call sort(l:variable_list) + + return l:variable_list +endfunction + +function! s:EchoLinterVariables(variable_list) abort + for l:key in a:variable_list + call s:Echo('let g:' . l:key . ' = ' . string(g:[l:key])) + + if has_key(b:, l:key) + call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key])) + endif + endfor +endfunction + +function! s:EchoGlobalVariables() abort + for l:key in s:global_variable_list + call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null))) + + if has_key(b:, l:key) + call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key])) + endif + endfor +endfunction + +" Echo a command that was run. +function! s:EchoCommand(item) abort + let l:status_message = a:item.status + + " Include the exit code in output if we have it. + if a:item.status is# 'finished' + let l:status_message .= ' - exit code ' . a:item.exit_code + endif + + call s:Echo('(' . l:status_message . ') ' . string(a:item.command)) + + if g:ale_history_log_output && has_key(a:item, 'output') + if empty(a:item.output) + call s:Echo('') + call s:Echo('<<>>') + call s:Echo('') + else + call s:Echo('') + call s:Echo('<<>>') + + for l:line in a:item.output + call s:Echo(l:line) + endfor + + call s:Echo('<<>>') + call s:Echo('') + endif + endif +endfunction + +" Echo the results of an executable check. +function! s:EchoExecutable(item) abort + call s:Echo(printf( + \ '(executable check - %s) %s', + \ a:item.status ? 'success' : 'failure', + \ a:item.command, + \)) +endfunction + +function! s:EchoCommandHistory() abort + let l:buffer = bufnr('%') + + for l:item in ale#history#Get(l:buffer) + if l:item.job_id is# 'executable' + call s:EchoExecutable(l:item) + else + call s:EchoCommand(l:item) + endif + endfor +endfunction + +function! s:EchoLinterAliases(all_linters) abort + let l:first = 1 + + for l:linter in a:all_linters + if !empty(l:linter.aliases) + if l:first + call s:Echo(' Linter Aliases:') + endif + + let l:first = 0 + + call s:Echo(string(l:linter.name) . ' -> ' . string(l:linter.aliases)) + endif + endfor +endfunction + +function! s:EchoLSPErrorMessages(all_linter_names) abort + let l:lsp_error_messages = get(g:, 'ale_lsp_error_messages', {}) + let l:header_echoed = 0 + + for l:linter_name in a:all_linter_names + let l:error_list = get(l:lsp_error_messages, l:linter_name, []) + + if !empty(l:error_list) + if !l:header_echoed + call s:Echo(' LSP Error Messages:') + call s:Echo('') + endif + + call s:Echo('(Errors for ' . l:linter_name . ')') + + for l:message in l:error_list + for l:line in split(l:message, "\n") + call s:Echo(l:line) + endfor + endfor + endif + endfor +endfunction + +function! ale#debugging#Info() abort + let l:buffer = bufnr('') + let l:filetype = &filetype + + " We get the list of enabled linters for free by the above function. + let l:enabled_linters = deepcopy(ale#linter#Get(l:filetype)) + + " But have to build the list of available linters ourselves. + let l:all_linters = [] + let l:linter_variable_list = [] + + for l:part in split(l:filetype, '\.') + let l:aliased_filetype = ale#linter#ResolveFiletype(l:part) + call extend(l:all_linters, ale#linter#GetAll(l:aliased_filetype)) + endfor + + let l:all_names = map(copy(l:all_linters), 'v:val[''name'']') + let l:enabled_names = map(copy(l:enabled_linters), 'v:val[''name'']') + let l:exclude_names = filter(copy(l:all_names), 'index(l:enabled_names, v:val) == -1') + + " Load linter variables to display + " This must be done after linters are loaded. + let l:variable_list = s:GetLinterVariables(l:filetype, l:exclude_names) + + let l:fixers = ale#fix#registry#SuggestedFixers(l:filetype) + let l:fixers = uniq(sort(l:fixers[0] + l:fixers[1])) + let l:fixers_string = join(map(copy(l:fixers), '"\n " . v:val'), '') + + let l:non_ignored_names = map( + \ copy(ale#linter#RemoveIgnored(l:buffer, l:filetype, l:enabled_linters)), + \ 'v:val[''name'']', + \) + let l:ignored_names = filter( + \ copy(l:enabled_names), + \ 'index(l:non_ignored_names, v:val) < 0' + \) + + call s:Echo(' Current Filetype: ' . l:filetype) + call s:Echo('Available Linters: ' . string(l:all_names)) + call s:EchoLinterAliases(l:all_linters) + call s:Echo(' Enabled Linters: ' . string(l:enabled_names)) + call s:Echo(' Ignored Linters: ' . string(l:ignored_names)) + call s:Echo(' Suggested Fixers: ' . l:fixers_string) + call s:Echo(' Linter Variables:') + call s:Echo('') + call s:EchoLinterVariables(l:variable_list) + call s:Echo(' Global Variables:') + call s:Echo('') + call s:EchoGlobalVariables() + call s:EchoLSPErrorMessages(l:all_names) + call s:Echo(' Command History:') + call s:Echo('') + call s:EchoCommandHistory() +endfunction + +function! ale#debugging#InfoToClipboard() abort + if !has('clipboard') + call s:Echo('clipboard not available. Try :ALEInfoToFile instead.') + + return + endif + + let l:output = execute('call ale#debugging#Info()') + + let @+ = l:output + call s:Echo('ALEInfo copied to your clipboard') +endfunction + +function! ale#debugging#InfoToFile(filename) abort + let l:expanded_filename = expand(a:filename) + + let l:output = execute('call ale#debugging#Info()') + + call writefile(split(l:output, "\n"), l:expanded_filename) + call s:Echo('ALEInfo written to ' . l:expanded_filename) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/definition.vim b/dot_vim/plugged/ale/autoload/ale/definition.vim new file mode 100644 index 0000000..fd6cd2e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/definition.vim @@ -0,0 +1,224 @@ +" Author: w0rp +" Description: Go to definition support for LSP linters. + +let s:go_to_definition_map = {} + +" Enable automatic updates of the tagstack +let g:ale_update_tagstack = get(g:, 'ale_update_tagstack', 1) +let g:ale_default_navigation = get(g:, 'ale_default_navigation', 'buffer') + +" Used to get the definition map in tests. +function! ale#definition#GetMap() abort + return deepcopy(s:go_to_definition_map) +endfunction + +" Used to set the definition map in tests. +function! ale#definition#SetMap(map) abort + let s:go_to_definition_map = a:map +endfunction + +function! ale#definition#ClearLSPData() abort + let s:go_to_definition_map = {} +endfunction + +function! ale#definition#UpdateTagStack() abort + let l:should_update_tagstack = exists('*gettagstack') && exists('*settagstack') && g:ale_update_tagstack + + if l:should_update_tagstack + " Grab the old location (to jump back to) and the word under the + " cursor (as a label for the tagstack) + let l:old_location = [bufnr('%'), line('.'), col('.'), 0] + let l:tagname = expand('') + let l:winid = win_getid() + call settagstack(l:winid, {'items': [{'from': l:old_location, 'tagname': l:tagname}]}, 'a') + call settagstack(l:winid, {'curidx': len(gettagstack(l:winid)['items']) + 1}) + endif +endfunction + +function! ale#definition#HandleTSServerResponse(conn_id, response) abort + if has_key(a:response, 'request_seq') + \&& has_key(s:go_to_definition_map, a:response.request_seq) + let l:options = remove(s:go_to_definition_map, a:response.request_seq) + + if get(a:response, 'success', v:false) is v:true && !empty(a:response.body) + let l:filename = a:response.body[0].file + let l:line = a:response.body[0].start.line + let l:column = a:response.body[0].start.offset + + call ale#definition#UpdateTagStack() + call ale#util#Open(l:filename, l:line, l:column, l:options) + endif + endif +endfunction + +function! ale#definition#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:go_to_definition_map, a:response.id) + let l:options = remove(s:go_to_definition_map, a:response.id) + + " The result can be a Dictionary item, a List of the same, or null. + let l:result = get(a:response, 'result', v:null) + + if type(l:result) is v:t_dict + let l:result = [l:result] + elseif type(l:result) isnot v:t_list + let l:result = [] + endif + + for l:item in l:result + if has_key(l:item, 'targetUri') + " LocationLink items use targetUri + let l:uri = l:item.targetUri + let l:line = l:item.targetRange.start.line + 1 + let l:column = l:item.targetRange.start.character + 1 + else + " LocationLink items use uri + let l:uri = l:item.uri + let l:line = l:item.range.start.line + 1 + let l:column = l:item.range.start.character + 1 + endif + + call ale#definition#UpdateTagStack() + + let l:uri_handler = ale#uri#GetURIHandler(l:uri) + + if l:uri_handler is# v:null + let l:filename = ale#path#FromFileURI(l:uri) + call ale#util#Open(l:filename, l:line, l:column, l:options) + else + call l:uri_handler.OpenURILink(l:uri, l:line, l:column, l:options, a:conn_id) + endif + + break + endfor + endif +endfunction + +function! s:OnReady(line, column, options, capability, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, a:capability) + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#definition#HandleTSServerResponse') + \ : function('ale#definition#HandleLSPResponse') + call ale#lsp#RegisterCallback(l:id, l:Callback) + + if a:linter.lsp is# 'tsserver' + if a:capability is# 'definition' + let l:message = ale#lsp#tsserver_message#Definition( + \ l:buffer, + \ a:line, + \ a:column + \) + elseif a:capability is# 'typeDefinition' + let l:message = ale#lsp#tsserver_message#TypeDefinition( + \ l:buffer, + \ a:line, + \ a:column + \) + elseif a:capability is# 'implementation' + let l:message = ale#lsp#tsserver_message#Implementation( + \ l:buffer, + \ a:line, + \ a:column + \) + endif + else + " Send a message saying the buffer has changed first, or the + " definition position probably won't make sense. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + " For LSP completions, we need to clamp the column to the length of + " the line. python-language-server and perhaps others do not implement + " this correctly. + if a:capability is# 'definition' + let l:message = ale#lsp#message#Definition(l:buffer, a:line, a:column) + elseif a:capability is# 'typeDefinition' + let l:message = ale#lsp#message#TypeDefinition(l:buffer, a:line, a:column) + elseif a:capability is# 'implementation' + let l:message = ale#lsp#message#Implementation(l:buffer, a:line, a:column) + else + " XXX: log here? + return + endif + endif + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:go_to_definition_map[l:request_id] = { + \ 'open_in': get(a:options, 'open_in', 'current-buffer'), + \} +endfunction + +function! s:GoToLSPDefinition(linter, options, capability) abort + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + let l:column = min([l:column, len(getline(l:line))]) + + let l:Callback = function( + \ 's:OnReady', + \ [l:line, l:column, a:options, a:capability] + \) + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#definition#GoTo(options) abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call s:GoToLSPDefinition(l:linter, a:options, 'definition') + endif + endfor +endfunction + +function! ale#definition#GoToType(options) abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call s:GoToLSPDefinition(l:linter, a:options, 'typeDefinition') + endif + endfor +endfunction + +function! ale#definition#GoToImpl(options) abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call s:GoToLSPDefinition(l:linter, a:options, 'implementation') + endif + endfor +endfunction + +function! ale#definition#GoToCommandHandler(command, ...) abort + let l:options = {} + + if len(a:000) > 0 + for l:option in a:000 + if l:option is? '-tab' + let l:options.open_in = 'tab' + elseif l:option is? '-split' + let l:options.open_in = 'split' + elseif l:option is? '-vsplit' + let l:options.open_in = 'vsplit' + endif + endfor + endif + + if !has_key(l:options, 'open_in') + let l:default_navigation = ale#Var(bufnr(''), 'default_navigation') + + if index(['tab', 'split', 'vsplit'], l:default_navigation) >= 0 + let l:options.open_in = l:default_navigation + endif + endif + + if a:command is# 'type' + call ale#definition#GoToType(l:options) + elseif a:command is# 'implementation' + call ale#definition#GoToImpl(l:options) + else + call ale#definition#GoTo(l:options) + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/dhall.vim b/dot_vim/plugged/ale/autoload/ale/dhall.vim new file mode 100644 index 0000000..cc54418 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/dhall.vim @@ -0,0 +1,24 @@ +" Author: Pat Brisbin , toastal +" Description: Functions for working with Dhall’s executable + +call ale#Set('dhall_executable', 'dhall') +call ale#Set('dhall_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('dhall_options', '') + +function! ale#dhall#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'dhall_executable') + + " Dhall is written in Haskell and commonly installed with Stack + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'dhall') +endfunction + +function! ale#dhall#GetExecutableWithOptions(buffer) abort + let l:executable = ale#dhall#GetExecutable(a:buffer) + + return l:executable + \ . ale#Pad(ale#Var(a:buffer, 'dhall_options')) +endfunction + +function! ale#dhall#GetCommand(buffer) abort + return '%e ' . ale#Pad(ale#Var(a:buffer, 'dhall_options')) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/engine.vim b/dot_vim/plugged/ale/autoload/ale/engine.vim new file mode 100644 index 0000000..150bbc8 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/engine.vim @@ -0,0 +1,738 @@ +" Author: w0rp +" Description: Backend execution and job management +" Executes linters in the background, using NeoVim or Vim 8 jobs + +" Remapping of linter problems. +let g:ale_type_map = get(g:, 'ale_type_map', {}) +let g:ale_filename_mappings = get(g:, 'ale_filename_mappings', {}) + +if !has_key(s:, 'executable_cache_map') + let s:executable_cache_map = {} +endif + +function! ale#engine#CleanupEveryBuffer() abort + for l:key in keys(g:ale_buffer_info) + " The key could be a filename or a buffer number, so try and + " convert it to a number. We need a number for the other + " functions. + let l:buffer = str2nr(l:key) + + if l:buffer > 0 + " Stop all jobs and clear the results for everything, and delete + " all of the data we stored for the buffer. + call ale#engine#Cleanup(l:buffer) + endif + endfor +endfunction + +function! ale#engine#MarkLinterActive(info, linter) abort + let l:found = 0 + + for l:other_linter in a:info.active_linter_list + if l:other_linter.name is# a:linter.name + let l:found = 1 + break + endif + endfor + + if !l:found + call add(a:info.active_linter_list, a:linter) + endif +endfunction + +function! ale#engine#MarkLinterInactive(info, linter_name) abort + call filter(a:info.active_linter_list, 'v:val.name isnot# a:linter_name') +endfunction + +function! ale#engine#ResetExecutableCache() abort + let s:executable_cache_map = {} +endfunction + +" Check if files are executable, and if they are, remember that they are +" for subsequent calls. We'll keep checking until programs can be executed. +function! ale#engine#IsExecutable(buffer, executable) abort + if empty(a:executable) + " Don't log the executable check if the executable string is empty. + return 0 + endif + + " Check for a cached executable() check. + let l:result = get(s:executable_cache_map, a:executable, v:null) + + if l:result isnot v:null + return l:result + endif + + " Check if the file is executable, and convert -1 to 1. + let l:result = executable(a:executable) isnot 0 + + " Cache the executable check if we found it, or if the option to cache + " failing checks is on. + if l:result || get(g:, 'ale_cache_executable_check_failures', 0) + let s:executable_cache_map[a:executable] = l:result + endif + + if g:ale_history_enabled + call ale#history#Add(a:buffer, l:result, 'executable', a:executable) + endif + + return l:result +endfunction + +function! ale#engine#InitBufferInfo(buffer) abort + if !has_key(g:ale_buffer_info, a:buffer) + " active_linter_list will hold the list of active linter names + " loclist holds the loclist items after all jobs have completed. + let g:ale_buffer_info[a:buffer] = { + \ 'active_linter_list': [], + \ 'active_other_sources_list': [], + \ 'loclist': [], + \} + + return 1 + endif + + return 0 +endfunction + +" This function is documented and part of the public API. +" +" Return 1 if ALE is busy checking a given buffer +function! ale#engine#IsCheckingBuffer(buffer) abort + let l:info = get(g:ale_buffer_info, a:buffer, {}) + + return !empty(get(l:info, 'active_linter_list', [])) + \ || !empty(get(l:info, 'active_other_sources_list', [])) +endfunction + +function! ale#engine#HandleLoclist(linter_name, buffer, loclist, from_other_source) abort + let l:info = get(g:ale_buffer_info, a:buffer, {}) + + if empty(l:info) + return + endif + + if !a:from_other_source + " Remove this linter from the list of active linters. + " This may have already been done when the job exits. + call filter(l:info.active_linter_list, 'v:val.name isnot# a:linter_name') + endif + + " Make some adjustments to the loclists to fix common problems, and also + " to set default values for loclist items. + let l:linter_loclist = ale#engine#FixLocList( + \ a:buffer, + \ a:linter_name, + \ a:from_other_source, + \ a:loclist, + \) + + " Remove previous items for this linter. + call filter(l:info.loclist, 'v:val.linter_name isnot# a:linter_name') + + " We don't need to add items or sort the list when this list is empty. + if !empty(l:linter_loclist) + " Add the new items. + call extend(l:info.loclist, l:linter_loclist) + + " Sort the loclist again. + " We need a sorted list so we can run a binary search against it + " for efficient lookup of the messages in the cursor handler. + call sort(l:info.loclist, 'ale#util#LocItemCompare') + endif + + if ale#ShouldDoNothing(a:buffer) + return + endif + + call ale#engine#SetResults(a:buffer, l:info.loclist) +endfunction + +function! s:HandleExit(job_info, buffer, output, data) abort + let l:buffer_info = get(g:ale_buffer_info, a:buffer) + + if empty(l:buffer_info) + return + endif + + let l:linter = a:job_info.linter + let l:executable = a:job_info.executable + + " Remove this job from the list. + call ale#engine#MarkLinterInactive(l:buffer_info, l:linter.name) + + " Stop here if we land in the handle for a job completing if we're in + " a sandbox. + if ale#util#InSandbox() + return + endif + + if has('nvim') && !empty(a:output) && empty(a:output[-1]) + call remove(a:output, -1) + endif + + try + let l:loclist = ale#util#GetFunction(l:linter.callback)(a:buffer, a:output) + " Handle the function being unknown, or being deleted. + catch /E700/ + let l:loclist = [] + endtry + + call ale#engine#HandleLoclist(l:linter.name, a:buffer, l:loclist, 0) +endfunction + +function! ale#engine#SetResults(buffer, loclist) abort + let l:linting_is_done = !ale#engine#IsCheckingBuffer(a:buffer) + + " Set signs first. This could potentially fix some line numbers. + " The List could be sorted again here by SetSigns. + if g:ale_set_signs + call ale#sign#SetSigns(a:buffer, a:loclist) + endif + + if g:ale_set_quickfix || g:ale_set_loclist + call ale#list#SetLists(a:buffer, a:loclist) + endif + + if exists('*ale#statusline#Update') + " Don't load/run if not already loaded. + call ale#statusline#Update(a:buffer, a:loclist) + endif + + if g:ale_set_highlights + call ale#highlight#SetHighlights(a:buffer, a:loclist) + endif + + if g:ale_virtualtext_cursor is# 'all' || g:ale_virtualtext_cursor == 2 + call ale#virtualtext#SetTexts(a:buffer, a:loclist) + endif + + if l:linting_is_done + if g:ale_echo_cursor + " Try and echo the warning now. + " This will only do something meaningful if we're in normal mode. + call ale#cursor#EchoCursorWarning() + endif + + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 + " Try and show the warning now. + " This will only do something meaningful if we're in normal mode. + call ale#virtualtext#ShowCursorWarning() + endif + + " Reset the save event marker, used for opening windows, etc. + call setbufvar(a:buffer, 'ale_save_event_fired', 0) + " Set a marker showing how many times a buffer has been checked. + call setbufvar( + \ a:buffer, + \ 'ale_linted', + \ getbufvar(a:buffer, 'ale_linted', 0) + 1 + \) + + " Automatically remove all managed temporary files and directories + " now that all jobs have completed. + call ale#command#RemoveManagedFiles(a:buffer) + + " Call user autocommands. This allows users to hook into ALE's lint cycle. + silent doautocmd User ALELintPost + endif +endfunction + +function! s:RemapItemTypes(type_map, loclist) abort + for l:item in a:loclist + let l:key = l:item.type + \ . (get(l:item, 'sub_type', '') is# 'style' ? 'S' : '') + let l:new_key = get(a:type_map, l:key, '') + + if l:new_key is# 'E' + \|| l:new_key is# 'ES' + \|| l:new_key is# 'W' + \|| l:new_key is# 'WS' + \|| l:new_key is# 'I' + let l:item.type = l:new_key[0] + + if l:new_key is# 'ES' || l:new_key is# 'WS' + let l:item.sub_type = 'style' + elseif has_key(l:item, 'sub_type') + call remove(l:item, 'sub_type') + endif + endif + endfor +endfunction + +function! ale#engine#FixLocList(buffer, linter_name, from_other_source, loclist) abort + let l:mappings = ale#GetFilenameMappings(a:buffer, a:linter_name) + + if !empty(l:mappings) + " We need to apply reverse filename mapping here. + let l:mappings = ale#filename_mapping#Invert(l:mappings) + endif + + let l:bufnr_map = {} + let l:new_loclist = [] + + " Some errors have line numbers beyond the end of the file, + " so we need to adjust them so they set the error at the last line + " of the file instead. + let l:last_line_number = ale#util#GetLineCount(a:buffer) + + for l:old_item in a:loclist + " Copy the loclist item with some default values and corrections. + " + " line and column numbers will be converted to numbers. + " The buffer will default to the buffer being checked. + " The vcol setting will default to 0, a byte index. + " The error type will default to 'E' for errors. + " The error number will default to -1. + " + " The line number and text are the only required keys. + " + " The linter_name will be set on the errors so it can be used in + " output, filtering, etc.. + let l:item = { + \ 'bufnr': a:buffer, + \ 'text': l:old_item.text, + \ 'lnum': str2nr(l:old_item.lnum), + \ 'col': str2nr(get(l:old_item, 'col', 0)), + \ 'vcol': 0, + \ 'type': get(l:old_item, 'type', 'E'), + \ 'nr': get(l:old_item, 'nr', -1), + \ 'linter_name': a:linter_name, + \} + + if a:from_other_source + let l:item.from_other_source = 1 + endif + + if has_key(l:old_item, 'code') + let l:item.code = l:old_item.code + endif + + let l:old_name = get(l:old_item, 'filename', '') + + " Map parsed from output to local filesystem files. + if !empty(l:old_name) && !empty(l:mappings) + let l:old_name = ale#filename_mapping#Map(l:old_name, l:mappings) + endif + + if !empty(l:old_name) && !ale#path#IsTempName(l:old_name) + " Use the filename given. + " Temporary files are assumed to be for this buffer, + " and the filename is not included then, because it looks bad + " in the loclist window. + let l:filename = l:old_name + let l:item.filename = l:filename + + if has_key(l:old_item, 'bufnr') + " If a buffer number is also given, include that too. + " If Vim detects that he buffer number is valid, it will + " be used instead of the filename. + let l:item.bufnr = l:old_item.bufnr + elseif has_key(l:bufnr_map, l:filename) + " Get the buffer number from the map, which can be faster. + let l:item.bufnr = l:bufnr_map[l:filename] + else + " Look up the buffer number. + let l:item.bufnr = bufnr(l:filename) + let l:bufnr_map[l:filename] = l:item.bufnr + endif + elseif has_key(l:old_item, 'bufnr') + let l:item.bufnr = l:old_item.bufnr + endif + + if has_key(l:old_item, 'detail') + let l:item.detail = l:old_item.detail + endif + + " Pass on a end_col key if set, used for highlights. + if has_key(l:old_item, 'end_col') + let l:item.end_col = str2nr(l:old_item.end_col) + endif + + if has_key(l:old_item, 'end_lnum') + let l:item.end_lnum = str2nr(l:old_item.end_lnum) + + " When the error ends after the end of the file, put it at the + " end. This is only done for the current buffer. + if l:item.bufnr == a:buffer && l:item.end_lnum > l:last_line_number + let l:item.end_lnum = l:last_line_number + endif + endif + + if has_key(l:old_item, 'sub_type') + let l:item.sub_type = l:old_item.sub_type + endif + + if l:item.lnum < 1 + " When errors appear before line 1, put them at line 1. + let l:item.lnum = 1 + elseif l:item.bufnr == a:buffer && l:item.lnum > l:last_line_number + " When errors go beyond the end of the file, put them at the end. + " This is only done for the current buffer. + let l:item.lnum = l:last_line_number + elseif get(l:old_item, 'vcol', 0) + " Convert virtual column positions to byte positions. + " The positions will be off if the buffer has changed recently. + let l:line = getbufline(a:buffer, l:item.lnum)[0] + + let l:item.col = ale#util#Col(l:line, l:item.col) + + if has_key(l:item, 'end_col') + let l:end_line = get(l:item, 'end_lnum', l:line) != l:line + \ ? getbufline(a:buffer, l:item.end_lnum)[0] + \ : l:line + + let l:item.end_col = ale#util#Col(l:end_line, l:item.end_col) + endif + endif + + call add(l:new_loclist, l:item) + endfor + + let l:type_map = get(ale#Var(a:buffer, 'type_map'), a:linter_name, {}) + + if !empty(l:type_map) + call s:RemapItemTypes(l:type_map, l:new_loclist) + endif + + return l:new_loclist +endfunction + +" Given part of a command, replace any % with %%, so that no characters in +" the string will be replaced with filenames, etc. +function! ale#engine#EscapeCommandPart(command_part) abort + " TODO: Emit deprecation warning here later. + return ale#command#EscapeCommandPart(a:command_part) +endfunction + +" Run a job. +" +" Returns 1 when a job was started successfully. +function! s:RunJob(command, options) abort + if ale#command#IsDeferred(a:command) + let a:command.result_callback = { + \ command -> s:RunJob(command, a:options) + \} + + return 1 + endif + + let l:command = a:command + + if empty(l:command) + return 0 + endif + + let l:cwd = a:options.cwd + let l:executable = a:options.executable + let l:buffer = a:options.buffer + let l:linter = a:options.linter + let l:output_stream = a:options.output_stream + let l:read_buffer = a:options.read_buffer && !a:options.lint_file + let l:info = g:ale_buffer_info[l:buffer] + + let l:Callback = function('s:HandleExit', [{ + \ 'linter': l:linter, + \ 'executable': l:executable, + \}]) + let l:result = ale#command#Run(l:buffer, l:command, l:Callback, { + \ 'cwd': l:cwd, + \ 'output_stream': l:output_stream, + \ 'executable': l:executable, + \ 'read_buffer': l:read_buffer, + \ 'log_output': 1, + \ 'filename_mappings': ale#GetFilenameMappings(l:buffer, l:linter.name), + \}) + + " Only proceed if the job is being run. + if empty(l:result) + return 0 + endif + + call ale#engine#MarkLinterActive(l:info, l:linter) + + silent doautocmd User ALEJobStarted + + return 1 +endfunction + +function! s:StopCurrentJobs(buffer, clear_lint_file_jobs, linter_slots) abort + let l:info = get(g:ale_buffer_info, a:buffer, {}) + call ale#command#StopJobs(a:buffer, 'linter') + + " Update the active linter list, clearing out anything not running. + if a:clear_lint_file_jobs + call ale#command#StopJobs(a:buffer, 'file_linter') + let l:info.active_linter_list = [] + else + let l:lint_file_map = {} + + " Use a previously computed map of `lint_file` values to find + " linters that are used for linting files. + for [l:lint_file, l:linter] in a:linter_slots + if l:lint_file is 1 + let l:lint_file_map[l:linter.name] = 1 + endif + endfor + + " Keep jobs for linting files when we're only linting buffers. + call filter(l:info.active_linter_list, 'get(l:lint_file_map, v:val.name)') + endif +endfunction + +function! ale#engine#Stop(buffer) abort + call s:StopCurrentJobs(a:buffer, 1, []) +endfunction + +function! s:RemoveProblemsForDisabledLinters(buffer, linters) abort + " Figure out which linters are still enabled, and remove + " problems for linters which are no longer enabled. + " Problems from other sources will be kept. + let l:name_map = {} + + for l:linter in a:linters + let l:name_map[l:linter.name] = 1 + endfor + + call filter( + \ get(g:ale_buffer_info[a:buffer], 'loclist', []), + \ 'get(v:val, ''from_other_source'') || get(l:name_map, get(v:val, ''linter_name''))', + \) +endfunction + +function! s:AddProblemsFromOtherBuffers(buffer, linters) abort + let l:filename = expand('#' . a:buffer . ':p') + let l:loclist = [] + let l:name_map = {} + + " Build a map of the active linters. + for l:linter in a:linters + let l:name_map[l:linter.name] = 1 + endfor + + " Find the items from other buffers, for the linters that are enabled. + for l:info in values(g:ale_buffer_info) + for l:item in l:info.loclist + if has_key(l:item, 'filename') + \&& l:item.filename is# l:filename + \&& has_key(l:name_map, l:item.linter_name) + " Copy the items and set the buffer numbers to this one. + let l:new_item = copy(l:item) + let l:new_item.bufnr = a:buffer + call add(l:loclist, l:new_item) + endif + endfor + endfor + + if !empty(l:loclist) + call sort(l:loclist, function('ale#util#LocItemCompareWithText')) + call uniq(l:loclist, function('ale#util#LocItemCompareWithText')) + + " Set the loclist variable, used by some parts of ALE. + let g:ale_buffer_info[a:buffer].loclist = l:loclist + call ale#engine#SetResults(a:buffer, l:loclist) + endif +endfunction + +function! s:RunIfExecutable(buffer, linter, lint_file, executable) abort + if ale#command#IsDeferred(a:executable) + let a:executable.result_callback = { + \ executable -> s:RunIfExecutable( + \ a:buffer, + \ a:linter, + \ a:lint_file, + \ executable + \ ) + \} + + return 1 + endif + + if ale#engine#IsExecutable(a:buffer, a:executable) + " Use different job types for file or linter jobs. + let l:job_type = a:lint_file ? 'file_linter' : 'linter' + call setbufvar(a:buffer, 'ale_job_type', l:job_type) + + " Get the cwd for the linter and set it before we call GetCommand. + " This will ensure that ale#command#Run uses it by default. + let l:cwd = ale#linter#GetCwd(a:buffer, a:linter) + + if l:cwd isnot v:null + call ale#command#SetCwd(a:buffer, l:cwd) + endif + + let l:command = ale#linter#GetCommand(a:buffer, a:linter) + + if l:cwd isnot v:null + call ale#command#ResetCwd(a:buffer) + endif + + let l:options = { + \ 'cwd': l:cwd, + \ 'executable': a:executable, + \ 'buffer': a:buffer, + \ 'linter': a:linter, + \ 'output_stream': get(a:linter, 'output_stream', 'stdout'), + \ 'read_buffer': a:linter.read_buffer, + \ 'lint_file': a:lint_file, + \} + + return s:RunJob(l:command, l:options) + endif + + return 0 +endfunction + +" Run a linter for a buffer. +" +" Returns 1 if the linter was successfully run. +function! s:RunLinter(buffer, linter, lint_file) abort + if !empty(a:linter.lsp) + return ale#lsp_linter#CheckWithLSP(a:buffer, a:linter) + else + let l:executable = ale#linter#GetExecutable(a:buffer, a:linter) + + return s:RunIfExecutable(a:buffer, a:linter, a:lint_file, l:executable) + endif + + return 0 +endfunction + +function! s:GetLintFileSlots(buffer, linters) abort + let l:linter_slots = [] + + for l:linter in a:linters + let l:LintFile = l:linter.lint_file + + if type(l:LintFile) is v:t_func + let l:LintFile = l:LintFile(a:buffer) + endif + + call add(l:linter_slots, [l:LintFile, l:linter]) + endfor + + return l:linter_slots +endfunction + +function! s:GetLintFileValues(slots, Callback) abort + let l:deferred_list = [] + let l:new_slots = [] + + for [l:lint_file, l:linter] in a:slots + while ale#command#IsDeferred(l:lint_file) && has_key(l:lint_file, 'value') + " If we've already computed the return value, use it. + let l:lint_file = l:lint_file.value + endwhile + + if ale#command#IsDeferred(l:lint_file) + " If we are going to return the result later, wait for it. + call add(l:deferred_list, l:lint_file) + else + " If we have the value now, coerce it to 0 or 1. + let l:lint_file = l:lint_file is 1 + endif + + call add(l:new_slots, [l:lint_file, l:linter]) + endfor + + if !empty(l:deferred_list) + for l:deferred in l:deferred_list + let l:deferred.result_callback = + \ {-> s:GetLintFileValues(l:new_slots, a:Callback)} + endfor + else + call a:Callback(l:new_slots) + endif +endfunction + +function! s:RunLinters( +\ buffer, +\ linters, +\ slots, +\ should_lint_file, +\ new_buffer, +\) abort + call s:StopCurrentJobs(a:buffer, a:should_lint_file, a:slots) + call s:RemoveProblemsForDisabledLinters(a:buffer, a:linters) + + " We can only clear the results if we aren't checking the buffer. + let l:can_clear_results = !ale#engine#IsCheckingBuffer(a:buffer) + + silent doautocmd User ALELintPre + + for [l:lint_file, l:linter] in a:slots + " Only run lint_file linters if we should. + if !l:lint_file || a:should_lint_file + if s:RunLinter(a:buffer, l:linter, l:lint_file) + " If a single linter ran, we shouldn't clear everything. + let l:can_clear_results = 0 + endif + else + " If we skipped running a lint_file linter still in the list, + " we shouldn't clear everything. + let l:can_clear_results = 0 + endif + endfor + + " Clear the results if we can. This needs to be done when linters are + " disabled, or ALE itself is disabled. + if l:can_clear_results + call ale#engine#SetResults(a:buffer, []) + elseif a:new_buffer + call s:AddProblemsFromOtherBuffers( + \ a:buffer, + \ map(copy(a:slots), 'v:val[1]') + \) + endif +endfunction + +function! ale#engine#RunLinters(buffer, linters, should_lint_file) abort + " Initialise the buffer information if needed. + let l:new_buffer = ale#engine#InitBufferInfo(a:buffer) + + call s:GetLintFileValues( + \ s:GetLintFileSlots(a:buffer, a:linters), + \ { + \ slots -> s:RunLinters( + \ a:buffer, + \ a:linters, + \ slots, + \ a:should_lint_file, + \ l:new_buffer, + \ ) + \ } + \) +endfunction + +" Clean up a buffer. +" +" This function will stop all current jobs for the buffer, +" clear the state of everything, and remove the Dictionary for managing +" the buffer. +function! ale#engine#Cleanup(buffer) abort + " Don't bother with cleanup code when newer NeoVim versions are exiting. + if get(v:, 'exiting', v:null) isnot v:null + return + endif + + if exists('*ale#lsp#CloseDocument') + call ale#lsp#CloseDocument(a:buffer) + endif + + if !has_key(g:ale_buffer_info, a:buffer) + return + endif + + call ale#engine#RunLinters(a:buffer, [], 1) + + call remove(g:ale_buffer_info, a:buffer) +endfunction + +" Given a buffer number, return the warnings and errors for a given buffer. +function! ale#engine#GetLoclist(buffer) abort + if !has_key(g:ale_buffer_info, a:buffer) + return [] + endif + + return g:ale_buffer_info[a:buffer].loclist +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/engine/ignore.vim b/dot_vim/plugged/ale/autoload/ale/engine/ignore.vim new file mode 100644 index 0000000..8057465 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/engine/ignore.vim @@ -0,0 +1,50 @@ +" Author: w0rp +" Description: Code for ignoring linters. Only loaded and if configured. + +" Given a filetype and a configuration for ignoring linters, return a List of +" Strings for linter names to ignore. +function! ale#engine#ignore#GetList(filetype, config) abort + if type(a:config) is v:t_list + return a:config + endif + + if type(a:config) is v:t_dict + let l:names_to_remove = [] + + for l:part in split(a:filetype , '\.') + call extend(l:names_to_remove, get(a:config, l:part, [])) + endfor + + return l:names_to_remove + endif + + return [] +endfunction + +" Given a List of linter descriptions, exclude the linters to be ignored. +function! ale#engine#ignore#Exclude(filetype, all_linters, config, disable_lsp) abort + let l:names_to_remove = ale#engine#ignore#GetList(a:filetype, a:config) + let l:filtered_linters = [] + + for l:linter in a:all_linters + let l:name_list = [l:linter.name] + l:linter.aliases + let l:should_include = 1 + + for l:name in l:name_list + if index(l:names_to_remove, l:name) >= 0 + let l:should_include = 0 + break + endif + endfor + + if a:disable_lsp && has_key(l:linter, 'lsp') && l:linter.lsp isnot# '' + let l:should_include = 0 + endif + + if l:should_include + call add(l:filtered_linters, l:linter) + endif + endfor + + return l:filtered_linters +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/events.vim b/dot_vim/plugged/ale/autoload/ale/events.vim new file mode 100644 index 0000000..eec24f4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/events.vim @@ -0,0 +1,165 @@ +" Author: w0rp +" Description: ALE functions for autocmd events. + +" Get the number of milliseconds since some vague, but consistent, point in +" the past. +" +" This function can be used for timing execution, etc. +" +" The time will be returned as a Number. +function! ale#events#ClockMilliseconds() abort + return float2nr(reltimefloat(reltime()) * 1000) +endfunction + +function! ale#events#QuitEvent(buffer) abort + " Remember when ALE is quitting for BufWrite, etc. + call setbufvar(a:buffer, 'ale_quitting', ale#events#ClockMilliseconds()) +endfunction + +function! ale#events#QuitRecently(buffer) abort + let l:time = getbufvar(a:buffer, 'ale_quitting', 0) + + return l:time && ale#events#ClockMilliseconds() - l:time < 1000 +endfunction + +function! ale#events#SaveEvent(buffer) abort + let l:should_lint = ale#Var(a:buffer, 'enabled') && g:ale_lint_on_save + + if l:should_lint + call setbufvar(a:buffer, 'ale_save_event_fired', 1) + endif + + if ale#Var(a:buffer, 'fix_on_save') && !ale#events#QuitRecently(a:buffer) + let l:will_fix = ale#fix#Fix(a:buffer, 'save_file') + let l:should_lint = l:should_lint && !l:will_fix + endif + + if l:should_lint && !ale#events#QuitRecently(a:buffer) + call ale#Queue(0, 'lint_file', a:buffer) + endif +endfunction + +function! ale#events#LintOnEnter(buffer) abort + " Unmark a file as being changed outside of Vim after we try to check it. + call setbufvar(a:buffer, 'ale_file_changed', 0) + + if ale#Var(a:buffer, 'enabled') && g:ale_lint_on_enter + call ale#Queue(0, 'lint_file', a:buffer) + endif +endfunction + +function! ale#events#ReadOrEnterEvent(buffer) abort + " Apply pattern options if the variable is set. + if get(g:, 'ale_pattern_options_enabled', 1) + \&& !empty(get(g:, 'ale_pattern_options')) + call ale#pattern_options#SetOptions(a:buffer) + endif + + " When entering a buffer, we are no longer quitting it. + call setbufvar(a:buffer, 'ale_quitting', 0) + let l:filetype = getbufvar(a:buffer, '&filetype') + call setbufvar(a:buffer, 'ale_original_filetype', l:filetype) + + " If the file changed outside of Vim, check it on BufEnter,BufRead + if getbufvar(a:buffer, 'ale_file_changed') + call ale#events#LintOnEnter(a:buffer) + endif +endfunction + +function! ale#events#FileTypeEvent(buffer, new_filetype) abort + " The old filetype will be set to an empty string by the BuFEnter event, + " and not linting when the old filetype hasn't been set yet prevents + " buffers being checked when you enter them when linting on enter is off. + let l:old_filetype = getbufvar(a:buffer, 'ale_original_filetype', v:null) + + if l:old_filetype isnot v:null + \&& !empty(a:new_filetype) + \&& a:new_filetype isnot# l:old_filetype + " Remember what the new filetype is. + call setbufvar(a:buffer, 'ale_original_filetype', a:new_filetype) + + if g:ale_lint_on_filetype_changed + call ale#Queue(300, 'lint_file', a:buffer) + endif + endif +endfunction + +function! ale#events#FileChangedEvent(buffer) abort + call setbufvar(a:buffer, 'ale_file_changed', 1) + + if bufnr('') == a:buffer + call ale#events#LintOnEnter(a:buffer) + endif +endfunction + +function! ale#events#Init() abort + " This value used to be a Boolean as a Number, and is now a String. + let l:text_changed = '' . g:ale_lint_on_text_changed + + augroup ALEEvents + autocmd! + + " These events always need to be set up. + autocmd BufEnter,BufRead * call ale#events#ReadOrEnterEvent(str2nr(expand(''))) + autocmd BufWritePost * call ale#events#SaveEvent(str2nr(expand(''))) + + if g:ale_enabled + if l:text_changed is? 'always' || l:text_changed is# '1' + autocmd TextChanged,TextChangedI * call ale#Queue(ale#Var(str2nr(expand('')), 'lint_delay')) + elseif l:text_changed is? 'normal' + autocmd TextChanged * call ale#Queue(ale#Var(str2nr(expand('')), 'lint_delay')) + elseif l:text_changed is? 'insert' + autocmd TextChangedI * call ale#Queue(ale#Var(str2nr(expand('')), 'lint_delay')) + endif + + if g:ale_lint_on_enter + autocmd BufWinEnter * call ale#events#LintOnEnter(str2nr(expand(''))) + " Track when the file is changed outside of Vim. + autocmd FileChangedShellPost * call ale#events#FileChangedEvent(str2nr(expand(''))) + endif + + if g:ale_lint_on_filetype_changed + " Only start linting if the FileType actually changes after + " opening a buffer. The FileType will fire when buffers are opened. + autocmd FileType * call ale#events#FileTypeEvent( + \ str2nr(expand('')), + \ expand('') + \) + endif + + if g:ale_lint_on_insert_leave + autocmd InsertLeave * if ale#Var(str2nr(expand('')), 'lint_on_insert_leave') | call ale#Queue(0) | endif + endif + + if g:ale_echo_cursor || g:ale_cursor_detail + autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarningWithDelay() | endif + " Look for a warning to echo as soon as we leave Insert mode. + " The script's position variable used when moving the cursor will + " not be changed here. + autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif + endif + + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor is# 1 || g:ale_virtualtext_cursor is# '1' + autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarningWithDelay() | endif + " Look for a warning to echo as soon as we leave Insert mode. + " The script's position variable used when moving the cursor will + " not be changed here. + autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarning() | endif + endif + + if g:ale_hover_cursor + autocmd CursorHold * if exists('*ale#lsp#Send') | call ale#hover#ShowTruncatedMessageAtCursor() | endif + endif + + if g:ale_close_preview_on_insert + autocmd InsertEnter * if exists('*ale#preview#CloseIfTypeMatches') | call ale#preview#CloseIfTypeMatches('ale-preview') | endif + endif + endif + augroup END + + augroup AleURISchemes + autocmd! + + autocmd BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('')) + augroup END +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/filename_mapping.vim b/dot_vim/plugged/ale/autoload/ale/filename_mapping.vim new file mode 100644 index 0000000..76d47ac --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/filename_mapping.vim @@ -0,0 +1,22 @@ +" Author: w0rp +" Description: Logic for handling mappings between files + +" Invert filesystem mappings so they can be mapped in reverse. +function! ale#filename_mapping#Invert(filename_mappings) abort + return map(copy(a:filename_mappings), '[v:val[1], v:val[0]]') +endfunction + +" Given a filename and some filename_mappings, map a filename. +function! ale#filename_mapping#Map(filename, filename_mappings) abort + let l:simplified_filename = ale#path#Simplify(a:filename) + + for [l:mapping_from, l:mapping_to] in a:filename_mappings + let l:mapping_from = ale#path#Simplify(l:mapping_from) + + if l:simplified_filename[:len(l:mapping_from) - 1] is# l:mapping_from + return l:mapping_to . l:simplified_filename[len(l:mapping_from):] + endif + endfor + + return a:filename +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/filerename.vim b/dot_vim/plugged/ale/autoload/ale/filerename.vim new file mode 100644 index 0000000..ec20d27 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/filerename.vim @@ -0,0 +1,133 @@ +" Author: Dalius Dobravolskas +" Description: Rename file support for tsserver + +let s:filerename_map = {} + +" Used to get the rename map in tests. +function! ale#filerename#GetMap() abort + return deepcopy(s:filerename_map) +endfunction + +" Used to set the rename map in tests. +function! ale#filerename#SetMap(map) abort + let s:filerename_map = a:map +endfunction + +function! ale#filerename#ClearLSPData() abort + let s:filerename_map = {} +endfunction + +function! s:message(message) abort + call ale#util#Execute('echom ' . string(a:message)) +endfunction + +function! ale#filerename#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') isnot# 'getEditsForFileRename' + return + endif + + if !has_key(s:filerename_map, a:response.request_seq) + return + endif + + let l:options = remove(s:filerename_map, a:response.request_seq) + + let l:old_name = l:options.old_name + let l:new_name = l:options.new_name + + if get(a:response, 'success', v:false) is v:false + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error renaming file "' . l:old_name . '" to "' . l:new_name + \ . '". Reason: ' . l:message) + + return + endif + + let l:changes = a:response.body + + if empty(l:changes) + call s:message('No changes while renaming "' . l:old_name . '" to "' . l:new_name . '"') + else + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'filerename', + \ 'changes': l:changes, + \ }, + \ { + \ 'should_save': 1, + \ }, + \) + endif + + silent! noautocmd execute 'saveas ' . l:new_name + call delete(l:old_name) +endfunction + +function! s:OnReady(options, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'filerename') + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = function('ale#filerename#HandleTSServerResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + let l:message = ale#lsp#tsserver_message#GetEditsForFileRename( + \ a:options.old_name, + \ a:options.new_name, + \) + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:filerename_map[l:request_id] = a:options +endfunction + +function! s:ExecuteFileRename(linter, options) abort + let l:buffer = bufnr('') + + let l:Callback = function('s:OnReady', [a:options]) + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#filerename#Execute() abort + let l:lsp_linters = [] + + for l:linter in ale#linter#Get(&filetype) + if l:linter.lsp is# 'tsserver' + call add(l:lsp_linters, l:linter) + endif + endfor + + if empty(l:lsp_linters) + call s:message('No active tsserver LSPs') + + return + endif + + let l:buffer = bufnr('') + let l:old_name = expand('#' . l:buffer . ':p') + let l:new_name = ale#util#Input('New file name: ', l:old_name, 'file') + + if l:old_name is# l:new_name + call s:message('New file name matches old file name') + + return + endif + + if empty(l:new_name) + call s:message('New name cannot be empty!') + + return + endif + + for l:lsp_linter in l:lsp_linters + call s:ExecuteFileRename(l:lsp_linter, { + \ 'old_name': l:old_name, + \ 'new_name': l:new_name, + \}) + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/filetypes.vim b/dot_vim/plugged/ale/autoload/ale/filetypes.vim new file mode 100644 index 0000000..340a9c4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/filetypes.vim @@ -0,0 +1,58 @@ +" Author: w0rp +" Description: This file handles guessing file extensions for filetypes, etc. + +function! ale#filetypes#LoadExtensionMap() abort + " Output includes: + " '*.erl setf erlang' + let l:output = execute('exec "autocmd"') + + let l:map = {} + + for l:line in split(l:output, "\n") + " Parse filetypes, like so: + " + " *.erl setf erlang + " *.md set filetype=markdown + " *.snippet setlocal filetype=snippets + let l:match = matchlist(l:line, '\v^ *\*(\.[^ ]+).*set(f *| *filetype=|local *filetype=)([^ ]+)') + + if !empty(l:match) + let l:map[substitute(l:match[3], '^=', '', '')] = l:match[1] + endif + endfor + + return l:map +endfunction + +let s:cached_map = {} + +function! s:GetCachedExtensionMap() abort + if empty(s:cached_map) + let s:cached_map = ale#filetypes#LoadExtensionMap() + endif + + return s:cached_map +endfunction + +function! ale#filetypes#GuessExtension(filetype) abort + let l:map = s:GetCachedExtensionMap() + let l:ext = get(l:map, a:filetype, '') + + " If we have an exact match, like something for javascript.jsx, use that. + if !empty(l:ext) + return l:ext + endif + + " If we don't have an exact match, use the first filetype in the compound + " filetype. + for l:part in split(a:filetype, '\.') + let l:ext = get(l:map, l:part, '') + + if !empty(l:ext) + return l:ext + endif + endfor + + " Return an empty string if we don't find anything. + return '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fix.vim b/dot_vim/plugged/ale/autoload/ale/fix.vim new file mode 100644 index 0000000..d982084 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fix.vim @@ -0,0 +1,399 @@ +" Author: w0rp +" Description: Functions for fixing code with programs, or other means. + +let g:ale_fix_on_save_ignore = get(g:, 'ale_fix_on_save_ignore', {}) +let g:ale_filename_mappings = get(g:, 'ale_filename_mappings', {}) + +" Apply fixes queued up for buffers which may be hidden. +" Vim doesn't let you modify hidden buffers. +function! ale#fix#ApplyQueuedFixes(buffer) abort + let l:data = get(g:ale_fix_buffer_data, a:buffer, {'done': 0}) + + if !l:data.done || (!ale#util#HasBuflineApi() && a:buffer isnot bufnr('')) + return + endif + + call remove(g:ale_fix_buffer_data, a:buffer) + + try + if l:data.changes_made + let l:new_lines = ale#util#SetBufferContents(a:buffer, l:data.output) + + if l:data.should_save + if a:buffer is bufnr('') + if empty(&buftype) + noautocmd :w! + else + set nomodified + endif + else + call writefile(l:new_lines, expand('#' . a:buffer . ':p')) " no-custom-checks + call setbufvar(a:buffer, '&modified', 0) + endif + endif + endif + catch /E21/ + " If we cannot modify the buffer now, try again later. + let g:ale_fix_buffer_data[a:buffer] = l:data + + return + endtry + + if l:data.should_save + let l:should_lint = ale#Var(a:buffer, 'fix_on_save') + \ && ale#Var(a:buffer, 'lint_on_save') + else + let l:should_lint = l:data.changes_made + endif + + silent doautocmd User ALEFixPost + + " If ALE linting is enabled, check for problems with the file again after + " fixing problems. + if g:ale_enabled + \&& l:should_lint + \&& !ale#events#QuitRecently(a:buffer) + call ale#Queue(0, l:data.should_save ? 'lint_file' : '') + endif +endfunction + +function! ale#fix#ApplyFixes(buffer, output) abort + let l:data = g:ale_fix_buffer_data[a:buffer] + let l:data.output = a:output + let l:data.changes_made = l:data.lines_before !=# l:data.output " no-custom-checks + let l:data.done = 1 + + call ale#command#RemoveManagedFiles(a:buffer) + + if !bufexists(a:buffer) + " Remove the buffer data when it doesn't exist. + call remove(g:ale_fix_buffer_data, a:buffer) + endif + + if l:data.changes_made && bufexists(a:buffer) + let l:lines = getbufline(a:buffer, 1, '$') + + if l:data.lines_before != l:lines + call remove(g:ale_fix_buffer_data, a:buffer) + + if !l:data.ignore_file_changed_errors + " no-custom-checks + echoerr 'The file was changed before fixing finished' + endif + + return + endif + endif + + " We can only change the lines of a buffer which is currently open, + " so try and apply the fixes to the current buffer. + call ale#fix#ApplyQueuedFixes(a:buffer) +endfunction + +function! s:HandleExit(job_info, buffer, job_output, data) abort + let l:buffer_info = get(g:ale_fix_buffer_data, a:buffer, {}) + + if empty(l:buffer_info) + return + endif + + if a:job_info.read_temporary_file + let l:output = !empty(a:data.temporary_file) + \ ? readfile(a:data.temporary_file) + \ : [] + else + let l:output = a:job_output + endif + + let l:ProcessWith = get(a:job_info, 'process_with', v:null) + + " Post-process the output with a function if we have one. + if l:ProcessWith isnot v:null + let l:output = call(l:ProcessWith, [a:buffer, l:output]) + endif + + " Use the output of the job for changing the file if it isn't empty, + " otherwise skip this job and use the input from before. + " + " We'll use the input from before for chained commands. + if !empty(split(join(l:output))) + let l:input = l:output + else + let l:input = a:job_info.input + endif + + call s:RunFixer({ + \ 'buffer': a:buffer, + \ 'input': l:input, + \ 'callback_list': a:job_info.callback_list, + \ 'callback_index': a:job_info.callback_index + 1, + \}) +endfunction + +function! s:RunJob(result, options) abort + if ale#command#IsDeferred(a:result) + let a:result.result_callback = {x -> s:RunJob(x, a:options)} + + return + endif + + let l:buffer = a:options.buffer + let l:input = a:options.input + let l:fixer_name = a:options.fixer_name + + if a:result is 0 || type(a:result) is v:t_list + if type(a:result) is v:t_list + let l:input = a:result + endif + + call s:RunFixer({ + \ 'buffer': l:buffer, + \ 'input': l:input, + \ 'callback_index': a:options.callback_index + 1, + \ 'callback_list': a:options.callback_list, + \}) + + return + endif + + let l:command = get(a:result, 'command', '') + + if empty(l:command) + " If the command is empty, skip to the next item. + call s:RunFixer({ + \ 'buffer': l:buffer, + \ 'input': l:input, + \ 'callback_index': a:options.callback_index, + \ 'callback_list': a:options.callback_list, + \}) + + return + endif + + let l:read_temporary_file = get(a:result, 'read_temporary_file', 0) + let l:read_buffer = get(a:result, 'read_buffer', 1) + let l:output_stream = get(a:result, 'output_stream', 'stdout') + let l:cwd = get(a:result, 'cwd', v:null) + + if l:read_temporary_file + let l:output_stream = 'none' + endif + + let l:Callback = function('s:HandleExit', [{ + \ 'input': l:input, + \ 'callback_index': a:options.callback_index, + \ 'callback_list': a:options.callback_list, + \ 'process_with': get(a:result, 'process_with', v:null), + \ 'read_temporary_file': l:read_temporary_file, + \}]) + let l:run_result = ale#command#Run(l:buffer, l:command, l:Callback, { + \ 'output_stream': l:output_stream, + \ 'executable': '', + \ 'read_buffer': l:read_buffer, + \ 'input': l:input, + \ 'log_output': 0, + \ 'cwd': l:cwd, + \ 'filename_mappings': ale#GetFilenameMappings(l:buffer, l:fixer_name), + \}) + + if empty(l:run_result) + call s:RunFixer({ + \ 'buffer': l:buffer, + \ 'input': l:input, + \ 'callback_index': a:options.callback_index + 1, + \ 'callback_list': a:options.callback_list, + \}) + endif +endfunction + +function! s:RunFixer(options) abort + let l:buffer = a:options.buffer + let l:input = a:options.input + let l:index = a:options.callback_index + + if len(a:options.callback_list) <= l:index + call ale#fix#ApplyFixes(l:buffer, l:input) + + return + endif + + let [l:fixer_name, l:Function] = a:options.callback_list[l:index] + + " Record new jobs started as fixer jobs. + call setbufvar(l:buffer, 'ale_job_type', 'fixer') + + " Regular fixer commands accept (buffer, [input]) + let l:result = ale#util#FunctionArgCount(l:Function) == 1 + \ ? call(l:Function, [l:buffer]) + \ : call(l:Function, [l:buffer, copy(l:input)]) + + call s:RunJob(l:result, { + \ 'buffer': l:buffer, + \ 'input': l:input, + \ 'callback_list': a:options.callback_list, + \ 'callback_index': l:index, + \ 'fixer_name': l:fixer_name, + \}) +endfunction + +function! s:AddSubCallbacks(full_list, callbacks) abort + if type(a:callbacks) is v:t_string + call add(a:full_list, a:callbacks) + elseif type(a:callbacks) is v:t_list + call extend(a:full_list, a:callbacks) + else + return 0 + endif + + return 1 +endfunction + +function! s:IgnoreFixers(callback_list, filetype, config) abort + if type(a:config) is v:t_list + let l:ignore_list = a:config + else + let l:ignore_list = [] + + for l:part in split(a:filetype , '\.') + call extend(l:ignore_list, get(a:config, l:part, [])) + endfor + endif + + call filter(a:callback_list, 'index(l:ignore_list, v:val) < 0') +endfunction + +function! s:GetCallbacks(buffer, fixing_flag, fixers) abort + if len(a:fixers) + let l:callback_list = a:fixers + elseif type(get(b:, 'ale_fixers')) is v:t_list + " Lists can be used for buffer-local variables only + let l:callback_list = b:ale_fixers + else + " buffer and global options can use dictionaries mapping filetypes to + " callbacks to run. + let l:fixers = ale#Var(a:buffer, 'fixers') + let l:callback_list = [] + let l:matched = 0 + + for l:sub_type in split(&filetype, '\.') + if s:AddSubCallbacks(l:callback_list, get(l:fixers, l:sub_type)) + let l:matched = 1 + endif + endfor + + " If we couldn't find fixers for a filetype, default to '*' fixers. + if !l:matched + call s:AddSubCallbacks(l:callback_list, get(l:fixers, '*')) + endif + endif + + if a:fixing_flag is# 'save_file' + let l:config = ale#Var(a:buffer, 'fix_on_save_ignore') + + if !empty(l:config) + call s:IgnoreFixers(l:callback_list, &filetype, l:config) + endif + endif + + let l:corrected_list = [] + + " Variables with capital characters are needed, or Vim will complain about + " funcref variables. + for l:Item in l:callback_list + " Try to capture the names of registered fixer names, so we can use + " them for filename mapping or other purposes later. + let l:fixer_name = v:null + + if type(l:Item) is v:t_string + let l:Func = ale#fix#registry#GetFunc(l:Item) + + if !empty(l:Func) + let l:fixer_name = l:Item + let l:Item = l:Func + endif + endif + + try + call add(l:corrected_list, [ + \ l:fixer_name, + \ ale#util#GetFunction(l:Item) + \]) + catch /E475/ + " Rethrow exceptions for failing to get a function so we can print + " a friendly message about it. + throw 'BADNAME ' . v:exception + endtry + endfor + + return l:corrected_list +endfunction + +function! ale#fix#InitBufferData(buffer, fixing_flag) abort + " The 'done' flag tells the function for applying changes when fixing + " is complete. + let g:ale_fix_buffer_data[a:buffer] = { + \ 'lines_before': getbufline(a:buffer, 1, '$'), + \ 'done': 0, + \ 'should_save': a:fixing_flag is# 'save_file', + \ 'ignore_file_changed_errors': a:fixing_flag is# '!', + \ 'temporary_directory_list': [], + \} +endfunction + +" Accepts an optional argument for what to do when fixing. +" +" Returns 0 if no fixes can be applied, and 1 if fixing can be done. +function! ale#fix#Fix(buffer, fixing_flag, ...) abort + if a:fixing_flag isnot# '' + \&& a:fixing_flag isnot# '!' + \&& a:fixing_flag isnot# 'save_file' + throw "fixing_flag must be '', '!', or 'save_file'" + endif + + try + let l:callback_list = s:GetCallbacks(a:buffer, a:fixing_flag, a:000) + catch /E700\|BADNAME/ + if a:fixing_flag isnot# '!' + let l:function_name = join(split(split(v:exception, ':')[3])) + let l:echo_message = printf( + \ 'There is no fixer named `%s`. Check :ALEFixSuggest', + \ l:function_name, + \) + " no-custom-checks + echom l:echo_message + endif + + return 0 + endtry + + if empty(l:callback_list) + if a:fixing_flag is# '' + " no-custom-checks + echom 'No fixers have been defined. Try :ALEFixSuggest' + endif + + return 0 + endif + + call ale#command#StopJobs(a:buffer, 'fixer') + " Clean up any files we might have left behind from a previous run. + call ale#command#RemoveManagedFiles(a:buffer) + call ale#fix#InitBufferData(a:buffer, a:fixing_flag) + + silent doautocmd User ALEFixPre + + call s:RunFixer({ + \ 'buffer': a:buffer, + \ 'input': g:ale_fix_buffer_data[a:buffer].lines_before, + \ 'callback_index': 0, + \ 'callback_list': l:callback_list, + \}) + + return 1 +endfunction + +" Set up an autocmd command to try and apply buffer fixes when available. +augroup ALEBufferFixGroup + autocmd! + autocmd BufEnter * call ale#fix#ApplyQueuedFixes(str2nr(expand(''))) +augroup END diff --git a/dot_vim/plugged/ale/autoload/ale/fix/registry.vim b/dot_vim/plugged/ale/autoload/ale/fix/registry.vim new file mode 100644 index 0000000..28e3392 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fix/registry.vim @@ -0,0 +1,795 @@ +" Author: w0rp +" Description: A registry of functions for fixing things. + +let s:default_registry = { +\ 'add_blank_lines_for_python_control_statements': { +\ 'function': 'ale#fixers#generic_python#AddLinesBeforeControlStatements', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Add blank lines before control statements.', +\ }, +\ 'align_help_tags': { +\ 'function': 'ale#fixers#help#AlignTags', +\ 'suggested_filetypes': ['help'], +\ 'description': 'Align help tags to the right margin', +\ }, +\ 'autoimport': { +\ 'function': 'ale#fixers#autoimport#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix import issues with autoimport.', +\ }, +\ 'autoflake': { +\ 'function': 'ale#fixers#autoflake#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix flake issues with autoflake.', +\ }, +\ 'autopep8': { +\ 'function': 'ale#fixers#autopep8#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix PEP8 issues with autopep8.', +\ }, +\ 'bibclean': { +\ 'function': 'ale#fixers#bibclean#Fix', +\ 'suggested_filetypes': ['bib'], +\ 'description': 'Format bib files using bibclean.', +\ }, +\ 'black': { +\ 'function': 'ale#fixers#black#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix PEP8 issues with black.', +\ }, +\ 'buf-format': { +\ 'function': 'ale#fixers#buf_format#Fix', +\ 'suggested_filetypes': ['proto'], +\ 'description': 'Fix .proto files with buf format.', +\ }, +\ 'buildifier': { +\ 'function': 'ale#fixers#buildifier#Fix', +\ 'suggested_filetypes': ['bzl'], +\ 'description': 'Format BUILD and .bzl files with buildifier.', +\ }, +\ 'css-beautify': { +\ 'function': 'ale#fixers#css_beautify#Fix', +\ 'suggested_filetypes': ['css'], +\ 'description': 'Format CSS using css-beautify from js-beautify.', +\ }, +\ 'deno': { +\ 'function': 'ale#fixers#deno#Fix', +\ 'suggested_filetypes': ['typescript'], +\ 'description': 'Fix TypeScript using deno fmt.', +\ }, +\ 'dfmt': { +\ 'function': 'ale#fixers#dfmt#Fix', +\ 'suggested_filetypes': ['d'], +\ 'description': 'Fix D files with dfmt.', +\ }, +\ 'dhall': { +\ 'function': 'ale#fixers#dhall#Fix', +\ 'suggested_filetypes': ['dhall'], +\ 'description': 'Fix Dhall files with dhall-format.', +\ }, +\ 'dhall-format': { +\ 'function': 'ale#fixers#dhall_format#Fix', +\ 'suggested_filetypes': ['dhall'], +\ 'description': 'Standard code formatter for the Dhall language', +\ 'aliases': ['dhall'], +\ }, +\ 'dhall-freeze': { +\ 'function': 'ale#fixers#dhall_freeze#Freeze', +\ 'suggested_filetypes': ['dhall'], +\ 'description': 'Add integrity checks to remote import statements of an expression for the Dhall language', +\ }, +\ 'dhall-lint': { +\ 'function': 'ale#fixers#dhall_lint#Fix', +\ 'suggested_filetypes': ['dhall'], +\ 'description': 'Standard code formatter for the Dhall language and removing dead code', +\ }, +\ 'dune': { +\ 'function': 'ale#fixers#dune#Fix', +\ 'suggested_filetypes': ['dune'], +\ 'description': 'Fix dune files with dune format', +\ }, +\ 'fecs': { +\ 'function': 'ale#fixers#fecs#Fix', +\ 'suggested_filetypes': ['javascript', 'css', 'html'], +\ 'description': 'Apply fecs format to a file.', +\ }, +\ 'tidy': { +\ 'function': 'ale#fixers#tidy#Fix', +\ 'suggested_filetypes': ['html'], +\ 'description': 'Fix HTML files with tidy.', +\ }, +\ 'prettier_standard': { +\ 'function': 'ale#fixers#prettier_standard#Fix', +\ 'suggested_filetypes': ['javascript'], +\ 'description': 'Apply prettier-standard to a file.', +\ 'aliases': ['prettier-standard'], +\ }, +\ 'elm-format': { +\ 'function': 'ale#fixers#elm_format#Fix', +\ 'suggested_filetypes': ['elm'], +\ 'description': 'Apply elm-format to a file.', +\ 'aliases': ['format'], +\ }, +\ 'nimpretty': { +\ 'function': 'ale#fixers#nimpretty#Fix', +\ 'suggested_filetypes': ['nim'], +\ 'description': 'Apply nimpretty to a file.', +\ }, +\ 'erblint': { +\ 'function': 'ale#fixers#erblint#Fix', +\ 'suggested_filetypes': ['eruby'], +\ 'description': 'Apply erblint --autocorrect to a file.', +\ }, +\ 'eslint': { +\ 'function': 'ale#fixers#eslint#Fix', +\ 'suggested_filetypes': ['javascript', 'typescript'], +\ 'description': 'Apply eslint --fix to a file.', +\ }, +\ 'mix_format': { +\ 'function': 'ale#fixers#mix_format#Fix', +\ 'suggested_filetypes': ['elixir'], +\ 'description': 'Apply mix format to a file.', +\ }, +\ 'isort': { +\ 'function': 'ale#fixers#isort#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Sort Python imports with isort.', +\ }, +\ 'prettier': { +\ 'function': 'ale#fixers#prettier#Fix', +\ 'suggested_filetypes': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'json5', 'graphql', 'markdown', 'vue', 'svelte', 'html', 'yaml', 'openapi', 'ruby'], +\ 'description': 'Apply prettier to a file.', +\ }, +\ 'prettier_eslint': { +\ 'function': 'ale#fixers#prettier_eslint#Fix', +\ 'suggested_filetypes': ['javascript'], +\ 'description': 'Apply prettier-eslint to a file.', +\ 'aliases': ['prettier-eslint'], +\ }, +\ 'pyflyby': { +\ 'function': 'ale#fixers#pyflyby#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Tidy Python imports with pyflyby.', +\ }, +\ 'importjs': { +\ 'function': 'ale#fixers#importjs#Fix', +\ 'suggested_filetypes': ['javascript'], +\ 'description': 'automatic imports for javascript', +\ }, +\ 'puppetlint': { +\ 'function': 'ale#fixers#puppetlint#Fix', +\ 'suggested_filetypes': ['puppet'], +\ 'description': 'Run puppet-lint -f on a file.', +\ }, +\ 'remove_trailing_lines': { +\ 'function': 'ale#fixers#generic#RemoveTrailingBlankLines', +\ 'suggested_filetypes': [], +\ 'description': 'Remove all blank lines at the end of a file.', +\ }, +\ 'trim_whitespace': { +\ 'function': 'ale#fixers#generic#TrimWhitespace', +\ 'suggested_filetypes': [], +\ 'description': 'Remove all trailing whitespace characters at the end of every line.', +\ }, +\ 'yamlfix': { +\ 'function': 'ale#fixers#yamlfix#Fix', +\ 'suggested_filetypes': ['yaml'], +\ 'description': 'Fix yaml files with yamlfix.', +\ }, +\ 'yapf': { +\ 'function': 'ale#fixers#yapf#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix Python files with yapf.', +\ }, +\ 'rubocop': { +\ 'function': 'ale#fixers#rubocop#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with rubocop --auto-correct.', +\ }, +\ 'rufo': { +\ 'function': 'ale#fixers#rufo#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with rufo', +\ }, +\ 'scalafmt': { +\ 'function': 'ale#fixers#scalafmt#Fix', +\ 'suggested_filetypes': ['sbt', 'scala'], +\ 'description': 'Fix Scala files using scalafmt', +\ }, +\ 'sorbet': { +\ 'function': 'ale#fixers#sorbet#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with srb tc --autocorrect.', +\ }, +\ 'standard': { +\ 'function': 'ale#fixers#standard#Fix', +\ 'suggested_filetypes': ['javascript'], +\ 'description': 'Fix JavaScript files using standard --fix', +\ }, +\ 'standardrb': { +\ 'function': 'ale#fixers#standardrb#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with standardrb --fix', +\ }, +\ 'statix': { +\ 'function': 'ale#fixers#statix#Fix', +\ 'suggested_filetypes': ['nix'], +\ 'description': 'Fix common Nix antipatterns with statix fix', +\ }, +\ 'stylelint': { +\ 'function': 'ale#fixers#stylelint#Fix', +\ 'suggested_filetypes': ['css', 'sass', 'scss', 'sugarss', 'stylus'], +\ 'description': 'Fix stylesheet files using stylelint --fix.', +\ }, +\ 'swiftformat': { +\ 'function': 'ale#fixers#swiftformat#Fix', +\ 'suggested_filetypes': ['swift'], +\ 'description': 'Apply SwiftFormat to a file.', +\ }, +\ 'syntax_tree': { +\ 'function': 'ale#fixers#syntax_tree#Fix', +\ 'suggested_filetypes': ['ruby'], +\ 'description': 'Fix ruby files with stree write', +\ }, +\ 'apple-swift-format': { +\ 'function': 'ale#fixers#appleswiftformat#Fix', +\ 'suggested_filetypes': ['swift'], +\ 'description': 'Apply apple/swift-format to a file.', +\ }, +\ 'phpcbf': { +\ 'function': 'ale#fixers#phpcbf#Fix', +\ 'suggested_filetypes': ['php'], +\ 'description': 'Fix PHP files with phpcbf.', +\ }, +\ 'php_cs_fixer': { +\ 'function': 'ale#fixers#php_cs_fixer#Fix', +\ 'suggested_filetypes': ['php'], +\ 'description': 'Fix PHP files with php-cs-fixer.', +\ }, +\ 'pint': { +\ 'function': 'ale#fixers#pint#Fix', +\ 'suggested_filetypes': ['php'], +\ 'description': 'Fix PHP files with Laravel Pint.', +\ }, +\ 'astyle': { +\ 'function': 'ale#fixers#astyle#Fix', +\ 'suggested_filetypes': ['c', 'cpp'], +\ 'description': 'Fix C/C++ with astyle.', +\ }, +\ 'clangtidy': { +\ 'function': 'ale#fixers#clangtidy#Fix', +\ 'suggested_filetypes': ['c', 'cpp', 'objc'], +\ 'description': 'Fix C/C++ and ObjectiveC files with clang-tidy.', +\ }, +\ 'clang-format': { +\ 'function': 'ale#fixers#clangformat#Fix', +\ 'suggested_filetypes': ['c', 'cpp', 'cs', 'cuda', 'java', 'javascript', 'json', 'objc', 'proto'], +\ 'description': 'Fix C, C++, C#, CUDA, Java, JavaScript, JSON, ObjectiveC and Protobuf files with clang-format.', +\ }, +\ 'cmakeformat': { +\ 'function': 'ale#fixers#cmakeformat#Fix', +\ 'suggested_filetypes': ['cmake'], +\ 'description': 'Fix CMake files with cmake-format.', +\ }, +\ 'fish_indent': { +\ 'function': 'ale#fixers#fish_indent#Fix', +\ 'suggested_filetypes': ['fish'], +\ 'description': 'Format fish scripts using fish_indent.', +\ }, +\ 'gofmt': { +\ 'function': 'ale#fixers#gofmt#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go files with go fmt.', +\ }, +\ 'gofumpt': { +\ 'function': 'ale#fixers#gofumpt#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go files with gofumpt, a stricter go fmt.', +\ }, +\ 'goimports': { +\ 'function': 'ale#fixers#goimports#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go files imports with goimports.', +\ }, +\ 'golines': { +\ 'function': 'ale#fixers#golines#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go file long lines with golines', +\ }, +\ 'gomod': { +\ 'function': 'ale#fixers#gomod#Fix', +\ 'suggested_filetypes': ['gomod'], +\ 'description': 'Fix Go module files with go mod edit -fmt.', +\ }, +\ 'tslint': { +\ 'function': 'ale#fixers#tslint#Fix', +\ 'suggested_filetypes': ['typescript'], +\ 'description': 'Fix typescript files with tslint --fix.', +\ }, +\ 'rustfmt': { +\ 'function': 'ale#fixers#rustfmt#Fix', +\ 'suggested_filetypes': ['rust'], +\ 'description': 'Fix Rust files with Rustfmt.', +\ }, +\ 'textlint': { +\ 'function': 'ale#fixers#textlint#Fix', +\ 'suggested_filetypes': ['text','markdown','asciidoc','tex'], +\ 'description': 'Fix text files with textlint --fix', +\ }, +\ 'hackfmt': { +\ 'function': 'ale#fixers#hackfmt#Fix', +\ 'suggested_filetypes': ['hack'], +\ 'description': 'Fix Hack files with hackfmt.', +\ }, +\ 'floskell': { +\ 'function': 'ale#fixers#floskell#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Fix Haskell files with floskell.', +\ }, +\ 'hfmt': { +\ 'function': 'ale#fixers#hfmt#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Fix Haskell files with hfmt.', +\ }, +\ 'brittany': { +\ 'function': 'ale#fixers#brittany#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Fix Haskell files with brittany.', +\ }, +\ 'hindent': { +\ 'function': 'ale#fixers#hindent#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Fix Haskell files with hindent.', +\ }, +\ 'hlint': { +\ 'function': 'ale#fixers#hlint#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Refactor Haskell files with hlint.', +\ }, +\ 'stylish-haskell': { +\ 'function': 'ale#fixers#stylish_haskell#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'Refactor Haskell files with stylish-haskell.', +\ }, +\ 'purs-tidy': { +\ 'function': 'ale#fixers#purs_tidy#Fix', +\ 'suggested_filetypes': ['purescript'], +\ 'description': 'Format PureScript files with purs-tidy.', +\ }, +\ 'purty': { +\ 'function': 'ale#fixers#purty#Fix', +\ 'suggested_filetypes': ['purescript'], +\ 'description': 'Format PureScript files with purty.', +\ }, +\ 'ocamlformat': { +\ 'function': 'ale#fixers#ocamlformat#Fix', +\ 'suggested_filetypes': ['ocaml', 'ocamlinterface'], +\ 'description': 'Fix OCaml files with ocamlformat.', +\ }, +\ 'ocp-indent': { +\ 'function': 'ale#fixers#ocp_indent#Fix', +\ 'suggested_filetypes': ['ocaml', 'ocamlinterface'], +\ 'description': 'Fix OCaml files with ocp-indent.', +\ }, +\ 'refmt': { +\ 'function': 'ale#fixers#refmt#Fix', +\ 'suggested_filetypes': ['reason'], +\ 'description': 'Fix ReasonML files with refmt.', +\ }, +\ 'pandoc': { +\ 'function': 'ale#fixers#pandoc#Fix', +\ 'suggested_filetypes': ['markdown'], +\ 'description': 'Fix markdown files with pandoc.', +\ }, +\ 'shfmt': { +\ 'function': 'ale#fixers#shfmt#Fix', +\ 'suggested_filetypes': ['sh'], +\ 'description': 'Fix sh files with shfmt.', +\ }, +\ 'sqlfluff': { +\ 'function': 'ale#fixers#sqlfluff#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'Fix SQL files with sqlfluff.', +\ }, +\ 'sqlfmt': { +\ 'function': 'ale#fixers#sqlfmt#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'Fix SQL files with sqlfmt.', +\ }, +\ 'sqlformat': { +\ 'function': 'ale#fixers#sqlformat#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'Fix SQL files with sqlformat.', +\ }, +\ 'google_java_format': { +\ 'function': 'ale#fixers#google_java_format#Fix', +\ 'suggested_filetypes': ['java'], +\ 'description': 'Fix Java files with google-java-format.', +\ }, +\ 'fixjson': { +\ 'function': 'ale#fixers#fixjson#Fix', +\ 'suggested_filetypes': ['json'], +\ 'description': 'Fix JSON files with fixjson.', +\ }, +\ 'jq': { +\ 'function': 'ale#fixers#jq#Fix', +\ 'suggested_filetypes': ['json'], +\ 'description': 'Fix JSON files with jq.', +\ }, +\ 'protolint': { +\ 'function': 'ale#fixers#protolint#Fix', +\ 'suggested_filetypes': ['proto'], +\ 'description': 'Fix Protocol Buffer files with protolint.', +\ }, +\ 'perltidy': { +\ 'function': 'ale#fixers#perltidy#Fix', +\ 'suggested_filetypes': ['perl'], +\ 'description': 'Fix Perl files with perltidy.', +\ }, +\ 'xo': { +\ 'function': 'ale#fixers#xo#Fix', +\ 'suggested_filetypes': ['javascript', 'typescript'], +\ 'description': 'Fix JavaScript/TypeScript files using xo --fix.', +\ }, +\ 'qmlfmt': { +\ 'function': 'ale#fixers#qmlfmt#Fix', +\ 'suggested_filetypes': ['qml'], +\ 'description': 'Fix QML files with qmlfmt.', +\ }, +\ 'dartfmt': { +\ 'function': 'ale#fixers#dartfmt#Fix', +\ 'suggested_filetypes': ['dart'], +\ 'description': 'Fix Dart files with dartfmt.', +\ }, +\ 'dart-format': { +\ 'function': 'ale#fixers#dart_format#Fix', +\ 'suggested_filetypes': ['dart'], +\ 'description': 'Fix Dart files with dart format.', +\ }, +\ 'dotnet-format': { +\ 'function': 'ale#fixers#dotnet_format#Fix', +\ 'suggested_filetypes': ['cs'], +\ 'description': 'Fix C# files with dotnet format.', +\ }, +\ 'xmllint': { +\ 'function': 'ale#fixers#xmllint#Fix', +\ 'suggested_filetypes': ['xml'], +\ 'description': 'Fix XML files with xmllint.', +\ }, +\ 'uncrustify': { +\ 'function': 'ale#fixers#uncrustify#Fix', +\ 'suggested_filetypes': ['c', 'cpp', 'cs', 'objc', 'objcpp', 'd', 'java', 'p', 'vala' ], +\ 'description': 'Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.', +\ }, +\ 'terraform': { +\ 'function': 'ale#fixers#terraform#Fix', +\ 'suggested_filetypes': ['hcl', 'terraform'], +\ 'description': 'Fix tf and hcl files with terraform fmt.', +\ }, +\ 'packer': { +\ 'function': 'ale#fixers#packer#Fix', +\ 'suggested_filetypes': ['hcl', 'packer'], +\ 'description': 'Fix Packer HCL files with packer fmt.', +\ }, +\ 'crystal': { +\ 'function': 'ale#fixers#crystal#Fix', +\ 'suggested_filetypes': ['cr'], +\ 'description': 'Fix cr (crystal).', +\ }, +\ 'ktlint': { +\ 'function': 'ale#fixers#ktlint#Fix', +\ 'suggested_filetypes': ['kt', 'kotlin'], +\ 'description': 'Fix Kotlin files with ktlint.', +\ }, +\ 'styler': { +\ 'function': 'ale#fixers#styler#Fix', +\ 'suggested_filetypes': ['r', 'rmarkdown', 'rmd'], +\ 'description': 'Fix R files with styler.', +\ }, +\ 'latexindent': { +\ 'function': 'ale#fixers#latexindent#Fix', +\ 'suggested_filetypes': ['tex'], +\ 'description' : 'Indent code within environments, commands, after headings and within special code blocks.', +\ }, +\ 'pgformatter': { +\ 'function': 'ale#fixers#pgformatter#Fix', +\ 'suggested_filetypes': ['sql'], +\ 'description': 'A PostgreSQL SQL syntax beautifier', +\ }, +\ 'reorder-python-imports': { +\ 'function': 'ale#fixers#reorder_python_imports#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Sort Python imports with reorder-python-imports.', +\ }, +\ 'gnatpp': { +\ 'function': 'ale#fixers#gnatpp#Fix', +\ 'suggested_filetypes': ['ada'], +\ 'description': 'Format Ada files with gnatpp.', +\ }, +\ 'nixfmt': { +\ 'function': 'ale#fixers#nixfmt#Fix', +\ 'suggested_filetypes': ['nix'], +\ 'description': 'A nix formatter written in Haskell.', +\ }, +\ 'nixpkgs-fmt': { +\ 'function': 'ale#fixers#nixpkgsfmt#Fix', +\ 'suggested_filetypes': ['nix'], +\ 'description': 'A formatter for Nix code', +\ }, +\ 'remark-lint': { +\ 'function': 'ale#fixers#remark_lint#Fix', +\ 'suggested_filetypes': ['markdown'], +\ 'description': 'Fix markdown files with remark-lint', +\ }, +\ 'html-beautify': { +\ 'function': 'ale#fixers#html_beautify#Fix', +\ 'suggested_filetypes': ['html', 'htmldjango'], +\ 'description': 'Fix HTML files with html-beautify from js-beautify.', +\ }, +\ 'lua-format': { +\ 'function': 'ale#fixers#lua_format#Fix', +\ 'suggested_filetypes': ['lua'], +\ 'description': 'Fix Lua files with lua-format.', +\ }, +\ 'luafmt': { +\ 'function': 'ale#fixers#luafmt#Fix', +\ 'suggested_filetypes': ['lua'], +\ 'description': 'Fix Lua files with luafmt.', +\ }, +\ 'dprint': { +\ 'function': 'ale#fixers#dprint#Fix', +\ 'suggested_filetypes': ['dockerfile', 'javascript', 'json', 'markdown', 'toml', 'typescript'], +\ 'description': 'Pluggable and configurable code formatting platform', +\ }, +\ 'stylua': { +\ 'function': 'ale#fixers#stylua#Fix', +\ 'suggested_filetypes': ['lua'], +\ 'description': 'Fix Lua files with stylua.', +\ }, +\ 'ormolu': { +\ 'function': 'ale#fixers#ormolu#Fix', +\ 'suggested_filetypes': ['haskell'], +\ 'description': 'A formatter for Haskell source code.', +\ }, +\ 'jsonnetfmt': { +\ 'function': 'ale#fixers#jsonnetfmt#Fix', +\ 'suggested_filetypes': ['jsonnet'], +\ 'description': 'Fix jsonnet files with jsonnetfmt', +\ }, +\ 'ptop': { +\ 'function': 'ale#fixers#ptop#Fix', +\ 'suggested_filetypes': ['pascal'], +\ 'description': 'Fix Pascal files with ptop.', +\ }, +\ 'opafmt': { +\ 'function': 'ale#fixers#opafmt#Fix', +\ 'suggested_filetypes': ['rego'], +\ 'description': 'Fix rego files with opa fmt.', +\ }, +\ 'vfmt': { +\ 'function': 'ale#fixers#vfmt#Fix', +\ 'suggested_filetypes': ['v'], +\ 'description': 'A formatter for V source code.', +\ }, +\ 'zigfmt': { +\ 'function': 'ale#fixers#zigfmt#Fix', +\ 'suggested_filetypes': ['zig'], +\ 'description': 'Official formatter for Zig', +\ }, +\ 'raco_fmt': { +\ 'function': 'ale#fixers#raco_fmt#Fix', +\ 'suggested_filetypes': ['racket'], +\ 'description': 'Fix Racket files with raco fmt.', +\ }, +\ 'ruff': { +\ 'function': 'ale#fixers#ruff#Fix', +\ 'suggested_filetypes': ['python'], +\ 'description': 'Fix python files with ruff.', +\ } +\} + +" Reset the function registry to the default entries. +function! ale#fix#registry#ResetToDefaults() abort + let s:entries = deepcopy(s:default_registry) + let s:aliases = {} + + " Set up aliases for fixers too. + for [l:key, l:entry] in items(s:entries) + for l:alias in get(l:entry, 'aliases', []) + let s:aliases[l:alias] = l:key + endfor + endfor +endfunction + +" Set up entries now. +call ale#fix#registry#ResetToDefaults() + +" Remove everything from the registry, useful for tests. +function! ale#fix#registry#Clear() abort + let s:entries = {} + let s:aliases = {} +endfunction + +" Add a function for fixing problems to the registry. +" (name, func, filetypes, desc, aliases) +function! ale#fix#registry#Add(name, func, filetypes, desc, ...) abort + " This command will throw from the sandbox. + let &l:equalprg=&l:equalprg + + if type(a:name) isnot v:t_string + throw '''name'' must be a String' + endif + + if type(a:func) isnot v:t_string + throw '''func'' must be a String' + endif + + if type(a:filetypes) isnot v:t_list + throw '''filetypes'' must be a List' + endif + + for l:type in a:filetypes + if type(l:type) isnot v:t_string + throw 'Each entry of ''filetypes'' must be a String' + endif + endfor + + if type(a:desc) isnot v:t_string + throw '''desc'' must be a String' + endif + + let l:aliases = get(a:000, 0, []) + + if type(l:aliases) isnot v:t_list + \|| !empty(filter(copy(l:aliases), 'type(v:val) isnot v:t_string')) + throw '''aliases'' must be a List of String values' + endif + + let s:entries[a:name] = { + \ 'function': a:func, + \ 'suggested_filetypes': a:filetypes, + \ 'description': a:desc, + \} + + " Set up aliases for the fixer. + if !empty(l:aliases) + let s:entries[a:name].aliases = l:aliases + + for l:alias in l:aliases + let s:aliases[l:alias] = a:name + endfor + endif +endfunction + +" Get a function from the registry by its short name. +function! ale#fix#registry#GetFunc(name) abort + " Use the exact name, or an alias. + let l:resolved_name = !has_key(s:entries, a:name) + \ ? get(s:aliases, a:name, a:name) + \ : a:name + + return get(s:entries, l:resolved_name, {'function': ''}).function +endfunction + +function! s:ShouldSuggestForType(suggested_filetypes, type_list) abort + for l:type in a:type_list + if index(a:suggested_filetypes, l:type) >= 0 + return 1 + endif + endfor + + return 0 +endfunction + +function! s:IsGenericFixer(suggested_filetypes) abort + if empty(a:suggested_filetypes) + return 1 + endif + + return 0 +endfunction + +function! s:FormatEntry(key, entry) abort + let l:aliases_str = '' + + " Show aliases in :ALEFixSuggest if they are there. + if !empty(get(a:entry, 'aliases', [])) + let l:aliases_str = ', ' . join( + \ map(copy(a:entry.aliases), 'string(v:val)'), + \ ',' + \) + endif + + return printf( + \ '%s%s - %s', + \ string(a:key), + \ l:aliases_str, + \ a:entry.description, + \) +endfunction + +" Get list of applicable fixers for filetype, including generic fixers +function! ale#fix#registry#GetApplicableFixers(filetype) abort + let l:type_list = split(a:filetype, '\.') + let l:fixer_name_list = [] + + for l:key in sort(keys(s:entries)) + let l:suggested_filetypes = s:entries[l:key].suggested_filetypes + + if s:IsGenericFixer(l:suggested_filetypes) || s:ShouldSuggestForType(l:suggested_filetypes, l:type_list) + call add(l:fixer_name_list, l:key) + endif + endfor + + return l:fixer_name_list +endfunction + +" Function that returns autocomplete candidates for ALEFix command +function! ale#fix#registry#CompleteFixers(ArgLead, CmdLine, CursorPos) abort + return filter(ale#fix#registry#GetApplicableFixers(&filetype), 'v:val =~? a:ArgLead') +endfunction + +function! ale#fix#registry#SuggestedFixers(filetype) abort + let l:type_list = split(a:filetype, '\.') + let l:filetype_fixer_list = [] + + for l:key in sort(keys(s:entries)) + let l:suggested_filetypes = s:entries[l:key].suggested_filetypes + + if s:ShouldSuggestForType(l:suggested_filetypes, l:type_list) + call add( + \ l:filetype_fixer_list, + \ s:FormatEntry(l:key, s:entries[l:key]), + \) + endif + endfor + + let l:generic_fixer_list = [] + + for l:key in sort(keys(s:entries)) + if s:IsGenericFixer(s:entries[l:key].suggested_filetypes) + call add( + \ l:generic_fixer_list, + \ s:FormatEntry(l:key, s:entries[l:key]), + \) + endif + endfor + + return [l:filetype_fixer_list, l:generic_fixer_list] +endfunction + +" Suggest functions to use from the registry. +function! ale#fix#registry#Suggest(filetype) abort + let l:suggested = ale#fix#registry#SuggestedFixers(a:filetype) + let l:filetype_fixer_list = l:suggested[0] + let l:generic_fixer_list = l:suggested[1] + + let l:filetype_fixer_header = !empty(l:filetype_fixer_list) + \ ? ['Try the following fixers appropriate for the filetype:', ''] + \ : [] + let l:generic_fixer_header = !empty(l:generic_fixer_list) + \ ? ['Try the following generic fixers:', ''] + \ : [] + + let l:has_both_lists = !empty(l:filetype_fixer_list) && !empty(l:generic_fixer_list) + + let l:lines = + \ l:filetype_fixer_header + \ + l:filetype_fixer_list + \ + (l:has_both_lists ? [''] : []) + \ + l:generic_fixer_header + \ + l:generic_fixer_list + + if empty(l:lines) + let l:lines = ['There is nothing in the registry to suggest.'] + else + let l:lines += ['', 'See :help ale-fix-configuration'] + endif + + let l:lines += ['', 'Press q to close this window'] + + new +set\ filetype=ale-fix-suggest + call setline(1, l:lines) + setlocal nomodified + setlocal nomodifiable +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/appleswiftformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/appleswiftformat.vim new file mode 100644 index 0000000..ca27e82 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/appleswiftformat.vim @@ -0,0 +1,16 @@ +" Author: (bosr) +" Description: Integration of apple/swift-format formatter with ALE. + +function! ale#fixers#appleswiftformat#Fix(buffer) abort + let l:command_args = ale#swift#GetAppleSwiftFormatCommand(a:buffer) . ' format --in-place %t' + let l:config_args = ale#swift#GetAppleSwiftFormatConfigArgs(a:buffer) + + if l:config_args isnot# '' + let l:command_args = l:command_args . ' ' . l:config_args + endif + + return { + \ 'read_temporary_file': 1, + \ 'command': l:command_args, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/astyle.vim b/dot_vim/plugged/ale/autoload/ale/fixers/astyle.vim new file mode 100644 index 0000000..3a5a70a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/astyle.vim @@ -0,0 +1,59 @@ +" Author: James Kim +" Description: Fix C/C++ files with astyle. + +function! s:set_variables() abort + for l:ft in ['c', 'cpp'] + call ale#Set(l:ft . '_astyle_executable', 'astyle') + call ale#Set(l:ft . '_astyle_project_options', '') + endfor +endfunction + +call s:set_variables() + + +function! ale#fixers#astyle#Var(buffer, name) abort + let l:ft = getbufvar(str2nr(a:buffer), '&filetype') + let l:ft = l:ft =~# 'cpp' ? 'cpp' : 'c' + + return ale#Var(a:buffer, l:ft . '_astyle_' . a:name) +endfunction + +" Try to find a project options file. +function! ale#fixers#astyle#FindProjectOptions(buffer) abort + let l:proj_options = ale#fixers#astyle#Var(a:buffer, 'project_options') + + " If user has set project options variable then use it and skip any searching. + " This would allow users to use project files named differently than .astylerc. + if !empty(l:proj_options) + return l:proj_options + endif + + " Try to find nearest .astylerc file. + let l:proj_options = fnamemodify(ale#path#FindNearestFile(a:buffer, '.astylerc'), ':t') + + if !empty(l:proj_options) + return l:proj_options + endif + + " Try to find nearest _astylerc file. + let l:proj_options = fnamemodify(ale#path#FindNearestFile(a:buffer, '_astylerc'), ':t') + + if !empty(l:proj_options) + return l:proj_options + endif + + " If no project options file is found return an empty string. + return '' +endfunction + +function! ale#fixers#astyle#Fix(buffer) abort + let l:executable = ale#fixers#astyle#Var(a:buffer, 'executable') + let l:proj_options = ale#fixers#astyle#FindProjectOptions(a:buffer) + let l:command = ' --stdin=' . ale#Escape(expand('#' . a:buffer)) + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:proj_options) ? '' : ' --project=' . l:proj_options) + \ . l:command + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/autoflake.vim b/dot_vim/plugged/ale/autoload/ale/fixers/autoflake.vim new file mode 100644 index 0000000..e2ad653 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/autoflake.vim @@ -0,0 +1,28 @@ +" Author: circld +" Description: Fixing files with autoflake. + +call ale#Set('python_autoflake_executable', 'autoflake') +call ale#Set('python_autoflake_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_autoflake_options', '') + +function! ale#fixers#autoflake#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_autoflake', + \ ['autoflake'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:options = ale#Var(a:buffer, 'python_autoflake_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --in-place ' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/autoimport.vim b/dot_vim/plugged/ale/autoload/ale/fixers/autoimport.vim new file mode 100644 index 0000000..700d36b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/autoimport.vim @@ -0,0 +1,27 @@ +" Author: lyz-code +" Description: Fixing Python imports with autoimport. + +call ale#Set('python_autoimport_executable', 'autoimport') +call ale#Set('python_autoimport_options', '') +call ale#Set('python_autoimport_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#autoimport#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'python_autoimport_options') + + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_autoimport', + \ ['autoimport'], + \) + + if !executable(l:executable) + return 0 + endif + + return { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/autopep8.vim b/dot_vim/plugged/ale/autoload/ale/fixers/autopep8.vim new file mode 100644 index 0000000..5798d82 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/autopep8.vim @@ -0,0 +1,26 @@ +" Author: w0rp +" Description: Fixing files with autopep8. + +call ale#Set('python_autopep8_executable', 'autopep8') +call ale#Set('python_autopep8_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_autopep8_options', '') + +function! ale#fixers#autopep8#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_autopep8', + \ ['autopep8'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:options = ale#Var(a:buffer, 'python_autopep8_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/bibclean.vim b/dot_vim/plugged/ale/autoload/ale/fixers/bibclean.vim new file mode 100644 index 0000000..89cb97a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/bibclean.vim @@ -0,0 +1,15 @@ +" Author: Horacio Sanson - https://github.com/hsanson +" Description: Support for bibclean fixer for BibTeX files. + +call ale#Set('bib_bibclean_executable', 'bibclean') +call ale#Set('bib_bibclean_options', '-align-equals') + +function! ale#fixers#bibclean#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'bib_bibclean_options') + let l:executable = ale#Var(a:buffer, 'bib_bibclean_executable') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . (empty(l:options) ? '' : l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/black.vim b/dot_vim/plugged/ale/autoload/ale/fixers/black.vim new file mode 100644 index 0000000..4a88c5c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/black.vim @@ -0,0 +1,52 @@ +" Author: w0rp +" Description: Fixing Python files with black. +" +call ale#Set('python_black_executable', 'black') +call ale#Set('python_black_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_black_options', '') +call ale#Set('python_black_auto_pipenv', 0) +call ale#Set('python_black_auto_poetry', 0) +call ale#Set('python_black_change_directory', 1) + +function! ale#fixers#black#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_black_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_black_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_black', ['black']) +endfunction + +function! ale#fixers#black#Fix(buffer) abort + let l:executable = ale#fixers#black#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'black']) + endif + + let l:options = ale#Var(a:buffer, 'python_black_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + if expand('#' . a:buffer . ':e') is? 'pyi' + call add(l:cmd, '--pyi') + endif + + call add(l:cmd, '-') + + let l:result = {'command': join(l:cmd, ' ')} + + if ale#Var(a:buffer, 'python_black_change_directory') + let l:result.cwd = '%s:h' + endif + + return l:result +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/brittany.vim b/dot_vim/plugged/ale/autoload/ale/fixers/brittany.vim new file mode 100644 index 0000000..c244834 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/brittany.vim @@ -0,0 +1,22 @@ +" Author: eborden , ifyouseewendy , aspidiets +" Description: Integration of brittany with ALE. + +call ale#Set('haskell_brittany_executable', 'brittany') + +function! ale#fixers#brittany#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_brittany_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'brittany') +endfunction + +function! ale#fixers#brittany#Fix(buffer) abort + let l:executable = ale#fixers#brittany#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' --write-mode inplace' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/buf_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/buf_format.vim new file mode 100644 index 0000000..c2c156b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/buf_format.vim @@ -0,0 +1,12 @@ +" Author: Alex McKinney +" Description: Run buf format. + +call ale#Set('proto_buf_format_executable', 'buf') + +function! ale#fixers#buf_format#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'proto_buf_format_executable') + + return { + \ 'command': ale#Escape(l:executable) . ' format %t', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/buildifier.vim b/dot_vim/plugged/ale/autoload/ale/fixers/buildifier.vim new file mode 100644 index 0000000..48103b2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/buildifier.vim @@ -0,0 +1,26 @@ +" Author: Jon Parise +" Description: Format Bazel BUILD and .bzl files with buildifier. +" +call ale#Set('bazel_buildifier_executable', 'buildifier') +call ale#Set('bazel_buildifier_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('bazel_buildifier_options', '') + +function! ale#fixers#buildifier#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'bazel_buildifier', [ + \ 'buildifier', + \]) +endfunction + +function! ale#fixers#buildifier#Fix(buffer) abort + let l:executable = ale#Escape(ale#fixers#buildifier#GetExecutable(a:buffer)) + let l:options = ale#Var(a:buffer, 'bazel_buildifier_options') + let l:filename = ale#Escape(bufname(a:buffer)) + + let l:command = l:executable . ' -mode fix -lint fix -path ' . l:filename + + if l:options isnot# '' + let l:command .= ' ' . l:options + endif + + return {'command': l:command . ' -'} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/clangformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/clangformat.vim new file mode 100644 index 0000000..81498eb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/clangformat.vim @@ -0,0 +1,47 @@ +scriptencoding utf-8 +" Author: Peter Renström +" Description: Fixing C/C++ files with clang-format. + +call ale#Set('c_clangformat_executable', 'clang-format') +call ale#Set('c_clangformat_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('c_clangformat_options', '') +call ale#Set('c_clangformat_style_option', '') +call ale#Set('c_clangformat_use_local_file', 0) + +function! ale#fixers#clangformat#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'c_clangformat', [ + \ 'clang-format', + \]) +endfunction + +function! ale#fixers#clangformat#Fix(buffer) abort + let l:executable = ale#Escape(ale#fixers#clangformat#GetExecutable(a:buffer)) + let l:filename = ale#Escape(bufname(a:buffer)) + let l:options = ale#Var(a:buffer, 'c_clangformat_options') + let l:style_option = ale#Var(a:buffer, 'c_clangformat_style_option') + let l:use_local_file = ale#Var(a:buffer, 'c_clangformat_use_local_file') + + if l:style_option isnot# '' + let l:style_option = '-style=' . "'" . l:style_option . "'" + endif + + if l:use_local_file + let l:config = ale#path#FindNearestFile(a:buffer, '.clang-format') + + if !empty(l:config) + let l:style_option = '-style=file' + endif + endif + + if l:style_option isnot# '' + let l:options .= ' ' . l:style_option + endif + + let l:command = l:executable . ' --assume-filename=' . l:filename + + if l:options isnot# '' + let l:command .= ' ' . l:options + endif + + return {'command': l:command} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/clangtidy.vim b/dot_vim/plugged/ale/autoload/ale/fixers/clangtidy.vim new file mode 100644 index 0000000..b37360a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/clangtidy.vim @@ -0,0 +1,52 @@ +scriptencoding utf-8 +" Author: ObserverOfTime +" Description: Fixing C/C++ files with clang-tidy. + +function! s:set_variables() abort + let l:use_global = get(g:, 'ale_use_global_executables', 0) + + for l:ft in ['c', 'cpp'] + call ale#Set(l:ft . '_clangtidy_executable', 'clang-tidy') + call ale#Set(l:ft . '_clangtidy_use_global', l:use_global) + call ale#Set(l:ft . '_clangtidy_checks', []) + call ale#Set(l:ft . '_clangtidy_options', '') + call ale#Set(l:ft . '_clangtidy_extra_options', '') + call ale#Set(l:ft . '_clangtidy_fix_errors', 1) + endfor + + call ale#Set('c_build_dir', '') +endfunction + +call s:set_variables() + +function! ale#fixers#clangtidy#Var(buffer, name) abort + let l:ft = getbufvar(str2nr(a:buffer), '&filetype') + let l:ft = l:ft =~# 'cpp' ? 'cpp' : 'c' + + return ale#Var(a:buffer, l:ft . '_clangtidy_' . a:name) +endfunction + +function! ale#fixers#clangtidy#GetCommand(buffer) abort + let l:checks = join(ale#fixers#clangtidy#Var(a:buffer, 'checks'), ',') + let l:extra_options = ale#fixers#clangtidy#Var(a:buffer, 'extra_options') + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + let l:options = empty(l:build_dir) + \ ? ale#fixers#clangtidy#Var(a:buffer, 'options') : '' + let l:fix_errors = ale#fixers#clangtidy#Var(a:buffer, 'fix_errors') + + return ' -fix' . (l:fix_errors ? ' -fix-errors' : '') + \ . (empty(l:checks) ? '' : ' -checks=' . ale#Escape(l:checks)) + \ . (empty(l:extra_options) ? '' : ' ' . l:extra_options) + \ . (empty(l:build_dir) ? '' : ' -p ' . ale#Escape(l:build_dir)) + \ . ' %t' . (empty(l:options) ? '' : ' -- ' . l:options) +endfunction + +function! ale#fixers#clangtidy#Fix(buffer) abort + let l:executable = ale#fixers#clangtidy#Var(a:buffer, 'executable') + let l:command = ale#fixers#clangtidy#GetCommand(a:buffer) + + return { + \ 'command': ale#Escape(l:executable) . l:command, + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/cmakeformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/cmakeformat.vim new file mode 100644 index 0000000..dcc29cf --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/cmakeformat.vim @@ -0,0 +1,16 @@ +" Author: Attila Maczak +" Description: Integration of cmakeformat with ALE. + +call ale#Set('cmake_cmakeformat_executable', 'cmake-format') +call ale#Set('cmake_cmakeformat_options', '') + +function! ale#fixers#cmakeformat#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'cmake_cmakeformat_executable') + let l:options = ale#Var(a:buffer, 'cmake_cmakeformat_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/crystal.vim b/dot_vim/plugged/ale/autoload/ale/fixers/crystal.vim new file mode 100644 index 0000000..4ba702b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/crystal.vim @@ -0,0 +1,14 @@ +call ale#Set('crystal_format_executable', 'crystal') +call ale#Set('crystal_format_options', '') + +function! ale#fixers#crystal#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'crystal_format_executable') + let l:options = ale#Var(a:buffer, 'crystal_format_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' tool format' + \ . ale#Pad(l:options) + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/css_beautify.vim b/dot_vim/plugged/ale/autoload/ale/fixers/css_beautify.vim new file mode 100644 index 0000000..14a837c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/css_beautify.vim @@ -0,0 +1,20 @@ +" Author: https://github.com/Spixmaster +" Description: Format CSS using css-beautify from js-beautify. + +call ale#Set('css_css_beautify_executable', 'css-beautify') +call ale#Set('css_css_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('css_css_beautify_options', '') + +function! ale#fixers#css_beautify#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'css_css_beautify', + \ ['css-beautify'] + \) + + let l:options = ale#Var(a:buffer, 'css_css_beautify_options') + + return { + \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dart_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dart_format.vim new file mode 100644 index 0000000..4b8f730 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dart_format.vim @@ -0,0 +1,18 @@ +" Author: ghsang +" Description: Integration of dart format with ALE. + +call ale#Set('dart_format_executable', 'dart') +call ale#Set('dart_format_options', '') + +function! ale#fixers#dart_format#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'dart_format_executable') + let l:options = ale#Var(a:buffer, 'dart_format_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' format' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dartfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dartfmt.vim new file mode 100644 index 0000000..0687d6d --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dartfmt.vim @@ -0,0 +1,18 @@ +" Author: reisub0 +" Description: Integration of dartfmt with ALE. + +call ale#Set('dart_dartfmt_executable', 'dartfmt') +call ale#Set('dart_dartfmt_options', '') + +function! ale#fixers#dartfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'dart_dartfmt_executable') + let l:options = ale#Var(a:buffer, 'dart_dartfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -w' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/deno.vim b/dot_vim/plugged/ale/autoload/ale/fixers/deno.vim new file mode 100644 index 0000000..7154c6e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/deno.vim @@ -0,0 +1,17 @@ +function! ale#fixers#deno#Fix(buffer) abort + let l:executable = ale#handlers#deno#GetExecutable(a:buffer) + + if !executable(l:executable) + return 0 + endif + + let l:options = ' fmt -' + + if ale#Var(a:buffer, 'deno_unstable') + let l:options = l:options . ' --unstable' + endif + + return { + \ 'command': ale#Escape(l:executable) . l:options + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dfmt.vim new file mode 100644 index 0000000..0072e04 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dfmt.vim @@ -0,0 +1,18 @@ +" Author: theoldmoon0602 +" Description: Integration of dfmt with ALE. + +call ale#Set('d_dfmt_executable', 'dfmt') +call ale#Set('d_dfmt_options', '') + +function! ale#fixers#dfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'd_dfmt_executable') + let l:options = ale#Var(a:buffer, 'd_dfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -i' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dhall_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_format.vim new file mode 100644 index 0000000..4f12abc --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_format.vim @@ -0,0 +1,11 @@ +" Author: toastal +" Description: Dhall’s built-in formatter +" +function! ale#fixers#dhall_format#Fix(buffer) abort + let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) + + return { + \ 'command': l:executable + \ . ' format' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dhall_freeze.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_freeze.vim new file mode 100644 index 0000000..ff54482 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_freeze.vim @@ -0,0 +1,14 @@ +" Author: toastal +" Description: Dhall’s package freezing + +call ale#Set('dhall_freeze_options', '') + +function! ale#fixers#dhall_freeze#Freeze(buffer) abort + let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) + + return { + \ 'command': l:executable + \ . ' freeze' + \ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options')) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dhall_lint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_lint.vim new file mode 100644 index 0000000..149a658 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dhall_lint.vim @@ -0,0 +1,11 @@ +" Author: toastal +" Description: Dhall’s built-in linter/formatter + +function! ale#fixers#dhall_lint#Fix(buffer) abort + let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) + + return { + \ 'command': l:executable + \ . ' lint' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dotnet_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dotnet_format.vim new file mode 100644 index 0000000..b44a28b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dotnet_format.vim @@ -0,0 +1,18 @@ +" Author: ghsang +" Description: Integration of dotnet format with ALE. + +call ale#Set('cs_dotnet_format_executable', 'dotnet') +call ale#Set('cs_dotnet_format_options', '') + +function! ale#fixers#dotnet_format#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'cs_dotnet_format_executable') + let l:options = ale#Var(a:buffer, 'cs_dotnet_format_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' format' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --folder --include %t "$(dirname %t)"', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dprint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dprint.vim new file mode 100644 index 0000000..99e590d --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dprint.vim @@ -0,0 +1,29 @@ +call ale#Set('dprint_executable', 'dprint') +call ale#Set('dprint_executable_override', 0) +call ale#Set('dprint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('dprint_options', '') +call ale#Set('dprint_config', 'dprint.json') + +function! ale#fixers#dprint#Fix(buffer) abort + let l:executable = ale#path#FindExecutable(a:buffer, 'dprint', ['dprint']) + let l:executable_override = ale#Var(a:buffer, 'dprint_executable_override') + + if !executable(l:executable) && !l:executable_override + return 0 + endif + + let l:options = ale#Var(a:buffer, 'dprint_options') + let l:config = ale#path#FindNearestFile(a:buffer, ale#Var(a:buffer, 'dprint_config')) + + if !empty(l:config) + let l:options = l:options . ' -c ' . ale#Escape(l:config) + endif + + let l:options = l:options . ' --stdin %s' + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt ' + \ . l:options + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/dune.vim b/dot_vim/plugged/ale/autoload/ale/fixers/dune.vim new file mode 100644 index 0000000..6ef7ec9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/dune.vim @@ -0,0 +1,16 @@ +" Author: Albert Peschar +" Description: Fix files with dune format. + +call ale#Set('ocaml_dune_executable', 'dune') +call ale#Set('ocaml_dune_options', '') + +function! ale#fixers#dune#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ocaml_dune_executable') + let l:options = ale#Var(a:buffer, 'ocaml_dune_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' format' + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/elm_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/elm_format.vim new file mode 100644 index 0000000..a4740db --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/elm_format.vim @@ -0,0 +1,23 @@ +" Author: soywod +" Description: Integration of elm-format with ALE. + +call ale#Set('elm_format_executable', 'elm-format') +call ale#Set('elm_format_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('elm_format_options', '--yes') + +function! ale#fixers#elm_format#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'elm_format', [ + \ 'node_modules/.bin/elm-format', + \]) +endfunction + +function! ale#fixers#elm_format#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'elm_format_options') + + return { + \ 'command': ale#Escape(ale#fixers#elm_format#GetExecutable(a:buffer)) + \ . ' %t' + \ . (empty(l:options) ? '' : ' ' . l:options), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/erblint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/erblint.vim new file mode 100644 index 0000000..41aca0c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/erblint.vim @@ -0,0 +1,40 @@ +" Author: Roeland Moors - https://github.com/roelandmoors +" Description: ERB Lint, support for https://github.com/Shopify/erb-lint + +call ale#Set('eruby_erblint_executable', 'erblint') +call ale#Set('eruby_erblint_options', '') + + +" Erblint fixer outputs diagnostics first and then the fixed +" output. These are delimited by something like this: +" ================ /path/to/demo.html.erb ================== +" We only need the output after this +function! ale#fixers#erblint#PostProcess(buffer, output) abort + let l:line = 0 + + for l:output in a:output + let l:line = l:line + 1 + + if l:output =~# "^=\\+.*=\\+$" + break + endif + endfor + + return a:output[l:line :] +endfunction + +function! ale#fixers#erblint#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'eruby_erblint_executable') + let l:options = ale#Var(a:buffer, 'eruby_erblint_options') + + return ale#ruby#EscapeExecutable(l:executable, 'erblint') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --autocorrect --stdin %s' +endfunction + +function! ale#fixers#erblint#Fix(buffer) abort + return { + \ 'command': ale#fixers#erblint#GetCommand(a:buffer), + \ 'process_with': 'ale#fixers#erblint#PostProcess' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/erlfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/erlfmt.vim new file mode 100644 index 0000000..f9951e9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/erlfmt.vim @@ -0,0 +1,21 @@ +" Author: AntoineGagne - https://github.com/AntoineGagne +" Description: Integration of erlfmt with ALE. + +call ale#Set('erlang_erlfmt_executable', 'erlfmt') +call ale#Set('erlang_erlfmt_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('erlang_erlfmt_options', '') + +function! ale#fixers#erlfmt#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'erlang_erlfmt', ['erlfmt']) +endfunction + +function! ale#fixers#erlfmt#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'erlang_erlfmt_options') + let l:executable = ale#fixers#erlfmt#GetExecutable(a:buffer) + + let l:command = ale#Escape(l:executable) . (empty(l:options) ? '' : ' ' . l:options) . ' %s' + + return { + \ 'command': l:command + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/eslint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/eslint.vim new file mode 100644 index 0000000..c9535cb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/eslint.vim @@ -0,0 +1,83 @@ +" Author: w0rp +" Description: Fixing files with eslint. + +function! ale#fixers#eslint#Fix(buffer) abort + let l:executable = ale#handlers#eslint#GetExecutable(a:buffer) + let l:command = ale#node#Executable(a:buffer, l:executable) + \ . ' --version' + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale#fixers#eslint#ApplyFixForVersion'), + \) +endfunction + +function! ale#fixers#eslint#ProcessFixDryRunOutput(buffer, output) abort + for l:item in ale#util#FuzzyJSONDecode(a:output, []) + return split(get(l:item, 'output', ''), "\n") + endfor + + return [] +endfunction + +function! ale#fixers#eslint#ProcessEslintDOutput(buffer, output) abort + " If the output is an error message, don't use it. + for l:line in a:output[:10] + if l:line =~# '\v^Error:|^Could not connect' + return [] + endif + endfor + + return a:output +endfunction + +function! ale#fixers#eslint#ApplyFixForVersion(buffer, version) abort + let l:executable = ale#handlers#eslint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'javascript_eslint_options') + + " Use the configuration file from the options, if configured. + if l:options =~# '\v(^| )-c|(^| )--config' + let l:config = '' + let l:has_config = 1 + else + let l:config = ale#handlers#eslint#FindConfig(a:buffer) + let l:has_config = !empty(l:config) + endif + + if !l:has_config + return 0 + endif + + " Use --fix-to-stdout with eslint_d + if l:executable =~# 'eslint_d$' && ale#semver#GTE(a:version, [3, 19, 0]) + return { + \ 'cwd': ale#handlers#eslint#GetCwd(a:buffer), + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) + \ . ' --stdin-filename %s --stdin --fix-to-stdout', + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \} + endif + + " 4.9.0 is the first version with --fix-dry-run + if ale#semver#GTE(a:version, [4, 9, 0]) + return { + \ 'cwd': ale#handlers#eslint#GetCwd(a:buffer), + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json', + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \} + endif + + return { + \ 'cwd': ale#handlers#eslint#GetCwd(a:buffer), + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') + \ . ' --fix %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/fecs.vim b/dot_vim/plugged/ale/autoload/ale/fixers/fecs.vim new file mode 100644 index 0000000..d692bc9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/fecs.vim @@ -0,0 +1,17 @@ +" Author: harttle +" Description: Apply fecs format to a file. + +function! ale#fixers#fecs#Fix(buffer) abort + let l:executable = ale#handlers#fecs#GetExecutable(a:buffer) + + if !executable(l:executable) + return 0 + endif + + let l:config_options = ' format --replace=true %t' + + return { + \ 'command': ale#Escape(l:executable) . l:config_options, + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/fish_indent.vim b/dot_vim/plugged/ale/autoload/ale/fixers/fish_indent.vim new file mode 100644 index 0000000..ebf17c5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/fish_indent.vim @@ -0,0 +1,19 @@ +" Author: Chen YuanYuan +" Description: Integration of fish_indent with ALE. + +call ale#Set('fish_fish_indent_executable', 'fish_indent') +call ale#Set('fish_fish_indent_options', '') + +function! ale#fixers#fish_indent#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'fish_fish_indent_executable') + let l:options = ale#Var(a:buffer, 'fish_fish_indent_options') + let l:filename = ale#Escape(bufname(a:buffer)) + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -w ' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/fixjson.vim b/dot_vim/plugged/ale/autoload/ale/fixers/fixjson.vim new file mode 100644 index 0000000..4bad8f9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/fixjson.vim @@ -0,0 +1,28 @@ +" Author: rhysd +" Description: Integration of fixjson with ALE. + +call ale#Set('json_fixjson_executable', 'fixjson') +call ale#Set('json_fixjson_options', '') +call ale#Set('json_fixjson_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#fixjson#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'json_fixjson', [ + \ 'node_modules/.bin/fixjson', + \]) +endfunction + +function! ale#fixers#fixjson#Fix(buffer) abort + let l:executable = ale#Escape(ale#fixers#fixjson#GetExecutable(a:buffer)) + let l:filename = ale#Escape(bufname(a:buffer)) + let l:command = l:executable . ' --stdin-filename ' . l:filename + + let l:options = ale#Var(a:buffer, 'json_fixjson_options') + + if l:options isnot# '' + let l:command .= ' ' . l:options + endif + + return { + \ 'command': l:command + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/floskell.vim b/dot_vim/plugged/ale/autoload/ale/fixers/floskell.vim new file mode 100644 index 0000000..f0015db --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/floskell.vim @@ -0,0 +1,20 @@ +" Author: robertjlooby +" Description: Integration of floskell with ALE. + +call ale#Set('haskell_floskell_executable', 'floskell') + +function! ale#fixers#floskell#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_floskell_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'floskell') +endfunction + +function! ale#fixers#floskell#Fix(buffer) abort + let l:executable = ale#fixers#floskell#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/generic.vim b/dot_vim/plugged/ale/autoload/ale/fixers/generic.vim new file mode 100644 index 0000000..cb8865b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/generic.vim @@ -0,0 +1,25 @@ +" Author: w0rp +" Description: Generic functions for fixing files with. + +function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort + let l:end_index = len(a:lines) - 1 + + while l:end_index > 0 && empty(a:lines[l:end_index]) + let l:end_index -= 1 + endwhile + + return a:lines[:l:end_index] +endfunction + +" Remove all whitespaces at the end of lines +function! ale#fixers#generic#TrimWhitespace(buffer, lines) abort + let l:index = 0 + let l:lines_new = range(len(a:lines)) + + for l:line in a:lines + let l:lines_new[l:index] = substitute(l:line, '\s\+$', '', 'g') + let l:index = l:index + 1 + endfor + + return l:lines_new +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/generic_python.vim b/dot_vim/plugged/ale/autoload/ale/fixers/generic_python.vim new file mode 100644 index 0000000..d55a23c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/generic_python.vim @@ -0,0 +1,75 @@ +" Author: w0rp +" Description: Generic fixer functions for Python. + +" Add blank lines before control statements. +function! ale#fixers#generic_python#AddLinesBeforeControlStatements(buffer, lines) abort + let l:new_lines = [] + let l:last_indent_size = 0 + let l:last_line_is_blank = 0 + let l:in_docstring = 0 + + for l:line in a:lines + let l:indent_size = len(matchstr(l:line, '^ *')) + + if !l:in_docstring + " Make sure it is not just a single line docstring and then verify + " it's starting a new docstring + if match(l:line, '\v^ *("""|'''''').*("""|'''''')') == -1 + \&& match(l:line, '\v^ *("""|'''''')') >= 0 + let l:in_docstring = 1 + endif + else + if match(l:line, '\v^ *.*("""|'''''')') >= 0 + let l:in_docstring = 0 + endif + endif + + if !l:last_line_is_blank + \&& !l:in_docstring + \&& l:indent_size <= l:last_indent_size + \&& match(l:line, '\v^ *(return|if|for|while|break|continue)(\(| |$)') >= 0 + call add(l:new_lines, '') + endif + + call add(l:new_lines, l:line) + let l:last_indent_size = l:indent_size + let l:last_line_is_blank = empty(split(l:line)) + endfor + + return l:new_lines +endfunction + +" This function breaks up long lines so that autopep8 or other tools can +" fix the badly-indented code which is produced as a result. +function! ale#fixers#generic_python#BreakUpLongLines(buffer, lines) abort + " Default to a maximum line length of 79 + let l:max_line_length = 79 + let l:conf = ale#path#FindNearestFile(a:buffer, 'setup.cfg') + + " Read the maximum line length from setup.cfg + if !empty(l:conf) + for l:match in ale#util#GetMatches( + \ readfile(l:conf), + \ '\v^ *max-line-length *\= *(\d+)', + \) + let l:max_line_length = str2nr(l:match[1]) + endfor + endif + + let l:new_list = [] + + for l:line in a:lines + if len(l:line) > l:max_line_length && l:line !~# '# *noqa' + let l:line = substitute(l:line, '\v([(,])([^)])', '\1\n\2', 'g') + let l:line = substitute(l:line, '\v([^(])([)])', '\1,\n\2', 'g') + + for l:split_line in split(l:line, "\n") + call add(l:new_list, l:split_line) + endfor + else + call add(l:new_list, l:line) + endif + endfor + + return l:new_list +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/gnatpp.vim b/dot_vim/plugged/ale/autoload/ale/fixers/gnatpp.vim new file mode 100644 index 0000000..bf3d484 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/gnatpp.vim @@ -0,0 +1,17 @@ +" Author: tim +" Description: Fix files with gnatpp. + +call ale#Set('ada_gnatpp_executable', 'gnatpp') +call ale#Set('ada_gnatpp_options', '') + +function! ale#fixers#gnatpp#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ada_gnatpp_executable') + let l:options = ale#Var(a:buffer, 'ada_gnatpp_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/gofmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/gofmt.vim new file mode 100644 index 0000000..b9cfbb5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/gofmt.vim @@ -0,0 +1,16 @@ +" Author: aliou +" Description: Integration of gofmt with ALE. + +call ale#Set('go_gofmt_executable', 'gofmt') +call ale#Set('go_gofmt_options', '') + +function! ale#fixers#gofmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_gofmt_executable') + let l:options = ale#Var(a:buffer, 'go_gofmt_options') + let l:env = ale#go#EnvString(a:buffer) + + return { + \ 'command': l:env . ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/gofumpt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/gofumpt.vim new file mode 100644 index 0000000..9975320 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/gofumpt.vim @@ -0,0 +1,17 @@ +" Author: David Houston +" Description: A stricter gofmt implementation. + +call ale#Set('go_gofumpt_executable', 'gofumpt') +call ale#Set('go_gofumpt_options', '') + +function! ale#fixers#gofumpt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_gofumpt_executable') + let l:options = ale#Var(a:buffer, 'go_gofumpt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ale#Pad(l:options) + \ . ' -w -- %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/goimports.vim b/dot_vim/plugged/ale/autoload/ale/fixers/goimports.vim new file mode 100644 index 0000000..65f0fd9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/goimports.vim @@ -0,0 +1,23 @@ +" Author: Jeff Willette +" Description: Integration of goimports with ALE. + +call ale#Set('go_goimports_executable', 'goimports') +call ale#Set('go_goimports_options', '') + +function! ale#fixers#goimports#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_goimports_executable') + let l:options = ale#Var(a:buffer, 'go_goimports_options') + let l:env = ale#go#EnvString(a:buffer) + + if !executable(l:executable) + return 0 + endif + + return { + \ 'command': l:env . ale#Escape(l:executable) + \ . ' -l -w -srcdir %s' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/golines.vim b/dot_vim/plugged/ale/autoload/ale/fixers/golines.vim new file mode 100644 index 0000000..9326f48 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/golines.vim @@ -0,0 +1,21 @@ +" Author Pig Frown +" Description: Fix Go files long lines with golines" + +call ale#Set('go_golines_executable', 'golines') + +call ale#Set('go_golines_options', '') + +function! ale#fixers#golines#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_golines_executable') + let l:options = ale#Var(a:buffer, 'go_golines_options') + let l:env = ale#go#EnvString(a:buffer) + + if !executable(l:executable) + return 0 + endif + + return { + \ 'command': l:env . ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/gomod.vim b/dot_vim/plugged/ale/autoload/ale/fixers/gomod.vim new file mode 100644 index 0000000..ee8c46c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/gomod.vim @@ -0,0 +1,11 @@ +call ale#Set('go_go_executable', 'go') + +function! ale#fixers#gomod#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'go_go_executable') + let l:env = ale#go#EnvString(a:buffer) + + return { + \ 'command': l:env . ale#Escape(l:executable) . ' mod edit -fmt %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/google_java_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/google_java_format.vim new file mode 100644 index 0000000..20086c7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/google_java_format.vim @@ -0,0 +1,23 @@ +" Author: butlerx +" Description: Integration of Google-java-format with ALE. + +call ale#Set('java_google_java_format_executable', 'google-java-format') +call ale#Set('java_google_java_format_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('java_google_java_format_options', '') + +function! ale#fixers#google_java_format#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'java_google_java_format_options') + let l:executable = ale#Var(a:buffer, 'java_google_java_format_executable') + + if !executable(l:executable) + return 0 + endif + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --replace' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/hackfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/hackfmt.vim new file mode 100644 index 0000000..bf2d4f7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/hackfmt.vim @@ -0,0 +1,18 @@ +" Author: Sam Howie +" Description: Integration of hackfmt with ALE. + +call ale#Set('hack_hackfmt_executable', 'hackfmt') +call ale#Set('hack_hackfmt_options', '') + +function! ale#fixers#hackfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'hack_hackfmt_executable') + let l:options = ale#Var(a:buffer, 'hack_hackfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -i' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/help.vim b/dot_vim/plugged/ale/autoload/ale/fixers/help.vim new file mode 100644 index 0000000..b20740f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/help.vim @@ -0,0 +1,24 @@ +" Author: w0rp +" Description: Generic fixer functions for Vim help documents. + +function! ale#fixers#help#AlignTags(buffer, lines) abort + let l:new_lines = [] + + for l:line in a:lines + if len(l:line) != 79 + let l:match = matchlist(l:line, '\v +(\*[^*]+\*)$') + + if !empty(l:match) + let l:start = l:line[:-len(l:match[0]) - 1] + let l:tag = l:match[1] + let l:spaces = repeat(' ', 79 - len(l:start) - len(l:tag)) + + let l:line = l:start . l:spaces . l:tag + endif + endif + + call add(l:new_lines, l:line) + endfor + + return l:new_lines +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/hfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/hfmt.vim new file mode 100644 index 0000000..0407b71 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/hfmt.vim @@ -0,0 +1,16 @@ +" Author: zack +" Description: Integration of hfmt with ALE. + +call ale#Set('haskell_hfmt_executable', 'hfmt') + +function! ale#fixers#hfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hfmt_executable') + + return { + \ 'command': ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hfmt') + \ . ' -w' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/hindent.vim b/dot_vim/plugged/ale/autoload/ale/fixers/hindent.vim new file mode 100644 index 0000000..b6009a2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/hindent.vim @@ -0,0 +1,20 @@ +" Author: AlexeiDrake +" Description: Integration of hindent formatting with ALE. +" +call ale#Set('haskell_hindent_executable', 'hindent') + +function! ale#fixers#hindent#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hindent_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hindent') +endfunction + +function! ale#fixers#hindent#Fix(buffer) abort + let l:executable = ale#fixers#hindent#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/hlint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/hlint.vim new file mode 100644 index 0000000..88779a5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/hlint.vim @@ -0,0 +1,13 @@ +" Author: eborden +" Description: Integration of hlint refactor with ALE. +" + +function! ale#fixers#hlint#Fix(buffer) abort + return { + \ 'command': ale#handlers#hlint#GetExecutable(a:buffer) + \ . ' --refactor' + \ . ' --refactor-options="--inplace"' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/html_beautify.vim b/dot_vim/plugged/ale/autoload/ale/fixers/html_beautify.vim new file mode 100644 index 0000000..9817563 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/html_beautify.vim @@ -0,0 +1,20 @@ +" Author: WhyNotHugo +" Description: Format HTML files with html-beautify. + +call ale#Set('html_beautify_executable', 'html-beautify') +call ale#Set('html_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('html_beautify_options', '') + +function! ale#fixers#html_beautify#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'html_beautify', + \ ['html-beautify'] + \) + + let l:options = ale#Var(a:buffer, 'html_beautify_options') + + return { + \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/importjs.vim b/dot_vim/plugged/ale/autoload/ale/fixers/importjs.vim new file mode 100644 index 0000000..b5487b2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/importjs.vim @@ -0,0 +1,25 @@ +" Author: Jeff Willette +" Description: Integration of importjs with ALE. + +call ale#Set('javascript_importjs_executable', 'importjs') + +function! ale#fixers#importjs#ProcessOutput(buffer, output) abort + let l:result = ale#util#FuzzyJSONDecode(a:output, []) + + return split(get(l:result, 'fileContent', ''), "\n") +endfunction + +function! ale#fixers#importjs#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'javascript_importjs_executable') + + if !executable(l:executable) + return 0 + endif + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fix' + \ . ' %s', + \ 'process_with': 'ale#fixers#importjs#ProcessOutput', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/isort.vim b/dot_vim/plugged/ale/autoload/ale/fixers/isort.vim new file mode 100644 index 0000000..6eb6a67 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/isort.vim @@ -0,0 +1,71 @@ +" Author: w0rp +" Description: Fixing Python imports with isort. + +call ale#Set('python_isort_executable', 'isort') +call ale#Set('python_isort_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_isort_options', '') +call ale#Set('python_isort_auto_pipenv', 0) +call ale#Set('python_isort_auto_poetry', 0) + +function! ale#fixers#isort#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_isort_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_isort_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_isort', ['isort']) +endfunction + +function! ale#fixers#isort#GetCmd(buffer) abort + let l:executable = ale#fixers#isort#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'isort']) + endif + + return join(l:cmd, ' ') +endfunction + +function! ale#fixers#isort#FixForVersion(buffer, version) abort + let l:executable = ale#fixers#isort#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'isort']) + endif + + if ale#semver#GTE(a:version, [5, 7, 0]) + call add(l:cmd, '--filename %s') + endif + + let l:options = ale#Var(a:buffer, 'python_isort_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + call add(l:cmd, '-') + + return { + \ 'cwd': '%s:h', + \ 'command': join(l:cmd, ' '), + \} +endfunction + +function! ale#fixers#isort#Fix(buffer) abort + let l:executable = ale#fixers#isort#GetExecutable(a:buffer) + let l:command = ale#fixers#isort#GetCmd(a:buffer) . ale#Pad('--version') + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale#fixers#isort#FixForVersion'), + \) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/jq.vim b/dot_vim/plugged/ale/autoload/ale/fixers/jq.vim new file mode 100644 index 0000000..cd9b913 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/jq.vim @@ -0,0 +1,22 @@ +call ale#Set('json_jq_executable', 'jq') +call ale#Set('json_jq_options', '') +call ale#Set('json_jq_filters', '.') + +function! ale#fixers#jq#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'json_jq_executable') +endfunction + +function! ale#fixers#jq#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'json_jq_options') + let l:filters = ale#Var(a:buffer, 'json_jq_filters') + + if empty(l:filters) + return 0 + endif + + return { + \ 'command': ale#Escape(ale#fixers#jq#GetExecutable(a:buffer)) + \ . ' ' . l:filters . ' ' + \ . l:options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/jsonnetfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/jsonnetfmt.vim new file mode 100644 index 0000000..f1e41cd --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/jsonnetfmt.vim @@ -0,0 +1,18 @@ +" Authors: Trevor Whitney and Takuya Kosugiyama +" Description: Integration of jsonnetfmt with ALE. + +call ale#Set('jsonnet_jsonnetfmt_executable', 'jsonnetfmt') +call ale#Set('jsonnet_jsonnetfmt_options', '') + +function! ale#fixers#jsonnetfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_executable') + let l:options = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -i' + \ . ale#Pad(l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ktlint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ktlint.vim new file mode 100644 index 0000000..64d1340 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ktlint.vim @@ -0,0 +1,8 @@ +" Author: Michael Phillips +" Description: Fix Kotlin files with ktlint. + +function! ale#fixers#ktlint#Fix(buffer) abort + return { + \ 'command': ale#handlers#ktlint#GetCommand(a:buffer) . ' --format' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/latexindent.vim b/dot_vim/plugged/ale/autoload/ale/fixers/latexindent.vim new file mode 100644 index 0000000..54f1231 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/latexindent.vim @@ -0,0 +1,16 @@ +" Author: riley-martine +" Description: Integration of latexindent with ALE. + +call ale#Set('tex_latexindent_executable', 'latexindent') +call ale#Set('tex_latexindent_options', '') + +function! ale#fixers#latexindent#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'tex_latexindent_executable') + let l:options = ale#Var(a:buffer, 'tex_latexindent_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -l' + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/lua_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/lua_format.vim new file mode 100644 index 0000000..98b155c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/lua_format.vim @@ -0,0 +1,16 @@ +" Author: Mathias Jean Johansen +" Description: Integration of LuaFormatter with ALE. + +call ale#Set('lua_lua_format_executable', 'lua-format') +call ale#Set('lua_lua_format_options', '') + +function! ale#fixers#lua_format#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'lua_lua_format_executable') + let l:options = ale#Var(a:buffer, 'lua_lua_format_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ale#Pad(l:options) + \ . ' -i', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/luafmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/luafmt.vim new file mode 100644 index 0000000..6cb9ef4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/luafmt.vim @@ -0,0 +1,13 @@ +call ale#Set('lua_luafmt_executable', 'luafmt') +call ale#Set('lua_luafmt_options', '') + +function! ale#fixers#luafmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'lua_luafmt_executable') + let l:options = ale#Var(a:buffer, 'lua_luafmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --stdin', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/mix_format.vim b/dot_vim/plugged/ale/autoload/ale/fixers/mix_format.vim new file mode 100644 index 0000000..7a09170 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/mix_format.vim @@ -0,0 +1,25 @@ +" Author: carakan , Fernando Mendes +" Description: Fixing files with elixir formatter 'mix format'. + +call ale#Set('elixir_mix_executable', 'mix') +call ale#Set('elixir_mix_format_options', '') + +function! ale#fixers#mix_format#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'elixir_mix_executable') +endfunction + +function! ale#fixers#mix_format#GetCommand(buffer) abort + let l:executable = ale#Escape(ale#fixers#mix_format#GetExecutable(a:buffer)) + let l:options = ale#Var(a:buffer, 'elixir_mix_format_options') + + return l:executable . ' format' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +function! ale#fixers#mix_format#Fix(buffer) abort + return { + \ 'command': ale#fixers#mix_format#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/nimpretty.vim b/dot_vim/plugged/ale/autoload/ale/fixers/nimpretty.vim new file mode 100644 index 0000000..fe2e713 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/nimpretty.vim @@ -0,0 +1,15 @@ +" Author: Nhan +" Description: Integration of nimpretty with ALE. + +call ale#Set('nim_nimpretty_executable', 'nimpretty') +call ale#Set('nim_nimpretty_options', '--maxLineLen:80') + +function! ale#fixers#nimpretty#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nim_nimpretty_executable') + let l:options = ale#Var(a:buffer, 'nim_nimpretty_options') + + return { + \ 'command': ale#Escape(l:executable) . ' %t' . ale#Pad(l:options), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/nixfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/nixfmt.vim new file mode 100644 index 0000000..4a548b2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/nixfmt.vim @@ -0,0 +1,15 @@ +scriptencoding utf-8 +" Author: houstdav000 +" Description: Fix files with nixfmt + +call ale#Set('nix_nixfmt_executable', 'nixfmt') +call ale#Set('nix_nixfmt_options', '') + +function! ale#fixers#nixfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nix_nixfmt_executable') + let l:options = ale#Var(a:buffer, 'nix_nixfmt_options') + + return { + \ 'command': ale#Escape(l:executable) . ale#Pad(l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/nixpkgsfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/nixpkgsfmt.vim new file mode 100644 index 0000000..403ce79 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/nixpkgsfmt.vim @@ -0,0 +1,12 @@ +call ale#Set('nix_nixpkgsfmt_executable', 'nixpkgs-fmt') +call ale#Set('nix_nixpkgsfmt_options', '') + +function! ale#fixers#nixpkgsfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nix_nixpkgsfmt_executable') + let l:options = ale#Var(a:buffer, 'nix_nixpkgsfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ocamlformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ocamlformat.vim new file mode 100644 index 0000000..b12d2eb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ocamlformat.vim @@ -0,0 +1,17 @@ +" Author: Stephen Lumenta <@sbl> +" Description: Integration of ocamlformat with ALE. + +call ale#Set('ocaml_ocamlformat_executable', 'ocamlformat') +call ale#Set('ocaml_ocamlformat_options', '') + +function! ale#fixers#ocamlformat#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ocaml_ocamlformat_executable') + let l:options = ale#Var(a:buffer, 'ocaml_ocamlformat_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --name=%s' + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ocp_indent.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ocp_indent.vim new file mode 100644 index 0000000..e1b047b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ocp_indent.vim @@ -0,0 +1,18 @@ +" Author: Kanenobu Mitsuru +" Description: Integration of ocp-indent with ALE. + +call ale#Set('ocaml_ocp_indent_executable', 'ocp-indent') +call ale#Set('ocaml_ocp_indent_options', '') +call ale#Set('ocaml_ocp_indent_config', '') + +function! ale#fixers#ocp_indent#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'ocaml_ocp_indent_executable') + let l:config = ale#Var(a:buffer, 'ocaml_ocp_indent_config') + let l:options = ale#Var(a:buffer, 'ocaml_ocp_indent_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:config) ? '' : ' --config=' . ale#Escape(l:config)) + \ . (empty(l:options) ? '': ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/opafmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/opafmt.vim new file mode 100644 index 0000000..a0999b7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/opafmt.vim @@ -0,0 +1,15 @@ +" Description: Fixer for rego files + +call ale#Set('opa_fmt_executable', 'opa') +call ale#Set('opa_fmt_options', '') + +function! ale#fixers#opafmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'opa_fmt_executable') + let l:options = ale#Var(a:buffer, 'opa_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ormolu.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ormolu.vim new file mode 100644 index 0000000..69b55c1 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ormolu.vim @@ -0,0 +1,12 @@ +call ale#Set('haskell_ormolu_executable', 'ormolu') +call ale#Set('haskell_ormolu_options', '') + +function! ale#fixers#ormolu#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_ormolu_executable') + let l:options = ale#Var(a:buffer, 'haskell_ormolu_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/packer.vim b/dot_vim/plugged/ale/autoload/ale/fixers/packer.vim new file mode 100644 index 0000000..8770550 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/packer.vim @@ -0,0 +1,17 @@ +" Author: Zhuoyun Wei +" Description: Fixer for Packer HCL files + +call ale#Set('packer_fmt_executable', 'packer') +call ale#Set('packer_fmt_options', '') + +function! ale#fixers#packer#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'packer_fmt_executable') + let l:options = ale#Var(a:buffer, 'packer_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/pandoc.vim b/dot_vim/plugged/ale/autoload/ale/fixers/pandoc.vim new file mode 100644 index 0000000..d704c8a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/pandoc.vim @@ -0,0 +1,16 @@ +scriptencoding utf-8 +" Author: Jesse Hathaway +" Description: Fix markdown files with pandoc. + +call ale#Set('markdown_pandoc_executable', 'pandoc') +call ale#Set('markdown_pandoc_options', '-f gfm -t gfm -s -') + +function! ale#fixers#pandoc#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'markdown_pandoc_executable') + let l:options = ale#Var(a:buffer, 'markdown_pandoc_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . l:options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/perltidy.vim b/dot_vim/plugged/ale/autoload/ale/fixers/perltidy.vim new file mode 100644 index 0000000..a55a572 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/perltidy.vim @@ -0,0 +1,18 @@ +" Author: kfly8 +" Description: Integration of perltidy with ALE. + +call ale#Set('perl_perltidy_executable', 'perltidy') +call ale#Set('perl_perltidy_options', '') + +function! ale#fixers#perltidy#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'perl_perltidy_executable') + let l:options = ale#Var(a:buffer, 'perl_perltidy_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -b' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/pgformatter.vim b/dot_vim/plugged/ale/autoload/ale/fixers/pgformatter.vim new file mode 100644 index 0000000..9ea08ec --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/pgformatter.vim @@ -0,0 +1,12 @@ +call ale#Set('sql_pgformatter_executable', 'pg_format') +call ale#Set('sql_pgformatter_options', '') + +function! ale#fixers#pgformatter#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_pgformatter_executable') + let l:options = ale#Var(a:buffer, 'sql_pgformatter_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/php_cs_fixer.vim b/dot_vim/plugged/ale/autoload/ale/fixers/php_cs_fixer.vim new file mode 100644 index 0000000..c8f9c7b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/php_cs_fixer.vim @@ -0,0 +1,24 @@ +" Author: Julien Deniau +" Description: Fixing files with php-cs-fixer. + +call ale#Set('php_cs_fixer_executable', 'php-cs-fixer') +call ale#Set('php_cs_fixer_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('php_cs_fixer_options', '') + +function! ale#fixers#php_cs_fixer#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'php_cs_fixer', [ + \ 'vendor/bin/php-cs-fixer', + \ 'php-cs-fixer' + \]) +endfunction + +function! ale#fixers#php_cs_fixer#Fix(buffer) abort + let l:executable = ale#fixers#php_cs_fixer#GetExecutable(a:buffer) + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . ale#Var(a:buffer, 'php_cs_fixer_options') + \ . ' fix %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/phpcbf.vim b/dot_vim/plugged/ale/autoload/ale/fixers/phpcbf.vim new file mode 100644 index 0000000..494bf34 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/phpcbf.vim @@ -0,0 +1,26 @@ +" Author: notomo +" Description: Fixing files with phpcbf. + +call ale#Set('php_phpcbf_standard', '') +call ale#Set('php_phpcbf_options', '') +call ale#Set('php_phpcbf_executable', 'phpcbf') +call ale#Set('php_phpcbf_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#phpcbf#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'php_phpcbf', [ + \ 'vendor/bin/phpcbf', + \ 'phpcbf' + \]) +endfunction + +function! ale#fixers#phpcbf#Fix(buffer) abort + let l:executable = ale#fixers#phpcbf#GetExecutable(a:buffer) + let l:standard = ale#Var(a:buffer, 'php_phpcbf_standard') + let l:standard_option = !empty(l:standard) + \ ? '--standard=' . l:standard + \ : '' + + return { + \ 'command': ale#Escape(l:executable) . ' --stdin-path=%s ' . l:standard_option . ale#Pad(ale#Var(a:buffer, 'php_phpcbf_options')) . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/pint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/pint.vim new file mode 100644 index 0000000..274ddd9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/pint.vim @@ -0,0 +1,25 @@ +" Author: Michael Dyrynda +" Description: Fixing files with Laravel Pint. + +call ale#Set('php_pint_executable', 'pint') +call ale#Set('php_pint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('php_pint_options', '') + +function! ale#fixers#pint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'php_pint', [ + \ 'vendor/bin/pint', + \ 'pint' + \]) +endfunction + +function! ale#fixers#pint#Fix(buffer) abort + let l:executable = ale#fixers#pint#GetExecutable(a:buffer) + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . ale#Var(a:buffer, 'php_pint_options') + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/prettier.vim b/dot_vim/plugged/ale/autoload/ale/fixers/prettier.vim new file mode 100644 index 0000000..8a67e2f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/prettier.vim @@ -0,0 +1,124 @@ +" Author: tunnckoCore (Charlike Mike Reagent) , +" w0rp , morhetz (Pavel Pertsev) +" Description: Integration of Prettier with ALE. + +call ale#Set('javascript_prettier_executable', 'prettier') +call ale#Set('javascript_prettier_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_prettier_options', '') + +function! ale#fixers#prettier#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_prettier', [ + \ 'node_modules/.bin/prettier_d', + \ 'node_modules/prettier-cli/index.js', + \ 'node_modules/.bin/prettier', + \]) +endfunction + +function! ale#fixers#prettier#Fix(buffer) abort + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ ale#fixers#prettier#GetExecutable(a:buffer), + \ '%e --version', + \ function('ale#fixers#prettier#ApplyFixForVersion'), + \) +endfunction + +function! ale#fixers#prettier#ProcessPrettierDOutput(buffer, output) abort + " If the output is an error message, don't use it. + for l:line in a:output[:10] + if l:line =~# '^\w*Error:' + return [] + endif + endfor + + return a:output +endfunction + +function! ale#fixers#prettier#GetCwd(buffer) abort + let l:config = ale#path#FindNearestFile(a:buffer, '.prettierignore') + + " Fall back to the directory of the buffer + return !empty(l:config) ? fnamemodify(l:config, ':h') : '%s:h' +endfunction + +function! ale#fixers#prettier#ApplyFixForVersion(buffer, version) abort + let l:executable = ale#fixers#prettier#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'javascript_prettier_options') + let l:parser = '' + + let l:filetypes = split(getbufvar(a:buffer, '&filetype'), '\.') + + if index(l:filetypes, 'handlebars') > -1 + let l:parser = 'glimmer' + endif + + " Append the --parser flag depending on the current filetype (unless it's + " already set in g:javascript_prettier_options). + if empty(expand('#' . a:buffer . ':e')) && l:parser is# '' && match(l:options, '--parser') == -1 + " Mimic Prettier's defaults. In cases without a file extension or + " filetype (scratch buffer), Prettier needs `parser` set to know how + " to process the buffer. + if ale#semver#GTE(a:version, [1, 16, 0]) + let l:parser = 'babel' + else + let l:parser = 'babylon' + endif + + let l:prettier_parsers = { + \ 'typescript': 'typescript', + \ 'css': 'css', + \ 'less': 'less', + \ 'scss': 'scss', + \ 'json': 'json', + \ 'json5': 'json5', + \ 'graphql': 'graphql', + \ 'markdown': 'markdown', + \ 'vue': 'vue', + \ 'svelte': 'svelte', + \ 'yaml': 'yaml', + \ 'openapi': 'yaml', + \ 'html': 'html', + \ 'ruby': 'ruby', + \} + + for l:filetype in l:filetypes + if has_key(l:prettier_parsers, l:filetype) + let l:parser = l:prettier_parsers[l:filetype] + break + endif + endfor + endif + + if !empty(l:parser) + let l:options = (!empty(l:options) ? l:options . ' ' : '') . '--parser ' . l:parser + endif + + " Special error handling needed for prettier_d + if l:executable =~# 'prettier_d$' + return { + \ 'cwd': '%s:h', + \ 'command':ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin-filepath %s --stdin', + \ 'process_with': 'ale#fixers#prettier#ProcessPrettierDOutput', + \} + endif + + " 1.4.0 is the first version with --stdin-filepath + if ale#semver#GTE(a:version, [1, 4, 0]) + return { + \ 'cwd': ale#fixers#prettier#GetCwd(a:buffer), + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin-filepath %s --stdin', + \} + endif + + return { + \ 'command': ale#Escape(l:executable) + \ . ' %t' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --write', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/prettier_eslint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/prettier_eslint.vim new file mode 100644 index 0000000..0b9c88b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/prettier_eslint.vim @@ -0,0 +1,56 @@ +" Author: tunnckoCore (Charlike Mike Reagent) , +" w0rp , morhetz (Pavel Pertsev) +" Description: Integration between Prettier and ESLint. + +call ale#Set('javascript_prettier_eslint_executable', 'prettier-eslint') +call ale#Set('javascript_prettier_eslint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_prettier_eslint_options', '') + +function! ale#fixers#prettier_eslint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_prettier_eslint', [ + \ 'node_modules/prettier-eslint-cli/dist/index.js', + \ 'node_modules/.bin/prettier-eslint', + \]) +endfunction + +function! ale#fixers#prettier_eslint#Fix(buffer) abort + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ ale#fixers#prettier_eslint#GetExecutable(a:buffer), + \ '%e --version', + \ function('ale#fixers#prettier_eslint#ApplyFixForVersion'), + \) +endfunction + +function! ale#fixers#prettier_eslint#ApplyFixForVersion(buffer, version) abort + let l:options = ale#Var(a:buffer, 'javascript_prettier_eslint_options') + let l:executable = ale#fixers#prettier_eslint#GetExecutable(a:buffer) + + " 4.2.0 is the first version with --eslint-config-path + let l:config = ale#semver#GTE(a:version, [4, 2, 0]) + \ ? ale#handlers#eslint#FindConfig(a:buffer) + \ : '' + let l:eslint_config_option = !empty(l:config) + \ ? ' --eslint-config-path ' . ale#Escape(l:config) + \ : '' + + " 4.4.0 is the first version with --stdin-filepath + if ale#semver#GTE(a:version, [4, 4, 0]) + return { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(l:executable) + \ . l:eslint_config_option + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --stdin-filepath %s --stdin', + \} + endif + + return { + \ 'command': ale#Escape(l:executable) + \ . ' %t' + \ . l:eslint_config_option + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --write', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/prettier_standard.vim b/dot_vim/plugged/ale/autoload/ale/fixers/prettier_standard.vim new file mode 100644 index 0000000..c8c09e3 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/prettier_standard.vim @@ -0,0 +1,24 @@ +" Author: sheerun (Adam Stankiewicz) +" Description: Integration of Prettier Standard with ALE. + +call ale#Set('javascript_prettier_standard_executable', 'prettier-standard') +call ale#Set('javascript_prettier_standard_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_prettier_standard_options', '') + +function! ale#fixers#prettier_standard#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_prettier_standard', [ + \ 'node_modules/prettier-standard/lib/index.js', + \ 'node_modules/.bin/prettier-standard', + \]) +endfunction + +function! ale#fixers#prettier_standard#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'javascript_prettier_standard_options') + + return { + \ 'command': ale#Escape(ale#fixers#prettier_standard#GetExecutable(a:buffer)) + \ . ' --stdin' + \ . ' --stdin-filepath=%s' + \ . ' ' . l:options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/protolint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/protolint.vim new file mode 100644 index 0000000..9b8e72f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/protolint.vim @@ -0,0 +1,26 @@ +" Author: Yohei Yoshimuta +" Description: Integration of protolint with ALE. + +call ale#Set('proto_protolint_executable', 'protolint') +call ale#Set('proto_protolint_config', '') + +function! ale#fixers#protolint#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'proto_protolint_executable') + + return ale#Escape(l:executable) +endfunction + +function! ale#fixers#protolint#Fix(buffer) abort + let l:executable = ale#fixers#protolint#GetExecutable(a:buffer) + let l:config = ale#Var(a:buffer, 'proto_protolint_config') + + return { + \ 'command': l:executable + \ . (!empty(l:config) ? ' -config_path=' . ale#Escape(l:config) : '') + \ . ' -fix' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ptop.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ptop.vim new file mode 100644 index 0000000..9834522 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ptop.vim @@ -0,0 +1,17 @@ +" Author: BarrOff https://github.com/BarrOff +" Description: Integration of ptop with ALE. + +call ale#Set('pascal_ptop_executable', 'ptop') +call ale#Set('pascal_ptop_options', '') + +function! ale#fixers#ptop#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'pascal_ptop_executable') + let l:options = ale#Var(a:buffer, 'pascal_ptop_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %s %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/puppetlint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/puppetlint.vim new file mode 100644 index 0000000..bf36e48 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/puppetlint.vim @@ -0,0 +1,22 @@ +" Author: Alexander Olofsson +" Description: puppet-lint fixer + +if !exists('g:ale_puppet_puppetlint_executable') + let g:ale_puppet_puppetlint_executable = 'puppet-lint' +endif + +if !exists('g:ale_puppet_puppetlint_options') + let g:ale_puppet_puppetlint_options = '' +endif + +function! ale#fixers#puppetlint#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'puppet_puppetlint_executable') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' ' . ale#Var(a:buffer, 'puppet_puppetlint_options') + \ . ' --fix' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/purs_tidy.vim b/dot_vim/plugged/ale/autoload/ale/fixers/purs_tidy.vim new file mode 100644 index 0000000..09fa631 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/purs_tidy.vim @@ -0,0 +1,24 @@ +" Author: toastal +" Description: Integration of purs-tidy with ALE. + +call ale#Set('purescript_tidy_executable', 'purs-tidy') +call ale#Set('purescript_tidy_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('purescript_tidy_options', '') + +function! ale#fixers#purs_tidy#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'purescript_tidy', [ + \ 'node_modules/purescript-tidy/bin/index.js', + \ 'node_modules/.bin/purs-tidy', + \]) +endfunction + +function! ale#fixers#purs_tidy#Fix(buffer) abort + let l:executable = ale#fixers#purs_tidy#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'purescript_tidy_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' format' + \ . ale#Pad(l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/purty.vim b/dot_vim/plugged/ale/autoload/ale/fixers/purty.vim new file mode 100644 index 0000000..46d2cac --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/purty.vim @@ -0,0 +1,22 @@ +" Author: iclanzan +" Description: Integration of purty with ALE. + +call ale#Set('purescript_purty_executable', 'purty') + +function! ale#fixers#purty#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'purescript_purty_executable') + + return ale#Escape(l:executable) +endfunction + +function! ale#fixers#purty#Fix(buffer) abort + let l:executable = ale#fixers#purty#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' --write' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/pyflyby.vim b/dot_vim/plugged/ale/autoload/ale/fixers/pyflyby.vim new file mode 100644 index 0000000..81c0f05 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/pyflyby.vim @@ -0,0 +1,41 @@ +" Author: infokiller +" Description: Tidy imports using pyflyby's tidy-import script +" https://github.com/deshaw/pyflyby + +call ale#Set('python_pyflyby_executable', 'tidy-imports') +call ale#Set('python_pyflyby_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pyflyby_options', '') +call ale#Set('python_pyflyby_auto_pipenv', 0) +call ale#Set('python_pyflyby_auto_poetry', 0) + +function! ale#fixers#pyflyby#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyflyby_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pyflyby_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_pyflyby', ['tidy-imports']) +endfunction + +function! ale#fixers#pyflyby#Fix(buffer) abort + " let l:executable = ale#fixers#pyflyby#GetExecutable(a:buffer) + let l:executable = ale#fixers#pyflyby#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'tidy-imports']) + endif + + let l:options = ale#Var(a:buffer, 'python_pyflyby_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + return {'command': join(l:cmd, ' ')} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/qmlfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/qmlfmt.vim new file mode 100644 index 0000000..90b2567 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/qmlfmt.vim @@ -0,0 +1,11 @@ +call ale#Set('qml_qmlfmt_executable', 'qmlfmt') + +function! ale#fixers#qmlfmt#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'qml_qmlfmt_executable') +endfunction + +function! ale#fixers#qmlfmt#Fix(buffer) abort + return { + \ 'command': ale#Escape(ale#fixers#qmlfmt#GetExecutable(a:buffer)), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/raco_fmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/raco_fmt.vim new file mode 100644 index 0000000..16cf446 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/raco_fmt.vim @@ -0,0 +1,15 @@ +" Author: Jeremy Cantrell +" Description: Integration of raco fmt with ALE. + +call ale#Set('racket_raco_fmt_executable', 'raco') +call ale#Set('racket_raco_fmt_options', '') + +function! ale#fixers#raco_fmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'racket_raco_fmt_executable') + let l:options = ale#Var(a:buffer, 'racket_raco_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/refmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/refmt.vim new file mode 100644 index 0000000..514f950 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/refmt.vim @@ -0,0 +1,18 @@ +" Author: Ahmed El Gabri <@ahmedelgabri> +" Description: Integration of refmt with ALE. + +call ale#Set('reasonml_refmt_executable', 'refmt') +call ale#Set('reasonml_refmt_options', '') + +function! ale#fixers#refmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'reasonml_refmt_executable') + let l:options = ale#Var(a:buffer, 'reasonml_refmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' --in-place' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/remark_lint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/remark_lint.vim new file mode 100644 index 0000000..85593b4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/remark_lint.vim @@ -0,0 +1,24 @@ +" Author: blyoa +" Description: Fixing files with remark-lint. + +call ale#Set('markdown_remark_lint_executable', 'remark') +call ale#Set('markdown_remark_lint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('markdown_remark_lint_options', '') + +function! ale#fixers#remark_lint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'markdown_remark_lint', [ + \ 'node_modules/remark-cli/cli.js', + \ 'node_modules/.bin/remark', + \]) +endfunction + +function! ale#fixers#remark_lint#Fix(buffer) abort + let l:executable = ale#fixers#remark_lint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'markdown_remark_lint_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : ''), + \} +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/reorder_python_imports.vim b/dot_vim/plugged/ale/autoload/ale/fixers/reorder_python_imports.vim new file mode 100644 index 0000000..42a0a6e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/reorder_python_imports.vim @@ -0,0 +1,25 @@ +" Author: jake +" Description: Fixing Python imports with reorder-python-imports. + +call ale#Set('python_reorder_python_imports_executable', 'reorder-python-imports') +call ale#Set('python_reorder_python_imports_options', '') +call ale#Set('python_reorder_python_imports_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#reorder_python_imports#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_reorder_python_imports', + \ ['reorder-python-imports'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:options = ale#Var(a:buffer, 'python_reorder_python_imports_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/rubocop.vim b/dot_vim/plugged/ale/autoload/ale/fixers/rubocop.vim new file mode 100644 index 0000000..5a1b795 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/rubocop.vim @@ -0,0 +1,38 @@ +call ale#Set('ruby_rubocop_options', '') +call ale#Set('ruby_rubocop_auto_correct_all', 0) +call ale#Set('ruby_rubocop_executable', 'rubocop') + +" Rubocop fixer outputs diagnostics first and then the fixed +" output. These are delimited by a "=======" string that we +" look for to remove everything before it. +function! ale#fixers#rubocop#PostProcess(buffer, output) abort + let l:line = 0 + + for l:output in a:output + let l:line = l:line + 1 + + if l:output =~# "^=\\+$" + break + endif + endfor + + return a:output[l:line :] +endfunction + +function! ale#fixers#rubocop#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable') + let l:options = ale#Var(a:buffer, 'ruby_rubocop_options') + let l:auto_correct_all = ale#Var(a:buffer, 'ruby_rubocop_auto_correct_all') + + return ale#ruby#EscapeExecutable(l:executable, 'rubocop') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct') + \ . ' --force-exclusion --stdin %s' +endfunction + +function! ale#fixers#rubocop#Fix(buffer) abort + return { + \ 'command': ale#fixers#rubocop#GetCommand(a:buffer), + \ 'process_with': 'ale#fixers#rubocop#PostProcess' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/ruff.vim b/dot_vim/plugged/ale/autoload/ale/fixers/ruff.vim new file mode 100644 index 0000000..56bcf3d --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/ruff.vim @@ -0,0 +1,89 @@ +" Author: Yining +" Description: ruff as ALE fixer for python files + +call ale#Set('python_ruff_executable', 'ruff') +call ale#Set('python_ruff_options', '') +call ale#Set('python_ruff_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_ruff_change_directory', 1) +call ale#Set('python_ruff_auto_pipenv', 0) +call ale#Set('python_ruff_auto_poetry', 0) + +function! ale#fixers#ruff#GetCwd(buffer) abort + if ale#Var(a:buffer, 'python_ruff_change_directory') + " Run from project root if found, else from buffer dir. + let l:project_root = ale#python#FindProjectRoot(a:buffer) + + return !empty(l:project_root) ? l:project_root : '%s:h' + endif + + return '%s:h' +endfunction + +function! ale#fixers#ruff#GetExecutable(buffer) abort + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_ruff_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + + if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_ruff_auto_poetry')) + \ && ale#python#PoetryPresent(a:buffer) + return 'poetry' + endif + + return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff']) +endfunction + +function! ale#fixers#ruff#GetCommand(buffer) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:exec_args = l:executable =~? 'pipenv\|poetry$' + \ ? ' run ruff' + \ : '' + + return ale#Escape(l:executable) . l:exec_args +endfunction + +function! ale#fixers#ruff#FixForVersion(buffer, version) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:cmd = [ale#Escape(l:executable)] + + if l:executable =~? 'pipenv\|poetry$' + call extend(l:cmd, ['run', 'ruff']) + endif + + let l:options = ale#Var(a:buffer, 'python_ruff_options') + + if !empty(l:options) + call add(l:cmd, l:options) + endif + + " when --stdin-filename present, ruff will use it for proj root resolution + " https://github.com/charliermarsh/ruff/pull/1281 + let l:fname = expand('#' . a:buffer . '...') + call add(l:cmd, '--stdin-filename '.ale#Escape(ale#path#Simplify(l:fname))) + + call add(l:cmd, '--fix') + + " NOTE: ruff version `0.0.72` implements `--fix` with stdin + if ale#semver#GTE(a:version, [0, 0, 72]) + call add(l:cmd, '-') + else + call add(l:cmd, '%s') + endif + + return { + \ 'cwd': ale#fixers#ruff#GetCwd(a:buffer), + \ 'command': join(l:cmd, ' '), + \} +endfunction + +function! ale#fixers#ruff#Fix(buffer) abort + let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) + let l:command = ale#fixers#ruff#GetCommand(a:buffer) . ale#Pad('--version') + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ l:command, + \ function('ale#fixers#ruff#FixForVersion'), + \) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/rufo.vim b/dot_vim/plugged/ale/autoload/ale/fixers/rufo.vim new file mode 100644 index 0000000..01d537a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/rufo.vim @@ -0,0 +1,20 @@ +" Author: Fohte (Hayato Kawai) https://github.com/fohte +" Description: Integration of Rufo with ALE. + +call ale#Set('ruby_rufo_executable', 'rufo') + +function! ale#fixers#rufo#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_rufo_executable') + let l:exec_args = l:executable =~? 'bundle$' + \ ? ' exec rufo' + \ : '' + + return ale#Escape(l:executable) . l:exec_args . ' %t' +endfunction + +function! ale#fixers#rufo#Fix(buffer) abort + return { + \ 'command': ale#fixers#rufo#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/rustfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/rustfmt.vim new file mode 100644 index 0000000..38882fb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/rustfmt.vim @@ -0,0 +1,15 @@ +" Author: Kelly Fox +" Description: Integration of rustfmt with ALE. + +call ale#Set('rust_rustfmt_executable', 'rustfmt') +call ale#Set('rust_rustfmt_options', '') + +function! ale#fixers#rustfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'rust_rustfmt_executable') + let l:options = ale#Var(a:buffer, 'rust_rustfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/scalafmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/scalafmt.vim new file mode 100644 index 0000000..dd0e774 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/scalafmt.vim @@ -0,0 +1,25 @@ +" Author: Jeffrey Lau https://github.com/zoonfafer +" Description: Integration of Scalafmt with ALE. + +call ale#Set('scala_scalafmt_executable', 'scalafmt') +call ale#Set('scala_scalafmt_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('scala_scalafmt_options', '') + +function! ale#fixers#scalafmt#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'scala_scalafmt_executable') + let l:options = ale#Var(a:buffer, 'scala_scalafmt_options') + let l:exec_args = l:executable =~? 'ng$' + \ ? ' scalafmt' + \ : '' + + return ale#Escape(l:executable) . l:exec_args + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t' +endfunction + +function! ale#fixers#scalafmt#Fix(buffer) abort + return { + \ 'command': ale#fixers#scalafmt#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/shfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/shfmt.vim new file mode 100644 index 0000000..0eefc98 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/shfmt.vim @@ -0,0 +1,17 @@ +scriptencoding utf-8 +" Author: Simon Bugert +" Description: Fix sh files with shfmt. + +call ale#Set('sh_shfmt_executable', 'shfmt') +call ale#Set('sh_shfmt_options', '') + +function! ale#fixers#shfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sh_shfmt_executable') + let l:options = ale#Var(a:buffer, 'sh_shfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -filename=%s' + \ . (empty(l:options) ? '' : ' ' . l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/sorbet.vim b/dot_vim/plugged/ale/autoload/ale/fixers/sorbet.vim new file mode 100644 index 0000000..7c12fa1 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/sorbet.vim @@ -0,0 +1,19 @@ +call ale#Set('ruby_sorbet_executable', 'srb') +call ale#Set('ruby_sorbet_options', '') + +function! ale#fixers#sorbet#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable') + let l:options = ale#Var(a:buffer, 'ruby_sorbet_options') + + return ale#ruby#EscapeExecutable(l:executable, 'srb') + \ . ' tc' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --autocorrect --file %t' +endfunction + +function! ale#fixers#sorbet#Fix(buffer) abort + return { + \ 'command': ale#fixers#sorbet#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/sqlfluff.vim b/dot_vim/plugged/ale/autoload/ale/fixers/sqlfluff.vim new file mode 100644 index 0000000..1dc9f5c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/sqlfluff.vim @@ -0,0 +1,25 @@ +" Author: Carl Smedstad +" Description: Fixing SQL files with sqlfluff + +call ale#Set('sql_sqlfluff_executable', 'sqlfluff') + +function! ale#fixers#sqlfluff#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_sqlfluff_executable') + + let l:cmd = + \ ale#Escape(l:executable) + \ . ' fix --force' + + let l:config_file = ale#path#FindNearestFile(a:buffer, '.sqlfluff') + + if !empty(l:config_file) + let l:cmd .= ' --config ' . ale#Escape(l:config_file) + else + let l:cmd .= ' --dialect ansi' + endif + + return { + \ 'command': l:cmd . ' %t > /dev/null', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/sqlfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/sqlfmt.vim new file mode 100644 index 0000000..c88a8ec --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/sqlfmt.vim @@ -0,0 +1,13 @@ +call ale#Set('sql_sqlfmt_executable', 'sqlfmt') +call ale#Set('sql_sqlfmt_options', '') + +function! ale#fixers#sqlfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_sqlfmt_executable') + let l:options = ale#Var(a:buffer, 'sql_sqlfmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -w' + \ . (empty(l:options) ? '' : ' ' . l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/sqlformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/sqlformat.vim new file mode 100644 index 0000000..6319c1a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/sqlformat.vim @@ -0,0 +1,16 @@ +" Author: Cluas +" Description: Fixing files with sqlformat. + +call ale#Set('sql_sqlformat_executable', 'sqlformat') +call ale#Set('sql_sqlformat_options', '') + +function! ale#fixers#sqlformat#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'sql_sqlformat_executable') + let l:options = ale#Var(a:buffer, 'sql_sqlformat_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/standard.vim b/dot_vim/plugged/ale/autoload/ale/fixers/standard.vim new file mode 100644 index 0000000..b9d60eb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/standard.vim @@ -0,0 +1,33 @@ +" Author: Sumner Evans +" Description: Fixing files with Standard. + +call ale#Set('javascript_standard_executable', 'standard') +call ale#Set('javascript_standard_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_standard_options', '') + +function! ale#fixers#standard#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_standard', [ + \ 'node_modules/standardx/bin/cmd.js', + \ 'node_modules/standard/bin/cmd.js', + \ 'node_modules/.bin/standard', + \]) +endfunction + +function! ale#fixers#standard#Fix(buffer) abort + let l:executable = ale#fixers#standard#GetExecutable(a:buffer) + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:options_type = 'javascript_standard_options' + + if l:filetype =~# 'typescript' + let l:options_type = 'typescript_standard_options' + endif + + let l:options = ale#Var(a:buffer, l:options_type) + + return { + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --fix --stdin < %s > %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/standardrb.vim b/dot_vim/plugged/ale/autoload/ale/fixers/standardrb.vim new file mode 100644 index 0000000..acb310c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/standardrb.vim @@ -0,0 +1,23 @@ +" Author: Justin Searls - https://github.com/searls +" Description: Fix Ruby files with StandardRB. + +call ale#Set('ruby_standardrb_options', '') +call ale#Set('ruby_standardrb_executable', 'standardrb') + +function! ale#fixers#standardrb#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_standardrb_executable') + let l:config = ale#path#FindNearestFile(a:buffer, '.standard.yml') + let l:options = ale#Var(a:buffer, 'ruby_standardrb_options') + + return ale#ruby#EscapeExecutable(l:executable, 'standardrb') + \ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --fix --force-exclusion --stdin %s' +endfunction + +function! ale#fixers#standardrb#Fix(buffer) abort + return { + \ 'command': ale#fixers#standardrb#GetCommand(a:buffer), + \ 'process_with': 'ale#fixers#rubocop#PostProcess' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/statix.vim b/dot_vim/plugged/ale/autoload/ale/fixers/statix.vim new file mode 100644 index 0000000..5991c92 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/statix.vim @@ -0,0 +1,17 @@ +" Author: David Houston +" Description: Provide statix fix as a fixer for simple Nix antipatterns. + +call ale#Set('nix_statix_fix_executable', 'statix') +call ale#Set('nix_statix_fix_options', '') + +function! ale#fixers#statix#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nix_statix_fix_executable') + let l:options = ale#Var(a:buffer, 'nix_statix_fix_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ale#Pad('fix') + \ . ale#Pad('--stdin') + \ . ale#Pad(l:options), + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/stylelint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/stylelint.vim new file mode 100644 index 0000000..650b9c4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/stylelint.vim @@ -0,0 +1,26 @@ +" Author: Mahmoud Mostafa +" Description: Fixing files with stylelint. + +call ale#Set('stylelint_executable', 'stylelint') +call ale#Set('stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('stylelint_options', '') + +function! ale#fixers#stylelint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'stylelint', [ + \ 'node_modules/stylelint/bin/stylelint.js', + \ 'node_modules/.bin/stylelint', + \]) +endfunction + +function! ale#fixers#stylelint#Fix(buffer) abort + let l:executable = ale#fixers#stylelint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'stylelint_options') + + return { + \ 'cwd': '%s:h', + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . ale#Pad(l:options) + \ . ' --fix --stdin --stdin-filename %s', + \ 'read_temporary_file': 0, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/styler.vim b/dot_vim/plugged/ale/autoload/ale/fixers/styler.vim new file mode 100644 index 0000000..1c7607b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/styler.vim @@ -0,0 +1,16 @@ +" Author: tvatter +" Description: Fixing R files with styler. + +call ale#Set('r_styler_executable', 'Rscript') +call ale#Set('r_styler_options', 'tidyverse_style()') + +function! ale#fixers#styler#Fix(buffer) abort + return { + \ 'command': 'Rscript --vanilla -e ' + \ . '"suppressPackageStartupMessages(library(styler));' + \ . 'style_file(commandArgs(TRUE), transformers = ' + \ . ale#Var(a:buffer, 'r_styler_options') . ')"' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/stylish_haskell.vim b/dot_vim/plugged/ale/autoload/ale/fixers/stylish_haskell.vim new file mode 100644 index 0000000..ce71c1c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/stylish_haskell.vim @@ -0,0 +1,21 @@ +" Author: eborden +" Description: Integration of stylish-haskell formatting with ALE. +" +call ale#Set('haskell_stylish_haskell_executable', 'stylish-haskell') + +function! ale#fixers#stylish_haskell#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_stylish_haskell_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'stylish-haskell') +endfunction + +function! ale#fixers#stylish_haskell#Fix(buffer) abort + let l:executable = ale#fixers#stylish_haskell#GetExecutable(a:buffer) + + return { + \ 'command': l:executable + \ . ' --inplace' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/stylua.vim b/dot_vim/plugged/ale/autoload/ale/fixers/stylua.vim new file mode 100644 index 0000000..3521c93 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/stylua.vim @@ -0,0 +1,14 @@ +" Author: Robert Liebowitz +" Description: https://github.com/johnnymorganz/stylua + +call ale#Set('lua_stylua_executable', 'stylua') +call ale#Set('lua_stylua_options', '') + +function! ale#fixers#stylua#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'lua_stylua_executable') + let l:options = ale#Var(a:buffer, 'lua_stylua_options') + + return { + \ 'command': ale#Escape(l:executable) . ale#Pad(l:options) . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/swiftformat.vim b/dot_vim/plugged/ale/autoload/ale/fixers/swiftformat.vim new file mode 100644 index 0000000..cc553b7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/swiftformat.vim @@ -0,0 +1,25 @@ +" Author: gfontenot (Gordon Fontenot) +" Description: Integration of SwiftFormat with ALE. + +call ale#Set('swift_swiftformat_executable', 'swiftformat') +call ale#Set('swift_swiftformat_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('swift_swiftformat_options', '') + +function! ale#fixers#swiftformat#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'swift_swiftformat', [ + \ 'Pods/SwiftFormat/CommandLineTool/swiftformat', + \ 'ios/Pods/SwiftFormat/CommandLineTool/swiftformat', + \ 'swiftformat', + \]) +endfunction + +function! ale#fixers#swiftformat#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'swift_swiftformat_options') + + return { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(ale#fixers#swiftformat#GetExecutable(a:buffer)) + \ . ' %t' + \ . ' ' . l:options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/syntax_tree.vim b/dot_vim/plugged/ale/autoload/ale/fixers/syntax_tree.vim new file mode 100644 index 0000000..7ae0337 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/syntax_tree.vim @@ -0,0 +1,19 @@ +call ale#Set('ruby_syntax_tree_options', '') +call ale#Set('ruby_syntax_tree_executable', 'stree') + +function! ale#fixers#syntax_tree#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'ruby_syntax_tree_executable') + let l:options = ale#Var(a:buffer, 'ruby_syntax_tree_options') + + return ale#ruby#EscapeExecutable(l:executable, 'stree') + \ . ' write' + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +function! ale#fixers#syntax_tree#Fix(buffer) abort + return { + \ 'command': ale#fixers#syntax_tree#GetCommand(a:buffer), + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/terraform.vim b/dot_vim/plugged/ale/autoload/ale/fixers/terraform.vim new file mode 100644 index 0000000..bc05380 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/terraform.vim @@ -0,0 +1,17 @@ +" Author: dsifford +" Description: Fixer for terraform and .hcl files + +call ale#Set('terraform_fmt_executable', 'terraform') +call ale#Set('terraform_fmt_options', '') + +function! ale#fixers#terraform#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'terraform_fmt_executable') + let l:options = ale#Var(a:buffer, 'terraform_fmt_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' fmt' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' -' + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/textlint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/textlint.vim new file mode 100644 index 0000000..38ab2bf --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/textlint.vim @@ -0,0 +1,15 @@ +" Author: TANIGUCHI Masaya +" Description: Integration of textlint with ALE. + +function! ale#fixers#textlint#Fix(buffer) abort + let l:executable = ale#handlers#textlint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'textlint_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' --fix' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/tidy.vim b/dot_vim/plugged/ale/autoload/ale/fixers/tidy.vim new file mode 100644 index 0000000..2c79e73 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/tidy.vim @@ -0,0 +1,26 @@ +" Author: meain +" Description: Fixing HTML files with tidy. + +call ale#Set('html_tidy_executable', 'tidy') +call ale#Set('html_tidy_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#tidy#Fix(buffer) abort + let l:executable = ale#path#FindExecutable( + \ a:buffer, + \ 'html_tidy', + \ ['tidy'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:config = ale#path#FindNearestFile(a:buffer, '.tidyrc') + let l:config_options = !empty(l:config) + \ ? ' -q --tidy-mark no --show-errors 0 --show-warnings 0 -config ' . ale#Escape(l:config) + \ : ' -q --tidy-mark no --show-errors 0 --show-warnings 0' + + return { + \ 'command': ale#Escape(l:executable) . l:config_options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/tslint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/tslint.vim new file mode 100644 index 0000000..15768fd --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/tslint.vim @@ -0,0 +1,22 @@ +" Author: carakan +" Description: Fixing files with tslint. + +function! ale#fixers#tslint#Fix(buffer) abort + let l:executable = ale#handlers#tslint#GetExecutable(a:buffer) + + let l:tslint_config_path = ale#path#ResolveLocalPath( + \ a:buffer, + \ 'tslint.json', + \ ale#Var(a:buffer, 'typescript_tslint_config_path') + \) + let l:tslint_config_option = !empty(l:tslint_config_path) + \ ? ' -c ' . ale#Escape(l:tslint_config_path) + \ : '' + + return { + \ 'command': ale#node#Executable(a:buffer, l:executable) + \ . l:tslint_config_option + \ . ' --outputAbsolutePaths --fix %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/uncrustify.vim b/dot_vim/plugged/ale/autoload/ale/fixers/uncrustify.vim new file mode 100644 index 0000000..0e8271e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/uncrustify.vim @@ -0,0 +1,33 @@ +" Author: Derek P Sifford +" Description: Fixer for C, C++, C#, ObjectiveC, D, Java, Pawn, and VALA. + +call ale#Set('c_uncrustify_executable', 'uncrustify') +call ale#Set('c_uncrustify_options', '') + +let s:languages = { +\ 'c': 'C', +\ 'cpp': 'CPP', +\ 'cs': 'CS', +\ 'objc': 'OC', +\ 'objcpp': 'OC+', +\ 'd': 'D', +\ 'java': 'JAVA', +\ 'vala': 'VALA', +\ 'p': 'PAWN', +\} + +function! ale#fixers#uncrustify#Language(buffer) abort + return get(s:languages, &filetype, 'C') +endfunction + +function! ale#fixers#uncrustify#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'c_uncrustify_executable') + let l:options = ale#Var(a:buffer, 'c_uncrustify_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' --no-backup ' + \ . '-l' . ale#Pad(ale#fixers#uncrustify#Language(a:buffer)) + \ . ale#Pad(l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/vfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/vfmt.vim new file mode 100644 index 0000000..2e78031 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/vfmt.vim @@ -0,0 +1,13 @@ +" Author: fiatjaf +" Description: Integration of `v fmt` with ALE. + +call ale#Set('v_vfmt_options', '') + +function! ale#fixers#vfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'v_v_executable') + let l:options = ale#Var(a:buffer, 'v_vfmt_options') + + return { + \ 'command': ale#Escape(l:executable) . ' fmt' . ale#Pad(l:options) + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/xmllint.vim b/dot_vim/plugged/ale/autoload/ale/fixers/xmllint.vim new file mode 100644 index 0000000..b14ffd3 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/xmllint.vim @@ -0,0 +1,29 @@ +" Author: Cyril Roelandt +" Description: Integration of xmllint with ALE. + +call ale#Set('xml_xmllint_executable', 'xmllint') +call ale#Set('xml_xmllint_options', '') +call ale#Set('xml_xmllint_indentsize', 2) + +function! ale#fixers#xmllint#Fix(buffer) abort + let l:executable = ale#Escape(ale#Var(a:buffer, 'xml_xmllint_executable')) + let l:filename = ale#Escape(bufname(a:buffer)) + let l:command = l:executable . ' --format ' . l:filename + + let l:indent = ale#Var(a:buffer, 'xml_xmllint_indentsize') + + if l:indent isnot# '' + let l:env = ale#Env('XMLLINT_INDENT', repeat(' ', l:indent)) + let l:command = l:env . l:command + endif + + let l:options = ale#Var(a:buffer, 'xml_xmllint_options') + + if l:options isnot# '' + let l:command .= ' ' . l:options + endif + + return { + \ 'command': l:command + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/xo.vim b/dot_vim/plugged/ale/autoload/ale/fixers/xo.vim new file mode 100644 index 0000000..dcf4c73 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/xo.vim @@ -0,0 +1,36 @@ +" Author: Albert Marquez - https://github.com/a-marquez +" Description: Fixing files with XO. + +function! ale#fixers#xo#Fix(buffer) abort + let l:executable = ale#handlers#xo#GetExecutable(a:buffer) + let l:options = ale#handlers#xo#GetOptions(a:buffer) + + return ale#semver#RunWithVersionCheck( + \ a:buffer, + \ l:executable, + \ '%e --version', + \ {b, v -> ale#fixers#xo#ApplyFixForVersion(b, v, l:executable, l:options)} + \) +endfunction + +function! ale#fixers#xo#ApplyFixForVersion(buffer, version, executable, options) abort + let l:executable = ale#node#Executable(a:buffer, a:executable) + let l:options = ale#Pad(a:options) + + " 0.30.0 is the first version with a working --stdin --fix + if ale#semver#GTE(a:version, [0, 30, 0]) + return { + \ 'command': l:executable + \ . ' --stdin --stdin-filename %s' + \ . ' --fix' + \ . l:options, + \} + endif + + return { + \ 'command': l:executable + \ . ' --fix %t' + \ . l:options, + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/yamlfix.vim b/dot_vim/plugged/ale/autoload/ale/fixers/yamlfix.vim new file mode 100644 index 0000000..6654a25 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/yamlfix.vim @@ -0,0 +1,25 @@ +" Author: lyz-code +" Description: Fixing yaml files with yamlfix. + +call ale#Set('yaml_yamlfix_executable', 'yamlfix') +call ale#Set('yaml_yamlfix_options', '') +call ale#Set('yaml_yamlfix_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#yamlfix#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'yaml_yamlfix_options') + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'yaml_yamlfix', + \ ['yamlfix'], + \) + + if !executable(l:executable) + return 0 + endif + + return { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') . ' -', + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/yapf.vim b/dot_vim/plugged/ale/autoload/ale/fixers/yapf.vim new file mode 100644 index 0000000..f04bb1f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/yapf.vim @@ -0,0 +1,26 @@ +" Author: w0rp +" Description: Fixing Python files with yapf. + +call ale#Set('python_yapf_executable', 'yapf') +call ale#Set('python_yapf_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#yapf#Fix(buffer) abort + let l:executable = ale#python#FindExecutable( + \ a:buffer, + \ 'python_yapf', + \ ['yapf'], + \) + + if !executable(l:executable) + return 0 + endif + + let l:config = ale#path#FindNearestFile(a:buffer, '.style.yapf') + let l:config_options = !empty(l:config) + \ ? ' --no-local-style --style ' . ale#Escape(l:config) + \ : '' + + return { + \ 'command': ale#Escape(l:executable) . l:config_options, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/fixers/zigfmt.vim b/dot_vim/plugged/ale/autoload/ale/fixers/zigfmt.vim new file mode 100644 index 0000000..b22e5b8 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/fixers/zigfmt.vim @@ -0,0 +1,14 @@ +scriptencoding utf-8 +" Author: Arash Mousavi +" Description: Official formatter for Zig. + +call ale#Set('zig_zigfmt_executable', 'zig') + +function! ale#fixers#zigfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'zig_zigfmt_executable') + + return { + \ 'command': ale#Escape(l:executable) . ' fmt %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/floating_preview.vim b/dot_vim/plugged/ale/autoload/ale/floating_preview.vim new file mode 100644 index 0000000..c2bf5b6 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/floating_preview.vim @@ -0,0 +1,231 @@ +" Author: Jan-Grimo Sobez +" Author: Kevin Clark +" Author: D. Ben Knoble +" Author: Shaun Duncan +" Description: Floating preview window for showing whatever information in. + +" Precondition: exists('*nvim_open_win') || has('popupwin') + +function! ale#floating_preview#Show(lines, ...) abort + if !exists('*nvim_open_win') && !has('popupwin') + " no-custom-checks + echom 'Floating windows not supported in this vim instance.' + + return + endif + + let l:options = get(a:000, 0, {}) + + if has('nvim') + call s:NvimShow(a:lines, l:options) + else + call s:VimShow(a:lines, l:options) + endif +endfunction + +function! s:NvimShow(lines, options) abort + " Remove the close autocmd so it doesn't happen mid update + augroup ale_floating_preview_window + autocmd! + augroup END + + " Only create a new window if we need it + if !exists('w:preview') || index(nvim_list_wins(), w:preview['id']) is# -1 + call s:NvimCreate(a:options) + else + call nvim_buf_set_option(w:preview['buffer'], 'modifiable', v:true) + endif + + " Execute commands in window context + let l:parent_window = nvim_get_current_win() + + call nvim_set_current_win(w:preview['id']) + + for l:command in get(a:options, 'commands', []) + call execute(l:command) + endfor + + call nvim_set_current_win(l:parent_window) + + " Return to parent context on move + augroup ale_floating_preview_window + autocmd! + + if g:ale_close_preview_on_insert + autocmd CursorMoved,TabLeave,WinLeave,BufWinLeave,WinScrolled,InsertEnter ++once call s:NvimClose() + else + autocmd CursorMoved,TabLeave,WinLeave,BufWinLeave,WinScrolled ++once call s:NvimClose() + endif + augroup END + + let [l:lines, l:width, l:height] = s:NvimPrepareWindowContent(a:lines) + + call nvim_win_set_width(w:preview['id'], l:width) + call nvim_win_set_height(w:preview['id'], l:height) + call nvim_buf_set_lines(w:preview['buffer'], 0, -1, v:false, l:lines) + call nvim_buf_set_option(w:preview['buffer'], 'modified', v:false) + call nvim_buf_set_option(w:preview['buffer'], 'modifiable', v:false) +endfunction + +function! s:VimShow(lines, options) abort + if g:ale_close_preview_on_insert + " Remove the close autocmd so it doesn't happen mid update + silent! autocmd! ale_floating_preview_window + endif + + " Only create a new window if we need it + if !exists('w:preview') || index(popup_list(), w:preview['id']) is# -1 + call s:VimCreate(a:options) + endif + + " Execute commands in window context + for l:command in get(a:options, 'commands', []) + call win_execute(w:preview['id'], l:command) + endfor + + call popup_settext(w:preview['id'], a:lines) + + if g:ale_close_preview_on_insert + augroup ale_floating_preview_window + autocmd! + autocmd InsertEnter * ++once call s:VimClose() + augroup END + endif +endfunction + +function! s:NvimPrepareWindowContent(lines) abort + let l:max_height = 10 + + let l:width = max(map(copy(a:lines), 'strdisplaywidth(v:val)')) + let l:height = min([len(a:lines), l:max_height]) + + if empty(g:ale_floating_window_border) + return [a:lines, l:width, l:height] + endif + + " Add the size of borders + let l:width += 2 + let l:height += 2 + + let l:left = get(g:ale_floating_window_border, 0, '|') + let l:top = get(g:ale_floating_window_border, 1, '-') + let l:top_left = get(g:ale_floating_window_border, 2, '+') + let l:top_right = get(g:ale_floating_window_border, 3, '+') + let l:bottom_right = get(g:ale_floating_window_border, 4, '+') + let l:bottom_left = get(g:ale_floating_window_border, 5, '+') + let l:right = get(g:ale_floating_window_border, 6, l:left) + let l:bottom = get(g:ale_floating_window_border, 7, l:top) + + let l:lines = [l:top_left . repeat(l:top, l:width - 2) . l:top_right] + + for l:line in a:lines + let l:line_width = strchars(l:line) + let l:lines = add(l:lines, l:left . l:line . repeat(' ', l:width - l:line_width - 2). l:right) + endfor + + " Truncate the lines + if len(l:lines) > l:max_height + 1 + let l:lines = l:lines[0:l:max_height] + endif + + let l:lines = add(l:lines, l:bottom_left . repeat(l:bottom, l:width - 2) . l:bottom_right) + + return [l:lines, l:width, l:height] +endfunction + +function! s:NvimCreate(options) abort + let l:popup_opts = extend({ + \ 'relative': 'cursor', + \ 'row': 1, + \ 'col': 0, + \ 'width': 42, + \ 'height': 4, + \ 'style': 'minimal' + \ }, s:GetPopupOpts()) + + let l:buffer = nvim_create_buf(v:false, v:false) + let l:winid = nvim_open_win(l:buffer, v:false, l:popup_opts) + + call nvim_buf_set_option(l:buffer, 'buftype', 'acwrite') + call nvim_buf_set_option(l:buffer, 'bufhidden', 'delete') + call nvim_buf_set_option(l:buffer, 'swapfile', v:false) + call nvim_buf_set_option(l:buffer, 'filetype', get(a:options, 'filetype', 'ale-preview')) + + let w:preview = {'id': l:winid, 'buffer': l:buffer} +endfunction + +function! s:VimCreate(options) abort + " default options + let l:popup_opts = extend({ + \ 'line': 'cursor+1', + \ 'col': 'cursor', + \ 'drag': v:true, + \ 'resize': v:true, + \ 'close': 'button', + \ 'padding': [0, 1, 0, 1], + \ 'border': [], + \ 'borderchars': empty(g:ale_floating_window_border) ? [' '] : [ + \ get(g:ale_floating_window_border, 1, '-'), + \ get(g:ale_floating_window_border, 6, '|'), + \ get(g:ale_floating_window_border, 7, '-'), + \ get(g:ale_floating_window_border, 0, '|'), + \ get(g:ale_floating_window_border, 2, '+'), + \ get(g:ale_floating_window_border, 3, '+'), + \ get(g:ale_floating_window_border, 4, '+'), + \ get(g:ale_floating_window_border, 5, '+'), + \ ], + \ 'moved': 'any', + \ }, s:GetPopupOpts()) + + let l:popup_id = popup_create([], l:popup_opts) + call setbufvar(winbufnr(l:popup_id), '&filetype', get(a:options, 'filetype', 'ale-preview')) + let w:preview = {'id': l:popup_id} +endfunction + +function! s:NvimClose() abort + let l:mode = mode() + let l:restore_visual = l:mode is# 'v' || l:mode is# 'V' || l:mode is# "\" + + if !exists('w:preview') + return + endif + + call setbufvar(w:preview['buffer'], '&modified', 0) + + if win_id2win(w:preview['id']) > 0 + execute win_id2win(w:preview['id']).'wincmd c' + endif + + unlet w:preview + + if l:restore_visual + normal! gv + endif +endfunction + +function! s:VimClose() abort + if !exists('w:preview') + return + endif + + call popup_close(w:preview['id']) + unlet w:preview +endfunction + +" get either the results of a function callback or dictionary for popup overrides +function! s:GetPopupOpts() abort + if exists('g:ale_floating_preview_popup_opts') + let l:ref = g:ale_floating_preview_popup_opts + + if type(l:ref) is# v:t_dict + return l:ref + elseif type(l:ref) is# v:t_string + try + return function(l:ref)() + catch /E700/ + endtry + endif + endif + + return {} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/go.vim b/dot_vim/plugged/ale/autoload/ale/go.vim new file mode 100644 index 0000000..bce85a8 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/go.vim @@ -0,0 +1,58 @@ +" Author: Horacio Sanson https://github.com/hsanson +" Description: Functions for integrating with Go tools + +" Find the nearest dir listed in GOPATH and assume it the root of the go +" project. +function! ale#go#FindProjectRoot(buffer) abort + let l:sep = has('win32') ? ';' : ':' + + let l:filename = ale#path#Simplify(expand('#' . a:buffer . ':p')) + + for l:name in split($GOPATH, l:sep) + let l:path_dir = ale#path#Simplify(l:name) + + " Use the directory from GOPATH if the current filename starts with it. + if l:filename[: len(l:path_dir) - 1] is? l:path_dir + return l:path_dir + endif + endfor + + let l:default_go_path = ale#path#Simplify(expand('~/go')) + + if isdirectory(l:default_go_path) + return l:default_go_path + endif + + return '' +endfunction + + +call ale#Set('go_go111module', '') + +" Return a string setting Go-specific environment variables +function! ale#go#EnvString(buffer) abort + let l:env = '' + + " GO111MODULE - turn go modules behavior on/off + let l:go111module = ale#Var(a:buffer, 'go_go111module') + + if !empty(l:go111module) + let l:env = ale#Env('GO111MODULE', l:go111module) . l:env + endif + + return l:env +endfunction + +function! ale#go#GetGoPathExecutable(suffix) abort + let l:prefix = $GOPATH + + if !empty($GOPATH) + let l:prefix = $GOPATH + elseif has('win32') + let l:prefix = $USERPROFILE . '/go' + else + let l:prefix = $HOME . '/go' + endif + + return ale#path#Simplify(l:prefix . '/' . a:suffix) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/gradle.vim b/dot_vim/plugged/ale/autoload/ale/gradle.vim new file mode 100644 index 0000000..ba1add4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/gradle.vim @@ -0,0 +1,74 @@ +" Author: Michael Pardo +" Description: Functions for working with Gradle projects. + +let s:script_path = fnamemodify(resolve(expand(':p')), ':h') +let s:init_path = has('win32') +\ ? s:script_path . '\gradle\init.gradle' +\ : s:script_path . '/gradle/init.gradle' + +function! ale#gradle#GetInitPath() abort + return s:init_path +endfunction + +" Given a buffer number, find a Gradle project root. +function! ale#gradle#FindProjectRoot(buffer) abort + let l:gradlew_path = ale#path#FindNearestFile(a:buffer, 'gradlew') + + if !empty(l:gradlew_path) + return fnamemodify(l:gradlew_path, ':h') + endif + + let l:settings_path = ale#path#FindNearestFile(a:buffer, 'settings.gradle') + + if !empty(l:settings_path) + return fnamemodify(l:settings_path, ':h') + endif + + let l:build_path = ale#path#FindNearestFile(a:buffer, 'build.gradle') + + if !empty(l:build_path) + return fnamemodify(l:build_path, ':h') + endif + + return '' +endfunction + +" Given a buffer number, find the path to the executable. +" First search on the path for 'gradlew', if nothing is found, try the global +" command. Returns an empty string if cannot find the executable. +function! ale#gradle#FindExecutable(buffer) abort + let l:gradlew_path = ale#path#FindNearestFile(a:buffer, 'gradlew') + + if !empty(l:gradlew_path) + return l:gradlew_path + endif + + if executable('gradle') + return 'gradle' + endif + + return '' +endfunction + +" Given a buffer number, get a working directory and command to print the +" classpath of the root project. +" +" Returns an empty string for the command if Gradle is not detected. +function! ale#gradle#BuildClasspathCommand(buffer) abort + let l:executable = ale#gradle#FindExecutable(a:buffer) + + if !empty(l:executable) + let l:project_root = ale#gradle#FindProjectRoot(a:buffer) + + if !empty(l:project_root) + return [ + \ l:project_root, + \ ale#Escape(l:executable) + \ . ' -I ' . ale#Escape(s:init_path) + \ . ' -q printClasspath' + \] + endif + endif + + return ['', ''] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/gradle/init.gradle b/dot_vim/plugged/ale/autoload/ale/gradle/init.gradle new file mode 100644 index 0000000..fb1db9e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/gradle/init.gradle @@ -0,0 +1,23 @@ +class ClasspathPlugin implements Plugin { + void apply(Project project) { + project.task('printClasspath') { + doLast { + project + .rootProject + .allprojects + .configurations + .flatten() + .findAll { it.name.endsWith('Classpath') } + .collect { it.resolve() } + .flatten() + .unique() + .findAll { it.exists() } + .each { println it } + } + } + } +} + +rootProject { + apply plugin: ClasspathPlugin +} diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/actionlint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/actionlint.vim new file mode 100644 index 0000000..73843c0 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/actionlint.vim @@ -0,0 +1,36 @@ +function! ale#handlers#actionlint#GetCommand(buffer) abort + let l:options = ale#Var(a:buffer, 'yaml_actionlint_options') + + " automatically add --no-color option if not defined + if l:options !~# '--no-color' + let l:options .= ' --no-color' + endif + + " automatically add --oneline option if not defined + if l:options !~# '--oneline' + let l:options .= ' --oneline' + endif + + return '%e ' . l:options . ' %t' +endfunction + +function! ale#handlers#actionlint#Handle(buffer, lines) abort + " Matches patterns line the following: + ".github/workflows/main.yml:19:0: could not parse as YAML: yaml: line 19: mapping values are not allowed in this context [yaml-syntax] + let l:pattern = '\v^.*:(\d+):(\d+): (.+) \[(.+)\]$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'code': l:match[4], + \ 'type': 'E', + \} + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/alex.vim b/dot_vim/plugged/ale/autoload/ale/handlers/alex.vim new file mode 100644 index 0000000..1a92bd1 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/alex.vim @@ -0,0 +1,55 @@ +scriptencoding utf-8 +" Author: Johannes Wienke +" Description: Error handling for errors in alex output format + +function! ale#handlers#alex#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'alex', [ + \ 'node_modules/.bin/alex', + \ 'node_modules/alex/cli.js', + \]) +endfunction + +function! ale#handlers#alex#CreateCommandCallback(flags) abort + return {b -> ale#node#Executable(b, ale#handlers#alex#GetExecutable(b)) + \ . ' --stdin ' + \ . a:flags + \} +endfunction + +function! ale#handlers#alex#Handle(buffer, lines) abort + " Example output: + " 6:256-6:262 warning Be careful with “killedâ€, it’s profane in some cases killed retext-profanities + let l:pattern = '\v^ *(\d+):(\d+)-(\d+):(\d+) +warning +(.{-}) +(.{-}) +(.{-})$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'end_lnum': l:match[3] + 0, + \ 'end_col': l:match[4] - 1, + \ 'text': l:match[5] . ' (' . (l:match[7]) . ')', + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +" Define a linter for a specific filetype. Accept flags to adapt to the filetype. +" no flags treat input as markdown +" --html treat input as HTML +" --mdx treat input as MDX +" --text treat input as plaintext +function! ale#handlers#alex#DefineLinter(filetype, flags) abort + call ale#Set('alex_executable', 'alex') + call ale#Set('alex_use_global', get(g:, 'ale_use_global_executables', 0)) + + call ale#linter#Define(a:filetype, { + \ 'name': 'alex', + \ 'executable': function('ale#handlers#alex#GetExecutable'), + \ 'command': ale#handlers#alex#CreateCommandCallback(a:flags), + \ 'output_stream': 'stderr', + \ 'callback': 'ale#handlers#alex#Handle', + \}) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/atools.vim b/dot_vim/plugged/ale/autoload/ale/handlers/atools.vim new file mode 100644 index 0000000..c273fc4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/atools.vim @@ -0,0 +1,41 @@ +" Author: Leo +" Description: Handlers for output expected from atools + +function! ale#handlers#atools#Handle(buffer, lines) abort + " Format: SEVERITY:[TAG]:PATH:LINENUM:MSG + " Example: MC:[AL5]:./APKBUILD:12:variable set to empty string: install= + let l:pattern = '\([^:]\+\):\([^:]\+\):\([^:]\+\):\(\d\+\):\(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " We are expected to receive 2 characters, the first character + " can be 'S', 'I', 'M' 'T', which are respectively: + " Serious (Error) + " Important (Error) + " Minor (Warning) + " Style (Warning) + " + " The second character can be either 'C' or 'P', which are respectively: + " Certain (Error) + " Possible (Warning) + let l:severity = matchstr(l:match[1], '^.') + let l:certainty = matchstr(l:match[1], '.$') + + let l:type = 'E' + " If the tag returns 'Minor' or 'Style' or is 'Possible' + " then return a warning + + if l:severity is# 'M' || l:severity is# 'T' || l:certainty is# 'P' + let l:type = 'W' + endif + + call add(l:output, { + \ 'lnum': l:match[4] + 0, + \ 'text': l:match[5], + \ 'type': l:type, + \ 'code': matchstr(l:match[2], 'AL[0-9]*'), + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/ccls.vim b/dot_vim/plugged/ale/autoload/ale/handlers/ccls.vim new file mode 100644 index 0000000..290f585 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/ccls.vim @@ -0,0 +1,26 @@ +scriptencoding utf-8 +" Author: Ye Jingchen +" Description: Utilities for ccls + +function! ale#handlers#ccls#GetProjectRoot(buffer) abort + " Try to find ccls configuration files first. + let l:config = ale#path#FindNearestFile(a:buffer, '.ccls-root') + + if empty(l:config) + let l:config = ale#path#FindNearestFile(a:buffer, '.ccls') + endif + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + " Fall back on default project root detection. + return ale#c#FindProjectRoot(a:buffer) +endfunction + +function! ale#handlers#ccls#GetInitOpts(buffer, init_options_var) abort + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + let l:init_options = empty(l:build_dir) ? {} : {'compilationDatabaseDirectory': l:build_dir} + + return extend(l:init_options, ale#Var(a:buffer, a:init_options_var)) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/cppcheck.vim b/dot_vim/plugged/ale/autoload/ale/handlers/cppcheck.vim new file mode 100644 index 0000000..150bb00 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/cppcheck.vim @@ -0,0 +1,89 @@ +" Description: Handle errors for cppcheck. + +function! ale#handlers#cppcheck#GetCwd(buffer) abort + let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer) + + return !empty(l:dir) ? l:dir : '' +endfunction + +function! ale#handlers#cppcheck#GetBufferPathIncludeOptions(buffer) abort + let l:buffer_path_include = '' + + " Get path to this buffer so we can include it into cppcheck with -I + " This could be expanded to get more -I directives from the compile + " command in compile_commands.json, if it's found. + let l:buffer_path = fnamemodify(bufname(a:buffer), ':p:h') + let l:buffer_path_include = ' -I' . ale#Escape(l:buffer_path) + + return l:buffer_path_include +endfunction + +function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort + " The compile_commands.json doesn't apply to headers and cppheck will + " bail out if it cannot find a file matching the filter, below. Skip out + " now, for headers. Also, suppress FPs; cppcheck is not meant to + " process lone header files. + let b:buffer_name = bufname(a:buffer) + let b:file_extension = fnamemodify(b:buffer_name, ':e') + + if b:file_extension is# 'h' || b:file_extension is# 'hpp' + return ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) + \ . ' --suppress=unusedStructMember' + endif + + " If the current buffer is modified, using compile_commands.json does no + " good, so include the file's directory instead. It's not quite as good as + " using --project, but is at least equivalent to running cppcheck on this + " file manually from the file's directory. + let l:modified = getbufvar(a:buffer, '&modified') + + if l:modified + return '' + endif + + " Search upwards from the file for compile_commands.json. + " + " If we find it, we'll `cd` to where the compile_commands.json file is, + " then use the file to set up import paths, etc. + let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer) + + " By default, cppcheck processes every config in compile_commands.json. + " Use --file-filter to limit to just the buffer file. + return !empty(l:json_path) + \ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ]) . ' --file-filter=' . ale#Escape(bufname(a:buffer)) + \ : '' +endfunction + +function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort + " Look for lines like the following. + " + "test.cpp:974:6: error:inconclusive Array 'n[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\ + " n[3]=3; + " ^ + "" OR if cppcheck doesn't support {column} or {inconclusive:text}: + "test.cpp:974:{column}: error:{inconclusive:inconclusive} Array 'n[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\ + " n[3]=3; + " ^ + " + "" OR if using the misra addon: + "test.c:1:16: style: misra violation (use --rule-texts= to get proper output) [misra-c2012-2.7]\' + "void test( int parm ) {} + " ^ + let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(%(\w[-.]?)+)\]\' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if ale#path#IsBufferPath(a:buffer, l:match[1]) + call add(l:output, { + \ 'lnum': str2nr(l:match[2]), + \ 'col': match(l:match[3],'{column}') >= 0 ? 1 : str2nr(l:match[3]), + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'sub_type': l:match[4] is# 'style' ? 'style' : '', + \ 'text': l:match[6], + \ 'code': l:match[7] + \}) + endif + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/cpplint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/cpplint.vim new file mode 100644 index 0000000..5c475a5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/cpplint.vim @@ -0,0 +1,21 @@ +" Author: Dawid Kurek https://github.com/dawikur +" Description: Handle errors for cpplint. + +function! ale#handlers#cpplint#HandleCppLintFormat(buffer, lines) abort + " Look for lines like the following. + " test.cpp:5: Estra space after ( in function call [whitespace/parents] [4] + let l:pattern = '^.\{-}:\(\d\+\): *\(.\+\) *\[\(.*/.*\)\] ' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': 0, + \ 'text': join(split(l:match[2])), + \ 'code': l:match[3], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/cspell.vim b/dot_vim/plugged/ale/autoload/ale/handlers/cspell.vim new file mode 100644 index 0000000..2cd02d5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/cspell.vim @@ -0,0 +1,54 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: Define a handler function for cspell's output + +function! ale#handlers#cspell#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, + \ 'cspell', [ + \ 'node_modules/.bin/cspell', + \ 'node_modules/cspell/bin.js', + \ ] + \) +endfunction + +function! ale#handlers#cspell#GetCommand(buffer) abort + let l:executable = ale#handlers#cspell#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'cspell_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . ' lint --no-color --no-progress --no-summary' + \ . ale#Pad(l:options) + \ . ' -- stdin' +endfunction + +function! ale#handlers#cspell#Handle(buffer, lines) abort + " Look for lines like the following: + " + " /home/user/repos/ale/README.md:723:48 - Unknown word (stylelint) + let l:pattern = '\v^.*:(\d+):(\d+) - (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'W', + \}) + endfor + + return l:output +endfunction + +function! ale#handlers#cspell#DefineLinter(filetype) abort + call ale#Set('cspell_executable', 'cspell') + call ale#Set('cspell_options', '') + call ale#Set('cspell_use_global', get(g:, 'ale_use_global_executables', 0)) + + call ale#linter#Define(a:filetype, { + \ 'name': 'cspell', + \ 'executable': function('ale#handlers#cspell#GetExecutable'), + \ 'command': function('ale#handlers#cspell#GetCommand'), + \ 'callback': 'ale#handlers#cspell#Handle', + \}) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/css.vim b/dot_vim/plugged/ale/autoload/ale/handlers/css.vim new file mode 100644 index 0000000..de9eadc --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/css.vim @@ -0,0 +1,70 @@ +scriptencoding utf-8 +" Author: w0rp +" Description: Error handling for CSS linters. + +function! ale#handlers#css#HandleCSSLintFormat(buffer, lines) abort + " Matches patterns line the following: + " + " something.css: line 2, col 1, Error - Expected RBRACE at line 2, col 1. (errors) + " something.css: line 2, col 5, Warning - Expected (inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex) but found 'wat'. (known-properties) + " + " These errors can be very massive, so the type will be moved to the front + " so you can actually read the error type. + let l:pattern = '\v^.*: line (\d+), col (\d+), (Error|Warning) - (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3] is# 'Warning' ? 'W' : 'E', + \ 'text': l:match[4], + \} + + let l:code_match = matchlist(l:match[4], '\v(.+) \(([^(]+)\)$') + + " Split up the error code and the text if we find one. + if !empty(l:code_match) + let l:item.text = l:code_match[1] + let l:item.code = l:code_match[2] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +function! ale#handlers#css#HandleStyleLintFormat(buffer, lines) abort + let l:exception_pattern = '\v^Error:' + + for l:line in a:lines[:10] + if len(matchlist(l:line, l:exception_pattern)) > 0 + return [{ + \ 'lnum': 1, + \ 'text': 'stylelint exception thrown (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + endfor + + " Matches patterns line the following: + " + " src/main.css + " 108:10 ✖ Unexpected leading zero number-leading-zero + " 116:20 ✖ Expected a trailing semicolon declaration-block-trailing-semicolon + let l:pattern = '\v^.* (\d+):(\d+) \s+(\S+)\s+ (.*[^ ])\s+([^ ]+)\s*$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3] is# '✖' ? 'E' : 'W', + \ 'text': l:match[4], + \ 'code': l:match[5], + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/deno.vim b/dot_vim/plugged/ale/autoload/ale/handlers/deno.vim new file mode 100644 index 0000000..b762f98 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/deno.vim @@ -0,0 +1,76 @@ +" Author: Mohammed Chelouti - https://github.com/motato1 +" Arnold Chand +" Description: Handler functions for Deno. + +call ale#Set('deno_executable', 'deno') +call ale#Set('deno_unstable', 0) +call ale#Set('deno_importMap', 'import_map.json') +call ale#Set('deno_lsp_project_root', '') + +function! ale#handlers#deno#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'deno_executable') +endfunction + +" Find project root for Deno's language server. +" +" Deno projects do not require a project or configuration file at the project root. +" This means the root directory has to be guessed, +" unless it is explicitly specified by the user. +" +" The project root is determined by ... +" 1. using a user-specified value from deno_lsp_project_root +" 2. looking for common top-level files/dirs +" 3. using the buffer's directory +function! ale#handlers#deno#GetProjectRoot(buffer) abort + let l:project_root = ale#Var(a:buffer, 'deno_lsp_project_root') + + if !empty(l:project_root) + return l:project_root + endif + + let l:possible_project_roots = [ + \ 'deno.json', + \ 'deno.jsonc', + \ 'tsconfig.json', + \ '.git', + \ bufname(a:buffer), + \] + + for l:possible_root in l:possible_project_roots + let l:project_root = ale#path#FindNearestFile(a:buffer, l:possible_root) + + if empty(l:project_root) + let l:project_root = ale#path#FindNearestDirectory(a:buffer, l:possible_root) + endif + + if !empty(l:project_root) + " dir:p expands to /full/path/to/dir/ whereas + " file:p expands to /full/path/to/file (no trailing slash) + " Appending '/' ensures that :h:h removes the path's last segment + " regardless of whether it is a directory or not. + return fnamemodify(l:project_root . '/', ':p:h:h') + endif + endfor + + return '' +endfunction + +" Initialization Options for deno, for javascript and typescript +function! ale#handlers#deno#GetInitializationOptions(buffer) abort + let l:options = { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': ale#path#FindNearestFile(a:buffer, 'import_map.json'), + \ } + + if ale#Var(a:buffer, 'deno_unstable') + let l:options.unstable = v:true + endif + + if ale#Var(a:buffer, 'deno_importMap') isnot# '' + let l:options.importMap = ale#path#FindNearestFile(a:buffer, ale#Var(a:buffer, 'deno_importMap')) + endif + + return l:options +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/elixir.vim b/dot_vim/plugged/ale/autoload/ale/handlers/elixir.vim new file mode 100644 index 0000000..2fddf8e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/elixir.vim @@ -0,0 +1,28 @@ +" Author: Matteo Centenaro (bugant) - https://github.com/bugant +" Author: Jon Parise +" Description: Functions for working with Elixir projects + +" Find the root directory for an elixir project that uses mix. +function! ale#handlers#elixir#FindMixProjectRoot(buffer) abort + let l:mix_file = ale#path#FindNearestFile(a:buffer, 'mix.exs') + + if !empty(l:mix_file) + return fnamemodify(l:mix_file, ':p:h') + endif + + return '.' +endfunction + +" Similar to ale#handlers#elixir#FindMixProjectRoot but also continue the +" search upward for a potential umbrella project root. If an umbrella root +" does not exist, the initial project root will be returned. +function! ale#handlers#elixir#FindMixUmbrellaRoot(buffer) abort + let l:app_root = ale#handlers#elixir#FindMixProjectRoot(a:buffer) + let l:umbrella_root = fnamemodify(l:app_root, ':h:h') + + if filereadable(l:umbrella_root . '/mix.exs') + return l:umbrella_root + endif + + return l:app_root +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/eslint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/eslint.vim new file mode 100644 index 0000000..374460b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/eslint.vim @@ -0,0 +1,280 @@ +" Author: w0rp +" Description: Functions for working with eslint, for checking or fixing files. + +let s:executables = [ +\ '.yarn/sdks/eslint/bin/eslint.js', +\ 'node_modules/.bin/eslint_d', +\ 'node_modules/eslint/bin/eslint.js', +\ 'node_modules/.bin/eslint', +\] +let s:sep = has('win32') ? '\' : '/' + +call ale#Set('javascript_eslint_options', '') +call ale#Set('javascript_eslint_executable', 'eslint') +call ale#Set('javascript_eslint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_eslint_suppress_eslintignore', 0) +call ale#Set('javascript_eslint_suppress_missing_config', 0) + +function! ale#handlers#eslint#FindConfig(buffer) abort + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + for l:basename in [ + \ '.eslintrc.js', + \ '.eslintrc.yaml', + \ '.eslintrc.yml', + \ '.eslintrc.json', + \ '.eslintrc', + \] + let l:config = ale#path#Simplify(join([l:path, l:basename], s:sep)) + + if filereadable(l:config) + return l:config + endif + endfor + endfor + + return ale#path#FindNearestFile(a:buffer, 'package.json') +endfunction + +function! ale#handlers#eslint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_eslint', s:executables) +endfunction + +" Given a buffer, return an appropriate working directory for ESLint. +function! ale#handlers#eslint#GetCwd(buffer) abort + " ESLint 6 loads plugins/configs/parsers from the project root + " By default, the project root is simply the CWD of the running process. + " https://github.com/eslint/rfcs/blob/master/designs/2018-simplified-package-loading/README.md + " https://github.com/dense-analysis/ale/issues/2787 + " + " If eslint is installed in a directory which contains the buffer, assume + " it is the ESLint project root. Otherwise, use nearest node_modules. + " Note: If node_modules not present yet, can't load local deps anyway. + let l:executable = ale#path#FindNearestExecutable(a:buffer, s:executables) + + if !empty(l:executable) + let l:modules_index = strridx(l:executable, 'node_modules') + let l:modules_root = l:modules_index > -1 ? l:executable[0:l:modules_index - 2] : '' + + let l:sdks_index = strridx(l:executable, ale#path#Simplify('.yarn/sdks')) + let l:sdks_root = l:sdks_index > -1 ? l:executable[0:l:sdks_index - 2] : '' + else + let l:modules_dir = ale#path#FindNearestDirectory(a:buffer, 'node_modules') + let l:modules_root = !empty(l:modules_dir) ? fnamemodify(l:modules_dir, ':h:h') : '' + + let l:sdks_dir = ale#path#FindNearestDirectory(a:buffer, ale#path#Simplify('.yarn/sdks')) + let l:sdks_root = !empty(l:sdks_dir) ? fnamemodify(l:sdks_dir, ':h:h:h') : '' + endif + + return strlen(l:modules_root) > strlen(l:sdks_root) ? l:modules_root : l:sdks_root +endfunction + +function! ale#handlers#eslint#GetCommand(buffer) abort + let l:executable = ale#handlers#eslint#GetExecutable(a:buffer) + + let l:options = ale#Var(a:buffer, 'javascript_eslint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -f json --stdin --stdin-filename %s' +endfunction + +function! s:AddHintsForTypeScriptParsingErrors(output) abort + for l:item in a:output + let l:item.text = substitute( + \ l:item.text, + \ '^\(Parsing error\)', + \ '\1 (You may need configure typescript-eslint-parser)', + \ '', + \) + endfor +endfunction + +function! s:CheckForBadConfig(buffer, lines) abort + let l:config_error_pattern = '\v^ESLint couldn''t find a configuration file' + \ . '|^Cannot read config file' + \ . '|^.*Configuration for rule .* is invalid' + \ . '|^ImportDeclaration should appear' + + " Look for a message in the first few lines which indicates that + " a configuration file couldn't be found. + for l:line in a:lines[:10] + let l:match = matchlist(l:line, l:config_error_pattern) + + if len(l:match) > 0 + " Don't show the missing config error if we've disabled it. + if ale#Var(a:buffer, 'javascript_eslint_suppress_missing_config') + \&& l:match[0] is# 'ESLint couldn''t find a configuration file' + return 0 + endif + + return 1 + endif + endfor + + return 0 +endfunction + +function! s:parseJSON(buffer, lines) abort + let l:parsed = [] + + for l:line in a:lines + try + let l:parsed = extend(l:parsed, json_decode(l:line)) + catch + endtry + endfor + + if type(l:parsed) != v:t_list || empty(l:parsed) + return [] + endif + + let l:errors = l:parsed[0]['messages'] + + if empty(l:errors) + return [] + endif + + let l:output = [] + + for l:error in l:errors + let l:obj = ({ + \ 'lnum': get(l:error, 'line', 0), + \ 'text': get(l:error, 'message', ''), + \ 'type': 'E', + \}) + + if get(l:error, 'severity', 0) is# 1 + let l:obj.type = 'W' + endif + + if has_key(l:error, 'ruleId') + let l:code = l:error['ruleId'] + + " Sometimes ESLint returns null here + if !empty(l:code) + let l:obj.code = l:code + endif + endif + + if has_key(l:error, 'column') + let l:obj.col = l:error['column'] + endif + + if has_key(l:error, 'endColumn') + let l:obj.end_col = l:error['endColumn'] - 1 + endif + + if has_key(l:error, 'endLine') + let l:obj.end_lnum = l:error['endLine'] + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + +let s:col_end_patterns = [ +\ '\vParsing error: Unexpected token (.+) ?', +\ '\v''(.+)'' is not defined.', +\ '\v%(Unexpected|Redundant use of) [''`](.+)[''`]', +\ '\vUnexpected (console) statement', +\] + +function! s:parseLines(buffer, lines) abort + " Matches patterns line the following: + " + " /path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle] + " /path/to/some-filename.js:56:41: Missing semicolon. [Error/semi] + let l:pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$' + " This second pattern matches lines like the following: + " + " /path/to/some-filename.js:13:3: Parsing error: Unexpected token + let l:parsing_pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:parsing_pattern]) + let l:text = l:match[3] + + let l:obj = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:text, + \ 'type': 'E', + \} + + " Take the error type from the output if available. + let l:split_code = split(l:match[4], '/') + + if get(l:split_code, 0, '') is# 'Warning' + let l:obj.type = 'W' + endif + + " The code can be something like 'Error/foo/bar', or just 'Error' + if !empty(get(l:split_code, 1)) + let l:obj.code = join(l:split_code[1:], '/') + endif + + for l:col_match in ale#util#GetMatches(l:text, s:col_end_patterns) + let l:obj.end_col = l:obj.col + len(l:col_match[1]) - 1 + endfor + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + +function! s:FilterResult(buffer, obj) abort + if ale#Var(a:buffer, 'javascript_eslint_suppress_eslintignore') + if a:obj.text =~# '^File ignored' + return 0 + endif + endif + + if has_key(a:obj, 'code') && a:obj.code is# 'no-trailing-spaces' + \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + return 0 + endif + + return 1 +endfunction + +function! s:HandleESLintOutput(buffer, lines, type) abort + if s:CheckForBadConfig(a:buffer, a:lines) + return [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + + if a:lines == ['Could not connect'] + return [{ + \ 'lnum': 1, + \ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.', + \}] + endif + + if a:type is# 'json' + let l:output = s:parseJSON(a:buffer, a:lines) + else + let l:output = s:parseLines(a:buffer, a:lines) + endif + + call filter(l:output, {idx, obj -> s:FilterResult(a:buffer, obj)}) + + if expand('#' . a:buffer . ':t') =~? '\.tsx\?$' + call s:AddHintsForTypeScriptParsingErrors(l:output) + endif + + return l:output +endfunction + +function! ale#handlers#eslint#HandleJSON(buffer, lines) abort + return s:HandleESLintOutput(a:buffer, a:lines, 'json') +endfunction + +function! ale#handlers#eslint#Handle(buffer, lines) abort + return s:HandleESLintOutput(a:buffer, a:lines, 'lines') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/fecs.vim b/dot_vim/plugged/ale/autoload/ale/handlers/fecs.vim new file mode 100644 index 0000000..064b927 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/fecs.vim @@ -0,0 +1,52 @@ +" Author: harttle +" Description: fecs http://fecs.baidu.com/ + +call ale#Set('javascript_fecs_executable', 'fecs') +call ale#Set('javascript_fecs_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#handlers#fecs#GetCommand(buffer) abort + return '%e check --colors=false --rule=true %t' +endfunction + +function! ale#handlers#fecs#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'javascript_fecs', [ + \ 'node_modules/.bin/fecs', + \ 'node_modules/fecs/bin/fecs', + \]) +endfunction + +function! ale#handlers#fecs#Handle(buffer, lines) abort + " Matches patterns looking like the following + " + " fecs WARN → line 20, col 25: Unexpected console statement. (no-console) + " fecs ERROR → line 24, col 36: Missing radix parameter. (radix) + " + let l:pattern = '\v^.*(WARN|ERROR)\s+→\s+line (\d+),\s+col\s+(\d+):\s+(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:obj = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4] + \} + + let l:code_match = matchlist(l:match[4], '\v^(.{-})\s*\((.+)\)$') + + if !empty(l:code_match) + let l:obj.code = l:code_match[2] + let l:obj.text = l:code_match[1] + endif + + if l:match[1] is# 'WARN' + let l:obj.type = 'W' + elseif l:match[1] is# 'ERROR' + let l:obj.type = 'E' + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/flawfinder.vim b/dot_vim/plugged/ale/autoload/ale/handlers/flawfinder.vim new file mode 100644 index 0000000..b7d2bec --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/flawfinder.vim @@ -0,0 +1,48 @@ +scriptencoding utf-8 +" Author: Christian Gibbons +" Description: This file defines a handler function that should work for the +" flawfinder format with the -CDQS flags. + +" Swiped this function from the GCC handler. Not sure if needed, but doesn't +" hurt to have it. +function! s:RemoveUnicodeQuotes(text) abort + let l:text = a:text + let l:text = substitute(l:text, '[`´‘’]', '''', 'g') + let l:text = substitute(l:text, '\v\\u2018([^\\]+)\\u2019', '''\1''', 'g') + let l:text = substitute(l:text, '[“â€]', '"', 'g') + + return l:text +endfunction + +function! ale#handlers#flawfinder#HandleFlawfinderFormat(buffer, lines) abort + " Look for lines like the following. + " + " :12:4: [2] (buffer) char:Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. + " :31:4: [1] (buffer) strncpy:Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ( \[[0-5]\] [^:]+):(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + " Use severity level to determine if it should be considered a warning + " or error. + let l:severity = str2nr(matchstr(split(l:match[4])[0], '[0-5]')) + + let l:item = { + \ 'lnum': str2nr(l:match[2]), + \ 'col': str2nr(l:match[3]), + \ 'type': (l:severity < ale#Var(a:buffer, 'c_flawfinder_error_severity')) + \ ? 'W' : 'E', + \ 'text': s:RemoveUnicodeQuotes(join(split(l:match[4])[1:]) . ': ' . l:match[5]), + \} + + " If the filename is something like , or -, then + " this is an error for the file we checked. + if l:match[1] isnot# '-' && l:match[1][0] isnot# '<' + let l:item['filename'] = l:match[1] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/gawk.vim b/dot_vim/plugged/ale/autoload/ale/handlers/gawk.vim new file mode 100644 index 0000000..50bc4c4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/gawk.vim @@ -0,0 +1,27 @@ +" Author: Anthony DeDominic +" Description: Handle output from gawk's --lint option + +function! ale#handlers#gawk#HandleGawkFormat(buffer, lines) abort + " Look for lines like the following: + " gawk: /tmp/v0fddXz/1/something.awk:1: ^ invalid char ''' in expression + let l:pattern = '^.\{-}:\(\d\+\):\s\+\(warning:\|\^\)\s*\(.*\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:ecode = 'E' + + if l:match[2] is? 'warning:' + let l:ecode = 'W' + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': 0, + \ 'text': l:match[3], + \ 'code': 0, + \ 'type': l:ecode, + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/gcc.vim b/dot_vim/plugged/ale/autoload/ale/handlers/gcc.vim new file mode 100644 index 0000000..0b37c98 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/gcc.vim @@ -0,0 +1,176 @@ +scriptencoding utf-8 +" Author: w0rp +" Description: This file defines a handler function which ought to work for +" any program which outputs errors in the format that GCC uses. + +let s:pragma_error = '#pragma once in main file' + +" Look for lines like the following. +" +" :8:5: warning: conversion lacks type at end of format [-Wformat=] +" :10:27: error: invalid operands to binary - (have ‘int’ and ‘char *’) +" -:189:7: note: $/${} is unnecessary on arithmetic variables. [SC2004] +let s:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+)?:?(\d+)?:? ([^:]+): (.+)$' +let s:inline_pattern = '\v inlined from .* at \:(\d+):(\d+):$' + +function! s:IsHeaderFile(filename) abort + return a:filename =~? '\v\.(h|hpp)$' +endfunction + +function! s:RemoveUnicodeQuotes(text) abort + let l:text = a:text + let l:text = substitute(l:text, '[`´‘’]', '''', 'g') + let l:text = substitute(l:text, '\v\\u2018([^\\]+)\\u2019', '''\1''', 'g') + let l:text = substitute(l:text, '[“â€]', '"', 'g') + + return l:text +endfunction + +function! s:ParseInlinedFunctionProblems(buffer, lines) abort + let l:output = [] + let l:pos_match = [] + + for l:line in a:lines + let l:match = matchlist(l:line, s:pattern) + + if !empty(l:match) && !empty(l:pos_match) + call add(l:output, { + \ 'lnum': str2nr(l:pos_match[1]), + \ 'col': str2nr(l:pos_match[2]), + \ 'type': (l:match[4] is# 'error' || l:match[4] is# 'fatal error') ? 'E' : 'W', + \ 'text': s:RemoveUnicodeQuotes(l:match[5]), + \}) + endif + + let l:pos_match = matchlist(l:line, s:inline_pattern) + endfor + + return l:output +endfunction + +" Report problems inside of header files just for gcc and clang +function! s:ParseProblemsInHeaders(buffer, lines) abort + let l:output = [] + let l:include_item = {} + + for l:line in a:lines[: -2] + let l:include_match = matchlist(l:line, '\v^In file included from') + + if !empty(l:include_item) + let l:pattern_match = matchlist(l:line, s:pattern) + + if !empty(l:pattern_match) && l:pattern_match[1] is# '' + if has_key(l:include_item, 'lnum') + call add(l:output, l:include_item) + endif + + let l:include_item = {} + + continue + endif + + let l:include_item.detail .= "\n" . l:line + endif + + if !empty(l:include_match) + if empty(l:include_item) + let l:include_item = { + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': l:line, + \} + endif + endif + + if !empty(l:include_item) + let l:stdin_match = matchlist(l:line, '\vfrom \:(\d+):(\d*):?$') + + if !empty(l:stdin_match) + let l:include_item.lnum = str2nr(l:stdin_match[1]) + + if str2nr(l:stdin_match[2]) + let l:include_item.col = str2nr(l:stdin_match[2]) + endif + endif + endif + endfor + + if !empty(l:include_item) && has_key(l:include_item, 'lnum') + call add(l:output, l:include_item) + endif + + return l:output +endfunction + +function! ale#handlers#gcc#HandleGCCFormat(buffer, lines) abort + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, s:pattern) + " Filter out the pragma errors + if s:IsHeaderFile(bufname(bufnr(''))) + \&& l:match[5][:len(s:pragma_error) - 1] is# s:pragma_error + continue + endif + + " If the 'error type' is a note, make it detail related to + " the previous error parsed in output + if l:match[4] is# 'note' + if !empty(l:output) + if !has_key(l:output[-1], 'detail') + let l:output[-1].detail = l:output[-1].text + + " handle macro expansion errors/notes + if l:match[5] =~? '^in expansion of macro ‘\w*\w’$' + " if the macro expansion is in the file we're in, add + " the lnum and col keys to the previous error + if l:match[1] is# '' + \ && !has_key(l:output[-1], 'col') + let l:output[-1].lnum = str2nr(l:match[2]) + let l:output[-1].col = str2nr(l:match[3]) + else + " the error is not in the current file, and since + " macro expansion errors don't show the full path to + " the error from the current file, we have to just + " give out a generic error message + let l:output[-1].text = 'Error found in macro expansion. See :ALEDetail' + endif + endif + endif + + let l:output[-1].detail = l:output[-1].detail . "\n" + \ . s:RemoveUnicodeQuotes(l:match[0]) + endif + + continue + endif + + let l:item = { + \ 'lnum': str2nr(l:match[2]), + \ 'type': (l:match[4] is# 'error' || l:match[4] is# 'fatal error') ? 'E' : 'W', + \ 'text': s:RemoveUnicodeQuotes(l:match[5]), + \} + + if !empty(l:match[3]) + let l:item.col = str2nr(l:match[3]) + endif + + " If the filename is something like , or -, then + " this is an error for the file we checked. + if l:match[1] isnot# '-' && l:match[1][0] isnot# '<' + let l:item['filename'] = l:match[1] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +" Handle problems with the GCC format, but report problems inside of headers. +function! ale#handlers#gcc#HandleGCCFormatWithIncludes(buffer, lines) abort + let l:output = ale#handlers#gcc#HandleGCCFormat(a:buffer, a:lines) + + call extend(l:output, s:ParseInlinedFunctionProblems(a:buffer, a:lines)) + call extend(l:output, s:ParseProblemsInHeaders(a:buffer, a:lines)) + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/go.vim b/dot_vim/plugged/ale/autoload/ale/handlers/go.vim new file mode 100644 index 0000000..c969669 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/go.vim @@ -0,0 +1,29 @@ +" Author: neersighted +" Description: go vet for Go files +" +" Author: John Eikenberry +" Description: updated to work with go1.10 +" +" Author: Ben Paxton +" Description: moved to generic Golang file from govet +" +" Author: mostfunkyduck +" Description: updated to work with go 1.14 + +function! ale#handlers#go#Handler(buffer, lines) abort + let l:pattern = '\v^%(vet: )?([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:? ?(.+)$' + let l:output = [] + let l:dir = expand('#' . a:buffer . ':p:h') + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]), + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:match[4], + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/haskell.vim b/dot_vim/plugged/ale/autoload/ale/handlers/haskell.vim new file mode 100644 index 0000000..70a3a7e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/haskell.vim @@ -0,0 +1,119 @@ +" Author: w0rp +" Description: Error handling for the format GHC outputs. +" +function! ale#handlers#haskell#GetStackExecutable(bufnr) abort + if ale#path#FindNearestFile(a:bufnr, 'stack.yaml') isnot# '' + return 'stack' + endif + + " if there is no stack.yaml file, we don't use stack even if it exists, + " so we return '', because executable('') apparently always fails + return '' +endfunction + +" Remember the directory used for temporary files for Vim. +let s:temp_dir = fnamemodify(ale#util#Tempname(), ':h') +" Build part of a regular expression for matching ALE temporary filenames. +let s:temp_regex_prefix = +\ '\M' +\ . substitute(s:temp_dir, '\\', '\\\\', 'g') +\ . '\.\{-}' + +function! s:PanicOutput(lines) abort + return [{ + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'ghc panic!', + \ 'type': 'E', + \ 'detail' : join(a:lines, "\n"), + \}] +endfunction + +function! ale#handlers#haskell#HandleGHCFormat(buffer, lines) abort + " Look for lines like the following. + " + "Appoint/Lib.hs:8:1: warning: + "Appoint/Lib.hs:8:1: + let l:basename = expand('#' . a:buffer . ':t') + " Build a complete regular expression for replacing temporary filenames + " in Haskell error messages with the basename for this file. + let l:temp_filename_regex = s:temp_regex_prefix . l:basename + + let l:pattern = '\v^\s*([a-zA-Z]?:?[^:]+):(\d+):(\d+):(.*)?$' + let l:output = [] + + let l:corrected_lines = [] + + " If ghc panic error, put the whole message in details and exit. + let l:panic_position = match(a:lines,'ghc: panic!') + let l:panic_end = match(a:lines,'Please report this as a GHC bug:') + + if l:panic_position >= 0 + return s:PanicOutput(a:lines[l:panic_position : l:panic_end]) + endif + + " Group the lines into smaller lists. + for l:line in a:lines + if len(matchlist(l:line, l:pattern)) > 0 + call add(l:corrected_lines, [l:line]) + elseif l:line is# '' + call add(l:corrected_lines, [l:line]) + elseif len(l:corrected_lines) > 0 + call add(l:corrected_lines[-1], l:line) + endif + endfor + + for l:line_list in l:corrected_lines + " Join the smaller lists into one large line to parse. + let l:line = l:line_list[0] + + for l:extra_line in l:line_list[1:] + let l:line .= substitute(l:extra_line, '\v^\s+', ' ', '') + endfor + + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + continue + endif + + if !ale#path#IsBufferPath(a:buffer, l:match[1]) + continue + endif + + let l:errors = matchlist(l:match[4], '\v([wW]arning|[eE]rror): ?(.*)') + + if len(l:errors) > 0 + let l:ghc_type = l:errors[1] + let l:text = l:errors[2] + else + let l:ghc_type = '' + let l:text = l:match[4][:0] is# ' ' ? l:match[4][1:] : l:match[4] + endif + + if l:ghc_type is? 'Warning' + let l:type = 'W' + else + let l:type = 'E' + endif + + " Replace temporary filenames in problem messages with the basename + let l:text = substitute(l:text, l:temp_filename_regex, l:basename, 'g') + + let l:item = { + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'text': l:text, + \ 'type': l:type, + \} + + " Include extra lines as details if they are there. + if len(l:line_list) > 1 + let l:item.detail = join(l:line_list[1:], "\n") + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/haskell_stack.vim b/dot_vim/plugged/ale/autoload/ale/handlers/haskell_stack.vim new file mode 100644 index 0000000..108301a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/haskell_stack.vim @@ -0,0 +1,7 @@ +function! ale#handlers#haskell_stack#EscapeExecutable(executable, stack_exec) abort + let l:exec_args = a:executable =~? 'stack$' + \ ? ' exec ' . ale#Escape(a:stack_exec) . ' --' + \ : '' + + return ale#Escape(a:executable) . l:exec_args +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/hdl_checker.vim b/dot_vim/plugged/ale/autoload/ale/handlers/hdl_checker.vim new file mode 100644 index 0000000..e871b08 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/hdl_checker.vim @@ -0,0 +1,73 @@ +" Author: suoto +" Description: Adds support for HDL Code Checker, which wraps vcom/vlog, ghdl +" or xvhdl. More info on https://github.com/suoto/hdl_checker + +call ale#Set('hdl_checker_executable', 'hdl_checker') +call ale#Set('hdl_checker_config_file', has('unix') ? '.hdl_checker.config' : '_hdl_checker.config') +call ale#Set('hdl_checker_options', '') + +" Use this as a function so we can mock it on testing. Need to do this because +" test files are inside /testplugin (which refers to the ale repo), which will +" always have a .git folder +function! ale#handlers#hdl_checker#IsDotGit(path) abort + return ! empty(a:path) && isdirectory(a:path) +endfunction + +" Should return (in order of preference) +" 1. Nearest config file +" 2. Nearest .git directory +" 3. The current path +function! ale#handlers#hdl_checker#GetProjectRoot(buffer) abort + let l:project_root = ale#path#FindNearestFile( + \ a:buffer, + \ ale#Var(a:buffer, 'hdl_checker_config_file')) + + if !empty(l:project_root) + return fnamemodify(l:project_root, ':h') + endif + + " Search for .git to use as root + let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') + + if ale#handlers#hdl_checker#IsDotGit(l:project_root) + return fnamemodify(l:project_root, ':h:h') + endif + + return '' +endfunction + +function! ale#handlers#hdl_checker#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'hdl_checker_executable') +endfunction + +function! ale#handlers#hdl_checker#GetCommand(buffer) abort + let l:command = ale#Escape(ale#handlers#hdl_checker#GetExecutable(a:buffer)) . ' --lsp' + + " Add extra parameters only if config has been set + let l:options = ale#Var(a:buffer, 'hdl_checker_options') + + if ! empty(l:options) + let l:command = l:command . ' ' . l:options + endif + + return l:command +endfunction + +" To allow testing +function! ale#handlers#hdl_checker#GetInitOptions(buffer) abort + return {'project_file': ale#Var(a:buffer, 'hdl_checker_config_file')} +endfunction + +" Define the hdl_checker linter for a given filetype. +function! ale#handlers#hdl_checker#DefineLinter(filetype) abort + call ale#linter#Define(a:filetype, { + \ 'name': 'hdl-checker', + \ 'lsp': 'stdio', + \ 'language': a:filetype, + \ 'executable': function('ale#handlers#hdl_checker#GetExecutable'), + \ 'command': function('ale#handlers#hdl_checker#GetCommand'), + \ 'project_root': function('ale#handlers#hdl_checker#GetProjectRoot'), + \ 'initialization_options': function('ale#handlers#hdl_checker#GetInitOptions'), + \ }) +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/hlint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/hlint.vim new file mode 100644 index 0000000..b9a8c32 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/hlint.vim @@ -0,0 +1,8 @@ +call ale#Set('haskell_hlint_executable', 'hlint') +call ale#Set('haskell_hlint_options', get(g:, 'hlint_options', '')) + +function! ale#handlers#hlint#GetExecutable(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hlint_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hlint') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/inko.vim b/dot_vim/plugged/ale/autoload/ale/handlers/inko.vim new file mode 100644 index 0000000..73f0687 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/inko.vim @@ -0,0 +1,37 @@ +" Author: Yorick Peterse +" Description: output handlers for the Inko JSON format + +function! ale#handlers#inko#GetType(severity) abort + if a:severity is? 'warning' + return 'W' + endif + + return 'E' +endfunction + +function! ale#handlers#inko#Handle(buffer, lines) abort + try + let l:errors = json_decode(join(a:lines, '')) + catch + return [] + endtry + + if empty(l:errors) + return [] + endif + + let l:output = [] + let l:dir = expand('#' . a:buffer . ':p:h') + + for l:error in l:errors + call add(l:output, { + \ 'filename': ale#path#GetAbsPath(l:dir, l:error['file']), + \ 'lnum': l:error['line'], + \ 'col': l:error['column'], + \ 'text': l:error['message'], + \ 'type': ale#handlers#inko#GetType(l:error['level']), + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/ktlint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/ktlint.vim new file mode 100644 index 0000000..77e7ab6 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/ktlint.vim @@ -0,0 +1,45 @@ +" Author: Michael Phillips +" Description: Handler functions for ktlint. + +call ale#Set('kotlin_ktlint_executable', 'ktlint') +call ale#Set('kotlin_ktlint_rulesets', []) +call ale#Set('kotlin_ktlint_options', '') + +function! ale#handlers#ktlint#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'kotlin_ktlint_executable') + let l:options = ale#Var(a:buffer, 'kotlin_ktlint_options') + let l:rulesets = ale#handlers#ktlint#GetRulesets(a:buffer) + + return ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . (empty(l:rulesets) ? '' : ' ' . l:rulesets) + \ . ' --stdin' +endfunction + +function! ale#handlers#ktlint#GetRulesets(buffer) abort + let l:rulesets = map(ale#Var(a:buffer, 'kotlin_ktlint_rulesets'), '''--ruleset '' . v:val') + + return join(l:rulesets, ' ') +endfunction + +function! ale#handlers#ktlint#Handle(buffer, lines) abort + let l:message_pattern = '^\(.*\):\([0-9]\+\):\([0-9]\+\):\s\+\(.*\)' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:message_pattern) + let l:line = l:match[2] + 0 + let l:column = l:match[3] + 0 + let l:text = l:match[4] + + let l:type = l:text =~? 'not a valid kotlin file' ? 'E' : 'W' + + call add(l:output, { + \ 'lnum': l:line, + \ 'col': l:column, + \ 'text': l:text, + \ 'type': l:type + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/languagetool.vim b/dot_vim/plugged/ale/autoload/ale/handlers/languagetool.vim new file mode 100644 index 0000000..73974ce --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/languagetool.vim @@ -0,0 +1,77 @@ +" Author: Vincent (wahrwolf [at] wolfpit.net) +" Description: languagetool for markdown files +" +call ale#Set('languagetool_executable', 'languagetool') +call ale#Set('languagetool_options', '--autoDetect') + +function! ale#handlers#languagetool#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'languagetool_executable') +endfunction + +function! ale#handlers#languagetool#GetCommand(buffer) abort + let l:executable = ale#handlers#languagetool#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'languagetool_options') + + return ale#Escape(l:executable) + \ . (empty(l:options) ? '' : ' ' . l:options) . ' %s' +endfunction + +function! ale#handlers#languagetool#HandleOutput(buffer, lines) abort + " Match lines like: + " 1.) Line 5, column 1, Rule ID: + let l:head_pattern = '^\v.+.\) Line (\d+), column (\d+), Rule ID. (.+)$' + let l:head_matches = ale#util#GetMatches(a:lines, l:head_pattern) + + " Match lines like: + " Message: Did you forget a comma after a conjunctive/linking adverb? + let l:message_pattern = '^\vMessage. (.+)$' + let l:message_matches = ale#util#GetMatches(a:lines, l:message_pattern) + + " Match lines like: + " ^^^^^ " + let l:markers_pattern = '^\v *(\^+) *$' + let l:markers_matches = ale#util#GetMatches(a:lines, l:markers_pattern) + + let l:output = [] + + + " Okay tbh I was to lazy to figure out a smarter solution here + " We just check that the arrays are same sized and merge everything + " together + let l:i = 0 + + while l:i < len(l:head_matches) + \ && ( + \ (len(l:head_matches) == len(l:markers_matches)) + \ && (len(l:head_matches) == len(l:message_matches)) + \ ) + let l:item = { + \ 'lnum' : str2nr(l:head_matches[l:i][1]), + \ 'col' : str2nr(l:head_matches[l:i][2]), + \ 'end_col' : str2nr(l:head_matches[l:i][2]) + len(l:markers_matches[l:i][1])-1, + \ 'type' : 'W', + \ 'code' : l:head_matches[l:i][3], + \ 'text' : l:message_matches[l:i][1] + \} + call add(l:output, l:item) + let l:i+=1 + endwhile + + return l:output +endfunction + +" Define the languagetool linter for a given filetype. +" TODO: +" - Add language detection settings based on user env (for mothertongue) +" - Add fixer +" - Add config options for rules +function! ale#handlers#languagetool#DefineLinter(filetype) abort + call ale#linter#Define(a:filetype, { + \ 'name': 'languagetool', + \ 'executable': function('ale#handlers#languagetool#GetExecutable'), + \ 'command': function('ale#handlers#languagetool#GetCommand'), + \ 'output_stream': 'stdout', + \ 'callback': 'ale#handlers#languagetool#HandleOutput', + \ 'lint_file': 1, + \}) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/markdownlint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/markdownlint.vim new file mode 100644 index 0000000..6c273bd --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/markdownlint.vim @@ -0,0 +1,24 @@ +" Author: Ty-Lucas Kelley +" Description: Adds support for markdownlint + +function! ale#handlers#markdownlint#Handle(buffer, lines) abort + let l:pattern=': \?\(\d\+\)\(:\(\d\+\)\?\)\? \(MD\d\{3}/[A-Za-z0-9-/]\+\) \(.*\)$' + let l:output=[] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:result = ({ + \ 'lnum': l:match[1] + 0, + \ 'code': l:match[4], + \ 'text': l:match[5], + \ 'type': 'W', + \}) + + if len(l:match[3]) > 0 + let l:result.col = (l:match[3] + 0) + endif + + call add(l:output, l:result) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/naga.vim b/dot_vim/plugged/ale/autoload/ale/handlers/naga.vim new file mode 100644 index 0000000..6480aba --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/naga.vim @@ -0,0 +1,30 @@ +" Author: rhysd +" Description: Handle errors for naga-cli. + +function! ale#handlers#naga#Handle(buffer, lines) abort + let l:errors = [] + let l:current_error = v:null + + for l:line in a:lines + if l:line =~# '^error: ' + let l:text = l:line[7:] + let l:current_error = { 'text': l:text, 'type': 'E' } + continue + endif + + if l:current_error isnot v:null + let l:matches = matchlist(l:line, '\v:(\d+):(\d+)$') + + if !empty(l:matches) + let l:current_error.lnum = str2nr(l:matches[1]) + let l:current_error.col = str2nr(l:matches[2]) + call add(l:errors, l:current_error) + let l:current_error = v:null + continue + endif + endif + endfor + + return l:errors +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/ocamllsp.vim b/dot_vim/plugged/ale/autoload/ale/handlers/ocamllsp.vim new file mode 100644 index 0000000..2738ea2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/ocamllsp.vim @@ -0,0 +1,30 @@ +" Author: Risto Stevcev +" Description: Handlers for the official OCaml language server + +let s:language_id_of_filetype = { +\ 'menhir': 'ocaml.menhir', +\ 'ocaml': 'ocaml', +\ 'ocamlinterface': 'ocaml.interface', +\ 'ocamllex': 'ocaml.lex' +\} + +function! ale#handlers#ocamllsp#GetExecutable(buffer) abort + return 'ocamllsp' +endfunction + +function! ale#handlers#ocamllsp#GetCommand(buffer) abort + let l:executable = ale#handlers#ocamllsp#GetExecutable(a:buffer) + let l:ocaml_ocamllsp_use_opam = ale#Var(a:buffer, 'ocaml_ocamllsp_use_opam') + + return l:ocaml_ocamllsp_use_opam ? 'opam config exec -- ' . l:executable : l:executable +endfunction + +function! ale#handlers#ocamllsp#GetLanguage(buffer) abort + return s:language_id_of_filetype[getbufvar(a:buffer, '&filetype')] +endfunction + +function! ale#handlers#ocamllsp#GetProjectRoot(buffer) abort + let l:dune_project_file = ale#path#FindNearestFile(a:buffer, 'dune-project') + + return !empty(l:dune_project_file) ? fnamemodify(l:dune_project_file, ':h') : '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/ols.vim b/dot_vim/plugged/ale/autoload/ale/handlers/ols.vim new file mode 100644 index 0000000..c292c6d --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/ols.vim @@ -0,0 +1,26 @@ +" Author: Michael Jungo +" Description: Handlers for the OCaml language server + +function! ale#handlers#ols#GetExecutable(buffer) abort + let l:ols_setting = ale#handlers#ols#GetLanguage(a:buffer) . '_ols' + + return ale#path#FindExecutable(a:buffer, l:ols_setting, [ + \ 'node_modules/.bin/ocaml-language-server', + \]) +endfunction + +function! ale#handlers#ols#GetCommand(buffer) abort + let l:executable = ale#handlers#ols#GetExecutable(a:buffer) + + return ale#node#Executable(a:buffer, l:executable) . ' --stdio' +endfunction + +function! ale#handlers#ols#GetLanguage(buffer) abort + return getbufvar(a:buffer, '&filetype') +endfunction + +function! ale#handlers#ols#GetProjectRoot(buffer) abort + let l:merlin_file = ale#path#FindNearestFile(a:buffer, '.merlin') + + return !empty(l:merlin_file) ? fnamemodify(l:merlin_file, ':h') : '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/openscad.vim b/dot_vim/plugged/ale/autoload/ale/handlers/openscad.vim new file mode 100644 index 0000000..33eee31 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/openscad.vim @@ -0,0 +1,73 @@ +scriptencoding utf-8LE +" Description: This file defines a handler function for linting OpenSCAD files +" with SCA2D + +function! ale#handlers#openscad#SCA2D_callback(buffer, lines) abort + " Example output:: + " foo.scad:3:1: W2001: Variable `unused` overwritten within scope. + " foo.scad:1:1: F0001: Cannot read file due to syntax error: + " - No terminal matches '}' in the current parser context, at line 1 col 36 + let l:filename_re = '^\([^:]*\):' + let l:linenum_re = '\([0-9]*\):' + let l:colnum_re = '\([0-9]*\):' + let l:err_id = '\([IWEFU][0-9]\+\):' + let l:err_msg = '\(.*\)' + let l:pattern = filename_re . + \ linenum_re . + \ colnum_re . + \ ' ' . + \ err_id . + \ ' ' . + \ err_msg + + let l:result = [] + let l:idx = 0 + + for l:line in a:lines + let l:matches = matchlist(line, pattern) + + if len(matches) > 0 + " option: Info, Warning, Error, Fatal, Unknown + if index(['I', 'W'], matches[4][0]) >= 0 + let l:type = 'W' + else + let l:type = 'E' + endif + + let l:lnum = matches[2] + let l:col = matches[3] + let l:text = matches[5] + + " Better locations for some syntax errors + if matches[4][0] is# 'F' + let l:syntax_error_re = '^\(.*\), at line \([0-9]\+\) col \([0-9]\+\)$' + let l:next_line = a:lines[idx+1] + let l:syn_err_matches = matchlist(l:next_line, l:syntax_error_re) + + if len(syn_err_matches) > 0 + let l:text = l:text . l:syn_err_matches[1] + let l:lnum = l:syn_err_matches[2] + let l:col = l:syn_err_matches[3] + else + let l:text = l:next_line + endif + endif + + let l:element = { + \ 'lnum': str2nr(l:lnum), + \ 'col': str2nr(l:col), + \ 'text': l:text, + \ 'detail': l:matches[4] . ': ' . l:text, + \ 'filename': fnamemodify(matches[1], ':p'), + \ 'type': l:type + \ } + + call add(l:result, l:element) + endif + + let l:idx += 1 + endfor + + return result + +endfun diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/pony.vim b/dot_vim/plugged/ale/autoload/ale/handlers/pony.vim new file mode 100644 index 0000000..ea84ac4 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/pony.vim @@ -0,0 +1,33 @@ +scriptencoding utf-8 +" Description: This file defines a handler function which ought to work for +" any program which outputs errors in the format that ponyc uses. + +function! s:RemoveUnicodeQuotes(text) abort + let l:text = a:text + let l:text = substitute(l:text, '[`´‘’]', '''', 'g') + let l:text = substitute(l:text, '\v\\u2018([^\\]+)\\u2019', '''\1''', 'g') + let l:text = substitute(l:text, '[“â€]', '"', 'g') + + return l:text +endfunction + +function! ale#handlers#pony#HandlePonycFormat(buffer, lines) abort + " Look for lines like the following. + " /home/code/pony/classes/Wombat.pony:22:30: can't lookup private fields from outside the type + let l:pattern = '\v^([^:]+):(\d+):(\d+)?:? (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'filename': l:match[1], + \ 'lnum': str2nr(l:match[2]), + \ 'col': str2nr(l:match[3]), + \ 'type': 'E', + \ 'text': s:RemoveUnicodeQuotes(l:match[4]), + \} + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/redpen.vim b/dot_vim/plugged/ale/autoload/ale/handlers/redpen.vim new file mode 100644 index 0000000..195057c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/redpen.vim @@ -0,0 +1,65 @@ +" Author: rhysd https://rhysd.github.io +" Description: Redpen, a proofreading tool (http://redpen.cc) + +function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort + " Only one file was passed to redpen. So response array has only one + " element. + let l:res = get(ale#util#FuzzyJSONDecode(a:lines, []), 0, {}) + let l:output = [] + + for l:err in get(l:res, 'errors', []) + let l:item = { + \ 'text': l:err.message, + \ 'type': 'W', + \ 'code': l:err.validator, + \} + + if has_key(l:err, 'startPosition') + let l:item.lnum = l:err.startPosition.lineNum + let l:item.col = l:err.startPosition.offset + 1 + + if has_key(l:err, 'endPosition') + let l:item.end_lnum = l:err.endPosition.lineNum + let l:item.end_col = l:err.endPosition.offset + endif + else + " Fallback to a whole sentence region when a region is not + " specified by the error. + let l:item.lnum = l:err.lineNum + let l:item.col = l:err.sentenceStartColumnNum + 1 + endif + + " Adjust column number for multibyte string + let l:line = getline(l:item.lnum) + + if l:line is# '' + let l:line = l:err.sentence + endif + + let l:line = split(l:line, '\zs') + + if l:item.col >= 2 + let l:col = 0 + + for l:strlen in map(l:line[0:(l:item.col - 2)], 'strlen(v:val)') + let l:col = l:col + l:strlen + endfor + + let l:item.col = l:col + 1 + endif + + if has_key(l:item, 'end_col') + let l:col = 0 + + for l:strlen in map(l:line[0:(l:item.end_col - 1)], 'strlen(v:val)') + let l:col = l:col + l:strlen + endfor + + let l:item.end_col = l:col + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/ruby.vim b/dot_vim/plugged/ale/autoload/ale/handlers/ruby.vim new file mode 100644 index 0000000..7a1c576 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/ruby.vim @@ -0,0 +1,38 @@ +" Author: Brandon Roehl - https://github.com/BrandonRoehl, Matthias Guenther https://wikimatze.de +" +" Description: This file implements handlers specific to Ruby. + +function! s:HandleSyntaxError(buffer, lines) abort + " Matches patterns line the following: + " + " test.rb:3: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument + " test.rb:8: syntax error, unexpected keyword_end, expecting end-of-input + let l:pattern = '\v^.+:(\d+): (warning: )?(.+)$' + let l:column = '\v^(\s+)\^$' + let l:output = [] + + for l:line in a:lines + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + let l:match = matchlist(l:line, l:column) + + if len(l:match) != 0 + let l:output[len(l:output) - 1]['col'] = len(l:match[1]) + endif + else + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': 0, + \ 'text': l:match[2] . l:match[3], + \ 'type': empty(l:match[2]) ? 'E' : 'W', + \}) + endif + endfor + + return l:output +endfunction + +function! ale#handlers#ruby#HandleSyntaxErrors(buffer, lines) abort + return s:HandleSyntaxError(a:buffer, a:lines) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/rust.vim b/dot_vim/plugged/ale/autoload/ale/handlers/rust.vim new file mode 100644 index 0000000..a7fac46 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/rust.vim @@ -0,0 +1,78 @@ +" Author: Daniel Schemala , +" w0rp +" +" Description: This file implements handlers specific to Rust. + +if !exists('g:ale_rust_ignore_error_codes') + let g:ale_rust_ignore_error_codes = [] +endif + +if !exists('g:ale_rust_ignore_secondary_spans') + let g:ale_rust_ignore_secondary_spans = 0 +endif + +function! s:FindSpan(buffer, span) abort + if ale#path#IsBufferPath(a:buffer, a:span.file_name) || a:span.file_name is# '' + return a:span + endif + + " Search inside the expansion of an error, as the problem for this buffer + " could lie inside a nested object. + if !empty(get(a:span, 'expansion', v:null)) + return s:FindSpan(a:buffer, a:span.expansion.span) + endif + + return {} +endfunction + +function! ale#handlers#rust#HandleRustErrors(buffer, lines) abort + let l:output = [] + + for l:errorline in a:lines + " ignore everything that is not JSON + if l:errorline !~# '^{' + continue + endif + + let l:error = json_decode(l:errorline) + + if has_key(l:error, 'message') && type(l:error.message) is v:t_dict + let l:error = l:error.message + endif + + if !has_key(l:error, 'code') + continue + endif + + if !empty(l:error.code) && index(g:ale_rust_ignore_error_codes, l:error.code.code) > -1 + continue + endif + + for l:root_span in l:error.spans + let l:span = s:FindSpan(a:buffer, l:root_span) + + if ale#Var(a:buffer, 'rust_ignore_secondary_spans') && !get(l:span, 'is_primary', 1) + continue + endif + + if !empty(l:span) + let l:output_line = { + \ 'lnum': l:span.line_start, + \ 'end_lnum': l:span.line_end, + \ 'col': l:span.column_start, + \ 'end_col': l:span.column_end-1, + \ 'text': empty(l:span.label) ? l:error.message : printf('%s: %s', l:error.message, l:span.label), + \ 'type': toupper(l:error.level[0]), + \} + + if has_key(l:error, 'rendered') && !empty(l:error.rendered) + let l:output_line.detail = l:error.rendered + endif + + call add(l:output, l:output_line) + endif + endfor + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/scala.vim b/dot_vim/plugged/ale/autoload/ale/handlers/scala.vim new file mode 100644 index 0000000..3fe7a12 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/scala.vim @@ -0,0 +1,37 @@ +" Author: Nils Leuzinger - https://github.com/PawkyPenguin +" Description: Scala linting handlers for scalac-like compilers. + +function! ale#handlers#scala#HandleScalacLintFormat(buffer, lines) abort + " Matches patterns line the following: + " + " /var/folders/5q/20rgxx3x1s34g3m14n5bq0x80000gn/T/vv6pSsy/0:26: error: expected class or object definition + let l:pattern = '^.\+:\(\d\+\): \(\w\+\): \(.\+\)' + let l:output = [] + let l:ln = 0 + + for l:line in a:lines + let l:ln = l:ln + 1 + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) == 0 + continue + endif + + let l:text = l:match[3] + let l:type = l:match[2] is# 'error' ? 'E' : 'W' + let l:col = 0 + + if l:ln + 1 < len(a:lines) + let l:col = stridx(a:lines[l:ln + 1], '^') + endif + + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:col + 1, + \ 'text': l:text, + \ 'type': l:type, + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/sh.vim b/dot_vim/plugged/ale/autoload/ale/handlers/sh.vim new file mode 100644 index 0000000..6ed9fea --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/sh.vim @@ -0,0 +1,37 @@ +" Author: w0rp + +function! ale#handlers#sh#GetShellType(buffer) abort + let l:shebang = get(getbufline(a:buffer, 1), 0, '') + + let l:command = '' + + " Take the shell executable from the shebang, if we can. + if l:shebang[:1] is# '#!' + " Remove options like -e, etc. + let l:command = substitute(l:shebang, ' --\?[a-zA-Z0-9]\+', '', 'g') + endif + + " With no shebang line, attempt to use Vim's buffer-local variables. + if l:command is# '' + if getbufvar(a:buffer, 'is_bash', 0) + let l:command = 'bash' + elseif getbufvar(a:buffer, 'is_sh', 0) + let l:command = 'sh' + elseif getbufvar(a:buffer, 'is_kornshell', 0) + let l:command = 'ksh' + endif + endif + + " If we couldn't find a shebang, try the filetype + if l:command is# '' + let l:command = &filetype + endif + + for l:possible_shell in ['bash', 'dash', 'ash', 'tcsh', 'csh', 'zsh', 'ksh', 'sh'] + if l:command =~# l:possible_shell . '\s*$' + return l:possible_shell + endif + endfor + + return '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/shellcheck.vim b/dot_vim/plugged/ale/autoload/ale/handlers/shellcheck.vim new file mode 100644 index 0000000..17de291 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/shellcheck.vim @@ -0,0 +1,123 @@ +" Author: w0rp +" Description: This file adds support for using the shellcheck linter + +" Shellcheck supports shell directives to define the shell dialect for scripts +" that do not have a shebang for some reason. +" https://github.com/koalaman/shellcheck/wiki/Directive#shell +function! ale#handlers#shellcheck#GetShellcheckDialectDirective(buffer) abort + let l:linenr = 0 + let l:pattern = '\s\{-}#\s\{-}shellcheck\s\{-}shell=\(.*\)' + let l:possible_shell = ['bash', 'dash', 'ash', 'tcsh', 'csh', 'zsh', 'ksh', 'sh'] + + while l:linenr < min([50, line('$')]) + let l:linenr += 1 + let l:match = matchlist(getline(l:linenr), l:pattern) + + if len(l:match) > 1 && index(l:possible_shell, l:match[1]) >= 0 + return l:match[1] + endif + endwhile + + return '' +endfunction + +function! ale#handlers#shellcheck#GetDialectArgument(buffer) abort + let l:shell_type = ale#handlers#shellcheck#GetShellcheckDialectDirective(a:buffer) + + if empty(l:shell_type) + let l:shell_type = ale#handlers#sh#GetShellType(a:buffer) + endif + + if !empty(l:shell_type) + " Use the dash dialect for /bin/ash, etc. + if l:shell_type is# 'ash' + return 'dash' + endif + + return l:shell_type + endif + + return '' +endfunction + +function! ale#handlers#shellcheck#GetCwd(buffer) abort + return ale#Var(a:buffer, 'sh_shellcheck_change_directory') ? '%s:h' : '' +endfunction + +function! ale#handlers#shellcheck#GetCommand(buffer, version) abort + let l:options = ale#Var(a:buffer, 'sh_shellcheck_options') + let l:exclude_option = ale#Var(a:buffer, 'sh_shellcheck_exclusions') + let l:dialect = ale#Var(a:buffer, 'sh_shellcheck_dialect') + let l:external_option = ale#semver#GTE(a:version, [0, 4, 0]) ? ' -x' : '' + + if l:dialect is# 'auto' + let l:dialect = ale#handlers#shellcheck#GetDialectArgument(a:buffer) + endif + + return '%e' + \ . (!empty(l:dialect) ? ' -s ' . l:dialect : '') + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . (!empty(l:exclude_option) ? ' -e ' . l:exclude_option : '') + \ . l:external_option + \ . ' -f gcc -' +endfunction + +function! ale#handlers#shellcheck#Handle(buffer, lines) abort + let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ([^:]+): (.+) \[([^\]]+)\]$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + if l:match[4] is# 'error' + let l:type = 'E' + elseif l:match[4] is# 'note' + let l:type = 'I' + else + let l:type = 'W' + endif + + let l:item = { + \ 'lnum': str2nr(l:match[2]), + \ 'type': l:type, + \ 'text': l:match[5], + \ 'code': l:match[6], + \} + + if !empty(l:match[3]) + let l:item.col = str2nr(l:match[3]) + endif + + " If the filename is something like , or -, then + " this is an error for the file we checked. + if l:match[1] isnot# '-' && l:match[1][0] isnot# '<' + let l:item['filename'] = l:match[1] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + +function! ale#handlers#shellcheck#DefineLinter(filetype) abort + " This global variable can be set with a string of comma-separated error + " codes to exclude from shellcheck. For example: + " let g:ale_sh_shellcheck_exclusions = 'SC2002,SC2004' + call ale#Set('sh_shellcheck_exclusions', get(g:, 'ale_linters_sh_shellcheck_exclusions', '')) + call ale#Set('sh_shellcheck_executable', 'shellcheck') + call ale#Set('sh_shellcheck_dialect', 'auto') + call ale#Set('sh_shellcheck_options', '') + call ale#Set('sh_shellcheck_change_directory', 1) + + call ale#linter#Define(a:filetype, { + \ 'name': 'shellcheck', + \ 'executable': {buffer -> ale#Var(buffer, 'sh_shellcheck_executable')}, + \ 'cwd': function('ale#handlers#shellcheck#GetCwd'), + \ 'command': {buffer -> ale#semver#RunWithVersionCheck( + \ buffer, + \ ale#Var(buffer, 'sh_shellcheck_executable'), + \ '%e --version', + \ function('ale#handlers#shellcheck#GetCommand'), + \ )}, + \ 'callback': 'ale#handlers#shellcheck#Handle', + \}) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/sml.vim b/dot_vim/plugged/ale/autoload/ale/handlers/sml.vim new file mode 100644 index 0000000..403b25f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/sml.vim @@ -0,0 +1,102 @@ +" Author: Jake Zimmerman +" Description: Shared functions for SML linters + +" The glob to use for finding the .cm file. +" +" See :help ale-sml-smlnj for more information. +call ale#Set('sml_smlnj_cm_file', '*.cm') + +function! ale#handlers#sml#GetCmFile(buffer) abort + let l:pattern = ale#Var(a:buffer, 'sml_smlnj_cm_file') + let l:as_list = 1 + + let l:cmfile = '' + + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + let l:results = glob(l:path . '/' . l:pattern, 0, l:as_list) + + if len(l:results) > 0 + " If there is more than one CM file, we take the first one + " See :help ale-sml-smlnj for how to configure this. + let l:cmfile = l:results[0] + endif + endfor + + return l:cmfile +endfunction + +" Only one of smlnj or smlnj-cm can be enabled at a time. +function! s:GetExecutable(buffer, source) abort + if ale#handlers#sml#GetCmFile(a:buffer) is# '' + " No CM file found; only allow single-file mode to be enabled + if a:source is# 'smlnj-file' + return 'sml' + elseif a:source is# 'smlnj-cm' + return '' + endif + else + " Found a CM file; only allow cm-file mode to be enabled + if a:source is# 'smlnj-file' + return '' + elseif a:source is# 'smlnj-cm' + return 'sml' + endif + endif +endfunction + +function! ale#handlers#sml#GetExecutableSmlnjCm(buffer) abort + return s:GetExecutable(a:buffer, 'smlnj-cm') +endfunction + +function! ale#handlers#sml#GetExecutableSmlnjFile(buffer) abort + return s:GetExecutable(a:buffer, 'smlnj-file') +endfunction + +function! ale#handlers#sml#Handle(buffer, lines) abort + " Try to match basic sml errors + " TODO(jez) We can get better errorfmt strings from Syntastic + let l:out = [] + let l:pattern = '^\(.*\)\:\([0-9\.]\+\)\ \(\w\+\)\:\ \(.*\)' + let l:pattern2 = '^\(.*\)\:\([0-9]\+\)\.\?\([0-9]\+\).* \(\(Warning\|Error\): .*\)' + + for l:line in a:lines + let l:match2 = matchlist(l:line, l:pattern2) + + if len(l:match2) != 0 + if l:match2[1] =~# 'stdIn$' + let l:loc = {'bufnr': a:buffer} + else + let l:loc = {'filename': l:match2[1]} + endif + + call add(l:out, extend(l:loc, { + \ 'lnum': l:match2[2] + 0, + \ 'col' : l:match2[3] - 1, + \ 'text': l:match2[4], + \ 'type': l:match2[4] =~# '^Warning' ? 'W' : 'E', + \})) + continue + endif + + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) != 0 + if l:match[1] =~# 'stdIn$' + let l:loc = {'bufnr': a:buffer} + else + let l:loc = {'filename': l:match[1]} + endif + + call add(l:out, extend(l:loc, { + \ 'lnum': l:match[2] + 0, + \ 'text': l:match[3] . ': ' . l:match[4], + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \})) + continue + endif + endfor + + return l:out +endfunction + +" vim:ts=4:sts=4:sw=4 diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/solhint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/solhint.vim new file mode 100644 index 0000000..611aa7b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/solhint.vim @@ -0,0 +1,98 @@ +" Author: Henrique Barcelos <@hbarcelos> +" Description: Functions for working with local solhint for checking *.sol files. + +let s:executables = [ +\ 'node_modules/.bin/solhint', +\ 'node_modules/solhint/solhint.js', +\ 'solhint', +\] + +let s:sep = has('win32') ? '\' : '/' + +call ale#Set('solidity_solhint_options', '') +call ale#Set('solidity_solhint_executable', 'solhint') +call ale#Set('solidity_solhint_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#handlers#solhint#Handle(buffer, lines) abort + " Matches patterns like the following: + " /path/to/file/file.sol: line 1, col 10, Error - 'addOne' is defined but never used. (no-unused-vars) + let l:output = [] + + let l:lint_pattern = '\v^[^:]+: line (\d+), col (\d+), (Error|Warning) - (.*) \((.*)\)$' + + for l:match in ale#util#GetMatches(a:lines, l:lint_pattern) + let l:isError = l:match[3] is? 'error' + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4], + \ 'code': l:match[5], + \ 'type': l:isError ? 'E' : 'W', + \}) + endfor + + let l:syntax_pattern = '\v^[^:]+: line (\d+), col (\d+), (Error|Warning) - (Parse error): (.*)$' + + for l:match in ale#util#GetMatches(a:lines, l:syntax_pattern) + let l:isError = l:match[3] is? 'error' + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[5], + \ 'code': l:match[4], + \ 'type': l:isError ? 'E' : 'W', + \}) + endfor + + return l:output +endfunction + +function! ale#handlers#solhint#FindConfig(buffer) abort + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + for l:basename in [ + \ '.solhintrc.js', + \ '.solhintrc.json', + \ '.solhintrc', + \] + let l:config = ale#path#Simplify(join([l:path, l:basename], s:sep)) + + if filereadable(l:config) + return l:config + endif + endfor + endfor + + return ale#path#FindNearestFile(a:buffer, 'package.json') +endfunction + +function! ale#handlers#solhint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'solidity_solhint', s:executables) +endfunction + +" Given a buffer, return an appropriate working directory for solhint. +function! ale#handlers#solhint#GetCwd(buffer) abort + " If solhint is installed in a directory which contains the buffer, assume + " it is the solhint project root. Otherwise, use nearest node_modules. + " Note: If node_modules not present yet, can't load local deps anyway. + let l:executable = ale#path#FindNearestExecutable(a:buffer, s:executables) + + if !empty(l:executable) + let l:nmi = strridx(l:executable, 'node_modules') + let l:project_dir = l:executable[0:l:nmi - 2] + else + let l:modules_dir = ale#path#FindNearestDirectory(a:buffer, 'node_modules') + let l:project_dir = !empty(l:modules_dir) ? fnamemodify(l:modules_dir, ':h:h') : '' + endif + + return !empty(l:project_dir) ? l:project_dir : '' +endfunction + +function! ale#handlers#solhint#GetCommand(buffer) abort + let l:executable = ale#handlers#solhint#GetExecutable(a:buffer) + + let l:options = ale#Var(a:buffer, 'solidity_solhint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' --formatter compact %s' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/spectral.vim b/dot_vim/plugged/ale/autoload/ale/handlers/spectral.vim new file mode 100644 index 0000000..1eb4a5d --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/spectral.vim @@ -0,0 +1,31 @@ +" Author: t2h5 +" Description: Integration of Stoplight Spectral CLI with ALE. + +function! ale#handlers#spectral#HandleSpectralOutput(buffer, lines) abort + " Matches patterns like the following: + " openapi.yml:1:1 error oas3-schema "Object should have required property `info`." + " openapi.yml:1:1 warning oas3-api-servers "OpenAPI `servers` must be present and non-empty array." + let l:pattern = '\v^.*:(\d+):(\d+) (error|warning) (.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:obj = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \ 'text': l:match[4], + \} + + let l:code_match = matchlist(l:obj.text, '\v^(.+) "(.+)"$') + + if !empty(l:code_match) + let l:obj.code = l:code_match[1] + let l:obj.text = l:code_match[2] + endif + + call add(l:output, l:obj) + endfor + + return l:output +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/statix.vim b/dot_vim/plugged/ale/autoload/ale/handlers/statix.vim new file mode 100644 index 0000000..eeef410 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/statix.vim @@ -0,0 +1,24 @@ +scriptencoding utf-8 +" Author: David Houston +" Description: This file defines a handler function for statix's errorformat +" output. + +function! ale#handlers#statix#Handle(buffer, lines) abort + " Look for lines like the following. + " + " flake.nix>46:13:W:3:This assignment is better written with `inherit` + let l:pattern = '\v^.*\>(\d+):(\d+):([A-Z]):(\d+):(.*)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'type': l:match[3], + \ 'code': l:match[4], + \ 'text': l:match[5], + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/textlint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/textlint.vim new file mode 100644 index 0000000..7a64861 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/textlint.vim @@ -0,0 +1,39 @@ +" Author: tokida https://rouger.info, Yasuhiro Kiyota +" Description: textlint, a proofreading tool (https://textlint.github.io/) + +call ale#Set('textlint_executable', 'textlint') +call ale#Set('textlint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('textlint_options', '') + +function! ale#handlers#textlint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'textlint', [ + \ 'node_modules/.bin/textlint', + \ 'node_modules/textlint/bin/textlint.js', + \]) +endfunction + +function! ale#handlers#textlint#GetCommand(buffer) abort + let l:executable = ale#handlers#textlint#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'textlint_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' -f json --stdin --stdin-filename %s' +endfunction + +function! ale#handlers#textlint#HandleTextlintOutput(buffer, lines) abort + let l:res = get(ale#util#FuzzyJSONDecode(a:lines, []), 0, {'messages': []}) + let l:output = [] + + for l:err in l:res.messages + call add(l:output, { + \ 'text': l:err.message, + \ 'type': 'W', + \ 'code': l:err.ruleId, + \ 'lnum': l:err.line, + \ 'col' : l:err.column + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/tslint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/tslint.vim new file mode 100644 index 0000000..ee091d2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/tslint.vim @@ -0,0 +1,13 @@ +function! ale#handlers#tslint#InitVariables() abort + call ale#Set('typescript_tslint_executable', 'tslint') + call ale#Set('typescript_tslint_config_path', '') + call ale#Set('typescript_tslint_rules_dir', '') + call ale#Set('typescript_tslint_use_global', get(g:, 'ale_use_global_executables', 0)) + call ale#Set('typescript_tslint_ignore_empty_files', 0) +endfunction + +function! ale#handlers#tslint#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'typescript_tslint', [ + \ 'node_modules/.bin/tslint', + \]) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/tsserver.vim b/dot_vim/plugged/ale/autoload/ale/handlers/tsserver.vim new file mode 100644 index 0000000..f78499a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/tsserver.vim @@ -0,0 +1,8 @@ +" Author: Derek Sifford +" Description: Handlers for tsserver + +function! ale#handlers#tsserver#GetProjectRoot(buffer) abort + let l:tsconfig_file = ale#path#FindNearestFile(a:buffer, 'tsconfig.json') + + return !empty(l:tsconfig_file) ? fnamemodify(l:tsconfig_file, ':h') : '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/unix.vim b/dot_vim/plugged/ale/autoload/ale/handlers/unix.vim new file mode 100644 index 0000000..f90fd59 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/unix.vim @@ -0,0 +1,26 @@ +" Author: w0rp +" Description: Error handling for errors in a Unix format. + +function! s:HandleUnixFormat(buffer, lines, type) abort + let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?:? ?(.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': a:type, + \}) + endfor + + return l:output +endfunction + +function! ale#handlers#unix#HandleAsError(buffer, lines) abort + return s:HandleUnixFormat(a:buffer, a:lines, 'E') +endfunction + +function! ale#handlers#unix#HandleAsWarning(buffer, lines) abort + return s:HandleUnixFormat(a:buffer, a:lines, 'W') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/vale.vim b/dot_vim/plugged/ale/autoload/ale/handlers/vale.vim new file mode 100644 index 0000000..2da72fc --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/vale.vim @@ -0,0 +1,39 @@ +" Author: Johannes Wienke +" Description: output handler for the vale JSON format + +function! ale#handlers#vale#GetType(severity) abort + if a:severity is? 'warning' + return 'W' + elseif a:severity is? 'suggestion' + return 'I' + endif + + return 'E' +endfunction + +function! ale#handlers#vale#Handle(buffer, lines) abort + try + let l:errors = json_decode(join(a:lines, '')) + catch + return [] + endtry + + if empty(l:errors) + return [] + endif + + let l:output = [] + + for l:error in l:errors[keys(l:errors)[0]] + call add(l:output, { + \ 'lnum': l:error['Line'], + \ 'col': l:error['Span'][0], + \ 'end_col': l:error['Span'][1], + \ 'code': l:error['Check'], + \ 'text': l:error['Message'], + \ 'type': ale#handlers#vale#GetType(l:error['Severity']), + \}) + endfor + + return l:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/writegood.vim b/dot_vim/plugged/ale/autoload/ale/handlers/writegood.vim new file mode 100644 index 0000000..b5b91b3 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/writegood.vim @@ -0,0 +1,72 @@ +" Author: Sumner Evans +" Description: Error handling for errors in the write-good format. + +function! ale#handlers#writegood#ResetOptions() abort + call ale#Set('writegood_options', '') + call ale#Set('writegood_executable', 'write-good') + call ale#Set('writegood_use_global', get(g:, 'ale_use_global_executables', 0)) +endfunction + +" Reset the options so the tests can test how they are set. +call ale#handlers#writegood#ResetOptions() + +function! ale#handlers#writegood#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'writegood', [ + \ 'node_modules/.bin/write-good', + \ 'node_modules/write-good/bin/write-good.js', + \]) +endfunction + +function! ale#handlers#writegood#GetCommand(buffer) abort + let l:executable = ale#handlers#writegood#GetExecutable(a:buffer) + let l:options = ale#Var(a:buffer, 'writegood_options') + + return ale#node#Executable(a:buffer, l:executable) + \ . (!empty(l:options) ? ' ' . l:options : '') + \ . ' %t' +endfunction + +function! ale#handlers#writegood#Handle(buffer, lines) abort + " Look for lines like the following. + " + " "it is" is wordy or unneeded on line 20 at column 53 + " "easily" can weaken meaning on line 154 at column 29 + let l:marks_pattern = '\v^ *(\^+) *$' + let l:pattern = '\v^(".*"\s.*)\son\sline\s(\d+)\sat\scolumn\s(\d+)$' + let l:output = [] + let l:last_len = 0 + + for l:match in ale#util#GetMatches(a:lines, [l:marks_pattern, l:pattern]) + if empty(l:match[2]) + let l:last_len = len(l:match[1]) + else + let l:col = l:match[3] + 1 + + " Add the linter error. Note that we need to add 1 to the col because + " write-good reports the column corresponding to the space before the + " offending word or phrase. + call add(l:output, { + \ 'text': l:match[1], + \ 'lnum': l:match[2] + 0, + \ 'col': l:col, + \ 'end_col': l:last_len ? (l:col + l:last_len - 1) : l:col, + \ 'type': 'W', + \}) + + let l:last_len = 0 + endif + endfor + + return l:output +endfunction + +" Define the writegood linter for a given filetype. +function! ale#handlers#writegood#DefineLinter(filetype) abort + call ale#linter#Define(a:filetype, { + \ 'name': 'writegood', + \ 'aliases': ['write-good'], + \ 'executable': function('ale#handlers#writegood#GetExecutable'), + \ 'command': function('ale#handlers#writegood#GetCommand'), + \ 'callback': 'ale#handlers#writegood#Handle', + \}) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/xo.vim b/dot_vim/plugged/ale/autoload/ale/handlers/xo.vim new file mode 100644 index 0000000..a87c6d8 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/xo.vim @@ -0,0 +1,44 @@ +call ale#Set('javascript_xo_executable', 'xo') +call ale#Set('javascript_xo_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('javascript_xo_options', '') + +call ale#Set('typescript_xo_executable', 'xo') +call ale#Set('typescript_xo_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('typescript_xo_options', '') + +function! ale#handlers#xo#GetExecutable(buffer) abort + let l:type = ale#handlers#xo#GetType(a:buffer) + + return ale#path#FindExecutable(a:buffer, l:type . '_xo', [ + \ 'node_modules/xo/cli.js', + \ 'node_modules/.bin/xo', + \]) +endfunction + +function! ale#handlers#xo#GetLintCommand(buffer) abort + return ale#Escape(ale#handlers#xo#GetExecutable(a:buffer)) + \ . ale#Pad(ale#handlers#xo#GetOptions(a:buffer)) + \ . ' --reporter json --stdin --stdin-filename %s' +endfunction + +function! ale#handlers#xo#GetOptions(buffer) abort + let l:type = ale#handlers#xo#GetType(a:buffer) + + return ale#Var(a:buffer, l:type . '_xo_options') +endfunction + +" xo uses eslint and the output format is the same +function! ale#handlers#xo#HandleJSON(buffer, lines) abort + return ale#handlers#eslint#HandleJSON(a:buffer, a:lines) +endfunction + +function! ale#handlers#xo#GetType(buffer) abort + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:type = 'javascript' + + if l:filetype =~# 'typescript' + let l:type = 'typescript' + endif + + return l:type +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/handlers/yamllint.vim b/dot_vim/plugged/ale/autoload/ale/handlers/yamllint.vim new file mode 100644 index 0000000..5e04577 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/handlers/yamllint.vim @@ -0,0 +1,39 @@ +function! ale#handlers#yamllint#GetCommand(buffer) abort + return '%e' . ale#Pad(ale#Var(a:buffer, 'yaml_yamllint_options')) + \ . ' -f parsable %t' +endfunction + +function! ale#handlers#yamllint#Handle(buffer, lines) abort + " Matches patterns line the following: + " something.yaml:1:1: [warning] missing document start "---" (document-start) + " something.yml:2:1: [error] syntax error: expected the node content, but found '' + let l:pattern = '\v^.*:(\d+):(\d+): \[(error|warning)\] (.+)$' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:item = { + \ 'lnum': l:match[1] + 0, + \ 'col': l:match[2] + 0, + \ 'text': l:match[4], + \ 'type': l:match[3] is# 'error' ? 'E' : 'W', + \} + + let l:code_match = matchlist(l:item.text, '\v^(.+) \(([^)]+)\)$') + + if !empty(l:code_match) + if l:code_match[2] is# 'trailing-spaces' + \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') + " Skip warnings for trailing whitespace if the option is off. + continue + endif + + let l:item.text = l:code_match[1] + let l:item.code = l:code_match[2] + endif + + call add(l:output, l:item) + endfor + + return l:output +endfunction + diff --git a/dot_vim/plugged/ale/autoload/ale/highlight.vim b/dot_vim/plugged/ale/autoload/ale/highlight.vim new file mode 100644 index 0000000..473ad35 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/highlight.vim @@ -0,0 +1,222 @@ +scriptencoding utf8 +" Author: w0rp +" Description: This module implements error/warning highlighting. + +if !hlexists('ALEError') + highlight link ALEError SpellBad +endif + +if !hlexists('ALEStyleError') + highlight link ALEStyleError ALEError +endif + +if !hlexists('ALEWarning') + highlight link ALEWarning SpellCap +endif + +if !hlexists('ALEStyleWarning') + highlight link ALEStyleWarning ALEWarning +endif + +if !hlexists('ALEInfo') + highlight link ALEInfo ALEWarning +endif + +" The maximum number of items for the second argument of matchaddpos() +let s:MAX_POS_VALUES = 8 +let s:MAX_COL_SIZE = 1073741824 " pow(2, 30) + +let s:has_nvim_highlight = exists('*nvim_buf_add_highlight') && exists('*nvim_buf_clear_namespace') + +if s:has_nvim_highlight + let s:ns_id = nvim_create_namespace('ale_highlight') +endif + +" Wrappers are necessary to test this functionality by faking the calls in tests. +function! ale#highlight#nvim_buf_add_highlight(buffer, ns_id, hl_group, line, col_start, col_end) abort + " Ignore all errors for adding highlights. + try + call nvim_buf_add_highlight(a:buffer, a:ns_id, a:hl_group, a:line, a:col_start, a:col_end) + catch + endtry +endfunction + +function! ale#highlight#nvim_buf_clear_namespace(buffer, ns_id, line_start, line_end) abort + call nvim_buf_clear_namespace(a:buffer, a:ns_id, a:line_start, a:line_end) +endfunction + +function! ale#highlight#CreatePositions(line, col, end_line, end_col) abort + if a:line >= a:end_line + " For single lines, just return the one position. + return [[[a:line, a:col, a:end_col - a:col + 1]]] + endif + + " Get positions from the first line at the first column, up to a large + " integer for highlighting up to the end of the line, followed by + " the lines in-between, for highlighting entire lines, and + " a highlight for the last line, up to the end column. + let l:all_positions = + \ [[a:line, a:col, s:MAX_COL_SIZE]] + \ + range(a:line + 1, a:end_line - 1) + \ + [[a:end_line, 1, a:end_col]] + + return map( + \ range(0, len(l:all_positions) - 1, s:MAX_POS_VALUES), + \ 'l:all_positions[v:val : v:val + s:MAX_POS_VALUES - 1]', + \) +endfunction + +" Given a loclist for current items to highlight, remove all highlights +" except these which have matching loclist item entries. + +function! ale#highlight#RemoveHighlights() abort + if s:has_nvim_highlight + call ale#highlight#nvim_buf_clear_namespace(bufnr(''), s:ns_id, 0, -1) + else + for l:match in getmatches() + if l:match.group =~? '\v^ALE(Style)?(Error|Warning|Info)(Line)?$' + call matchdelete(l:match.id) + endif + endfor + endif +endfunction + +" Same semantics of matchaddpos but will use nvim_buf_add_highlight if +" available. This involves iterating over the position list, switching from +" 1-based indexing to 0-based indexing, and translating the multiple ways +" that position can be specified for matchaddpos into line + col_start + +" col_end. +function! s:matchaddpos(group, pos_list) abort + if s:has_nvim_highlight + for l:pos in a:pos_list + let l:line = type(l:pos) == v:t_number + \ ? l:pos - 1 + \ : l:pos[0] - 1 + + if type(l:pos) == v:t_number || len(l:pos) == 1 + let l:col_start = 0 + let l:col_end = s:MAX_COL_SIZE + else + let l:col_start = l:pos[1] - 1 + let l:col_end = l:col_start + get(l:pos, 2, 1) + endif + + call ale#highlight#nvim_buf_add_highlight( + \ bufnr(''), + \ s:ns_id, + \ a:group, + \ l:line, + \ l:col_start, + \ l:col_end, + \) + endfor + else + call matchaddpos(a:group, a:pos_list) + endif +endfunction + +function! s:highlight_line(bufnr, lnum, group) abort + call s:matchaddpos(a:group, [a:lnum]) +endfunction + +function! s:highlight_range(bufnr, range, group) abort + " Set all of the positions, which are chunked into Lists which + " are as large as will be accepted by matchaddpos. + call map( + \ ale#highlight#CreatePositions( + \ a:range.lnum, + \ a:range.col, + \ a:range.end_lnum, + \ a:range.end_col + \ ), + \ 's:matchaddpos(a:group, v:val)' + \) +endfunction + +function! ale#highlight#UpdateHighlights() abort + let l:item_list = get(b:, 'ale_enabled', 1) && g:ale_enabled + \ ? get(b:, 'ale_highlight_items', []) + \ : [] + + call ale#highlight#RemoveHighlights() + + for l:item in l:item_list + if l:item.type is# 'W' + if get(l:item, 'sub_type', '') is# 'style' + let l:group = 'ALEStyleWarning' + else + let l:group = 'ALEWarning' + endif + elseif l:item.type is# 'I' + let l:group = 'ALEInfo' + elseif get(l:item, 'sub_type', '') is# 'style' + let l:group = 'ALEStyleError' + else + let l:group = 'ALEError' + endif + + let l:range = { + \ 'lnum': l:item.lnum, + \ 'col': l:item.col, + \ 'end_lnum': get(l:item, 'end_lnum', l:item.lnum), + \ 'end_col': get(l:item, 'end_col', l:item.col) + \} + + call s:highlight_range(l:item.bufnr, l:range, l:group) + endfor + + " If highlights are enabled and signs are not enabled, we should still + " offer line highlights by adding a separate set of highlights. + if !g:ale_set_signs + let l:available_groups = { + \ 'ALEWarningLine': hlexists('ALEWarningLine'), + \ 'ALEInfoLine': hlexists('ALEInfoLine'), + \ 'ALEErrorLine': hlexists('ALEErrorLine'), + \} + + for l:item in l:item_list + if l:item.type is# 'W' + let l:group = 'ALEWarningLine' + elseif l:item.type is# 'I' + let l:group = 'ALEInfoLine' + else + let l:group = 'ALEErrorLine' + endif + + if l:available_groups[l:group] + call s:highlight_line(l:item.bufnr, l:item.lnum, l:group) + endif + endfor + endif +endfunction + +function! ale#highlight#BufferHidden(buffer) abort + " Remove highlights right away when buffers are hidden. + " They will be restored later when buffers are entered. + call ale#highlight#RemoveHighlights() +endfunction + +augroup ALEHighlightBufferGroup + autocmd! + autocmd BufEnter * call ale#highlight#UpdateHighlights() + autocmd BufHidden * call ale#highlight#BufferHidden(expand('')) +augroup END + +function! ale#highlight#SetHighlights(buffer, loclist) abort + let l:new_list = getbufvar(a:buffer, 'ale_enabled', 1) && g:ale_enabled + \ ? filter(copy(a:loclist), 'v:val.bufnr == a:buffer && v:val.col > 0') + \ : [] + + " Set the list in the buffer variable. + call setbufvar(str2nr(a:buffer), 'ale_highlight_items', l:new_list) + + let l:exclude_list = ale#Var(a:buffer, 'exclude_highlights') + + if !empty(l:exclude_list) + call filter(l:new_list, 'empty(ale#util#GetMatches(v:val.text, l:exclude_list))') + endif + + " Update highlights for the current buffer, which may or may not + " be the buffer we just set highlights for. + call ale#highlight#UpdateHighlights() +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/history.vim b/dot_vim/plugged/ale/autoload/ale/history.vim new file mode 100644 index 0000000..27ae74c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/history.vim @@ -0,0 +1,62 @@ +" Author: w0rp +" Description: Tools for managing command history + +" A flag for controlling the maximum size of the command history to store. +let g:ale_max_buffer_history_size = get(g:, 'ale_max_buffer_history_size', 20) + +" Return a shallow copy of the command history for a given buffer number. +function! ale#history#Get(buffer) abort + return copy(getbufvar(a:buffer, 'ale_history', [])) +endfunction + +function! ale#history#Add(buffer, status, job_id, command) abort + if g:ale_max_buffer_history_size <= 0 + " Don't save anything if the history isn't a positive number. + call setbufvar(a:buffer, 'ale_history', []) + + return + endif + + let l:history = getbufvar(a:buffer, 'ale_history', []) + + " Remove the first item if we hit the max history size. + if len(l:history) >= g:ale_max_buffer_history_size + let l:history = l:history[1:] + endif + + call add(l:history, { + \ 'status': a:status, + \ 'job_id': a:job_id, + \ 'command': a:command, + \}) + + call setbufvar(a:buffer, 'ale_history', l:history) +endfunction + +function! s:FindHistoryItem(buffer, job_id) abort + " Search backwards to find a matching job ID. IDs might be recycled, + " so finding the last one should be good enough. + for l:obj in reverse(ale#history#Get(a:buffer)) + if l:obj.job_id == a:job_id + return l:obj + endif + endfor + + return {} +endfunction + +" Set an exit code for a command which finished. +function! ale#history#SetExitCode(buffer, job_id, exit_code) abort + let l:obj = s:FindHistoryItem(a:buffer, a:job_id) + + " If we find a match, then set the code and status. + let l:obj.exit_code = a:exit_code + let l:obj.status = 'finished' +endfunction + +" Set the output for a command which finished. +function! ale#history#RememberOutput(buffer, job_id, output) abort + let l:obj = s:FindHistoryItem(a:buffer, a:job_id) + + let l:obj.output = a:output +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/hover.vim b/dot_vim/plugged/ale/autoload/ale/hover.vim new file mode 100644 index 0000000..0954b80 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/hover.vim @@ -0,0 +1,368 @@ +" Author: w0rp +" Description: Hover support for LSP linters. + +let s:hover_map = {} + +" Used to get the hover map in tests. +function! ale#hover#GetMap() abort + return deepcopy(s:hover_map) +endfunction + +" Used to set the hover map in tests. +function! ale#hover#SetMap(map) abort + let s:hover_map = a:map +endfunction + +function! ale#hover#ClearLSPData() abort + let s:hover_map = {} +endfunction + +function! ale#hover#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') is# 'quickinfo' + \&& has_key(s:hover_map, a:response.request_seq) + let l:options = remove(s:hover_map, a:response.request_seq) + + if get(a:response, 'success', v:false) is v:true + \&& get(a:response, 'body', v:null) isnot v:null + let l:set_balloons = ale#Var(l:options.buffer, 'set_balloons') + + " If we pass the show_documentation flag, we should show the full + " documentation, and always in the preview window. + if get(l:options, 'show_documentation', 0) + let l:documentation = get(a:response.body, 'documentation', '') + + " displayString is not included here, because it can be very + " noisy and run on for many lines for complex types. A less + " verbose alternative may be nice in future. + if !empty(l:documentation) + call ale#preview#Show(split(l:documentation, "\n"), { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \}) + endif + elseif get(l:options, 'hover_from_balloonexpr', 0) + \&& exists('*balloon_show') + \&& (l:set_balloons is 1 || l:set_balloons is# 'hover') + call balloon_show(a:response.body.displayString) + elseif get(l:options, 'truncated_echo', 0) + if !empty(a:response.body.displayString) + call ale#cursor#TruncatedEcho(a:response.body.displayString) + endif + elseif g:ale_hover_to_floating_preview || g:ale_floating_preview + call ale#floating_preview#Show(split(a:response.body.displayString, "\n"), { + \ 'filetype': 'ale-preview.message', + \}) + elseif g:ale_hover_to_preview + call ale#preview#Show(split(a:response.body.displayString, "\n"), { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \}) + else + call ale#util#ShowMessage(a:response.body.displayString) + endif + endif + endif +endfunction + +" Convert a language name to another one. +" The language name could be an empty string or v:null +function! s:ConvertLanguageName(language) abort + return a:language +endfunction + +function! ale#hover#ParseLSPResult(contents) abort + let l:includes = {} + let l:highlights = [] + let l:lines = [] + let l:list = type(a:contents) is v:t_list ? a:contents : [a:contents] + let l:region_index = 0 + + for l:item in l:list + if !empty(l:lines) + call add(l:lines, '') + endif + + if type(l:item) is v:t_dict && has_key(l:item, 'kind') + if l:item.kind is# 'markdown' + " Handle markdown values as we handle strings below. + let l:item = get(l:item, 'value', '') + elseif l:item.kind is# 'plaintext' + " We shouldn't try to parse plaintext as markdown. + " Pass the lines on and skip parsing them. + call extend(l:lines, split(get(l:item, 'value', ''), "\n")) + + continue + endif + endif + + let l:marked_list = [] + + " If the item is a string, then we should parse it as Markdown text. + if type(l:item) is v:t_string + let l:fence_language = v:null + let l:fence_lines = [] + + for l:line in split(l:item, "\n") + if l:fence_language is v:null + " Look for the start of a code fence. (```python, etc.) + let l:match = matchlist(l:line, '^```\(.*\)$') + + if !empty(l:match) + let l:fence_language = l:match[1] + + if !empty(l:marked_list) + call add(l:fence_lines, '') + endif + else + if !empty(l:marked_list) + \&& l:marked_list[-1][0] isnot v:null + call add(l:marked_list, [v:null, ['']]) + endif + + call add(l:marked_list, [v:null, [l:line]]) + endif + elseif l:line =~# '^```$' + " When we hit the end of a code fence, pass the fenced + " lines on to the next steps below. + call add(l:marked_list, [l:fence_language, l:fence_lines]) + let l:fence_language = v:null + let l:fence_lines = [] + else + " Gather lines inside of a code fence. + call add(l:fence_lines, l:line) + endif + endfor + " If the result from the LSP server is a {language: ..., value: ...} + " Dictionary, then that should be interpreted as if it was: + " + " ```${language} + " ${value} + " ``` + elseif type(l:item) is v:t_dict + \&& has_key(l:item, 'language') + \&& type(l:item.language) is v:t_string + \&& has_key(l:item, 'value') + \&& type(l:item.value) is v:t_string + call add( + \ l:marked_list, + \ [l:item.language, split(l:item.value, "\n")], + \) + endif + + for [l:language, l:marked_lines] in l:marked_list + if l:language is v:null + " NOTE: We could handle other Markdown formatting here. + call map( + \ l:marked_lines, + \ 'substitute(v:val, ''\\_'', ''_'', ''g'')', + \) + else + let l:language = s:ConvertLanguageName(l:language) + + if !empty(l:language) + let l:includes[l:language] = printf( + \ 'syntax/%s.vim', + \ l:language, + \) + + let l:start = len(l:lines) + 1 + let l:end = l:start + len(l:marked_lines) + let l:region_index += 1 + + call add(l:highlights, 'syntax region' + \ . ' ALE_hover_' . l:region_index + \ . ' start=/\%' . l:start . 'l/' + \ . ' end=/\%' . l:end . 'l/' + \ . ' contains=@ALE_hover_' . l:language + \) + endif + endif + + call extend(l:lines, l:marked_lines) + endfor + endfor + + let l:include_commands = [] + + for [l:language, l:lang_path] in sort(items(l:includes)) + call add(l:include_commands, 'unlet! b:current_syntax') + call add( + \ l:include_commands, + \ printf('syntax include @ALE_hover_%s %s', l:language, l:lang_path), + \) + endfor + + return [l:include_commands + l:highlights, l:lines] +endfunction + +function! ale#hover#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:hover_map, a:response.id) + let l:options = remove(s:hover_map, a:response.id) + + " If the call did __not__ come from balloonexpr... + if !get(l:options, 'hover_from_balloonexpr', 0) + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + let l:end = len(getline(l:line)) + + if l:buffer isnot l:options.buffer + \|| l:line isnot l:options.line + \|| min([l:column, l:end]) isnot min([l:options.column, l:end]) + " ... Cancel display the message if the cursor has moved. + return + endif + endif + + " The result can be a Dictionary item, a List of the same, or null. + let l:result = get(a:response, 'result', v:null) + + if l:result is v:null + return + endif + + let [l:commands, l:lines] = ale#hover#ParseLSPResult(l:result.contents) + + if !empty(l:lines) + let l:set_balloons = ale#Var(l:options.buffer, 'set_balloons') + + if get(l:options, 'hover_from_balloonexpr', 0) + \&& exists('*balloon_show') + \&& (l:set_balloons is 1 || l:set_balloons is# 'hover') + call balloon_show(join(l:lines, "\n")) + elseif get(l:options, 'truncated_echo', 0) + if type(l:lines[0]) is# v:t_list + call ale#cursor#TruncatedEcho(join(l:lines[0], '\n')) + else + call ale#cursor#TruncatedEcho(l:lines[0]) + endif + elseif g:ale_hover_to_floating_preview || g:ale_floating_preview + call ale#floating_preview#Show(l:lines, { + \ 'filetype': 'ale-preview.message', + \ 'commands': l:commands, + \}) + elseif g:ale_hover_to_preview + call ale#preview#Show(l:lines, { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \ 'commands': l:commands, + \}) + else + call ale#util#ShowMessage(join(l:lines, "\n"), { + \ 'commands': l:commands, + \}) + endif + endif + endif +endfunction + +function! s:OnReady(line, column, opt, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'hover') + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#hover#HandleTSServerResponse') + \ : function('ale#hover#HandleLSPResponse') + call ale#lsp#RegisterCallback(l:id, l:Callback) + + if a:linter.lsp is# 'tsserver' + let l:column = a:column + + let l:message = ale#lsp#tsserver_message#Quickinfo( + \ l:buffer, + \ a:line, + \ l:column + \) + else + " Send a message saying the buffer has changed first, or the + " hover position probably won't make sense. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + let l:column = max([ + \ min([a:column, len(getbufline(l:buffer, a:line)[0])]), + \ 1, + \]) + + let l:message = ale#lsp#message#Hover(l:buffer, a:line, l:column) + endif + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:hover_map[l:request_id] = { + \ 'buffer': l:buffer, + \ 'line': a:line, + \ 'column': l:column, + \ 'hover_from_balloonexpr': get(a:opt, 'called_from_balloonexpr', 0), + \ 'show_documentation': get(a:opt, 'show_documentation', 0), + \ 'truncated_echo': get(a:opt, 'truncated_echo', 0), + \} +endfunction + +" Obtain Hover information for the specified position +" Pass optional arguments in the dictionary opt. +" Currently, only one key/value is useful: +" - called_from_balloonexpr, this flag marks if we want the result from this +" ale#hover#Show to display in a balloon if possible +" +" Currently, the callbacks displays the info from hover : +" - in the balloon if opt.called_from_balloonexpr and balloon_show is detected +" - as status message otherwise +function! ale#hover#Show(buffer, line, col, opt) abort + let l:show_documentation = get(a:opt, 'show_documentation', 0) + let l:Callback = function('s:OnReady', [a:line, a:col, a:opt]) + + for l:linter in ale#linter#Get(getbufvar(a:buffer, '&filetype')) + " Only tsserver supports documentation requests at the moment. + if !empty(l:linter.lsp) + \&& (!l:show_documentation || l:linter.lsp is# 'tsserver') + call ale#lsp_linter#StartLSP(a:buffer, l:linter, l:Callback) + endif + endfor +endfunction + +let s:last_pos = [0, 0, 0] + +" This function implements the :ALEHover command. +function! ale#hover#ShowAtCursor() abort + let l:buffer = bufnr('') + let l:pos = getpos('.') + + call ale#hover#Show(l:buffer, l:pos[1], l:pos[2], {}) +endfunction + +function! ale#hover#ShowTruncatedMessageAtCursor() abort + let l:buffer = bufnr('') + let l:pos = getpos('.')[0:2] + + if !getbufvar(l:buffer, 'ale_enabled', 1) + return + endif + + if l:pos != s:last_pos + let s:last_pos = l:pos + let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) + + if empty(l:loc) + call ale#hover#Show( + \ l:buffer, + \ l:pos[1], + \ l:pos[2], + \ {'truncated_echo': 1}, + \) + endif + endif +endfunction + +" This function implements the :ALEDocumentation command. +function! ale#hover#ShowDocumentationAtCursor() abort + let l:buffer = bufnr('') + let l:pos = getpos('.') + let l:options = {'show_documentation': 1} + + call ale#hover#Show(l:buffer, l:pos[1], l:pos[2], l:options) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/java.vim b/dot_vim/plugged/ale/autoload/ale/java.vim new file mode 100644 index 0000000..859d938 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/java.vim @@ -0,0 +1,26 @@ +" Author: Horacio Sanson https://github.com/hsanson +" Description: Functions for integrating with Java tools + +" Find the nearest dir contining a gradle or pom file and assume it +" the root of a java app. +function! ale#java#FindProjectRoot(buffer) abort + let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer) + + if !empty(l:gradle_root) + return l:gradle_root + endif + + let l:maven_pom_file = ale#path#FindNearestFile(a:buffer, 'pom.xml') + + if !empty(l:maven_pom_file) + return fnamemodify(l:maven_pom_file, ':h') + endif + + let l:ant_root = ale#ant#FindProjectRoot(a:buffer) + + if !empty(l:ant_root) + return l:ant_root + endif + + return '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/job.vim b/dot_vim/plugged/ale/autoload/ale/job.vim new file mode 100644 index 0000000..0fc43a8 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/job.vim @@ -0,0 +1,385 @@ +" Author: w0rp +" Description: APIs for working with Asynchronous jobs, with an API normalised +" between Vim 8 and NeoVim. +" +" Important functions are described below. They are: +" +" ale#job#Start(command, options) -> job_id +" ale#job#IsRunning(job_id) -> 1 if running, 0 otherwise. +" ale#job#Stop(job_id) + +" A setting for wrapping commands. +let g:ale_command_wrapper = get(g:, 'ale_command_wrapper', '') + +if !has_key(s:, 'job_map') + let s:job_map = {} +endif + +" A map from timer IDs to jobs, for tracking jobs that need to be killed +" with SIGKILL if they don't terminate right away. +if !has_key(s:, 'job_kill_timers') + let s:job_kill_timers = {} +endif + +function! s:KillHandler(timer) abort + let l:job = remove(s:job_kill_timers, a:timer) + call job_stop(l:job, 'kill') +endfunction + +function! s:NeoVimCallback(job, data, event) abort + let l:info = s:job_map[a:job] + + if a:event is# 'stdout' + let l:info.out_cb_line = ale#util#JoinNeovimOutput( + \ a:job, + \ l:info.out_cb_line, + \ a:data, + \ l:info.mode, + \ ale#util#GetFunction(l:info.out_cb), + \) + elseif a:event is# 'stderr' + let l:info.err_cb_line = ale#util#JoinNeovimOutput( + \ a:job, + \ l:info.err_cb_line, + \ a:data, + \ l:info.mode, + \ ale#util#GetFunction(l:info.err_cb), + \) + else + if has_key(l:info, 'out_cb') && !empty(l:info.out_cb_line) + call ale#util#GetFunction(l:info.out_cb)(a:job, l:info.out_cb_line) + endif + + if has_key(l:info, 'err_cb') && !empty(l:info.err_cb_line) + call ale#util#GetFunction(l:info.err_cb)(a:job, l:info.err_cb_line) + endif + + try + call ale#util#GetFunction(l:info.exit_cb)(a:job, a:data) + finally + " Automatically forget about the job after it's done. + if has_key(s:job_map, a:job) + call remove(s:job_map, a:job) + endif + endtry + endif +endfunction + +function! s:VimOutputCallback(channel, data) abort + let l:job = ch_getjob(a:channel) + let l:job_id = ale#job#ParseVim8ProcessID(string(l:job)) + + " Only call the callbacks for jobs which are valid. + if l:job_id > 0 && has_key(s:job_map, l:job_id) + call ale#util#GetFunction(s:job_map[l:job_id].out_cb)(l:job_id, a:data) + endif +endfunction + +function! s:VimErrorCallback(channel, data) abort + let l:job = ch_getjob(a:channel) + let l:job_id = ale#job#ParseVim8ProcessID(string(l:job)) + + " Only call the callbacks for jobs which are valid. + if l:job_id > 0 && has_key(s:job_map, l:job_id) + call ale#util#GetFunction(s:job_map[l:job_id].err_cb)(l:job_id, a:data) + endif +endfunction + +function! s:VimCloseCallback(channel) abort + let l:job = ch_getjob(a:channel) + let l:job_id = ale#job#ParseVim8ProcessID(string(l:job)) + let l:info = get(s:job_map, l:job_id, {}) + + if empty(l:info) + return + endif + + " job_status() can trigger the exit handler. + " The channel can close before the job has exited. + if job_status(l:job) is# 'dead' + try + if !empty(l:info) && has_key(l:info, 'exit_cb') + " We have to remove the callback, so we don't call it twice. + call ale#util#GetFunction(remove(l:info, 'exit_cb'))(l:job_id, get(l:info, 'exit_code', 1)) + endif + finally + " Automatically forget about the job after it's done. + if has_key(s:job_map, l:job_id) + call remove(s:job_map, l:job_id) + endif + endtry + endif +endfunction + +function! s:VimExitCallback(job, exit_code) abort + let l:job_id = ale#job#ParseVim8ProcessID(string(a:job)) + let l:info = get(s:job_map, l:job_id, {}) + + if empty(l:info) + return + endif + + let l:info.exit_code = a:exit_code + + " The program can exit before the data has finished being read. + if ch_status(job_getchannel(a:job)) is# 'closed' + try + if !empty(l:info) && has_key(l:info, 'exit_cb') + " We have to remove the callback, so we don't call it twice. + call ale#util#GetFunction(remove(l:info, 'exit_cb'))(l:job_id, a:exit_code) + endif + finally + " Automatically forget about the job after it's done. + if has_key(s:job_map, l:job_id) + call remove(s:job_map, l:job_id) + endif + endtry + endif +endfunction + +function! ale#job#ParseVim8ProcessID(job_string) abort + return matchstr(a:job_string, '\d\+') + 0 +endfunction + +function! ale#job#ValidateArguments(command, options) abort + if a:options.mode isnot# 'nl' && a:options.mode isnot# 'raw' + throw 'Invalid mode: ' . a:options.mode + endif +endfunction + +function! s:PrepareWrappedCommand(original_wrapper, command) abort + let l:match = matchlist(a:command, '\v^(.*(\&\&|;)) *(.*)$') + let l:prefix = '' + let l:command = a:command + + if !empty(l:match) + let l:prefix = l:match[1] . ' ' + let l:command = l:match[3] + endif + + let l:format = a:original_wrapper + + if l:format =~# '%@' + let l:wrapped = substitute(l:format, '%@', ale#Escape(l:command), '') + else + if l:format !~# '%\*' + let l:format .= ' %*' + endif + + let l:wrapped = substitute(l:format, '%\*', l:command, '') + endif + + return l:prefix . l:wrapped +endfunction + +function! ale#job#PrepareCommand(buffer, command) abort + let l:wrapper = ale#Var(a:buffer, 'command_wrapper') + + " The command will be executed in a subshell. This fixes a number of + " issues, including reading the PATH variables correctly, %PATHEXT% + " expansion on Windows, etc. + " + " NeoVim handles this issue automatically if the command is a String, + " but we'll do this explicitly, so we use the same exact command for both + " versions. + let l:command = !empty(l:wrapper) + \ ? s:PrepareWrappedCommand(l:wrapper, a:command) + \ : a:command + + " If a custom shell is specified, use that. + if exists('b:ale_shell') + let l:ale_shell = b:ale_shell + elseif exists('g:ale_shell') + let l:ale_shell = g:ale_shell + endif + + if exists('l:ale_shell') + let l:shell_arguments = get(b:, 'ale_shell_arguments', get(g:, 'ale_shell_arguments', &shellcmdflag)) + + return split(l:ale_shell) + split(l:shell_arguments) + [l:command] + endif + + if has('win32') + return 'cmd /s/c "' . l:command . '"' + endif + + if &shell =~? 'fish$\|pwsh$' + return ['/bin/sh', '-c', l:command] + endif + + return split(&shell) + split(&shellcmdflag) + [l:command] +endfunction + +" Start a job with options which are agnostic to Vim and NeoVim. +" +" The following options are accepted: +" +" out_cb - A callback for receiving stdin. Arguments: (job_id, data) +" err_cb - A callback for receiving stderr. Arguments: (job_id, data) +" exit_cb - A callback for program exit. Arguments: (job_id, status_code) +" mode - A mode for I/O. Can be 'nl' for split lines or 'raw'. +function! ale#job#Start(command, options) abort + call ale#job#ValidateArguments(a:command, a:options) + + let l:job_info = copy(a:options) + let l:job_options = {} + + if has('nvim') + if has_key(a:options, 'out_cb') + let l:job_options.on_stdout = function('s:NeoVimCallback') + let l:job_info.out_cb_line = '' + endif + + if has_key(a:options, 'err_cb') + let l:job_options.on_stderr = function('s:NeoVimCallback') + let l:job_info.err_cb_line = '' + endif + + if has_key(a:options, 'exit_cb') + let l:job_options.on_exit = function('s:NeoVimCallback') + endif + + let l:job_info.job = jobstart(a:command, l:job_options) + let l:job_id = l:job_info.job + else + let l:job_options = { + \ 'in_mode': l:job_info.mode, + \ 'out_mode': l:job_info.mode, + \ 'err_mode': l:job_info.mode, + \} + + if has_key(a:options, 'out_cb') + let l:job_options.out_cb = function('s:VimOutputCallback') + else + " prevent buffering of output and excessive polling in case close_cb is set + let l:job_options.out_cb = {->0} + endif + + if has_key(a:options, 'err_cb') + let l:job_options.err_cb = function('s:VimErrorCallback') + else + " prevent buffering of output and excessive polling in case close_cb is set + let l:job_options.err_cb = {->0} + endif + + if has_key(a:options, 'exit_cb') + " Set a close callback to which simply calls job_status() + " when the channel is closed, which can trigger the exit callback + " earlier on. + let l:job_options.close_cb = function('s:VimCloseCallback') + let l:job_options.exit_cb = function('s:VimExitCallback') + endif + + " Use non-blocking writes for Vim versions that support the option. + if has('patch-8.1.350') + let l:job_options.noblock = 1 + endif + + " Vim 8 will read the stdin from the file's buffer. + let l:job_info.job = job_start(a:command, l:job_options) + let l:job_id = ale#job#ParseVim8ProcessID(string(l:job_info.job)) + endif + + if l:job_id > 0 + " Store the job in the map for later only if we can get the ID. + let s:job_map[l:job_id] = l:job_info + endif + + return l:job_id +endfunction + +" Force running commands in a Windows CMD command line. +" This means the same command syntax works everywhere. +function! ale#job#StartWithCmd(command, options) abort + let l:shell = &l:shell + let l:shellcmdflag = &l:shellcmdflag + let &l:shell = 'cmd' + let &l:shellcmdflag = '/c' + + try + let l:job_id = ale#job#Start(a:command, a:options) + finally + let &l:shell = l:shell + let &l:shellcmdflag = l:shellcmdflag + endtry + + return l:job_id +endfunction + +" Send raw data to the job. +function! ale#job#SendRaw(job_id, string) abort + if has('nvim') + call jobsend(a:job_id, a:string) + else + let l:job = s:job_map[a:job_id].job + + if ch_status(l:job) is# 'open' + call ch_sendraw(job_getchannel(l:job), a:string) + endif + endif +endfunction + +" Given a job ID, return 1 if the job is currently running. +" Invalid job IDs will be ignored. +function! ale#job#IsRunning(job_id) abort + if has('nvim') + try + " In NeoVim, if the job isn't running, jobpid() will throw. + call jobpid(a:job_id) + + return 1 + catch + endtry + elseif has_key(s:job_map, a:job_id) + let l:job = s:job_map[a:job_id].job + + return job_status(l:job) is# 'run' + endif + + return 0 +endfunction + +function! ale#job#HasOpenChannel(job_id) abort + if ale#job#IsRunning(a:job_id) + if has('nvim') + " TODO: Implement a check for NeoVim. + return 1 + endif + + " Check if the Job's channel can be written to. + return ch_status(s:job_map[a:job_id].job) is# 'open' + endif + + return 0 +endfunction + +" Given a Job ID, stop that job. +" Invalid job IDs will be ignored. +function! ale#job#Stop(job_id) abort + if !has_key(s:job_map, a:job_id) + return + endif + + if has('nvim') + " FIXME: NeoVim kills jobs on a timer, but will not kill any processes + " which are child processes on Unix. Some work needs to be done to + " kill child processes to stop long-running processes like pylint. + silent! call jobstop(a:job_id) + else + let l:job = s:job_map[a:job_id].job + + " We must close the channel for reading the buffer if it is open + " when stopping a job. Otherwise, we will get errors in the status line. + if ch_status(job_getchannel(l:job)) is# 'open' + call ch_close_in(job_getchannel(l:job)) + endif + + " Ask nicely for the job to stop. + call job_stop(l:job) + + if ale#job#IsRunning(l:job) + " Set a 100ms delay for killing the job with SIGKILL. + let s:job_kill_timers[timer_start(100, function('s:KillHandler'))] = l:job + endif + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/julia.vim b/dot_vim/plugged/ale/autoload/ale/julia.vim new file mode 100644 index 0000000..18dd9ad --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/julia.vim @@ -0,0 +1,19 @@ +" Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com +" Description: Functions for integrating with Julia tools + +" Find the nearest dir containing a julia project +let s:__ale_julia_project_filenames = ['REQUIRE', 'Manifest.toml', 'Project.toml'] + +function! ale#julia#FindProjectRoot(buffer) abort + for l:project_filename in s:__ale_julia_project_filenames + let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) + + if !empty(l:full_path) + let l:path = fnamemodify(l:full_path, ':p:h') + + return l:path + endif + endfor + + return '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/linter.vim b/dot_vim/plugged/ale/autoload/ale/linter.vim new file mode 100644 index 0000000..d90deac --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/linter.vim @@ -0,0 +1,462 @@ +" Author: w0rp +" Description: Linter registration and lazy-loading +" Retrieves linters as requested by the engine, loading them if needed. + +let s:runtime_loaded_map = {} +let s:linters = {} + +" Default filetype aliases. +" The user defined aliases will be merged with this Dictionary. +" +" NOTE: Update the g:ale_linter_aliases documentation when modifying this. +let s:default_ale_linter_aliases = { +\ 'Dockerfile': 'dockerfile', +\ 'csh': 'sh', +\ 'javascriptreact': ['javascript', 'jsx'], +\ 'plaintex': 'tex', +\ 'ps1': 'powershell', +\ 'rmarkdown': 'r', +\ 'rmd': 'r', +\ 'systemverilog': 'verilog', +\ 'typescriptreact': ['typescript', 'tsx'], +\ 'vader': ['vim', 'vader'], +\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], +\ 'vimwiki': 'markdown', +\ 'vue': ['vue', 'javascript'], +\ 'xsd': ['xsd', 'xml'], +\ 'xslt': ['xslt', 'xml'], +\ 'zsh': 'sh', +\} + +" Default linters to run for particular filetypes. +" The user defined linter selections will be merged with this Dictionary. +" +" No linters are used for plaintext files by default. +" +" Only cargo and rls are enabled for Rust by default. +" rpmlint is disabled by default because it can result in code execution. +" hhast is disabled by default because it executes code in the project root. +" +" NOTE: Update the g:ale_linters documentation when modifying this. +let s:default_ale_linters = { +\ 'apkbuild': ['apkbuild_lint', 'secfixes_check'], +\ 'csh': ['shell'], +\ 'elixir': ['credo', 'dialyxir', 'dogma'], +\ 'go': ['gofmt', 'golint', 'gopls', 'govet'], +\ 'hack': ['hack'], +\ 'help': [], +\ 'inko': ['inko'], +\ 'json': ['jsonlint', 'spectral', 'vscodejson'], +\ 'json5': [], +\ 'jsonc': [], +\ 'perl': ['perlcritic'], +\ 'perl6': [], +\ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], +\ 'rust': ['cargo', 'rls'], +\ 'spec': [], +\ 'text': [], +\ 'vader': ['vimls'], +\ 'vue': ['eslint', 'vls'], +\ 'zsh': ['shell'], +\ 'v': ['v'], +\ 'yaml': ['spectral', 'yaml-language-server', 'yamllint'], +\} + +" Testing/debugging helper to unload all linters. +function! ale#linter#Reset() abort + let s:runtime_loaded_map = {} + let s:linters = {} +endfunction + +" Return a reference to the linters loaded. +" This is only for tests. +" Do not call this function. +function! ale#linter#GetLintersLoaded() abort + " This command will throw from the sandbox. + let &l:equalprg=&l:equalprg + + return s:linters +endfunction + +function! s:IsCallback(value) abort + return type(a:value) is v:t_string || type(a:value) is v:t_func +endfunction + +function! s:IsBoolean(value) abort + return type(a:value) is v:t_number && (a:value == 0 || a:value == 1) +endfunction + +function! ale#linter#PreProcess(filetype, linter) abort + if type(a:linter) isnot v:t_dict + throw 'The linter object must be a Dictionary' + endif + + let l:obj = { + \ 'name': get(a:linter, 'name'), + \ 'lsp': get(a:linter, 'lsp', ''), + \} + + if type(l:obj.name) isnot v:t_string + throw '`name` must be defined to name the linter' + endif + + let l:needs_address = l:obj.lsp is# 'socket' + let l:needs_executable = l:obj.lsp isnot# 'socket' + let l:needs_command = l:obj.lsp isnot# 'socket' + let l:needs_lsp_details = !empty(l:obj.lsp) + + if empty(l:obj.lsp) + let l:obj.callback = get(a:linter, 'callback') + + if !s:IsCallback(l:obj.callback) + throw '`callback` must be defined with a callback to accept output' + endif + endif + + if index(['', 'socket', 'stdio', 'tsserver'], l:obj.lsp) < 0 + throw '`lsp` must be either `''lsp''`, `''stdio''`, `''socket''` or `''tsserver''` if defined' + endif + + if !l:needs_executable + if has_key(a:linter, 'executable') + throw '`executable` cannot be used when lsp == ''socket''' + endif + elseif has_key(a:linter, 'executable') + let l:obj.executable = a:linter.executable + + if type(l:obj.executable) isnot v:t_string + \&& type(l:obj.executable) isnot v:t_func + throw '`executable` must be a String or Function if defined' + endif + else + throw '`executable` must be defined' + endif + + if !l:needs_command + if has_key(a:linter, 'command') + throw '`command` cannot be used when lsp == ''socket''' + endif + elseif has_key(a:linter, 'command') + let l:obj.command = a:linter.command + + if type(l:obj.command) isnot v:t_string + \&& type(l:obj.command) isnot v:t_func + throw '`command` must be a String or Function if defined' + endif + else + throw '`command` must be defined' + endif + + if !l:needs_address + if has_key(a:linter, 'address') + throw '`address` cannot be used when lsp != ''socket''' + endif + elseif has_key(a:linter, 'address') + if type(a:linter.address) isnot v:t_string + \&& type(a:linter.address) isnot v:t_func + throw '`address` must be a String or Function if defined' + endif + + let l:obj.address = a:linter.address + + if has_key(a:linter, 'cwd') + throw '`cwd` makes no sense for socket LSP connections' + endif + else + throw '`address` must be defined for getting the LSP address' + endif + + if has_key(a:linter, 'cwd') + let l:obj.cwd = a:linter.cwd + + if type(l:obj.cwd) isnot v:t_string + \&& type(l:obj.cwd) isnot v:t_func + throw '`cwd` must be a String or Function if defined' + endif + endif + + if l:needs_lsp_details + " Default to using the filetype as the language. + let l:obj.language = get(a:linter, 'language', a:filetype) + + if type(l:obj.language) isnot v:t_string + \&& type(l:obj.language) isnot v:t_func + throw '`language` must be a String or Function if defined' + endif + + if has_key(a:linter, 'project_root') + let l:obj.project_root = a:linter.project_root + + if type(l:obj.project_root) isnot v:t_string + \&& type(l:obj.project_root) isnot v:t_func + throw '`project_root` must be a String or Function' + endif + else + throw '`project_root` must be defined for LSP linters' + endif + + if has_key(a:linter, 'completion_filter') + let l:obj.completion_filter = a:linter.completion_filter + + if !s:IsCallback(l:obj.completion_filter) + throw '`completion_filter` must be a callback' + endif + endif + + if has_key(a:linter, 'initialization_options') + let l:obj.initialization_options = a:linter.initialization_options + + if type(l:obj.initialization_options) isnot v:t_dict + \&& type(l:obj.initialization_options) isnot v:t_func + throw '`initialization_options` must be a Dictionary or Function if defined' + endif + endif + + if has_key(a:linter, 'lsp_config') + if type(a:linter.lsp_config) isnot v:t_dict + \&& type(a:linter.lsp_config) isnot v:t_func + throw '`lsp_config` must be a Dictionary or Function if defined' + endif + + let l:obj.lsp_config = a:linter.lsp_config + endif + endif + + let l:obj.output_stream = get(a:linter, 'output_stream', 'stdout') + + if type(l:obj.output_stream) isnot v:t_string + \|| index(['stdout', 'stderr', 'both'], l:obj.output_stream) < 0 + throw "`output_stream` must be 'stdout', 'stderr', or 'both'" + endif + + " An option indicating that this linter should only be run against the + " file on disk. + let l:obj.lint_file = get(a:linter, 'lint_file', 0) + + if !s:IsBoolean(l:obj.lint_file) && type(l:obj.lint_file) isnot v:t_func + throw '`lint_file` must be `0`, `1`, or a Function' + endif + + " An option indicating that the buffer should be read. + let l:obj.read_buffer = get(a:linter, 'read_buffer', 1) + + if !s:IsBoolean(l:obj.read_buffer) + throw '`read_buffer` must be `0` or `1`' + endif + + let l:obj.aliases = get(a:linter, 'aliases', []) + + if type(l:obj.aliases) isnot v:t_list + \|| len(filter(copy(l:obj.aliases), 'type(v:val) isnot v:t_string')) > 0 + throw '`aliases` must be a List of String values' + endif + + return l:obj +endfunction + +function! ale#linter#Define(filetype, linter) abort + " This command will throw from the sandbox. + let &l:equalprg=&l:equalprg + + let l:new_linter = ale#linter#PreProcess(a:filetype, a:linter) + + if !has_key(s:linters, a:filetype) + let s:linters[a:filetype] = [] + endif + + " Remove previously defined linters with the same name. + call filter(s:linters[a:filetype], 'v:val.name isnot# a:linter.name') + call add(s:linters[a:filetype], l:new_linter) +endfunction + +" Prevent any linters from being loaded for a given filetype. +function! ale#linter#PreventLoading(filetype) abort + let s:runtime_loaded_map[a:filetype] = 1 +endfunction + +function! ale#linter#GetAll(filetypes) abort + " Don't return linters in the sandbox. + " Otherwise a sandboxed script could modify them. + if ale#util#InSandbox() + return [] + endif + + let l:combined_linters = [] + + for l:filetype in a:filetypes + " Load linters from runtimepath if we haven't done that yet. + if !has_key(s:runtime_loaded_map, l:filetype) + execute 'silent! runtime! ale_linters/' . l:filetype . '/*.vim' + + let s:runtime_loaded_map[l:filetype] = 1 + endif + + call extend(l:combined_linters, get(s:linters, l:filetype, [])) + endfor + + return l:combined_linters +endfunction + +function! s:GetAliasedFiletype(original_filetype) abort + let l:buffer_aliases = get(b:, 'ale_linter_aliases', {}) + + " b:ale_linter_aliases can be set to a List or String. + if type(l:buffer_aliases) is v:t_list + \|| type(l:buffer_aliases) is v:t_string + return l:buffer_aliases + endif + + " Check for aliased filetypes first in a buffer variable, + " then the global variable, + " then in the default mapping, + " otherwise use the original filetype. + for l:dict in [ + \ l:buffer_aliases, + \ g:ale_linter_aliases, + \ s:default_ale_linter_aliases, + \] + if has_key(l:dict, a:original_filetype) + return l:dict[a:original_filetype] + endif + endfor + + return a:original_filetype +endfunction + +function! ale#linter#ResolveFiletype(original_filetype) abort + let l:filetype = s:GetAliasedFiletype(a:original_filetype) + + if type(l:filetype) isnot v:t_list + return [l:filetype] + endif + + return l:filetype +endfunction + +function! s:GetLinterNames(original_filetype) abort + let l:buffer_ale_linters = get(b:, 'ale_linters', {}) + + " b:ale_linters can be set to 'all' + if l:buffer_ale_linters is# 'all' + return 'all' + endif + + " b:ale_linters can be set to a List. + if type(l:buffer_ale_linters) is v:t_list + return l:buffer_ale_linters + endif + + " Try to get a buffer-local setting for the filetype + if has_key(l:buffer_ale_linters, a:original_filetype) + return l:buffer_ale_linters[a:original_filetype] + endif + + " Try to get a global setting for the filetype + if has_key(g:ale_linters, a:original_filetype) + return g:ale_linters[a:original_filetype] + endif + + " If the user has configured ALE to only enable linters explicitly, then + " don't enable any linters by default. + if g:ale_linters_explicit + return [] + endif + + " Try to get a default setting for the filetype + if has_key(s:default_ale_linters, a:original_filetype) + return s:default_ale_linters[a:original_filetype] + endif + + return 'all' +endfunction + +function! ale#linter#Get(original_filetypes) abort + let l:possibly_duplicated_linters = [] + + " Handle dot-separated filetypes. + for l:original_filetype in split(a:original_filetypes, '\.') + let l:filetype = ale#linter#ResolveFiletype(l:original_filetype) + let l:linter_names = s:GetLinterNames(l:original_filetype) + let l:all_linters = ale#linter#GetAll(l:filetype) + let l:filetype_linters = [] + + if type(l:linter_names) is v:t_string && l:linter_names is# 'all' + let l:filetype_linters = l:all_linters + elseif type(l:linter_names) is v:t_list + " Select only the linters we or the user has specified. + for l:linter in l:all_linters + let l:name_list = [l:linter.name] + l:linter.aliases + + for l:name in l:name_list + if index(l:linter_names, l:name) >= 0 + call add(l:filetype_linters, l:linter) + break + endif + endfor + endfor + endif + + call extend(l:possibly_duplicated_linters, l:filetype_linters) + endfor + + let l:name_list = [] + let l:combined_linters = [] + + " Make sure we override linters so we don't get two with the same name, + " like 'eslint' for both 'javascript' and 'typescript' + " + " Note that the reverse calls here modify the List variables. + for l:linter in reverse(l:possibly_duplicated_linters) + if index(l:name_list, l:linter.name) < 0 + call add(l:name_list, l:linter.name) + call add(l:combined_linters, l:linter) + endif + endfor + + return reverse(l:combined_linters) +endfunction + +function! ale#linter#RemoveIgnored(buffer, filetype, linters) abort + " Apply ignore lists for linters only if needed. + let l:ignore_config = ale#Var(a:buffer, 'linters_ignore') + let l:disable_lsp = ale#Var(a:buffer, 'disable_lsp') + + return !empty(l:ignore_config) || l:disable_lsp + \ ? ale#engine#ignore#Exclude(a:filetype, a:linters, l:ignore_config, l:disable_lsp) + \ : a:linters +endfunction + +" Given a buffer and linter, get the executable String for the linter. +function! ale#linter#GetExecutable(buffer, linter) abort + let l:Executable = a:linter.executable + + return type(l:Executable) is v:t_func + \ ? l:Executable(a:buffer) + \ : l:Executable +endfunction + +function! ale#linter#GetCwd(buffer, linter) abort + let l:Cwd = get(a:linter, 'cwd', v:null) + + return type(l:Cwd) is v:t_func ? l:Cwd(a:buffer) : l:Cwd +endfunction + +" Given a buffer and linter, get the command String for the linter. +function! ale#linter#GetCommand(buffer, linter) abort + let l:Command = a:linter.command + + return type(l:Command) is v:t_func ? l:Command(a:buffer) : l:Command +endfunction + +" Given a buffer and linter, get the address for connecting to the server. +function! ale#linter#GetAddress(buffer, linter) abort + let l:Address = a:linter.address + + return type(l:Address) is v:t_func ? l:Address(a:buffer) : l:Address +endfunction + +function! ale#linter#GetLanguage(buffer, linter) abort + let l:Language = a:linter.language + + return type(l:Language) is v:t_func ? l:Language(a:buffer) : l:Language +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/list.vim b/dot_vim/plugged/ale/autoload/ale/list.vim new file mode 100644 index 0000000..8ce8597 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/list.vim @@ -0,0 +1,274 @@ +" Author: Bjorn Neergaard , modified by Yann fery +" Description: Manages the loclist and quickfix lists + +" This flag dictates if ale open the configured loclist +let g:ale_open_list = get(g:, 'ale_open_list', 0) +" This flag dictates if ale keeps open loclist even if there is no error in loclist +let g:ale_keep_list_window_open = get(g:, 'ale_keep_list_window_open', 0) +" This flag dictates that quickfix windows should be opened vertically +let g:ale_list_vertical = get(g:, 'ale_list_vertical', 0) +" The window size to set for the quickfix and loclist windows +let g:ale_list_window_size = get(g:, 'ale_list_window_size', 10) +" A string format for the loclist messages. +let g:ale_loclist_msg_format = get(g:, 'ale_loclist_msg_format', +\ get(g:, 'ale_echo_msg_format', '%code: %%s') +\) + +if !exists('s:timer_args') + let s:timer_args = {} +endif + +" Return 1 if there is a buffer with buftype == 'quickfix' in buffer list +function! ale#list#IsQuickfixOpen() abort + let l:res = getqflist({ 'winid' : winnr() }) + + if has_key(l:res, 'winid') && l:res.winid > 0 + return 1 + endif + + let l:res = getloclist(0, { 'winid' : winnr() }) + + if has_key(l:res, 'winid') && l:res.winid > 0 + return 1 + endif + + return 0 +endfunction + +" Check if we should open the list, based on the save event being fired, and +" that setting being on, or that the error count is at least as high as the +" setting when set to an integer value. +function! s:ShouldOpen(buffer, loclist_len) abort + let l:val = ale#Var(a:buffer, 'open_list') + let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0) + + return l:val > 0 ? a:loclist_len >= l:val : l:val is# 'on_save' && l:saved +endfunction + +" Check if we should close the list, based on the save event being fired, and +" that setting being on, or the setting just being set to an integer value. +function! s:ShouldClose(buffer) abort + let l:val = ale#Var(a:buffer, 'open_list') + let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0) + + return !((l:val >= 1) || (l:val is# 'on_save' && l:saved)) +endfunction + +function! s:Deduplicate(list) abort + let l:list = a:list + + call sort(l:list, function('ale#util#LocItemCompareWithText')) + call uniq(l:list, function('ale#util#LocItemCompareWithText')) + + return l:list +endfunction + +function! ale#list#GetCombinedList() abort + let l:list = [] + + for l:info in values(g:ale_buffer_info) + call extend(l:list, l:info.loclist) + endfor + + return s:Deduplicate(l:list) +endfunction + +function! s:FixList(buffer, list) abort + let l:format = ale#Var(a:buffer, 'loclist_msg_format') + let l:new_list = [] + + for l:item in a:list + let l:fixed_item = copy(l:item) + + let l:fixed_item.text = ale#GetLocItemMessage(l:item, l:format) + + if l:item.bufnr == -1 + " If the buffer number is invalid, remove it. + call remove(l:fixed_item, 'bufnr') + endif + + call add(l:new_list, l:fixed_item) + endfor + + return l:new_list +endfunction + +function! s:WinFindBuf(buffer) abort + return exists('*win_findbuf') ? win_findbuf(str2nr(a:buffer)) : [0] +endfunction + +function! s:SetListsImpl(timer_id, buffer, loclist) abort + let l:title = expand('#' . a:buffer . ':p') + + if g:ale_set_quickfix + let l:quickfix_list = ale#list#GetCombinedList() + + if has('nvim') + call setqflist(s:FixList(a:buffer, l:quickfix_list), ' ', l:title) + else + call setqflist(s:FixList(a:buffer, l:quickfix_list)) + call setqflist([], 'r', {'title': l:title}) + endif + elseif g:ale_set_loclist + " If windows support is off, win_findbuf() may not exist. + " We'll set result in the current window, which might not be correct, + " but it's better than nothing. + let l:ids = s:WinFindBuf(a:buffer) + + let l:loclist = s:Deduplicate(a:loclist) + + for l:id in l:ids + if has('nvim') + call setloclist(l:id, s:FixList(a:buffer, l:loclist), ' ', l:title) + else + call setloclist(l:id, s:FixList(a:buffer, l:loclist)) + call setloclist(l:id, [], 'r', {'title': l:title}) + endif + endfor + endif + + " Save the current view before opening/closing any window + call setbufvar(a:buffer, 'ale_winview', winsaveview()) + + " Open a window to show the problems if we need to. + " + " ShouldOpen() checks if the current buffer has enough problems to be + " opened. + if s:ShouldOpen(a:buffer, len(a:loclist)) + let l:winnr = winnr() + let l:mode = mode() + + " open windows vertically instead of default horizontally + let l:open_type = '' + + if ale#Var(a:buffer, 'list_vertical') == 1 + let l:open_type = 'vert rightbelow ' + endif + + if g:ale_set_quickfix + if !ale#list#IsQuickfixOpen() + silent! execute l:open_type . 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) + endif + elseif g:ale_set_loclist + silent! execute l:open_type . 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) + endif + + " If focus changed, restore it (jump to the last window). + if l:winnr isnot# winnr() + wincmd p + endif + + " Return to original mode when applicable + if mode() != l:mode + if l:mode is? 'v' || l:mode is# "\" + " Reset our last visual selection + normal! gv + elseif l:mode is? 's' || l:mode is# "\" + " Reset our last character selection + normal! "\" + endif + endif + + call s:RestoreViewIfNeeded(a:buffer) + endif + + " If ALE isn't currently checking for more problems, close the window if + " needed now. This check happens inside of this timer function, so + " the window can be closed reliably. + if !ale#engine#IsCheckingBuffer(a:buffer) + call s:CloseWindowIfNeeded(a:buffer) + endif +endfunction + +" Try to restore the window view after closing any of the lists to avoid making +" the it moving around, especially useful when on insert mode +function! s:RestoreViewIfNeeded(buffer) abort + let l:saved_view = getbufvar(a:buffer, 'ale_winview', {}) + + " Saved view is empty, can't do anything + if empty(l:saved_view) + return + endif + + " Check whether the cursor has moved since linting was actually requested. If + " the user has indeed moved lines, do nothing + let l:current_view = winsaveview() + + if l:current_view['lnum'] != l:saved_view['lnum'] + return + endif + + " Anchor view by topline if the list is set to open horizontally + if ale#Var(a:buffer, 'list_vertical') == 0 + call winrestview({'topline': l:saved_view['topline']}) + endif +endfunction + +function! ale#list#SetLists(buffer, loclist) abort + if get(g:, 'ale_set_lists_synchronously') == 1 + \|| getbufvar(a:buffer, 'ale_save_event_fired', 0) + " Update lists immediately if running a test synchronously, or if the + " buffer was saved. + " + " The lists need to be updated immediately when saving a buffer so + " that we can reliably close window automatically, if so configured. + call s:SetListsImpl(-1, a:buffer, a:loclist) + else + call ale#util#StartPartialTimer( + \ 0, + \ function('s:SetListsImpl'), + \ [a:buffer, a:loclist], + \) + endif +endfunction + +function! ale#list#ForcePopulateErrorList(populate_quickfix) abort + let l:quickfix_bak = g:ale_set_quickfix + let g:ale_set_quickfix = a:populate_quickfix + let l:loclist_bak = g:ale_set_loclist + let g:ale_set_loclist = !a:populate_quickfix + let l:open_list_bak = g:ale_open_list + let g:ale_open_list = 1 + + let l:buffer = bufnr('') + let l:loclist = get(g:ale_buffer_info, l:buffer, {'loclist': []}).loclist + call s:SetListsImpl(-1, l:buffer, l:loclist) + + let g:ale_open_list = l:open_list_bak + let g:ale_set_loclist = l:loclist_bak + let g:ale_set_quickfix = l:quickfix_bak +endfunction + +function! s:CloseWindowIfNeeded(buffer) abort + if ale#Var(a:buffer, 'keep_list_window_open') || s:ShouldClose(a:buffer) + return + endif + + let l:did_close_any_list = 0 + + try + " Only close windows if the quickfix list or loclist is completely empty, + " including errors set through other means. + if g:ale_set_quickfix + if empty(getqflist()) + cclose + let l:did_close_any_list = 1 + endif + else + let l:win_ids = s:WinFindBuf(a:buffer) + + for l:win_id in l:win_ids + if g:ale_set_loclist && empty(getloclist(l:win_id)) + lclose + let l:did_close_any_list = 1 + endif + endfor + endif + " Ignore 'Cannot close last window' errors. + catch /E444/ + endtry + + if l:did_close_any_list + call s:RestoreViewIfNeeded(a:buffer) + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/loclist_jumping.vim b/dot_vim/plugged/ale/autoload/ale/loclist_jumping.vim new file mode 100644 index 0000000..55097d1 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/loclist_jumping.vim @@ -0,0 +1,163 @@ +" Author: w0rp +" Description: This file implements functions for jumping around in a file +" based on ALE's internal loclist. + +" Search for the nearest line either before or after the current position +" in the loclist. The argument 'wrap' can be passed to enable wrapping +" around the end of the list. +" +" If there are no items or we have hit the end with wrapping off, an empty +" List will be returned, otherwise a pair of [line_number, column_number] will +" be returned. +function! ale#loclist_jumping#FindNearest(direction, wrap, ...) abort + let l:buffer = bufnr('') + let l:pos = getpos('.') + let l:info = get(g:ale_buffer_info, bufnr('%'), {'loclist': []}) + " Copy the list and filter to only the items in this buffer. + let l:loclist = filter(copy(l:info.loclist), 'v:val.bufnr == l:buffer') + let l:search_item = {'bufnr': l:buffer, 'lnum': l:pos[1], 'col': l:pos[2]} + + if a:0 > 0 + let l:filter = a:1 + else + let l:filter = 'any' + endif + + if a:0 > 1 + let l:subtype_filter = a:2 + else + let l:subtype_filter = 'any' + endif + + " When searching backwards, so we can find the next smallest match. + if a:direction is# 'before' + call reverse(l:loclist) + endif + + " Look for items before or after the current position. + for l:item in l:loclist + " Compare the cursor with a item where the column number is bounded, + " such that it's possible for the cursor to actually be on the given + " column number, without modifying the cursor number we return. This + " will allow us to move through matches, but still let us move the + " cursor to a line without changing the column, in some cases. + let l:cmp_value = ale#util#LocItemCompare( + \ { + \ 'bufnr': l:buffer, + \ 'lnum': l:item.lnum, + \ 'col': min([ + \ max([l:item.col, 1]), + \ max([len(getline(l:item.lnum)), 1]), + \ ]), + \ }, + \ l:search_item + \) + + if (l:filter is# 'any' || l:filter is# l:item.type) + \&& ( + \ l:subtype_filter is# 'any' + \ || l:subtype_filter is# get(l:item, 'sub_type', '') + \) + + if a:direction is# 'before' && l:cmp_value < 0 + return [l:item.lnum, l:item.col] + endif + + if a:direction is# 'after' && l:cmp_value > 0 + return [l:item.lnum, l:item.col] + endif + endif + endfor + + " If we found nothing, and the wrap option is set to 1, then we should + " wrap around the list of warnings/errors + if a:wrap + for l:item in l:loclist + if (l:filter is# 'any' || l:filter is# l:item.type) + \&& ( + \ l:subtype_filter is# 'any' + \ || l:subtype_filter is# get(l:item, 'sub_type', '') + \) + return [l:item.lnum, l:item.col] + endif + endfor + endif + + return [] +endfunction + +" As before, find the nearest match, but position the cursor at it. +function! ale#loclist_jumping#Jump(direction, ...) abort + if a:0 > 0 + let l:wrap = a:1 + else + let l:wrap = 0 + endif + + if a:0 > 1 + let l:filter = a:2 + else + let l:filter = 'any' + endif + + if a:0 > 2 + let l:subtype_filter = a:3 + else + let l:subtype_filter = 'any' + endif + + let l:nearest = ale#loclist_jumping#FindNearest(a:direction, + \ l:wrap, l:filter, l:subtype_filter) + + if !empty(l:nearest) + normal! m` + call cursor([l:nearest[0], max([l:nearest[1], 1])]) + endif +endfunction + +function! ale#loclist_jumping#WrapJump(direction, sargs) abort + let [l:args, l:rest] = ale#args#Parse(['error', 'warning', 'info', 'wrap', + \ 'style', 'nostyle'], a:sargs) + + let l:wrap = 0 + let l:type_filter = 'any' + let l:subtype_filter = 'any' + + if get(l:args, 'wrap', 'nil') is# '' + let l:wrap = 1 + endif + + if get(l:args, 'error', 'nil') is# '' + let l:type_filter = 'E' + elseif get(l:args, 'warning', 'nil') is# '' + let l:type_filter = 'W' + elseif get(l:args, 'info', 'nil') is# '' + let l:type_filter = 'I' + endif + + if get(l:args, 'nostyle', 'nil') is# '' + let l:subtype_filter = 'style' + elseif get(l:args, 'style', 'nil') is# '' + let l:subtype_filter = '' + endif + + call ale#loclist_jumping#Jump(a:direction, l:wrap, l:type_filter, + \ l:subtype_filter) +endfunction + +function! ale#loclist_jumping#JumpToIndex(index) abort + let l:buffer = bufnr('') + let l:info = get(g:ale_buffer_info, l:buffer, {'loclist': []}) + let l:loclist = filter(copy(l:info.loclist), 'v:val.bufnr == l:buffer') + + if empty(l:loclist) + return + endif + + let l:item = l:loclist[a:index] + + if !empty(l:item) + normal! m` + call cursor([l:item.lnum, l:item.col]) + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp.vim b/dot_vim/plugged/ale/autoload/ale/lsp.vim new file mode 100644 index 0000000..daaed6f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp.vim @@ -0,0 +1,718 @@ +" Author: w0rp +" Description: Language Server Protocol client code + +" A Dictionary for tracking connections. +let s:connections = get(s:, 'connections', {}) +let g:ale_lsp_next_message_id = 1 + +" Given an id, which can be an executable or address, and a project path, +" create a new connection if needed. Return a unique ID for the connection. +function! ale#lsp#Register(executable_or_address, project, init_options) abort + let l:conn_id = a:executable_or_address . ':' . a:project + + if !has_key(s:connections, l:conn_id) + " is_tsserver: 1 if the connection is for tsserver. + " data: The message data received so far. + " root: The project root. + " open_documents: A Dictionary mapping buffers to b:changedtick, keeping + " track of when documents were opened, and when we last changed them. + " initialized: 0 if the connection is ready, 1 otherwise. + " init_request_id: The ID for the init request. + " init_options: Options to send to the server. + " config: Configuration settings to send to the server. + " callback_list: A list of callbacks for handling LSP responses. + " capabilities_queue: The list of callbacks to call with capabilities. + " capabilities: Features the server supports. + let s:connections[l:conn_id] = { + \ 'id': l:conn_id, + \ 'is_tsserver': 0, + \ 'data': '', + \ 'root': a:project, + \ 'open_documents': {}, + \ 'initialized': 0, + \ 'init_request_id': 0, + \ 'init_options': a:init_options, + \ 'config': {}, + \ 'callback_list': [], + \ 'init_queue': [], + \ 'capabilities': { + \ 'hover': 0, + \ 'rename': 0, + \ 'filerename': 0, + \ 'references': 0, + \ 'completion': 0, + \ 'completion_trigger_characters': [], + \ 'definition': 0, + \ 'typeDefinition': 0, + \ 'implementation': 0, + \ 'symbol_search': 0, + \ 'code_actions': 0, + \ 'did_save': 0, + \ 'includeText': 0, + \ }, + \} + endif + + return l:conn_id +endfunction + +" Remove an LSP connection with a given ID. This is only for tests. +function! ale#lsp#RemoveConnectionWithID(id) abort + if has_key(s:connections, a:id) + call remove(s:connections, a:id) + endif +endfunction + +function! ale#lsp#ResetConnections() abort + let s:connections = {} +endfunction + +" Used only in tests. +function! ale#lsp#GetConnections() abort + " This command will throw from the sandbox. + let &l:equalprg=&l:equalprg + + return s:connections +endfunction + +" This is only needed for tests +function! ale#lsp#MarkDocumentAsOpen(id, buffer) abort + let l:conn = get(s:connections, a:id, {}) + + if !empty(l:conn) + let l:conn.open_documents[a:buffer] = -1 + endif +endfunction + +function! ale#lsp#GetNextMessageID() abort + " Use the current ID + let l:id = g:ale_lsp_next_message_id + + " Increment the ID variable. + let g:ale_lsp_next_message_id += 1 + + " When the ID overflows, reset it to 1. By the time we hit the initial ID + " again, the messages will be long gone. + if g:ale_lsp_next_message_id < 1 + let g:ale_lsp_next_message_id = 1 + endif + + return l:id +endfunction + +" TypeScript messages use a different format. +function! s:CreateTSServerMessageData(message) abort + let l:is_notification = a:message[0] + + let l:obj = { + \ 'seq': v:null, + \ 'type': 'request', + \ 'command': a:message[1][3:], + \} + + if !l:is_notification + let l:obj.seq = ale#lsp#GetNextMessageID() + endif + + if len(a:message) > 2 + let l:obj.arguments = a:message[2] + endif + + let l:data = json_encode(l:obj) . "\n" + + return [l:is_notification ? 0 : l:obj.seq, l:data] +endfunction + +" Given a List of one or two items, [method_name] or [method_name, params], +" return a List containing [message_id, message_data] +function! ale#lsp#CreateMessageData(message) abort + if a:message[1][:2] is# 'ts@' + return s:CreateTSServerMessageData(a:message) + endif + + let l:is_notification = a:message[0] + + let l:obj = { + \ 'method': a:message[1], + \ 'jsonrpc': '2.0', + \} + + if !l:is_notification + let l:obj.id = ale#lsp#GetNextMessageID() + endif + + if len(a:message) > 2 + let l:obj.params = a:message[2] + endif + + let l:body = json_encode(l:obj) + let l:data = 'Content-Length: ' . strlen(l:body) . "\r\n\r\n" . l:body + + return [l:is_notification ? 0 : l:obj.id, l:data] +endfunction + +function! ale#lsp#ReadMessageData(data) abort + let l:response_list = [] + let l:remainder = a:data + + while 1 + " Look for the end of the HTTP headers + let l:body_start_index = matchend(l:remainder, "\r\n\r\n") + + if l:body_start_index < 0 + " No header end was found yet. + break + endif + + " Parse the Content-Length header. + let l:header_data = l:remainder[:l:body_start_index - 4] + let l:length_match = matchlist( + \ l:header_data, + \ '\vContent-Length: *(\d+)' + \) + + if empty(l:length_match) + throw "Invalid JSON-RPC header:\n" . l:header_data + endif + + " Split the body and the remainder of the text. + let l:remainder_start_index = l:body_start_index + str2nr(l:length_match[1]) + + if len(l:remainder) < l:remainder_start_index + " We don't have enough data yet. + break + endif + + let l:body = l:remainder[l:body_start_index : l:remainder_start_index - 1] + let l:remainder = l:remainder[l:remainder_start_index :] + + " Parse the JSON object and add it to the list. + call add(l:response_list, json_decode(l:body)) + endwhile + + return [l:remainder, l:response_list] +endfunction + +" Update capabilities from the server, so we know which features the server +" supports. +function! s:UpdateCapabilities(conn, capabilities) abort + if type(a:capabilities) isnot v:t_dict + return + endif + + if get(a:capabilities, 'hoverProvider') is v:true + let a:conn.capabilities.hover = 1 + endif + + if type(get(a:capabilities, 'hoverProvider')) is v:t_dict + let a:conn.capabilities.hover = 1 + endif + + if get(a:capabilities, 'referencesProvider') is v:true + let a:conn.capabilities.references = 1 + endif + + if type(get(a:capabilities, 'referencesProvider')) is v:t_dict + let a:conn.capabilities.references = 1 + endif + + if get(a:capabilities, 'renameProvider') is v:true + let a:conn.capabilities.rename = 1 + endif + + if type(get(a:capabilities, 'renameProvider')) is v:t_dict + let a:conn.capabilities.rename = 1 + endif + + if get(a:capabilities, 'codeActionProvider') is v:true + let a:conn.capabilities.code_actions = 1 + endif + + if type(get(a:capabilities, 'codeActionProvider')) is v:t_dict + let a:conn.capabilities.code_actions = 1 + endif + + if !empty(get(a:capabilities, 'completionProvider')) + let a:conn.capabilities.completion = 1 + endif + + if type(get(a:capabilities, 'completionProvider')) is v:t_dict + let l:chars = get(a:capabilities.completionProvider, 'triggerCharacters') + + if type(l:chars) is v:t_list + let a:conn.capabilities.completion_trigger_characters = l:chars + endif + endif + + if get(a:capabilities, 'definitionProvider') is v:true + let a:conn.capabilities.definition = 1 + endif + + if type(get(a:capabilities, 'definitionProvider')) is v:t_dict + let a:conn.capabilities.definition = 1 + endif + + if get(a:capabilities, 'typeDefinitionProvider') is v:true + let a:conn.capabilities.typeDefinition = 1 + endif + + if type(get(a:capabilities, 'typeDefinitionProvider')) is v:t_dict + let a:conn.capabilities.typeDefinition = 1 + endif + + if get(a:capabilities, 'implementationProvider') is v:true + let a:conn.capabilities.implementation = 1 + endif + + if type(get(a:capabilities, 'implementationProvider')) is v:t_dict + let a:conn.capabilities.implementation = 1 + endif + + if get(a:capabilities, 'workspaceSymbolProvider') is v:true + let a:conn.capabilities.symbol_search = 1 + endif + + if type(get(a:capabilities, 'workspaceSymbolProvider')) is v:t_dict + let a:conn.capabilities.symbol_search = 1 + endif + + if type(get(a:capabilities, 'textDocumentSync')) is v:t_dict + let l:syncOptions = get(a:capabilities, 'textDocumentSync') + + if get(l:syncOptions, 'save') is v:true + let a:conn.capabilities.did_save = 1 + endif + + if type(get(l:syncOptions, 'save')) is v:t_dict + let a:conn.capabilities.did_save = 1 + + let l:saveOptions = get(l:syncOptions, 'save') + + if get(l:saveOptions, 'includeText') is v:true + let a:conn.capabilities.includeText = 1 + endif + endif + endif +endfunction + +" Update a connection's configuration dictionary and notify LSP servers +" of any changes since the last update. Returns 1 if a configuration +" update was sent; otherwise 0 will be returned. +function! ale#lsp#UpdateConfig(conn_id, buffer, config) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if empty(l:conn) || a:config ==# l:conn.config " no-custom-checks + return 0 + endif + + let l:conn.config = a:config + let l:message = ale#lsp#message#DidChangeConfiguration(a:buffer, a:config) + + call ale#lsp#Send(a:conn_id, l:message) + + return 1 +endfunction + + +function! ale#lsp#HandleInitResponse(conn, response) abort + if get(a:response, 'method', '') is# 'initialize' + let a:conn.initialized = 1 + elseif type(get(a:response, 'result')) is v:t_dict + \&& has_key(a:response.result, 'capabilities') + call s:UpdateCapabilities(a:conn, a:response.result.capabilities) + + let a:conn.initialized = 1 + endif + + if !a:conn.initialized + return + endif + + " The initialized message must be sent before everything else. + call ale#lsp#Send(a:conn.id, ale#lsp#message#Initialized()) + + " Call capabilities callbacks queued for the project. + for l:Callback in a:conn.init_queue + call l:Callback() + endfor + + let a:conn.init_queue = [] +endfunction + +function! ale#lsp#HandleMessage(conn_id, message) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if empty(l:conn) + return + endif + + if type(a:message) isnot v:t_string + " Ignore messages that aren't strings. + return + endif + + let l:conn.data .= a:message + + " Parse the objects now if we can, and keep the remaining text. + let [l:conn.data, l:response_list] = ale#lsp#ReadMessageData(l:conn.data) + + " Look for initialize responses first. + if !l:conn.initialized + for l:response in l:response_list + call ale#lsp#HandleInitResponse(l:conn, l:response) + endfor + endif + + " If the connection is marked as initialized, call the callbacks with the + " responses. + if l:conn.initialized + for l:response in l:response_list + " Call all of the registered handlers with the response. + for l:Callback in l:conn.callback_list + call ale#util#GetFunction(l:Callback)(a:conn_id, l:response) + endfor + endfor + endif +endfunction + +" Given a connection ID, mark it as a tsserver connection, so it will be +" handled that way. +function! ale#lsp#MarkConnectionAsTsserver(conn_id) abort + let l:conn = s:connections[a:conn_id] + let l:conn.is_tsserver = 1 + let l:conn.initialized = 1 + " Set capabilities which are supported by tsserver. + let l:conn.capabilities.hover = 1 + let l:conn.capabilities.references = 1 + let l:conn.capabilities.completion = 1 + let l:conn.capabilities.completion_trigger_characters = ['.'] + let l:conn.capabilities.definition = 1 + let l:conn.capabilities.typeDefinition = 1 + let l:conn.capabilities.implementation = 1 + let l:conn.capabilities.symbol_search = 1 + let l:conn.capabilities.rename = 1 + let l:conn.capabilities.filerename = 1 + let l:conn.capabilities.code_actions = 1 +endfunction + +function! s:SendInitMessage(conn) abort + let [l:init_id, l:init_data] = ale#lsp#CreateMessageData( + \ ale#lsp#message#Initialize( + \ a:conn.root, + \ a:conn.init_options, + \ { + \ 'workspace': { + \ 'applyEdit': v:false, + \ 'didChangeConfiguration': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'symbol': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'workspaceFolders': v:false, + \ 'configuration': v:false, + \ }, + \ 'textDocument': { + \ 'synchronization': { + \ 'dynamicRegistration': v:false, + \ 'willSave': v:false, + \ 'willSaveWaitUntil': v:false, + \ 'didSave': v:true, + \ }, + \ 'completion': { + \ 'dynamicRegistration': v:false, + \ 'completionItem': { + \ 'snippetSupport': v:false, + \ 'commitCharactersSupport': v:false, + \ 'documentationFormat': ['plaintext'], + \ 'deprecatedSupport': v:false, + \ 'preselectSupport': v:false, + \ }, + \ 'contextSupport': v:false, + \ }, + \ 'hover': { + \ 'dynamicRegistration': v:false, + \ 'contentFormat': ['plaintext'], + \ }, + \ 'references': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'documentSymbol': { + \ 'dynamicRegistration': v:false, + \ 'hierarchicalDocumentSymbolSupport': v:false, + \ }, + \ 'definition': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, + \ 'typeDefinition': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'implementation': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, + \ 'publishDiagnostics': { + \ 'relatedInformation': v:true, + \ }, + \ 'codeAction': { + \ 'dynamicRegistration': v:false, + \ 'codeActionLiteralSupport': { + \ 'codeActionKind': { + \ 'valueSet': [] + \ } + \ } + \ }, + \ 'rename': { + \ 'dynamicRegistration': v:false, + \ }, + \ }, + \ }, + \ ), + \) + let a:conn.init_request_id = l:init_id + call s:SendMessageData(a:conn, l:init_data) +endfunction + +" Start a program for LSP servers. +" +" 1 will be returned if the program is running, or 0 if the program could +" not be started. +function! ale#lsp#StartProgram(conn_id, executable, command) abort + let l:conn = s:connections[a:conn_id] + let l:started = 0 + + if !has_key(l:conn, 'job_id') || !ale#job#HasOpenChannel(l:conn.job_id) + let l:options = { + \ 'mode': 'raw', + \ 'out_cb': {_, message -> ale#lsp#HandleMessage(a:conn_id, message)}, + \ 'exit_cb': { -> ale#lsp#Stop(a:conn_id) }, + \} + + if has('win32') + let l:job_id = ale#job#StartWithCmd(a:command, l:options) + else + let l:job_id = ale#job#Start(a:command, l:options) + endif + + let l:started = 1 + else + let l:job_id = l:conn.job_id + endif + + if l:job_id > 0 + let l:conn.job_id = l:job_id + endif + + if l:started && !l:conn.is_tsserver + let l:conn.initialized = 0 + call s:SendInitMessage(l:conn) + endif + + return l:job_id > 0 +endfunction + +" Connect to an LSP server via TCP. +" +" 1 will be returned if the connection is running, or 0 if the connection could +" not be opened. +function! ale#lsp#ConnectToAddress(conn_id, address) abort + let l:conn = s:connections[a:conn_id] + let l:started = 0 + + if !has_key(l:conn, 'channel_id') || !ale#socket#IsOpen(l:conn.channel_id) + let l:channel_id = ale#socket#Open(a:address, { + \ 'callback': {_, mess -> ale#lsp#HandleMessage(a:conn_id, mess)}, + \}) + + let l:started = 1 + else + let l:channel_id = l:conn.channel_id + endif + + if l:channel_id >= 0 + let l:conn.channel_id = l:channel_id + endif + + if l:started + call s:SendInitMessage(l:conn) + endif + + return l:channel_id >= 0 +endfunction + +" Given a connection ID and a callback, register that callback for handling +" messages if the connection exists. +function! ale#lsp#RegisterCallback(conn_id, callback) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if !empty(l:conn) + " Add the callback to the List if it's not there already. + call uniq(sort(add(l:conn.callback_list, a:callback))) + endif +endfunction + +" Stop a single LSP connection. +function! ale#lsp#Stop(conn_id) abort + if has_key(s:connections, a:conn_id) + let l:conn = remove(s:connections, a:conn_id) + + if has_key(l:conn, 'channel_id') + call ale#socket#Close(l:conn.channel_id) + elseif has_key(l:conn, 'job_id') + call ale#job#Stop(l:conn.job_id) + endif + endif +endfunction + +function! ale#lsp#CloseDocument(conn_id) abort +endfunction + +" Stop all LSP connections, closing all jobs and channels, and removing any +" queued messages. +function! ale#lsp#StopAll() abort + for l:conn_id in keys(s:connections) + call ale#lsp#Stop(l:conn_id) + endfor +endfunction + +function! s:SendMessageData(conn, data) abort + if has_key(a:conn, 'job_id') + call ale#job#SendRaw(a:conn.job_id, a:data) + elseif has_key(a:conn, 'channel_id') && ale#socket#IsOpen(a:conn.channel_id) + " Send the message to the server + call ale#socket#Send(a:conn.channel_id, a:data) + else + return 0 + endif + + return 1 +endfunction + +" Send a message to an LSP server. +" Notifications do not need to be handled. +" +" Returns -1 when a message is sent, but no response is expected +" 0 when the message is not sent and +" >= 1 with the message ID when a response is expected. +function! ale#lsp#Send(conn_id, message) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if empty(l:conn) + return 0 + endif + + if !l:conn.initialized + throw 'LSP server not initialized yet!' + endif + + let [l:id, l:data] = ale#lsp#CreateMessageData(a:message) + call s:SendMessageData(l:conn, l:data) + + return l:id == 0 ? -1 : l:id +endfunction + +" Notify LSP servers or tsserver if a document is opened, if needed. +" If a document is opened, 1 will be returned, otherwise 0 will be returned. +function! ale#lsp#OpenDocument(conn_id, buffer, language_id) abort + let l:conn = get(s:connections, a:conn_id, {}) + let l:opened = 0 + + if !empty(l:conn) && !has_key(l:conn.open_documents, a:buffer) + if l:conn.is_tsserver + let l:message = ale#lsp#tsserver_message#Open(a:buffer) + else + let l:message = ale#lsp#message#DidOpen(a:buffer, a:language_id) + endif + + call ale#lsp#Send(a:conn_id, l:message) + let l:conn.open_documents[a:buffer] = getbufvar(a:buffer, 'changedtick') + let l:opened = 1 + endif + + return l:opened +endfunction + +" Notify LSP servers or tsserver that a document is closed, if opened before. +" If a document is closed, 1 will be returned, otherwise 0 will be returned. +" +" Only the buffer number is required here. A message will be sent to every +" language server that was notified previously of the document being opened. +function! ale#lsp#CloseDocument(buffer) abort + let l:closed = 0 + + " The connection keys are sorted so the messages are easier to test, and + " so messages are sent in a consistent order. + for l:conn_id in sort(keys(s:connections)) + let l:conn = s:connections[l:conn_id] + + if l:conn.initialized && has_key(l:conn.open_documents, a:buffer) + if l:conn.is_tsserver + let l:message = ale#lsp#tsserver_message#Close(a:buffer) + else + let l:message = ale#lsp#message#DidClose(a:buffer) + endif + + call ale#lsp#Send(l:conn_id, l:message) + call remove(l:conn.open_documents, a:buffer) + let l:closed = 1 + endif + endfor + + return l:closed +endfunction + +" Notify LSP servers or tsserver that a document has changed, if needed. +" If a notification is sent, 1 will be returned, otherwise 0 will be returned. +function! ale#lsp#NotifyForChanges(conn_id, buffer) abort + let l:conn = get(s:connections, a:conn_id, {}) + let l:notified = 0 + + if !empty(l:conn) && has_key(l:conn.open_documents, a:buffer) + let l:new_tick = getbufvar(a:buffer, 'changedtick') + + if l:conn.open_documents[a:buffer] < l:new_tick + if l:conn.is_tsserver + let l:message = ale#lsp#tsserver_message#Change(a:buffer) + else + let l:message = ale#lsp#message#DidChange(a:buffer) + endif + + call ale#lsp#Send(a:conn_id, l:message) + let l:conn.open_documents[a:buffer] = l:new_tick + let l:notified = 1 + endif + endif + + return l:notified +endfunction + +" Wait for an LSP server to be initialized. +function! ale#lsp#OnInit(conn_id, Callback) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if empty(l:conn) + return + endif + + if l:conn.initialized + call a:Callback() + else + call add(l:conn.init_queue, a:Callback) + endif +endfunction + +" Check if an LSP has a given capability. +function! ale#lsp#HasCapability(conn_id, capability) abort + let l:conn = get(s:connections, a:conn_id, {}) + + if empty(l:conn) + return 0 + endif + + if type(get(l:conn.capabilities, a:capability, v:null)) isnot v:t_number + throw 'Invalid capability ' . a:capability + endif + + return l:conn.capabilities[a:capability] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp/message.vim b/dot_vim/plugged/ale/autoload/ale/lsp/message.vim new file mode 100644 index 0000000..c2238de --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp/message.vim @@ -0,0 +1,212 @@ +" Author: w0rp +" Description: Language Server Protocol message implementations +" +" Messages in this movie will be returned in the format +" [is_notification, method_name, params?] +" +" All functions which accept line and column arguments expect them to be 1-based +" (the same format as being returned by getpos() and friends), those then +" will be converted to 0-based as specified by LSP. +let g:ale_lsp_next_version_id = 1 + +" The LSP protocols demands that we send every change to a document, including +" undo, with incrementing version numbers, so we'll just use one incrementing +" ID for everything. +function! ale#lsp#message#GetNextVersionID() abort + " Use the current ID + let l:id = g:ale_lsp_next_version_id + + " Increment the ID variable. + let g:ale_lsp_next_version_id += 1 + + " When the ID overflows, reset it to 1. By the time we hit the initial ID + " again, the messages will be long gone. + if g:ale_lsp_next_version_id < 1 + let g:ale_lsp_next_version_id = 1 + endif + + return l:id +endfunction + +function! ale#lsp#message#Initialize(root_path, options, capabilities) abort + " NOTE: rootPath is deprecated in favour of rootUri + return [0, 'initialize', { + \ 'processId': getpid(), + \ 'rootPath': a:root_path, + \ 'capabilities': a:capabilities, + \ 'initializationOptions': a:options, + \ 'rootUri': ale#util#ToURI(a:root_path), + \}] +endfunction + +function! ale#lsp#message#Initialized() abort + return [1, 'initialized', {}] +endfunction + +function! ale#lsp#message#Shutdown() abort + return [0, 'shutdown'] +endfunction + +function! ale#lsp#message#Exit() abort + return [1, 'exit'] +endfunction + +function! ale#lsp#message#DidOpen(buffer, language_id) abort + let l:lines = getbufline(a:buffer, 1, '$') + + return [1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ 'languageId': a:language_id, + \ 'version': ale#lsp#message#GetNextVersionID(), + \ 'text': join(l:lines, "\n") . "\n", + \ }, + \}] +endfunction + +function! ale#lsp#message#DidChange(buffer) abort + let l:lines = getbufline(a:buffer, 1, '$') + + " For changes, we simply send the full text of the document to the server. + return [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ 'version': ale#lsp#message#GetNextVersionID(), + \ }, + \ 'contentChanges': [{'text': join(l:lines, "\n") . "\n"}] + \}] +endfunction + +function! ale#lsp#message#DidSave(buffer, include_text) abort + let l:response = [1, 'textDocument/didSave', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \}] + + if a:include_text + let l:response[2].textDocument.version = ale#lsp#message#GetNextVersionID() + let l:response[2].text = ale#util#GetBufferContents(a:buffer) + endif + + return l:response +endfunction + +function! ale#lsp#message#DidClose(buffer) abort + return [1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \}] +endfunction + +let s:COMPLETION_TRIGGER_INVOKED = 1 +let s:COMPLETION_TRIGGER_CHARACTER = 2 + +function! ale#lsp#message#Completion(buffer, line, column, trigger_character) abort + let l:message = [0, 'textDocument/completion', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] + + if !empty(a:trigger_character) + let l:message[2].context = { + \ 'triggerKind': s:COMPLETION_TRIGGER_CHARACTER, + \ 'triggerCharacter': a:trigger_character, + \} + endif + + return l:message +endfunction + +function! ale#lsp#message#Definition(buffer, line, column) abort + return [0, 'textDocument/definition', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] +endfunction + +function! ale#lsp#message#TypeDefinition(buffer, line, column) abort + return [0, 'textDocument/typeDefinition', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] +endfunction + +function! ale#lsp#message#Implementation(buffer, line, column) abort + return [0, 'textDocument/implementation', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] +endfunction + +function! ale#lsp#message#References(buffer, line, column) abort + return [0, 'textDocument/references', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \ 'context': {'includeDeclaration': v:false}, + \}] +endfunction + +function! ale#lsp#message#Symbol(query) abort + return [0, 'workspace/symbol', { + \ 'query': a:query, + \}] +endfunction + +function! ale#lsp#message#Hover(buffer, line, column) abort + return [0, 'textDocument/hover', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \}] +endfunction + +function! ale#lsp#message#DidChangeConfiguration(buffer, config) abort + return [1, 'workspace/didChangeConfiguration', { + \ 'settings': a:config, + \}] +endfunction + +function! ale#lsp#message#Rename(buffer, line, column, new_name) abort + return [0, 'textDocument/rename', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'position': {'line': a:line - 1, 'character': a:column - 1}, + \ 'newName': a:new_name, + \}] +endfunction + +function! ale#lsp#message#CodeAction(buffer, line, column, end_line, end_column, diagnostics) abort + return [0, 'textDocument/codeAction', { + \ 'textDocument': { + \ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')), + \ }, + \ 'range': { + \ 'start': {'line': a:line - 1, 'character': a:column - 1}, + \ 'end': {'line': a:end_line - 1, 'character': a:end_column}, + \ }, + \ 'context': { + \ 'diagnostics': a:diagnostics + \ }, + \}] +endfunction + +function! ale#lsp#message#ExecuteCommand(command, arguments) abort + return [0, 'workspace/executeCommand', { + \ 'command': a:command, + \ 'arguments': a:arguments, + \}] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp/reset.vim b/dot_vim/plugged/ale/autoload/ale/lsp/reset.vim new file mode 100644 index 0000000..2fc7f0a --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp/reset.vim @@ -0,0 +1,25 @@ +" Stop all LSPs and remove all of the data for them. +function! ale#lsp#reset#StopAllLSPs() abort + call ale#lsp#StopAll() + + if exists('*ale#definition#ClearLSPData') + " Clear the mapping for connections, etc. + call ale#definition#ClearLSPData() + endif + + if exists('*ale#lsp_linter#ClearLSPData') + " Clear the mapping for connections, etc. + call ale#lsp_linter#ClearLSPData() + + " Remove the problems for all of the LSP linters in every buffer. + for l:buffer_string in keys(g:ale_buffer_info) + let l:buffer = str2nr(l:buffer_string) + + for l:linter in ale#linter#Get(getbufvar(l:buffer, '&filetype')) + if !empty(l:linter.lsp) + call ale#engine#HandleLoclist(l:linter.name, l:buffer, [], 0) + endif + endfor + endfor + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp/response.vim b/dot_vim/plugged/ale/autoload/ale/lsp/response.vim new file mode 100644 index 0000000..498ec50 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp/response.vim @@ -0,0 +1,152 @@ +" Author: w0rp +" Description: Parsing and transforming of LSP server responses. + +" Constants for error codes. +" Defined by JSON RPC +let s:PARSE_ERROR = -32700 +let s:INVALID_REQUEST = -32600 +let s:METHOD_NOT_FOUND = -32601 +let s:INVALID_PARAMS = -32602 +let s:INTERNAL_ERROR = -32603 +let s:SERVER_ERROR_START = -32099 +let s:SERVER_ERROR_END = -32000 +let s:SERVER_NOT_INITIALIZED = -32002 +let s:UNKNOWN_ERROR_CODE = -32001 +" Defined by the protocol. +let s:REQUEST_CANCELLED = -32800 + +" Constants for message severity codes. +let s:SEVERITY_ERROR = 1 +let s:SEVERITY_WARNING = 2 +let s:SEVERITY_INFORMATION = 3 +let s:SEVERITY_HINT = 4 + +" Parse the message for textDocument/publishDiagnostics +function! ale#lsp#response#ReadDiagnostics(response) abort + let l:loclist = [] + + for l:diagnostic in a:response.params.diagnostics + let l:severity = get(l:diagnostic, 'severity', 0) + let l:loclist_item = { + \ 'text': substitute(l:diagnostic.message, '\(\r\n\|\n\|\r\)', ' ', 'g'), + \ 'type': 'E', + \ 'lnum': l:diagnostic.range.start.line + 1, + \ 'col': l:diagnostic.range.start.character + 1, + \ 'end_lnum': l:diagnostic.range.end.line + 1, + \ 'end_col': l:diagnostic.range.end.character, + \} + + if l:severity == s:SEVERITY_WARNING + let l:loclist_item.type = 'W' + elseif l:severity == s:SEVERITY_INFORMATION + " TODO: Use 'I' here in future. + let l:loclist_item.type = 'W' + elseif l:severity == s:SEVERITY_HINT + " TODO: Use 'H' here in future + let l:loclist_item.type = 'W' + endif + + if has_key(l:diagnostic, 'code') + if type(l:diagnostic.code) == v:t_string + let l:loclist_item.code = l:diagnostic.code + elseif type(l:diagnostic.code) == v:t_number && l:diagnostic.code != -1 + let l:loclist_item.code = string(l:diagnostic.code) + let l:loclist_item.nr = l:diagnostic.code + endif + endif + + if has_key(l:diagnostic, 'relatedInformation') + \ && l:diagnostic.relatedInformation isnot v:null + let l:related = deepcopy(l:diagnostic.relatedInformation) + call map(l:related, {key, val -> + \ ale#util#ToResource(val.location.uri) . + \ ':' . (val.location.range.start.line + 1) . + \ ':' . (val.location.range.start.character + 1) . + \ ":\n\t" . val.message + \}) + let l:loclist_item.detail = l:diagnostic.message . "\n" . join(l:related, "\n") + endif + + if has_key(l:diagnostic, 'source') + let l:loclist_item.detail = printf( + \ '[%s] %s', + \ l:diagnostic.source, + \ l:diagnostic.message + \) + endif + + call add(l:loclist, l:loclist_item) + endfor + + return l:loclist +endfunction + +function! ale#lsp#response#ReadTSServerDiagnostics(response) abort + let l:loclist = [] + + for l:diagnostic in a:response.body.diagnostics + let l:loclist_item = { + \ 'text': l:diagnostic.text, + \ 'type': 'E', + \ 'lnum': l:diagnostic.start.line, + \ 'col': l:diagnostic.start.offset, + \ 'end_lnum': l:diagnostic.end.line, + \ 'end_col': l:diagnostic.end.offset - 1, + \} + + if has_key(l:diagnostic, 'code') + if type(l:diagnostic.code) == v:t_string + let l:loclist_item.code = l:diagnostic.code + elseif type(l:diagnostic.code) == v:t_number && l:diagnostic.code != -1 + let l:loclist_item.code = string(l:diagnostic.code) + let l:loclist_item.nr = l:diagnostic.code + endif + endif + + if get(l:diagnostic, 'category') is# 'warning' + let l:loclist_item.type = 'W' + endif + + if get(l:diagnostic, 'category') is# 'suggestion' + let l:loclist_item.type = 'I' + endif + + call add(l:loclist, l:loclist_item) + endfor + + return l:loclist +endfunction + +function! ale#lsp#response#GetErrorMessage(response) abort + if type(get(a:response, 'error', 0)) isnot v:t_dict + return '' + endif + + let l:code = get(a:response.error, 'code') + + " Only report things for these error codes. + if l:code isnot s:INVALID_PARAMS && l:code isnot s:INTERNAL_ERROR + return '' + endif + + let l:message = get(a:response.error, 'message', '') + + if empty(l:message) + return '' + endif + + " Include the traceback or error data as details, if present. + let l:error_data = get(a:response.error, 'data', {}) + + if type(l:error_data) is v:t_string + let l:message .= "\n" . l:error_data + elseif type(l:error_data) is v:t_dict + let l:traceback = get(l:error_data, 'traceback', []) + + if type(l:traceback) is v:t_list && !empty(l:traceback) + let l:message .= "\n" . join(l:traceback, "\n") + endif + endif + + return l:message +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp/tsserver_message.vim b/dot_vim/plugged/ale/autoload/ale/lsp/tsserver_message.vim new file mode 100644 index 0000000..02e5789 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp/tsserver_message.vim @@ -0,0 +1,165 @@ +" Author: w0rp +" Description: tsserver message implementations +" +" Messages in this movie will be returned in the format +" [is_notification, command_name, params?] +" +" Every command must begin with the string 'ts@', which will be used to +" detect the different message format for tsserver, and this string will +" be removed from the actual command name, + +function! ale#lsp#tsserver_message#Open(buffer) abort + return [1, 'ts@open', {'file': expand('#' . a:buffer . ':p')}] +endfunction + +function! ale#lsp#tsserver_message#Close(buffer) abort + return [1, 'ts@close', {'file': expand('#' . a:buffer . ':p')}] +endfunction + +function! ale#lsp#tsserver_message#Change(buffer) abort + let l:lines = getbufline(a:buffer, 1, '$') + + " We will always use a very high endLine number, so we can delete + " lines from files. tsserver will gladly accept line numbers beyond the + " end. + return [1, 'ts@change', { + \ 'file': expand('#' . a:buffer . ':p'), + \ 'line': 1, + \ 'offset': 1, + \ 'endLine': 1073741824, + \ 'endOffset': 1, + \ 'insertString': join(l:lines, "\n") . "\n", + \}] +endfunction + +function! ale#lsp#tsserver_message#Geterr(buffer) abort + return [1, 'ts@geterr', {'files': [expand('#' . a:buffer . ':p')]}] +endfunction + +function! ale#lsp#tsserver_message#Completions( +\ buffer, line, column, prefix, include_external) abort + return [0, 'ts@completions', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \ 'prefix': a:prefix, + \ 'includeExternalModuleExports': a:include_external, + \}] +endfunction + +function! ale#lsp#tsserver_message#CompletionEntryDetails(buffer, line, column, entry_names) abort + return [0, 'ts@completionEntryDetails', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \ 'entryNames': a:entry_names, + \}] +endfunction + +function! ale#lsp#tsserver_message#Definition(buffer, line, column) abort + return [0, 'ts@definition', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#TypeDefinition(buffer, line, column) abort + return [0, 'ts@typeDefinition', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#Implementation(buffer, line, column) abort + return [0, 'ts@implementation', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#References(buffer, line, column) abort + return [0, 'ts@references', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#Quickinfo(buffer, line, column) abort + return [0, 'ts@quickinfo', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#Rename( +\ buffer, line, column, find_in_comments, find_in_strings) abort + return [0, 'ts@rename', { + \ 'line': a:line, + \ 'offset': a:column, + \ 'file': expand('#' . a:buffer . ':p'), + \ 'arguments': { + \ 'findInComments': a:find_in_comments, + \ 'findInStrings': a:find_in_strings, + \ } + \}] +endfunction + +function! ale#lsp#tsserver_message#GetEditsForFileRename( +\ oldFilePath, newFilePath) abort + return [0, 'ts@getEditsForFileRename', { + \ 'oldFilePath': a:oldFilePath, + \ 'newFilePath': a:newFilePath, + \}] +endfunction + +function! ale#lsp#tsserver_message#OrganizeImports(buffer) abort + return [0, 'ts@organizeImports', { + \ 'scope': { + \ 'type': 'file', + \ 'args': { + \ 'file': expand('#' . a:buffer . ':p'), + \ }, + \ }, + \}] +endfunction + +function! ale#lsp#tsserver_message#GetCodeFixes(buffer, line, column, end_line, end_column, error_codes) abort + " The lines and columns are 1-based. + " The errors codes must be a list of tsserver error codes to fix. + return [0, 'ts@getCodeFixes', { + \ 'startLine': a:line, + \ 'startOffset': a:column, + \ 'endLine': a:end_line, + \ 'endOffset': a:end_column + 1, + \ 'file': expand('#' . a:buffer . ':p'), + \ 'errorCodes': a:error_codes, + \}] +endfunction + +function! ale#lsp#tsserver_message#GetApplicableRefactors(buffer, line, column, end_line, end_column) abort + " The arguments for this request can also be just 'line' and 'offset' + return [0, 'ts@getApplicableRefactors', { + \ 'startLine': a:line, + \ 'startOffset': a:column, + \ 'endLine': a:end_line, + \ 'endOffset': a:end_column + 1, + \ 'file': expand('#' . a:buffer . ':p'), + \}] +endfunction + +function! ale#lsp#tsserver_message#GetEditsForRefactor(buffer, line, column, end_line, end_column, refactor, action) abort + return [0, 'ts@getEditsForRefactor', { + \ 'startLine': a:line, + \ 'startOffset': a:column, + \ 'endLine': a:end_line, + \ 'endOffset': a:end_column + 1, + \ 'file': expand('#' . a:buffer . ':p'), + \ 'refactor': a:refactor, + \ 'action': a:action, + \}] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp_linter.vim b/dot_vim/plugged/ale/autoload/ale/lsp_linter.vim new file mode 100644 index 0000000..1c98d62 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp_linter.vim @@ -0,0 +1,547 @@ +" Author: w0rp +" Description: Integration between linters and LSP/tsserver. + +" This code isn't loaded if a user never users LSP features or linters. + +" Associates LSP connection IDs with linter names. +if !has_key(s:, 'lsp_linter_map') + let s:lsp_linter_map = {} +endif + +" A Dictionary to track one-shot handlers for custom LSP requests +let s:custom_handlers_map = get(s:, 'custom_handlers_map', {}) + +" Clear LSP linter data for the linting engine. +function! ale#lsp_linter#ClearLSPData() abort + let s:lsp_linter_map = {} + let s:custom_handlers_map = {} +endfunction + +" Only for internal use. +function! ale#lsp_linter#GetLSPLinterMap() abort + return s:lsp_linter_map +endfunction + +" Just for tests. +function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort + let s:lsp_linter_map = a:replacement_map +endfunction + +" Check if diagnostics for a particular linter should be ignored. +function! s:ShouldIgnore(buffer, linter_name) abort + " Ignore all diagnostics if LSP integration is disabled. + if ale#Var(a:buffer, 'disable_lsp') + return 1 + endif + + let l:config = ale#Var(a:buffer, 'linters_ignore') + + " Don't load code for ignoring diagnostics if there's nothing to ignore. + if empty(l:config) + return 0 + endif + + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:ignore_list = ale#engine#ignore#GetList(l:filetype, l:config) + + return index(l:ignore_list, a:linter_name) >= 0 +endfunction + +function! s:HandleLSPDiagnostics(conn_id, response) abort + let l:linter_name = s:lsp_linter_map[a:conn_id] + let l:filename = ale#util#ToResource(a:response.params.uri) + let l:escaped_name = escape( + \ fnameescape(l:filename), + \ has('win32') ? '^' : '^,}]' + \) + let l:buffer = bufnr('^' . l:escaped_name . '$') + let l:info = get(g:ale_buffer_info, l:buffer, {}) + + if empty(l:info) + return + endif + + if s:ShouldIgnore(l:buffer, l:linter_name) + return + endif + + let l:loclist = ale#lsp#response#ReadDiagnostics(a:response) + + call ale#engine#HandleLoclist(l:linter_name, l:buffer, l:loclist, 0) +endfunction + +function! s:HandleTSServerDiagnostics(response, error_type) abort + let l:linter_name = 'tsserver' + let l:escaped_name = escape( + \ fnameescape(a:response.body.file), + \ has('win32') ? '^' : '^,}]' + \) + let l:buffer = bufnr('^' . l:escaped_name . '$') + let l:info = get(g:ale_buffer_info, l:buffer, {}) + + if empty(l:info) + return + endif + + call ale#engine#MarkLinterInactive(l:info, l:linter_name) + + if s:ShouldIgnore(l:buffer, l:linter_name) + return + endif + + let l:thislist = ale#lsp#response#ReadTSServerDiagnostics(a:response) + let l:no_changes = 0 + + " tsserver sends syntax and semantic errors in separate messages, so we + " have to collect the messages separately for each buffer and join them + " back together again. + if a:error_type is# 'syntax' + if len(l:thislist) is 0 && len(get(l:info, 'syntax_loclist', [])) is 0 + let l:no_changes = 1 + endif + + let l:info.syntax_loclist = l:thislist + elseif a:error_type is# 'semantic' + if len(l:thislist) is 0 && len(get(l:info, 'semantic_loclist', [])) is 0 + let l:no_changes = 1 + endif + + let l:info.semantic_loclist = l:thislist + else + if len(l:thislist) is 0 && len(get(l:info, 'suggestion_loclist', [])) is 0 + let l:no_changes = 1 + endif + + let l:info.suggestion_loclist = l:thislist + endif + + if l:no_changes + return + endif + + let l:loclist = get(l:info, 'semantic_loclist', []) + \ + get(l:info, 'suggestion_loclist', []) + \ + get(l:info, 'syntax_loclist', []) + + call ale#engine#HandleLoclist(l:linter_name, l:buffer, l:loclist, 0) +endfunction + +function! s:HandleLSPErrorMessage(linter_name, response) abort + if !g:ale_history_enabled || !g:ale_history_log_output + return + endif + + if empty(a:linter_name) + return + endif + + let l:message = ale#lsp#response#GetErrorMessage(a:response) + + if empty(l:message) + return + endif + + call ale#lsp_linter#AddErrorMessage(a:linter_name, l:message) +endfunction + +function! ale#lsp_linter#AddErrorMessage(linter_name, message) abort + " This global variable is set here so we don't load the debugging.vim file + " until someone uses :ALEInfo. + let g:ale_lsp_error_messages = get(g:, 'ale_lsp_error_messages', {}) + + if !has_key(g:ale_lsp_error_messages, a:linter_name) + let g:ale_lsp_error_messages[a:linter_name] = [] + endif + + call add(g:ale_lsp_error_messages[a:linter_name], a:message) +endfunction + +function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort + let l:method = get(a:response, 'method', '') + + if get(a:response, 'jsonrpc', '') is# '2.0' && has_key(a:response, 'error') + let l:linter_name = get(s:lsp_linter_map, a:conn_id, '') + + call s:HandleLSPErrorMessage(l:linter_name, a:response) + elseif l:method is# 'textDocument/publishDiagnostics' + call s:HandleLSPDiagnostics(a:conn_id, a:response) + elseif l:method is# 'window/showMessage' + call ale#lsp_window#HandleShowMessage( + \ s:lsp_linter_map[a:conn_id], + \ g:ale_lsp_show_message_format, + \ a:response.params + \) + elseif get(a:response, 'type', '') is# 'event' + \&& get(a:response, 'event', '') is# 'semanticDiag' + call s:HandleTSServerDiagnostics(a:response, 'semantic') + elseif get(a:response, 'type', '') is# 'event' + \&& get(a:response, 'event', '') is# 'syntaxDiag' + call s:HandleTSServerDiagnostics(a:response, 'syntax') + elseif get(a:response, 'type', '') is# 'event' + \&& get(a:response, 'event', '') is# 'suggestionDiag' + \&& get(g:, 'ale_lsp_suggestions', '1') == 1 + call s:HandleTSServerDiagnostics(a:response, 'suggestion') + endif +endfunction + +function! ale#lsp_linter#GetOptions(buffer, linter) abort + if has_key(a:linter, 'initialization_options_callback') + return ale#util#GetFunction(a:linter.initialization_options_callback)(a:buffer) + endif + + if has_key(a:linter, 'initialization_options') + let l:Options = a:linter.initialization_options + + if type(l:Options) is v:t_func + let l:Options = l:Options(a:buffer) + endif + + return l:Options + endif + + return {} +endfunction + +function! ale#lsp_linter#GetConfig(buffer, linter) abort + if has_key(a:linter, 'lsp_config_callback') + return ale#util#GetFunction(a:linter.lsp_config_callback)(a:buffer) + endif + + if has_key(a:linter, 'lsp_config') + let l:Config = a:linter.lsp_config + + if type(l:Config) is v:t_func + let l:Config = l:Config(a:buffer) + endif + + return l:Config + endif + + return {} +endfunction + +function! ale#lsp_linter#FindProjectRoot(buffer, linter) abort + let l:buffer_ale_root = getbufvar( + \ a:buffer, + \ 'ale_root', + \ getbufvar(a:buffer, 'ale_lsp_root', {}) + \) + + if type(l:buffer_ale_root) is v:t_string + return l:buffer_ale_root + endif + + " Try to get a buffer-local setting for the root + if has_key(l:buffer_ale_root, a:linter.name) + let l:Root = l:buffer_ale_root[a:linter.name] + + if type(l:Root) is v:t_func + return l:Root(a:buffer) + else + return l:Root + endif + endif + + let l:global_root = g:ale_root + + if empty(g:ale_root) && exists('g:ale_lsp_root') + let l:global_root = g:ale_lsp_root + endif + + " Try to get a global setting for the root + if has_key(l:global_root, a:linter.name) + let l:Root = l:global_root[a:linter.name] + + if type(l:Root) is v:t_func + return l:Root(a:buffer) + else + return l:Root + endif + endif + + " Fall back to the linter-specific configuration + if has_key(a:linter, 'project_root') + let l:Root = a:linter.project_root + + return type(l:Root) is v:t_func ? l:Root(a:buffer) : l:Root + endif + + return ale#util#GetFunction(a:linter.project_root_callback)(a:buffer) +endfunction + +" This function is accessible so tests can call it. +function! ale#lsp_linter#OnInit(linter, details, Callback) abort + let l:buffer = a:details.buffer + let l:conn_id = a:details.connection_id + let l:command = a:details.command + + let l:config = ale#lsp_linter#GetConfig(l:buffer, a:linter) + let l:language_id = ale#linter#GetLanguage(l:buffer, a:linter) + + call ale#lsp#UpdateConfig(l:conn_id, l:buffer, l:config) + + if ale#lsp#OpenDocument(l:conn_id, l:buffer, l:language_id) + if g:ale_history_enabled && !empty(l:command) + call ale#history#Add(l:buffer, 'started', l:conn_id, l:command) + endif + endif + + " The change message needs to be sent for tsserver before doing anything. + if a:linter.lsp is# 'tsserver' + call ale#lsp#NotifyForChanges(l:conn_id, l:buffer) + endif + + " Tell the relevant buffer that the LSP has started via an autocmd. + if l:buffer > 0 + if l:buffer == bufnr('') + silent doautocmd User ALELSPStarted + else + execute 'augroup ALELSPStartedGroup' . l:buffer + autocmd! + + execute printf( + \ 'autocmd BufEnter ' + \ . ' doautocmd User ALELSPStarted', + \ l:buffer + \) + + " Replicate ++once behavior for backwards compatibility. + execute printf( + \ 'autocmd BufEnter ' + \ . ' autocmd! ALELSPStartedGroup%d', + \ l:buffer, l:buffer + \) + augroup END + endif + endif + + call a:Callback(a:linter, a:details) +endfunction + +function! s:StartLSP(options, address, executable, command) abort + let l:buffer = a:options.buffer + let l:linter = a:options.linter + let l:root = a:options.root + let l:Callback = a:options.callback + + let l:init_options = ale#lsp_linter#GetOptions(l:buffer, l:linter) + + if l:linter.lsp is# 'socket' + let l:conn_id = ale#lsp#Register(a:address, l:root, l:init_options) + let l:ready = ale#lsp#ConnectToAddress(l:conn_id, a:address) + let l:command = '' + else + let l:conn_id = ale#lsp#Register(a:executable, l:root, l:init_options) + + " tsserver behaves differently, so tell the LSP API that it is tsserver. + if l:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(l:conn_id) + endif + + let l:cwd = ale#linter#GetCwd(l:buffer, l:linter) + let l:command = ale#command#FormatCommand( + \ l:buffer, + \ a:executable, + \ a:command, + \ 0, + \ v:false, + \ l:cwd, + \ ale#GetFilenameMappings(l:buffer, l:linter.name), + \)[1] + let l:command = ale#job#PrepareCommand(l:buffer, l:command) + let l:ready = ale#lsp#StartProgram(l:conn_id, a:executable, l:command) + endif + + if !l:ready + if g:ale_history_enabled && !empty(a:command) + call ale#history#Add(l:buffer, 'failed', l:conn_id, a:command) + endif + + return 0 + endif + + let l:details = { + \ 'buffer': l:buffer, + \ 'connection_id': l:conn_id, + \ 'command': l:command, + \ 'project_root': l:root, + \} + + call ale#lsp#OnInit(l:conn_id, {-> + \ ale#lsp_linter#OnInit(l:linter, l:details, l:Callback) + \}) + + return 1 +endfunction + +function! s:StartWithAddress(options, address) abort + if ale#command#IsDeferred(a:address) + let a:address.result_callback = { + \ address -> s:StartWithAddress(a:options, address) + \} + + return 1 + endif + + if empty(a:address) + return 0 + endif + + return s:StartLSP(a:options, a:address, '', '') +endfunction + +function! s:StartWithCommand(options, executable, command) abort + if ale#command#IsDeferred(a:command) + let a:command.result_callback = { + \ command -> s:StartWithCommand(a:options, a:executable, command) + \} + + return 1 + endif + + if empty(a:command) + return 0 + endif + + return s:StartLSP(a:options, '', a:executable, a:command) +endfunction + +function! s:StartIfExecutable(options, executable) abort + if ale#command#IsDeferred(a:executable) + let a:executable.result_callback = { + \ executable -> s:StartIfExecutable(a:options, executable) + \} + + return 1 + endif + + if !ale#engine#IsExecutable(a:options.buffer, a:executable) + return 0 + endif + + let l:command = ale#linter#GetCommand(a:options.buffer, a:options.linter) + + return s:StartWithCommand(a:options, a:executable, l:command) +endfunction + +" Given a buffer, an LSP linter, start up an LSP linter and get ready to +" receive messages for the document. +function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let l:command = '' + let l:address = '' + let l:root = ale#lsp_linter#FindProjectRoot(a:buffer, a:linter) + + if empty(l:root) && a:linter.lsp isnot# 'tsserver' + " If there's no project root, then we can't check files with LSP, + " unless we are using tsserver, which doesn't use project roots. + call ale#lsp_linter#AddErrorMessage(a:linter.name, "Failed to find project root, language server won't start.") + + return 0 + endif + + let l:options = { + \ 'buffer': a:buffer, + \ 'linter': a:linter, + \ 'callback': a:Callback, + \ 'root': l:root, + \} + + if a:linter.lsp is# 'socket' + let l:address = ale#linter#GetAddress(a:buffer, a:linter) + + return s:StartWithAddress(l:options, l:address) + endif + + let l:executable = ale#linter#GetExecutable(a:buffer, a:linter) + + return s:StartIfExecutable(l:options, l:executable) +endfunction + +function! s:CheckWithLSP(linter, details) abort + let l:buffer = a:details.buffer + let l:info = get(g:ale_buffer_info, l:buffer) + + if empty(l:info) + return + endif + + let l:id = a:details.connection_id + + " Register a callback now for handling errors now. + let l:Callback = function('ale#lsp_linter#HandleLSPResponse') + call ale#lsp#RegisterCallback(l:id, l:Callback) + + " Remember the linter this connection is for. + let s:lsp_linter_map[l:id] = a:linter.name + + if a:linter.lsp is# 'tsserver' + let l:message = ale#lsp#tsserver_message#Geterr(l:buffer) + let l:notified = ale#lsp#Send(l:id, l:message) != 0 + + if l:notified + call ale#engine#MarkLinterActive(l:info, a:linter) + endif + else + let l:notified = ale#lsp#NotifyForChanges(l:id, l:buffer) + endif + + " If this was a file save event, also notify the server of that. + if a:linter.lsp isnot# 'tsserver' + \&& getbufvar(l:buffer, 'ale_save_event_fired', 0) + \&& ale#lsp#HasCapability(l:id, 'did_save') + let l:include_text = ale#lsp#HasCapability(l:id, 'includeText') + let l:save_message = ale#lsp#message#DidSave(l:buffer, l:include_text) + let l:notified = ale#lsp#Send(l:id, l:save_message) != 0 + endif +endfunction + +function! ale#lsp_linter#CheckWithLSP(buffer, linter) abort + return ale#lsp_linter#StartLSP(a:buffer, a:linter, function('s:CheckWithLSP')) +endfunction + +function! s:HandleLSPResponseToCustomRequests(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:custom_handlers_map, a:response.id) + let l:Handler = remove(s:custom_handlers_map, a:response.id) + call l:Handler(a:response) + endif +endfunction + +function! s:OnReadyForCustomRequests(args, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + let l:request_id = ale#lsp#Send(l:id, a:args.message) + + if l:request_id > 0 && has_key(a:args, 'handler') + let l:Callback = function('s:HandleLSPResponseToCustomRequests') + call ale#lsp#RegisterCallback(l:id, l:Callback) + let s:custom_handlers_map[l:request_id] = a:args.handler + endif +endfunction + +" Send a custom request to an LSP linter. +function! ale#lsp_linter#SendRequest(buffer, linter_name, message, ...) abort + let l:filetype = ale#linter#ResolveFiletype(getbufvar(a:buffer, '&filetype')) + let l:linter_list = ale#linter#GetAll(l:filetype) + let l:linter_list = filter(l:linter_list, {_, v -> v.name is# a:linter_name}) + + if len(l:linter_list) < 1 + throw 'Linter "' . a:linter_name . '" not found!' + endif + + let l:linter = l:linter_list[0] + + if empty(l:linter.lsp) + throw 'Linter "' . a:linter_name . '" does not support LSP!' + endif + + let l:is_notification = a:message[0] + let l:callback_args = {'message': a:message} + + if !l:is_notification && a:0 + let l:callback_args.handler = a:1 + endif + + let l:Callback = function('s:OnReadyForCustomRequests', [l:callback_args]) + + return ale#lsp_linter#StartLSP(a:buffer, l:linter, l:Callback) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/lsp_window.vim b/dot_vim/plugged/ale/autoload/ale/lsp_window.vim new file mode 100644 index 0000000..9a27f2f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/lsp_window.vim @@ -0,0 +1,58 @@ +" Author: suoto +" Description: Handling of window/* LSP methods, although right now only +" handles window/showMessage + +" Constants for message type codes +let s:LSP_MESSAGE_TYPE_DISABLED = 0 +let s:LSP_MESSAGE_TYPE_ERROR = 1 +let s:LSP_MESSAGE_TYPE_WARNING = 2 +let s:LSP_MESSAGE_TYPE_INFORMATION = 3 +let s:LSP_MESSAGE_TYPE_LOG = 4 + +" Translate strings from the user config to a number so we can check +" severities +let s:CFG_TO_LSP_SEVERITY = { +\ 'disabled': s:LSP_MESSAGE_TYPE_DISABLED, +\ 'error': s:LSP_MESSAGE_TYPE_ERROR, +\ 'warning': s:LSP_MESSAGE_TYPE_WARNING, +\ 'information': s:LSP_MESSAGE_TYPE_INFORMATION, +\ 'info': s:LSP_MESSAGE_TYPE_INFORMATION, +\ 'log': s:LSP_MESSAGE_TYPE_LOG +\} + +" Handle window/showMessage response. +" - details: dict containing linter name and format (g:ale_lsp_show_message_format) +" - params: dict with the params for the call in the form of {type: number, message: string} +function! ale#lsp_window#HandleShowMessage(linter_name, format, params) abort + let l:message = a:params.message + let l:type = a:params.type + + " Get the configured severity level threshold and check if the message + " should be displayed or not + let l:configured_severity = tolower(get(g:, 'ale_lsp_show_message_severity', 'error')) + " If the user has configured with a value we can't find on the conversion + " dict, fall back to warning + let l:cfg_severity_threshold = get(s:CFG_TO_LSP_SEVERITY, l:configured_severity, s:LSP_MESSAGE_TYPE_WARNING) + + if l:type > l:cfg_severity_threshold + return + endif + + " Severity will depend on the message type + if l:type is# s:LSP_MESSAGE_TYPE_ERROR + let l:severity = g:ale_echo_msg_error_str + elseif l:type is# s:LSP_MESSAGE_TYPE_INFORMATION + let l:severity = g:ale_echo_msg_info_str + elseif l:type is# s:LSP_MESSAGE_TYPE_LOG + let l:severity = g:ale_echo_msg_log_str + else + " Default to warning just in case + let l:severity = g:ale_echo_msg_warning_str + endif + + let l:string = substitute(a:format, '\V%severity%', l:severity, 'g') + let l:string = substitute(l:string, '\V%linter%', a:linter_name, 'g') + let l:string = substitute(l:string, '\V%s\>', l:message, 'g') + + call ale#util#ShowMessage(l:string) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/maven.vim b/dot_vim/plugged/ale/autoload/ale/maven.vim new file mode 100644 index 0000000..4f87ebb --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/maven.vim @@ -0,0 +1,57 @@ +" Description: Functions for working with Maven projects. +" +" Given a buffer number, find a Maven project root. +function! ale#maven#FindProjectRoot(buffer) abort + let l:wrapper_path = ale#path#FindNearestFile(a:buffer, 'mvnw') + + if !empty(l:wrapper_path) + return fnamemodify(l:wrapper_path, ':h') + endif + + let l:pom_path = ale#path#FindNearestFile(a:buffer, 'pom.xml') + + if !empty(l:pom_path) + return fnamemodify(l:pom_path, ':h') + endif + + return '' +endfunction + +" Given a buffer number, find the path to the executable. +" First search on the path for 'mvnw' (mvnw.cmd on Windows), if nothing is found, +" try the global command. Returns an empty string if cannot find the executable. +function! ale#maven#FindExecutable(buffer) abort + let l:wrapper_cmd = has('unix') ? 'mvnw' : 'mvnw.cmd' + let l:wrapper_path = ale#path#FindNearestFile(a:buffer, l:wrapper_cmd) + + if !empty(l:wrapper_path) && executable(l:wrapper_path) + return l:wrapper_path + endif + + if executable('mvn') + return 'mvn' + endif + + return '' +endfunction + +" Given a buffer number, get a working directory and command to print the +" classpath of the root project. +" +" Returns an empty string for the command if Maven is not detected. +function! ale#maven#BuildClasspathCommand(buffer) abort + let l:executable = ale#maven#FindExecutable(a:buffer) + + if !empty(l:executable) + let l:project_root = ale#maven#FindProjectRoot(a:buffer) + + if !empty(l:project_root) + return [ + \ l:project_root, + \ ale#Escape(l:executable) . ' dependency:build-classpath' + \] + endif + endif + + return ['', ''] +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/node.vim b/dot_vim/plugged/ale/autoload/ale/node.vim new file mode 100644 index 0000000..9e11ca7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/node.vim @@ -0,0 +1,22 @@ +" Author: w0rp +" Description: Functions for working with Node executables. + +call ale#Set('windows_node_executable_path', 'node.exe') + +" Create a executable string which executes a Node.js script command with a +" Node.js executable if needed. +" +" The executable string should not be escaped before passing it to this +" function, the executable string will be escaped when returned by this +" function. +" +" The executable is only prefixed for Windows machines +function! ale#node#Executable(buffer, executable) abort + if has('win32') && a:executable =~? '\.js$' + let l:node = ale#Var(a:buffer, 'windows_node_executable_path') + + return ale#Escape(l:node) . ' ' . ale#Escape(a:executable) + endif + + return ale#Escape(a:executable) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/organize_imports.vim b/dot_vim/plugged/ale/autoload/ale/organize_imports.vim new file mode 100644 index 0000000..a6e7786 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/organize_imports.vim @@ -0,0 +1,65 @@ +" Author: Jerko Steiner +" Description: Organize imports support for tsserver + +function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') isnot# 'organizeImports' + return + endif + + if get(a:response, 'success', v:false) isnot v:true + return + endif + + let l:file_code_edits = a:response.body + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'Organize Imports', + \ 'changes': l:file_code_edits, + \ }, + \ { + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, + \ }, + \) +endfunction + +function! s:OnReady(linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if a:linter.lsp isnot# 'tsserver' + call ale#util#Execute('echom ''OrganizeImports currently only works with tsserver''') + + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = function('ale#organize_imports#HandleTSServerResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + let l:message = ale#lsp#tsserver_message#OrganizeImports(l:buffer) + + let l:request_id = ale#lsp#Send(l:id, l:message) +endfunction + +function! s:OrganizeImports(linter) abort + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + + if a:linter.lsp isnot# 'tsserver' + let l:column = min([l:column, len(getline(l:line))]) + endif + + let l:Callback = function('s:OnReady') + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#organize_imports#Execute() abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call s:OrganizeImports(l:linter) + endif + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/other_source.vim b/dot_vim/plugged/ale/autoload/ale/other_source.vim new file mode 100644 index 0000000..1a09203 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/other_source.vim @@ -0,0 +1,21 @@ +" Tell ALE that another source has started checking a buffer. +function! ale#other_source#StartChecking(buffer, linter_name) abort + call ale#engine#InitBufferInfo(a:buffer) + let l:list = g:ale_buffer_info[a:buffer].active_other_sources_list + + call add(l:list, a:linter_name) + call uniq(sort(l:list)) +endfunction + +" Show some results, and stop checking a buffer. +" To clear results or cancel checking a buffer, an empty List can be given. +function! ale#other_source#ShowResults(buffer, linter_name, loclist) abort + call ale#engine#InitBufferInfo(a:buffer) + let l:info = g:ale_buffer_info[a:buffer] + + " Remove this linter name from the active list. + let l:list = l:info.active_other_sources_list + call filter(l:list, 'v:val isnot# a:linter_name') + + call ale#engine#HandleLoclist(a:linter_name, a:buffer, a:loclist, 1) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/path.vim b/dot_vim/plugged/ale/autoload/ale/path.vim new file mode 100644 index 0000000..cc5c665 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/path.vim @@ -0,0 +1,252 @@ +" Author: w0rp +" Description: Functions for working with paths in the filesystem. + +" simplify a path, and fix annoying issues with paths on Windows. +" +" Forward slashes are changed to back slashes so path equality works better +" on Windows. Back slashes are changed to forward slashes on Unix. +" +" Unix paths can technically contain back slashes, but in practice no path +" should, and replacing back slashes with forward slashes makes linters work +" in environments like MSYS. +" +" Paths starting with more than one forward slash are changed to only one +" forward slash, to prevent the paths being treated as special MSYS paths. +function! ale#path#Simplify(path) abort + if has('unix') + let l:unix_path = substitute(a:path, '\\', '/', 'g') + + return substitute(simplify(l:unix_path), '^//\+', '/', 'g') " no-custom-checks + endif + + let l:win_path = substitute(a:path, '/', '\\', 'g') + + return substitute(simplify(l:win_path), '^\\\+', '\', 'g') " no-custom-checks +endfunction + +" Simplify a path without a Windows drive letter. +" This function can be used for checking if paths are equal. +function! ale#path#RemoveDriveLetter(path) abort + return has('win32') && a:path[1:2] is# ':\' + \ ? ale#path#Simplify(a:path[2:]) + \ : ale#path#Simplify(a:path) +endfunction + +" Given a buffer and a filename, find the nearest file by searching upwards +" through the paths relative to the given buffer. +function! ale#path#FindNearestFile(buffer, filename) abort + let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p') + let l:buffer_filename = fnameescape(l:buffer_filename) + + let l:relative_path = findfile(a:filename, l:buffer_filename . ';') + + if !empty(l:relative_path) + return fnamemodify(l:relative_path, ':p') + endif + + return '' +endfunction + +" Given a buffer and a directory name, find the nearest directory by searching upwards +" through the paths relative to the given buffer. +function! ale#path#FindNearestDirectory(buffer, directory_name) abort + let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p') + let l:buffer_filename = fnameescape(l:buffer_filename) + + let l:relative_path = finddir(a:directory_name, l:buffer_filename . ';') + + if !empty(l:relative_path) + return fnamemodify(l:relative_path, ':p') + endif + + return '' +endfunction + +" Given a buffer, a string to search for, and a global fallback for when +" the search fails, look for a file in parent paths, and if that fails, +" use the global fallback path instead. +function! ale#path#ResolveLocalPath(buffer, search_string, global_fallback) abort + " Search for a locally installed file first. + let l:path = ale#path#FindNearestFile(a:buffer, a:search_string) + + " If the search fails, try the global executable instead. + if empty(l:path) + let l:path = a:global_fallback + endif + + return l:path +endfunction + +" Given a buffer number, a base variable name, and a list of paths to search +" for in ancestor directories, detect the executable path for a program. +function! ale#path#FindNearestExecutable(buffer, path_list) abort + for l:path in a:path_list + if ale#path#IsAbsolute(l:path) + let l:executable = filereadable(l:path) ? l:path : '' + else + let l:executable = ale#path#FindNearestFile(a:buffer, l:path) + endif + + if !empty(l:executable) + return l:executable + endif + endfor + + return '' +endfunction + +" Given a buffer number, a base variable name, and a list of paths to search +" for in ancestor directories, detect the executable path for a program. +" +" The use_global and executable options for the relevant program will be used. +function! ale#path#FindExecutable(buffer, base_var_name, path_list) abort + if ale#Var(a:buffer, a:base_var_name . '_use_global') + return ale#Var(a:buffer, a:base_var_name . '_executable') + endif + + let l:nearest = ale#path#FindNearestExecutable(a:buffer, a:path_list) + + if !empty(l:nearest) + return l:nearest + endif + + return ale#Var(a:buffer, a:base_var_name . '_executable') +endfunction + +" Return 1 if a path is an absolute path. +function! ale#path#IsAbsolute(filename) abort + if has('win32') && a:filename[:0] is# '\' + return 1 + endif + + " Check for /foo and C:\foo, etc. + return a:filename[:0] is# '/' || a:filename[1:2] is# ':\' +endfunction + +let s:temp_dir = ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h')) + +" Given a filename, return 1 if the file represents some temporary file +" created by Vim. +function! ale#path#IsTempName(filename) abort + return ale#path#Simplify(a:filename)[:len(s:temp_dir) - 1] is# s:temp_dir +endfunction + +" Given a base directory, which must not have a trailing slash, and a +" filename, which may have an absolute path a path relative to the base +" directory, return the absolute path to the file. +function! ale#path#GetAbsPath(base_directory, filename) abort + if ale#path#IsAbsolute(a:filename) + return ale#path#Simplify(a:filename) + endif + + let l:sep = has('win32') ? '\' : '/' + + return ale#path#Simplify(a:base_directory . l:sep . a:filename) +endfunction + +" Given a path, return the directory name for that path, with no trailing +" slashes. If the argument is empty(), return an empty string. +function! ale#path#Dirname(path) abort + if empty(a:path) + return '' + endif + + " For /foo/bar/ we need :h:h to get /foo + if a:path[-1:] is# '/' || (has('win32') && a:path[-1:] is# '\') + return fnamemodify(a:path, ':h:h') + endif + + return fnamemodify(a:path, ':h') +endfunction + +" Given a buffer number and a relative or absolute path, return 1 if the +" two paths represent the same file on disk. +function! ale#path#IsBufferPath(buffer, complex_filename) abort + " If the path is one of many different names for stdin, we have a match. + if a:complex_filename is# '-' + \|| a:complex_filename is# 'stdin' + \|| a:complex_filename[:0] is# '<' + return 1 + endif + + let l:test_filename = ale#path#Simplify(a:complex_filename) + + if l:test_filename[:1] is# './' + let l:test_filename = l:test_filename[2:] + endif + + if l:test_filename[:1] is# '..' + " Remove ../../ etc. from the front of the path. + let l:test_filename = substitute(l:test_filename, '\v^(\.\.[/\\])+', '/', '') + endif + + " Use the basename for temporary files, as they are likely our files. + if ale#path#IsTempName(l:test_filename) + let l:test_filename = fnamemodify(l:test_filename, ':t') + endif + + let l:buffer_filename = expand('#' . a:buffer . ':p') + + return l:buffer_filename is# l:test_filename + \ || l:buffer_filename[-len(l:test_filename):] is# l:test_filename +endfunction + +" Given a path, return every component of the path, moving upwards. +function! ale#path#Upwards(path) abort + let l:pattern = has('win32') ? '\v/+|\\+' : '\v/+' + let l:sep = has('win32') ? '\' : '/' + let l:parts = split(ale#path#Simplify(a:path), l:pattern) + let l:path_list = [] + + while !empty(l:parts) + call add(l:path_list, join(l:parts, l:sep)) + let l:parts = l:parts[:-2] + endwhile + + if has('win32') && a:path =~# '^[a-zA-z]:\' + " Add \ to C: for C:\, etc. + let l:path_list[-1] .= '\' + elseif a:path[0] is# '/' + " If the path starts with /, even on Windows, add / and / to all paths. + call map(l:path_list, '''/'' . v:val') + call add(l:path_list, '/') + endif + + return l:path_list +endfunction + +" Convert a filesystem path to a file:// URI +" relatives paths will not be prefixed with the protocol. +" For Windows paths, the `:` in C:\ etc. will not be percent-encoded. +function! ale#path#ToFileURI(path) abort + let l:has_drive_letter = a:path[1:2] is# ':\' + + return substitute( + \ ((l:has_drive_letter || a:path[:0] is# '/') ? 'file://' : '') + \ . (l:has_drive_letter ? '/' . a:path[:2] : '') + \ . ale#uri#Encode(l:has_drive_letter ? a:path[3:] : a:path), + \ '\\', + \ '/', + \ 'g', + \) +endfunction + +function! ale#path#FromFileURI(uri) abort + if a:uri[:6] is? 'file://' + let l:encoded_path = a:uri[7:] + elseif a:uri[:4] is? 'file:' + let l:encoded_path = a:uri[5:] + else + let l:encoded_path = a:uri + endif + + let l:path = ale#uri#Decode(l:encoded_path) + + " If the path is like /C:/foo/bar, it should be C:\foo\bar instead. + if has('win32') && l:path =~# '^/[a-zA-Z][:|]' + let l:path = substitute(l:path[1:], '/', '\\', 'g') + let l:path = l:path[0] . ':' . l:path[2:] + endif + + return l:path +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/pattern_options.vim b/dot_vim/plugged/ale/autoload/ale/pattern_options.vim new file mode 100644 index 0000000..14e2142 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/pattern_options.vim @@ -0,0 +1,47 @@ +" Author: w0rp +" Description: Set options in files based on regex patterns. + +" These variables are used to cache the sorting of patterns below. +let s:last_pattern_options = {} +let s:sorted_items = [] + +function! s:CmpPatterns(left_item, right_item) abort + if a:left_item[0] < a:right_item[0] + return -1 + endif + + if a:left_item[0] > a:right_item[0] + return 1 + endif + + return 0 +endfunction + +function! ale#pattern_options#SetOptions(buffer) abort + let l:pattern_options = get(g:, 'ale_pattern_options', {}) + + if empty(l:pattern_options) + " Stop if no options are set. + return + endif + + " The items will only be sorted whenever the patterns change. + if l:pattern_options != s:last_pattern_options + let s:last_pattern_options = deepcopy(l:pattern_options) + " The patterns are sorted, so they are applied consistently. + let s:sorted_items = sort( + \ items(l:pattern_options), + \ function('s:CmpPatterns') + \) + endif + + let l:filename = expand('#' . a:buffer . ':p') + + for [l:pattern, l:options] in s:sorted_items + if match(l:filename, l:pattern) >= 0 + for [l:key, l:value] in items(l:options) + call setbufvar(a:buffer, l:key, l:value) + endfor + endif + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/powershell.vim b/dot_vim/plugged/ale/autoload/ale/powershell.vim new file mode 100644 index 0000000..8c16320 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/powershell.vim @@ -0,0 +1,32 @@ +" Author: zigford +" Description: Functions for integrating with Powershell linters. + +" Write a powershell script to a temp file for execution +" return the command used to execute it +function! s:TemporaryPSScript(buffer, input) abort + let l:filename = 'script.ps1' + " Create a temp dir to house our temp .ps1 script + " a temp dir is needed as powershell needs the .ps1 + " extension + let l:tempdir = ale#util#Tempname() . (has('win32') ? '\' : '/') + let l:tempscript = l:tempdir . l:filename + " Create the temporary directory for the file, unreadable by 'other' + " users. + call mkdir(l:tempdir, '', 0750) + " Automatically delete the directory later. + call ale#command#ManageDirectory(a:buffer, l:tempdir) + " Write the script input out to a file. + call ale#util#Writefile(a:buffer, a:input, l:tempscript) + + return l:tempscript +endfunction + +function! ale#powershell#RunPowerShell(buffer, base_var_name, command) abort + let l:executable = ale#Var(a:buffer, a:base_var_name . '_executable') + let l:tempscript = s:TemporaryPSScript(a:buffer, a:command) + + return ale#Escape(l:executable) + \ . ' -Exe Bypass -NoProfile -File ' + \ . ale#Escape(l:tempscript) + \ . ' %t' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/preview.vim b/dot_vim/plugged/ale/autoload/ale/preview.vim new file mode 100644 index 0000000..1aca03e --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/preview.vim @@ -0,0 +1,137 @@ +" Author: w0rp +" Description: Preview windows for showing whatever information in. + +if !has_key(s:, 'last_list') + let s:last_list = [] +endif + +if !has_key(s:, 'last_options') + let s:last_options = {} +endif + +function! ale#preview#SetLastSelection(item_list, options) abort + let s:last_list = a:item_list + let s:last_options = { + \ 'open_in': get(a:options, 'open_in', 'current-buffer'), + \ 'use_relative_paths': get(a:options, 'use_relative_paths', 0), + \} +endfunction + +" Open a preview window and show some lines in it. +" A second argument can be passed as a Dictionary with options. They are... +" +" filetype - The filetype to use, defaulting to 'ale-preview' +" stay_here - If 1, stay in the window you came from. +function! ale#preview#Show(lines, ...) abort + let l:options = get(a:000, 0, {}) + + silent pedit ALEPreviewWindow + wincmd P + + setlocal modifiable + setlocal noreadonly + setlocal nobuflisted + setlocal buftype=nofile + setlocal bufhidden=wipe + :%d + call setline(1, a:lines) + setlocal nomodifiable + setlocal readonly + let &l:filetype = get(l:options, 'filetype', 'ale-preview') + + for l:command in get(l:options, 'commands', []) + call execute(l:command) + endfor + + if get(l:options, 'stay_here') + wincmd p + endif +endfunction + +" Close the preview window if the filetype matches the given one. +function! ale#preview#CloseIfTypeMatches(filetype) abort + for l:win in getwininfo() + let l:wintype = gettabwinvar(l:win.tabnr, l:win.winnr, '&filetype') + + if l:wintype is# a:filetype + silent! pclose! + endif + endfor +endfunction + +" Show a location selection preview window, given some items. +" Each item should have 'filename', 'line', and 'column' keys. +function! ale#preview#ShowSelection(item_list, ...) abort + let l:options = get(a:000, 0, {}) + let l:sep = has('win32') ? '\' : '/' + let l:lines = [] + + " Create lines to display to users. + for l:item in a:item_list + let l:match = get(l:item, 'match', '') + let l:filename = l:item.filename + + if get(l:options, 'use_relative_paths') + let l:cwd = getcwd() " no-custom-checks + let l:filename = substitute(l:filename, '^' . l:cwd . l:sep, '', '') + endif + + call add( + \ l:lines, + \ l:filename + \ . ':' . l:item.line + \ . ':' . l:item.column + \ . (!empty(l:match) ? ' ' . l:match : ''), + \) + endfor + + call ale#preview#Show(l:lines, {'filetype': 'ale-preview-selection'}) + let b:ale_preview_item_list = a:item_list + let b:ale_preview_item_open_in = get(l:options, 'open_in', 'current-buffer') + + " Jump to an index for a previous selection, if set. + if has_key(l:options, 'jump_to_index') + let l:pos = getpos('.') + let l:pos[1] = l:options.jump_to_index + 1 + call setpos('.', l:pos) + endif + + " Remember preview state, so we can repeat it later. + call ale#preview#SetLastSelection(a:item_list, l:options) +endfunction + +function! ale#preview#RepeatSelection() abort + if !empty(s:last_list) + call ale#preview#ShowSelection(s:last_list, s:last_options) + endif +endfunction + +function! s:Open(open_in) abort + let l:item_list = get(b:, 'ale_preview_item_list', []) + let l:index = getpos('.')[1] - 1 + let l:item = get(l:item_list, l:index, {}) + + if empty(l:item) + return + endif + + " Remember an index to jump to when repeating a selection. + let s:last_options.jump_to_index = l:index + + :q! + + call ale#util#Open( + \ l:item.filename, + \ l:item.line, + \ l:item.column, + \ {'open_in': a:open_in}, + \) +endfunction + +function! ale#preview#OpenSelection() abort + call s:Open(b:ale_preview_item_open_in) +endfunction + +function! ale#preview#OpenSelectionInTab() abort + call s:Open('tab') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/python.vim b/dot_vim/plugged/ale/autoload/ale/python.vim new file mode 100644 index 0000000..7a99841 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/python.vim @@ -0,0 +1,170 @@ +" Author: w0rp +" Description: Functions for integrating with Python linters. + +call ale#Set('python_auto_pipenv', '0') +call ale#Set('python_auto_poetry', '0') + +let s:sep = has('win32') ? '\' : '/' +" bin is used for Unix virtualenv directories, and Scripts is for Windows. +let s:bin_dir = has('unix') ? 'bin' : 'Scripts' +let g:ale_virtualenv_dir_names = get(g:, 'ale_virtualenv_dir_names', [ +\ '.env', +\ '.venv', +\ 'env', +\ 've-py3', +\ 've', +\ 'virtualenv', +\ 'venv', +\]) + +function! ale#python#FindProjectRootIni(buffer) abort + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + " If you change this, update ale-python-root documentation. + if filereadable(l:path . '/MANIFEST.in') + \|| filereadable(l:path . '/setup.cfg') + \|| filereadable(l:path . '/pytest.ini') + \|| filereadable(l:path . '/tox.ini') + \|| filereadable(l:path . '/.pyre_configuration.local') + \|| filereadable(l:path . '/mypy.ini') + \|| filereadable(l:path . '/.mypy.ini') + \|| filereadable(l:path . '/pycodestyle.cfg') + \|| filereadable(l:path . '/.flake8') + \|| filereadable(l:path . '/.flake8rc') + \|| filereadable(l:path . '/pylama.ini') + \|| filereadable(l:path . '/pylintrc') + \|| filereadable(l:path . '/.pylintrc') + \|| filereadable(l:path . '/pyrightconfig.json') + \|| filereadable(l:path . '/pyrightconfig.toml') + \|| filereadable(l:path . '/Pipfile') + \|| filereadable(l:path . '/Pipfile.lock') + \|| filereadable(l:path . '/poetry.lock') + \|| filereadable(l:path . '/pyproject.toml') + \|| filereadable(l:path . '/.tool-versions') + return l:path + endif + endfor + + return '' +endfunction + +" Given a buffer number, find the project root directory for Python. +" The root directory is defined as the first directory found while searching +" upwards through paths, including the current directory, until a path +" containing an init file (one from MANIFEST.in, setup.cfg, pytest.ini, +" tox.ini) is found. If it is not possible to find the project root directory +" via init file, then it will be defined as the first directory found +" searching upwards through paths, including the current directory, until no +" __init__.py files is found. +function! ale#python#FindProjectRoot(buffer) abort + let l:ini_root = ale#python#FindProjectRootIni(a:buffer) + + if !empty(l:ini_root) + return l:ini_root + endif + + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + if !filereadable(l:path . '/__init__.py') + return l:path + endif + endfor + + return '' +endfunction + +" Given a buffer number, find a virtualenv path for Python. +function! ale#python#FindVirtualenv(buffer) abort + for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) + " Skip empty path components returned in MSYS. + if empty(l:path) + continue + endif + + for l:dirname in ale#Var(a:buffer, 'virtualenv_dir_names') + let l:venv_dir = ale#path#Simplify( + \ join([l:path, l:dirname], s:sep) + \) + let l:script_filename = ale#path#Simplify( + \ join([l:venv_dir, s:bin_dir, 'activate'], s:sep) + \) + + if filereadable(l:script_filename) + return l:venv_dir + endif + endfor + endfor + + return $VIRTUAL_ENV +endfunction + +" Given a buffer number and a command name, find the path to the executable. +" First search on a virtualenv for Python, if nothing is found, try the global +" command. Returns an empty string if cannot find the executable +function! ale#python#FindExecutable(buffer, base_var_name, path_list) abort + if ale#Var(a:buffer, a:base_var_name . '_use_global') + return ale#Var(a:buffer, a:base_var_name . '_executable') + endif + + let l:virtualenv = ale#python#FindVirtualenv(a:buffer) + + if !empty(l:virtualenv) + for l:path in a:path_list + let l:ve_executable = ale#path#Simplify( + \ join([l:virtualenv, s:bin_dir, l:path], s:sep) + \) + + if executable(l:ve_executable) + return l:ve_executable + endif + endfor + endif + + return ale#Var(a:buffer, a:base_var_name . '_executable') +endfunction + +" Handle traceback.print_exception() output starting in the first a:limit lines. +function! ale#python#HandleTraceback(lines, limit) abort + let l:nlines = len(a:lines) + let l:limit = a:limit > l:nlines ? l:nlines : a:limit + let l:start = 0 + + while l:start < l:limit + if a:lines[l:start] is# 'Traceback (most recent call last):' + break + endif + + let l:start += 1 + endwhile + + if l:start >= l:limit + return [] + endif + + let l:end = l:start + 1 + + " Traceback entries are always prefixed with 2 spaces. + " SyntaxError marker (if present) is prefixed with at least 4 spaces. + " Final exc line starts with exception class name (never a space). + while l:end < l:nlines && a:lines[l:end][0] is# ' ' + let l:end += 1 + endwhile + + let l:exc_line = l:end < l:nlines + \ ? a:lines[l:end] + \ : 'An exception was thrown.' + + return [{ + \ 'lnum': 1, + \ 'text': l:exc_line . ' (See :ALEDetail)', + \ 'detail': join(a:lines[(l:start):(l:end)], "\n"), + \}] +endfunction + +" Detects whether a pipenv environment is present. +function! ale#python#PipenvPresent(buffer) abort + return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# '' +endfunction + +" Detects whether a poetry environment is present. +function! ale#python#PoetryPresent(buffer) abort + return findfile('poetry.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# '' +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/racket.vim b/dot_vim/plugged/ale/autoload/ale/racket.vim new file mode 100644 index 0000000..ff89610 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/racket.vim @@ -0,0 +1,12 @@ +function! ale#racket#FindProjectRoot(buffer) abort + let l:cwd = expand('#' . a:buffer . ':p:h') + let l:highest_init = l:cwd + + for l:path in ale#path#Upwards(l:cwd) + if filereadable(l:path.'/init.rkt') + let l:highest_init = l:path + endif + endfor + + return l:highest_init +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/references.vim b/dot_vim/plugged/ale/autoload/ale/references.vim new file mode 100644 index 0000000..c32663f --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/references.vim @@ -0,0 +1,187 @@ +let g:ale_default_navigation = get(g:, 'ale_default_navigation', 'buffer') + +let s:references_map = {} + +" Used to get the references map in tests. +function! ale#references#GetMap() abort + return deepcopy(s:references_map) +endfunction + +" Used to set the references map in tests. +function! ale#references#SetMap(map) abort + let s:references_map = a:map +endfunction + +function! ale#references#ClearLSPData() abort + let s:references_map = {} +endfunction + +function! ale#references#FormatTSResponseItem(response_item, options) abort + if get(a:options, 'open_in') is# 'quickfix' + return { + \ 'filename': a:response_item.file, + \ 'lnum': a:response_item.start.line, + \ 'col': a:response_item.start.offset, + \} + else + return { + \ 'filename': a:response_item.file, + \ 'line': a:response_item.start.line, + \ 'column': a:response_item.start.offset, + \ 'match': substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''), + \} + endif +endfunction + +function! ale#references#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') is# 'references' + \&& has_key(s:references_map, a:response.request_seq) + let l:options = remove(s:references_map, a:response.request_seq) + + if get(a:response, 'success', v:false) is v:true + let l:item_list = [] + + for l:response_item in a:response.body.refs + call add( + \ l:item_list, + \ ale#references#FormatTSResponseItem(l:response_item, l:options) + \) + endfor + + if empty(l:item_list) + call ale#util#Execute('echom ''No references found.''') + else + if get(l:options, 'open_in') is# 'quickfix' + call setqflist([], 'r') + call setqflist(l:item_list, 'a') + call ale#util#Execute('cc 1') + else + call ale#preview#ShowSelection(l:item_list, l:options) + endif + endif + endif + endif +endfunction + +function! ale#references#FormatLSPResponseItem(response_item, options) abort + if get(a:options, 'open_in') is# 'quickfix' + return { + \ 'filename': ale#util#ToResource(a:response_item.uri), + \ 'lnum': a:response_item.range.start.line + 1, + \ 'col': a:response_item.range.start.character + 1, + \} + else + return { + \ 'filename': ale#util#ToResource(a:response_item.uri), + \ 'line': a:response_item.range.start.line + 1, + \ 'column': a:response_item.range.start.character + 1, + \} + endif +endfunction + +function! ale#references#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:references_map, a:response.id) + let l:options = remove(s:references_map, a:response.id) + + " The result can be a Dictionary item, a List of the same, or null. + let l:result = get(a:response, 'result', []) + let l:item_list = [] + + if type(l:result) is v:t_list + for l:response_item in l:result + call add(l:item_list, + \ ale#references#FormatLSPResponseItem(l:response_item, l:options) + \) + endfor + endif + + if empty(l:item_list) + call ale#util#Execute('echom ''No references found.''') + else + if get(l:options, 'open_in') is# 'quickfix' + call setqflist([], 'r') + call setqflist(l:item_list, 'a') + call ale#util#Execute('cc 1') + else + call ale#preview#ShowSelection(l:item_list, l:options) + endif + endif + endif +endfunction + +function! s:OnReady(line, column, options, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'references') + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#references#HandleTSServerResponse') + \ : function('ale#references#HandleLSPResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + if a:linter.lsp is# 'tsserver' + let l:message = ale#lsp#tsserver_message#References( + \ l:buffer, + \ a:line, + \ a:column + \) + else + " Send a message saying the buffer has changed first, or the + " references position probably won't make sense. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + let l:message = ale#lsp#message#References(l:buffer, a:line, a:column) + endif + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:references_map[l:request_id] = { + \ 'use_relative_paths': has_key(a:options, 'use_relative_paths') ? a:options.use_relative_paths : 0, + \ 'open_in': get(a:options, 'open_in', 'current-buffer'), + \} +endfunction + +function! ale#references#Find(...) abort + let l:options = {} + + if len(a:000) > 0 + for l:option in a:000 + if l:option is? '-relative' + let l:options.use_relative_paths = 1 + elseif l:option is? '-tab' + let l:options.open_in = 'tab' + elseif l:option is? '-split' + let l:options.open_in = 'split' + elseif l:option is? '-vsplit' + let l:options.open_in = 'vsplit' + elseif l:option is? '-quickfix' + let l:options.open_in = 'quickfix' + endif + endfor + endif + + if !has_key(l:options, 'open_in') + let l:default_navigation = ale#Var(bufnr(''), 'default_navigation') + + if index(['tab', 'split', 'vsplit'], l:default_navigation) >= 0 + let l:options.open_in = l:default_navigation + endif + endif + + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + let l:column = min([l:column, len(getline(l:line))]) + let l:Callback = function('s:OnReady', [l:line, l:column, l:options]) + + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call ale#lsp_linter#StartLSP(l:buffer, l:linter, l:Callback) + endif + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/rename.vim b/dot_vim/plugged/ale/autoload/ale/rename.vim new file mode 100644 index 0000000..a722cc9 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/rename.vim @@ -0,0 +1,210 @@ +" Author: Jerko Steiner +" Description: Rename symbol support for LSP / tsserver + +let s:rename_map = {} + +" Used to get the rename map in tests. +function! ale#rename#GetMap() abort + return deepcopy(s:rename_map) +endfunction + +" Used to set the rename map in tests. +function! ale#rename#SetMap(map) abort + let s:rename_map = a:map +endfunction + +function! ale#rename#ClearLSPData() abort + let s:rename_map = {} +endfunction + +let g:ale_rename_tsserver_find_in_comments = get(g:, 'ale_rename_tsserver_find_in_comments') +let g:ale_rename_tsserver_find_in_strings = get(g:, 'ale_rename_tsserver_find_in_strings') + +function! s:message(message) abort + call ale#util#Execute('echom ' . string(a:message)) +endfunction + +function! ale#rename#HandleTSServerResponse(conn_id, response) abort + if get(a:response, 'command', '') isnot# 'rename' + return + endif + + if !has_key(s:rename_map, a:response.request_seq) + return + endif + + let l:options = remove(s:rename_map, a:response.request_seq) + + let l:old_name = l:options.old_name + let l:new_name = l:options.new_name + + if get(a:response, 'success', v:false) is v:false + let l:message = get(a:response, 'message', 'unknown') + call s:message('Error renaming "' . l:old_name . '" to: "' . l:new_name + \ . '". Reason: ' . l:message) + + return + endif + + let l:changes = [] + + for l:response_item in a:response.body.locs + let l:filename = l:response_item.file + let l:text_changes = [] + + for l:loc in l:response_item.locs + call add(l:text_changes, { + \ 'start': { + \ 'line': l:loc.start.line, + \ 'offset': l:loc.start.offset, + \ }, + \ 'end': { + \ 'line': l:loc.end.line, + \ 'offset': l:loc.end.offset, + \ }, + \ 'newText': l:new_name, + \}) + endfor + + call add(l:changes, { + \ 'fileName': l:filename, + \ 'textChanges': l:text_changes, + \}) + endfor + + if empty(l:changes) + call s:message('Error renaming "' . l:old_name . '" to: "' . l:new_name . '"') + + return + endif + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'rename', + \ 'changes': l:changes, + \ }, + \ { + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, + \ }, + \) +endfunction + +function! ale#rename#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:rename_map, a:response.id) + let l:options = remove(s:rename_map, a:response.id) + + if !has_key(a:response, 'result') + call s:message('No rename result received from server') + + return + endif + + let l:changes_map = ale#code_action#GetChanges(a:response.result) + + if empty(l:changes_map) + call s:message('No changes received from server') + + return + endif + + let l:changes = ale#code_action#BuildChangesList(l:changes_map) + + call ale#code_action#HandleCodeAction( + \ { + \ 'description': 'rename', + \ 'changes': l:changes, + \ }, + \ { + \ 'conn_id': a:conn_id, + \ 'should_save': !&hidden, + \ }, + \) + endif +endfunction + +function! s:OnReady(line, column, options, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'rename') + return + endif + + let l:buffer = a:lsp_details.buffer + + let l:Callback = a:linter.lsp is# 'tsserver' + \ ? function('ale#rename#HandleTSServerResponse') + \ : function('ale#rename#HandleLSPResponse') + + call ale#lsp#RegisterCallback(l:id, l:Callback) + + if a:linter.lsp is# 'tsserver' + let l:message = ale#lsp#tsserver_message#Rename( + \ l:buffer, + \ a:line, + \ a:column, + \ g:ale_rename_tsserver_find_in_comments, + \ g:ale_rename_tsserver_find_in_strings, + \) + else + " Send a message saying the buffer has changed first, or the + " rename position probably won't make sense. + call ale#lsp#NotifyForChanges(l:id, l:buffer) + + let l:message = ale#lsp#message#Rename( + \ l:buffer, + \ a:line, + \ a:column, + \ a:options.new_name + \) + endif + + let l:request_id = ale#lsp#Send(l:id, l:message) + + let s:rename_map[l:request_id] = a:options +endfunction + +function! s:ExecuteRename(linter, options) abort + let l:buffer = bufnr('') + let [l:line, l:column] = getpos('.')[1:2] + + if a:linter.lsp isnot# 'tsserver' + let l:column = min([l:column, len(getline(l:line))]) + endif + + let l:Callback = function('s:OnReady', [l:line, l:column, a:options]) + call ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback) +endfunction + +function! ale#rename#Execute() abort + let l:lsp_linters = [] + + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + call add(l:lsp_linters, l:linter) + endif + endfor + + if empty(l:lsp_linters) + call s:message('No active LSPs') + + return + endif + + let l:old_name = expand('') + let l:new_name = ale#util#Input('New name: ', l:old_name) + + if empty(l:new_name) + call s:message('New name cannot be empty!') + + return + endif + + for l:lsp_linter in l:lsp_linters + call s:ExecuteRename(l:lsp_linter, { + \ 'old_name': l:old_name, + \ 'new_name': l:new_name, + \}) + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/ruby.vim b/dot_vim/plugged/ale/autoload/ale/ruby.vim new file mode 100644 index 0000000..d941bb2 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/ruby.vim @@ -0,0 +1,83 @@ +" Author: Eddie Lebow https://github.com/elebow +" Description: Functions for integrating with Ruby tools + +" Find the nearest dir containing "app", "db", and "config", and assume it is +" the root of a Rails app. +function! ale#ruby#FindRailsRoot(buffer) abort + for l:name in ['app', 'config', 'db'] + let l:dir = fnamemodify( + \ ale#path#FindNearestDirectory(a:buffer, l:name), + \ ':h:h' + \) + + if l:dir isnot# '.' + \&& isdirectory(l:dir . '/app') + \&& isdirectory(l:dir . '/config') + \&& isdirectory(l:dir . '/db') + return l:dir + endif + endfor + + return '' +endfunction + +" Find the nearest dir containing a potential ruby project. +function! ale#ruby#FindProjectRoot(buffer) abort + let l:dir = ale#ruby#FindRailsRoot(a:buffer) + + if isdirectory(l:dir) + return l:dir + endif + + for l:name in ['.solargraph.yml', 'Rakefile', 'Gemfile'] + let l:dir = fnamemodify( + \ ale#path#FindNearestFile(a:buffer, l:name), + \ ':h' + \) + + if l:dir isnot# '.' && isdirectory(l:dir) + return l:dir + endif + endfor + + return '' +endfunction + +" Handle output from rubocop and linters that depend on it (e.b. standardrb) +function! ale#ruby#HandleRubocopOutput(buffer, lines) abort + try + let l:errors = json_decode(a:lines[0]) + catch + return [] + endtry + + if !has_key(l:errors, 'summary') + \|| l:errors['summary']['offense_count'] == 0 + \|| empty(l:errors['files']) + return [] + endif + + let l:output = [] + + for l:error in l:errors['files'][0]['offenses'] + let l:start_col = l:error['location']['column'] + 0 + call add(l:output, { + \ 'lnum': l:error['location']['line'] + 0, + \ 'col': l:start_col, + \ 'end_col': l:start_col + l:error['location']['length'] - 1, + \ 'code': l:error['cop_name'], + \ 'text': l:error['message'], + \ 'type': ale_linters#ruby#rubocop#GetType(l:error['severity']), + \}) + endfor + + return l:output +endfunction + +function! ale#ruby#EscapeExecutable(executable, bundle_exec) abort + let l:exec_args = a:executable =~? 'bundle' + \ ? ' exec ' . a:bundle_exec + \ : '' + + return ale#Escape(a:executable) . l:exec_args +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/semver.vim b/dot_vim/plugged/ale/autoload/ale/semver.vim new file mode 100644 index 0000000..e3eb49c --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/semver.vim @@ -0,0 +1,78 @@ +let s:version_cache = {} + +" Reset the version cache used for parsing the version. +function! ale#semver#ResetVersionCache() abort + let s:version_cache = {} +endfunction + +function! ale#semver#ParseVersion(version_lines) abort + for l:line in a:version_lines + let l:match = matchlist(l:line, '\v(\d+)\.(\d+)(\.(\d+))?') + + if !empty(l:match) + return [l:match[1] + 0, l:match[2] + 0, l:match[4] + 0] + endif + endfor + + return [] +endfunction + +" Given an executable name and some lines of output, which can be empty, +" parse the version from the lines of output, or return the cached version +" triple [major, minor, patch] +" +" If the version cannot be found, an empty List will be returned instead. +function! s:GetVersion(executable, version_lines) abort + let l:version = get(s:version_cache, a:executable, []) + let l:parsed_version = ale#semver#ParseVersion(a:version_lines) + + if !empty(l:parsed_version) + let l:version = l:parsed_version + let s:version_cache[a:executable] = l:version + endif + + return l:version +endfunction + +function! ale#semver#RunWithVersionCheck(buffer, executable, command, Callback) abort + if empty(a:executable) + return '' + endif + + let l:cache = s:version_cache + + if has_key(s:version_cache, a:executable) + return a:Callback(a:buffer, s:version_cache[a:executable]) + endif + + return ale#command#Run( + \ a:buffer, + \ a:command, + \ {_, output -> a:Callback(a:buffer, s:GetVersion(a:executable, output))}, + \ {'output_stream': 'both', 'executable': a:executable} + \) +endfunction + +" Given two triples of integers [major, minor, patch], compare the triples +" and return 1 if the LHS is greater than or equal to the RHS. +" +" Pairs of [major, minor] can also be used for either argument. +" +" 0 will be returned if the LHS is an empty List. +function! ale#semver#GTE(lhs, rhs) abort + if empty(a:lhs) + return 0 + endif + + if a:lhs[0] > a:rhs[0] + return 1 + elseif a:lhs[0] == a:rhs[0] + if a:lhs[1] > a:rhs[1] + return 1 + elseif a:lhs[1] == a:rhs[1] + return get(a:lhs, 2) >= get(a:rhs, 2) + endif + endif + + return 0 +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/sign.vim b/dot_vim/plugged/ale/autoload/ale/sign.vim new file mode 100644 index 0000000..21e0631 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/sign.vim @@ -0,0 +1,496 @@ +scriptencoding utf8 +" Author: w0rp +" Description: Draws error and warning signs into signcolumn + +" This flag can be set to some integer to control the maximum number of signs +" that ALE will set. +let g:ale_max_signs = get(g:, 'ale_max_signs', -1) +" This flag can be set to 1 to enable changing the sign column colors when +" there are errors. +let g:ale_change_sign_column_color = get(g:, 'ale_change_sign_column_color', 0) +" These variables dictate what signs are used to indicate errors and warnings. +let g:ale_sign_error = get(g:, 'ale_sign_error', '>>') +let g:ale_sign_style_error = get(g:, 'ale_sign_style_error', g:ale_sign_error) +let g:ale_sign_warning = get(g:, 'ale_sign_warning', '--') +let g:ale_sign_style_warning = get(g:, 'ale_sign_style_warning', g:ale_sign_warning) +let g:ale_sign_info = get(g:, 'ale_sign_info', g:ale_sign_warning) +let g:ale_sign_priority = get(g:, 'ale_sign_priority', 30) +" This variable sets an offset which can be set for sign IDs. +" This ID can be changed depending on what IDs are set for other plugins. +" The dummy sign will use the ID exactly equal to the offset. +let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000) +" This flag can be set to 1 to keep sign gutter always open +let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0) +let g:ale_sign_highlight_linenrs = get(g:, 'ale_sign_highlight_linenrs', 0) + +let s:supports_sign_groups = has('nvim-0.4.2') || has('patch-8.1.614') + +if !hlexists('ALEErrorSign') + highlight link ALEErrorSign error +endif + +if !hlexists('ALEStyleErrorSign') + highlight link ALEStyleErrorSign ALEErrorSign +endif + +if !hlexists('ALEWarningSign') + highlight link ALEWarningSign todo +endif + +if !hlexists('ALEStyleWarningSign') + highlight link ALEStyleWarningSign ALEWarningSign +endif + +if !hlexists('ALEInfoSign') + highlight link ALEInfoSign ALEWarningSign +endif + +if !hlexists('ALESignColumnWithErrors') + highlight link ALESignColumnWithErrors error +endif + +function! ale#sign#SetUpDefaultColumnWithoutErrorsHighlight() abort + let l:verbose = &verbose + set verbose=0 + let l:output = execute('highlight SignColumn', 'silent') + let &verbose = l:verbose + + let l:highlight_syntax = join(split(l:output)[2:]) + let l:match = matchlist(l:highlight_syntax, '\vlinks to (.+)$') + + if !empty(l:match) + execute 'highlight link ALESignColumnWithoutErrors ' . l:match[1] + elseif l:highlight_syntax isnot# 'cleared' + execute 'highlight ALESignColumnWithoutErrors ' . l:highlight_syntax + endif +endfunction + +if !hlexists('ALESignColumnWithoutErrors') + call ale#sign#SetUpDefaultColumnWithoutErrorsHighlight() +endif + +" Spaces and backslashes need to be escaped for signs. +function! s:EscapeSignText(sign_text) abort + return substitute(substitute(a:sign_text, ' *$', '', ''), '\\\| ', '\\\0', 'g') +endfunction + +" Signs show up on the left for error markers. +execute 'sign define ALEErrorSign text=' . s:EscapeSignText(g:ale_sign_error) +\ . ' texthl=ALEErrorSign linehl=ALEErrorLine' +execute 'sign define ALEStyleErrorSign text=' . s:EscapeSignText(g:ale_sign_style_error) +\ . ' texthl=ALEStyleErrorSign linehl=ALEErrorLine' +execute 'sign define ALEWarningSign text=' . s:EscapeSignText(g:ale_sign_warning) +\ . ' texthl=ALEWarningSign linehl=ALEWarningLine' +execute 'sign define ALEStyleWarningSign text=' . s:EscapeSignText(g:ale_sign_style_warning) +\ . ' texthl=ALEStyleWarningSign linehl=ALEWarningLine' +execute 'sign define ALEInfoSign text=' . s:EscapeSignText(g:ale_sign_info) +\ . ' texthl=ALEInfoSign linehl=ALEInfoLine' +sign define ALEDummySign text=\ texthl=SignColumn + +if g:ale_sign_highlight_linenrs && has('nvim-0.3.2') + if !hlexists('ALEErrorSignLineNr') + highlight link ALEErrorSignLineNr CursorLineNr + endif + + if !hlexists('ALEStyleErrorSignLineNr') + highlight link ALEStyleErrorSignLineNr CursorLineNr + endif + + if !hlexists('ALEWarningSignLineNr') + highlight link ALEWarningSignLineNr CursorLineNr + endif + + if !hlexists('ALEStyleWarningSignLineNr') + highlight link ALEStyleWarningSignLineNr CursorLineNr + endif + + if !hlexists('ALEInfoSignLineNr') + highlight link ALEInfoSignLineNr CursorLineNr + endif + + sign define ALEErrorSign numhl=ALEErrorSignLineNr + sign define ALEStyleErrorSign numhl=ALEStyleErrorSignLineNr + sign define ALEWarningSign numhl=ALEWarningSignLineNr + sign define ALEStyleWarningSign numhl=ALEStyleWarningSignLineNr + sign define ALEInfoSign numhl=ALEInfoSignLineNr +endif + +function! ale#sign#GetSignName(sublist) abort + let l:priority = g:ale#util#style_warning_priority + + " Determine the highest priority item for the line. + for l:item in a:sublist + let l:item_priority = ale#util#GetItemPriority(l:item) + + if l:item_priority > l:priority + let l:priority = l:item_priority + endif + endfor + + if l:priority is# g:ale#util#error_priority + return 'ALEErrorSign' + endif + + if l:priority is# g:ale#util#warning_priority + return 'ALEWarningSign' + endif + + if l:priority is# g:ale#util#style_error_priority + return 'ALEStyleErrorSign' + endif + + if l:priority is# g:ale#util#style_warning_priority + return 'ALEStyleWarningSign' + endif + + if l:priority is# g:ale#util#info_priority + return 'ALEInfoSign' + endif + + " Use the error sign for invalid severities. + return 'ALEErrorSign' +endfunction + +function! s:PriorityCmd() abort + if s:supports_sign_groups + return ' priority=' . g:ale_sign_priority . ' ' + else + return '' + endif +endfunction + +function! s:GroupCmd() abort + if s:supports_sign_groups + return ' group=ale ' + else + return ' ' + endif +endfunction + +" Read sign data for a buffer to a list of lines. +function! ale#sign#ReadSigns(buffer) abort + let l:output = execute( + \ 'sign place ' . s:GroupCmd() . s:PriorityCmd() + \ . ' buffer=' . a:buffer + \ ) + + return split(l:output, "\n") +endfunction + +function! ale#sign#ParsePattern() abort + if s:supports_sign_groups + " Matches output like : + " line=4 id=1 group=ale name=ALEErrorSign + " Ñтрока=1 id=1000001 группа=ale имÑ=ALEErrorSign + " 行=1 識別å­=1000001 グループ=ale åå‰=ALEWarningSign + " línea=12 id=1000001 grupo=ale nombre=ALEWarningSign + " riga=1 id=1000001 gruppo=ale nome=ALEWarningSign + " Zeile=235 id=1000001 Gruppe=ale Name=ALEErrorSign + let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=ale>.*\=(ALE[a-zA-Z]+Sign)' + else + " Matches output like : + " line=4 id=1 name=ALEErrorSign + " Ñтрока=1 id=1000001 имÑ=ALEErrorSign + " 行=1 識別å­=1000001 åå‰=ALEWarningSign + " línea=12 id=1000001 nombre=ALEWarningSign + " riga=1 id=1000001 nome=ALEWarningSign + " Zeile=235 id=1000001 Name=ALEErrorSign + let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=(ALE[a-zA-Z]+Sign)' + endif + + return l:pattern +endfunction + +" Given a buffer number, return a List of placed signs [line, id, group] +function! ale#sign#ParseSignsWithGetPlaced(buffer) abort + let l:signs = sign_getplaced(a:buffer, { 'group': s:supports_sign_groups ? 'ale' : '' })[0].signs + let l:result = [] + let l:is_dummy_sign_set = 0 + + for l:sign in l:signs + if l:sign['name'] is# 'ALEDummySign' + let l:is_dummy_sign_set = 1 + else + call add(l:result, [ + \ str2nr(l:sign['lnum']), + \ str2nr(l:sign['id']), + \ l:sign['name'], + \]) + endif + endfor + + return [l:is_dummy_sign_set, l:result] +endfunction + +" Given a list of lines for sign output, return a List of [line, id, group] +function! ale#sign#ParseSigns(line_list) abort + let l:pattern =ale#sign#ParsePattern() + let l:result = [] + let l:is_dummy_sign_set = 0 + + for l:line in a:line_list + let l:match = matchlist(l:line, l:pattern) + + if len(l:match) > 0 + if l:match[3] is# 'ALEDummySign' + let l:is_dummy_sign_set = 1 + else + call add(l:result, [ + \ str2nr(l:match[1]), + \ str2nr(l:match[2]), + \ l:match[3], + \]) + endif + endif + endfor + + return [l:is_dummy_sign_set, l:result] +endfunction + +function! ale#sign#FindCurrentSigns(buffer) abort + if exists('*sign_getplaced') + return ale#sign#ParseSignsWithGetPlaced(a:buffer) + else + let l:line_list = ale#sign#ReadSigns(a:buffer) + + return ale#sign#ParseSigns(l:line_list) + endif +endfunction + +" Given a loclist, group the List into with one List per line. +function! s:GroupLoclistItems(buffer, loclist) abort + let l:grouped_items = [] + let l:last_lnum = -1 + + for l:obj in a:loclist + if l:obj.bufnr != a:buffer + continue + endif + + " Create a new sub-List when we hit a new line. + if l:obj.lnum != l:last_lnum + call add(l:grouped_items, []) + endif + + call add(l:grouped_items[-1], l:obj) + let l:last_lnum = l:obj.lnum + endfor + + return l:grouped_items +endfunction + +function! s:UpdateLineNumbers(buffer, current_sign_list, loclist) abort + let l:line_map = {} + let l:line_numbers_changed = 0 + + for [l:line, l:sign_id, l:name] in a:current_sign_list + let l:line_map[l:sign_id] = l:line + endfor + + for l:item in a:loclist + if l:item.bufnr == a:buffer + let l:lnum = get(l:line_map, get(l:item, 'sign_id', 0), 0) + + if l:lnum && l:item.lnum != l:lnum + let l:item.lnum = l:lnum + let l:line_numbers_changed = 1 + endif + endif + endfor + + " When the line numbers change, sort the list again + if l:line_numbers_changed + call sort(a:loclist, 'ale#util#LocItemCompare') + endif +endfunction + +function! s:BuildSignMap(buffer, current_sign_list, grouped_items) abort + let l:max_signs = ale#Var(a:buffer, 'max_signs') + + if l:max_signs is 0 + let l:selected_grouped_items = [] + elseif type(l:max_signs) is v:t_number && l:max_signs > 0 + let l:selected_grouped_items = a:grouped_items[:l:max_signs - 1] + else + let l:selected_grouped_items = a:grouped_items + endif + + let l:sign_map = {} + let l:sign_offset = g:ale_sign_offset + + for [l:line, l:sign_id, l:name] in a:current_sign_list + let l:sign_info = get(l:sign_map, l:line, { + \ 'current_id_list': [], + \ 'current_name_list': [], + \ 'new_id': 0, + \ 'new_name': '', + \ 'items': [], + \}) + + " Increment the sign offset for new signs, by the maximum sign ID. + if l:sign_id > l:sign_offset + let l:sign_offset = l:sign_id + endif + + " Remember the sign names and IDs in separate Lists, so they are easy + " to work with. + call add(l:sign_info.current_id_list, l:sign_id) + call add(l:sign_info.current_name_list, l:name) + + let l:sign_map[l:line] = l:sign_info + endfor + + for l:group in l:selected_grouped_items + let l:line = l:group[0].lnum + let l:sign_info = get(l:sign_map, l:line, { + \ 'current_id_list': [], + \ 'current_name_list': [], + \ 'new_id': 0, + \ 'new_name': '', + \ 'items': [], + \}) + + let l:sign_info.new_name = ale#sign#GetSignName(l:group) + let l:sign_info.items = l:group + + let l:index = index( + \ l:sign_info.current_name_list, + \ l:sign_info.new_name + \) + + if l:index >= 0 + " We have a sign with this name already, so use the same ID. + let l:sign_info.new_id = l:sign_info.current_id_list[l:index] + else + " This sign name replaces the previous name, so use a new ID. + let l:sign_info.new_id = l:sign_offset + 1 + let l:sign_offset += 1 + endif + + let l:sign_map[l:line] = l:sign_info + endfor + + return l:sign_map +endfunction + +function! ale#sign#GetSignCommands(buffer, was_sign_set, sign_map) abort + let l:command_list = [] + let l:is_dummy_sign_set = a:was_sign_set + + " Set the dummy sign if we need to. + " The dummy sign is needed to keep the sign column open while we add + " and remove signs. + if !l:is_dummy_sign_set && (!empty(a:sign_map) || g:ale_sign_column_always) + call add(l:command_list, 'sign place ' + \ . g:ale_sign_offset + \ . s:GroupCmd() + \ . s:PriorityCmd() + \ . ' line=1 name=ALEDummySign ' + \ . ' buffer=' . a:buffer + \) + let l:is_dummy_sign_set = 1 + endif + + " Place new items first. + for [l:line_str, l:info] in items(a:sign_map) + if l:info.new_id + " Save the sign IDs we are setting back on our loclist objects. + " These IDs will be used to preserve items which are set many times. + for l:item in l:info.items + let l:item.sign_id = l:info.new_id + endfor + + if index(l:info.current_id_list, l:info.new_id) < 0 + call add(l:command_list, 'sign place ' + \ . (l:info.new_id) + \ . s:GroupCmd() + \ . s:PriorityCmd() + \ . ' line=' . l:line_str + \ . ' name=' . (l:info.new_name) + \ . ' buffer=' . a:buffer + \) + endif + endif + endfor + + " Remove signs without new IDs. + for l:info in values(a:sign_map) + for l:current_id in l:info.current_id_list + if l:current_id isnot l:info.new_id + call add(l:command_list, 'sign unplace ' + \ . l:current_id + \ . s:GroupCmd() + \ . ' buffer=' . a:buffer + \) + endif + endfor + endfor + + " Remove the dummy sign to close the sign column if we need to. + if l:is_dummy_sign_set && !g:ale_sign_column_always + call add(l:command_list, 'sign unplace ' + \ . g:ale_sign_offset + \ . s:GroupCmd() + \ . ' buffer=' . a:buffer + \) + endif + + return l:command_list +endfunction + +" This function will set the signs which show up on the left. +function! ale#sign#SetSigns(buffer, loclist) abort + if !bufexists(str2nr(a:buffer)) + " Stop immediately when attempting to set signs for a buffer which + " does not exist. + return + endif + + " Find the current markers + let [l:is_dummy_sign_set, l:current_sign_list] = + \ ale#sign#FindCurrentSigns(a:buffer) + + " Update the line numbers for items from before which may have moved. + call s:UpdateLineNumbers(a:buffer, l:current_sign_list, a:loclist) + + " Group items after updating the line numbers. + let l:grouped_items = s:GroupLoclistItems(a:buffer, a:loclist) + + " Build a map of current and new signs, with the lines as the keys. + let l:sign_map = s:BuildSignMap( + \ a:buffer, + \ l:current_sign_list, + \ l:grouped_items, + \) + + let l:command_list = ale#sign#GetSignCommands( + \ a:buffer, + \ l:is_dummy_sign_set, + \ l:sign_map, + \) + + " Change the sign column color if the option is on. + if g:ale_change_sign_column_color && !empty(a:loclist) + highlight clear SignColumn + highlight link SignColumn ALESignColumnWithErrors + endif + + for l:command in l:command_list + silent! execute l:command + endfor + + " Reset the sign column color when there are no more errors. + if g:ale_change_sign_column_color && empty(a:loclist) + highlight clear SignColumn + highlight link SignColumn ALESignColumnWithoutErrors + endif +endfunction + +" Remove all signs. +function! ale#sign#Clear() abort + if s:supports_sign_groups + sign unplace group=ale * + else + sign unplace * + endif +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/socket.vim b/dot_vim/plugged/ale/autoload/ale/socket.vim new file mode 100644 index 0000000..61f11e7 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/socket.vim @@ -0,0 +1,151 @@ +" Author: w0rp +" Description: APIs for working with asynchronous sockets, with an API +" normalised between Vim 8 and NeoVim. Socket connections only work in NeoVim +" 0.3+, and silently do nothing in earlier NeoVim versions. +" +" Important functions are described below. They are: +" +" ale#socket#Open(address, options) -> channel_id (>= 0 if successful) +" ale#socket#IsOpen(channel_id) -> 1 if open, 0 otherwise +" ale#socket#Close(channel_id) +" ale#socket#Send(channel_id, data) +" ale#socket#GetAddress(channel_id) -> Return the address for a job + +let s:channel_map = get(s:, 'channel_map', {}) + +function! s:VimOutputCallback(channel, data) abort + let l:channel_id = ch_info(a:channel).id + + " Only call the callbacks for jobs which are valid. + if l:channel_id >= 0 && has_key(s:channel_map, l:channel_id) + call ale#util#GetFunction(s:channel_map[l:channel_id].callback)(l:channel_id, a:data) + endif +endfunction + +function! s:NeoVimOutputCallback(channel_id, data, event) abort + let l:info = s:channel_map[a:channel_id] + + if a:event is# 'data' + let l:info.last_line = ale#util#JoinNeovimOutput( + \ a:channel_id, + \ l:info.last_line, + \ a:data, + \ l:info.mode, + \ ale#util#GetFunction(l:info.callback), + \) + endif +endfunction + +" Open a socket for a given address. The following options are accepted: +" +" callback - A callback for receiving input. (required) +" +" A non-negative number representing a channel ID will be returned is the +" connection was successful. 0 is a valid channel ID in Vim, so test if the +" connection ID is >= 0. +function! ale#socket#Open(address, options) abort + let l:mode = get(a:options, 'mode', 'raw') + let l:Callback = a:options.callback + + let l:channel_info = { + \ 'address': a:address, + \ 'mode': l:mode, + \ 'callback': a:options.callback, + \} + + if !has('nvim') + " Vim + let l:channel_options = { + \ 'mode': l:mode, + \ 'waittime': 0, + \ 'callback': function('s:VimOutputCallback'), + \} + + " Use non-blocking writes for Vim versions that support the option. + if has('patch-8.1.350') + let l:channel_options.noblock = 1 + endif + + let l:channel_info.channel = ch_open(a:address, l:channel_options) + let l:vim_info = ch_info(l:channel_info.channel) + let l:channel_id = !empty(l:vim_info) ? l:vim_info.id : -1 + elseif exists('*chansend') && exists('*sockconnect') + " NeoVim 0.3+ + try + let l:channel_id = sockconnect(stridx(a:address, ':') != -1 ? 'tcp' : 'pipe', + \ a:address, {'on_data': function('s:NeoVimOutputCallback')}) + let l:channel_info.last_line = '' + catch /connection failed/ + let l:channel_id = -1 + endtry + + " 0 means the connection failed some times in NeoVim, so make the ID + " invalid to match Vim. + if l:channel_id is 0 + let l:channel_id = -1 + endif + + let l:channel_info.channel = l:channel_id + else + " Other Vim versions. + let l:channel_id = -1 + endif + + if l:channel_id >= 0 + let s:channel_map[l:channel_id] = l:channel_info + endif + + return l:channel_id +endfunction + +" Return 1 is a channel is open, 0 otherwise. +function! ale#socket#IsOpen(channel_id) abort + if !has_key(s:channel_map, a:channel_id) + return 0 + endif + + if has('nvim') + " In NeoVim, we have to check if this channel is in the global list. + return index(map(nvim_list_chans(), 'v:val.id'), a:channel_id) >= 0 + endif + + let l:channel = s:channel_map[a:channel_id].channel + + return ch_status(l:channel) is# 'open' +endfunction + +" Close a socket, if it's still open. +function! ale#socket#Close(channel_id) abort + " IsRunning isn't called here, so we don't check nvim_list_chans() + if !has_key(s:channel_map, a:channel_id) + return 0 + endif + + let l:channel = remove(s:channel_map, a:channel_id).channel + + if has('nvim') + silent! call chanclose(l:channel) + elseif ch_status(l:channel) is# 'open' + call ch_close(l:channel) + endif +endfunction + +" Send some data to a socket. +function! ale#socket#Send(channel_id, data) abort + if !has_key(s:channel_map, a:channel_id) + return + endif + + let l:channel = s:channel_map[a:channel_id].channel + + if has('nvim') + call chansend(l:channel, a:data) + else + call ch_sendraw(l:channel, a:data) + endif +endfunction + +" Get an address for a channel, or an empty string. +function! ale#socket#GetAddress(channel_id) abort + return get(get(s:channel_map, a:channel_id, {}), 'address', '') +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/statusline.vim b/dot_vim/plugged/ale/autoload/ale/statusline.vim new file mode 100644 index 0000000..6b93ba5 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/statusline.vim @@ -0,0 +1,135 @@ +" Author: KabbAmine +" Additions by: petpetpetpet +" Description: Statusline related function(s) + +function! s:CreateCountDict() abort + " Keys 0 and 1 are for backwards compatibility. + " The count object used to be a List of [error_count, warning_count]. + return { + \ '0': 0, + \ '1': 0, + \ 'error': 0, + \ 'warning': 0, + \ 'info': 0, + \ 'style_error': 0, + \ 'style_warning': 0, + \ 'total': 0, + \} +endfunction + +" Update the buffer error/warning count with data from loclist. +function! ale#statusline#Update(buffer, loclist) abort + if !exists('g:ale_buffer_info') || !has_key(g:ale_buffer_info, a:buffer) + return + endif + + let l:loclist = filter(copy(a:loclist), 'v:val.bufnr == a:buffer') + let l:count = s:CreateCountDict() + let l:count.total = len(l:loclist) + + " Allows easy access to the first instance of each problem type. + let l:first_problems = {} + + for l:entry in l:loclist + if l:entry.type is# 'W' + if get(l:entry, 'sub_type', '') is# 'style' + let l:count.style_warning += 1 + + if l:count.style_warning == 1 + let l:first_problems.style_warning = l:entry + endif + else + let l:count.warning += 1 + + if l:count.warning == 1 + let l:first_problems.warning = l:entry + endif + endif + elseif l:entry.type is# 'I' + let l:count.info += 1 + + if l:count.info == 1 + let l:first_problems.info = l:entry + endif + elseif get(l:entry, 'sub_type', '') is# 'style' + let l:count.style_error += 1 + + if l:count.style_error == 1 + let l:first_problems.style_error = l:entry + endif + else + let l:count.error += 1 + + if l:count.error == 1 + let l:first_problems.error = l:entry + endif + endif + endfor + + " Set keys for backwards compatibility. + let l:count[0] = l:count.error + l:count.style_error + let l:count[1] = l:count.total - l:count[0] + + let g:ale_buffer_info[a:buffer].count = l:count + let g:ale_buffer_info[a:buffer].first_problems = l:first_problems +endfunction + +" Get the counts for the buffer, and update the counts if needed. +function! s:UpdateCacheIfNecessary(buffer) abort + " Cache is cold, so manually ask for an update. + if !has_key(g:ale_buffer_info[a:buffer], 'count') + call ale#statusline#Update( + \ a:buffer, + \ g:ale_buffer_info[a:buffer].loclist + \) + endif +endfunction + +function! s:BufferCacheExists(buffer) abort + if !exists('g:ale_buffer_info') || !has_key(g:ale_buffer_info, a:buffer) + return 0 + endif + + return 1 +endfunction + +" Get the counts for the buffer, and update the counts if needed. +function! s:GetCounts(buffer) abort + if !s:BufferCacheExists(a:buffer) + return s:CreateCountDict() + endif + + call s:UpdateCacheIfNecessary(a:buffer) + + return g:ale_buffer_info[a:buffer].count +endfunction + +" Get the dict of first_problems, update the buffer info cache if necessary. +function! s:GetFirstProblems(buffer) abort + if !s:BufferCacheExists(a:buffer) + return {} + endif + + call s:UpdateCacheIfNecessary(a:buffer) + + return g:ale_buffer_info[a:buffer].first_problems +endfunction + +" Returns a Dictionary with counts for use in third party integrations. +function! ale#statusline#Count(buffer) abort + " The Dictionary is copied here before exposing it to other plugins. + return copy(s:GetCounts(a:buffer)) +endfunction + +" Returns a copy of the *first* locline instance of the specified problem +" type. (so this would allow an external integration to know all the info +" about the first style warning in the file, for example.) +function! ale#statusline#FirstProblem(buffer, type) abort + let l:first_problems = s:GetFirstProblems(a:buffer) + + if !empty(l:first_problems) && has_key(l:first_problems, a:type) + return copy(l:first_problems[a:type]) + endif + + return {} +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/swift.vim b/dot_vim/plugged/ale/autoload/ale/swift.vim new file mode 100644 index 0000000..3232d42 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/swift.vim @@ -0,0 +1,70 @@ +" Author: Dan Loman +" Description: Functions for integrating with Swift tools + +" Find the nearest dir containing a Package.swift file and assume it is the root of the Swift project. +function! ale#swift#FindProjectRoot(buffer) abort + let l:swift_config = ale#path#FindNearestFile(a:buffer, 'Package.swift') + + if !empty(l:swift_config) + return fnamemodify(l:swift_config, ':h') + endif + + return '' +endfunction + +" Support Apple Swift Format {{{1 + +call ale#Set('swift_appleswiftformat_executable', 'swift-format') +call ale#Set('swift_appleswiftformat_use_swiftpm', 0) + +" Return the executable depending on whether or not to use Swift Package Manager. +" +" If not asked to use Swift Package Manager (use_swiftpm = 0), the returned +" value is the global executable, else the returned value is 'swift' because +" the final command line will be `swift run swift-format ...`. +" +" Failure is expected if use_swiftpm is `1` but no Package.swift can be located. +function! ale#swift#GetAppleSwiftFormatExecutable(buffer) abort + if !ale#Var(a:buffer, 'swift_appleswiftformat_use_swiftpm') + return ale#Var(a:buffer, 'swift_appleswiftformat_executable') + endif + + if ale#path#FindNearestFile(a:buffer, 'Package.swift') is# '' + " If there is no Package.swift file, we don't use swift-format even if it exists, + " so we return '' to indicate failure. + return '' + endif + + return 'swift' +endfunction + +" Return the command depending on whether or not to use Swift Package Manager. +" +" If asked to use Swift Package Manager (use_swiftpm = 1), the command +" arguments are prefixed with 'swift run'. +" +" In either case, the configuration file is located and added to the command. +function! ale#swift#GetAppleSwiftFormatCommand(buffer) abort + let l:executable = ale#swift#GetAppleSwiftFormatExecutable(a:buffer) + let l:command_args = '' + + if ale#Var(a:buffer, 'swift_appleswiftformat_use_swiftpm') + let l:command_args = ' ' . 'run swift-format' + endif + + return ale#Escape(l:executable) . l:command_args +endfunction + +" Locate the nearest '.swift-format' configuration file, and return the +" arguments, else return an empty string. +function! ale#swift#GetAppleSwiftFormatConfigArgs(buffer) abort + let l:config_filepath = ale#path#FindNearestFile(a:buffer, '.swift-format') + + if l:config_filepath isnot# '' + return '--configuration' . ' ' . l:config_filepath + endif + + return '' +endfunction + +" }}} diff --git a/dot_vim/plugged/ale/autoload/ale/symbol.vim b/dot_vim/plugged/ale/autoload/ale/symbol.vim new file mode 100644 index 0000000..6c65f1b --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/symbol.vim @@ -0,0 +1,110 @@ +let s:symbol_map = {} + +" Used to get the symbol map in tests. +function! ale#symbol#GetMap() abort + return deepcopy(s:symbol_map) +endfunction + +" Used to set the symbol map in tests. +function! ale#symbol#SetMap(map) abort + let s:symbol_map = a:map +endfunction + +function! ale#symbol#ClearLSPData() abort + let s:symbol_map = {} +endfunction + +function! ale#symbol#HandleLSPResponse(conn_id, response) abort + if has_key(a:response, 'id') + \&& has_key(s:symbol_map, a:response.id) + let l:options = remove(s:symbol_map, a:response.id) + + let l:result = get(a:response, 'result', v:null) + let l:item_list = [] + + if type(l:result) is v:t_list + " Each item looks like this: + " { + " 'name': 'foo', + " 'kind': 123, + " 'deprecated': v:false, + " 'location': { + " 'uri': 'file://...', + " 'range': { + " 'start': {'line': 0, 'character': 0}, + " 'end': {'line': 0, 'character': 0}, + " }, + " }, + " 'containerName': 'SomeContainer', + " } + for l:response_item in l:result + let l:location = l:response_item.location + + call add(l:item_list, { + \ 'filename': ale#util#ToResource(l:location.uri), + \ 'line': l:location.range.start.line + 1, + \ 'column': l:location.range.start.character + 1, + \ 'match': l:response_item.name, + \}) + endfor + endif + + if empty(l:item_list) + call ale#util#Execute('echom ''No symbols found.''') + else + call ale#preview#ShowSelection(l:item_list, l:options) + endif + endif +endfunction + +function! s:OnReady(query, options, linter, lsp_details) abort + let l:id = a:lsp_details.connection_id + + if !ale#lsp#HasCapability(l:id, 'symbol_search') + return + endif + + let l:buffer = a:lsp_details.buffer + + " If we already made a request, stop here. + if getbufvar(l:buffer, 'ale_symbol_request_made', 0) + return + endif + + let l:Callback = function('ale#symbol#HandleLSPResponse') + call ale#lsp#RegisterCallback(l:id, l:Callback) + + let l:message = ale#lsp#message#Symbol(a:query) + let l:request_id = ale#lsp#Send(l:id, l:message) + + call setbufvar(l:buffer, 'ale_symbol_request_made', 1) + let s:symbol_map[l:request_id] = { + \ 'buffer': l:buffer, + \ 'use_relative_paths': has_key(a:options, 'use_relative_paths') ? a:options.use_relative_paths : 0 + \} +endfunction + +function! ale#symbol#Search(args) abort + let [l:opts, l:query] = ale#args#Parse(['relative'], a:args) + + if empty(l:query) + throw 'A non-empty string must be provided!' + endif + + let l:buffer = bufnr('') + let l:options = {} + + if has_key(l:opts, 'relative') + let l:options.use_relative_paths = 1 + endif + + " Set a flag so we only make one request. + call setbufvar(l:buffer, 'ale_symbol_request_made', 0) + let l:Callback = function('s:OnReady', [l:query, l:options]) + + for l:linter in ale#linter#Get(getbufvar(l:buffer, '&filetype')) + if !empty(l:linter.lsp) && l:linter.lsp isnot# 'tsserver' + call ale#lsp_linter#StartLSP(l:buffer, l:linter, l:Callback) + endif + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/test.vim b/dot_vim/plugged/ale/autoload/ale/test.vim new file mode 100644 index 0000000..e03ecb6 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/test.vim @@ -0,0 +1,205 @@ +" Author: w0rp +" Description: Functions for making testing ALE easier. +" +" This file should not typically be loaded during the normal execution of ALE. + +" Change the directory for checking things in particular test directories +" +" This function will set the g:dir variable, which represents the working +" directory after changing the path. This variable allows a test to change +" directories, and then switch back to a directory at the start of the test +" run. +" +" This function should be run in a Vader Before: block. +function! ale#test#SetDirectory(docker_path) abort + if a:docker_path[:len('/testplugin/') - 1] isnot# '/testplugin/' + throw 'docker_path must start with /testplugin/!' + endif + + " Try to switch directory, which will fail when running tests directly, + " and not through the Docker image. + silent! execute 'cd ' . fnameescape(a:docker_path) + let g:dir = getcwd() " no-custom-checks +endfunction + +" When g:dir is defined, switch back to the directory we saved, and then +" delete that variable. +" +" The filename will be reset to dummy.txt +" +" This function should be run in a Vader After: block. +function! ale#test#RestoreDirectory() abort + call ale#test#SetFilename('dummy.txt') + silent execute 'cd ' . fnameescape(g:dir) + unlet! g:dir +endfunction + +" Get a filename for the current buffer using a relative path to the script. +" +" If a g:dir variable is set, it will be used as the path to the directory +" containing the test file. +function! ale#test#GetFilename(path) abort + let l:dir = get(g:, 'dir', '') + + if empty(l:dir) + let l:dir = getcwd() " no-custom-checks + endif + + let l:full_path = ale#path#IsAbsolute(a:path) + \ ? a:path + \ : l:dir . '/' . a:path + + return ale#path#Simplify(l:full_path) +endfunction + +" Change the filename for the current buffer using a relative path to +" the script without running autocmd commands. +" +" If a g:dir variable is set, it will be used as the path to the directory +" containing the test file. +function! ale#test#SetFilename(path) abort + let l:full_path = ale#test#GetFilename(a:path) + silent! noautocmd execute 'file ' . fnameescape(l:full_path) +endfunction + +function! RemoveNewerKeys(results) abort + for l:item in a:results + if has_key(l:item, 'module') + call remove(l:item, 'module') + endif + + if has_key(l:item, 'end_col') + call remove(l:item, 'end_col') + endif + + if has_key(l:item, 'end_lnum') + call remove(l:item, 'end_lnum') + endif + endfor +endfunction + +" Return loclist data with only the keys supported by the lowest Vim versions. +function! ale#test#GetLoclistWithoutNewerKeys() abort + let l:results = getloclist(0) + call RemoveNewerKeys(l:results) + + return l:results +endfunction + +" Return quickfix data with only the keys supported by the lowest Vim versions. +function! ale#test#GetQflistWithoutNewerKeys() abort + let l:results = getqflist() + call RemoveNewerKeys(l:results) + + return l:results +endfunction + +function! ale#test#GetPreviewWindowText() abort + for l:window in range(1, winnr('$')) + if getwinvar(l:window, '&previewwindow', 0) + let l:buffer = winbufnr(l:window) + + return getbufline(l:buffer, 1, '$') + endif + endfor +endfunction + +" This function can be called with a timeout to wait for all jobs to finish. +" If the jobs to not finish in the given number of milliseconds, +" an exception will be thrown. +" +" The time taken will be a very rough approximation, and more time may be +" permitted than is specified. +function! ale#test#WaitForJobs(deadline) abort + let l:start_time = ale#events#ClockMilliseconds() + + if l:start_time == 0 + throw 'Failed to read milliseconds from the clock!' + endif + + let l:job_list = [] + + " Gather all of the jobs from every buffer. + for [l:buffer, l:data] in items(ale#command#GetData()) + call extend(l:job_list, map(keys(l:data.jobs), 'str2nr(v:val)')) + endfor + + " NeoVim has a built-in API for this, so use that. + if has('nvim') + let l:nvim_code_list = jobwait(l:job_list, a:deadline) + + if index(l:nvim_code_list, -1) >= 0 + throw 'Jobs did not complete on time!' + endif + + return + endif + + let l:should_wait_more = 1 + + while l:should_wait_more + let l:should_wait_more = 0 + + for l:job_id in l:job_list + if ale#job#IsRunning(l:job_id) + let l:now = ale#events#ClockMilliseconds() + + if l:now - l:start_time > a:deadline + " Stop waiting after a timeout, so we don't wait forever. + throw 'Jobs did not complete on time!' + endif + + " Wait another 10 milliseconds + let l:should_wait_more = 1 + sleep 10ms + break + endif + endfor + endwhile + + " Sleep for a small amount of time after all jobs finish. + " This seems to be enough to let handlers after jobs end run, and + " prevents the occasional failure where this function exits after jobs + " end, but before handlers are run. + sleep 10ms + + " We must check the buffer data again to see if new jobs started for + " linters with chained commands. + let l:has_new_jobs = 0 + + " Check again to see if any jobs are running. + for l:info in values(g:ale_buffer_info) + for [l:job_id, l:linter] in get(l:info, 'job_list', []) + if ale#job#IsRunning(l:job_id) + let l:has_new_jobs = 1 + break + endif + endfor + endfor + + if l:has_new_jobs + " We have to wait more. Offset the timeout by the time taken so far. + let l:now = ale#events#ClockMilliseconds() + let l:new_deadline = a:deadline - (l:now - l:start_time) + + if l:new_deadline <= 0 + " Enough time passed already, so stop immediately. + throw 'Jobs did not complete on time!' + endif + + call ale#test#WaitForJobs(l:new_deadline) + endif +endfunction + +function! ale#test#FlushJobs() abort + " The variable is checked for in a loop, as calling one series of + " callbacks can trigger a further series of callbacks. + while exists('g:ale_run_synchronously_callbacks') + let l:callbacks = g:ale_run_synchronously_callbacks + unlet g:ale_run_synchronously_callbacks + + for l:Callback in l:callbacks + call l:Callback() + endfor + endwhile +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/toggle.vim b/dot_vim/plugged/ale/autoload/ale/toggle.vim new file mode 100644 index 0000000..abc53da --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/toggle.vim @@ -0,0 +1,101 @@ +function! s:EnablePreamble() abort + " Set pattern options again, if enabled. + if get(g:, 'ale_pattern_options_enabled', 0) + call ale#pattern_options#SetOptions(bufnr('')) + endif + + " Lint immediately, including running linters against the file. + call ale#Queue(0, 'lint_file') +endfunction + +function! s:DisablePostamble() abort + " Remove highlights for the current buffer now. + if g:ale_set_highlights + call ale#highlight#UpdateHighlights() + endif + + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 + call ale#virtualtext#Clear(bufnr('')) + endif +endfunction + +function! ale#toggle#Toggle() abort + let g:ale_enabled = !get(g:, 'ale_enabled') + + if g:ale_enabled + call s:EnablePreamble() + + if g:ale_set_balloons + call ale#balloon#Enable() + endif + else + call ale#engine#CleanupEveryBuffer() + call s:DisablePostamble() + + if exists('*ale#balloon#Disable') + call ale#balloon#Disable() + endif + endif + + call ale#events#Init() +endfunction + +function! ale#toggle#Enable() abort + if !g:ale_enabled + call ale#toggle#Toggle() + endif +endfunction + +function! ale#toggle#Disable() abort + if g:ale_enabled + call ale#toggle#Toggle() + endif +endfunction + +function! ale#toggle#Reset() abort + call ale#engine#CleanupEveryBuffer() + call ale#highlight#UpdateHighlights() +endfunction + +function! ale#toggle#ToggleBuffer(buffer) abort + " Get the new value for the toggle. + let l:enabled = !getbufvar(a:buffer, 'ale_enabled', 1) + + " Disabling ALE globally removes autocmd events, so we cannot enable + " linting locally when linting is disabled globally + if l:enabled && !g:ale_enabled + " no-custom-checks + echom 'ALE cannot be enabled locally when disabled globally' + + return + endif + + call setbufvar(a:buffer, 'ale_enabled', l:enabled) + + if l:enabled + call s:EnablePreamble() + else + " Stop all jobs and clear the results for everything, and delete + " all of the data we stored for the buffer. + call ale#engine#Cleanup(a:buffer) + call s:DisablePostamble() + endif +endfunction + +function! ale#toggle#EnableBuffer(buffer) abort + " ALE is enabled by default for all buffers. + if !getbufvar(a:buffer, 'ale_enabled', 1) + call ale#toggle#ToggleBuffer(a:buffer) + endif +endfunction + +function! ale#toggle#DisableBuffer(buffer) abort + if getbufvar(a:buffer, 'ale_enabled', 1) + call ale#toggle#ToggleBuffer(a:buffer) + endif +endfunction + +function! ale#toggle#ResetBuffer(buffer) abort + call ale#engine#Cleanup(a:buffer) + call ale#highlight#UpdateHighlights() +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/uri.vim b/dot_vim/plugged/ale/autoload/ale/uri.vim new file mode 100644 index 0000000..d696f03 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/uri.vim @@ -0,0 +1,43 @@ +function! s:EncodeChar(char) abort + let l:result = '' + + for l:index in range(strlen(a:char)) + let l:result .= printf('%%%02x', char2nr(a:char[l:index])) + endfor + + return l:result +endfunction + +function! ale#uri#Encode(value) abort + return substitute( + \ a:value, + \ '\([^a-zA-Z0-9\\/$\-_.!*''(),]\)', + \ '\=s:EncodeChar(submatch(1))', + \ 'g' + \) +endfunction + +function! ale#uri#Decode(value) abort + return substitute( + \ a:value, + \ '%\(\x\x\)', + \ '\=printf("%c", str2nr(submatch(1), 16))', + \ 'g' + \) +endfunction + +let s:uri_handlers = { +\ 'jdt': { +\ 'OpenURILink': function('ale#uri#jdt#OpenJDTLink'), +\ } +\} + +function! ale#uri#GetURIHandler(uri) abort + for l:scheme in keys(s:uri_handlers) + if a:uri =~# '^'.l:scheme.'://' + return s:uri_handlers[scheme] + endif + endfor + + return v:null +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/uri/jdt.vim b/dot_vim/plugged/ale/autoload/ale/uri/jdt.vim new file mode 100644 index 0000000..46cea26 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/uri/jdt.vim @@ -0,0 +1,110 @@ +" Author: yoshi1123 +" Description: Functions for working with jdt:// URIs. + +function! s:OpenJDTLink(root, uri, line, column, options, result) abort + if has_key(a:result, 'error') + " no-custom-checks + echoerr a:result.error.message + + return + endif + + let l:contents = a:result['result'] + + if type(l:contents) is# type(v:null) + " no-custom-checks + echoerr 'File content not found' + endif + + " disable autocmd when opening buffer + autocmd! AleURISchemes + call ale#util#Open(a:uri, a:line, a:column, a:options) + autocmd AleURISchemes BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('')) + + if !empty(getbufvar(bufnr(''), 'ale_lsp_root', '')) + return + endif + + let b:ale_lsp_root = a:root + set filetype=java + + call setline(1, split(l:contents, '\n')) + call cursor(a:line, a:column) + normal! zz + + setlocal buftype=nofile nomodified nomodifiable readonly +endfunction + +" Load new buffer with jdt:// contents and jump to line and column. +function! ale#uri#jdt#OpenJDTLink(encoded_uri, line, column, options, conn_id) abort + let l:found_eclipselsp = v:false + + for l:linter in ale#linter#Get('java') + if l:linter.name is# 'eclipselsp' + let l:found_eclipselsp = v:true + endif + endfor + + if !l:found_eclipselsp + throw 'eclipselsp not running' + endif + + let l:root = a:conn_id[stridx(a:conn_id, ':')+1:] + let l:uri = a:encoded_uri + call ale#lsp_linter#SendRequest( + \ bufnr(''), + \ 'eclipselsp', + \ [0, 'java/classFileContents', {'uri': ale#util#ToURI(l:uri)}], + \ function('s:OpenJDTLink', [l:root, l:uri, a:line, a:column, a:options]) + \) +endfunction + +function! s:ReadClassFileContents(uri, result) abort + if has_key(a:result, 'error') + " no-custom-checks + echoerr a:result.error.message + + return + endif + + let l:contents = a:result['result'] + + if type(l:contents) is# type(v:null) + " no-custom-checks + echoerr 'File content not found' + endif + + call setline(1, split(l:contents, '\n')) + + setlocal buftype=nofile nomodified nomodifiable readonly +endfunction + +" Read jdt:// contents, as part of current project, into current buffer. +function! ale#uri#jdt#ReadJDTLink(encoded_uri) abort + if !empty(getbufvar(bufnr(''), 'ale_lsp_root', '')) + return + endif + + let l:linter_map = ale#lsp_linter#GetLSPLinterMap() + + for l:conn_id in keys(l:linter_map) + if l:linter_map[l:conn_id] is# 'eclipselsp' + let l:root = l:conn_id[stridx(l:conn_id, ':')+1:] + endif + endfor + + if l:root is# v:null + throw 'eclipselsp not running' + endif + + let l:uri = a:encoded_uri + let b:ale_lsp_root = l:root + set filetype=java + + call ale#lsp_linter#SendRequest( + \ bufnr(''), + \ 'eclipselsp', + \ [0, 'java/classFileContents', {'uri': ale#util#ToURI(l:uri)}], + \ function('s:ReadClassFileContents', [l:uri]) + \) +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/util.vim b/dot_vim/plugged/ale/autoload/ale/util.vim new file mode 100644 index 0000000..c884076 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/util.vim @@ -0,0 +1,574 @@ +" Author: w0rp +" Description: Contains miscellaneous functions + +" A wrapper function for mode() so we can test calls for it. +function! ale#util#Mode(...) abort + return call('mode', a:000) +endfunction + +" A wrapper function for feedkeys so we can test calls for it. +function! ale#util#FeedKeys(...) abort + return call('feedkeys', a:000) +endfunction + +" Show a message in as small a window as possible. +" +" Vim 8 does not support echoing long messages from asynchronous callbacks, +" but NeoVim does. Small messages can be echoed in Vim 8, and larger messages +" have to be shown in preview windows. +function! ale#util#ShowMessage(string, ...) abort + let l:options = get(a:000, 0, {}) + + if !has('nvim') + call ale#preview#CloseIfTypeMatches('ale-preview.message') + endif + + " We have to assume the user is using a monospace font. + if has('nvim') || (a:string !~? "\n" && len(a:string) < &columns) + " no-custom-checks + echo a:string + else + call ale#preview#Show(split(a:string, "\n"), extend( + \ { + \ 'filetype': 'ale-preview.message', + \ 'stay_here': 1, + \ }, + \ l:options, + \)) + endif +endfunction + +" A wrapper function for execute, so we can test executing some commands. +function! ale#util#Execute(expr) abort + execute a:expr +endfunction + +if !exists('g:ale#util#nul_file') + " A null file for sending output to nothing. + let g:ale#util#nul_file = '/dev/null' + + if has('win32') + let g:ale#util#nul_file = 'nul' + endif +endif + +" Given a job, a buffered line of data, a list of parts of lines, a mode data +" is being read in, and a callback, join the lines of output for a NeoVim job +" or socket together, and call the callback with the joined output. +" +" Note that jobs and IDs are the same thing on NeoVim. +function! ale#util#JoinNeovimOutput(job, last_line, data, mode, callback) abort + if a:mode is# 'raw' + call a:callback(a:job, join(a:data, "\n")) + + return '' + endif + + let l:lines = a:data[:-2] + + if len(a:data) > 1 + let l:lines[0] = a:last_line . l:lines[0] + let l:new_last_line = a:data[-1] + else + let l:new_last_line = a:last_line . get(a:data, 0, '') + endif + + for l:line in l:lines + call a:callback(a:job, l:line) + endfor + + return l:new_last_line +endfunction + +" Return the number of lines for a given buffer. +function! ale#util#GetLineCount(buffer) abort + return len(getbufline(a:buffer, 1, '$')) +endfunction + +function! ale#util#GetFunction(string_or_ref) abort + if type(a:string_or_ref) is v:t_string + return function(a:string_or_ref) + endif + + return a:string_or_ref +endfunction + +" Open the file (at the given line). +" options['open_in'] can be: +" current-buffer (default) +" tab +" split +" vsplit +function! ale#util#Open(filename, line, column, options) abort + let l:open_in = get(a:options, 'open_in', 'current-buffer') + let l:args_to_open = '+' . a:line . ' ' . fnameescape(a:filename) + + if l:open_in is# 'tab' + call ale#util#Execute('tabedit ' . l:args_to_open) + elseif l:open_in is# 'split' + call ale#util#Execute('split ' . l:args_to_open) + elseif l:open_in is# 'vsplit' + call ale#util#Execute('vsplit ' . l:args_to_open) + elseif bufnr(a:filename) isnot bufnr('') + " Open another file only if we need to. + call ale#util#Execute('edit ' . l:args_to_open) + else + normal! m` + endif + + call cursor(a:line, a:column) + normal! zz +endfunction + +let g:ale#util#error_priority = 5 +let g:ale#util#warning_priority = 4 +let g:ale#util#info_priority = 3 +let g:ale#util#style_error_priority = 2 +let g:ale#util#style_warning_priority = 1 + +function! ale#util#GetItemPriority(item) abort + if a:item.type is# 'I' + return g:ale#util#info_priority + endif + + if a:item.type is# 'W' + if get(a:item, 'sub_type', '') is# 'style' + return g:ale#util#style_warning_priority + endif + + return g:ale#util#warning_priority + endif + + if get(a:item, 'sub_type', '') is# 'style' + return g:ale#util#style_error_priority + endif + + return g:ale#util#error_priority +endfunction + +" Compare two loclist items for ALE, sorted by their buffers, filenames, and +" line numbers and column numbers. +function! ale#util#LocItemCompare(left, right) abort + if a:left.bufnr < a:right.bufnr + return -1 + endif + + if a:left.bufnr > a:right.bufnr + return 1 + endif + + if a:left.bufnr == -1 + if a:left.filename < a:right.filename + return -1 + endif + + if a:left.filename > a:right.filename + return 1 + endif + endif + + if a:left.lnum < a:right.lnum + return -1 + endif + + if a:left.lnum > a:right.lnum + return 1 + endif + + if a:left.col < a:right.col + return -1 + endif + + if a:left.col > a:right.col + return 1 + endif + + " When either of the items lacks a problem type, then the two items should + " be considered equal. This is important for loclist jumping. + if !has_key(a:left, 'type') || !has_key(a:right, 'type') + return 0 + endif + + let l:left_priority = ale#util#GetItemPriority(a:left) + let l:right_priority = ale#util#GetItemPriority(a:right) + + if l:left_priority < l:right_priority + return -1 + endif + + if l:left_priority > l:right_priority + return 1 + endif + + return 0 +endfunction + +" Compare two loclist items, including the text for the items. +" +" This function can be used for de-duplicating lists. +function! ale#util#LocItemCompareWithText(left, right) abort + let l:cmp_value = ale#util#LocItemCompare(a:left, a:right) + + if l:cmp_value + return l:cmp_value + endif + + if a:left.text < a:right.text + return -1 + endif + + if a:left.text > a:right.text + return 1 + endif + + return 0 +endfunction + +" This function will perform a binary search and a small sequential search +" on the list to find the last problem in the buffer and line which is +" on or before the column. The index of the problem will be returned. +" +" -1 will be returned if nothing can be found. +function! ale#util#BinarySearch(loclist, buffer, line, column) abort + let l:min = 0 + let l:max = len(a:loclist) - 1 + + while 1 + if l:max < l:min + return -1 + endif + + let l:mid = (l:min + l:max) / 2 + let l:item = a:loclist[l:mid] + + " Binary search for equal buffers, equal lines, then near columns. + if l:item.bufnr < a:buffer + let l:min = l:mid + 1 + elseif l:item.bufnr > a:buffer + let l:max = l:mid - 1 + elseif l:item.lnum < a:line + let l:min = l:mid + 1 + elseif l:item.lnum > a:line + let l:max = l:mid - 1 + else + " This part is a small sequential search. + let l:index = l:mid + + " Search backwards to find the first problem on the line. + while l:index > 0 + \&& a:loclist[l:index - 1].bufnr == a:buffer + \&& a:loclist[l:index - 1].lnum == a:line + let l:index -= 1 + endwhile + + " Find the last problem on or before this column. + while l:index < l:max + \&& a:loclist[l:index + 1].bufnr == a:buffer + \&& a:loclist[l:index + 1].lnum == a:line + \&& a:loclist[l:index + 1].col <= a:column + let l:index += 1 + endwhile + + " Scan forwards to find the last item on the column for the item + " we found, which will have the most serious problem. + let l:item_column = a:loclist[l:index].col + + while l:index < l:max + \&& a:loclist[l:index + 1].bufnr == a:buffer + \&& a:loclist[l:index + 1].lnum == a:line + \&& a:loclist[l:index + 1].col == l:item_column + let l:index += 1 + endwhile + + return l:index + endif + endwhile +endfunction + +" A function for testing if a function is running inside a sandbox. +" See :help sandbox +function! ale#util#InSandbox() abort + try + let &l:equalprg=&l:equalprg + catch /E48/ + " E48 is the sandbox error. + return 1 + endtry + + return 0 +endfunction + +function! ale#util#Tempname() abort + let l:clear_tempdir = 0 + + if exists('$TMPDIR') && empty($TMPDIR) + let l:clear_tempdir = 1 + let $TMPDIR = '/tmp' + endif + + try + let l:name = tempname() " no-custom-checks + finally + if l:clear_tempdir + let $TMPDIR = '' + endif + endtry + + return l:name +endfunction + +" Given a single line, or a List of lines, and a single pattern, or a List +" of patterns, return all of the matches for the lines(s) from the given +" patterns, using matchlist(). +" +" Only the first pattern which matches a line will be returned. +function! ale#util#GetMatches(lines, patterns) abort + let l:matches = [] + let l:lines = type(a:lines) is v:t_list ? a:lines : [a:lines] + let l:patterns = type(a:patterns) is v:t_list ? a:patterns : [a:patterns] + + for l:line in l:lines + for l:pattern in l:patterns + let l:match = matchlist(l:line, l:pattern) + + if !empty(l:match) + call add(l:matches, l:match) + break + endif + endfor + endfor + + return l:matches +endfunction + +" Given a single line, or a List of lines, and a single pattern, or a List of +" patterns, and a callback function for mapping the items matches, return the +" result of mapping all of the matches for the lines from the given patterns, +" using matchlist() +" +" Only the first pattern which matches a line will be returned. +function! ale#util#MapMatches(lines, patterns, Callback) abort + return map(ale#util#GetMatches(a:lines, a:patterns), 'a:Callback(v:val)') +endfunction + +function! s:LoadArgCount(function) abort + try + let l:output = execute('function a:function') + catch /E123/ + return 0 + endtry + + let l:match = matchstr(split(l:output, "\n")[0], '\v\([^)]+\)')[1:-2] + let l:arg_list = filter(split(l:match, ', '), 'v:val isnot# ''...''') + + return len(l:arg_list) +endfunction + +" Given the name of a function, a Funcref, or a lambda, return the number +" of named arguments for a function. +function! ale#util#FunctionArgCount(function) abort + let l:Function = ale#util#GetFunction(a:function) + let l:count = s:LoadArgCount(l:Function) + + " If we failed to get the count, forcibly load the autoload file, if the + " function is an autoload function. autoload functions aren't normally + " defined until they are called. + if l:count == 0 + let l:function_name = matchlist(string(l:Function), 'function([''"]\(.\+\)[''"])')[1] + + if l:function_name =~# '#' + execute 'runtime autoload/' . join(split(l:function_name, '#')[:-2], '/') . '.vim' + let l:count = s:LoadArgCount(l:Function) + endif + endif + + return l:count +endfunction + +" Escape a string so the characters in it will be safe for use inside of PCRE +" or RE2 regular expressions without characters having special meanings. +function! ale#util#EscapePCRE(unsafe_string) abort + return substitute(a:unsafe_string, '\([\-\[\]{}()*+?.^$|]\)', '\\\1', 'g') +endfunction + +" Escape a string so that it can be used as a literal string inside an evaled +" vim command. +function! ale#util#EscapeVim(unsafe_string) abort + return "'" . substitute(a:unsafe_string, "'", "''", 'g') . "'" +endfunction + + +" Given a String or a List of String values, try and decode the string(s) +" as a JSON value which can be decoded with json_decode. If the JSON string +" is invalid, the default argument value will be returned instead. +" +" This function is useful in code where the data can't be trusted to be valid +" JSON, and where throwing exceptions is mostly just irritating. +function! ale#util#FuzzyJSONDecode(data, default) abort + if empty(a:data) + return a:default + endif + + let l:str = type(a:data) is v:t_string ? a:data : join(a:data, '') + + try + let l:result = json_decode(l:str) + + " Vim 8 only uses the value v:none for decoding blank strings. + if !has('nvim') && l:result is v:none + return a:default + endif + + return l:result + catch /E474\|E491/ + return a:default + endtry +endfunction + +" Write a file, including carriage return characters for DOS files. +" +" The buffer number is required for determining the fileformat setting for +" the buffer. +function! ale#util#Writefile(buffer, lines, filename) abort + let l:corrected_lines = getbufvar(a:buffer, '&fileformat') is# 'dos' + \ ? map(copy(a:lines), 'substitute(v:val, ''\r*$'', ''\r'', '''')') + \ : a:lines + + " Set binary flag if buffer doesn't have eol and nofixeol to avoid appending newline + let l:flags = !getbufvar(a:buffer, '&eol') && exists('+fixeol') && !&fixeol ? 'bS' : 'S' + + call writefile(l:corrected_lines, a:filename, l:flags) " no-custom-checks +endfunction + +if !exists('s:patial_timers') + let s:partial_timers = {} +endif + +function! s:ApplyPartialTimer(timer_id) abort + if has_key(s:partial_timers, a:timer_id) + let [l:Callback, l:args] = remove(s:partial_timers, a:timer_id) + call call(l:Callback, [a:timer_id] + l:args) + endif +endfunction + +" Given a delay, a callback, a List of arguments, start a timer with +" timer_start() and call the callback provided with [timer_id] + args. +" +" The timer must not be stopped with timer_stop(). +" Use ale#util#StopPartialTimer() instead, which can stop any timer, and will +" clear any arguments saved for executing callbacks later. +function! ale#util#StartPartialTimer(delay, callback, args) abort + let l:timer_id = timer_start(a:delay, function('s:ApplyPartialTimer')) + let s:partial_timers[l:timer_id] = [a:callback, a:args] + + return l:timer_id +endfunction + +function! ale#util#StopPartialTimer(timer_id) abort + call timer_stop(a:timer_id) + + if has_key(s:partial_timers, a:timer_id) + call remove(s:partial_timers, a:timer_id) + endif +endfunction + +" Given a possibly multi-byte string and a 1-based character position on a +" line, return the 1-based byte position on that line. +function! ale#util#Col(str, chr) abort + if a:chr < 2 + return a:chr + endif + + return strlen(join(split(a:str, '\zs')[0:a:chr - 2], '')) + 1 +endfunction + +function! ale#util#FindItemAtCursor(buffer) abort + let l:info = get(g:ale_buffer_info, a:buffer, {}) + let l:loclist = get(l:info, 'loclist', []) + let l:pos = getpos('.') + let l:index = ale#util#BinarySearch(l:loclist, a:buffer, l:pos[1], l:pos[2]) + let l:loc = l:index >= 0 ? l:loclist[l:index] : {} + + return [l:info, l:loc] +endfunction + +function! ale#util#Input(message, value, ...) abort + if a:0 > 0 + return input(a:message, a:value, a:1) + else + return input(a:message, a:value) + endif +endfunction + +function! ale#util#HasBuflineApi() abort + return exists('*deletebufline') && exists('*setbufline') +endfunction + +" Sets buffer contents to lines +function! ale#util#SetBufferContents(buffer, lines) abort + let l:has_bufline_api = ale#util#HasBuflineApi() + + if !l:has_bufline_api && a:buffer isnot bufnr('') + return + endif + + " If the file is in DOS mode, we have to remove carriage returns from + " the ends of lines before calling setline(), or we will see them + " twice. + let l:new_lines = getbufvar(a:buffer, '&fileformat') is# 'dos' + \ ? map(copy(a:lines), 'substitute(v:val, ''\r\+$'', '''', '''')') + \ : a:lines + let l:first_line_to_remove = len(l:new_lines) + 1 + + " Use a Vim API for setting lines in other buffers, if available. + if l:has_bufline_api + call setbufline(a:buffer, 1, l:new_lines) + call deletebufline(a:buffer, l:first_line_to_remove, '$') + " Fall back on setting lines the old way, for the current buffer. + else + let l:old_line_length = line('$') + + if l:old_line_length >= l:first_line_to_remove + let l:save = winsaveview() + silent execute + \ l:first_line_to_remove . ',' . l:old_line_length . 'd_' + call winrestview(l:save) + endif + + call setline(1, l:new_lines) + endif + + return l:new_lines +endfunction + +function! ale#util#GetBufferContents(buffer) abort + return join(getbufline(a:buffer, 1, '$'), '\n') . '\n' +endfunction + +function! ale#util#ToURI(resource) abort + let l:uri_handler = ale#uri#GetURIHandler(a:resource) + + if l:uri_handler is# v:null + " resource is a filesystem path + let l:uri = ale#path#ToFileURI(a:resource) + else + " resource is a URI + let l:uri = a:resource + endif + + return l:uri +endfunction + +function! ale#util#ToResource(uri) abort + let l:uri_handler = ale#uri#GetURIHandler(a:uri) + + if l:uri_handler is# v:null + " resource is a filesystem path + let l:resource = ale#path#FromFileURI(a:uri) + else + " resource is a URI + let l:resource = a:uri + endif + + return l:resource +endfunction diff --git a/dot_vim/plugged/ale/autoload/ale/virtualtext.vim b/dot_vim/plugged/ale/autoload/ale/virtualtext.vim new file mode 100644 index 0000000..0f2b217 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/ale/virtualtext.vim @@ -0,0 +1,248 @@ +scriptencoding utf-8 +" Author: w0rp +" Author: Luan Santos +" Description: Shows lint message for the current line as virtualtext, if any + +if !hlexists('ALEVirtualTextError') + highlight link ALEVirtualTextError Comment +endif + +if !hlexists('ALEVirtualTextStyleError') + highlight link ALEVirtualTextStyleError ALEVirtualTextError +endif + +if !hlexists('ALEVirtualTextWarning') + highlight link ALEVirtualTextWarning Comment +endif + +if !hlexists('ALEVirtualTextStyleWarning') + highlight link ALEVirtualTextStyleWarning ALEVirtualTextWarning +endif + +if !hlexists('ALEVirtualTextInfo') + highlight link ALEVirtualTextInfo ALEVirtualTextWarning +endif + +let g:ale_virtualtext_prefix = +\ get(g:, 'ale_virtualtext_prefix', '%comment% %type%: ') +" Controls the milliseconds delay before showing a message. +let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10) + +let s:cursor_timer = get(s:, 'cursor_timer', -1) +let s:last_pos = get(s:, 'last_pos', [0, 0, 0]) +let s:hl_list = get(s:, 'hl_list', []) +let s:last_message = '' + +if !has_key(s:, 'has_virt_text') + let s:has_virt_text = 0 + let s:emulate_virt = 0 + let s:last_virt = -1 + + if has('nvim-0.3.2') + let s:ns_id = nvim_create_namespace('ale') + let s:has_virt_text = 1 + elseif has('textprop') && has('popupwin') + let s:has_virt_text = 1 + let s:emulate_virt = !has('patch-9.0.0297') + + if s:emulate_virt + call prop_type_add('ale', {}) + endif + endif +endif + +function! s:StopCursorTimer() abort + if s:cursor_timer != -1 + call timer_stop(s:cursor_timer) + let s:cursor_timer = -1 + endif +endfunction + +function! ale#virtualtext#ResetDataForTests() abort + let s:last_pos = [0, 0, 0] + let s:last_message = '' +endfunction + +function! ale#virtualtext#GetLastMessageForTests() abort + return s:last_message +endfunction + +function! ale#virtualtext#GetComment(buffer) abort + let l:filetype = getbufvar(a:buffer, '&filetype') + let l:split = split(getbufvar(a:buffer, '&commentstring'), '%s') + + return !empty(l:split) ? trim(l:split[0]) : '#' +endfunction + +function! ale#virtualtext#Clear(buffer) abort + if !s:has_virt_text || !bufexists(str2nr(a:buffer)) + return + endif + + if has('nvim') + call nvim_buf_clear_namespace(a:buffer, s:ns_id, 0, -1) + else + if s:emulate_virt && s:last_virt != -1 + call prop_remove({'type': 'ale'}) + call popup_close(s:last_virt) + let s:last_virt = -1 + elseif !empty(s:hl_list) + call prop_remove({ + \ 'types': s:hl_list, + \ 'all': 1, + \ 'bufnr': a:buffer, + \}) + endif + endif +endfunction + +function! ale#virtualtext#GetGroup(item) abort + let l:type = get(a:item, 'type', 'E') + let l:sub_type = get(a:item, 'sub_type', '') + + if l:type is# 'E' + if l:sub_type is# 'style' + return 'ALEVirtualTextStyleError' + endif + + return 'ALEVirtualTextError' + endif + + if l:type is# 'W' + if l:sub_type is# 'style' + return 'ALEVirtualTextStyleWarning' + endif + + return 'ALEVirtualTextWarning' + endif + + return 'ALEVirtualTextInfo' +endfunction + +function! ale#virtualtext#ShowMessage(buffer, item) abort + if !s:has_virt_text || !bufexists(str2nr(a:buffer)) + return + endif + + let l:line = max([1, a:item.lnum]) + let l:hl_group = ale#virtualtext#GetGroup(a:item) + + " Get a language-appropriate comment character, or default to '#'. + let l:comment = ale#virtualtext#GetComment(a:buffer) + let l:prefix = ale#Var(a:buffer, 'virtualtext_prefix') + let l:prefix = ale#GetLocItemMessage(a:item, l:prefix) + let l:prefix = substitute(l:prefix, '\V%comment%', '\=l:comment', 'g') + let l:msg = l:prefix . substitute(a:item.text, '\n', ' ', 'g') + + " Store the last message we're going to set so we can read it in tests. + let s:last_message = l:msg + + if has('nvim') + call nvim_buf_set_virtual_text( + \ a:buffer, + \ s:ns_id, l:line - 1, + \ [[l:msg, l:hl_group]], + \ {} + \) + elseif s:emulate_virt + let l:left_pad = col('$') + call prop_add(l:line, l:left_pad, {'type': 'ale'}) + let s:last_virt = popup_create(l:msg, { + \ 'line': -1, + \ 'padding': [0, 0, 0, 1], + \ 'mask': [[1, 1, 1, 1]], + \ 'textprop': 'ale', + \ 'highlight': l:hl_group, + \ 'fixed': 1, + \ 'wrap': 0, + \ 'zindex': 2 + \}) + else + let l:type = prop_type_get(l:hl_group) + + if l:type == {} + call prop_type_add(l:hl_group, {'highlight': l:hl_group}) + endif + + " Add highlight groups to the list so we can clear them later. + if index(s:hl_list, l:hl_group) == -1 + call add(s:hl_list, l:hl_group) + endif + + " We ignore all errors from prop_add. + silent! call prop_add(l:line, 0, { + \ 'type': l:hl_group, + \ 'text': ' ' . l:msg, + \ 'bufnr': a:buffer, + \}) + endif +endfunction + +function! ale#virtualtext#ShowCursorWarning(...) abort + if g:ale_virtualtext_cursor isnot# 'current' + \&& g:ale_virtualtext_cursor != 1 + return + endif + + let l:buffer = bufnr('') + + if mode(1) isnot# 'n' + return + endif + + if ale#ShouldDoNothing(l:buffer) + return + endif + + let [l:info, l:item] = ale#util#FindItemAtCursor(l:buffer) + call ale#virtualtext#Clear(l:buffer) + + if !empty(l:item) + call ale#virtualtext#ShowMessage(l:buffer, l:item) + endif +endfunction + +function! ale#virtualtext#ShowCursorWarningWithDelay() abort + let l:buffer = bufnr('') + + if g:ale_virtualtext_cursor isnot# 'current' + \&& g:ale_virtualtext_cursor != 1 + return + endif + + if mode(1) isnot# 'n' + return + endif + + call s:StopCursorTimer() + + let l:pos = getpos('.')[0:2] + + " Check the current buffer, line, and column number against the last + " recorded position. If the position has actually changed, *then* + " we should show something. Otherwise we can end up doing processing + " the show message far too frequently. + if l:pos != s:last_pos + let l:delay = ale#Var(l:buffer, 'virtualtext_delay') + + let s:last_pos = l:pos + let s:cursor_timer = timer_start( + \ l:delay, + \ function('ale#virtualtext#ShowCursorWarning') + \) + endif +endfunction + +function! ale#virtualtext#SetTexts(buffer, loclist) abort + if !has('nvim') && s:emulate_virt + return + endif + + call ale#virtualtext#Clear(a:buffer) + + for l:item in a:loclist + if l:item.bufnr == a:buffer + call ale#virtualtext#ShowMessage(a:buffer, l:item) + endif + endfor +endfunction diff --git a/dot_vim/plugged/ale/autoload/asyncomplete/sources/ale.vim b/dot_vim/plugged/ale/autoload/asyncomplete/sources/ale.vim new file mode 100644 index 0000000..ce79377 --- /dev/null +++ b/dot_vim/plugged/ale/autoload/asyncomplete/sources/ale.vim @@ -0,0 +1,26 @@ +function! asyncomplete#sources#ale#get_source_options(...) abort + let l:default = extend({ + \ 'name': 'ale', + \ 'completor': function('asyncomplete#sources#ale#completor'), + \ 'whitelist': ['*'], + \ 'triggers': asyncomplete#sources#ale#get_triggers(), + \ }, a:0 >= 1 ? a:1 : {}) + + return extend(l:default, {'refresh_pattern': '\k\+$'}) +endfunction + +function! asyncomplete#sources#ale#get_triggers() abort + let l:triggers = ale#completion#GetAllTriggers() + let l:triggers['*'] = l:triggers[''] + + return l:triggers +endfunction + +function! asyncomplete#sources#ale#completor(options, context) abort + let l:keyword = matchstr(a:context.typed, '\w\+$') + let l:startcol = a:context.col - len(l:keyword) + + call ale#completion#GetCompletions('ale-callback', { 'callback': {completions -> + \ asyncomplete#complete(a:options.name, a:context, l:startcol, completions) + \ }}) +endfunction diff --git a/dot_vim/plugged/ale/doc/ale-ada.txt b/dot_vim/plugged/ale/doc/ale-ada.txt new file mode 100644 index 0000000..80321db --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ada.txt @@ -0,0 +1,71 @@ +=============================================================================== +ALE Ada Integration *ale-ada-options* + + +=============================================================================== +cspell *ale-ada-cspell* + +See |ale-cspell-options| + +=============================================================================== +gcc *ale-ada-gcc* + +g:ale_ada_gcc_executable *g:ale_ada_gcc_executable* + *b:ale_ada_gcc_executable* + Type: |String| + Default: `'gcc'` + +This variable can be changed to use a different executable for gcc. + + +g:ale_ada_gcc_options *g:ale_ada_gcc_options* + *b:ale_ada_gcc_options* + Type: |String| + Default: `'-gnatwa -gnatq'` + + This variable can be set to pass additional options to gcc. + + +=============================================================================== +gnatpp *ale-ada-gnatpp* + +g:ale_ada_gnatpp_options *g:ale_ada_gnatpp_options* + *b:ale_ada_gnatpp_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to the gnatpp fixer. + + +=============================================================================== +ada-language-server *ale-ada-language-server* + +g:ale_ada_adals_executable *g:ale_ada_adals_executable* + *b:ale_ada_adals_executable* + Type: |String| + Default: `'ada_language_server'` + + This variable can be changed to use a different executable for Ada Language + Server. + + +g:ale_ada_adals_project *g:ale_ada_adals_project* + *b:ale_ada_adals_project* + Type: |String| + Default: `'default.gpr'` + +This variable can be changed to use a different GPR file for +Ada Language Server. + + +g:ale_ada_adals_encoding *g:ale_ada_adals_encoding* + *b:ale_ada_adals_encoding* + Type: |String| + Default: `'utf-8'` + +This variable can be changed to use a different file encoding for +Ada Language Server. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-ansible.txt b/dot_vim/plugged/ale/doc/ale-ansible.txt new file mode 100644 index 0000000..41442b0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ansible.txt @@ -0,0 +1,39 @@ +=============================================================================== +ALE Ansible Integration *ale-ansible-options* + +=============================================================================== +ansible-language-server *ale-ansible-language-server* + + +g:ale_ansible_language_server_executable *g:ale_ansible_language_server* + *b:ale_ansible_language_server* + + Type: |String| + Default: 'ansible-language-server' + + Variable can be used to modify the executable used for ansible language server. + + +g:ale_ansible_language_server_config *g:ale_ansible_language_server_config* + *b:ale_ansible_language_server_config* + + Type: |Dictionary| + Default: '{}' + + Configuration parameters sent to the language server on start. Refer to the + ansible language server configuration documentation for list of available + options: https://als.readthedocs.io/en/latest/settings/ + +=============================================================================== +ansible-lint *ale-ansible-ansible-lint* + +g:ale_ansible_ansible_lint_executable *g:ale_ansible_ansible_lint_executable* + *b:ale_ansible_ansible_lint_executable* + Type: |String| + Default: `'ansible-lint'` + + This variable can be changed to modify the executable used for ansible-lint. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-apkbuild.txt b/dot_vim/plugged/ale/doc/ale-apkbuild.txt new file mode 100644 index 0000000..0526140 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-apkbuild.txt @@ -0,0 +1,30 @@ +=============================================================================== +ALE APKBUILD Integration *ale-apkbuild-options* + + +=============================================================================== +apkbuild-lint *ale-apkbuild-apkbuild-lint* + +g:ale_apkbuild_apkbuild_lint_executable + *g:ale_apkbuild_apkbuild_lint_executable* + *b:ale_apkbuild_apkbuild_lint_executable* + + Type: |String| + Default: `'apkbuild-lint'` + + This variable can be set to change the path to apkbuild-lint + +=============================================================================== +secfixes-check *ale-apkbuild-secfixes-check* + +g:ale_apkbuild_secfixes_check_executable + *g:ale_apkbuild_secfixes_check_executable* + *b:ale_apkbuild_secfixes_check_executable* + + Type: |String| + Default: `'secfixes-check'` + + This variable can be set to change the path to secfixes-check + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-asciidoc.txt b/dot_vim/plugged/ale/doc/ale-asciidoc.txt new file mode 100644 index 0000000..dd8b12f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-asciidoc.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE AsciiDoc Integration *ale-asciidoc-options* + + +=============================================================================== +cspell *ale-asciidoc-cspell* + +See |ale-cspell-options| + + +=============================================================================== +write-good *ale-asciidoc-write-good* + +See |ale-write-good-options| + + +=============================================================================== +textlint *ale-asciidoc-textlint* + +See |ale-text-textlint| + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-asm.txt b/dot_vim/plugged/ale/doc/ale-asm.txt new file mode 100644 index 0000000..a97c6d0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-asm.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE ASM Integration *ale-asm-options* + + +=============================================================================== +gcc *ale-asm-gcc* + +g:ale_asm_gcc_executable *g:ale_asm_gcc_executable* + *b:ale_asm_gcc_executable* + Type: |String| + Default: `'gcc'` + +This variable can be changed to use a different executable for gcc. + + +g:ale_asm_gcc_options *g:ale_asm_gcc_options* + *b:ale_asm_gcc_options* + Type: |String| + Default: `'-Wall'` + + This variable can be set to pass additional options to gcc. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-avra.txt b/dot_vim/plugged/ale/doc/ale-avra.txt new file mode 100644 index 0000000..a61913a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-avra.txt @@ -0,0 +1,26 @@ +=============================================================================== +ALE AVRA Integration *ale-avra-options* + + +=============================================================================== +avra *ale-avra-avra* + +g:ale_avra_avra_executable *g:ale_avra_avra_executable* + *b:ale_avra_avra_executable* + + Type: |String| + Default `'avra'` + + This variable can be changed to use different executable for AVRA. + + +g:ale_avra_avra_options *g:ale_avra_avra_options* + *b:ale_avra_avra_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to AVRA. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-awk.txt b/dot_vim/plugged/ale/doc/ale-awk.txt new file mode 100644 index 0000000..b9c5c34 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-awk.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE Awk Integration *ale-awk-options* + + +=============================================================================== +gawk *ale-awk-gawk* + +g:ale_awk_gawk_executable *g:ale_awk_gawk_executable* + *b:ale_awk_gawk_executable* + Type: |String| + Default: `'gawk'` + + This variable sets executable used for gawk. + + +g:ale_awk_gawk_options *g:ale_awk_gawk_options* + *b:ale_awk_gawk_options* + Type: |String| + Default: `''` + + With this variable we are able to pass extra arguments for gawk + for invocation. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-bats.txt b/dot_vim/plugged/ale/doc/ale-bats.txt new file mode 100644 index 0000000..cf2199e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-bats.txt @@ -0,0 +1,13 @@ +=============================================================================== +ALE Bats Integration *ale-bats-options* + + +=============================================================================== +shellcheck *ale-bats-shellcheck* + +The `shellcheck` linter for Bats uses the sh options for `shellcheck`; see: +|ale-sh-shellcheck|. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-bazel.txt b/dot_vim/plugged/ale/doc/ale-bazel.txt new file mode 100644 index 0000000..e2922aa --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-bazel.txt @@ -0,0 +1,28 @@ +=============================================================================== +ALE Bazel Integration *ale-bazel-options* + +=============================================================================== +buildifier *ale-bazel-buildifier* + +g:ale_bazel_buildifier_executable *g:ale_bazel_buildifier_executable* + *b:ale_bazel_buildifier_executable* + Type: |String| + Default: `'buildifier'` + + See |ale-integrations-local-executables| + + +g:ale_bazel_buildifier_options *g:ale_bazel_buildifier_options* + *b:ale_bazel_buildifier_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to buildifier. + + +g:ale_bazel_buildifier_use_global *g:ale_bazel_buildifier_use_global* + *b:ale_bazel_buildifier_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| diff --git a/dot_vim/plugged/ale/doc/ale-bib.txt b/dot_vim/plugged/ale/doc/ale-bib.txt new file mode 100644 index 0000000..35998c3 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-bib.txt @@ -0,0 +1,19 @@ +=============================================================================== +ALE BibTeX Integration *ale-bib-options* + + +=============================================================================== +bibclean *ale-bib-bibclean* + +g:ale_bib_bibclean_executable *g:ale_bib_bibclean_executable* + + Type: |String| + Default: `'bibclean'` + +g:ale_bib_bibclean_options *g:ale_bib_bibclean_options* + + Type: |String| + Default: `'-align-equals'` + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-bicep.txt b/dot_vim/plugged/ale/doc/ale-bicep.txt new file mode 100644 index 0000000..d26d67b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-bicep.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE Bicep Integration *ale-bicep-options* + + +=============================================================================== +bicep *ale-bicep-bicep* + +g:ale_bicep_bicep_executable *g:ale_bicep_bicep_executable* + *b:ale_bicep_bicep_executable* + Type: |String| + Default: `'bicep'` + + This variable can be set to change the path to bicep. + + +g:ale_bicep_bicep_options *g:ale_bicep_bicep_options* + *b:ale_bicep_bicep_options* + Type: |String| + Default: `'build --outfile /dev/null'` + + This variable can be set to pass additional options to bicep. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-bitbake.txt b/dot_vim/plugged/ale/doc/ale-bitbake.txt new file mode 100644 index 0000000..4c480fd --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-bitbake.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE BitBake Integration *ale-bitbake-options* + + +=============================================================================== +oelint-adv *ale-bitbake-oelint_adv* + +g:ale_bitbake_oelint_adv_executable *g:ale_bitbake_oelint_adv_executable* + + Type: |String| + Default: `'oelint-adv'` + + This variable can be changed to use a different executable for oelint-adv. + +g:ale_bitbake_oelint_adv_options *g:ale_bitbake_oelint_adv_options* + + Type: |String| + Default: `''` + + This variable can be set to pass additional options to oelint-adv. + + g:ale_bitbake_oelint_adv_config *g:ale_bitbake_oelint_adv_config* + + Type: |String| + Default: `'.oelint.cfg'` + + This variable can be set to use a different config file. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-c.txt b/dot_vim/plugged/ale/doc/ale-c.txt new file mode 100644 index 0000000..2993386 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-c.txt @@ -0,0 +1,451 @@ +=============================================================================== +ALE C Integration *ale-c-options* + +For basic checking of problems with C files, ALE offers the `cc` linter, which +runs either `clang`, or `gcc`. See |ale-c-cc|. + + +=============================================================================== +Global Options + +g:ale_c_always_make *g:ale_c_always_make* + *b:ale_c_always_make* + Type: |Number| + Default: `has('unix') && !has('macunix')` + + If set to `1`, use `--always-make` for `make`, which means that output will + always be parsed from `make` dry runs with GNU make. BSD `make` does not + support this option, so you probably want to turn this option off when using + a BSD variant. + + +g:ale_c_build_dir_names *g:ale_c_build_dir_names* + *b:ale_c_build_dir_names* + + Type: |List| + Default: `['build', 'bin']` + + A list of directory names to be used when searching upwards from cpp files + to discover compilation databases with. For directory named `'foo'`, ALE + will search for `'foo/compile_commands.json'` in all directories on and + above the directory containing the cpp file to find path to compilation + database. This feature is useful for the clang tools wrapped around + LibTooling (namely here, clang-tidy) + + +g:ale_c_build_dir *g:ale_c_build_dir* + *b:ale_c_build_dir* + + Type: |String| + Default: `''` + + For programs that can read `compile_commands.json` files, this option can be + set to the directory containing the file for the project. ALE will try to + determine the location of `compile_commands.json` automatically, but if your + file exists in some other directory, you can set this option so ALE will + know where it is. + + This directory will be searched instead of |g:ale_c_build_dir_names|. + + +g:ale_c_parse_compile_commands *g:ale_c_parse_compile_commands* + *b:ale_c_parse_compile_commands* + Type: |Number| + Default: `1` + + If set to `1`, ALE will parse `compile_commands.json` files to automatically + determine flags for C or C++ compilers. ALE will first search for the + nearest `compile_commands.json` file, and then look for + `compile_commands.json` files in the directories for + |g:ale_c_build_dir_names|. + + +g:ale_c_parse_makefile *g:ale_c_parse_makefile* + *b:ale_c_parse_makefile* + Type: |Number| + Default: `0` + + If set to `1`, ALE will run `make -n` to automatically determine flags to + set for C or C++ compilers. This can make it easier to determine the correct + build flags to use for different files. + + NOTE: When using this option on BSD, you may need to set + |g:ale_c_always_make| to `0`, and `make -n` will not provide consistent + results if binaries have already been built, so use `make clean` when + editing your files. + + WARNING: Running `make -n` automatically can execute arbitrary code, even + though it's supposed to be a dry run, so enable this option with care. You + might prefer to use the buffer-local version of the option instead with + |g:ale_pattern_options|, or you own code for checking which project you're + in. + + You might want to disable this option if `make -n` takes too long to run for + projects you work on. + + If |g:ale_c_parse_compile_commands| or |b:ale_c_parse_compile_commands| is + set to `1`, flags taken from `compile_commands.json` will be preferred over + `make -n` output. + + +=============================================================================== +astyle *ale-c-astyle* + +g:ale_c_astyle_executable *g:ale_c_astyle_executable* + *b:ale_c_astyle_executable* + Type: |String| + Default: `'astyle'` + + This variable can be changed to use a different executable for astyle. + + +g:ale_c_astyle_project_options *g:ale_c_astyle_project_options* + *b:ale_c_astyle_project_options* + Type: |String| + Default: `''` + + This variable can be changed to use an option file for project level + configurations. Provide only the filename of the option file that should be + present at the project's root directory. + + For example, if .astylrc is specified, the file is searched in the parent + directories of the source file's directory. + + +=============================================================================== +cc *ale-c-cc* + *ale-c-gcc* + *ale-c-clang* + +g:ale_c_cc_executable *g:ale_c_cc_executable* + *b:ale_c_cc_executable* + Type: |String| + Default: `''` + + This variable can be changed to use a different executable for a C compiler. + + ALE will try to use `clang` if Clang is available, otherwise ALE will + default to checking C code with `gcc`. + + +g:ale_c_cc_options *g:ale_c_cc_options* + *b:ale_c_cc_options* + Type: |String| + Default: `'-std=c11 -Wall'` + + This variable can be changed to modify flags given to the C compiler. + + +g:ale_c_cc_use_header_lang_flag *g:ale_c_cc_use_header_lang_flag* + *b:ale_c_cc_use_header_lang_flag* + Type: |Number| + Default: `-1` + + By default, ALE will use `'-x c-header'` instead of `'-x c'` for header files + when using Clang. + + This variable can be changed to manually activate or deactivate this flag + for header files. + + - When set to `-1`, the default beviour is used, `'-x c-header'` is used with + Clang and `'-x c'` is used with other compilers. + - When set to `0`, the flag is deactivated, `'-x c'` is always used + independently of the compiler. + - When set to `1`, the flag is activated, `'-x c-header'` is always used + independently of the compiler. + + Gcc does not support `'-x c-header'` when using `'-'` as input filename, + which is what ALE does. This why, by default, ALE only uses `'-x c-header'` + with Clang. + + +g:ale_c_cc_header_exts *g:ale_c_cc_header_exts* + *b:ale_c_cc_header_exts* + Type: |List| + Default: `['h']` + + This variable can be changed to modify the list of extensions of the files + considered as header files. + + This variable is only used when `'-x c-header'` is used instead of `'-x c'`, + see |ale_c_cc_use_header_lang_flag|. + + +=============================================================================== +ccls *ale-c-ccls* + +g:ale_c_ccls_executable *g:ale_c_ccls_executable* + *b:ale_c_ccls_executable* + Type: |String| + Default: `'ccls'` + + This variable can be changed to use a different executable for ccls. + + +g:ale_c_ccls_init_options *g:ale_c_ccls_init_options* + *b:ale_c_ccls_init_options* + Type: |Dictionary| + Default: `{}` + + This variable can be changed to customize ccls initialization options. + Example: > + { + \ 'cacheDirectory': '/tmp/ccls', + \ 'cacheFormat': 'binary', + \ 'diagnostics': { + \ 'onOpen': 0, + \ 'opChange': 1000, + \ }, + \ } +< + Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all + available options and explanations. + + +=============================================================================== +clangd *ale-c-clangd* + +g:ale_c_clangd_executable *g:ale_c_clangd_executable* + *b:ale_c_clangd_executable* + Type: |String| + Default: `'clangd'` + + This variable can be changed to use a different executable for clangd. + + +g:ale_c_clangd_options *g:ale_c_clangd_options* + *b:ale_c_clangd_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clangd. + + +=============================================================================== +clang-format *ale-c-clangformat* + +g:ale_c_clangformat_executable *g:ale_c_clangformat_executable* + *b:ale_c_clangformat_executable* + Type: |String| + Default: `'clang-format'` + + This variable can be changed to use a different executable for clang-format. + + +g:ale_c_clangformat_options *g:ale_c_clangformat_options* + *b:ale_c_clangformat_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-format. + + +g:ale_c_clangformat_style_option *g:ale_c_clangformat_style_option* + *b:ale_c_clangformat_style_option* + Type: |String| + Default: `''` + + This variable can be changed to modify only the style flag given to + clang-format. The contents of the variable are passed directly to the -style + flag of clang-format. + + Example: > + { + \ BasedOnStyle: Microsoft, + \ ColumnLimit: 80, + \ AllowShortBlocksOnASingleLine: Always, + \ AllowShortFunctionsOnASingleLine: Inline, + \ } +< + If you set this variable, ensure you don't modify -style in + |g:ale_c_clangformat_options|, as this will cause clang-format to error. + + +g:ale_c_clangformat_use_local_file *g:ale_c_clangformat_use_local_file* + *b:ale_c_clangformat_use_local_file* + Type: |Number| + Default: `0` + + This variable can be changed to modify whether to use a local .clang-format + file. If the file is found, the flag '-style=file' is passed to clang-format + and any options configured via |g:ale_c_clangformat_style_option| are not + passed. + + If this option is enabled but no .clang-format file is found, default back to + |g:ale_c_clangformat_style_option|, if it set. + + If you set this variable, ensure you don't modify -style in + |g:ale_c_clangformat_options|, as this will cause clang-format to error. + + +=============================================================================== +clangtidy *ale-c-clangtidy* + +`clang-tidy` will be run only when files are saved to disk, so that +`compile_commands.json` files can be used. It is recommended to use this +linter in combination with `compile_commands.json` files. +Therefore, `clang-tidy` linter reads the options |g:ale_c_build_dir| and +|g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually +overrides |g:ale_c_build_dir_names|. + + +g:ale_c_clangtidy_checks *g:ale_c_clangtidy_checks* + *b:ale_c_clangtidy_checks* + Type: |List| + Default: `[]` + + The checks to enable for clang-tidy with the `-checks` argument. + + All options will be joined with commas, and escaped appropriately for + the shell. The `-checks` flag can be removed entirely by setting this + option to an empty List. + + Not all of clangtidy checks are applicable for C. You should consult the + clang documentation for an up-to-date list of compatible checks: + http://clang.llvm.org/extra/clang-tidy/checks/list.html + + +g:ale_c_clangtidy_executable *g:ale_c_clangtidy_executable* + *b:ale_c_clangtidy_executable* + Type: |String| + Default: `'clang-tidy'` + + This variable can be changed to use a different executable for clangtidy. + + +g:ale_c_clangtidy_options *g:ale_c_clangtidy_options* + *b:ale_c_clangtidy_options* + Type: |String| + Default: `''` + + This variable can be changed to modify compiler flags given to clang-tidy. + + - Setting this variable to a non-empty string, + - and working in a buffer where no compilation database is found using + |g:ale_c_build_dir_names| or |g:ale_c_build_dir|, + will cause the `--` argument to be passed to `clang-tidy`, which will mean + that detection of `compile_commands.json` files for compile command + databases will be disabled. + Only set this option if you want to control compiler flags + entirely manually, and no `compile_commands.json` file is in one + of the |g:ale_c_build_dir_names| directories of the project tree. + + +g:ale_c_clangtidy_extra_options *g:ale_c_clangtidy_extra_options* + *b:ale_c_clangtidy_extra_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-tidy. + + +g:ale_c_clangtidy_fix_errors *g:ale_c_clangtidy_fix_errors* + *b:ale_c_clangtidy_fix_errors* + Type: |Number| + Default: `1` + + This variable can be changed to disable the `-fix-errors` option for the + |clangtidy| fixer. + + +=============================================================================== +cppcheck *ale-c-cppcheck* + +g:ale_c_cppcheck_executable *g:ale_c_cppcheck_executable* + *b:ale_c_cppcheck_executable* + Type: |String| + Default: `'cppcheck'` + + This variable can be changed to use a different executable for cppcheck. + + +g:ale_c_cppcheck_options *g:ale_c_cppcheck_options* + *b:ale_c_cppcheck_options* + Type: |String| + Default: `'--enable=style'` + + This variable can be changed to modify flags given to cppcheck. + + +=============================================================================== +cquery *ale-c-cquery* + +g:ale_c_cquery_executable *g:ale_c_cquery_executable* + *b:ale_c_cquery_executable* + Type: |String| + Default: `'cquery'` + + This variable can be changed to use a different executable for cquery. + + +g:ale_cpp_cquery_cache_directory *g:ale_c_cquery_cache_directory* + *b:ale_c_cquery_cache_directory* + Type: |String| + Default: `'~/.cache/cquery'` + + This variable can be changed to decide which directory cquery uses for its +cache. + + +=============================================================================== +cspell *ale-c-cspell* + +See |ale-cspell-options| + + +=============================================================================== +flawfinder *ale-c-flawfinder* + +g:ale_c_flawfinder_executable *g:ale_c_flawfinder_executable* + *b:ale_c_flawfinder_executable* + Type: |String| + Default: `'flawfinder'` + + This variable can be changed to use a different executable for flawfinder. + + +g:ale_c_flawfinder_minlevel *g:ale_c_flawfinder_minlevel* + *b:ale_c_flawfinder_minlevel* + Type: |Number| + Default: `1` + + This variable can be changed to ignore risks under the given risk threshold. + + +g:ale_c_flawfinder_options *g:ale-c-flawfinder* + *b:ale-c-flawfinder* + Type: |String| + Default: `''` + + This variable can be used to pass extra options into the flawfinder command. + +g:ale_c_flawfinder_error_severity *g:ale_c_flawfinder_error_severity* + *b:ale_c_flawfinder_error_severity* + Type: |Number| + Default: `6` + + This variable can be changed to set the minimum severity to be treated as an + error. This setting also applies to flawfinder for c++. + + +=============================================================================== +uncrustify *ale-c-uncrustify* + +g:ale_c_uncrustify_executable *g:ale_c_uncrustify_executable* + *b:ale_c_uncrustify_executable* + Type: |String| + Default: `'uncrustify'` + + This variable can be changed to use a different executable for uncrustify. + + +g:ale_c_uncrustify_options *g:ale_c_uncrustify_options* + *b:ale_c_uncrustify_options* + Type: |String| + Default: `''` + + This variable can be change to modify flags given to uncrustify. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-cairo.txt b/dot_vim/plugged/ale/doc/ale-cairo.txt new file mode 100644 index 0000000..0a78e68 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cairo.txt @@ -0,0 +1,15 @@ +=============================================================================== +ALE Cairo Integration *ale-cairo-options* + + +=============================================================================== +starknet *ale-cairo-starknet* + +g:ale_cairo_starknet_executable *g:ale_cairo_starknet_executable* + *b:ale_cairo_starknet_executable* + + Default: `'starknet-compile'` + + Overrides the starknet-compile binary after installing the cairo-language. + + For more information read 'https://starknet.io/docs/quickstart.html' diff --git a/dot_vim/plugged/ale/doc/ale-chef.txt b/dot_vim/plugged/ale/doc/ale-chef.txt new file mode 100644 index 0000000..75e144e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-chef.txt @@ -0,0 +1,46 @@ +=============================================================================== +ALE Chef Integration *ale-chef-options* + + +=============================================================================== +cookstyle *ale-chef-cookstyle* + +g:ale_chef_cookstyle_options *g:ale_chef_cookstyle_options* + *b:ale_chef_cookstyle_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to cookstyle. + + +g:ale_chef_cookstyle_executable *g:ale_chef_cookstyle_executable* + *b:ale_chef_cookstyle_executable* + Type: |String| + Default: `'cookstyle'` + + This variable can be changed to point to the cookstyle binary in case it's + not on the $PATH or a specific version/path must be used. + + +=============================================================================== +foodcritic *ale-chef-foodcritic* + +g:ale_chef_foodcritic_options *g:ale_chef_foodcritic_options* + *b:ale_chef_foodcritic_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to foodcritic. + + +g:ale_chef_foodcritic_executable *g:ale_chef_foodcritic_executable* + *b:ale_chef_foodcritic_executable* + Type: |String| + Default: `'foodcritic'` + + This variable can be changed to point to the foodcritic binary in case it's + not on the $PATH or a specific version/path must be used. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-clojure.txt b/dot_vim/plugged/ale/doc/ale-clojure.txt new file mode 100644 index 0000000..3ff367f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-clojure.txt @@ -0,0 +1,36 @@ +=============================================================================== +ALE Clojure Integration *ale-clojure-options* + + +=============================================================================== +clj-kondo *ale-clojure-clj-kondo* + +A minimal and opinionated linter for code that sparks joy. + +https://github.com/borkdude/clj-kondo + +g:ale_clojure_clj_kondo_options *g:ale_clojure_clj_kondo_options* + *b:ale_clojure_clj_kondo_options* + Type: |String| + Default: `'--cache'` + + This variable can be changed to modify options passed to clj-kondo. + + +=============================================================================== +joker *ale-clojure-joker* + +Joker is a small Clojure interpreter and linter written in Go. + +https://github.com/candid82/joker + +Linting options are not configurable by ale, but instead are controlled by a +`.joker` file in same directory as the file (or current working directory if +linting stdin), a parent directory relative to the file, or the users home +directory. + +see https://github.com/candid82/joker#linter-mode for more information. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-cloudformation.txt b/dot_vim/plugged/ale/doc/ale-cloudformation.txt new file mode 100644 index 0000000..9724403 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cloudformation.txt @@ -0,0 +1,46 @@ +=============================================================================== +ALE CloudFormation Integration *ale-cloudformation-options* + + +=============================================================================== +cfn-python-lint *ale-cloudformation-cfn-python-lint* + +cfn-python-lint is a linter for AWS CloudFormation template file. + +Website: https://github.com/awslabs/cfn-python-lint + +Installation +------------------------------------------------------------------------------- + + +Install cfn-python-lint using either pip or brew: > + +`pip install cfn-lint`. If pip is not available, run +`python setup.py clean --all` then `python setup.py install`. + + Homebrew (macOS): + +`brew install cfn-lint` + +< +Configuration +------------------------------------------------------------------------------- + +To get cloudformation linter to work on only CloudFormation files we must set +the buffer |filetype| to yaml.cloudformation. +This causes ALE to lint the file with linters configured for cloudformation and +yaml files. + +Just put: + +> + + au BufRead,BufNewFile *.template.yaml set filetype=yaml.cloudformation + +< + +on `ftdetect/cloudformation.vim` + +This will get both cloudformation and yaml linters to work on any file with `.template.yaml` ext. +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-cmake.txt b/dot_vim/plugged/ale/doc/ale-cmake.txt new file mode 100644 index 0000000..e44c328 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cmake.txt @@ -0,0 +1,62 @@ +=============================================================================== +ALE CMake Integration *ale-cmake-options* + + +=============================================================================== +cmakelint *ale-cmake-cmakelint* + +g:ale_cmake_cmakelint_executable *g:ale_cmake_cmakelint_executable* + *b:ale_cmake_cmakelint_executable* + Type: |String| + Default: `'cmakelint'` + + This variable can be set to change the path the cmakelint. + + +g:ale_cmake_cmakelint_options *g:ale_cmake_cmakelint_options* + *b:ale_cmake_cmakelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to cmakelint. + + +=============================================================================== +cmake-lint *ale-cmake-cmake-lint* + +g:ale_cmake_cmake_lint_executable *g:ale_cmake_cmake_lint_executable* + *b:ale_cmake_cmake_lint_executable* + Type: |String| + Default: `'cmake-lint'` + + This variable can be set to change the path the cmake-lint. + + +g:ale_cmake_cmake_lint_options *g:ale_cmake_cmake_lint_options* + *b:ale_cmake_cmake_lint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to cmake-lint. + + +=============================================================================== +cmake-format *ale-cmake-cmakeformat* + +g:ale_cmake_cmakeformat_executable *g:ale_cmake_cmakeformat_executable* + *b:ale_cmake_cmakeformat_executable* + Type: |String| + Default: `'cmakeformat'` + + This variable can be set to change the path the cmake-format. + + +g:ale_cmake_cmakeformat_options *g:ale_cmake_cmakeformat_options* + *b:ale_cmake_cmakeformat_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to cmake-format. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-cpp.txt b/dot_vim/plugged/ale/doc/ale-cpp.txt new file mode 100644 index 0000000..1ed6d37 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cpp.txt @@ -0,0 +1,401 @@ +=============================================================================== +ALE C++ Integration *ale-cpp-options* + +For basic checking of problems with C++ files, ALE offers the `cc` linter, +which runs either `clang++`, or `gcc`. See |ale-cpp-cc|. + + +=============================================================================== +Global Options + +The following C options also apply to some C++ linters too. + +* |g:ale_c_always_make| +* |g:ale_c_build_dir_names| +* |g:ale_c_build_dir| +* |g:ale_c_parse_makefile| +* |g:ale_c_parse_compile_commands| + + +=============================================================================== +astyle *ale-cpp-astyle* + +g:ale_cpp_astyle_executable *g:ale_cpp_astyle_executable* + *b:ale_cpp_astyle_executable* + Type: |String| + Default: `'astyle'` + + This variable can be changed to use a different executable for astyle. + + +g:ale_cpp_astyle_project_options *g:ale_cpp_astyle_project_options* + *b:ale_cpp_astyle_project_options* + Type: |String| + Default: `''` + + This variable can be changed to use an option file for project level + configurations. Provide only the filename of the option file that should be + present at the project's root directory. + + For example, if .astylrc is specified, the file is searched in the parent + directories of the source file's directory. + + +=============================================================================== +cc *ale-cpp-cc* + *ale-cpp-gcc* + *ale-cpp-clang* + +g:ale_cpp_cc_executable *g:ale_cpp_cc_executable* + *b:ale_cpp_cc_executable* + Type: |String| + Default: `''` + + This variable can be changed to use a different executable for a C++ compiler. + + ALE will try to use `clang++` if Clang is available, otherwise ALE will + default to checking C++ code with `gcc`. + + +g:ale_cpp_cc_options *g:ale_cpp_cc_options* + *b:ale_cpp_cc_options* + Type: |String| + Default: `'-std=c++14 -Wall'` + + This variable can be changed to modify flags given to the C++ compiler. + + +g:ale_cpp_cc_use_header_lang_flag *g:ale_cpp_cc_use_header_lang_flag* + *b:ale_cpp_cc_use_header_lang_flag* + Type: |Number| + Default: `-1` + + By default, ALE will use `'-x c++-header'` instead of `'-x c++'` for header + files when using Clang. + + This variable can be changed to manually activate or deactivate this flag + for header files. + + - When set to `-1`, the default beviour is used, `'-x c++-header'` is used with + Clang and `'-x c++'` is used with other compilers. + - When set to `0`, the flag is deactivated, `'-x c++'` is always used + independently of the compiler. + - When set to `1`, the flag is activated, `'-x c++-header'` is always used + independently of the compiler. + + Gcc does not support `'-x c++-header'` when using `'-'` as input filename, + which is what ALE does. This why, by default, ALE only uses `'-x c++-header'` + with Clang. + + +g:ale_cpp_cc_header_exts *g:ale_cpp_cc_header_exts* + *b:ale_cpp_cc_header_exts* + Type: |List| + Default: `['h', 'hpp']` + + This variable can be changed to modify the list of extensions of the files + considered as header files. + + This variable is only used when `'-x c++-header'` is used instead of `'-x c++'`, + see |ale_cpp_cc_use_header_lang_flag|. + + +=============================================================================== +ccls *ale-cpp-ccls* + +g:ale_cpp_ccls_executable *g:ale_cpp_ccls_executable* + *b:ale_cpp_ccls_executable* + Type: |String| + Default: `'ccls'` + + This variable can be changed to use a different executable for ccls. + + +g:ale_cpp_ccls_init_options *g:ale_cpp_ccls_init_options* + *b:ale_cpp_ccls_init_options* + Type: |Dictionary| + Default: `{}` + + This variable can be changed to customize ccls initialization options. + Example: > + { + \ 'cacheDirectory': '/tmp/ccls', + \ 'cacheFormat': 'binary', + \ 'diagnostics': { + \ 'onOpen': 0, + \ 'opChange': 1000, + \ }, + \ } +< + Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all + available options and explanations. + + +=============================================================================== +clangcheck *ale-cpp-clangcheck* + +`clang-check` will be run only when files are saved to disk, so that +`compile_commands.json` files can be used. It is recommended to use this +linter in combination with `compile_commands.json` files. +Therefore, `clang-check` linter reads the options |g:ale_c_build_dir| and +|g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually +overrides |g:ale_c_build_dir_names|. + + +g:ale_cpp_clangcheck_executable *g:ale_cpp_clangcheck_executable* + *b:ale_cpp_clangcheck_executable* + Type: |String| + Default: `'clang-check'` + + This variable can be changed to use a different executable for clangcheck. + + +g:ale_cpp_clangcheck_options *g:ale_cpp_clangcheck_options* + *b:ale_cpp_clangcheck_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-check. + + This variable should not be set to point to build subdirectory with + `-p path/to/build` option, as it is handled by the |g:ale_c_build_dir| + option. + + +=============================================================================== +clangd *ale-cpp-clangd* + +g:ale_cpp_clangd_executable *g:ale_cpp_clangd_executable* + *b:ale_cpp_clangd_executable* + Type: |String| + Default: `'clangd'` + + This variable can be changed to use a different executable for clangd. + + +g:ale_cpp_clangd_options *g:ale_cpp_clangd_options* + *b:ale_cpp_clangd_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clangd. + + +=============================================================================== +clang-format *ale-cpp-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for C++. + + +=============================================================================== +clangtidy *ale-cpp-clangtidy* + +`clang-tidy` will be run only when files are saved to disk, so that +`compile_commands.json` files can be used. It is recommended to use this +linter in combination with `compile_commands.json` files. +Therefore, `clang-tidy` linter reads the options |g:ale_c_build_dir| and +|g:ale_c_build_dir_names|. Also, setting |g:ale_c_build_dir| actually +overrides |g:ale_c_build_dir_names|. + + +g:ale_cpp_clangtidy_checks *g:ale_cpp_clangtidy_checks* + *b:ale_cpp_clangtidy_checks* + Type: |List| + Default: `[]` + + The checks to enable for clang-tidy with the `-checks` argument. + + All options will be joined with commas, and escaped appropriately for + the shell. The `-checks` flag can be removed entirely by setting this + option to an empty List. + + +g:ale_cpp_clangtidy_executable *g:ale_cpp_clangtidy_executable* + *b:ale_cpp_clangtidy_executable* + Type: |String| + Default: `'clang-tidy'` + + This variable can be changed to use a different executable for clangtidy. + + +g:ale_cpp_clangtidy_options *g:ale_cpp_clangtidy_options* + *b:ale_cpp_clangtidy_options* + Type: |String| + Default: `''` + + This variable can be changed to modify compiler flags given to clang-tidy. + + - Setting this variable to a non-empty string, + - and working in a buffer where no compilation database is found using + |g:ale_c_build_dir_names| or |g:ale_c_build_dir|, + will cause the `--` argument to be passed to `clang-tidy`, which will mean + that detection of `compile_commands.json` files for compile command + databases will be disabled. + Only set this option if you want to control compiler flags + entirely manually, and no `compile_commands.json` file is in one + of the |g:ale_c_build_dir_names| directories of the project tree. + + +g:ale_cpp_clangtidy_extra_options *g:ale_cpp_clangtidy_extra_options* + *b:ale_cpp_clangtidy_extra_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clang-tidy. + + +g:ale_cpp_clangtidy_fix_errors *g:ale_cpp_clangtidy_fix_errors* + *b:ale_cpp_clangtidy_fix_errors* + Type: |Number| + Default: `1` + + This variable can be changed to disable the `-fix-errors` option for the + |clangtidy| fixer. + + +=============================================================================== +clazy *ale-cpp-clazy* + +g:ale_cpp_clazy_executable *g:ale_cpp_clazy_executable* + *b:ale_cpp_clazy_executable* + Type: |String| + Default: `'clazy-standalone'` + + This variable can be changed to use a different executable for clazy. + + +g:ale_cpp_clazy_checks *g:ale_cpp_clazy_checks* + *b:ale_cpp_clazy_checks* + Type: |List| + Default: `['level1']` + + The checks to enable for clazy with the `-checks` argument. + + All options will be joined with commas, and escaped appropriately for + the shell. The `-checks` flag can be removed entirely by setting this + option to an empty List. + + +g:ale_cpp_clazy_options *g:ale_cpp_clazy_options* + *b:ale_cpp_clazy_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clazy. + + +=============================================================================== +cppcheck *ale-cpp-cppcheck* + +g:ale_cpp_cppcheck_executable *g:ale_cpp_cppcheck_executable* + *b:ale_cpp_cppcheck_executable* + Type: |String| + Default: `'cppcheck'` + + This variable can be changed to use a different executable for cppcheck. + + +g:ale_cpp_cppcheck_options *g:ale_cpp_cppcheck_options* + *b:ale_cpp_cppcheck_options* + Type: |String| + Default: `'--enable=style'` + + This variable can be changed to modify flags given to cppcheck. + + +=============================================================================== +cpplint *ale-cpp-cpplint* + +g:ale_cpp_cpplint_executable *g:ale_cpp_cpplint_executable* + *b:ale_cpp_cpplint_executable* + Type: |String| + Default: `'cpplint'` + + This variable can be changed to use a different executable for cpplint. + + +g:ale_cpp_cpplint_options *g:ale_cpp_cpplint_options* + *b:ale_cpp_cpplint_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to cpplint. + +g:ale_c_cpplint_executable *g:ale_c_cpplint_executable* + *b:ale_c_cpplint_executable* + Type: |String| + Default: `'cpplint'` + + This variable can be changed to use a different executable for cpplint. + + +g:ale_c_cpplint_options *g:ale_c_cpplint_options* + *b:ale_c_cpplint_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to cpplint. + + +=============================================================================== +cquery *ale-cpp-cquery* + +g:ale_cpp_cquery_executable *g:ale_cpp_cquery_executable* + *b:ale_cpp_cquery_executable* + Type: |String| + Default: `'cquery'` + + This variable can be changed to use a different executable for cquery. + + +g:ale_cpp_cquery_cache_directory *g:ale_cpp_cquery_cache_directory* + *b:ale_cpp_cquery_cache_directory* + Type: |String| + Default: `'~/.cache/cquery'` + + This variable can be changed to decide which directory cquery uses for its + cache. + + +=============================================================================== +cspell *ale-cpp-cspell* + +See |ale-cspell-options| + + +=============================================================================== +flawfinder *ale-cpp-flawfinder* + +g:ale_cpp_flawfinder_executable *g:ale_cpp_flawfinder_executable* + *b:ale_cpp_flawfinder_executable* + Type: |String| + Default: `'flawfinder'` + + This variable can be changed to use a different executable for flawfinder. + + +g:ale_cpp_flawfinder_minlevel *g:ale_cpp_flawfinder_minlevel* + *b:ale_cpp_flawfinder_minlevel* + Type: |Number| + Default: `1` + + This variable can be changed to ignore risks under the given risk threshold. + + +g:ale_cpp_flawfinder_options *g:ale-cpp-flawfinder* + *b:ale-cpp-flawfinder* + Type: |String| + Default: `''` + + This variable can be used to pass extra options into the flawfinder command. + + +=============================================================================== +uncrustify *ale-cpp-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-cs.txt b/dot_vim/plugged/ale/doc/ale-cs.txt new file mode 100644 index 0000000..d9a9dc0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cs.txt @@ -0,0 +1,243 @@ +=============================================================================== +ALE C# Integration *ale-cs-options* + + +In addition to the linters that are provided with ALE, C# code can be checked +with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim + + +=============================================================================== +clang-format *ale-cs-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for C#. + + +=============================================================================== +csc *ale-cs-csc* + + The |ale-cs-csc| linter checks for semantic errors when files are opened or + saved. + + See |ale-lint-file-linters| for more information on linters which do not + check for problems while you type. + + The csc linter uses the mono csc compiler, providing full C# 7 and newer + support, to generate a temporary module target file (/t:module). The module + includes all '*.cs' files contained in the directory tree rooted at the path + defined by the |g:ale_cs_csc_source| or |b:ale_cs_csc_source| variable and + all sub directories. + + It will in future replace the |ale-cs-mcs| and |ale-cs-mcsc| linters as both + utilize the mcsc compiler which, according to the mono project, is no longer + actively developed, and only receives maintenance updates. However, because + the csc compiler does not support the -syntax option, this linter does not + offer any as-you-type syntax checking, similar to the |ale-cs-mcsc| linter. + + The paths to search for additional assembly files can be specified using the + |g:ale_cs_csc_assembly_path| or |b:ale_cs_csc_assembly_path| variables. + + NOTE: ALE will not find any errors in files apart from syntax errors if any + one of the source files contains a syntax error. Syntax errors must be fixed + first before other errors will be shown. + + +g:ale_cs_csc_options *g:ale_cs_csc_options* + *b:ale_cs_csc_options* + Type: |String| + Default: `''` + + This option can be set to pass additional arguments to the `csc` compiler. + + For example, to add the dotnet package which is not added per default: > + + let g:ale_cs_mcs_options = ' /warn:4 /langversion:7.2' +< + NOTE: the `/unsafe` option is always passed to `csc`. + + +g:ale_cs_csc_source *g:ale_cs_csc_source* + *b:ale_cs_csc_source* + Type: |String| + Default: `''` + + This variable defines the root path of the directory tree searched for the + '*.cs' files to be linted. If this option is empty, the source file's + directory will be used. + + NOTE: Currently it is not possible to specify sub directories and + directory sub trees which shall not be searched for *.cs files. + + +g:ale_cs_csc_assembly_path *g:ale_cs_csc_assembly_path* + *b:ale_cs_csc_assembly_path* + Type: |List| + Default: `[]` + + This variable defines a list of path strings to be searched for external + assembly files. The list is passed to the csc compiler using the `/lib:` + flag. + + +g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies* + *b:ale_cs_csc_assemblies* + Type: |List| + Default: `[]` + + This variable defines a list of external assembly (*.dll) files required + by the mono mcs compiler to generate a valid module target. The list is + passed the csc compiler using the `/r:` flag. + + For example: > + + " Compile C# programs with the Unity engine DLL file on Mac. + let g:ale_cs_mcsc_assemblies = [ + \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll', + \ 'path-to-unityproject/obj/Debug', + \] +< + +=============================================================================== +cspell *ale-cs-cspell* + +See |ale-cspell-options| + + +=============================================================================== +dotnet-format *ale-cs-dotnet-format* + +Installation +------------------------------------------------------------------------------- + +Installing .NET SDK should probably ensure that `dotnet` is in your `$PATH`. +For .NET 6 the `dotnet format` tool is already included in the .NET SDK. For +.NET 5 or below you will have to manually install it using the instructions +from listed in this repository: https://github.com/dotnet/format + + +Options +------------------------------------------------------------------------------- + +g:ale_cs_dotnet_format_executable *g:ale_cs_dotnet_format_executable* + *b:ale_cs_dotnet_format_executable* + Type: |String| + Default: `'dotnet'` + + This variable can be set to specify an absolute path to the + `dotnet` executable (or to specify an alternate executable). + + +g:ale_cs_dotnet_format_options *g:ale_cs_dotnet_format_options* + *b:ale_cs_dotnet_format_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the `dotnet format` + fixer. + + +=============================================================================== +mcs *ale-cs-mcs* + + The `mcs` linter looks only for syntax errors while you type. See + |ale-cs-mcsc| for the separately configured linter for checking for semantic + errors. + + +g:ale_cs_mcs_options *g:ale_cs_mcs_options* + *b:ale_cs_mcs_options* + + Type: String + Default: `''` + + This variable can be changed to pass additional flags given to mcs. + + NOTE: The -unsafe flag is selected implicitly and thus does not need to be + explicitly included in the |g:ale_cs_mcs_options| or |b:ale_cs_mcs_options| + parameter. + + +=============================================================================== +mcsc *ale-cs-mcsc* + + The mcsc linter checks for semantic errors when files are opened or saved + See |ale-lint-file-linters| for more information on linters which do not + check for problems while you type. + + The mcsc linter uses the mono mcs compiler to generate a temporary module + target file (-t:module). The module includes including all '*.cs' files + contained in the directory tree rooted at the path defined by the + |g:ale_cs_mcsc_source| or |b:ale_cs_mcsc_source| variable. + variable and all sub directories. + + The paths to search for additional assembly files can be specified using the + |g:ale_cs_mcsc_assembly_path| or |b:ale_cs_mcsc_assembly_path| variables. + + NOTE: ALE will not find any errors in files apart from syntax errors if any + one of the source files contains a syntax error. Syntax errors must be fixed + first before other errors will be shown. + + +g:ale_cs_mcsc_options *g:ale_cs_mcsc_options* + *b:ale_cs_mcsc_options* + Type: |String| + Default: `''` + + This option can be set to pass additional arguments to the `mcs` compiler. + + For example, to add the dotnet package which is not added per default: > + + let g:ale_cs_mcs_options = '-pkg:dotnet' +< + NOTE: the `-unsafe` option is always passed to `mcs`. + + +g:ale_cs_mcsc_source *g:ale_cs_mcsc_source* + *b:ale_cs_mcsc_source* + Type: |String| + Default: `''` + + This variable defines the root path of the directory tree searched for the + '*.cs' files to be linted. If this option is empty, the source file's + directory will be used. + + NOTE: Currently it is not possible to specify sub directories and + directory sub trees which shall not be searched for *.cs files. + + +g:ale_cs_mcsc_assembly_path *g:ale_cs_mcsc_assembly_path* + *b:ale_cs_mcsc_assembly_path* + Type: |List| + Default: `[]` + + This variable defines a list of path strings to be searched for external + assembly files. The list is passed to the mcs compiler using the `-lib:` + flag. + + +g:ale_cs_mcsc_assemblies *g:ale_cs_mcsc_assemblies* + *b:ale_cs_mcsc_assemblies* + Type: |List| + Default: `[]` + + This variable defines a list of external assembly (*.dll) files required + by the mono mcs compiler to generate a valid module target. The list is + passed the mcs compiler using the `-r:` flag. + + For example: > + + " Compile C# programs with the Unity engine DLL file on Mac. + let g:ale_cs_mcsc_assemblies = [ + \ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll', + \ 'path-to-unityproject/obj/Debug', + \] +< + +=============================================================================== +uncrustify *ale-cs-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-css.txt b/dot_vim/plugged/ale/doc/ale-css.txt new file mode 100644 index 0000000..74ca16d --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-css.txt @@ -0,0 +1,93 @@ +=============================================================================== +ALE CSS Integration *ale-css-options* + + +=============================================================================== +cspell *ale-css-cspell* + +See |ale-cspell-options| + + +=============================================================================== +css-beautify *ale-css-css-beautify* + +g:ale_css_css_beautify_executable *g:ale_css_css_beautify_executable* + *b:ale_css_css_beautify_executable* + Type: |String| + Default: `'css-beautify'` + + See |ale-integrations-local-executables| + + +g:ale_css_css_beautify_options *g:ale_css_css_beautify_options* + *b:ale_css_css_beautify_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to css-beautify. + + +g:ale_css_css_beautify_use_global *g:ale_css_css_beautify_use_global* + *b:ale_css_css_beautify_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +fecs *ale-css-fecs* + +`fecs` options for CSS is the same as the options for JavaScript, and both of +them reads `./.fecsrc` as the default configuration file. See: +|ale-javascript-fecs|. + + +=============================================================================== +prettier *ale-css-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +stylelint *ale-css-stylelint* + +g:ale_css_stylelint_executable *g:ale_css_stylelint_executable* + *b:ale_css_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + + +g:ale_css_stylelint_options *g:ale_css_stylelint_options* + *b:ale_css_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + + +g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global* + *b:ale_css_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +vscodecss *ale-css-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode css language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-cuda.txt b/dot_vim/plugged/ale/doc/ale-cuda.txt new file mode 100644 index 0000000..729d86b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-cuda.txt @@ -0,0 +1,52 @@ +=============================================================================== +ALE CUDA Integration *ale-cuda-options* + + +=============================================================================== +clang-format *ale-cuda-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for CUDA. + + +=============================================================================== +clangd *ale-cuda-clangd* + +g:ale_cuda_clangd_executable *g:ale_cuda_clangd_executable* + *b:ale_cuda_clangd_executable* + Type: |String| + Default: `'clangd'` + + This variable can be changed to use a different executable for clangd. + + +g:ale_cuda_clangd_options *g:ale_cuda_clangd_options* + *b:ale_cuda_clangd_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clangd. + + +=============================================================================== +nvcc *ale-cuda-nvcc* + +g:ale_cuda_nvcc_executable *g:ale_cuda_nvcc_executable* + *b:ale_cuda_nvcc_executable* + Type: |String| + Default: `'nvcc'` + + This variable can be changed to use a different executable for nvcc. + Currently only nvcc 8.0 is supported. + + +g:ale_cuda_nvcc_options *g:ale_cuda_nvcc_options* + *b:ale_cuda_nvcc_options* + Type: |String| + Default: `'-std=c++11'` + + This variable can be changed to modify flags given to nvcc. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-d.txt b/dot_vim/plugged/ale/doc/ale-d.txt new file mode 100644 index 0000000..72349a2 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-d.txt @@ -0,0 +1,32 @@ +=============================================================================== +ALE D Integration *ale-d-options* + +=============================================================================== +dfmt *ale-d-dfmt* + +g:ale_d_dfmt_options *g:ale_d_dfmt_options* + *b:ale_d_dfmt_options* + Type: |String| + Default: `''` + +This variable can be set to pass additional options to the dfmt fixer. + +=============================================================================== +dls *ale-d-dls* + +g:ale_d_dls_executable *g:ale_d_dls_executable* + *b:ale_d_dls_executable* + Type: |String| + Default: `dls` + +See |ale-integrations-local-executables| + + +=============================================================================== +uncrustify *ale-d-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-dafny.txt b/dot_vim/plugged/ale/doc/ale-dafny.txt new file mode 100644 index 0000000..005170a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-dafny.txt @@ -0,0 +1,16 @@ +=============================================================================== +ALE Dafny Integration *ale-dafny-options* + + +=============================================================================== +dafny *ale-dafny-dafny* + +g:ale_dafny_dafny_timelimit *g:ale_dafny_dafny_timelimit* + *b:ale_dafny_dafny_timelimit* + Type: |Number| + Default: `10` + + This variable sets the `/timeLimit` used for dafny. + + + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-dart.txt b/dot_vim/plugged/ale/doc/ale-dart.txt new file mode 100644 index 0000000..4824e82 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-dart.txt @@ -0,0 +1,124 @@ +=============================================================================== +ALE Dart Integration *ale-dart-options* + + +=============================================================================== +analysis_server *ale-dart-analysis_server* + +Installation +------------------------------------------------------------------------------- + +Install Dart via whatever means. `analysis_server` will be included in the SDK. + +In case that `dart` is not in your path, try to set the executable option to +its absolute path. : > + " Set the executable path for dart to the absolute path to it. + let g:ale_dart_analysis_server_executable = '/usr/local/bin/dart' +< + +Options +------------------------------------------------------------------------------- + +g:ale_dart_analysis_server_executable *g:ale_dart_analysis_server_executable* + *b:ale_dart_analysis_server_executable* + Type: |String| + Default: `'dart'` + + This variable can be set to change the path of dart. + + +=============================================================================== +dart-analyze *ale-dart-analyze* + +Installation +------------------------------------------------------------------------------- + +Installing Dart should probably ensure that `dart` is in your `$PATH`. + +In case it is not, try to set the executable option to its absolute path. : > + " Set the executable path for dart to the absolute path to it. + let g:ale_dart_format_executable = '/usr/lib/dart/bin/dart' + > + +Install Dart via whatever means. `dart analyze` will be included in the SDK. + +Options +------------------------------------------------------------------------------- + +g:ale_dart_analyze_executable *g:ale_dart_analyze_executable* + *b:ale_dart_analyze_executable* + Type: |String| + Default: `'dart'` + + This variable can be set to specify an absolute path to the + format executable (or to specify an alternate executable). + + +=============================================================================== +dart-format *ale-dart-format* + +Installation +------------------------------------------------------------------------------- + +Installing Dart should probably ensure that `dart` is in your `$PATH`. + +In case it is not, try to set the executable option to its absolute path. : > + " Set the executable path for dart to the absolute path to it. + let g:ale_dart_format_executable = '/usr/lib/dart/bin/dart' + > + +Options +------------------------------------------------------------------------------- + +g:ale_dart_format_executable *g:ale_dart_format_executable* + *b:ale_dart_format_executable* + Type: |String| + Default: `'dart'` + + This variable can be set to specify an absolute path to the + format executable (or to specify an alternate executable). + + +g:ale_dart_format_options *g:ale_dart_format_options* + *b:ale_dart_format_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the dart format fixer. + + +=============================================================================== +dartfmt *ale-dart-dartfmt* + +Installation +------------------------------------------------------------------------------- + +Installing Dart should probably ensure that `dartfmt` is in your `$PATH`. + +In case it is not, try to set the executable option to its absolute path. : > + " Set the executable path for dartfmt to the absolute path to it. + let g:ale_dart_dartfmt_executable = '/usr/lib/dart/bin/dartfmt' + > + +Options +------------------------------------------------------------------------------- + +g:ale_dart_dartfmt_executable *g:ale_dart_dartfmt_executable* + *b:ale_dart_dartfmt_executable* + Type: |String| + Default: `''` + + This variable can be set to specify an absolute path to the + dartfmt executable (or to specify an alternate executable). + + +g:ale_dart_dartfmt_options *g:ale_dart_dartfmt_options* + *b:ale_dart_dartfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the dartfmt fixer. + +=============================================================================== + + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-desktop.txt b/dot_vim/plugged/ale/doc/ale-desktop.txt new file mode 100644 index 0000000..62269e9 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-desktop.txt @@ -0,0 +1,21 @@ +=============================================================================== +ALE desktop Integration *ale-desktop-options* + + +=============================================================================== +desktop-file-validate *ale-desktop-desktop-file-validate* + +ALE supports checking .desktop files with `desktop-file-validate.` + + +g:ale_desktop_desktop_file_validate_options + *g:ale_desktop_desktop_file_validate_options* + *b:ale_desktop_desktop_file_validate_options* + Type: |String| + Default: `''` + + This variable can be changed to set options for `desktop-file-validate`, + such as `'--warn-kde'`. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-development.txt b/dot_vim/plugged/ale/doc/ale-development.txt new file mode 100644 index 0000000..6bc009f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-development.txt @@ -0,0 +1,536 @@ +*ale-development.txt* For Vim version 8.0. +*ale-dev* +*ale-development* + +ALE Development Documentation + +=============================================================================== +CONTENTS *ale-development-contents* + + 1. Introduction.........................|ale-development-introduction| + 2. Design Goals.........................|ale-design-goals| + 3. Coding Standards.....................|ale-coding-standards| + 4. Testing ALE..........................|ale-development-tests| + 4.1. Writing Linter Tests.............|ale-development-linter-tests| + 4.2. Writing Fixer Tests..............|ale-development-fixer-tests| + 4.3. Running Tests in a Windows VM....|ale-development-windows-tests| + 5. Contributing.........................|ale-development-contributing| + 5.1. Preparing a Release..............|ale-development-release| + +=============================================================================== +1. Introduction *ale-development-introduction* + +This document contains helpful information for ALE developers, including +design goals, information on how to run the tests, coding standards, and so +on. You should read this document if you want to get involved with ALE +development. + +=============================================================================== +2. Design Goals *ale-design-goals* + +This section lists design goals for ALE, in no particular order. They are as +follows. + +ALE code should be almost 100% VimL. This makes the plugin as portable as +possible. + +ALE should run without needing any other plugins to be installed, to make +installation simple. ALE can integrate with other plugins for more advanced +functionality, non-essential functionality, or improving on basic first party +functionality. + +ALE should check files with as many tools as possible by default, except where +they cause security issues or make excessive use of resources on modern +machines. + +ALE should be free of breaking changes to the public API, which is comprised of +documented functions and options, until a major version is planned. Breaking +changes should be preceded by a deprecation phase complete with warnings. +Changes required for security may be an exception. + +ALE supports Vim 8 and above, and NeoVim 0.2.0 or newer. These are the +earliest versions of Vim and NeoVim which support |job|, |timer|, |closure|, +and |lambda| features. All ALE code should be written so it is compatible with +these versions of Vim, or with version checks so particular features can +degrade or fail gracefully. + +Just about everything should be documented and covered with tests. + +By and large, people shouldn't pay for the functionality they don't use. Care +should be taken when adding new features, so supporting new features doesn't +degrade the general performance of anything ALE does. + +LSP support will become more important as time goes on. ALE should provide +better support for LSP features as time goes on. + +When merging pull requests, you should respond with `Cheers! :beers:`, purely +for comedy value. + +=============================================================================== +3. Coding Standards *ale-coding-standards* + +The following general coding standards should be adhered to for Vim code. + +* Check your Vim code with `Vint` and do everything it says. ALE will check + your Vim code with Vint automatically. See: https://github.com/Kuniwak/vint + Read ALE's `Dockerfile` to see which version of `Vint` it uses. +* Try to write descriptive and concise names for variables and functions. + Names shouldn't be too short or too long. Think about others reading your + code later on. +* Use `snake_case` names for variables and arguments, and `PascalCase` names + for functions. Prefix every variable name with its scope. (`l:`, `g:`, etc.) +* Try to keep lines no longer than 80 characters, but this isn't an absolute + requirement. +* Use 4 spaces for every level of indentation in Vim code. +* Add a blank line before every `function`, `if`, `for`, `while`, or `return`, + which doesn't start a new level of indentation. This makes the logic in + your code easier to follow. +* End every file with a trailing newline character, but not with extra blank + lines. Remove trailing whitespace from the ends of lines. +* Write the full names of commands instead of abbreviations. For example, write + `function` instead of `func`, and `endif` instead of `end`. +* Write functions with `!`, so files can be reloaded. Use the |abort| keyword + for all functions, so functions exit on the first error. +* Make sure to credit yourself in files you have authored with `Author:` + and `Description:` comments. + +In addition to the above general guidelines for the style of your code, you +should also follow some additional rules designed to prevent mistakes. Some of +these are reported with ALE's `custom-linting-rules` script. See +|ale-development-tests|. + +* Don't leave stray `:echo` lines in code. Write `" no-custom-checks` above + the line if you must echo something. +* For strings use |is#| instead of |==#|, `is?` instead of `==?`, `isnot#` + instead of `!=#`, and `isnot?` instead of `!=?`. This is because `'x' ==# 0` + returns 1, while `'x' is# 0` returns 0, so you will experience fewer issues + when numbers are compared with strings. `is` and `isnot` also do not throw + errors when other objects like List or Dictionaries are compared with + strings. +* Don't use the `getcwd()` function in the ALE codebase. Most of ALE's code + runs from asynchronous callback functions, and these functions can execute + from essentially random buffers. Therefore, the `getcwd()` output is + useless. Use `expand('#' . a:buffer . ':p:h')` instead. Don't use + `expand('%...')` for the same reason. +* Don't use the `simplify()` function. It doesn't simplify paths enough. Use + `ale#path#Simplify()` instead. +* Don't use the `shellescape()` function. It doesn't escape arguments properly + on Windows. Use `ale#Escape()` instead, which will avoid escaping where it + isn't needed, and generally escape arguments better on Windows. +* Don't use the `tempname()` function. It doesn't work when `$TMPDIR` isn't + set. Use `ale#util#Tempname()` instead, which temporarily sets `$TMPDIR` + appropriately where needed. +* Use `snake_case` names for linter names, so they can be used as part of + variable names. You can define `aliases` for linters, for other names people + might try to configure linters with. +* Use |v:t_TYPE| variables instead of `type()`, which are more readable. + +Apply the following guidelines when writing Vader test files. + +* Use 2 spaces for Vader test files, instead of the 4 spaces for Vim files. +* If you write `Before` and `After` blocks, you should typically write them at + the top of the file, so they run for all tests. There may be some tests + where it make sense to modify the `Before` and `After` code part of the way + through the file. +* If you modify any settings or global variables, reset them in `After` + blocks. The Vader `Save` and `Restore` commands can be useful for this + purpose. +* If you load or define linters in tests, write `call ale#linter#Reset()` in + an `After` block. +* Just write `Execute` blocks for Vader tests, and don't bother writing `Then` + blocks. `Then` blocks execute after `After` blocks in older versions, and + that can be confusing. + +Apply the following rules when writing Bash scripts. + +* Run `shellcheck`, and do everything it says. + See: https://github.com/koalaman/shellcheck +* Try to write scripts so they will run on Linux, BSD, or Mac OSX. + +=============================================================================== +4. Testing ALE *ale-development-tests* *ale-dev-tests* *ale-tests* + +ALE is tested with a suite of tests executed via GitHub Actions and AppVeyor. +ALE runs tests with the following versions of Vim in the following +environments. + +1. Vim 8.0.0027 on Linux via GitHub Actions. +2. Vim 9.0.0297 on Linux via GitHub Actions. +3. NeoVim 0.2.0 on Linux via GitHub Actions. +4. NeoVim 0.8.0 on Linux via GitHub Actions. +6. Vim 8 (stable builds) on Windows via AppVeyor. + +If you are developing ALE code on Linux, Mac OSX, or BSD, you can run ALEs +tests by installing Docker and running the `run-tests` script. Follow the +instructions on the Docker site for installing Docker. +See: https://docs.docker.com/install/ + +NOTE: Don't forget to add your user to the `docker` group on Linux, or Docker +just won't work. See: https://docs.docker.com/install/linux/linux-postinstall/ + +If you run simply `./run-tests` from the ALE repository root directory, the +latest Docker image for tests will be downloaded if needed, and the script +will run all of the tests in Vader, Vint checks, and several Bash scripts for +finding extra issues. Run `./run-tests --help` to see all of the options the +script supports. Note that the script supports selecting particular test files. + +Once you get used to dealing with Vim and NeoVim compatibility issues, you +probably want to use `./run-tests --fast -q` for running tests with only the +fastest available Vim version, and with success messages from tests +suppressed. + +Generally write tests for any changes you make. The following types of tests +are recommended for the following types of code. + +* New/edited error handler callbacks -> Write tests in `test/handler` +* New/edited linter definition -> Write tests in `test/linter` +* New/edited fixer functions -> Write tests in `test/fixers` + +Look at existing tests in the codebase for examples of how to write tests. +Refer to the Vader documentation for general information on how to write Vader +tests: https://github.com/junegunn/vader.vim + +If you need to add any supporting files for tests, such as empty files present +to test searching upwards through paths for configuration files, they can be +added to the `test/test-files` directory. + +See |ale-development-linter-tests| for more information on how to write linter +tests. + +When you add new linters or fixers, make sure to add them into the tables in +supported-tools.md and |ale-supported-languages-and-tools.txt|. If you forget to +keep them both in sync, you should see an error like the following in the +builds run for GitHub Actions. +> + ======================================== + diff supported-tools.md and doc/ale-supported-languages-and-tools.txt tables + ======================================== + Differences follow: + + --- /tmp/readme.qLjNhJdB 2018-07-01 16:29:55.590331972 +0100 + +++ /tmp/doc.dAi8zfVE 2018-07-01 16:29:55.582331877 +0100 + @@ -1 +1 @@ + - ASM: gcc, foobar + + ASM: gcc +< +Make sure to list documentation entries for linters and fixers in individual +help files in the table of contents, and to align help tags to the right +margin. For example, if you add a heading for an `aardvark` tool to +`ale-python.txt` with a badly aligned doc tag, you will see errors like so. > + + ======================================== + Look for badly aligned doc tags + ======================================== + Badly aligned tags follow: + + doc/ale-python.txt:aardvark ... + ======================================== + Look for table of contents issues + ======================================== + + Check for bad ToC sorting: + + Check for mismatched ToC and headings: + + --- /tmp/table-of-contents.mwCFOgSI 2018-07-01 16:33:25.068811878 +0100 + +++ /tmp/headings.L4WU0hsO 2018-07-01 16:33:25.076811973 +0100 + @@ -168,6 +168,7 @@ + pyrex (cython), ale-pyrex-options + cython, ale-pyrex-cython + python, ale-python-options + + aardvark, ale-python-aardvark + autopep8, ale-python-autopep8 + black, ale-python-black + flake8, ale-python-flake8 +< +Make sure to make the table of contents match the headings, and to keep the +doc tags on the right margin. + +=============================================================================== +4.1 Writing Linter Tests *ale-development-linter-tests* + +Tests for ALE linters take two forms. + +1. Tests for handling the output of commands. +2. Tests for checking which commands are run, or connections are made. + +Tests of the first form should go in the `test/handler` directory, and should +be written like so. > + + Before: + " Load the file which defines the linter. + runtime ale_linters/filetype/linter_name_here.vim + + After: + " Unload all linters again. + call ale#linter#Reset() + + Execute(The output should be correct): + + " Test that the right loclist items are parsed from the handler. + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'Something went wrong', + \ }, + \ ], + \ ale_linters#filetype#linter_name#Handle(bufnr(''), [ + \ '1:Something went wrong', + \ ] +< +Tests for what ALE runs should go in the `test/linter` directory, and should +be written like so. > + + Before: + " Load the linter and set up a series of commands, reset linter variables, + " clear caches, etc. + " + " Vader's 'Save' command will be called here for linter variables. + call ale#assert#SetUpLinterTest('filetype', 'linter_name') + + After: + " Reset linters, variables, etc. + " + " Vader's 'Restore' command will be called here. + call ale#assert#TearDownLinterTest() + + Execute(The default command should be correct): + " AssertLinter checks the executable and command. + " Pass expected_executable, expected_command + AssertLinter 'some-command', ale#Escape('some-command') . ' --foo' + + Execute(Check chained commands): + " GivenCommandOutput can be called with 1 or more list for passing output + " to chained commands. The output for each callback defaults to an empty + " list. + GivenCommandOutput ['v2.1.2'] + " Given a List of commands, check all of them. + " Given a String, only the last command in the chain will be checked. + AssertLinter 'some-command', [ + \ ale#Escape('some-command') . ' --version', + \ ale#Escape('some-command') . ' --foo', + \] +< +The full list of commands that will be temporarily defined for linter tests +given the above setup are as follows. + +`GivenCommandOutput [...]` - Define output for ale#command#Run. +`AssertLinterCwd cwd` - Check the `cwd` for the linter. +`AssertLinter executable, command` - Check the executable and command. +`AssertLinterNotExecuted` - Check that linters will not be executed. +`AssertLSPLanguage language` - Check the language given to an LSP server. +`AssertLSPOptions options_dict` - Check the options given to an LSP server. +`AssertLSPConfig config_dict` - Check the config given to an LSP server. +`AssertLSPProject project_root` - Check the root given to an LSP server. +`AssertLSPAddress address` - Check the address to an LSP server. + +=============================================================================== +4.2 Writing Fixer Tests *ale-development-fixer-tests* + +Tests for ALE fixers should go in the `test/fixers` directory, and should +be written like so. > + + Before: + " Load the fixer and set up a series of commands, reset fixer variables, + " clear caches, etc. + " + " Vader's 'Save' command will be called here for fixer variables. + call ale#assert#SetUpFixerTest('filetype', 'fixer_name') + + After: + " Reset fixers, variables, etc. + " + " Vader's 'Restore' command will be called here. + call ale#assert#TearDownFixerTest() + + Execute(The default command should be correct): + " AssertFixer checks the result of the loaded fixer function. + AssertFixer {'command': ale#Escape('some-command') . ' --foo'} + + Execute(Check chained commands): + " Same as above for linter tests. + GivenCommandOutput ['v2.1.2'] + " Given a List of commands, check all of them. + " Given anything else, only the last result will be checked. + AssertFixer [ + \ ale#Escape('some-command') . ' --version', + \ {'command': ale#Escape('some-command') . ' --foo'} + \] +< +The full list of commands that will be temporarily defined for fixer tests +given the above setup are as follows. + +`GivenCommandOutput [...]` - Define output for ale#command#Run. +`AssertFixerCwd cwd` - Check the `cwd` for the fixer. +`AssertFixer results` - Check the fixer results +`AssertFixerNotExecuted` - Check that fixers will not be executed. + +=============================================================================== +4.3 Running Tests in a Windows VM *ale-development-windows-tests* + +Tests are run for ALE in a build of Vim 8 for Windows via AppVeyor. These +tests can frequently break due to minor differences in paths and how escaping +is done for commands on Windows. If you are a Linux or Mac user, running these +tests locally can be difficult. Here is a process that will make that easier. + +First, you want to install a Windows image with VirtualBox. Install VirtualBox +and grab a VirtualBox image for Windows such as from here: +https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ + +NOTE: If you need to enter a password for the virtual machine at any point, +the password is "Passw0rd!" without the double quotes. + +NOTE: If your trial period for Windows runs out, run the commands like the +wallpaper tells you to. + +Your virtual machine will need to have PowerShell installed. Before you go any +further, confirm that PowerShell is installed in your Windows virtual machine. + +Consult the VirtualBox documentation on how to install "Guest Additions." +You probably want to install "Guest Additions" for most things to work +properly. + +After you've loaded your virtual machine image, go into "Settings" for your +virtual machine, and "Shared Folders." Add a shared folder with the name +"ale", and set the "Folder Path" to the path to your ALE repository, for +example: "/home/w0rp/ale" + +Find out which drive letter "ale" has been mounted as in Windows. We'll use +"E:" as the drive letter, for example. Open the command prompt as an +administrator by typing in `cmd` in the start menu, right clicking on the +command prompt application, and clicking "Run as administrator." Click "Yes" +when prompted to ask if you're sure you want to run the command prompt. You +should type in the following command to mount the "ale" directory for testing, +where "E:" is replaced with your drive letter. > + + mklink /D C:\testplugin E: +< +Close the administrator Command Prompt, and try running the command +`type C:\testplugin\LICENSE` in a new Command Prompt which you are NOT running +as administrator. You should see the license for ALE in your terminal. After +you have confirmed that you have mounted ALE on your machine, search in the +Start Menu for "power shell," run PowerShell as an administrator, and issue +the following commands to install the correct Vim and Vader versions for +running tests. > + + Add-Type -A System.IO.Compression.FileSystem + + Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip -OutFile C:\vim.zip + [IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim') + rm C:\vim.zip + + Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip -OutFile C:\rt.zip + [IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim') + rm C:\rt.zip + + Invoke-WebRequest https://github.com/junegunn/vader.vim/archive/c6243dd81c98350df4dec608fa972df98fa2a3af.zip -OutFile C:\vader.zip + [IO.Compression.ZipFile]::ExtractToDirectory('C:\vader.zip', 'C:\') + mv C:\vader.vim-c6243dd81c98350df4dec608fa972df98fa2a3af C:\vader + rm C:\vader.zip +< +After you have finished installing everything, you can run all of the tests +in Windows by opening a Command Prompt NOT as an administrator by navigating +to the directory where you've mounted the ALE code, which must be named +`C:\testplugin`, and by running the `run-tests.bat` batch file. > + + cd C:\testplugin + run-tests +< +It will probably take several minutes for all of the tests to run. Be patient. +You can run a specific test by passing the filename as an argument to the +batch file, for example: `run-tests test/test_c_flag_parsing.vader` . This will +give you results much more quickly. + +=============================================================================== +5. Contributing *ale-development-contributing* + +All integration of new code into ALE is done through GitHub pull requests. +Using that tool streamlines the process and minimizes the time and effort +required to e.g. ensure test suites are run for every change. + +As for any project hosted by GitHub, the choice of platform demands every +contributor to take care to setup an account and configure it accordingly. + +Due to details of our process, a difference to many other GitHub hosted +projects is that contributors who wish to keep the author fields for their +commits unaltered need to configure a public email address in their account +and profile settings. See: https://docs.github.com/en/account-and-profile/ + +Unless configuring GitHub to expose contact details, commits will be rewritten +to appear by `USERNAME ` . + +=============================================================================== +5.1 Preparing a Release *ale-development-release* + +ALE offers release packages through GitHub, for two reasons: + +1. Some users like to target specific release versions rather than simply + installing the plugin from `master`. This includes users who create Linux + distribution specific packages from GitHub releases. +2. The releases provide a nice way to get an overview of what has changed in + ALE over time. + +ALE has no fixed release schedule. Release versions are created whenever the +ALE developers feel the need to create one. ALE release versions follow the +typical Semantic Versioning scheme. See: https://semver.org/ + +Minor version releases for ALE should be the most common, followed by patch +releases. Every minor version release should be followed by a `vA.B.x` branch +such as `v2.0.x` for version `2.0.0` and every following patch version before +`2.1.0`. The `git` branch strategy for patches is to first merge a bug fix to +`master`, and then `git cherry-pick` a patch to a branch for a specific +version. ALE developers do not generally support anything but `master` or the +last minor version. + +Generally ALE releases hit a major version only when there are breaking +changes to a public ALE setting or function. A "public" setting or function is +defined as any setting or function documented in the `:help` |ale| text file. +Major ALE versions ought to be so rare that they only come once a year at +most. ALE should not typically introduce any breaking changes. + +If there are ever to be any breaking changes made for ALE, there should first +come a minor version release for ALE documenting all of the coming breaking +changes to ALE. It should be described how users can prepare for a breaking +change that is coming before it is done. + +To create a release for ALE, you will need sufficient permissions in GitHub. +Once you do, follow these steps. + +1. Create a new release draft, or edit an existing one. It helps to craft + drafts ahead of time and write the last commit ID checked for release notes + on the last update to a draft. + See the releases page: https://github.com/dense-analysis/ale/releases +2. Examine `git log` and read changes made between the last ID checked, or the + git tag of the previous release, and the current commit in `master`. +3. Write updates in separate sections (except where empty) for: + 3.a. Breaking Changes + 3.b. Deprecated Features + 3.c. New Features + 3.d. New Linters + 3.e. New Fixers + 3.f. Linter Enhancements + 3.g. Fixer Enhancements + 3.h. Bugs Fixed +4. Once you've finished writing the draft for the release, bump + `s:current_ale_version` in `autoload/ale.vim` to the current version, and + add a line to `test/test_ale_has.vader` to test for the version. See + |ale#Has()| documentation for more information. +5. Commit the changes after `./run-tests --fast -q` passes. +6. Tag the release with `git tag vA.B.C`, replacing `A`, `B`, and `C` with the + version numbers. See `git tag --list` for examples. +7. Run `git push` and `git push --tags` to push the commit and the tag. +8. Edit the release draft in GitHub, select the tag you just pushed, and + publish the draft. +9. If you're creating a new major or minor version: `git checkout -b vA.B.x`, + replacing `A` and `B` with the major and minor versions. `git push` the new + branch, and the GitHub branch protection settings should automatically + apply to the new release branch. +10. You have already completed the last step. + +Have fun creating ALE releases. Drink responsibly, or not at all, which is the +preference of w0rp. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-dhall.txt b/dot_vim/plugged/ale/doc/ale-dhall.txt new file mode 100644 index 0000000..9b997b9 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-dhall.txt @@ -0,0 +1,52 @@ +=============================================================================== +ALE Dhall Integration *ale-dhall-options* + +g:ale_dhall_executable *g:ale_dhall_executable* + *b:ale_dhall_executable* + Type: |String| + Default: `'dhall'` + +g:ale_dhall_options *g:ale_dhall_options* + *b:ale_dhall_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the 'dhall` executable. + This is shared with `dhall-freeze` and `dhall-lint`. +> + let g:ale_dhall_options = '--ascii' +< + +=============================================================================== +dhall-format *ale-dhall-format* + +Dhall + (https://dhall-lang.org/) + + +=============================================================================== +dhall-freeze *ale-dhall-freeze* + +Dhall + (https://dhall-lang.org/) + +g:ale_dhall_freeze_options *g:ale_dhall_freeze_options* + *b:ale_dhall_freeze_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the 'dhall freeze` + executable. +> + let g:ale_dhall_freeze_options = '--all' +< + +=============================================================================== +dhall-lint *ale-dhall-lint* + +Dhall + (https://dhall-lang.org/) + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-dockerfile.txt b/dot_vim/plugged/ale/doc/ale-dockerfile.txt new file mode 100644 index 0000000..51b9acc --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-dockerfile.txt @@ -0,0 +1,76 @@ +=============================================================================== +ALE Dockerfile Integration *ale-dockerfile-options* + + +=============================================================================== +dockerfile_lint *ale-dockerfile-dockerfile_lint* + +g:ale_dockerfile_dockerfile_lint_executable + *g:ale_dockerfile_dockerfile_lint_executable* + *b:ale_dockerfile_dockerfile_lint_executable* + Type: |String| + Default: `'dockerfile_lint'` + + This variable can be changed to specify the executable used to run + dockerfile_lint. + + +g:ale_dockerfile_dockerfile_lint_options + *g:ale_dockerfile_dockerfile_lint_options* + *b:ale_dockerfile_dockerfile_lint_options* + Type: |String| + Default: `''` + + This variable can be changed to add additional command-line arguments to + the dockerfile lint invocation - like custom rule file definitions. + + +=============================================================================== +dprint *ale-dockerfile-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/dockerfile + + +=============================================================================== +hadolint *ale-dockerfile-hadolint* + + hadolint can be found at: https://github.com/hadolint/hadolint + + +g:ale_dockerfile_hadolint_options *g:ale_dockerfile_hadolint_options* + *b:ale_dockerfile_hadolint_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the hadolint + invocation. These arguments will be used whether docker is being used or not + (see below). + + +g:ale_dockerfile_hadolint_use_docker *g:ale_dockerfile_hadolint_use_docker* + *b:ale_dockerfile_hadolint_use_docker* + Type: |String| + Default: `'never'` + + This variable controls if docker and the hadolint image are used to run this + linter: if 'never', docker will never be used; 'always' means docker will + always be used; 'yes' and docker will be used if the hadolint executable + cannot be found. + + For now, the default is 'never'. This may change as ale's support for using + docker to lint evolves. + + +g:ale_dockerfile_hadolint_image *g:ale_dockerfile_hadolint_image* + *b:ale_dockerfile_hadolint_image* + Type: |String| + Default: `'hadolint/hadolint'` + + This variable controls the docker image used to run hadolint. The default + is hadolint's author's build, and can be found at: + + https://hub.docker.com/r/hadolint/hadolint/ + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-elixir.txt b/dot_vim/plugged/ale/doc/ale-elixir.txt new file mode 100644 index 0000000..693db5a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-elixir.txt @@ -0,0 +1,108 @@ +=============================================================================== +ALE Elixir Integration *ale-elixir-options* + + +=============================================================================== +mix *ale-elixir-mix* + +The `mix` linter is disabled by default, as it can be too expensive to run. +See `:help g:ale_linters` + + +g:ale_elixir_mix_options *g:ale_elixir_mix_options* + *b:ale_elixir_mix_options* + Type: |String| + Default: `'mix'` + + + This variable can be changed to specify the mix executable. + + +=============================================================================== +mix_format *ale-elixir-mix-format* + +g:ale_elixir_mix_format_options *g:ale_elixir_mix_format_options* + *b:ale_elixir_mix_format_options* + Type: |String| + Default: `''` + + + This variable can be changed to specify the mix options passed to the + mix_format fixer + + +=============================================================================== +dialyxir *ale-elixir-dialyxir* + +Dialyzer, a DIscrepancy AnaLYZer for ERlang programs. +http://erlang.org/doc/man/dialyzer.html + +It can be used with elixir through dialyxir +https://github.com/jeremyjh/dialyxir + +Options for dialyzer are not configurable by ale, but they are instead +configured on your project's `mix.exs`. + +See https://github.com/jeremyjh/dialyxir#with-explaining-stuff for more +information. + + +=============================================================================== +elixir-ls *ale-elixir-elixir-ls* + +Elixir Language Server (https://github.com/JakeBecker/elixir-ls) + +g:ale_elixir_elixir_ls_release *g:ale_elixir_elixir_ls_release* + *b:ale_elixir_elixir_ls_release* + Type: |String| + Default: `'elixir-ls'` + + Location of the elixir-ls release directory. This directory must contain + the language server scripts (language_server.sh and language_server.bat). + +g:ale_elixir_elixir_ls_config *g:ale_elixir_elixir_ls_config* + *b:ale_elixir_elixir_ls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example, to disable Dialyzer: > + { + \ 'elixirLS': { + \ 'dialyzerEnabled': v:false, + \ }, + \ } +< + Consult the ElixirLS documentation for more information about settings. + + +=============================================================================== +credo *ale-elixir-credo* + +Credo (https://github.com/rrrene/credo) + +g:ale_elixir_credo_strict *g:ale_elixir_credo_strict* + + Type: |Integer| + Default: `0` + + Tells credo to run in strict mode or suggest mode. Set variable to 1 to + enable --strict mode. + + +g:ale_elixir_credo_config_file *g:ale_elixir_credo_config_file* + + Type: |String| + Default: `''` + + Tells credo to use a custom configuration file. + + +=============================================================================== +cspell *ale-elixir-cspell* + +See |ale-cspell-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-elm.txt b/dot_vim/plugged/ale/doc/ale-elm.txt new file mode 100644 index 0000000..b151024 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-elm.txt @@ -0,0 +1,100 @@ +=============================================================================== +ALE Elm Integration *ale-elm-options* + + +=============================================================================== +elm-format *ale-elm-elm-format* + +g:ale_elm_format_executable *g:ale_elm_format_executable* + *b:ale_elm_format_executable* + Type: |String| + Default: `'elm-format'` + + See |ale-integrations-local-executables| + + +g:ale_elm_format_use_global *g:ale_elm_format_use_global* + *b:ale_elm_format_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_elm_format_options *g:ale_elm_format_options* + *b:ale_elm_format_options* + Type: |String| + Default: `'--yes'` + + This variable can be set to pass additional options to elm-format. + +=============================================================================== +elm-ls *ale-elm-elm-ls* + +g:ale_elm_ls_executable *g:ale_elm_ls_executable* + *b:ale_elm_ls_executable* + Type: |String| + Default: `'elm-language-server'` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_use_global *g:ale_elm_ls_use_global* + *b:ale_elm_ls_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 1)` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_path *g:ale_elm_ls_elm_path* + *b:ale_elm_ls_elm_path* + Type: |String| + Default: `''` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_format_path *g:ale_elm_ls_elm_format_path* + *b:ale_elm_ls_elm_format_path* + Type: |String| + Default: `''` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_test_path *g:ale_elm_ls_elm_test_path* + *b:ale_elm_ls_elm_test_path* + Type: |String| + Default: `''` + + See |ale-integrations-local-executables| + + +g:ale_elm_ls_elm_analyse_trigger *g:ale_elm_ls_elm_analyse_trigger* + *b:ale_elm_ls_elm_analyse_trigger* + Type: |String| + Default: `'change'` + + One of 'change', 'save' or 'never' + +=============================================================================== +elm-make *ale-elm-elm-make* + +g:ale_elm_make_executable *g:ale_elm_make_executable* + *b:ale_elm_make_executable* + Type: |String| + Default: `'elm'` + + See |ale-integrations-local-executables| + + +g:ale_elm_make_use_global *g:ale_elm_make_use_global* + *b:ale_elm_make_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-erlang.txt b/dot_vim/plugged/ale/doc/ale-erlang.txt new file mode 100644 index 0000000..2c6ff22 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-erlang.txt @@ -0,0 +1,131 @@ +=============================================================================== +ALE Erlang Integration *ale-erlang-options* + + +=============================================================================== +dialyzer *ale-erlang-dialyzer* + +g:ale_erlang_dialyzer_executable *g:ale_erlang_dialyzer_executable* + *b:ale_erlang_dialyzer_executable* + Type: |String| + Default: `'dialyzer'` + + This variable can be changed to specify the dialyzer executable. + + +g:ale_erlang_dialyzer_options *g:ale_erlang_dialyzer_options* + *b:ale_erlang_dialyzer_options* + Type: |String| + Default: `'-Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspec'` + + This variable can be changed to specify the options to pass to the dialyzer + executable. + +g:ale_erlang_dialyzer_plt_file *g:ale_erlang_dialyzer_plt_file* + *b:ale_erlang_dialyzer_plt_file* + Type: |String| + + This variable can be changed to specify the path to the PLT file. By + default, it will search for the PLT file inside the `_build` directory. If + there isn't one, it will fallback to the path `$REBAR_PLT_DIR/dialyzer/plt`. + Otherwise, it will default to `$HOME/.dialyzer_plt`. + + +g:ale_erlang_dialyzer_rebar3_profile *g:ale_erlang_dialyzer_rebar3_profile* + *b:ale_erlang_dialyzer_rebar3_profile* + Type: |String| + Default: `'default'` + + This variable can be changed to specify the profile that is used to + run dialyzer with rebar3. + + +------------------------------------------------------------------------------- +elvis *ale-erlang-elvis* + +g:ale_erlang_elvis_executable *g:ale_erlang_elvis_executable* + *b:ale_erlang_elvis_executable* + Type: |String| + Default: `'elvis'` + + This variable can be changed to specify the elvis executable. + + +------------------------------------------------------------------------------- +erlang_ls *ale-erlang-erlang_ls* + +g:ale_erlang_erlang_ls_executable *g:ale_erlang_erlang_ls_executable* + *b:ale_erlang_erlang_ls_executable* + Type: |String| + Default: `'erlang_ls'` + + This variable can be changed to specify the erlang_ls executable. + +g:ale_erlang_erlang_ls_log_dir *g:ale_erlang_erlang_ls_log_dir* + *b:ale_erlang_erlang_ls_log_dir* + Type: |String| + Default: `''` + + If set this variable overrides default directory where logs will be written. + +g:ale_erlang_erlang_ls_log_level *g:ale_erlang_erlang_ls_log_level* + *b:ale_erlang_erlang_ls_log_level* + Type: |String| + Default: `'info'` + + This variable can be changed to specify log level. + + +------------------------------------------------------------------------------- +erlc *ale-erlang-erlc* + +g:ale_erlang_erlc_executable *g:ale_erlang_erlc_executable* + *b:ale_erlang_erlc_executable* + Type: |String| + Default: `'erlc'` + + This variable can be changed to specify the erlc executable. + + +g:ale_erlang_erlc_options *g:ale_erlang_erlc_options* + *b:ale_erlang_erlc_options* + Type: |String| + Default: `''` + + This variable controls additional parameters passed to `erlc`, such as `-I` + or `-pa`. + + +------------------------------------------------------------------------------- +erlfmt *ale-erlang-erlfmt* + +g:ale_erlang_erlfmt_executable *g:ale_erlang_erlfmt_executable* + *b:ale_erlang_erlfmt_executable* + Type: |String| + Default: `'erlfmt'` + + This variable can be changed to specify the erlfmt executable. + + +g:ale_erlang_erlfmt_options *g:ale_erlang_erlfmt_options* + *b:ale_erlang_erlfmt_options* + Type: |String| + Default: `''` + + This variable controls additional parameters passed to `erlfmt`, such as + `--insert-pragma` or `--print-width`. + + +------------------------------------------------------------------------------- +syntaxerl *ale-erlang-syntaxerl* + +g:ale_erlang_syntaxerl_executable *g:ale_erlang_syntaxerl_executable* + *b:ale_erlang_syntaxerl_executable* + Type: |String| + Default: `'syntaxerl'` + + This variable can be changed to specify the syntaxerl executable. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-eruby.txt b/dot_vim/plugged/ale/doc/ale-eruby.txt new file mode 100644 index 0000000..4cf08d0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-eruby.txt @@ -0,0 +1,58 @@ +=============================================================================== +ALE Eruby Integration *ale-eruby-options* + +There are four linters for `eruby` files: + +- `erb` +- `erblint` +- `erubis` +- `erubi` +- `ruumba` + +`erb` is in the Ruby standard library and is mostly universal. `erubis` is the +default parser in Rails between 3.0 and 5.1. `erubi` is the default in Rails +5.1 and later. `ruumba` can extract Ruby from eruby files and run rubocop on +the result. To selectively enable a subset, see |g:ale_linters|. + +=============================================================================== +erblint *ale-eruby-erblint* + +g:ale_eruby_erblint_executable *g:ale_eruby_erblint_executable* + *b:ale_eruby_erblint_executable* + Type: |String| + Default: `'erblint'` + + Override the invoked erblint binary. This is useful for running erblint + from binstubs or a bundle. + + +g:ale_eruby_erblint_options *g:ale_ruby_erblint_options* + *b:ale_ruby_erblint_options* + Type: |String| + Default: `''` + + This variable can be change to modify flags given to erblint. + + +=============================================================================== +ruumba *ale-eruby-ruumba* + +g:ale_eruby_ruumba_executable *g:ale_eruby_ruumba_executable* + *b:ale_eruby_ruumba_executable* + Type: |String| + Default: `'ruumba` + + Override the invoked ruumba binary. This is useful for running ruumba + from binstubs or a bundle. + + +g:ale_eruby_ruumba_options *g:ale_ruby_ruumba_options* + *b:ale_ruby_ruumba_options* + Type: |String| + Default: `''` + + This variable can be change to modify flags given to ruumba. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-fish.txt b/dot_vim/plugged/ale/doc/ale-fish.txt new file mode 100644 index 0000000..7dbbc10 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-fish.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE Fish Integration *ale-fish-options* + +Lints fish files using `fish -n`. + +Note that `fish -n` is not foolproof: it sometimes gives false positives or +errors that are difficult to parse without more context. This integration skips +displaying errors if an error message is not found. + +If ALE is not showing any errors but your file does not run as expected, run +`fish -n ` from the command line. + +=============================================================================== +fish_indent *ale-fish-fish_indent* + +g:ale_fish_fish_indent_executable *g:ale_fish_fish_indent_executable* + *b:ale_fish_fish_indent_executable* + Type: |String| + Default: `'fish_indent'` + + This variable can be changed to use a different executable for fish_indent. + +g:ale_fish_fish_indent_options *g:ale_fish_fish_indent_options* + *b:ale_fish_fish_indent_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to fish_indent. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-fortran.txt b/dot_vim/plugged/ale/doc/ale-fortran.txt new file mode 100644 index 0000000..c9b7e8e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-fortran.txt @@ -0,0 +1,55 @@ +=============================================================================== +ALE Fortran Integration *ale-fortran-options* + + +=============================================================================== +gcc *ale-fortran-gcc* + +g:ale_fortran_gcc_executable *g:ale_fortran_gcc_executable* + *b:ale_fortran_gcc_executable* + Type: |String| + Default: `'gcc'` + + This variable can be changed to modify the executable used for checking + Fortran code with GCC. + + +g:ale_fortran_gcc_options *g:ale_fortran_gcc_options* + *b:ale_fortran_gcc_options* + Type: |String| + Default: `'-Wall'` + + This variable can be changed to modify flags given to gcc. + + +g:ale_fortran_gcc_use_free_form *g:ale_fortran_gcc_use_free_form* + *b:ale_fortran_gcc_use_free_form* + Type: |Number| + Default: `1` + + When set to `1`, the `-ffree-form` flag will be used for GCC, to check files + with the free form layout. When set to `0`, `-ffixed-form` will be used + instead, for checking files with fixed form layouts. + + +=============================================================================== +language_server *ale-fortran-language-server* + +g:ale_fortran_language_server_executable *g:ale_fortran_language_server_executable* + *b:ale_fortran_language_server_executable* + Type: |String| + Default: `'fortls'` + + This variable can be changed to modify the executable used for the Fortran + Language Server. + +g:ale_fortran_language_server_use_global *g:ale_fortran_language_server_use_global* + *b:ale_fortran_language_server_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-fountain.txt b/dot_vim/plugged/ale/doc/ale-fountain.txt new file mode 100644 index 0000000..ac0870c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-fountain.txt @@ -0,0 +1,6 @@ +=============================================================================== +ALE Fountain Integration *ale-fountain-options* + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-fuse.txt b/dot_vim/plugged/ale/doc/ale-fuse.txt new file mode 100644 index 0000000..0849c37 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-fuse.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE FusionScript Integration *ale-fuse-options* + + +=============================================================================== +fusion-lint *ale-fuse-fusionlint* + +g:ale_fusion_fusionlint_executable *g:ale_fuse_fusionlint_executable* + *b:ale_fuse_fusionlint_executable* + Type: |String| + Default: `'fusion-lint'` + + This variable can be changed to change the path to fusion-lint. + + +g:ale_fuse_fusionlint_options *g:ale_fuse_fusionlint_options* + *b:ale_fuse_fusionlint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to fusion-lint. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-gitcommit.txt b/dot_vim/plugged/ale/doc/ale-gitcommit.txt new file mode 100644 index 0000000..38f3fd9 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-gitcommit.txt @@ -0,0 +1,44 @@ +=============================================================================== +ALE Git Commit Integration *ale-gitcommit-options* + + +=============================================================================== +gitlint *ale-gitcommit-gitlint* + +g:ale_gitcommit_gitlint_executable *g:ale_gitcommit_gitlint_executable* + *b:ale_gitcommit_gitlint_executable* + Type: |String| + Default: `'gitlint'` + + This variable can be changed to modify the executable used for gitlint. + + +g:ale_gitcommit_gitlint_options *g:ale_gitcommit_gitlint_options* + *b:ale_gitcommit_gitlint_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the gitlint + invocation. For example, you can specify the path to a configuration file. > + + let g:ale_gitcommit_gitlint_options = '-C /home/user/.config/gitlint.ini' +< + You can also disable particular error codes using this option. For example, + you can ignore errors for git commits with a missing body. > + + let g:ale_gitcommit_gitlint_options = '--ignore B6' +< + +g:ale_gitcommit_gitlint_use_global *g:ale_gitcommit_gitlint_use_global* + *b:ale_gitcommit_gitlint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for gitlint in a + virtualenv directory first. If this variable is set to `1`, then ALE will + always use |g:ale_gitcommit_gitlint_executable| for the executable path. + + Both variables can be set with `b:` buffer variables instead. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-glsl.txt b/dot_vim/plugged/ale/doc/ale-glsl.txt new file mode 100644 index 0000000..257de75 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-glsl.txt @@ -0,0 +1,56 @@ +=============================================================================== +ALE GLSL Integration *ale-glsl-options* + *ale-integration-glsl* + +=============================================================================== +Integration Information + + Since Vim does not detect the glsl file types out-of-the-box, you need the + runtime files for glsl from here: https://github.com/tikhomirov/vim-glsl + + Note that the current glslang-based linter expects glslangValidator in + standard paths. If it's not installed system-wide you can set + |g:ale_glsl_glslang_executable| to a specific path. + + +=============================================================================== +glslang *ale-glsl-glslang* + +g:ale_glsl_glslang_executable *g:ale_glsl_glslang_executable* + *b:ale_glsl_glslang_executable* + Type: |String| + Default: `'glslangValidator'` + + This variable can be changed to change the path to glslangValidator. + + +g:ale_glsl_glslang_options *g:ale_glsl_glslang_options* + *b:ale_glsl_glslang_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to glslangValidator. + + +=============================================================================== +glslls *ale-glsl-glslls* + +g:ale_glsl_glslls_executable *g:ale_glsl_glslls_executable* + *b:ale_glsl_glslls_executable* + Type: |String| + Default: `'glslls'` + + This variable can be changed to change the path to glslls. + See |ale-integrations-local-executables| + +g:ale_glsl_glslls_logfile *g:ale_glsl_glslls_logfile* + *b:ale_glsl_glslls_logfile* + Type: |String| + Default: `''` + + Setting this variable to a writeable file path will enable logging to that + file. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-go.txt b/dot_vim/plugged/ale/doc/ale-go.txt new file mode 100644 index 0000000..367618e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-go.txt @@ -0,0 +1,372 @@ +=============================================================================== +ALE Go Integration *ale-go-options* + + +=============================================================================== +Integration Information + +The `gometalinter` linter is disabled by default. ALE enables `gofmt`, +`golint` and `go vet` by default. It also supports `staticcheck`, `go +build`, `gosimple`, `golangserver`. + +To enable `gometalinter`, update |g:ale_linters| as appropriate: +> + " Enable all of the linters you want for Go. + let g:ale_linters = {'go': ['gometalinter', 'gofmt']} +< +A possible configuration is to enable `gometalinter` and `gofmt` but paired +with the `--fast` option, set by |g:ale_go_gometalinter_options|. This gets you +the benefit of running a number of linters, more than ALE would by default, +while ensuring it doesn't run any linters known to be slow or resource +intensive. + +g:ale_go_go_executable *g:ale_go_go_executable* + *b:ale_go_go_executable* + + Type: |String| + Default: `'go'` + + The executable that will be run for the `gobuild` and `govet` linters, and + the `gomod` fixer. + + +g:ale_go_go111module *g:ale_go_go111module* + *b:ale_go_go111module* + Type: |String| + Default: `''` + + Override the value of the `$GO111MODULE` environment variable for + golang tools. + + +=============================================================================== +bingo *ale-go-bingo* + +g:ale_go_bingo_executable *g:ale_go_bingo_executable* + *b:ale_go_bingo_executable* + Type: |String| + Default: `'bingo'` + + Location of the bingo binary file. + + +g:ale_go_bingo_options *g:ale_go_bingo_options* + *b:ale_go_bingo_options* + Type: |String| + Default: `''` + + +=============================================================================== +cspell *ale-go-cspell* + +See |ale-cspell-options| + +=============================================================================== +gobuild *ale-go-gobuild* + +g:ale_go_gobuild_options *g:ale_go_gobuild_options* + *b:ale_go_gobuild_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the gobuild linter. + They are injected directly after "go test". + + +=============================================================================== +gofmt *ale-go-gofmt* + +g:ale_go_gofmt_options *g:ale_go_gofmt_options* + *b:ale_go_gofmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the gofmt fixer. + + +=============================================================================== +gofumpt *ale-go-gofumpt* + +g:ale_go_gofumpt_executable *g:ale_go_gofumpt_executable* + *b:ale_go_gofumpt_executable* + Type: |String| + Default: `'gofumpt'` + + Executable to run to use as the gofumpt fixer. + +g:ale_go_gofumpt_options *g:ale_go_gofumpt_options* + *b:ale_go_gofumpt_options* + Type: |String| + Default: `''` + + Options to pass to the gofumpt fixer. + + +=============================================================================== +golangci-lint *ale-go-golangci-lint* + +`golangci-lint` is a `lint_file` linter, which only lints files that are +written to disk. This differs from the default behavior of linting the buffer. +See: |ale-lint-file| + +g:ale_go_golangci_lint_executable *g:ale_go_golangci_lint_executable* + *b:ale_go_golangci_lint_executable* + Type: |String| + Default: `'golangci-lint'` + + The executable that will be run for golangci-lint. + + +g:ale_go_golangci_lint_options *g:ale_go_golangci_lint_options* + *b:ale_go_golangci_lint_options* + Type: |String| + Default: `'--enable-all'` + + This variable can be changed to alter the command-line arguments to the + golangci-lint invocation. + + +g:ale_go_golangci_lint_package *g:ale_go_golangci_lint_package* + *b:ale_go_golangci_lint_package* + Type: |Number| + Default: `0` + + When set to `1`, the whole Go package will be checked instead of only the + current file. + + +=============================================================================== +golangserver *ale-go-golangserver* + +g:ale_go_langserver_executable *g:ale_go_langserver_executable* + *b:ale_go_langserver_executable* + Type: |String| + Default: `'go-langserver'` + + Location of the go-langserver binary file. + + +g:ale_go_langserver_options *g:ale_go_langserver_options* + *b:ale_go_langserver_options* + Type: |String| + Default: `''` + + Additional options passed to the go-langserver command. Note that the + `-gocodecompletion` option is ignored because it is handled automatically + by the |g:ale_completion_enabled| variable. + + +=============================================================================== +golines *ale-go-golines* + +g:ale_go_golines_executable *g:ale_go_lines_executable* + *b:ale_go_lines_executable* + Type: |String| + Default: `'golines'` + + Location of the golines binary file + +g:ale_go_golines_options *g:ale_go_golines_options* + *b:ale_go_golines_options* + Type: |String| + Default: `''` + + Additional options passed to the golines command. By default golines has + --max-length=100 (lines above 100 characters will be wrapped) + + +=============================================================================== +golint *ale-go-golint* + +g:ale_go_golint_executable *g:ale_go_golint_executable* + *b:ale_go_golint_executable* + Type: |String| + Default: `'golint'` + + This variable can be set to change the golint executable path. + + +g:ale_go_golint_options *g:ale_go_golint_options* + *b:ale_go_golint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the golint linter. + + +=============================================================================== +gometalinter *ale-go-gometalinter* + +`gometalinter` is a `lint_file` linter, which only lints files that are +written to disk. This differs from the default behavior of linting the buffer. +See: |ale-lint-file| + +g:ale_go_gometalinter_executable *g:ale_go_gometalinter_executable* + *b:ale_go_gometalinter_executable* + Type: |String| + Default: `'gometalinter'` + + The executable that will be run for gometalinter. + + +g:ale_go_gometalinter_options *g:ale_go_gometalinter_options* + *b:ale_go_gometalinter_options* + Type: |String| + Default: `''` + + This variable can be changed to alter the command-line arguments to the + gometalinter invocation. + + Since `gometalinter` runs a number of linters that can consume a lot of + resources it's recommended to set this option to a value of `--fast` if you + use `gometalinter` as one of the linters in |g:ale_linters|. This disables a + number of linters known to be slow or consume a lot of resources. + + +g:ale_go_gometalinter_lint_package *g:ale_go_gometalinter_lint_package* + *b:ale_go_gometalinter_lint_package* + Type: |Number| + Default: `0` + + When set to `1`, the whole Go package will be checked instead of only the + current file. + + +=============================================================================== +gopls *ale-go-gopls* + +gopls is the official Go language server, and is enabled for use with ALE by +default. + +To install the latest stable version of `gopls` to your `$GOPATH`, try the +following command: > + + GO111MODULE=on go get golang.org/x/tools/gopls@latest +< +If `$GOPATH` is readable by ALE, it should probably work without you having to +do anything else. See the `gopls` README file for more information: + +https://github.com/golang/tools/blob/master/gopls/README.md + + +g:ale_go_gopls_executable *g:ale_go_gopls_executable* + *b:ale_go_gopls_executable* + Type: |String| + Default: `'gopls'` + + See |ale-integrations-local-executables| + + ALE will search for `gopls` in locally installed directories first by + default, and fall back on a globally installed `gopls` if it can't be found + otherwise. + + +g:ale_go_gopls_options *g:ale_go_gopls_options* + *b:ale_go_gopls_options* + Type: |String| + Default: `''` + + Command-line options passed to the gopls executable. See `gopls -h`. + + +g:ale_go_gopls_init_options *g:ale_go_gopls_init_options* + *b:ale_go_gopls_init_options* + Type: |Dictionary| + Default: `{}` + + LSP initialization options passed to gopls. This can be used to configure + the behaviour of gopls. + + Example: > + let g:ale_go_gopls_init_options = {'ui.diagnostic.analyses': { + \ 'composites': v:false, + \ 'unusedparams': v:true, + \ 'unusedresult': v:true, + \ }} +< + + For a full list of supported analyzers, see: + https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md + + +g:ale_go_gopls_use_global *g:ale_go_gopls_use_global* + *b:ale_go_gopls_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +govet *ale-go-govet* + +g:ale_go_govet_options *g:ale_go_govet_options* + *b:ale_go_govet_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the go vet linter. + + +=============================================================================== +revive *ale-go-revive* + +g:ale_go_revive_executable *g:ale_go_revive_executable* + *b:ale_go_revive_executable* + Type: |String| + Default: `'revive'` + + This variable can be set to change the revive executable path. + + +g:ale_go_revive_options *g:ale_go_revive_options* + *b:ale_go_revive_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the revive + + +=============================================================================== +staticcheck *ale-go-staticcheck* + +g:ale_go_staticcheck_executable *g:ale_go_staticcheck_executable* + *b:ale_go_staticcheck_executable* + Type: |String| + Default: `'staticcheck'` + + See |ale-integrations-local-executables| + + ALE will search for `staticcheck` in locally installed directories first by + default, and fall back on a globally installed `staticcheck` if it can't be + found otherwise. + + +g:ale_go_staticcheck_options *g:ale_go_staticcheck_options* + *b:ale_go_staticcheck_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the staticcheck + linter. + + +g:ale_go_staticcheck_lint_package *g:ale_go_staticcheck_lint_package* + *b:ale_go_staticcheck_lint_package* + Type: |Number| + Default: `1` + + When set to `1`, the whole Go package will be checked instead of only the + current file. + + +g:ale_go_staticcheck_use_global *g:ale_go_staticcheck_use_global* + *b:ale_go_staticcheck_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-graphql.txt b/dot_vim/plugged/ale/doc/ale-graphql.txt new file mode 100644 index 0000000..603694b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-graphql.txt @@ -0,0 +1,22 @@ +=============================================================================== +ALE GraphQL Integration *ale-graphql-options* + + +=============================================================================== +eslint *ale-graphql-eslint* + +The `eslint` linter for GraphQL uses the JavaScript options for `eslint`; see: +|ale-javascript-eslint|. + +You will need the GraphQL ESLint plugin installed for this to work. + +=============================================================================== +gqlint *ale-graphql-gqlint* + +=============================================================================== +prettier *ale-graphql-prettier* + +See |ale-javascript-prettier| for information about the available options. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-hack.txt b/dot_vim/plugged/ale/doc/ale-hack.txt new file mode 100644 index 0000000..4776b8c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-hack.txt @@ -0,0 +1,51 @@ +=============================================================================== +ALE Hack Integration *ale-hack-options* + *ale-integration-hack* + + HHAST is disabled by default, as it executes code in the project root. + + Currently linters must be enabled globally. HHAST can be enabled with: + +> + let g:ale_linters = {'hack': ['hack', 'hhast']} +< + +=============================================================================== +hack *ale-hack-hack* + +g:ale_hack_hack_executable *g:ale_hack_hack_executable* + *b:ale_hack_hack_executable* + + Type: |String| + Default: `'hh_client'` + + This variable can be set to use a specific executable to interact with the + Hack typechecker. + + +=============================================================================== +hackfmt *ale-hack-hackfmt* + +g:ale_hack_hackfmt_options *g:ale_hack_hackfmt_options* + *b:ale_hack_hackfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the hackfmt fixer. + + +=============================================================================== +hhast *ale-hack-hhast* + +g:ale_hack_hhast_executable *g:ale_hack_hhast_executable* + *b:ale_hack_hhast_executable* + + Type: |String| + Default: `'vendor/bin/hhast-lint'` + + This variable can be set to use a specific executable to interact with the + Hack typechecker. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-handlebars.txt b/dot_vim/plugged/ale/doc/ale-handlebars.txt new file mode 100644 index 0000000..4a5a387 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-handlebars.txt @@ -0,0 +1,34 @@ +=============================================================================== +ALE Handlebars Integration *ale-handlebars-options* + + +=============================================================================== +prettier *ale-handlebars-prettier* + +See |ale-javascript-prettier| for information about the available options. +Uses glimmer parser by default. + + +=============================================================================== +ember-template-lint *ale-handlebars-embertemplatelint* + +g:ale_handlebars_embertemplatelint_executable + *g:ale_handlebars_embertemplatelint_executable* + *b:ale_handlebars_embertemplatelint_executable* + Type: |String| + Default: `'ember-template-lint'` + + See |ale-integrations-local-executables| + + +g:ale_handlebars_embertemplatelint_use_global + *g:ale_handlebars_embertemplatelint_use_global* + *b:ale_handlebars_embertemplatelint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-haskell.txt b/dot_vim/plugged/ale/doc/ale-haskell.txt new file mode 100644 index 0000000..bd5a5ed --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-haskell.txt @@ -0,0 +1,228 @@ +=============================================================================== +ALE Haskell Integration *ale-haskell-options* + + +=============================================================================== +brittany *ale-haskell-brittany* + +g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable* + *b:ale_haskell_brittany_executable* + Type: |String| + Default: `'brittany'` + + This variable can be changed to use a different executable for brittany. + + +=============================================================================== +cspell *ale-haskell-cspell* + +See |ale-cspell-options| + + +=============================================================================== +floskell *ale-haskell-floskell* + +g:ale_haskell_floskell_executable *g:ale_haskell_floskell_executable* + *b:ale_haskell_floskell_executable* + Type: |String| + Default: `'floskell'` + + This variable can be changed to use a different executable for floskell. + + +=============================================================================== +ghc *ale-haskell-ghc* + +g:ale_haskell_ghc_options *g:ale_haskell_ghc_options* + *b:ale_haskell_ghc_options* + Type: |String| + Default: `'-fno-code -v0'` + + This variable can be changed to modify flags given to ghc. + + +=============================================================================== +ghc-mod *ale-haskell-ghc-mod* + +g:ale_haskell_ghc_mod_executable *g:ale_haskell_ghc_mod_executable* + *b:ale_haskell_ghc_mod_executable* + Type: |String| + Default: `'ghc-mod'` + + This variable can be changed to use a different executable for ghc-mod. + + +=============================================================================== +cabal-ghc *ale-haskell-cabal-ghc* + +g:ale_haskell_cabal_ghc_options *g:ale_haskell_cabal_ghc_options* + *b:ale_haskell_cabal_ghc_options* + Type: |String| + Default: `'-fno-code -v0'` + + This variable can be changed to modify flags given to ghc through cabal + exec. + + +=============================================================================== +hdevtools *ale-haskell-hdevtools* + +g:ale_haskell_hdevtools_executable *g:ale_haskell_hdevtools_executable* + *b:ale_haskell_hdevtools_executable* + Type: |String| + Default: `'hdevtools'` + + This variable can be changed to use a different executable for hdevtools. + + +g:ale_haskell_hdevtools_options *g:ale_haskell_hdevtools_options* + *b:ale_haskell_hdevtools_options* + Type: |String| + Default: `get(g:, 'hdevtools_options', '-g -Wall')` + + This variable can be changed to modify flags given to hdevtools. + + The hdevtools documentation recommends setting GHC options for `hdevtools` + with `g:hdevtools_options`. ALE will use the value of `g:hdevtools_options` + for the value of `g:ale_haskell_hdevtools_options` by default, so this + option can be respected and overridden specifically for ALE. + + +=============================================================================== +hfmt *ale-haskell-hfmt* + +g:ale_haskell_hfmt_executable *g:ale_haskell_hfmt_executable* + *b:ale_haskell_hfmt_executable* + Type: |String| + Default: `'hfmt'` + + This variable can be changed to use a different executable for hfmt. + + +=============================================================================== +hindent *ale-haskell-hindent* + +g:ale_haskell_hindent_executable *g:ale_haskell_hindent_executable* + *b:ale_haskell_hindent_executable* + Type: |String| + Default: `'hindent'` + + This variable can be changed to use a different executable for hindent. + + +=============================================================================== +hlint *ale-haskell-hlint* + +g:ale_haskell_hlint_executable *g:ale_haskell_hlint_executable* + *b:ale_haskell_hlint_executable* + Type: |String| + Default: `'hlint'` + + This variable can be changed to use a different executable for hlint. + + +g:ale_haskell_hlint_options g:ale_haskell_hlint_options + b:ale_haskell_hlint_options + Type: |String| + Default: `''` + + This variable can be used to pass extra options to the underlying hlint + executable. + + +=============================================================================== +hls *ale-haskell-hls* + +g:ale_haskell_hls_executable *g:ale_haskell_hls_executable* + *b:ale_haskell_hls_executable* + Type: |String| + Default: `'haskell-language-server-wrapper'` + + This variable can be changed to use a different executable for the haskell + language server. + + +g:ale_haskell_hls_config *g:ale_haskell_hls_config* + *b:ale_haskell_hls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for HLS. For example, to see more + completions: +> + let g:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}} +< + Refer to HLS documentation for possible settings: + https://haskell-language-server.readthedocs.io/en/latest/configuration.html#language-specific-server-options + + +=============================================================================== +stack-build *ale-haskell-stack-build* + +g:ale_haskell_stack_build_options *g:ale_haskell_stack_build_options* + *b:ale_haskell_stack_build_options* + Type: |String| + Default: `'--fast'` + + We default to using `'--fast'`. Since Stack generates binaries, your + programs will be slower unless you separately rebuild them outside of ALE. + + +=============================================================================== +stack-ghc *ale-haskell-stack-ghc* + +g:ale_haskell_stack_ghc_options *g:ale_haskell_stack_ghc_options* + *b:ale_haskell_stack_ghc_options* + Type: |String| + Default: `'-fno-code -v0'` + + This variable can be changed to modify flags given to ghc through `stack + ghc` + + +=============================================================================== +stylish-haskell *ale-haskell-stylish-haskell* + +g:ale_haskell_stylish_haskell_executable + *g:ale_haskell_stylish_haskell_executable* + *b:ale_haskell_stylish_haskell_executable* + Type: |String| + Default: `'stylish-haskell'` + + This variable can be changed to use a different executable for stylish-haskell. + + +=============================================================================== +hie *ale-haskell-hie* + +g:ale_haskell_hie_executable *g:ale_haskell_hie_executable* + *b:ale_haskell_hie_executable* + Type: |String| + Default: `'hie'` + + This variable can be changed to use a different executable for the haskell + ide engine. i.e. `'hie-wrapper'` + + +=============================================================================== +ormolu *ale-haskell-ormolu* + +g:ale_haskell_ormolu_executable *g:ale_haskell_ormolu_executable* + *b:ale_haskell_ormolu_executable* + Type: |String| + Default: `'ormolu'` + + This variable can be changed to use a different executable for ormolu. + + +g:ale_haskell_ormolu_options *g:ale_haskell_ormolu_options* + *b:ale_haskell_ormolu_options* + Type: |String| + Default: `''` + + This variable can be used to pass extra options to the underlying ormolu + executable. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-hcl.txt b/dot_vim/plugged/ale/doc/ale-hcl.txt new file mode 100644 index 0000000..71e1114 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-hcl.txt @@ -0,0 +1,16 @@ +=============================================================================== +ALE HCL Integration *ale-hcl-options* + + +=============================================================================== +packer-fmt *ale-hcl-packer-fmt* + +See |ale-packer-fmt-fixer| for information about the available options. + +=============================================================================== +terraform-fmt *ale-hcl-terraform-fmt* + +See |ale-terraform-fmt-fixer| for information about the available options. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-help.txt b/dot_vim/plugged/ale/doc/ale-help.txt new file mode 100644 index 0000000..8987254 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-help.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE Help Integration *ale-help-options* + + +=============================================================================== +cspell *ale-help-cspell* + +See |ale-cspell-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-html.txt b/dot_vim/plugged/ale/doc/ale-html.txt new file mode 100644 index 0000000..6d18afd --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-html.txt @@ -0,0 +1,202 @@ +=============================================================================== +ALE HTML Integration *ale-html-options* + + +=============================================================================== +angular *ale-html-angular* + +ALE supports language server features for Angular. You can install it via `npm`: > + + $ npm install --save-dev @angular/language-server +< +Angular 11 and up are supported. + + +g:ale_html_angular_executable *g:ale_html_angular_executable* + *b:ale_html_angular_executable* + Type: |String| + Default: `'ngserver'` + + See |ale-integrations-local-executables| + + +g:ale_html_angular_use_global *g:ale_html_angular_use_global* + *b:ale_html_angular_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +cspell *ale-html-cspell* + +See |ale-cspell-options| + +=============================================================================== +fecs *ale-html-fecs* + +`fecs` options for HTML are the same as the options for JavaScript, and both +of them read `./.fecsrc` as the default configuration file. + +See: |ale-javascript-fecs|. + + +=============================================================================== +html-beautify *ale-html-beautify* + +g:ale_html_beautify_executable *g:ale_html_beautify_executable* + *b:ale_html_beautify_executable* + Type: |String| + Default: `'html-beautify'` + + See |ale-integrations-local-executables| + + +g:ale_html_beautify_options *g:ale_html_beautify_options* + *b:ale_html_beautify_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to html-beautify. + + +g:ale_html_beautify_use_global *g:ale_html_beautify_use_global* + *b:ale_html_beautify_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +htmlhint *ale-html-htmlhint* + +g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable* + *b:ale_html_htmlhint_executable* + Type: |String| + Default: `'htmlhint'` + + See |ale-integrations-local-executables| + + +g:ale_html_htmlhint_options *g:ale_html_htmlhint_options* + *b:ale_html_htmlhint_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to HTMLHint. + + +g:ale_html_htmlhint_use_global *g:ale_html_htmlhint_use_global* + *b:ale_html_htmlhint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prettier *ale-html-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +stylelint *ale-html-stylelint* + +g:ale_html_stylelint_executable *g:ale_html_stylelint_executable* + *b:ale_html_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + + +g:ale_html_stylelint_options *g:ale_html_stylelint_options* + *b:ale_html_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + + +g:ale_html_stylelint_use_global *g:ale_html_stylelint_use_global* + *b:ale_html_stylelint_use_global* + Type: |String| + Default: `0` + + See |ale-integrations-local-executables| + + +=============================================================================== +tidy *ale-html-tidy* + +`tidy` is a console application which corrects and cleans up HTML and XML +documents by fixing markup errors and upgrading legacy code to modern +standards. + +Note: +`/usr/bin/tidy` on macOS (installed by default) is too old. It was released +on 31 Oct 2006. It does not consider modern HTML specs (HTML5) and shows +outdated warnings. So |ale| ignores `/usr/bin/tidy` on macOS. + +To use `tidy` on macOS, please install the latest version with Homebrew: +> + $ brew install tidy-html5 +< +`/usr/local/bin/tidy` is installed. + +g:ale_html_tidy_executable *g:ale_html_tidy_executable* + *b:ale_html_tidy_executable* + Type: |String| + Default: `'tidy'` + + This variable can be changed to change the path to tidy. + + +g:ale_html_tidy_options *g:ale_html_tidy_options* + *b:ale_html_tidy_options* + Type: |String| + Default: `'-q -e -language en'` + + This variable can be changed to change the arguments provided to the + executable. + + ALE will attempt to automatically detect the appropriate file encoding to + provide to html-tidy, and fall back to UTF-8 when encoding detection fails. + + The recognized file encodings are as follows: ascii, big5, cp1252 (win1252), + cp850 (ibm858), cp932 (shiftjis), iso-2022-jp (iso-2022), latin1, macroman + (mac), sjis (shiftjis), utf-16le, utf-16, utf-8 + + +g:ale_html_tidy_use_global *g:html_tidy_use_global* + + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +vscodehtml *ale-html-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode html language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< + +=============================================================================== +write-good *ale-html-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-idris.txt b/dot_vim/plugged/ale/doc/ale-idris.txt new file mode 100644 index 0000000..c7500b0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-idris.txt @@ -0,0 +1,23 @@ +=============================================================================== +ALE Idris Integration *ale-idris-options* + +=============================================================================== +idris *ale-idris-idris* + +g:ale_idris_idris_executable *g:ale_idris_idris_executable* + *b:ale_idris_idris_executable* + Type: |String| + Default: `'idris'` + + This variable can be changed to change the path to idris. + + +g:ale_idris_idris_options *g:ale_idris_idris_options* + *b:ale_idris_idris_options* + Type: |String| + Default: `'--total --warnpartial --warnreach --warnipkg'` + + This variable can be changed to modify flags given to idris. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-ink.txt b/dot_vim/plugged/ale/doc/ale-ink.txt new file mode 100644 index 0000000..9412a09 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ink.txt @@ -0,0 +1,40 @@ +=============================================================================== +ALE Ink Integration *ale-ink-options* + + +=============================================================================== +ink-language-server *ale-ink-language-server* + +Ink Language Server + (https://github.com/ephraim/ink-language-server) + +g:ale_ink_ls_executable g:ale_ink_ls_executable + b:ale_ink_ls_executable + Type: |String| + Default: `'ink-language-server'` + + Ink language server executable. + +g:ale_ink_ls_initialization_options + g:ale_ink_ls_initialization_options + b:ale_ink_ls_initialization_options + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server at startup. For certain platforms and certain story + structures, the defaults will suffice. However, many projects will need to + change these settings - see the ink-language-server website for more + information. + + An example of setting non-default options: + { + \ 'ink': { + \ 'mainStoryPath': 'init.ink', + \ 'inklecateExecutablePath': '/usr/local/bin/inklecate', + \ 'runThroughMono': v:false + \ } + \} + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-inko.txt b/dot_vim/plugged/ale/doc/ale-inko.txt new file mode 100644 index 0000000..5ca14af --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-inko.txt @@ -0,0 +1,22 @@ +=============================================================================== +ALE Inko Integration *ale-inko-options* + *ale-integration-inko* + +=============================================================================== +Integration Information + + Currently, the only supported linter for Inko is the Inko compiler itself. + +=============================================================================== +inko *ale-inko-inko* + +g:ale_inko_inko_executable *g:ale_inko_inko_executable* + *b:ale_inko_inko_executable* + Type: |String| + Default: `'inko'` + + This variable can be modified to change the executable path for `inko`. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-ispc.txt b/dot_vim/plugged/ale/doc/ale-ispc.txt new file mode 100644 index 0000000..bf30e8e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ispc.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE ISPC Integration *ale-ispc-options* + + +=============================================================================== +ispc *ale-ispc-ispc* + +g:ale_ispc_ispc_executable *g:ale_ispc_ispc_executable* + *b:ale_ispc_ispc_executable* + Type: |String| + Default: `'ispc'` + + This variable can be changed to use a different executable for ispc. + + +g:ale_ispc_ispc_options *g:ale_ispc_ispc_options* + *b:ale_ispc_ispc_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to ispc. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-java.txt b/dot_vim/plugged/ale/doc/ale-java.txt new file mode 100644 index 0000000..6961186 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-java.txt @@ -0,0 +1,291 @@ +=============================================================================== +ALE Java Integration *ale-java-options* + + +=============================================================================== +checkstyle *ale-java-checkstyle* + +g:ale_java_checkstyle_config *g:ale_java_checkstyle_config* + *b:ale_java_checkstyle_config* + + Type: |String| + Default: `'/google_checks.xml'` + + A path to a checkstyle configuration file. + + If a configuration file is specified with |g:ale_java_checkstyle_options|, + it will be preferred over this setting. + + The path to the configuration file can be an absolute path or a relative + path. ALE will search for the relative path in parent directories. + + +g:ale_java_checkstyle_executable *g:ale_java_checkstyle_executable* + *b:ale_java_checkstyle_executable* + + Type: |String| + Default: `'checkstyle'` + + This variable can be changed to modify the executable used for checkstyle. + + +g:ale_java_checkstyle_options *g:ale_java_checkstyle_options* + *b:ale_java_checkstyle_options* + + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to checkstyle. + + If a configuration file is specified with `-c`, it will be used instead of + configuration files set with |g:ale_java_checkstyle_config|. + + +=============================================================================== +clang-format *ale-java-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Java. + + +=============================================================================== +cspell *ale-java-cspell* + +See |ale-cspell-options| + + +=============================================================================== +javac *ale-java-javac* + +g:ale_java_javac_classpath *g:ale_java_javac_classpath* + *b:ale_java_javac_classpath* + Type: |String| or |List| + Default: `''` + + This variable can be set to change the global classpath for Java. + + +g:ale_java_javac_executable *g:ale_java_javac_executable* + *b:ale_java_javac_executable* + Type: |String| + Default: `'javac'` + + This variable can be set to change the executable path used for javac. + + +g:ale_java_javac_options *g:ale_java_javac_options* + *b:ale_java_javac_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to javac. + +g:ale_java_javac_sourcepath *g:ale_java_javac_sourcepath* + *b:ale_java_javac_sourcepath* + Type: |String| or |List| + Default: `''` + +This variable can set multiple source code paths, the source code path is a +relative path (relative to the project root directory). + +Example: + +String type: +Note that the unix system separator is a colon(`:`) window system +is a semicolon(`;`). +> + let g:ale_java_javac_sourcepath = 'build/gen/source/xx/main:build/gen/source' +< +List type: +> + let g:ale_java_javac_sourcepath = [ + \ 'build/generated/source/querydsl/main', + \ 'target/generated-sources/source/querydsl/main' + \ ] +< + +=============================================================================== +google-java-format *ale-java-google-java-format* + + +g:ale_java_google_java_format_executable + *g:ale_java_google_java_format_executable* + *b:ale_java_google_java_format_executable* + Type: |String| + Default: `'google-java-format'` + + See |ale-integrations-local-executables| + + +g:ale_java_google_java_format_options *g:ale_java_google_java_format_options* + *b:ale_java_google_java_format_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options + + +=============================================================================== +pmd *ale-java-pmd* + +g:ale_java_pmd_options *g:ale_java_pmd_options* + *b:ale_java_pmd_options* + + Type: |String| + Default: `'-R category/java/bestpractices'` + + This variable can be changed to modify flags given to PMD. Do not specify -f + and -d. They are added automatically. + + +=============================================================================== +javalsp *ale-java-javalsp* + +To enable Java LSP linter you need to download and build the vscode-javac +language server from https://github.com/georgewfraser/java-language-server. + +Before building the language server you need to install pre-requisites: npm, +maven, and protobuf. You also need to have Java 13 and JAVA_HOME properly +set. + +After downloading the source code and installing all pre-requisites you can +build the language server with the included build.sh script: + + scripts/build.sh + +This will create launch scripts for Linux, Mac, and Windows in the dist folder +within the repo: + + - lang_server_linux.sh + - lang_server_mac.sh + - lang_server_windows.sh + +To let ALE use this language server you need to set the +g:ale_java_javalsp_executable variable to the absolute path of the launcher +executable for your platform. + +g:ale_java_javalsp_executable *g:ale_java_javalsp_executable* + *b:ale_java_javalsp_executable* + Type: |String| + Default: `''` + +This variable must be set to the absolute path of the language server launcher +executable. For example: +> + let g:ale_java_javalsp_executable=/java-language-server/dist/lang_server_linux.sh +< + +g:ale_java_javalsp_config *g:ale_java_javalsp_config* + *b:ale_java_javalsp_config* + Type: |Dictionary| + Default: `{}` + +The javalsp linter automatically detects external dependencies for Maven and +Gradle projects. In case the javalsp fails to detect some of them, you can +specify them setting a dictionary to |g:ale_java_javalsp_config| variable. +> + let g:ale_java_javalsp_config = + \ { + \ 'java': { + \ 'externalDependencies': [ + \ 'junit:junit:jar:4.12:test', " Maven format + \ 'junit:junit:4.1' " Gradle format + \ ], + \ 'classPath': [ + \ 'lib/some-dependency.jar', + \ '/android-sdk/platforms/android-28.jar' + \ ] + \ } + \ } + +The Java language server will look for the dependencies you specify in +`externalDependencies` array in your Maven and Gradle caches ~/.m2 and +~/.gradle. + + +=============================================================================== +eclipselsp *ale-java-eclipselsp* + +To enable Eclipse JDT LSP linter you need to clone and build the eclipse.jdt.ls +language server from https://github.com/eclipse/eclipse.jdt.ls. Simply +clone the source code repo and then build the plugin: + + ./mvnw clean verify + +Note: currently, the build can only run when launched with JDK 11. More +recent versions can be used to run the server though. + +After build completes the files required to run the language server will be +located inside the repository folder `eclipse.jdt.ls`. Please ensure to set +|g:ale_java_eclipselsp_path| to the absolute path of that folder. + +You could customize compiler options and code assists of the server. +Under your project folder, modify the file `.settings/org.eclipse.jdt.core.prefs` +with options presented at +https://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html. + +g:ale_java_eclipselsp_path *g:ale_java_eclipselsp_path* + *b:ale_java_eclipselsp_path* + + Type: |String| + Default: `'$HOME/eclipse.jdt.ls'` + + Absolute path to the location of the eclipse.jdt.ls repository folder. Or if + you have VSCode extension installed the absolute path to the VSCode + extensions folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in + Linux). + + +g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable* + *b:ale_java_eclipse_executable* + Type: |String| + Default: `'java'` + + This variable can be set to change the executable path used for java. + + +g:ale_java_eclipselsp_config_path *g:ale_java_eclipse_config_path* + *b:ale_java_eclipse_config_path* + Type: |String| + Default: `''` + + Set this variable to change the configuration directory path used by + eclipselsp (e.g. `$HOME/.jdtls` in Linux). + By default ALE will attempt to use the configuration within the installation + directory. + This setting is particularly useful when eclipselsp is installed in a + non-writable directory like `/usr/share/java/jdtls`, as is the case when + installed via system package. + + +g:ale_java_eclipselsp_workspace_path *g:ale_java_eclipselsp_workspace_path* + *b:ale_java_eclipselsp_workspace_path* + + Type: |String| + Default: `''` + + If you have Eclipse installed is good idea to set this variable to the + absolute path of the Eclipse workspace. If not set this value will be set to + the parent folder of the project root. + +g:ale_java_eclipselsp_javaagent *g:ale_java_eclipselsp_javaagent* + *b:ale_java_eclipselsp_javaagent* + + Type: |String| + Default: `''` + + A variable to add java agent for annotation processing such as Lombok. + If you have multiple java agent files, use space to separate them. + For example: +> + let g:ale_java_eclipselsp_javaagent='/eclipse/lombok.jar /eclipse/jacoco.jar' +< + +=============================================================================== +uncrustify *ale-java-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-javascript.txt b/dot_vim/plugged/ale/doc/ale-javascript.txt new file mode 100644 index 0000000..a55cd64 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-javascript.txt @@ -0,0 +1,363 @@ +=============================================================================== +ALE JavaScript Integration *ale-javascript-options* + + *ale-eslint-nested-configuration-files* + +For fixing files with ESLint, nested configuration files with `root: false` +are not supported. This is because ALE fixes files by writing the contents of +buffers to temporary files, and then explicitly sets the configuration file. +Configuration files which are set explicitly must be root configuration files. +If you are using nested configuration files, you should restructure your +project so your configuration files use `extends` instead. + +See the ESLint documentation here: +http://eslint.org/docs/user-guide/configuring#extending-configuration-files + +You should change the structure of your project from this: > + /path/foo/.eslintrc.js # root: true + /path/foo/bar/.eslintrc.js # root: false +< + +To this: > + /path/foo/.base-eslintrc.js # Base configuration here + /path/foo/.eslintrc.js # extends: ["/path/foo/.base-eslintrc.js"] + /path/foo/bar/.eslintrc.js # extends: ["/path/foo/.base-eslintrc.js"] +< + + +=============================================================================== +clang-format *ale-javascript-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for JavaScript. + + +=============================================================================== +cspell *ale-javascript-cspell* + +See |ale-cspell-options| + + +=============================================================================== +deno *ale-javascript-deno* + +Check the docs over at |ale-typescript-deno|. + + +=============================================================================== +dprint *ale-javascript-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/typescript + + +=============================================================================== +eslint *ale-javascript-eslint* + +g:ale_javascript_eslint_executable *g:ale_javascript_eslint_executable* + *b:ale_javascript_eslint_executable* + Type: |String| + Default: `'eslint'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_eslint_options *g:ale_javascript_eslint_options* + *b:ale_javascript_eslint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to eslint. + + +g:ale_javascript_eslint_use_global *g:ale_javascript_eslint_use_global* + *b:ale_javascript_eslint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_javascript_eslint_suppress_eslintignore + *g:ale_javascript_eslint_suppress_eslintignore* + *b:ale_javascript_eslint_suppress_eslintignore* + Type: |Number| + Default: `0` + + This variable can be set to `1` to disable warnings for files being ignored + by eslint. + + +g:ale_javascript_eslint_suppress_missing_config + *g:ale_javascript_eslint_suppress_missing_config* + *b:ale_javascript_eslint_suppress_missing_config* + Type: |Number| + Default: `0` + + This variable can be set to `1` to disable errors for missing eslint + configuration files. + + When turning this option on, eslint will not report any problems when no + configuration files are found. + + +=============================================================================== +fecs *ale-javascript-fecs* + +`fecs` is a lint tool for HTML/CSS/JavaScript, can be installed via: + + `$ npm install --save-dev fecs` + +And the configuration file is located at `./fecsrc`, see http://fecs.baidu.com +for more options. + + +g:ale_javascript_fecs_executable *g:ale_javascript_fecs_executable* + *b:ale_javascript_fecs_executable* + Type: |String| + Default: `'fecs'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_fecs_use_global *g:ale_javascript_fecs_use_global* + *b:ale_javascript_fecs_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +flow *ale-javascript-flow* + +g:ale_javascript_flow_executable *g:ale_javascript_flow_executable* + *b:ale_javascript_flow_executable* + Type: |String| + Default: `'flow'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_flow_use_home_config *g:ale_javascript_flow_use_home_config* + *b:ale_javascript_flow_use_home_config* + Type: |Number| + Default: `0` + + When set to `1`, ALE will allow Flow to be executed with configuration files + from your home directory. ALE will not run Flow with home directory + configuration files by default, as doing so can lead to Vim consuming all of + your RAM and CPU power. + + +g:ale_javascript_flow_use_global *g:ale_javascript_flow_use_global* + *b:ale_javascript_flow_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_javascript_flow_use_respect_pragma + *g:ale_javascript_flow_use_respect_pragma* + *b:ale_javascript_flow_use_respect_pragma* + Type: |Number| + Default: `1` + + By default, ALE will use the `--respect-pragma` option for `flow`, so only + files with the `@flow` pragma are checked by ALE. This option can be set to + `0` to disable that behavior, so all files can be checked by `flow`. + + +=============================================================================== +importjs *ale-javascript-importjs* + +g:ale_javascript_importjs_executable *g:ale_javascript_importjs_executable* + *b:ale_javascript_importjs_executable* + Type: |String| + Default: `'importjs'` + + +=============================================================================== +jscs *ale-javascript-jscs* + +g:ale_javascript_jscs_executable *g:ale_javascript_jscs_executable* + *b:ale_javascript_jscs_executable* + Type: |String| + Default: `'jscs'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_jscs_use_global *g:ale_javascript_jscs_use_global* + *b:ale_javascript_jscs_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +jshint *ale-javascript-jshint* + +g:ale_javascript_jshint_executable *g:ale_javascript_jshint_executable* + *b:ale_javascript_jshint_executable* + Type: |String| + Default: `'jshint'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_jshint_use_global *g:ale_javascript_jshint_use_global* + *b:ale_javascript_jshint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prettier *ale-javascript-prettier* + +g:ale_javascript_prettier_executable *g:ale_javascript_prettier_executable* + *b:ale_javascript_prettier_executable* + Type: |String| + Default: `'prettier'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_prettier_options *g:ale_javascript_prettier_options* + *b:ale_javascript_prettier_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to prettier. + + +g:ale_javascript_prettier_use_global *g:ale_javascript_prettier_use_global* + *b:ale_javascript_prettier_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prettier-eslint *ale-javascript-prettier-eslint* + +g:ale_javascript_prettier_eslint_executable + *g:ale_javascript_prettier_eslint_executable* + *b:ale_javascript_prettier_eslint_executable* + Type: |String| + Default: `'prettier-eslint'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_prettier_eslint_options + *g:ale_javascript_prettier_eslint_options* + *b:ale_javascript_prettier_eslint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to prettier-eslint. + + +g:ale_javascript_prettier_eslint_use_global + *g:ale_javascript_prettier_eslint_use_global* + *b:ale_javascript_prettier_eslint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prettier-standard *ale-javascript-prettier-standard* + + +g:ale_javascript_prettier_standard_executable + *g:ale_javascript_prettier_standard_executable* + *b:ale_javascript_prettier_standard_executable* + Type: |String| + Default: `'prettier-standard'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_prettier_standard_options + *g:ale_javascript_prettier_standard_options* + *b:ale_javascript_prettier_standard_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to prettier-standard. + + +g:ale_javascript_prettier_standard_use_global + *g:ale_javascript_prettier_standard_use_global* + *b:ale_javascript_prettier_standard_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + + + +=============================================================================== +standard *ale-javascript-standard* + +g:ale_javascript_standard_executable *g:ale_javascript_standard_executable* + *b:ale_javascript_standard_executable* + Type: |String| + Default: `'standard'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_standard_options *g:ale_javascript_standard_options* + *b:ale_javascript_standard_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to standard. + + +g:ale_javascript_standard_use_global *g:ale_javascript_standard_use_global* + *b:ale_javascript_standard_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +xo *ale-javascript-xo* + +g:ale_javascript_xo_executable *g:ale_javascript_xo_executable* + *b:ale_javascript_xo_executable* + Type: |String| + Default: `'xo'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_xo_options *g:ale_javascript_xo_options* + *b:ale_javascript_xo_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to xo. + + +g:ale_javascript_xo_use_global *g:ale_javascript_xo_use_global* + *b:ale_javascript_xo_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-json.txt b/dot_vim/plugged/ale/doc/ale-json.txt new file mode 100644 index 0000000..7b24037 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-json.txt @@ -0,0 +1,177 @@ +=============================================================================== +ALE JSON Integration *ale-json-options* + + +=============================================================================== +clang-format *ale-json-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for JSON. + + +=============================================================================== +cspell *ale-json-cspell* + +See |ale-cspell-options| + + +=============================================================================== +dprint *ale-json-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/json + + +=============================================================================== +eslint *ale-json-eslint* + +The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: +|ale-javascript-eslint|. + +You will need a JSON ESLint plugin installed for this to work. + + +=============================================================================== +fixjson *ale-json-fixjson* + +fixjson is a JSON file fixer/formatter for humans using (relaxed) JSON5. +It provides: + +- Pretty-prints JSON input +- Fixes various failures while humans writing JSON + - Fixes trailing commas objects or arrays + - Fixes missing commas for elements of objects or arrays + - Adds quotes to keys in objects + - Newlines in strings + - Hex numbers + - Fixes single quotes to double quotes + +You can install it using npm: +> + $ npm install -g fixjson +< +ALE provides fixjson integration as a fixer. See |ale-fix|. + +g:ale_json_fixjson_executable *g:ale_json_fixjson_executable* + *b:ale_json_fixjson_executable* + + Type: |String| + Default: `'fixjson'` + + The executable that will be run for fixjson. + +g:ale_json_fixjson_options *g:ale_json_fixjson_options* + *b:ale_json_fixjson_options* + + Type: |String| + Default: `''` + + This variable can add extra options to the command executed for running + fixjson. + +g:ale_json_fixjson_use_global *g:ale_json_fixjson_use_global* + *b:ale_json_fixjson_use_global* + + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +jsonlint *ale-json-jsonlint* + +g:ale_json_jsonlint_executable *g:ale_json_jsonlint_executable* + *b:ale_json_jsonlint_executable* + + Type: |String| + Default: `'jsonlint'` + + The executable that will be run for jsonlint. + +g:ale_json_jsonlint_use_global *g:ale_json_jsonlint_use_global* + *b:ale_json_jsonlint_use_global* + + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +jq *ale-json-jq* + +g:ale_json_jq_executable *g:ale_json_jq_executable* + *b:ale_json_jq_executable* + Type: |String| + Default: `'jq'` + + This option can be changed to change the path for `jq`. + + +g:ale_json_jq_options *g:ale_json_jq_options* + *b:ale_json_jq_options* + Type: |String| + Default: `''` + + This option can be changed to pass extra options to `jq`. + +g:ale_json_jq_filters *g:ale_json_jq_filters* + *b:ale_json_jq_filters* + Type: |String| + Default: `'.'` + + This option can be changed to pass custom filters to `jq`. + + +=============================================================================== +prettier *ale-json-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +spectral *ale-json-spectral* + +Website: https://github.com/stoplightio/spectral + +Installation +------------------------------------------------------------------------------- + +Install spectral either globally or locally: > + + npm install @stoplight/spectral -g # global + npm install @stoplight/spectral # local +< + +Options +------------------------------------------------------------------------------- + +g:ale_json_spectral_executable *g:ale_json_spectral_executable* + *b:ale_json_spectral_executable* + Type: |String| + Default: `'spectral'` + + This variable can be set to change the path to spectral. + +g:ale_json_spectral_use_global *g:ale_json_spectral_use_global* + *b:ale_json_spectral_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + +=============================================================================== +vscodejson *ale-json-vscode* + +Website: https://github.com/hrsh7th/vscode-langservers-extracted + +Installation +------------------------------------------------------------------------------- + +Install VSCode json language server either globally or locally: > + + npm install -g vscode-langservers-extracted +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-json5.txt b/dot_vim/plugged/ale/doc/ale-json5.txt new file mode 100644 index 0000000..bafa60d --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-json5.txt @@ -0,0 +1,15 @@ +=============================================================================== +ALE JSON5 Integration *ale-json5-options* + + +=============================================================================== +eslint *ale-json5-eslint* + +The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: +|ale-javascript-eslint|. + +You will need a JSON5 ESLint plugin installed for this to work. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-jsonc.txt b/dot_vim/plugged/ale/doc/ale-jsonc.txt new file mode 100644 index 0000000..92247cd --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-jsonc.txt @@ -0,0 +1,15 @@ +=============================================================================== +ALE JSONC Integration *ale-jsonc-options* + + +=============================================================================== +eslint *ale-jsonc-eslint* + +The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: +|ale-javascript-eslint|. + +You will need a JSONC ESLint plugin installed for this to work. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-jsonnet.txt b/dot_vim/plugged/ale/doc/ale-jsonnet.txt new file mode 100644 index 0000000..f99d415 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-jsonnet.txt @@ -0,0 +1,43 @@ +=============================================================================== +ALE Jsonnet Integration *ale-jsonnet-options* + + +=============================================================================== +jsonnetfmt *ale-jsonnet-jsonnetfmt* + +g:ale_jsonnet_jsonnetfmt_executable *g:ale_jsonnet_jsonnetfmt_executable* + *b:ale_jsonnet_jsonnetfmt_executable* + Type: |String| + Default: `'jsonnetfmt'` + + This option can be changed to change the path for `jsonnetfmt`. + + +g:ale_jsonnet_jsonnetfmt_options *g:ale_jsonnet_jsonnetfmt_options* + *b:ale_jsonnet_jsonnetfmt_options* + Type: |String| + Default: `''` + + This option can be changed to pass extra options to `jsonnetfmt`. + + +=============================================================================== +jsonnet-lint *ale-jsonnet-jsonnet-lint* + +g:ale_jsonnet_jsonnet_lint_executable *g:ale_jsonnet_jsonnet_lint_executable* + *b:ale_jsonnet_jsonnet_lint_executable* + Type: |String| + Default: `'jsonnet-lint'` + + This option can be changed to change the path for `jsonnet-lint`. + + +g:ale_jsonnet_jsonnet_lint_options *g:ale_jsonnet_jsonnet_lint_options* + *b:ale_jsonnet_jsonnet_lint_options* + Type: |String| + Default: `''` + + This option can be changed to pass extra options to `jsonnet-lint`. + + + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-julia.txt b/dot_vim/plugged/ale/doc/ale-julia.txt new file mode 100644 index 0000000..ab74ee1 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-julia.txt @@ -0,0 +1,20 @@ +=============================================================================== +ALE Julia Integration *ale-julia-options* + +=============================================================================== +languageserver *ale-julia-languageserver* + +To enable Julia LSP linter you need to install the LanguageServer.jl package +within julia. + +g:ale_julia_executable *g:ale_julia_executable* + *b:ale_julia_executable* + + Type: |String| + Default: `'julia'` + + Path to the julia exetuable. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-kotlin.txt b/dot_vim/plugged/ale/doc/ale-kotlin.txt new file mode 100644 index 0000000..87cf56c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-kotlin.txt @@ -0,0 +1,113 @@ +=============================================================================== +ALE Kotlin Integration *ale-kotlin-options* + *ale-integration-kotlin* + +=============================================================================== +Integration Information + + Make sure your setup has support for the kotlin file type. A filetype plugin + can be found here: https://github.com/udalov/kotlin-vim + + + Note: Make sure you have a working kotlin compiler + + +=============================================================================== +kotlinc *ale-kotlin-kotlinc* + +g:ale_kotlin_kotlinc_options *g:ale_kotlin_kotlinc_options* + Type: |String| + Default: `''` + + Additional options to pass to the kotlin compiler + +g:ale_kotlin_kotlinc_enable_config *g:ale_kotlin_kotlinc_enable_config* + Type: |Number| + Default: `0` + + Setting this variable to `1` tells the linter to load a configuration file. + This should be set in your vimrc + +g:ale_kotlin_kotlinc_config_file *g:ale_kotlin_kotlinc_config_file* + Type: |String| + Default: `'.ale_kotlin_kotlinc_config'` + + Filename of the configuration file. This should be set in your vimrc + +g:ale_kotlin_kotlinc_classpath *g:ale_kotlin_kotlinc_classpath* + Type: |String| + Default: `''` + + A string containing the paths (separated by the appropriate path separator) + of the source directories. + +g:ale_kotlin_kotlinc_sourcepath *g:ale_kotlin_kotlinc_sourcepath* + Type: |String| + Default: `''` + + A string containing the paths (separated by space) of the source + directories. + +g:ale_kotlin_kotlinc_use_module_file *g:ale_kotlin_kotlinc_use_module_file* + Type: |Number| + Default: `0` + + This option indicates whether the linter should use a module file. It is off + by default. + +g:ale_kotlin_kotlinc_module_filename *g:ale_kotlin_kotlinc_module_filename* + Type: |String| + Default: `'module.xml'` + + The filename of the module file that the linter should pass to the kotlin + compiler. + + +=============================================================================== +ktlint *ale-kotlin-ktlint* + +g:ale_kotlin_ktlint_executable *g:ale_kotlin_ktlint_executable* + Type: |String| + Default: `''` + + The Ktlint executable. + + Posix-compliant shell scripts are the only executables that can be found on + Ktlint's github release page. If you are not on such a system, your best + bet will be to download the ktlint jar and set this option to something + similar to `'java -jar /path/to/ktlint.jar'` + +g:ale_kotlin_ktlint_rulesets *g:ale_kotlin_ktlint_rulesets* + Type: |List| of |String|s + Default: `[]` + + This list should contain paths to ruleset jars and/or strings of maven + artifact triples. Example: + > + let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom-ruleset.jar', + 'com.ktlint.rulesets:mycustomrule:1.0.0'] + +g:ale_kotlin_ktlint_options *g:ale_kotlin_ktlint_options* + Type: |String| + Default: `''` + + Additional options to pass to ktlint for both linting and fixing. Example: + > + let g:ale_kotlin_ktlint_options = '--android' + + +=============================================================================== +languageserver *ale-kotlin-languageserver* + +g:ale_kotlin_languageserver_executable *g:ale_kotlin_languageserver_executable* + Type: |String| + Default: `''` + + The kotlin-language-server executable. + + Executables are located inside the bin/ folder of the language server + release. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-latex.txt b/dot_vim/plugged/ale/doc/ale-latex.txt new file mode 100644 index 0000000..b3029a5 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-latex.txt @@ -0,0 +1,21 @@ +=============================================================================== +ALE LaTeX Integration *ale-latex-options* + + +=============================================================================== +cspell *ale-latex-cspell* + +=============================================================================== +write-good *ale-latex-write-good* + +See |ale-write-good-options| + + +=============================================================================== +textlint *ale-latex-textlint* + +See |ale-text-textlint| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-less.txt b/dot_vim/plugged/ale/doc/ale-less.txt new file mode 100644 index 0000000..040e511 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-less.txt @@ -0,0 +1,66 @@ +=============================================================================== +ALE Less Integration *ale-less-options* + + +=============================================================================== +lessc *ale-less-lessc* + +g:ale_less_lessc_executable *g:ale_less_lessc_executable* + *b:ale_less_lessc_executable* + Type: |String| + Default: `'lessc'` + + See |ale-integrations-local-executables| + + +g:ale_less_lessc_options *g:ale_less_lessc_options* + *b:ale_less_lessc_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to lessc. + + +g:ale_less_lessc_use_global *g:ale_less_lessc_use_global* + *b:ale_less_lessc_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prettier *ale-less-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +stylelint *ale-less-stylelint* + +g:ale_less_stylelint_executable *g:ale_less_stylelint_executable* + *b:ale_less_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + + +g:ale_less_stylelint_options *g:ale_less_stylelint_options* + *b:ale_less_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + + +g:ale_less_stylelint_use_global *g:ale_less_stylelint_use_global* + *b:ale_less_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-llvm.txt b/dot_vim/plugged/ale/doc/ale-llvm.txt new file mode 100644 index 0000000..fff1c30 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-llvm.txt @@ -0,0 +1,19 @@ +=============================================================================== +ALE LLVM Integration *ale-llvm-options* + + +=============================================================================== +llc *ale-llvm-llc* + +g:ale_llvm_llc_executable *g:ale_llvm_llc_executable* + *b:ale_llvm_llc_executable* + + Type: |String| + Default: `"llc"` + + The command to use for checking. This variable is useful when llc command + has suffix like "llc-5.0". + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-lua.txt b/dot_vim/plugged/ale/doc/ale-lua.txt new file mode 100644 index 0000000..7ee60d0 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-lua.txt @@ -0,0 +1,118 @@ +=============================================================================== +ALE Lua Integration *ale-lua-options* + + +=============================================================================== +cspell *ale-lua-cspell* + +See |ale-cspell-options| + + +=============================================================================== +lua-format *ale-lua-lua-format* + +g:ale_lua_lua_format_executable *g:ale_lua_lua_format_executable* + *b:ale_lua_lua_format_executable* + Type: |String| + Default: `'lua-format'` + + This variable can be changed to change the path to lua-format. + + +g:ale_lua_lua_format_options *g:ale_lua_lua_format_options* + *b:ale_lua_lua_format_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to lua-format. + + +=============================================================================== +luac *ale-lua-luac* + +g:ale_lua_luac_executable *g:ale_lua_luac_executable* + *b:ale_lua_luac_executable* + Type: |String| + Default: `'luac'` + + This variable can be changed to change the path to luac. + + +=============================================================================== +luacheck *ale-lua-luacheck* + +g:ale_lua_luacheck_executable *g:ale_lua_luacheck_executable* + *b:ale_lua_luacheck_executable* + Type: |String| + Default: `'luacheck'` + + This variable can be changed to change the path to luacheck. + + +g:ale_lua_luacheck_options *g:ale_lua_luacheck_options* + *b:ale_lua_luacheck_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to luacheck. + + +=============================================================================== +luafmt *ale-lua-luafmt* + +g:ale_lua_luafmt_executable *g:ale_lua_luafmt_executable* + *b:ale_lua_luafmt_executable* + Type: |String| + Default: `'luafmt'` + + This variable can be set to use a different executable for luafmt. + + +g:ale_lua_luafmt_options *g:ale_lua_luafmt_options* + *b:ale_lua_luafmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the luafmt fixer. + + +=============================================================================== +selene *ale-lua-selene* + +g:ale_lua_selene_executable *g:ale_lua_selene_executable* + *b:ale_lua_selene_executable* + Type: |String| + Default: `'selene'` + + This variable can be set to use a different executable for selene. + + +g:ale_lua_selene_options *g:ale_lua_selene_options* + *b:ale_lua_selene_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to selene. + + +=============================================================================== +stylua *ale-lua-stylua* + +g:ale_lua_stylua_executable *g:ale_lua_stylua_executable* + *b:ale_lua_stylua_executable* + Type: |String| + Default: `'stylua'` + + This variable can be set to use a different executable for stylua. + + +g:ale_lua_stylua_options *g:ale_lua_stylua_options* + *b:ale_lua_stylua_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the stylua fixer. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-make.txt b/dot_vim/plugged/ale/doc/ale-make.txt new file mode 100644 index 0000000..74de798 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-make.txt @@ -0,0 +1,18 @@ +=============================================================================== +ALE Make Integration *ale-make-options* + + +=============================================================================== +checkmake *ale-make-checkmake* + +g:ale_make_checkmake_config *g:ale_make_checkmake_config* + *b:ale_make_checkmake_config* + Type: |String| + Default: `''` + + This variable can be used to set the `--config` option of checkmake command. + if the value is empty, the checkmake command will not be invoked with the + option. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-markdown.txt b/dot_vim/plugged/ale/doc/ale-markdown.txt new file mode 100644 index 0000000..422828f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-markdown.txt @@ -0,0 +1,122 @@ +=============================================================================== +ALE Markdown Integration *ale-markdown-options* + + +=============================================================================== +cspell *ale-markdown-cspell* + +See |ale-cspell-options| + + +=============================================================================== +dprint *ale-markdown-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/markdown + + +=============================================================================== +markdownlint *ale-markdown-markdownlint* + +g:ale_markdown_markdownlint_executable *g:ale_markdown_markdownlint_executable* + *b:ale_markdown_markdownlint_executable* + Type: |String| + Default: `'markdownlint'` + + Override the invoked `markdownlint` binary. You can use other binaries such as + `markdownlint-cli2`. + + +g:ale_markdown_markdownlint_options *g:ale_markdown_markdownlint_options* + *b:ale_markdown_markdownlint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to markdownlint. + + +=============================================================================== +mdl *ale-markdown-mdl* + +g:ale_markdown_mdl_executable *g:ale_markdown_mdl_executable* + *b:ale_markdown_mdl_executable* + Type: |String| + Default: `'mdl'` + + Override the invoked mdl binary. This is useful for running mdl from + binstubs or a bundle. + + +g:ale_markdown_mdl_options *g:ale_markdown_mdl_options* + *b:ale_markdown_mdl_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to mdl. + + +=============================================================================== +pandoc *ale-markdown-pandoc* + +g:ale_markdown_pandoc_executable *g:ale_markdown_pandoc_executable* + *b:ale_markdown_pandoc_executable* + Type: |String| + Default: `'pandoc'` + + This variable can be set to specify where to find the pandoc executable + + +g:ale_markdown_pandoc_options *g:ale_markdown_pandoc_options* + *b:ale_markdown_pandoc_options* + Type: |String| + Default: `'-f gfm -t gfm -s -'` + + This variable can be set to change the default options passed to pandoc + + +=============================================================================== +prettier *ale-markdown-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +remark-lint *ale-markdown-remark-lint* + +g:ale_markdown_remark_lint_executable *g:ale_markdown_remark_lint_executable* + *b:ale_markdown_remark_lint_executable* + Type: |String| + Default: `'remark'` + + See |ale-integrations-local-executables| + + +g:ale_markdown_remark_lint_options *g:ale_markdown_remark_lint_options* + *b:ale_markdown_remark_lint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to remark-lint. + + +g:ale_markdown_remark_lint_use_global *g:ale_markdown_remark_lint_use_global* + *b:ale_markdown_remark_lint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +textlint *ale-markdown-textlint* + +See |ale-text-textlint| + + +=============================================================================== +write-good *ale-markdown-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-mercury.txt b/dot_vim/plugged/ale/doc/ale-mercury.txt new file mode 100644 index 0000000..ca06a0a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-mercury.txt @@ -0,0 +1,26 @@ +=============================================================================== +ALE Mercury Integration *ale-mercury-options* + + +=============================================================================== +mmc *ale-mercury-mmc* + + +g:ale_mercury_mmc_executable *g:ale_mercury_mmc_executable* + *b:ale_mercury_mmc_executable* + Type: |String| + Default: `'mmc'` + + This variable can be changed to use a different executable for mmc. + + +g:ale_mercury_mmc_options *g:ale_mercury_mmc_options* + *b:ale_mercury_mmc_options* + Type: |String| + Default: `'--make --output-compile-error-lines 100'` + + This variable can be set to pass additional options to mmc. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-nasm.txt b/dot_vim/plugged/ale/doc/ale-nasm.txt new file mode 100644 index 0000000..16c024a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-nasm.txt @@ -0,0 +1,26 @@ +=============================================================================== +ALE NASM Integration *ale-nasm-options* + + +=============================================================================== +nasm *ale-nasm-nasm* + +g:ale_nasm_nasm_executable *g:ale_nasm_nasm_executable* + *b:ale_nasm_nasm_executable* + + Type: |String| + Default `'nasm'` + + This variable can be changed to use different executable for NASM. + + +g:ale_nasm_nasm_options *g:ale_nasm_nasm_options* + *b:ale_nasm_nasm_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to NASM. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-nim.txt b/dot_vim/plugged/ale/doc/ale-nim.txt new file mode 100644 index 0000000..8985aeb --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-nim.txt @@ -0,0 +1,45 @@ +=============================================================================== +ALE Nim Integration *ale-nim-options* + + +=============================================================================== +nimcheck *ale-nim-nimcheck* + + ALE does not provide additional configuration options for `nimcheck` at this + point. + + +=============================================================================== +nimlsp *ale-nim-nimlsp* + +g:nim_nimlsp_nim_sources *g:nim_nimlsp_nim_sources* + + Type: |String| + Default: `''` + + Sets the path to Nim source repository as the first argument to `nimlsp` + command. + + +=============================================================================== +nimpretty *ale-nim-nimpretty* + + +g:ale_nim_nimpretty_executable *g:ale_nim_nimpretty_executable* + *b:ale_nim_nimpretty_executable* + Type: |String| + Default: `'nimpretty'` + + This variable can be changed to use a different executable for nimpretty. + + +g:ale_nim_nimpretty_options *g:ale_nim_nimpretty_options* + *b:ale_nim_nimpretty_options* + Type: |String| + Default: `'--maxLineLen:80'` + + This variable can be changed to modify flags given to nimpretty. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-nix.txt b/dot_vim/plugged/ale/doc/ale-nix.txt new file mode 100644 index 0000000..1df7caf --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-nix.txt @@ -0,0 +1,79 @@ +=============================================================================== +ALE Nix Integration *ale-nix-options* + + +=============================================================================== +nixfmt *ale-nix-nixfmt* + +g:ale_nix_nixfmt_executable *g:ale_nix_nixfmt_executable* + *b:ale_nix_nixfmt_executable* + Type: |String| + Default: `'nixfmt'` + + This variable sets the executable used for nixfmt. + +g:ale_nix_nixfmt_options *g:ale_nix_nixfmt_options* + *b:ale_nix_nixfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the nixfmt fixer. + + +=============================================================================== +nixpkgs-fmt *ale-nix-nixpkgs-fmt* + +g:ale_nix_nixpkgsfmt_executable *g:ale_nix_nixpkgsfmt_executable* + *b:ale_nix_nixpkgsfmt_executable* + Type: |String| + Default: `'nixpkgs-fmt'` + + This variable sets executable used for nixpkgs-fmt. + +g:ale_nix_nixpkgsfmt_options *g:ale_nix_nixpkgsfmt_options* + *b:ale_nix_nixpkgsfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the nixpkgs-fmt + fixer. + + +=============================================================================== +statix *ale-nix-statix* + +g:ale_nix_statix_check_executable *g:ale_nix_statix_check_executable* + *b:ale_nix_statix_check_executable* + Type: |String| + Default: `'statix'` + + This variable sets the executable used for statix when running it as a + linter. + +g:ale_nix_statix_check_options *g:ale_nix_statix_check_options* + *b:ale_nix_statix_check_options* + Type: |String| + Default: `''` + + This variable can be used to pass additional options to statix when running + it as a linter. + +g:ale_nix_statix_fix_executable *g:ale_nix_fix_check_executable* + *b:ale_nix_fix_check_executable* + Type: |String| + Default: `'statix'` + + This variable sets the executable used for statix when running it as a + fixer. + +g:ale_nix_statix_fix_options *g:ale_nix_statix_fix_options* + *b:ale_nix_statix_fix_options* + Type: |String| + Default: `''` + + This variable can be used to pass additional options to statix when running + it as a fixer. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-nroff.txt b/dot_vim/plugged/ale/doc/ale-nroff.txt new file mode 100644 index 0000000..62ec789 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-nroff.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE nroff Integration *ale-nroff-options* + + +=============================================================================== +write-good *ale-nroff-write-good* + +See |ale-write-good-options| + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-objc.txt b/dot_vim/plugged/ale/doc/ale-objc.txt new file mode 100644 index 0000000..e1a0c2a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-objc.txt @@ -0,0 +1,80 @@ +=============================================================================== +ALE Objective-C Integration *ale-objc-options* + + +=============================================================================== +ccls *ale-objc-ccls* + +g:ale_objc_ccls_executable *g:ale_objc_ccls_executable* + *b:ale_objc_ccls_executable* + Type: |String| + Default: `'ccls'` + + This variable can be changed to use a different executable for ccls. + + +g:ale_objc_ccls_init_options *g:ale_objc_ccls_init_options* + *b:ale_objc_ccls_init_options* + Type: |Dictionary| + Default: `{}` + + This variable can be changed to customize ccls initialization options. + Example: > + { + \ 'cacheDirectory': '/tmp/ccls', + \ 'cacheFormat': 'binary', + \ 'diagnostics': { + \ 'onOpen': 0, + \ 'opChange': 1000, + \ }, + \ } +< + Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all + available options and explanations. + + +=============================================================================== +clang *ale-objc-clang* + +g:ale_objc_clang_options *g:ale_objc_clang_options* + *b:ale_objc_clang_options* + Type: |String| + Default: `'-std=c11 -Wall'` + + This variable can be changed to modify flags given to clang. + + +=============================================================================== +clang-format *ale-objc-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Objective-C. + + +=============================================================================== +clangd *ale-objc-clangd* + +g:ale_objc_clangd_executable *g:ale_objc_clangd_executable* + *b:ale_objc_clangd_executable* + Type: |String| + Default: `'clangd'` + + This variable can be changed to use a different executable for clangd. + + +g:ale_objc_clangd_options *g:ale_objc_clangd_options* + *b:ale_objc_clangd_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clangd. + + +=============================================================================== +uncrustify *ale-objc-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-objcpp.txt b/dot_vim/plugged/ale/doc/ale-objcpp.txt new file mode 100644 index 0000000..cd65ab7 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-objcpp.txt @@ -0,0 +1,42 @@ +=============================================================================== +ALE Objective-C++ Integration *ale-objcpp-options* + + +=============================================================================== +clang *ale-objcpp-clang* + +g:ale_objcpp_clang_options *g:ale_objcpp_clang_options* + *b:ale_objcpp_clang_options* + Type: |String| + Default: `'-std=c++14 -Wall'` + + This variable can be changed to modify flags given to clang. + + +=============================================================================== +clangd *ale-objcpp-clangd* + +g:ale_objcpp_clangd_executable *g:ale_objcpp_clangd_executable* + *b:ale_objcpp_clangd_executable* + Type: |String| + Default: `'clangd'` + + This variable can be changed to use a different executable for clangd. + + +g:ale_objcpp_clangd_options *g:ale_objcpp_clangd_options* + *b:ale_objcpp_clangd_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to clangd. + + +=============================================================================== +uncrustify *ale-objcpp-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-ocaml.txt b/dot_vim/plugged/ale/doc/ale-ocaml.txt new file mode 100644 index 0000000..a361a7b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ocaml.txt @@ -0,0 +1,117 @@ +=============================================================================== +ALE OCaml Integration *ale-ocaml-options* + + +=============================================================================== +dune *ale-ocaml-dune* + + Dune is a build system for OCaml projects. The `dune format` command is + supported for automatically formatting `dune` and `dune-project` files. + +g:ale_ocaml_dune_executable *g:ale_ocaml_dune_executable* + *b:ale_ocaml_dune_executable* + Type: |String| + Default: `'dune'` + + This variable can be set to pass the path to dune. + +g:ale_ocaml_dune_options *g:ale_ocaml_dune_options* + *b:ale_ocaml_dune_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the dune fixer. + +=============================================================================== +merlin *ale-ocaml-merlin* + + To use merlin linter for OCaml source code you need to make sure Merlin for + Vim is correctly configured. See the corresponding Merlin wiki page for + detailed instructions + (https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch). + +=============================================================================== +ocamllsp *ale-ocaml-ocamllsp* + + The `ocaml-lsp-server` is the official OCaml implementation of the Language + Server Protocol. See the installation instructions: + https://github.com/ocaml/ocaml-lsp#installation + +g:ale_ocaml_ocamllsp_use_opam *g:ale_ocaml_ocamllsp_use_opam* + *b:ale_ocaml_ocamllsp_use_opam* + Type: |Number| + Default: `get(g:, 'ale_ocaml_ocamllsp_use_opam', 1)` + + This variable can be set to change whether or not opam is used to execute + the language server. + +=============================================================================== +ols *ale-ocaml-ols* + + The `ocaml-language-server` is the engine that powers OCaml and ReasonML + editor support using the Language Server Protocol. See the installation + instructions: + https://github.com/freebroccolo/ocaml-language-server#installation + +g:ale_ocaml_ols_executable *g:ale_ocaml_ols_executable* + *b:ale_ocaml_ols_executable* + Type: |String| + Default: `'ocaml-language-server'` + + This variable can be set to change the executable path for `ols`. + +g:ale_ocaml_ols_use_global *g:ale_ocaml_ols_use_global* + *b:ale_ocaml_ols_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable can be set to `1` to always use the globally installed + executable. See also |ale-integrations-local-executables|. + +=============================================================================== +ocamlformat *ale-ocaml-ocamlformat* + +g:ale_ocaml_ocamlformat_executable *g:ale_ocaml_ocamlformat_executable* + *b:ale_ocaml_ocamlformat_executable* + Type: |String| + Default: `'ocamlformat'` + + This variable can be set to pass the path of the ocamlformat fixer. + +g:ale_ocaml_ocamlformat_options *g:ale_ocaml_ocamlformat_options* + *b:ale_ocaml_ocamlformat_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the ocamlformat fixer. + +=============================================================================== +ocp-indent *ale-ocaml-ocp-indent* + +g:ale_ocaml_ocp_indent_executable *g:ale_ocaml_ocp_indent_executable* + *b:ale_ocaml_ocp_indent_executable* + Type: |String| + Default: `ocp-indent` + + This variable can be set to pass the path of the ocp-indent. + +g:ale_ocaml_ocp_indent_options *g:ale_ocaml_ocp_indent_options* + *b:ale_ocaml_ocp_indent_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the ocp-indent. + +g:ale_ocaml_ocp_indent_config *g:ale_ocaml_ocp_indent_config* + *b:ale_ocaml_ocp_indent_config* + Type: |String| + Default: `''` + + This variable can be set to pass additional config to the ocp-indent. + Expand after "--config=". + + "ocp-indent" can also be enabled from ocamlformat config. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-openapi.txt b/dot_vim/plugged/ale/doc/ale-openapi.txt new file mode 100644 index 0000000..1fc41ad --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-openapi.txt @@ -0,0 +1,74 @@ +=============================================================================== +ALE OpenApi Integration *ale-openapi-options* + +=============================================================================== +ibm_validator *ale-openapi-ibm-validator* + +Website: https://github.com/IBM/openapi-validator + + +Installation +------------------------------------------------------------------------------- + +Install ibm-openapi-validator either globally or locally: > + + npm install ibm-openapi-validator -g # global + npm install ibm-openapi-validator # local +< +Configuration +------------------------------------------------------------------------------- + +OpenAPI files can be written in YAML or JSON so in order for ALE plugins to +work with these files we must set the buffer |filetype| to either |openapi.yaml| +or |openapi.json| respectively. This causes ALE to lint the file with linters +configured for openapi and yaml files or openapi and json files respectively. + +For example setting filetype to |openapi.yaml| on a buffer and the following +|g:ale_linters| configuration will enable linting of openapi files using both +|ibm_validator| and |yamlint|: + +> + let g:ale_linters = { + \ 'yaml': ['yamllint'], + \ 'openapi': ['ibm_validator'] + \} +< + +The following plugin will detect openapi files automatically and set the +filetype to |openapi.yaml| or |openapi.json|: + + https://github.com/hsanson/vim-openapi + +Options +------------------------------------------------------------------------------- + +g:ale_openapi_ibm_validator_executable *g:ale_openapi_ibm_validator_executable* + *b:ale_openapi_ibm_validator_executable* + Type: |String| + Default: `'lint-openapi'` + + This variable can be set to change the path to lint-openapi. + + +g:ale_openapi_ibm_validator_options *g:ale_openapi_ibm_validator_options* + *b:ale_openapi_ibm_validator_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to lint-openapi. + + +=============================================================================== +prettier *ale-openapi-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +yamllint *ale-openapi-yamllint* + +See |ale-yaml-yamllint| for information about the available options. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-openscad.txt b/dot_vim/plugged/ale/doc/ale-openscad.txt new file mode 100644 index 0000000..ac416bc --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-openscad.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE OpenSCAD Integration *ale-openscad-options* + + +=============================================================================== +sca2d *ale-openscad-sca2d* + +g:ale_openscad_sca2d_executable *g:ale_openscad_sca2d_executable* + *b:ale_openscad_sca2d_executable* + Type: |String| + Default: `'sca2d'` + + See |ale-integrations-local-executables| + + +g:ale_openscad_sca2d_options *g:ale_openscad_sca2d_options* + *b:ale_openscad_sca2d_options* + Type: |String| + Default: `''` + + This variable can be set to pass options to sca2d. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-packer.txt b/dot_vim/plugged/ale/doc/ale-packer.txt new file mode 100644 index 0000000..11b7cc2 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-packer.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE Packer Integration *ale-packer-options* + + +=============================================================================== +packer-fmt-fixer *ale-packer-fmt-fixer* + +g:ale_packer_fmt_executable *g:ale_packer_fmt_executable* + *b:ale_packer_fmt_executable* + + Type: |String| + Default: `'packer'` + + This variable can be changed to use a different executable for packer. + + +g:ale_packer_fmt_options *g:ale_packer_fmt_options* + *b:ale_packer_fmt_options* + Type: |String| + Default: `''` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pascal.txt b/dot_vim/plugged/ale/doc/ale-pascal.txt new file mode 100644 index 0000000..03d9a00 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pascal.txt @@ -0,0 +1,24 @@ +=============================================================================== +ALE Pascal Integration *ale-pascal-options* + +=============================================================================== +ptop *ale-pascal-ptop* + +g:ale_pascal_ptop_executable *g:ale_pascal_ptop_executable* + *b:ale_pascal_ptop_executable* + Type: |String| + Default: `'ptop'` + + This variable can be changed to specify the ptop executable. + + +g:ale_pascal_ptop_options *g:ale_pascal_ptop_options* + *b:ale_pascal_ptop_options* + Type: |String| + Default: `''` + +This variable can be set to pass additional options to the ptop fixer. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pawn.txt b/dot_vim/plugged/ale/doc/ale-pawn.txt new file mode 100644 index 0000000..f836df9 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pawn.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE Pawn Integration *ale-pawn-options* + + +=============================================================================== +uncrustify *ale-pawn-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-perl.txt b/dot_vim/plugged/ale/doc/ale-perl.txt new file mode 100644 index 0000000..5eebc0e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-perl.txt @@ -0,0 +1,91 @@ +=============================================================================== +ALE Perl Integration *ale-perl-options* + +ALE offers a few ways to check Perl code. Checking code with `perl` is +disabled by default, as `perl` code cannot be checked without executing it. +Specifically, we use the `-c` flag to see if `perl` code compiles. This does +not execute all of the code in a file, but it does run `BEGIN` and `CHECK` +blocks. See `perl --help` and https://stackoverflow.com/a/12908487/406224 + +See |g:ale_linters|. + + +=============================================================================== +perl *ale-perl-perl* + +g:ale_perl_perl_executable *g:ale_perl_perl_executable* + *b:ale_perl_perl_executable* + Type: |String| + Default: `'perl'` + + This variable can be changed to modify the executable used for linting perl. + + +g:ale_perl_perl_options *g:ale_perl_perl_options* + *b:ale_perl_perl_options* + Type: |String| + Default: `'-c -Mwarnings -Ilib'` + + This variable can be changed to alter the command-line arguments to the perl + invocation. + + +=============================================================================== +perlcritic *ale-perl-perlcritic* + +g:ale_perl_perlcritic_executable *g:ale_perl_perlcritic_executable* + *b:ale_perl_perlcritic_executable* + Type: |String| + Default: `'perlcritic'` + + This variable can be changed to modify the perlcritic executable used for + linting perl. + + +g:ale_perl_perlcritic_profile *g:ale_perl_perlcritic_profile* + *b:ale_perl_perlcritic_profile* + Type: |String| + Default: `'.perlcriticrc'` + + This variable can be changed to modify the perlcritic profile used for + linting perl. The current directory is checked for the file, then the + parent directory, etc, until it finds one. If no matching file is found, no + profile is passed to perlcritic. + + Set to an empty string to disable passing a specific profile to perlcritic + with the `'--profile'` option. + + To prevent perlcritic from using any profile, set this variable to an empty + string and pass `'--no-profile'`to perlcritic via the + |g:ale_perl_perlcritic_options| variable. + + +g:ale_perl_perlcritic_options *g:ale_perl_perlcritic_options* + *b:ale_perl_perlcritic_options* + Type: |String| + Default: `''` + + This variable can be changed to supply additional command-line arguments to + the perlcritic invocation. + + +g:ale_perl_perlcritic_showrules *g:ale_perl_perlcritic_showrules* + + Type: |Number| + Default: `0` + + Controls whether perlcritic rule names are shown after the error message. + Defaults to off to reduce length of message. +=============================================================================== +perltidy *ale-perl-perltidy* + +g:ale_perl_perltidy_options *g:ale_perl_perltidy_options* + *b:ale_perl_perltidy_options* + Type: |String| + Default: `''` + + This variable can be changed to alter the command-line arguments to + the perltidy invocation. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-perl6.txt b/dot_vim/plugged/ale/doc/ale-perl6.txt new file mode 100644 index 0000000..94953db --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-perl6.txt @@ -0,0 +1,43 @@ +=============================================================================== +ALE Perl6 Integration *ale-perl6-options* + +Checking code with `perl6` is disabled by default, as `perl6` code cannot be +checked without executing it. Specifically, we use the `-c` flag to see if +`perl6` code compiles. This does not execute all of the code in a file, but it +does run `BEGIN` and `CHECK` blocks. See `perl6 --help` + +Full support requires a perl6 implementation that supports the +PERL6_EXCEPTIONS_HANDLER environment variable and JSON error output, +which was specified in 6.d. Rakudo version 2018.08 is the first rakudo release +that supports this. See `perl6 --version` and +https://docs.perl6.org/programs/03-environment-variables. + +Without this variable, errors and warnings will appear at line 1, and can be +viewed with ALEDetail. This also serves as a fallback for errors and warnings +that do not trigger JSON output. + +See |g:ale_linters|. + + +=============================================================================== +perl6 *ale-perl6-perl6* + +g:ale_perl6_perl6_executable *g:ale_perl6_perl6_executable* + *b:ale_perl6_perl6_executable* + Type: |String| + Default: `'perl6'` + + This variable can be changed to modify the executable used for linting + perl6. + + +g:ale_perl6_perl6_options *g:ale_perl6_perl6_options* + *b:ale_perl6_perl6_options* + Type: |String| + Default: `'-c -Ilib'` + + This variable can be changed to alter the command-line arguments to the + perl6 invocation. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-php.txt b/dot_vim/plugged/ale/doc/ale-php.txt new file mode 100644 index 0000000..2750a31 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-php.txt @@ -0,0 +1,367 @@ +=============================================================================== +ALE PHP Integration *ale-php-options* + + +=============================================================================== +cspell *ale-php-cspell* + +See |ale-cspell-options| + + +=============================================================================== +langserver *ale-php-langserver* + +g:ale_php_langserver_executable *g:ale_php_langserver_executable* + *b:ale_php_langserver_executable* + Type: |String| + Default: `'php-language-server.php'` + + The variable can be set to configure the executable that will be used for + running the PHP language server. `vendor` directory executables will be + preferred instead of this setting if |g:ale_php_langserver_use_global| is `0`. + + See: |ale-integrations-local-executables| + + +g:ale_php_langserver_use_global *g:ale_php_langserver_use_global* + *b:ale_php_langserver_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable can be set to `1` to force the language server to be run with + the executable set for |g:ale_php_langserver_executable|. + + See: |ale-integrations-local-executables| + + +=============================================================================== +phan *ale-php-phan* + +WARNING: please use the phan_client linter if you have an configuration file +for your project because the phan will look into your entirely project and +ale will display in the current buffer warnings that may belong to other file. + +g:ale_php_phan_minimum_severity *g:ale_php_phan_minimum_severity* + *b:ale_php_phan_minimum_severity* + Type: |Number| + Default: `0` + + This variable defines the minimum severity level. + + +g:ale_php_phan_executable *g:ale_php_phan_executable* + *b:ale_php_phan_executable* + Type: |String| + Default: `'phan'` + + This variable sets executable used for phan or phan_client. + + +g:ale_php_phan_use_client *g:ale_php_phan_use_client* + *b:ale_php_phan_use_client* + Type: |Number| + Default: `get(g:, 'ale_php_phan_use_client', 0)` + + This variable can be set to 1 to use the phan_client with phan daemon mode + instead of the phan standalone. + + +=============================================================================== +phpcbf *ale-php-phpcbf* + +g:ale_php_phpcbf_executable *g:ale_php_phpcbf_executable* + *b:ale_php_phpcbf_executable* + Type: |String| + Default: `'phpcbf'` + + See |ale-integrations-local-executables| + + +g:ale_php_phpcbf_standard *g:ale_php_phpcbf_standard* + *b:ale_php_phpcbf_standard* + Type: |String| + Default: `''` + + This variable can be set to specify the coding standard used by phpcbf. If no + coding standard is specified, phpcbf will default to fixing against the + PEAR coding standard, or the standard you have set as the default. + + +g:ale_php_phpcbf_use_global *g:ale_php_phpcbf_use_global* + *b:ale_php_phpcbf_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_php_phpcbf_options *g:ale_php_phpcbf_options* + *b:ale_php_phpcbf_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to php-cbf + + +=============================================================================== +phpcs *ale-php-phpcs* + +g:ale_php_phpcs_executable *g:ale_php_phpcs_executable* + *b:ale_php_phpcs_executable* + Type: |String| + Default: `'phpcs'` + + See |ale-integrations-local-executables| + + +g:ale_php_phpcs_standard *g:ale_php_phpcs_standard* + *b:ale_php_phpcs_standard* + Type: |String| + Default: `''` + + This variable can be set to specify the coding standard used by phpcs. If no + coding standard is specified, phpcs will default to checking against the + PEAR coding standard, or the standard you have set as the default. + + +g:ale_php_phpcs_use_global *g:ale_php_phpcs_use_global* + *b:ale_php_phpcs_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_php_phpcs_options *g:ale_php_phpcs_options* + *b:ale_php_phpcs_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to php-cs + + +=============================================================================== +phpmd *ale-php-phpmd* + +g:ale_php_phpmd_executable *g:ale_php_phpmd_executable* + *b:ale_php_phpmd_executable* + Type: |String| + Default: `'phpmd'` + + This variable sets executable used for phpmd. + + +g:ale_php_phpmd_ruleset *g:ale_php_phpmd_ruleset* + *b:ale_php_phpmd_ruleset* + Type: |String| + Default: `'cleancode,codesize,controversial,design,naming,unusedcode'` + + This variable controls the ruleset used by phpmd. Default is to use all of + the available phpmd rulesets + + +=============================================================================== +phpstan *ale-php-phpstan* + +g:ale_php_phpstan_executable *g:ale_php_phpstan_executable* + *b:ale_php_phpstan_executable* + Type: |String| + Default: `'phpstan'` + + This variable sets executable used for phpstan. + + +g:ale_php_phpstan_level *g:ale_php_phpstan_level* + *b:ale_php_phpstan_level* + Type: |String| + Default: `''` + + This variable controls the rule levels. 0 is the loosest and 7 is the + strictest. If this option isn't set, the rule level will be controlled by + the configuration file. If no configuration file can be detected, `'7'` will + be used instead. + + +g:ale_php_phpstan_configuration *g:ale_php_phpstan_configuration* + *b:ale_php_phpstan_configuration* + Type: |String| + Default: `''` + + This variable sets path to phpstan configuration file. + + +g:ale_php_phpstan_autoload *g:ale_php_phpstan_autoload* + *b:ale_php_phpstan_autoload* + Type: |String| + Default: `''` + + This variable sets path to phpstan autoload file. + + +g:ale_php_phpstan_memory_limit *g:ale_php_phpstan_memory-limit* + *b:ale_php_phpstan_memory-limit* + Type: |String| + Default: `''` + + This variable sets the memory limit for phpstan analysis. This is a string + in the same format as `php.ini` accepts, e.g. `128M`, `1G`. + + +=============================================================================== +psalm *ale-php-psalm* + +g:ale_php_psalm_executable *g:ale_php_psalm_executable* + *b:ale_php_psalm_executable* + Type: |String| + Default: `'psalm'` + + This variable sets the executable used for psalm. + + +g:ale_php_psalm_options *g:ale_php_psalm_options* + *b:ale_php_psalm_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to psalm. + + +g:ale_php_psalm_use_global *g:ale_php_psalm_use_global* + *b:ale_php_psalm_use_global* + Type: |Boolean| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +php-cs-fixer *ale-php-php-cs-fixer* + +g:ale_php_cs_fixer_executable *g:ale_php_cs_fixer_executable* + *b:ale_php_cs_fixer_executable* + Type: |String| + Default: `'php-cs-fixer'` + + This variable sets executable used for php-cs-fixer. + + +g:ale_php_cs_fixer_options *g:ale_php_cs_fixer_options* + *b:ale_php_cs_fixer_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to php-cs-fixer. + + +g:ale_php_cs_fixer_use_global *g:ale_php_cs_fixer_use_global* + *b:ale_php_cs_fixer_use_global* + Type: |Boolean| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +php *ale-php-php* + +g:ale_php_php_executable *g:ale_php_php_executable* + *b:ale_php_php_executable* + Type: |String| + Default: `'php'` + + This variable sets the executable used for php. + + +=============================================================================== +pint *ale-php-pint* + +g:ale_php_pint_executable *g:ale_php_pint_executable* + *b:ale_php_pint_executable* + Type: |String| + Default: `'pint'` + + This variable sets the executable used for pint. + + +g:ale_php_pint_options *g:ale_php_pint_options* + *b:ale_php_pint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to pint. + + +g:ale_php_pint_use_global *g:ale_php_pint_use_global* + *b:ale_php_pint_use_global* + Type: |Boolean| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +tlint *ale-php-tlint* + +g:ale_php_tlint_executable *g:ale_php_tlint_executable* + *b:ale_php_tlint_executable* + Type: |String| + Default: `'tlint'` + + See |ale-integrations-local-executables| + + +g:ale_php_tlint_use_global *g:ale_php_tlint_use_global* + *b:ale_php_tlint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_php_tlint_options *g:ale_php_tlint_options* + *b:ale_php_tlint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to tlint + + +=============================================================================== +intelephense *ale-php-intelephense* + +g:ale_php_intelephense_executable *g:ale_php_intelephense_executable* + *b:ale_php_intelephense_executable* + Type: |String| + Default: `'intelephense'` + + The variable can be set to configure the executable that will be used for + running the intelephense language server. `node_modules` directory + executable will be preferred instead of this setting if + |g:ale_php_intelephense_use_global| is `0`. + + See: |ale-integrations-local-executables| + + +g:ale_php_intelephense_use_global *g:ale_php_intelephense_use_global* + *b:ale_php_intelephense_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable can be set to `1` to force the language server to be run with + the executable set for |g:ale_php_intelephense_executable|. + + See: |ale-integrations-local-executables| + + +g:ale_php_intelephense_config *g:ale_php_intelephense_config* + *b:ale_php_intelephense_config* + Type: |Dictionary| + Default: `{}` + + The initialization options config specified by Intelephense. Refer to the + installation docs provided by intelephense (github.com/bmewburn/intelephense + -docs). + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-po.txt b/dot_vim/plugged/ale/doc/ale-po.txt new file mode 100644 index 0000000..1e03b7b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-po.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE PO Integration *ale-po-options* + + +=============================================================================== +write-good *ale-po-write-good* + +See |ale-write-good-options| + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pod.txt b/dot_vim/plugged/ale/doc/ale-pod.txt new file mode 100644 index 0000000..c7cc0bb --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pod.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE Pod Integration *ale-pod-options* + + +=============================================================================== +write-good *ale-pod-write-good* + +See |ale-write-good-options| + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pony.txt b/dot_vim/plugged/ale/doc/ale-pony.txt new file mode 100644 index 0000000..3b32168 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pony.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE Pony Integration *ale-pony-options* + + +=============================================================================== +ponyc *ale-pony-ponyc* + +g:ale_pony_ponyc_executable *g:ale_pony_ponyc_executable* + *b:ale_pony_ponyc_executable* + Type: |String| + Default: `'ponyc'` + + See |ale-integrations-local-executables| + + +g:ale_pony_ponyc_options *g:ale_pony_ponyc_options* + *b:ale_pony_ponyc_options* + Type: |String| + Default: `'--pass paint'` + + This variable can be set to pass options to ponyc. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-powershell.txt b/dot_vim/plugged/ale/doc/ale-powershell.txt new file mode 100644 index 0000000..44a3c61 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-powershell.txt @@ -0,0 +1,75 @@ +=============================================================================== +ALE PowerShell Integration *ale-powershell-options* + + +=============================================================================== +cspell *ale-powershell-cspell* + +See |ale-cspell-options| + + +=============================================================================== +powershell *ale-powershell-powershell* + +g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable* + *b:ale_powershell_powershell_executable* + Type: |String| + Default: `'pwsh'` + + This variable can be changed to use a different executable for powershell. + +> + " Use powershell.exe rather than the default pwsh + let g:ale_powershell_powershell_executable = 'powershell.exe' +> + +=============================================================================== +psscriptanalyzer *ale-powershell-psscriptanalyzer* + +Installation +------------------------------------------------------------------------------- + +Install PSScriptAnalyzer by any means, so long as it can be automatically +imported in PowerShell. + +g:ale_powershell_psscriptanalyzer_executable +*g:ale_powershell_psscriptanalyzer_executable* + *b:ale_powershell_psscriptanalyzer_executable* + Type: |String| + Default: `'pwsh'` + + This variable sets executable used for powershell. + + For example, on Windows you could set powershell to be Windows Powershell: +> + let g:ale_powershell_psscriptanalyzer_executable = 'powershell.exe' +< + +g:ale_powershell_psscriptanalyzer_module +*g:ale_powershell_psscriptanalyzer_module* + *b:ale_powershell_psscriptanalyzer_module* + Type: |String + Default: `'psscriptanalyzer'` + + This variable sets the name of the psscriptanalyzer module. + for psscriptanalyzer invocation. + + +g:ale_powershell_psscriptanalyzer_exclusions +*g:ale_powershell_psscriptanalyzer_exclusions* + *b:ale_powershell_psscriptanalyzer_exclusions* + Type: |String| + Default: `''` + + Set this variable to exclude test(s) for psscriptanalyzer + (-ExcludeRule option). To exclude more than one option, separate them with + commas. + +> + " Suppress Write-Host and Global vars warnings + let g:ale_powershell_psscriptanalyzer_exclusions = + \ 'PSAvoidUsingWriteHost,PSAvoidGlobalVars' +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-prolog.txt b/dot_vim/plugged/ale/doc/ale-prolog.txt new file mode 100644 index 0000000..14062a5 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-prolog.txt @@ -0,0 +1,56 @@ +=============================================================================== +ALE Prolog Integration *ale-prolog-options* + + +=============================================================================== +swipl *ale-prolog-swipl* + +g:ale_prolog_swipl_executable *g:ale_prolog_swipl_executable* + *b:ale_prolog_swipl_executable* + Type: |String| + Default: `'swipl'` + + The executable that will be run for the `swipl` linter. + +g:ale_prolog_swipl_load *g:ale_prolog_swipl_load* + *b:ale_prolog_swipl_load* + Type: |String| + Default: `'current_prolog_flag(argv, [File]), load_files(File, [sandboxed(true)]), halt.'` + + The prolog goals that will be passed to |g:ale_prolog_swipl_executable| with `-g` option. + + It does: + 1. Takes the first command argument (current file path) + 2. Checks (syntactic / semantic) problems and output to stderr + + NOTE: `sandboxed(true)` prohibits executing some directives such as 'initialization main'. + +g:ale_prolog_swipl_timeout *g:ale_prolog_swipl_timeout* + *b:ale_prolog_swipl_timeout* + Type: |Number| + Default: `3` + + Timeout seconds to detect long-running linter. + It is done by setting SIGALRM. + See |g:ale_prolog_swipl_alarm| and |g:ale_prolog_swipl_alarm_handler|. + +g:ale_prolog_swipl_alarm *g:ale_prolog_swipl_alarm* + *b:ale_prolog_swipl_alarm* + Type: |String| + Default: `'alarm(%t, (%h), _, [])'` + + The prolog goals to be expected to set SIGALRM. + `%t` is replaced by |g:ale_prolog_swipl_timeout|. + `%h` is replaced by |g:ale_prolog_swipl_alarm_handler|. + +g:ale_prolog_swipl_alarm_handler *g:ale_prolog_swipl_alarm_handler* + *b:ale_prolog_swipl_alarm_handler* + Type: |String| + Default: `'writeln(user_error, "ERROR: Exceeded %t seconds, Please change g:prolog_swipl_timeout to modify the limit."), halt(1)'` + + The prolog goals to be expected that will be run on SIGALRM. + `%t` is replaced by |g:ale_prolog_swipl_timeout|. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-proto.txt b/dot_vim/plugged/ale/doc/ale-proto.txt new file mode 100644 index 0000000..e7015dc --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-proto.txt @@ -0,0 +1,112 @@ +=============================================================================== +ALE Proto Integration *ale-proto-options* + + +=============================================================================== +Integration Information + +To enable `.proto` file linting, update |g:ale_linters| as appropriate: +> + " Enable linter for .proto files + let g:ale_linters = {'proto': ['buf-lint', 'protoc-gen-lint', 'protolint']} +< + +To enable `.proto` file fixing, update |g:ale_fixers| as appropriate: +> + " Enable linter for .proto files + let b:ale_fixers = {'proto': ['buf-format', 'protolint']} +< + + +=============================================================================== +buf-format *ale-proto-buf-format* + + The formatter uses `buf`, a fully-featured Protobuf compiler that doesn't depend + on `protoc`. Make sure the `buf` binary is available in the system path, or + set ale_proto_buf_format_executable. + +g:ale_proto_buf_format_executable *g:ale_proto_buf_format_executable* + + Type: |String| + Default: `'buf'` + + This variable can be changed to modify the executable used for buf. + + +=============================================================================== +buf-lint *ale-proto-buf-lint* + + The linter uses `buf`, a fully-featured Protobuf compiler that doesn't depend + on `protoc`. Make sure the `buf` binary is available in the system path, or + set ale_proto_buf_lint_executable. + +g:ale_proto_buf_lint_executable *g:ale_proto_buf_lint_executable* + + Type: |String| + Default: `'buf'` + + This variable can be changed to modify the executable used for buf. + +g:ale_proto_buf_lint_config *g:ale_proto_buf_lint_config* + + Type: |String| + Default: `''` + + A path to a buf configuration file. + + The path to the configuration file can be an absolute path or a relative + path. ALE will search for the relative path in parent directories. + + +=============================================================================== +clang-format *ale-proto-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for Proto. + + +=============================================================================== +protoc-gen-lint *ale-proto-protoc-gen-lint* + + The linter is a plugin for the `protoc` binary. As long as the binary resides + in the system path, `protoc` will find it. + +g:ale_proto_protoc_gen_lint_options *g:ale_proto_protoc_gen_lint_options* + + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to protoc. Note that the + directory of the linted file is always passed as an include path with '-I' + before any user-supplied options. + + +=============================================================================== +protolint *ale-proto-protolint* + + The linter is a pluggable tool that doesn't depend on the `protoc` binary. + This supports both linting and fixing. + Make sure the binary is available in the system path, or set + ale_proto_protolint_executable. + Note that the binary with v0.22.0 or above is supported. + +g:ale_proto_protolint_executable *g:ale_proto_protolint_executable* + + Type: |String| + Default: `'protolint'` + + This variable can be changed to modify the executable used for protolint. + +g:ale_proto_protolint_config *g:ale_proto_protolint_config* + + Type: |String| + Default: `''` + + A path to a protolint configuration file. + + The path to the configuration file can be an absolute path or a relative + path. ALE will search for the relative path in parent directories. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pug.txt b/dot_vim/plugged/ale/doc/ale-pug.txt new file mode 100644 index 0000000..e2836f8 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pug.txt @@ -0,0 +1,44 @@ +=============================================================================== +ALE Pug Integration *ale-pug-options* + + +=============================================================================== +puglint *ale-pug-puglint* + +The puglint linter will detect configuration files based on the path to the +filename automatically. Configuration files will be loaded in this order: + +1. `.pug-lintrc` +2. `.pug-lintrc.js` +3. `.pug-lintrc.json` +4. `package.json` + +You might need to create a configuration file for your project to get +meaningful results. + +g:ale_pug_puglint_executable *g:ale_pug_puglint_executable* + *b:ale_pug_puglint_executable* + Type: |String| + Default: `'pug-lint'` + + See |ale-integrations-local-executables| + + +g:ale_pug_puglint_options *g:ale_pug_puglint_options* + *b:ale_pug_puglint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to pug-lint. + + +g:ale_pug_puglint_use_global *g:ale_pug_puglint_use_global* + *b:ale_pug_puglint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-puppet.txt b/dot_vim/plugged/ale/doc/ale-puppet.txt new file mode 100644 index 0000000..daa8c10 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-puppet.txt @@ -0,0 +1,57 @@ +=============================================================================== +ALE Puppet Integration *ale-puppet-options* + + +=============================================================================== +puppet *ale-puppet-puppet* + +g:ale_puppet_puppet_executable *g:ale_puppet_puppet_executable* + *b:ale_puppet_puppet_executable* + Type: |String| + Default: `'puppet'` + + This variable can be changed to specify the executable used for puppet. + + +g:ale_puppet_puppet_options *g:ale_puppet_puppet_options* + *b:ale_puppet_puppet_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the + puppet parser validate invocation. + + +=============================================================================== +puppetlint *ale-puppet-puppetlint* + +g:ale_puppet_puppetlint_executable *g:ale_puppet_puppetlint_executable* + *b:ale_puppet_puppetlint_executable* + Type: |String| + Default: `'puppet-lint'` + + This variable can be changed to specify the executable used for puppet-lint. + + +g:ale_puppet_puppetlint_options *g:ale_puppet_puppetlint_options* + *b:ale_puppet_puppetlint_options* + Type: |String| + Default: `'--no-autoloader_layout-check'` + + This variable can be changed to add command-line arguments to the + puppet-lint invocation. + + +=============================================================================== +puppet-languageserver *ale-puppet-languageserver* + +g:ale_puppet_languageserver_executable *g:ale_puppet_languageserver_executable* + *b:ale_puppet_languageserver_executable* + type: |String| + Default: `'puppet-languageserver'` + + This variable can be used to specify the executable used for + puppet-languageserver. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-purescript.txt b/dot_vim/plugged/ale/doc/ale-purescript.txt new file mode 100644 index 0000000..25b3dd8 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-purescript.txt @@ -0,0 +1,69 @@ +=============================================================================== +ALE PureScript Integration *ale-purescript-options* + + +=============================================================================== +purescript-language-server *ale-purescript-language-server* + +PureScript Language Server + (https://github.com/nwolverson/purescript-language-server) + +g:ale_purescript_ls_executable g:ale_purescript_ls_executable + b:ale_purescript_ls_executable + Type: |String| + Default: `'purescript-language-server'` + + PureScript language server executable. + +g:ale_purescript_ls_config g:ale_purescript_ls_config + b:ale_purescript_ls_config + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example, with a spago project: + { + \ 'purescript': { + \ 'addSpagoSources': v:true, + \ 'addNpmPath': v:true, + \ 'buildCommand': 'spago --quiet build --purs-args --json-errors' + \ } + \} +=============================================================================== +purs-tidy *ale-purescript-tidy* + +g:ale_purescript_tidy_executable *g:ale_purescript_tidy_executable* + *b:ale_purescript_tidy_executable* + Type: |String| + Default: `'purs-tidy'` + + This variable can be changed to use a different executable for purs-tidy. + +g:ale_purescript_tidy_use_global *g:ale_purescript_tidy_use_global* + *b:ale_purescript_tidy_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + +g:ale_purescript_tidy_options *g:ale_purescript_tidy_options* + *b:ale_purescript_tidy_options* + Type: |String| + Default: `''` + + This variable can be set to pass in additional option to the 'purs-tidy' + executable. +> + let g:ale_purescript_options = '--indent 3' +< +=============================================================================== +purty *ale-purescript-purty* + +g:ale_purescript_purty_executable *g:ale_purescript_purty_executable* + *b:ale_purescript_purty_executable* + Type: |String| + Default: `'purty'` + + This variable can be changed to use a different executable for purty. +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-pyrex.txt b/dot_vim/plugged/ale/doc/ale-pyrex.txt new file mode 100644 index 0000000..245e611 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-pyrex.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE Pyrex (Cython) Integration *ale-pyrex-options* + + +=============================================================================== +cython *ale-pyrex-cython* + +g:ale_pyrex_cython_executable *g:ale_pyrex_cython_executable* + *b:ale_pyrex_cython_executable* + Type: |String| + Default: `'cython'` + + This variable can be changed to use a different executable for cython. + + +g:ale_pyrex_cython_options *g:ale_pyrex_cython_options* + *b:ale_pyrex_cython_options* + Type: |String| + Default: `'--warning-extra --warning-errors'` + + This variable can be changed to modify flags given to cython. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-python.txt b/dot_vim/plugged/ale/doc/ale-python.txt new file mode 100644 index 0000000..07f54db --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-python.txt @@ -0,0 +1,1353 @@ +=============================================================================== +ALE Python Integration *ale-python-options* + + +g:ale_python_auto_pipenv *g:ale_python_auto_pipenv* + *b:ale_python_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_auto_poetry *g:ale_python_auto_poetry* + *b:ale_python_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +ALE Python Project Root Behavior *ale-python-root* + +For some linters, ALE will search for a Python project root by looking at the +files in directories on or above where a file being checked is. ALE applies +the following methods, in order: + +1. Find the first directory containing a common Python configuration file. +2. If no configuration file can be found, use the first directory which does + not contain a readable file named `__init__.py`. + +ALE will look for configuration files with the following filenames. > + + MANIFEST.in + setup.cfg + pytest.ini + tox.ini + .pyre_configuration.local + mypy.ini + .mypy.ini + pycodestyle.cfg + .flake8 + .flake8rc + pylama.ini + pylintrc + .pylintrc + pyrightconfig.json + pyrightconfig.toml + Pipfile + Pipfile.lock + poetry.lock + pyproject.toml + .tool-versions +< + +The first directory containing any of the files named above will be used. + + +=============================================================================== +autoflake *ale-python-autoflake* + +g:ale_python_autoflake_executable *g:ale_python_autoflake_executable* + *b:ale_python_autoflake_executable* + Type: |String| + Default: `'autoflake'` + + See |ale-integrations-local-executables| + + +g:ale_python_autoflake_options *g:ale_python_autoflake_options* + *b:ale_python_autoflake_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to autoflake. + + +g:ale_python_autoflake_use_global *g:ale_python_autoflake_use_global* + *b:ale_python_autoflake_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +autoimport *ale-python-autoimport* + +g:ale_python_autoimport_executable *g:ale_python_autoimport_executable* + *b:ale_python_autoimport_executable* + Type: |String| + Default: `'autoimport'` + + See |ale-integrations-local-executables| + + +g:ale_python_autoimport_options *g:ale_python_autoimport_options* + *b:ale_python_autoimport_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to autoimport. + + +g:ale_python_autoimport_use_global *g:ale_python_autoimport_use_global* + *b:ale_python_autoimport_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +autopep8 *ale-python-autopep8* + +g:ale_python_autopep8_executable *g:ale_python_autopep8_executable* + *b:ale_python_autopep8_executable* + Type: |String| + Default: `'autopep8'` + + See |ale-integrations-local-executables| + + +g:ale_python_autopep8_options *g:ale_python_autopep8_options* + *b:ale_python_autopep8_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to autopep8. + + +g:ale_python_autopep8_use_global *g:ale_python_autopep8_use_global* + *b:ale_python_autopep8_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +bandit *ale-python-bandit* + +g:ale_python_bandit_executable *g:ale_python_bandit_executable* + *b:ale_python_bandit_executable* + Type: |String| + Default: `'bandit'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `bandit'`. + Set this to `'poetry'` to invoke `'poetry` `run` `bandit'`. + + +g:ale_python_bandit_options *g:ale_python_bandit_options* + *b:ale_python_bandit_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the + bandit invocation. + + +g:ale_python_bandit_use_config *g:ale_python_bandit_use_config* + *b:ale_python_bandit_use_config* + Type: |Number| + Default: `1` + + If this variable is true and a `.bandit` file exists in the directory of the + file being checked or a parent directory, an `--ini` option is added to the + `bandit` command for the nearest `.bandit` file. Set this variable false to + disable adding the `--ini` option automatically. + + +g:ale_python_bandit_use_global *g:ale_python_bandit_use_global* + *b:ale_python_bandit_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_bandit_auto_pipenv *g:ale_python_bandit_auto_pipenv* + *b:ale_python_bandit_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_bandit_auto_poetry *g:ale_python_bandit_auto_poetry* + *b:ale_python_bandit_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +black *ale-python-black* + +g:ale_python_black_executable *g:ale_python_black_executable* + *b:ale_python_black_executable* + Type: |String| + Default: `'black'` + + See |ale-integrations-local-executables| + + +g:ale_python_black_options *g:ale_python_black_options* + *b:ale_python_black_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to black. + + +g:ale_python_black_use_global *g:ale_python_black_use_global* + *b:ale_python_black_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv* + *b:ale_python_black_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry* + *b:ale_python_black_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_black_change_directory *g:ale_python_black_change_directory* + *b:ale_python_black_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the Python file being + checked with `black` is in before checking it. This helps `black` find + configuration files more easily. This option can be turned off if you want + to control the directory Python is executed from yourself. + + +=============================================================================== +cspell *ale-python-cspell* + +See |ale-cspell-options| + + +=============================================================================== +flake8 *ale-python-flake8* + +g:ale_python_flake8_change_directory *g:ale_python_flake8_change_directory* + *b:ale_python_flake8_change_directory* + Type: |String| + Default: `'project'` + + If set to `project`, ALE will switch to the project root before checking file. + If set to `file`, ALE will first switch to the directory containing the + Python file being checked with `flake8` before checking it. + You can turn it off with `off` option if you want to control the directory + Python is executed from yourself. + + +g:ale_python_flake8_executable *g:ale_python_flake8_executable* + *b:ale_python_flake8_executable* + Type: |String| + Default: `'flake8'` + + This variable can be changed to modify the executable used for flake8. Set + this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`. Set this to + `'poetry'` to invoke `'poetry` `run` `flake8'`. + + +g:ale_python_flake8_options *g:ale_python_flake8_options* + *b:ale_python_flake8_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the flake8 + invocation. + + For example, to dynamically switch between programs targeting Python 2 and + Python 3, you may want to set > + + let g:ale_python_flake8_executable = 'python3' " or 'python' for Python 2 + let g:ale_python_flake8_options = '-m flake8' +< + after making sure it's installed for the appropriate Python versions (e.g. + `python3 -m pip install --user flake8`). + + +g:ale_python_flake8_use_global *g:ale_python_flake8_use_global* + *b:ale_python_flake8_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for flake8 in a + virtualenv directory first. If this variable is set to `1`, then ALE will + always use |g:ale_python_flake8_executable| for the executable path. + + Both variables can be set with `b:` buffer variables instead. + + +g:ale_python_flake8_auto_pipenv *g:ale_python_flake8_auto_pipenv* + *b:ale_python_flake8_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_flake8_auto_poetry *g:ale_python_flake8_auto_poetry* + *b:ale_python_flake8_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +flakehell *ale-python-flakehell* + +g:ale_python_flakehell_change_directory*g:ale_python_flakehell_change_directory* + *b:ale_python_flakehell_change_directory* + Type: |String| + Default: `project` + + If set to `project`, ALE will switch to the project root before checking file. + If set to `file`, ALE will switch to directory the Python file being + checked with `flakehell` is in before checking it. + You can turn it off with `off` option if you want to control the directory + Python is executed from yourself. + + +g:ale_python_flakehell_executable *g:ale_python_flakehell_executable* + *b:ale_python_flakehell_executable* + Type: |String| + Default: `'flakehell'` + + This variable can be changed to modify the executable used for flakehell. Set + this to `'pipenv'` to invoke `'pipenv` `run` `flakehell'`. Set this to + `'poetry'` to invoke `'poetry` `run` `flakehell'`. Set this to `'python'` to + invoke `'python` `-m` `flakehell'`. + + +g:ale_python_flakehell_options *g:ale_python_flakehell_options* + *b:ale_python_flakehell_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the flakehell + lint invocation. + + +g:ale_python_flakehell_use_global *g:ale_python_flakehell_use_global* + *b:ale_python_flakehell_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for flakehell in a + virtualenv directory first. If this variable is set to `1`, then ALE will + always use |g:ale_python_flakehell_executable| for the executable path. + + Both variables can be set with `b:` buffer variables instead. + + +g:ale_python_flakehell_auto_pipenv *g:ale_python_flakehell_auto_pipenv* + *b:ale_python_flakehell_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_flakehell_auto_poetry *g:ale_python_flakehell_auto_poetry* + *b:ale_python_flakehell_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +isort *ale-python-isort* + +g:ale_python_isort_executable *g:ale_python_isort_executable* + *b:ale_python_isort_executable* + Type: |String| + Default: `'isort'` + + See |ale-integrations-local-executables| + + +g:ale_python_isort_options *g:ale_python_isort_options* + *b:ale_python_isort_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to isort. + + +g:ale_python_isort_use_global *g:ale_python_isort_use_global* + *b:ale_python_isort_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_isort_auto_pipenv *g:ale_python_isort_auto_pipenv* + *b:ale_python_isort_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_isort_auto_poetry *g:ale_python_isort_auto_poetry* + *b:ale_python_isort_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +mypy *ale-python-mypy* + +The minimum supported version of mypy that ALE supports is v0.4.4. This is +the first version containing the `--shadow-file` option ALE needs to be able +to check for errors while you type. + +`mypy` will be run from a detected project root, per |ale-python-root|. + + +g:ale_python_mypy_auto_pipenv *g:ale_python_mypy_auto_pipenv* + *b:ale_python_mypy_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_mypy_auto_poetry *g:ale_python_mypy_auto_poetry* + *b:ale_python_mypy_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_mypy_executable *g:ale_python_mypy_executable* + *b:ale_python_mypy_executable* + Type: |String| + Default: `'mypy'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`. + Set this to `'poetry'` to invoke `'poetry` `run` `mypy'`. + + +g:ale_python_mypy_ignore_invalid_syntax + *g:ale_python_mypy_ignore_invalid_syntax* + *b:ale_python_mypy_ignore_invalid_syntax* + Type: |Number| + Default: `0` + + When set to `1`, syntax error messages for mypy will be ignored. This option + can be used when running other Python linters which check for syntax errors, + as mypy can take a while to finish executing. + + +g:ale_python_mypy_options *g:ale_python_mypy_options* + *b:ale_python_mypy_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the mypy + invocation. + + +g:ale_python_mypy_show_notes *g:ale_python_mypy_show_notes* + *b:ale_python_mypy_show_notes* + Type: |Number| + Default: `1` + + If enabled, notes on lines will be displayed as 'I' (info) messages. + + +g:ale_python_mypy_use_global *g:ale_python_mypy_use_global* + *b:ale_python_mypy_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +prospector *ale-python-prospector* + +g:ale_python_prospector_executable *g:ale_python_prospector_executable* + *b:ale_python_prospector_executable* + Type: |String| + Default: `'prospector'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `prospector'`. + Set this to `'poetry'` to invoke `'poetry` `run` `prospector'`. + + +g:ale_python_prospector_options *g:ale_python_prospector_options* + *b:ale_python_prospector_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the prospector + invocation. + + For example, to dynamically switch between programs targeting Python 2 and + Python 3, you may want to set > + + let g:ale_python_prospector_executable = 'python3' + " or 'python' for Python 2 + let g:ale_python_prospector_options = '--rcfile /path/to/.prospector.yaml' + " The virtualenv detection needs to be disabled. + let g:ale_python_prospector_use_global = 0 + + after making sure it's installed for the appropriate Python versions (e.g. + `python3 -m pip install --user prospector`). + + +g:ale_python_prospector_use_global *g:ale_python_prospector_use_global* + *b:ale_python_prospector_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_prospector_auto_pipenv *g:ale_python_prospector_auto_pipenv* + *b:ale_python_prospector_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_prospector_auto_poetry *g:ale_python_prospector_auto_poetry* + *b:ale_python_prospector_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pycodestyle *ale-python-pycodestyle* + +g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable* + *b:ale_python_pycodestyle_executable* + Type: |String| + Default: `'pycodestyle'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pycodestyle'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pycodestyle'`. + + +g:ale_python_pycodestyle_options *g:ale_python_pycodestyle_options* + *b:ale_python_pycodestyle_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the + pycodestyle invocation. + + +g:ale_python_pycodestyle_use_global *g:ale_python_pycodestyle_use_global* + *b:ale_python_pycodestyle_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pycodestyle_auto_pipenv *g:ale_python_pycodestyle_auto_pipenv* + *b:ale_python_pycodestyle_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pycodestyle_auto_poetry *g:ale_python_pycodestyle_auto_poetry* + *b:ale_python_pycodestyle_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pydocstyle *ale-python-pydocstyle* + +g:ale_python_pydocstyle_executable *g:ale_python_pydocstyle_executable* + *b:ale_python_pydocstyle_executable* + Type: |String| + Default: `'pydocstyle'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pydocstyle'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pydocstyle'`. + + +g:ale_python_pydocstyle_options *g:ale_python_pydocstyle_options* + *b:ale_python_pydocstyle_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the + pydocstyle invocation. + + +g:ale_python_pydocstyle_use_global *g:ale_python_pydocstyle_use_global* + *b:ale_python_pydocstyle_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pydocstyle_auto_pipenv *g:ale_python_pydocstyle_auto_pipenv* + *b:ale_python_pydocstyle_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pydocstyle_auto_poetry *g:ale_python_pydocstyle_auto_poetry* + *b:ale_python_pydocstyle_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pyflakes *ale-python-pyflakes* + +g:ale_python_pyflakes_executable *g:ale_python_pyflakes_executable* + *b:ale_python_pyflakes_executable* + Type: |String| + Default: `'pyflakes'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pyflakes'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pyflakes'`. + + +g:ale_python_pyflakes_auto_pipenv *g:ale_python_pyflakes_auto_pipenv* + *b:ale_python_pyflakes_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pyflakes_auto_poetry *g:ale_python_pyflakes_auto_poetry* + *b:ale_python_pyflakes_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pyflyby *ale-python-pyflyby* + +g:ale_python_pyflyby_executable *g:ale_python_pyflyby_executable* + *b:ale_python_pyflyby_executable* + Type: |String| + Default: `'tidy-imports'` + + See |ale-integrations-local-executables| + + +g:ale_python_pyflyby_options *g:ale_python_pyflyby_options* + *b:ale_python_pyflyby_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pyflyby + tidy-imports invocation. + + +g:ale_python_pyflyby_use_global *g:ale_python_pyflyby_use_global* + *b:ale_python_pyflyby_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pyflyby_auto_pipenv *g:ale_python_pyflyby_auto_pipenv* + *b:ale_python_pyflyby_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pyflyby_auto_poetry *g:ale_python_pyflyby_auto_poetry* + *b:ale_python_pyflyby_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pylama *ale-python-pylama* + +g:ale_python_pylama_change_directory *g:ale_python_pylama_change_directory* + *b:ale_python_pylama_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `pylama` will be run from a detected project root, per + |ale-python-root|. This is useful because `pylama` only searches for + configuration files in its current directory and applies file masks using + paths relative to its current directory. This option can be turned off if + you want to control the directory in which `pylama` is executed. + + +g:ale_python_pylama_executable *g:ale_python_pylama_executable* + *b:ale_python_pylama_executable* + Type: |String| + Default: `'pylama'` + + This variable can be changed to modify the executable used for pylama. Set + this to `'pipenv'` to invoke `'pipenv` `run` `pylama'`. Set this to + `'poetry'` to invoke `'poetry` `run` `pylama'`. + + +g:ale_python_pylama_options *g:ale_python_pylama_options* + *b:ale_python_pylama_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pylama + invocation. + + +g:ale_python_pylama_use_global *g:ale_python_pylama_use_global* + *b:ale_python_pylama_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for pylama in a + virtualenv directory first. If this variable is set to `1`, then ALE will + always use |g:ale_python_pylama_executable| for the executable path. + + Both variables can be set with `b:` buffer variables instead. + + +g:ale_python_pylama_auto_pipenv *g:ale_python_pylama_auto_pipenv* + *b:ale_python_pylama_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pylama_auto_poetry *g:ale_python_pylama_auto_poetry* + *b:ale_python_pylama_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pylint *ale-python-pylint* + +g:ale_python_pylint_change_directory *g:ale_python_pylint_change_directory* + *b:ale_python_pylint_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `pylint` will be run from a detected project root, per + |ale-python-root|. Since `pylint` only checks for `pylintrc` in the packages + above its current directory before falling back to user and global `pylintrc` + files, this is necessary for `pylint` to use a project `pylintrc` file, if + present. This option can be turned off if you want to control the directory + Python is executed from yourself. + + +g:ale_python_pylint_executable *g:ale_python_pylint_executable* + *b:ale_python_pylint_executable* + Type: |String| + Default: `'pylint'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pylint'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pylint'`. + + +g:ale_python_pylint_options *g:ale_python_pylint_options* + *b:ale_python_pylint_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pylint + invocation. + + For example, to dynamically switch between programs targeting Python 2 and + Python 3, you may want to set > + + let g:ale_python_pylint_executable = 'python3' " or 'python' for Python 2 + let g:ale_python_pylint_options = '--rcfile /path/to/pylint.rc' + " The virtualenv detection needs to be disabled. + let g:ale_python_pylint_use_global = 0 + + after making sure it's installed for the appropriate Python versions (e.g. + `python3 -m pip install --user pylint`). + + +g:ale_python_pylint_use_global *g:ale_python_pylint_use_global* + *b:ale_python_pylint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pylint_auto_pipenv *g:ale_python_pylint_auto_pipenv* + *b:ale_python_pylint_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pylint_auto_poetry *g:ale_python_pylint_auto_poetry* + *b:ale_python_pylint_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pylint_use_msg_id *g:ale_python_pylint_use_msg_id* + *b:ale_python_pylint_use_msg_id* + Type: |Number| + Default: `0` + + Use message for output (e.g. I0011) instead of symbolic name of the message + (e.g. locally-disabled). + + +=============================================================================== +pylsp *ale-python-pylsp* + +`pylsp` will be run from a detected project root, per |ale-python-root|. + + +g:ale_python_pylsp_executable *g:ale_python_pylsp_executable* + *b:ale_python_pylsp_executable* + Type: |String| + Default: `'pylsp'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pyls'`. + + +g:ale_python_pylsp_use_global *g:ale_python_pylsp_use_global* + *b:ale_python_pylsp_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pylsp_auto_pipenv *g:ale_python_pylsp_auto_pipenv* + *b:ale_python_pylsp_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pylsp_auto_poetry *g:ale_python_pylsp_auto_poetry* + *b:ale_python_pylsp_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pylsp_config *g:ale_python_pylsp_config* + *b:ale_python_pylsp_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for pylsp. For example, to disable + the pycodestyle linter: > + { + \ 'pylsp': { + \ 'plugins': { + \ 'pycodestyle': { + \ 'enabled': v:false + \ } + \ } + \ }, + \ } +< + +g:ale_python_pylsp_options *g:ale_python_pylsp_options* + *b:ale_python_pylsp_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pylsp + invocation. Note that this is not the same thing as ale_python_pylsp_config, + which allows configuration of how pylsp functions; this is intended to + provide flexibility in how the pylsp command is invoked. + + For example, if you had installed `pylsp` but your `pylsp` executable was not + on your `PATH` for some reason, an alternative way to run the pylsp server + would be: + let g:ale_python_pylsp_executable = 'python3' + let g:ale_python_pylsp_options = '-m pylsp' + + An example strategy for installing `pylsp`: + `python3 -m pip install --user pylsp` + + +=============================================================================== +pyre *ale-python-pyre* + +`pyre` will be run from a detected project root, per |ale-python-root|. + + +g:ale_python_pyre_executable *g:ale_python_pyre_executable* + *b:ale_python_pyre_executable* + Type: |String| + Default: `'pyre'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `pyre'`. + Set this to `'poetry'` to invoke `'poetry` `run` `pyre'`. + + +g:ale_python_pyre_use_global *g:ale_python_pyre_use_global* + *b:ale_python_pyre_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv* + *b:ale_python_pyre_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_pyre_auto_poetry *g:ale_python_pyre_auto_poetry* + *b:ale_python_pyre_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +pyright *ale-python-pyright* + +The `pyright` linter requires a recent version of `pyright` which includes +the `pyright-langserver` executable. You can install `pyright` on your system +through `npm` with `sudo npm install -g pyright` or similar. + +Refer to their README for installation instructions: +https://github.com/Microsoft/pyright + +`pyright` needs to know the path to your Python executable and probably a +virtualenv to run. ALE will try to detect these automatically. +See |g:ale_python_pyright_config|. + + +g:ale_python_pyright_executable *g:ale_python_pyright_executable* + *b:ale_python_pyright_executable* + Type: |String| + Default: `'pyright-langserver'` + + The executable for running `pyright`, which is typically installed globally. + + +g:ale_python_pyright_config *g:ale_python_pyright_config* + *b:ale_python_pyright_config* + Type: |Dictionary| + Default: `{}` + + Settings for configuring the `pyright` language server. + + See pyright's documentation for a full list of options: + https://github.com/microsoft/pyright/blob/master/docs/settings.md + + ALE will automatically try to set defaults for `venvPath` and `pythonPath` + so your project can automatically be checked with the right libraries. + You can override these settings with whatever you want in your ftplugin + file like so: > + + let b:ale_python_pyright_config = { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ 'venvPath': '/other/dir', + \ }, + \} +< + If `venvPath` is set, but `pythonPath` is not, + ALE will use `venvPath . '/bin/python'` or similar as `pythonPath`. + + A commonly used setting for `pyright` is disabling language services + apart from type checking and "hover" (|ale-hover|), you can set this + setting like so, or use whatever other settings you want: > + + let b:ale_python_pyright_config = { + \ 'pyright': { + \ 'disableLanguageServices': v:true, + \ }, + \} +< + +=============================================================================== +refurb *ale-python-refurb* + +g:ale_python_refurb_change_directory *g:ale_python_refurb_change_directory* + *b:ale_python_refurb_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `refurb` will be run from a detected project root, per + |ale-python-root|. if set to `0` or no project root detected, + `refurb` will be run from the buffer's directory. + + +g:ale_python_refurb_executable *g:ale_python_refurb_executable* + *b:ale_python_refurb_executable* + Type: |String| + Default: `'refurb'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `refurb'`. + Set this to `'poetry'` to invoke `'poetry` `run` `refurb'`. + + +g:ale_python_refurb_options *g:ale_python_refurb_options* + *b:ale_python_refurb_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the refurb + invocation. + + For example, to select/enable and/or disable some error codes, + you may want to set > + let g:ale_python_refurb_options = '--ignore 100' +g:ale_python_refurb_use_global *g:ale_python_refurb_use_global* + *b:ale_python_refurb_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_refurb_auto_pipenv *g:ale_python_refurb_auto_pipenv* + *b:ale_python_refurb_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_refurb_auto_poetry *g:ale_python_refurb_auto_poetry* + *b:ale_python_refurb_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +reorder-python-imports *ale-python-reorder_python_imports* + +g:ale_python_reorder_python_imports_executable + *g:ale_python_reorder_python_imports_executable* + *b:ale_python_reorder_python_imports_executable* + Type: |String| + Default: `'reorder-python-imports'` + + See |ale-integrations-local-executables| + + +g:ale_python_reorder_python_imports_options + *g:ale_python_reorder_python_imports_options* + *b:ale_python_reorder_python_imports_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to reorder-python-imports. + + +g:ale_python_reorder_python_imports_use_global + *g:ale_python_reorder_python_imports_use_global* + *b:ale_python_reorder_python_imports_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +ruff *ale-python-ruff* + +g:ale_python_ruff_change_directory *g:ale_python_ruff_change_directory* + *b:ale_python_ruff_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `ruff` will be run from a detected project root, per + |ale-python-root|. if set to `0` or no project root detected, + `ruff` will be run from the buffer's directory. + + +g:ale_python_ruff_executable *g:ale_python_ruff_executable* + *b:ale_python_ruff_executable* + Type: |String| + Default: `'ruff'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `ruff'`. + Set this to `'poetry'` to invoke `'poetry` `run` `ruff'`. + + +g:ale_python_ruff_options *g:ale_python_ruff_options* + *b:ale_python_ruff_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the ruff + invocation. + + For example, to select/enable and/or disable some error codes, + you may want to set > + let g:ale_python_ruff_options = '--ignore F401' + + +g:ale_python_ruff_use_global *g:ale_python_ruff_use_global* + *b:ale_python_ruff_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_ruff_auto_pipenv *g:ale_python_ruff_auto_pipenv* + *b:ale_python_ruff_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_ruff_auto_poetry *g:ale_python_ruff_auto_poetry* + *b:ale_python_ruff_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +=============================================================================== +unimport *ale-python-unimport* + +`unimport` will be run from a detected project root, per |ale-python-root|. + + +g:ale_python_unimport_auto_pipenv *g:ale_python_unimport_auto_pipenv* + *b:ale_python_unimport_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +g:ale_python_unimport_auto_poetry *g:ale_python_unimport_auto_poetry* + *b:ale_python_unimport_auto_poetry* + Type: |Number| + Default: `0` + + Detect whether the file is inside a poetry, and set the executable to `poetry` + if true. This is overridden by a manually-set executable. + + +g:ale_python_unimport_executable *g:ale_python_unimport_executable* + *b:ale_python_unimport_executable* + Type: |String| + Default: `'unimport'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `unimport'`. + Set this to `'poetry'` to invoke `'poetry` `run` `unimport'`. + + +g:ale_python_unimport_options *g:ale_python_unimport_options* + *b:ale_python_unimport_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the unimport + invocation. + + +g:ale_python_unimport_use_global *g:ale_python_unimport_use_global* + *b:ale_python_unimport_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +vulture *ale-python-vulture* + +g:ale_python_vulture_change_directory *g:ale_python_vulture_change_directory* + *b:ale_python_vulture_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the Python file being + checked with `vulture` is in before checking it and check the whole project + directory instead of checking only the file opened in the current buffer. + This helps `vulture` to know the context and avoid false-negative results. + + +g:ale_python_vulture_executable *g:ale_python_vulture_executable* + *b:ale_python_vulture_executable* + Type: |String| + Default: `'vulture'` + + See |ale-integrations-local-executables| + + +g:ale_python_vulture_options *g:ale_python_vulture_options* + *b:ale_python_vulture_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the vulture + invocation. + + +g:ale_python_vulture_use_global *g:ale_python_vulture_use_global* + *b:ale_python_vulture_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +yapf *ale-python-yapf* + +g:ale_python_yapf_executable *g:ale_python_yapf_executable* + *b:ale_python_yapf_executable* + Type: |String| + Default: `'yapf'` + + See |ale-integrations-local-executables| + + +g:ale_python_yapf_use_global *g:ale_python_yapf_use_global* + *b:ale_python_yapf_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-qml.txt b/dot_vim/plugged/ale/doc/ale-qml.txt new file mode 100644 index 0000000..f6d715a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-qml.txt @@ -0,0 +1,18 @@ +=============================================================================== +ALE QML Integration *ale-qml-options* + + +=============================================================================== +qmlfmt *ale-qml-qmlfmt* + +g:ale_qml_qmlfmt_executable *g:ale_qml_qmlfmt_executable* + *b:ale_qml_qmlfmt_executable* + Type: |String| + Default: `'qmlfmt'` + + This variable can be set to change the path to qmlfmt. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-r.txt b/dot_vim/plugged/ale/doc/ale-r.txt new file mode 100644 index 0000000..3fabf70 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-r.txt @@ -0,0 +1,68 @@ +=============================================================================== +ALE R Integration *ale-r-options* + + +=============================================================================== +languageserver *ale-r-languageserver* + +g:ale_r_languageserver_cmd *g:ale_r_languageserver_cmd* + *b:ale_r_languageserver_cmd* + Type: |String| + Default: `'languageserver::run()'` + + This option can be configured to change the execution command for + languageserver. + + See the languageserver documentation for more options. + + +g:ale_r_languageserver_config *g:ale_r_languageserver_config* + *b:ale_r_languageserver_config* + Type: |Dictionary| + Default: `{}` + + This option can be configured to change settings for languageserver. See the + languageserver documentation for more information. + + +=============================================================================== +lintr *ale-r-lintr* + +g:ale_r_lintr_options *g:ale_r_lintr_options* + *b:ale_r_lintr_options* + Type: |String| + Default: `'lintr::with_defaults()'` + + This option can be configured to change the options for lintr. + + The value of this option will be run with `eval` for the `lintr::lint` + options. Consult the lintr documentation for more information. + + +g:ale_r_lintr_lint_package *g:ale_r_lintr_lint_package* + *b:ale_r_lintr_lint_package* + Type: |Number| + Default: `0` + + When set to `1`, the file will be checked with `lintr::lint_package` instead + of `lintr::lint`. This prevents erroneous namespace warnings when linting + package files. + + +=============================================================================== +styler *ale-r-styler* + +g:ale_r_styler_options *g:ale_r_styler_options* + *b:ale_r_styler_options* + Type: |String| + Default: `'styler::tidyverse_style'` + + This option can be configured to change the options for styler. + + The value of this option will be used as the `style` argument for the + `styler::style_file` options. Consult the styler documentation + for more information. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-racket.txt b/dot_vim/plugged/ale/doc/ale-racket.txt new file mode 100644 index 0000000..7e78702 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-racket.txt @@ -0,0 +1,41 @@ +=============================================================================== +ALE Racket Integration *ale-racket-options* + +=============================================================================== +racket_langserver *ale-racket-langserver* + +1. Install racket-langserver as described here: + https://github.com/jeapostrophe/racket-langserver +2. Have `racket` available in the `$PATH` environment variable, currently there + is no way to specify path to custom location of `racket`. +3. set `racket_langserver` as a linter for `racket` like: > + let g:ale_linters['racket'] += ['racket_langserver'] + +You should be able to see linter results and use LSP features of `ALE` like +`ALEGoToDefinition` with `racket-langserver`. + +=============================================================================== +raco_fmt *ale-racket-raco-fmt* + +g:ale_racket_raco_fmt_executable *g:ale_racket_raco_fmt_executable* + *b:ale_racket_raco_fmt_executable* + Type: |String| + Default: `'raco'` + + If the `raco` excutable is not in the `$PATH` environment variable, or you + prefer to use one installed in a custom location, set this option to the + path to the specific `raco` executable. + +g:ale_racket_raco_fmt_options *g:ale_racket_raco_fmt_options* + *b:ale_racket_raco_fmt_options* + Type: |String| + Default: `''` + + Use this variable to pass command-line flags/parameters to `raco_fmt` + + For example, set the page width limit to 40 > + let g:ale_racket_raco_fmt_options = '--width 40' + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-reasonml.txt b/dot_vim/plugged/ale/doc/ale-reasonml.txt new file mode 100644 index 0000000..b8729a5 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-reasonml.txt @@ -0,0 +1,76 @@ +=============================================================================== +ALE ReasonML Integration *ale-reasonml-options* + + +=============================================================================== +merlin *ale-reasonml-merlin* + +To use merlin linter for ReasonML source code you need to make sure Merlin for +Vim is correctly configured. See the corresponding Merlin wiki page for +detailed instructions: +https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch + +=============================================================================== +ols *ale-reasonml-ols* + +The `ocaml-language-server` is the engine that powers OCaml and ReasonML +editor support using the Language Server Protocol. See the installation +instructions: +https://github.com/freebroccolo/ocaml-language-server#installation + + +g:ale_reason_ols_executable *g:ale_reason_ols_executable* + *b:ale_reason_ols_executable* + Type: |String| + Default: `'ocaml-language-server'` + + This variable can be set to change the executable path for `ols`. + + +g:ale_reason_ols_use_global *g:ale_reason_ols_use_global* + *b:ale_reason_ols_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable can be set to `1` to always use the globally installed + executable. See also |ale-integrations-local-executables|. + + +=============================================================================== +reason-language-server *ale-reasonml-language-server* + +Note: You must set an executable - there is no 'default' install location. +Go to https://github.com/jaredly/reason-language-server and download the +latest release. You can place it anywhere, but ensure you set the executable +path. + + +g:ale_reason_ls_executable *g:ale_reason_ls_executable* + *b:ale_reason_ls_executable* + Type: |String| + + This variable defines the standard location of the language server + executable. This must be set. + + +=============================================================================== +refmt *ale-reasonml-refmt* + +g:ale_reasonml_refmt_executable *g:ale_reasonml_refmt_executable* + *b:ale_reasonml_refmt_executable* + Type: |String| + Default: `'refmt'` + + This variable can be set to pass the path of the refmt fixer. + + +g:ale_reasonml_refmt_options *g:ale_reasonml_refmt_options* + *b:ale_reasonml_refmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the refmt fixer. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-rego.txt b/dot_vim/plugged/ale/doc/ale-rego.txt new file mode 100644 index 0000000..9a39dbf --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-rego.txt @@ -0,0 +1,50 @@ +=============================================================================== +ALE Rego Integration *ale-rego-options* + + +=============================================================================== +cspell *ale-rego-cspell* + +See |ale-cspell-options| + + +=============================================================================== +opacheck *ale-rego-opa-check* + +g:ale_rego_opacheck_executable *g:rego_opacheck_executable* + *b:rego_opacheck_executable* + + Type: |String| + Default: `'opa'` + + This variable can be changed to use a different executable for opa. + + +g:rego_opacheck_options *g:rego_opacheck_options* + *b:rego_opacheck_options* + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to opa check. + + +=============================================================================== +opafmt *ale-rego-opa-fmt-fixer* + +g:ale_opa_fmt_executable *g:ale_opa_fmt_executable* + *b:ale_opa_fmt_executable* + + Type: |String| + Default: `'opa'` + + This variable can be changed to use a different executable for opa. + + +g:ale_opa_fmt_options *g:ale_opa_fmt_options* + *b:ale_opa_fmt_options* + Type: |String| + Default: `''` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-restructuredtext.txt b/dot_vim/plugged/ale/doc/ale-restructuredtext.txt new file mode 100644 index 0000000..7af6213 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-restructuredtext.txt @@ -0,0 +1,33 @@ +=============================================================================== +ALE reStructuredText Integration *ale-restructuredtext-options* + + +=============================================================================== +cspell *ale-restructuredtext-cspell* + +See |ale-cspell-options| + + +=============================================================================== +textlint *ale-restructuredtext-textlint* + +To use textlint at reStructuredText, please install `textlint-plugin-rst`. +https://github.com/jimo1001/textlint-plugin-rst +> + $ npm install textlint-plugin-rst + +To install `textlint-plugin-rst`, `docutils-ast-writer` python package +must be installed. +See: https://github.com/jimo1001/docutils-ast-writer + +See |ale-text-textlint| + + +=============================================================================== +write-good *ale-restructuredtext-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-robot.txt b/dot_vim/plugged/ale/doc/ale-robot.txt new file mode 100644 index 0000000..405ae27 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-robot.txt @@ -0,0 +1,16 @@ +=============================================================================== +ALE Robot Integration *ale-robot-options* + + +=============================================================================== +rflint *ale-robot-rflint* + +g:ale_robot_rflint_executable *g:ale_robot_rflint_executable* + *b:ale_robot_rflint_executable* + Type: |String| + Default: `'rflint'` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-ruby.txt b/dot_vim/plugged/ale/doc/ale-ruby.txt new file mode 100644 index 0000000..b0773fd --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-ruby.txt @@ -0,0 +1,243 @@ +=============================================================================== +ALE Ruby Integration *ale-ruby-options* + + +=============================================================================== +brakeman *ale-ruby-brakeman* + +g:ale_ruby_brakeman_executable *g:ale_ruby_brakeman_executable* + *b:ale_ruby_brakeman_executable* + Type: |String| + Default: `'brakeman'` + + Override the invoked brakeman binary. Set this to `'bundle'` to invoke + `'bundle` `exec` brakeman'. + + +g:ale_ruby_brakeman_options *g:ale_ruby_brakeman_options* + *b:ale_ruby_brakeman_options* + Type: |String| + Default: `''` + + The contents of this variable will be passed through to brakeman. + + +=============================================================================== +cspell *ale-ruby-cspell* + +See |ale-cspell-options| + + +=============================================================================== +debride *ale-ruby-debride* + +g:ale_ruby_debride_executable *g:ale_ruby_debride_executable* + *b:ale_ruby_debride_executable* + Type: |String| + Default: `'debride'` + + Override the invoked debride binary. Set this to `'bundle'` to invoke + `'bundle` `exec` debride'. + + +g:ale_ruby_debride_options *g:ale_ruby_debride_options* + *b:ale_ruby_debride_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to debride. + + +=============================================================================== +prettier *ale-ruby-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +rails_best_practices *ale-ruby-rails_best_practices* + +g:ale_ruby_rails_best_practices_executable + *g:ale_ruby_rails_best_practices_executable* + *b:ale_ruby_rails_best_practices_executable* + Type: |String| + Default: `'rails_best_practices'` + + Override the invoked rails_best_practices binary. Set this to `'bundle'` to + invoke `'bundle` `exec` rails_best_practices'. + + +g:ale_ruby_rails_best_practices_options + *g:ale_ruby_rails_best_practices_options* + *b:ale_ruby_rails_best_practices_options* + Type: |String| + Default: `''` + + The contents of this variable will be passed through to rails_best_practices. + + +=============================================================================== +reek *ale-ruby-reek* + +g:ale_ruby_reek_executable *g:ale_ruby_reek_executable* + *b:ale_ruby_reek_executable* + Type: |String| + Default: `'reek'` + + Override the invoked reek binary. Set this to `'bundle'` to invoke + `'bundle` `exec` reek'. + + +g:ale_ruby_reek_show_context *g:ale_ruby_reek_show_context* + *b:ale_ruby_reek_show_context* + Type: |Number| + Default: `0` + + Controls whether context is included in the linter message. Defaults to off + because context is usually obvious while viewing a file. + + +g:ale_ruby_reek_show_wiki_link *g:ale_ruby_reek_show_wiki_link* + *b:ale_ruby_reek_show_wiki_link* + Type: |Number| + Default: `0` + + Controls whether linter messages contain a link to an explanatory wiki page + for the type of code smell. Defaults to off to improve readability. + + +=============================================================================== +rubocop *ale-ruby-rubocop* + +g:ale_ruby_rubocop_executable *g:ale_ruby_rubocop_executable* + *b:ale_ruby_rubocop_executable* + Type: |String| + Default: `'rubocop'` + + Override the invoked rubocop binary. Set this to `'bundle'` to invoke + `'bundle` `exec` rubocop'. + + +g:ale_ruby_rubocop_options *g:ale_ruby_rubocop_options* + *b:ale_ruby_rubocop_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to rubocop. + + +g:ale_ruby_rubocop_auto_correct_all *g:ale_ruby_rubocop_auto_correct_all* + *b:ale_ruby_rubocop_auto_correct_all* + Type: |Number| + Default: `0` + + This variable can be changed to make rubocop to correct all offenses (unsafe). + + +=============================================================================== +ruby *ale-ruby-ruby* + +g:ale_ruby_ruby_executable *g:ale_ruby_ruby_executable* + *b:ale_ruby_ruby_executable* + Type: |String| + Default: `'ruby'` + + This variable can be changed to use a different executable for ruby. + + +=============================================================================== +rufo *ale-ruby-rufo* + +g:ale_ruby_rufo_executable *g:ale_ruby_rufo_executable* + *b:ale_ruby_rufo_executable* + Type: |String| + Default: `'rufo'` + + Override the invoked rufo binary. This is useful for running rufo from + binstubs or a bundle. + + +=============================================================================== +solargraph *ale-ruby-solargraph* + +g:ale_ruby_solargraph_executable *g:ale_ruby_solargraph_executable* + *b:ale_ruby_solargraph_executable* + Type: |String| + Default: `'solargraph'` + + Override the invoked solargraph binary. This is useful for running solargraph + from binstubs or a bundle. + + +=============================================================================== +sorbet *ale-ruby-sorbet* + +g:ale_ruby_sorbet_executable *g:ale_ruby_sorbet_executable* + *b:ale_ruby_sorbet_executable* + Type: |String| + Default: `'srb'` + + Override the invoked sorbet binary. Set this to `'bundle'` to invoke + `'bundle` `exec` srb'. + + +g:ale_ruby_sorbet_options *g:ale_ruby_sorbet_options* + *b:ale_ruby_sorbet_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to sorbet. + + +g:ale_ruby_sorbet_enable_watchman *g:ale_ruby_sorbet_enable_watchman* + *b:ale_ruby_sorbet_enable_watchman* + Type: |Number| + Default: `0` + + Whether or not to use watchman to let the LSP server to know about changes + to files from outside of vim. Defaults to disable watchman because it + requires watchman to be installed separately from sorbet. + + +=============================================================================== +standardrb *ale-ruby-standardrb* + +g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable* + *b:ale_ruby_standardrb_executable* + Type: |String| + Default: `'standardrb'` + + Override the invoked standardrb binary. Set this to `'bundle'` to invoke + `'bundle` `exec` standardrb'. + + +g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options* + *b:ale_ruby_standardrb_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to standardrb. + + +=============================================================================== +syntax_tree *ale-ruby-syntax_tree* + +g:ale_ruby_syntax_tree_executable *g:ale_ruby_syntax_tree_executable* + *b:ale_ruby_syntax_tree_executable* + Type: |String| + Default: `'stree'` + + Override the invoked SyntaxTree binary. Set this to `'bundle'` to invoke + `'bundle` `exec` stree'. + + +g:ale_ruby_syntax_tree_options *g:ale_ruby_syntax_tree_options* + *b:ale_ruby_syntax_tree_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to SyntaxTree. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-rust.txt b/dot_vim/plugged/ale/doc/ale-rust.txt new file mode 100644 index 0000000..36d69b5 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-rust.txt @@ -0,0 +1,300 @@ +=============================================================================== +ALE Rust Integration *ale-rust-options* + *ale-integration-rust* + +=============================================================================== +Integration Information + + If Vim does not detect the Rust file type out-of-the-box, you need the runtime + files for Rust distributed in Vim >=8.0.0501 or upstream: + https://github.com/rust-lang/rust.vim + + Note that there are several possible linters and fixers for Rust files: + + 1. rustc -- The Rust compiler is used to check the currently edited file. + So, if your project consists of multiple files, you will get some errors + when you use e.g. a struct which is defined in another file. You can use + |g:ale_rust_ignore_error_codes| to ignore some of these errors. + 2. cargo -- If your project is managed by Cargo, the whole project is + checked. That means that all errors are properly shown, but cargo can + only operate on the files written on disk, so errors will not be reported + while you type. + 3. rls -- If you have `rls` installed, you might prefer using this linter + over cargo. rls implements the Language Server Protocol for incremental + compilation of Rust code, and can check Rust files while you type. `rls` + requires Rust files to be contained in Cargo projects. + 4. analyzer -- If you have rust-analyzer installed, you might prefer using + this linter over cargo and rls. rust-analyzer also implements the + Language Server Protocol for incremental compilation of Rust code, and is + the next iteration of rls. rust-analyzer either requires Rust files to be + contained in Cargo projects or requires the project to be described in + the rust-project.json format: + https://rust-analyzer.github.io/manual.html#non-cargo-based-projects + 5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to + consistently reformat your Rust code. + + Only cargo and rls are enabled by default. To switch to using rustc instead + of cargo, configure |g:ale_linters| appropriately: > + + " See the help text for the option for more information. + let g:ale_linters = {'rust': ['rustc', 'rls']} +< + + Also note that rustc 1.18. or later is needed. + + +=============================================================================== +analyzer *ale-rust-analyzer* + +g:ale_rust_analyzer_executable *g:ale_rust_analyzer_executable* + *b:ale_rust_analyzer_executable* + Type: |String| + Default: `'rust-analyzer'` + + This variable can be modified to change the executable path for + `rust-analyzer`. + + +g:ale_rust_analyzer_config *g:ale_rust_analyzer_config* + *b:ale_rust_analyzer_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for rust-analyzer. + + +=============================================================================== +cargo *ale-rust-cargo* + +g:ale_rust_cargo_use_check *g:ale_rust_cargo_use_check* + *b:ale_rust_cargo_use_check* + Type: |Number| + Default: `1` + + When set to `1`, this option will cause ALE to use `cargo check` instead of + `cargo build` . `cargo check` is supported since version 1.16.0 of Rust. + + ALE will never use `cargo check` when the version of `cargo` is less than + 0.17.0. + + +g:ale_rust_cargo_check_all_targets *g:ale_rust_cargo_check_all_targets* + *b:ale_rust_cargo_check_all_targets* + Type: |Number| + Default: `0` + + When set to `1`, ALE will set the `--all-targets` option when `cargo check` + is used. See |g:ale_rust_cargo_use_check|, + + +g:ale_rust_cargo_check_tests *g:ale_rust_cargo_check_tests* + *b:ale_rust_cargo_check_tests* + Type: |Number| + Default: `0` + + When set to `1`, ALE will set the `--tests` option when `cargo check` + is used. This allows for linting of tests which are normally excluded. + See |g:ale_rust_cargo_use_check|, + + +g:ale_rust_cargo_check_examples *g:ale_rust_cargo_check_examples* + *b:ale_rust_cargo_check_examples* + Type: |Number| + Default: `0` + + When set to `1`, ALE will set the `--examples` option when `cargo check` + is used. This allows for linting of examples which are normally excluded. + See |g:ale_rust_cargo_use_check|, + + +g:ale_rust_cargo_default_feature_behavior + *g:ale_rust_cargo_default_feature_behavior* + *b:ale_rust_cargo_default_feature_behavior* + Type: |String| + Default: `default` + + When set to `none`, ALE will set the `--no-default-features` option when + invoking `cargo`. Only the features specified in + |g:ale_rust_cargo_include_features| will be included when performing the + lint check. + + When set to `default`, ALE will instruct `cargo` to build all default + features specified in the project's `Cargo.toml` file, in addition to + including any additional features defined in + |g:ale_rust_cargo_include_features|. + + When set to `all`, ALE will set the `--all-features` option when + invoking `cargo`, which will include all features defined in the project's + `Cargo.toml` file when performing the lint check. + + +g:ale_rust_cargo_include_features *g:ale_rust_cargo_include_features* + *b:ale_rust_cargo_include_features* + Type: |String| + Default: `''` + + When defined, ALE will set the `--features` option when invoking `cargo` to + perform the lint check. See |g:ale_rust_cargo_default_feature_behavior|. + + +g:ale_rust_cargo_avoid_whole_workspace *g:ale_rust_cargo_avoid_whole_workspace* + *b:ale_rust_cargo_avoid_whole_workspace* + Type: |Number| + Default: `1` + + When set to 1, and ALE is used to edit a crate that is part of a Cargo + workspace, avoid building the entire workspace by invoking `cargo` directly + in the crate's directory. Otherwise, behave as usual. + + +g:ale_rust_cargo_use_clippy *g:ale_rust_cargo_use_clippy* + *b:ale_rust_cargo_use_clippy* + Type: |Number| + Default: `0` + + When set to 1, `cargo clippy` will be used instead of `cargo check` or + `cargo build` as linter. + For details of `cargo clippy`, please visit the following link: + + https://github.com/rust-lang-nursery/rust-clippy + + Since `cargo clippy` is optional toolchain, it's safer to check whether + `cargo-clippy` is executable as follows: +> + let g:ale_rust_cargo_use_clippy = executable('cargo-clippy') +< + +g:ale_rust_cargo_clippy_options *g:ale_rust_cargo_clippy_options* + *b:ale_rust_cargo_clippy_options* + + Type: |String| + Default: `''` + + When `cargo clippy` is used, this value will be added to a command line to run + it. This variable is useful when you want to add some extra options which + only `cargo clippy` supports (e.g. `--deny`). + + +g:ale_rust_cargo_target_dir *g:ale_rust_cargo_target_dir* + *b:ale_rust_cargo_target_dir* + + Type: |String| + Default: `''` + + Use a custom target directory when running the commands for ALE. This can + help to avoid "waiting for file lock on build directory" messages when + running `cargo` commands manually while ALE is performing its checks. + + +=============================================================================== +cspell *ale-rust-cspell* + +See |ale-cspell-options| + + +=============================================================================== +rls *ale-rust-rls* + +g:ale_rust_rls_executable *g:ale_rust_rls_executable* + *b:ale_rust_rls_executable* + Type: |String| + Default: `'rls'` + + This variable can be modified to change the executable path for `rls`. + + +g:ale_rust_rls_toolchain *g:ale_rust_rls_toolchain* + *b:ale_rust_rls_toolchain* + Type: |String| + Default: `''` + + This option can be set to change the toolchain used for `rls`. Possible + values include `'nightly'`, `'beta'`, `'stable'`, and `''`. When using + option `''`, rls will automatically find the default toolchain set by + rustup. If you want to use `rls` from a specific toolchain version, you may + also use values like `'channel-yyyy-mm-dd-arch-target'` as long as + `'rls +{toolchain_name} -V'` runs correctly in your command line. + + The `rls` server will only be started once per executable. + + +g:ale_rust_rls_config *g:ale_rust_rls_config* + *b:ale_rust_rls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for rls. For example, to force + using clippy as linter: > + { + \ 'rust': { + \ 'clippy_preference': 'on' + \ } + \ } + + +=============================================================================== +rustc *ale-rust-rustc* + + +g:ale_rust_rustc_options *g:ale_rust_rustc_options* + *b:ale_rust_rustc_options* + Type: |String| + Default: `'--emit=mir -o /dev/null'` + + The variable can be used to change the options passed to `rustc`. + + Users of nightly builds of Rust might want to use `-Z no-codegen` instead. + Be careful when setting the options, as running `rustc` could execute code + or generate binary files. + + +g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes* + *b:ale_rust_ignore_error_codes* + Type: |List| of |String|s + Default: `[]` + + This variable can contain error codes which will be ignored. For example, to + ignore most errors regarding failed imports, put this in your .vimrc + > + let g:ale_rust_ignore_error_codes = ['E0432', 'E0433'] + + +g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans* + *b:ale_rust_ignore_secondary_spans* + Type: |Number| + Default: `0` + + When set to 1, instructs the Rust error reporting to ignore secondary spans. + The problem with secondary spans is that they sometimes appear in error + messages before the main cause of the error, for example: > + + 1 src/main.rs|98 col 5 error| this function takes 4 parameters but 5 + parameters were supplied: defined here + 2 src/main.rs|430 col 32 error| this function takes 4 parameters but 5 + parameters were supplied: expected 4 parameters +< + This is due to the sorting by line numbers. With this option set to 1, + the 'defined here' span will not be presented. + + +=============================================================================== +rustfmt *ale-rust-rustfmt* + +g:ale_rust_rustfmt_options *g:ale_rust_rustfmt_options* + *b:ale_rust_rustfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the rustfmt fixer. + + +g:ale_rust_rustfmt_executable *g:ale_rust_rustfmt_executable* + *b:ale_rust_rustfmt_executable* + Type: |String| + Default: `'rustfmt'` + + This variable can be modified to change the executable path for `rustfmt`. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-salt.tmt b/dot_vim/plugged/ale/doc/ale-salt.tmt new file mode 100644 index 0000000..ac500d3 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-salt.tmt @@ -0,0 +1,43 @@ +=============================================================================== +ALE SALT Integration *ale-salt-options* + +=============================================================================== +salt-lint *ale-salt-salt-lint* + +Website: https://github.com/warpnet/salt-lint + + +Installation +------------------------------------------------------------------------------- + +Install salt-lint in your a virtualenv directory, locally, or globally: > + + pip install salt-lint # After activating virtualenv + pip install --user salt-lint # Install to ~/.local/bin + sudo pip install salt-lint # Install globally + +See |g:ale_virtualenv_dir_names| for configuring how ALE searches for +virtualenv directories. + + +Options +------------------------------------------------------------------------------- + +g:ale_salt_salt-lint_executable *g:ale_salt_salt_lint_executable* + *b:ale_salt_salt_lint_executable* + Type: |String| + Default: `'salt-lint'` + + This variable can be set to change the path to salt-lint. + + +g:ale_salt_salt-lint_options *g:ale_salt_salt-lint_options* + *b:ale_salt_salt-lint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to salt-lint. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-sass.txt b/dot_vim/plugged/ale/doc/ale-sass.txt new file mode 100644 index 0000000..22d7c47 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-sass.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE Sass Integration *ale-sass-options* + + +=============================================================================== +sasslint *ale-sass-sasslint* + +See |ale-scss-sasslint| for information about the available options. + + +=============================================================================== +stylelint *ale-sass-stylelint* + +g:ale_sass_stylelint_executable *g:ale_sass_stylelint_executable* + *b:ale_sass_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + + +g:ale_sass_stylelint_use_global *g:ale_sass_stylelint_use_global* + *b:ale_sass_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-scala.txt b/dot_vim/plugged/ale/doc/ale-scala.txt new file mode 100644 index 0000000..0b0f1a9 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-scala.txt @@ -0,0 +1,130 @@ +=============================================================================== +ALE Scala Integration *ale-scala-options* + + +=============================================================================== +cspell *ale-scala-cspell* + +See |ale-cspell-options| + + +=============================================================================== +metals *ale-scala-metals* + +`metals` requires either an SBT project, a Mill project, or a running Bloop +server. + + +g:ale_scala_metals_executable *g:ale_scala_metals_executable* + *b:ale_scala_metals_executable* + Type: |String| + Default: `'metals-vim'` + + Override the invoked `metals` binary. + + +g:ale_scala_metals_project_root *g:ale_scala_metals_project_root* + *b:ale_scala_metals_project_root* + Type: |String| + Default: `''` + + By default the project root is found by searching upwards for `build.sbt`, + `build.sc`, `.bloop` or `.metals`. + If the project root is elsewhere, you can override the project root + directory. + + +=============================================================================== +sbtserver *ale-scala-sbtserver* + +`sbtserver` requires a running ^1.1.x sbt shell to connect to. It will attempt +to connect via TCP to the address defined in `g:ale_scala_sbtserver_address`. +As `sbt` defaults to listening via unix sockets, place these settings into +your `~/.sbt/1.0/global.sbt` to ensure that ale will always attempt to connect +to the right socket: + +`serverConnectionType := ConnectionType.Tcp` and `serverPort := 4273` + + +g:ale_scala_sbtserver_address *g:ale_scala_sbtserver_address* + *b:ale_scala_sbtserver_address* + Type: |String| + Default: `'127.0.0.1:4273'` + + By default the address is found by parsing `active.json`, however, reading a + file is a blocking operation which should be avoided in ale. The easy way + around this is to configure sbt to always connect to the same port, which + the instructions above describe. + + +g:ale_scala_sbtserver_project_root *g:ale_scala_sbtserver_project_root* + *b:ale_scala_sbtserver_project_root* + Type: |String| + Default: `''` + + By default the project root is found by searching upwards for `build.sbt`. + If the project root is elsewhere, you can override the project root + directory. + + +=============================================================================== +scalafmt *ale-scala-scalafmt* + +If Nailgun is used, override `g:ale_scala_scalafmt_executable` like so: > + let g:ale_scala_scalafmt_executable = 'ng' + + +g:ale_scala_scalafmt_executable *g:ale_scala_scalafmt_executable* + *b:ale_scala_scalafmt_executable* + Type: |String| + Default: `'scalafmt'` + + Override the invoked `scalafmt` binary. This is useful for running `scalafmt` + with Nailgun. + + +g:ale_scala_scalafmt_options *g:ale_scala_scalafmt_options* + *b:ale_scala_scalafmt_options* + Type: |String| + Default: `''` + + A string containing additional options to pass to `'scalafmt'`, or + `'ng scalafmt'` if Nailgun is used. + + +=============================================================================== +scalastyle *ale-scala-scalastyle* + +`scalastyle` requires a configuration file for a project to run. When no +configuration file can be found, ALE will report a problem saying that a +configuration file is required at line 1. + +To disable `scalastyle` globally, use |g:ale_linters| like so: > + let g:ale_linters = {'scala': ['scalac']} " Enable only scalac instead +< + +See |g:ale_linters| for more information on disabling linters. + + +g:ale_scala_scalastyle_config *g:ale_scala_scalastyle_config* + *b:ale_scala_scalastyle_config* + Type: |String| + Default: `''` + + A string containing the location of a global fallback configuration file. + + By default, ALE will look for a configuration file named + `scalastyle_config.xml` or `scalastyle-config.xml` in the current file's + directory or parent directories. + + +g:ale_scala_scalastyle_options *g:ale_scala_scalastyle_options* + *b:ale_scala_scalastyle_options* + Type: |String| + Default: `''` + + A string containing additional options to pass to scalastyle. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-scss.txt b/dot_vim/plugged/ale/doc/ale-scss.txt new file mode 100644 index 0000000..07a94fe --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-scss.txt @@ -0,0 +1,64 @@ +=============================================================================== +ALE SCSS Integration *ale-scss-options* + + +=============================================================================== +prettier *ale-scss-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +sasslint *ale-scss-sasslint* + +g:ale_scss_sasslint_executable *g:ale_scss_sasslint_executable* + *b:ale_scss_sasslint_executable* + Type: |String| + Default: `'sass-lint'` + + See |ale-integrations-local-executables| + + +g:ale_scss_sasslint_options *g:ale_scss_sasslint_options* + *b:ale_scss_sasslint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to sass-lint. + + +g:ale_scss_sasslint_use_global *g:ale_scss_sasslint_use_global* + *b:ale_scss_sasslint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +stylelint *ale-scss-stylelint* + +g:ale_scss_stylelint_executable *g:ale_scss_stylelint_executable* + *b:ale_scss_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + +g:ale_scss_stylelint_options *g:ale_scss_stylelint_options* + *b:ale_scss_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + +g:ale_scss_stylelint_use_global *g:ale_scss_stylelint_use_global* + *b:ale_scss_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-sh.txt b/dot_vim/plugged/ale/doc/ale-sh.txt new file mode 100644 index 0000000..9a1928c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-sh.txt @@ -0,0 +1,144 @@ +=============================================================================== +ALE Shell Integration *ale-sh-options* + + +=============================================================================== +bashate *ale-sh-bashate* + +g:ale_sh_bashate_executable *g:ale_sh_bashate_executable* + *b:ale_sh_bashate_executable* + Type: |String| + Default: `'bashate'` + + This variable sets executable used for bashate. + + +g:ale_sh_bashate_options *g:ale_sh_bashate_options* + *b:ale_sh_bashate_options* + Type: |String| + Default: `''` + + With this variable we are able to pass extra arguments for bashate. For + example to ignore the indentation rule: + +> + let g:ale_sh_bashate_options = '-i E003' +< + +=============================================================================== +cspell *ale-sh-cspell* + +See |ale-cspell-options| + + +=============================================================================== +sh-language-server *ale-sh-language-server* + +g:ale_sh_language_server_executable *g:ale_sh_language_server_executable* + *b:ale_sh_language_server_executable* + Type: |String| + Default: `'bash-language-server'` + + See |ale-integrations-local-executables| + + +g:ale_sh_language_server_use_global *g:ale_sh_language_server_use_global* + *b:ale_sh_language_server_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +shell *ale-sh-shell* + +g:ale_sh_shell_default_shell *g:ale_sh_shell_default_shell* + *b:ale_sh_shell_default_shell* + Type: |String| + Default: The current shell (`$SHELL`). Falls back to `'bash'` if that cannot be + read or if the current shell is `'fish'`. + + When ALE runs the linter for shells with the `-n` flag, it will attempt to + read the shell from the shebang (`#!`) line from the shell script to + determine the shell program to run. When this detection fails, this variable + will be used instead. + + +=============================================================================== +shellcheck *ale-sh-shellcheck* + +g:ale_sh_shellcheck_executable *g:ale_sh_shellcheck_executable* + *b:ale_sh_shellcheck_executable* + Type: |String| + Default: `'shellcheck'` + + This variable sets executable used for shellcheck. + + +g:ale_sh_shellcheck_options *g:ale_sh_shellcheck_options* + *b:ale_sh_shellcheck_options* + Type: |String| + Default: `''` + + With this variable we are able to pass extra arguments for shellcheck + for shellcheck invocation. + + For example, if we want shellcheck to follow external sources (`see SC1091`) + we can set the variable as such: +> + let g:ale_sh_shellcheck_options = '-x' +< + + +g:ale_sh_shellcheck_change_directory *g:ale_sh_shellcheck_change_directory* + *b:ale_sh_shellcheck_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the shell file being + checked with `shellcheck` is in before checking it. This helps `shellcheck` + determine the path to sourced files more easily. This option can be turned + off if you want to control the directory `shellcheck` is executed from + yourself. + + +g:ale_sh_shellcheck_dialect *g:ale_sh_shellcheck_dialect* + *b:ale_sh_shellcheck_dialect* + Type: |String| + Default: `'auto'` + + This variable specifies the shellcheck dialect (`-s` option). The value + `'auto'` causes ALE to detect the dialect automatically, based on the shebang + line (if present) or the value of `b:is_bash`, `b:is_sh`, or `b:is_kornshell` + (set and used by |sh.vim|). + + +g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions* + *b:ale_sh_shellcheck_exclusions* + Type: |String| + Default: `''` + + Set this variable to exclude test(s) for shellcheck (-e/--exclude option). + To exclude more than one option, separate them with commas. + + For example, to ignore some warnings that aren't applicable to files that + will be sourced by other scripts, use the buffer-local variant: +> + autocmd BufEnter PKGBUILD,.env + \ let b:ale_sh_shellcheck_exclusions = 'SC2034,SC2154,SC2164' +< + +=============================================================================== +shfmt *ale-sh-shfmt* + +g:ale_sh_shfmt_options *g:ale_sh_shfmt_options* + *b:ale_sh_shfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the shfmt fixer. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-sml.txt b/dot_vim/plugged/ale/doc/ale-sml.txt new file mode 100644 index 0000000..cc8d679 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-sml.txt @@ -0,0 +1,36 @@ +=============================================================================== +ALE SML Integration *ale-sml-options* + +=============================================================================== +smlnj *ale-sml-smlnj* + *ale-sml-smlnj-cm* + +There are two SML/NJ powered checkers: + +- one using Compilation Manager that works on whole projects, but requires you + to save before errors show up +- one using the SML/NJ REPL that works as you change the text, but might fail + if your project can only be built with CM. + +We dynamically select which one to use based whether we find a `*.cm` file at +or above the directory of the file being checked. Only one checker (`smlnj`, +`smlnj-cm`) will be enabled at a time. + +------------------------------------------------------------------------------- + +g:ale_sml_smlnj_cm_file *g:ale_sml_smlnj_cm_file* + *b:ale_sml_smlnj_cm_file* + Type: |String| + Default: `'*.cm'` + + By default, ALE will look for a `*.cm` file in your current directory, + searching upwards. It stops when it finds at least one `*.cm` file (taking + the first file if there are more than one). + + Change this option (in the buffer or global scope) to control how ALE finds + CM files. For example, to always search for a CM file named `sandbox.cm`: +> + let g:ale_sml_smlnj_cm_file = 'sandbox.cm' + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-solidity.txt b/dot_vim/plugged/ale/doc/ale-solidity.txt new file mode 100644 index 0000000..c4d2f02 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-solidity.txt @@ -0,0 +1,41 @@ +=============================================================================== +ALE Solidity Integration *ale-solidity-options* + + +=============================================================================== +solc *ale-solidity-solc* + +g:ale_solidity_solc_executable *g:ale_solidity_solc_executable* + *b:ale_solidity_solc_executable* + Type: |String| + Default: `'solc'` + + Override the invoked solc binary. For truffle/hardhat binaries. + +g:ale_solidity_solc_options *g:ale_solidity_solc_options* + *b:ale_solidity_solc_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to solc. + + +=============================================================================== +solhint *ale-solidity-solhint* + + Solhint should work out-of-the-box. You can further configure it using a + `.solihint.json` file. See https://github.com/protofire/solhint for more + information. + + +=============================================================================== +solium *ale-solidity-solium* + + Use of Solium linter for Solidity source code requires a .soliumrc.json + file in project root. This file can be generated by running `solium --init`. + See the corresponding solium usage for detailed instructions + (https://github.com/duaraghav8/Solium#usage). + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-spec.txt b/dot_vim/plugged/ale/doc/ale-spec.txt new file mode 100644 index 0000000..3da950c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-spec.txt @@ -0,0 +1,43 @@ +=============================================================================== +ALE Spec Integration *ale-spec-options* + *ale-integration-spec* + +=============================================================================== +Integration Information + + The rpmlint linter is disabled by default, because running rpmlint can + result in the execution of code embedded in the spec file and rpmlint makes + no distinction between checks which are safe to run on untrusted files and + those which are not. + + Currently linters must be enabled globally. The rpmlint linter can be + enabled with: +> + let g:ale_linters = {'spec': ['rpmlint']} +< + +=============================================================================== +rpmlint *ale-spec-rpmlint* + +g:ale_spec_rpmlint_executable *g:ale_spec_rpmlint_executable* + *b:ale_spec_rpmlint_executable* + Type: |String| + Default: `'rpmlint'` + + This variable sets executable used for rpmlint. + + +g:ale_spec_rpmlint_options *g:ale_spec_rpmlint_options* + *b:ale_spec_rpmlint_options* + Type: |String| + Default: `''` + + Set this to pass extra arguments to rpmlint. + + For example, to instruct rpmlint to use a specific configuration file: +> + let g:ale_spec_rpmlint_options = '-f custom.cf' +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-sql.txt b/dot_vim/plugged/ale/doc/ale-sql.txt new file mode 100644 index 0000000..225ac7d --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-sql.txt @@ -0,0 +1,89 @@ +=============================================================================== +ALE SQL Integration *ale-sql-options* + + +=============================================================================== +dprint *ale-sql-dprint* + +See |ale-dprint-options| +and https://github.com/dprint/dprint-plugin-sql/releases + + +=============================================================================== +pgformatter *ale-sql-pgformatter* + +g:ale_sql_pgformatter_executable *g:ale_sql_pgformatter_executable* + *b:ale_sql_pgformatter_executable* + Type: |String| + Default: `'pg_format'` + + This variable sets executable used for pgformatter. + +g:ale_sql_pgformatter_options *g:ale_sql_pgformatter_options* + *b:ale_sql_pgformatter_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the pgformatter fixer. + + +=============================================================================== +sqlfluff *ale-sql-sqlfluff* + +g:ale_sql_sqlfluff_executable *g:ale_sql_sqlfluff_executable* + *b:ale_sql_sqlfluff_executable* + Type: |String| + Default: `'sqlfluff'` + + This variable sets executable used for sqlfluff. + +g:ale_sql_sqlfluff_options *g:ale_sql_sqlfluff_options* + *b:ale_sql_sqlfluff_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the sqlfluff linter. + + +=============================================================================== + + +=============================================================================== +sqlfmt *ale-sql-sqlfmt* + +g:ale_sql_sqlfmt_executable *g:ale_sql_sqlfmt_executable* + *b:ale_sql_sqlfmt_executable* + Type: |String| + Default: `'sqlfmt'` + + This variable sets executable used for sqlfmt. + +g:ale_sql_sqlfmt_options *g:ale_sql_sqlfmt_options* + *b:ale_sql_sqlfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the sqlfmt fixer. + At this time only the -u flag is available to format with upper-case. + + +=============================================================================== +sqlformat *ale-sql-sqlformat* + +g:ale_sql_sqlformat_executable *g:ale_sql_sqlformat_executable* + *b:ale_sql_sqlformat_executable* + Type: |String| + Default: `'sqlformat'` + + This variable sets executable used for sqlformat. + +g:ale_sql_sqlformat_options *g:ale_sql_sqlformat_options* + *b:ale_sql_sqlformat_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the sqlformat fixer. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-stylus.txt b/dot_vim/plugged/ale/doc/ale-stylus.txt new file mode 100644 index 0000000..3e6ba90 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-stylus.txt @@ -0,0 +1,33 @@ +=============================================================================== +ALE Stylus Integration *ale-stylus-options* + + +=============================================================================== +stylelint *ale-stylus-stylelint* + +g:ale_stylus_stylelint_executable *g:ale_stylus_stylelint_executable* + *b:ale_stylus_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + + +g:ale_stylus_stylelint_options *g:ale_stylus_stylelint_options* + *b:ale_stylus_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + + +g:ale_stylus_stylelint_use_global *g:ale_stylus_stylelint_use_global* + *b:ale_stylus_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-sugarss.txt b/dot_vim/plugged/ale/doc/ale-sugarss.txt new file mode 100644 index 0000000..8e991e5 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-sugarss.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE SugarSS Integration *ale-sugarss-options* + + +=============================================================================== +stylelint *ale-sugarss-stylelint* + +g:ale_sugarss_stylelint_executable *g:ale_sugarss_stylelint_executable* + *b:ale_sugarss_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + +g:ale_sugarss_stylelint_options *g:ale_sugarss_stylelint_options* + *b:ale_sugarss_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + +g:ale_sugarss_stylelint_use_global *g:ale_sugarss_stylelint_use_global* + *b:ale_sugarss_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-supported-languages-and-tools.txt b/dot_vim/plugged/ale/doc/ale-supported-languages-and-tools.txt new file mode 100644 index 0000000..4edc10c --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-supported-languages-and-tools.txt @@ -0,0 +1,701 @@ +*ale-supported-languages-and-tools.txt* For Vim version 8.0. +*ale-supported-list* + +ALE Supported Languages and Tools + +=============================================================================== + +The following languages and tools are supported by ALE. + +Notes: + +`^` No linters for text or Vim help filetypes are enabled by default. +`!!` These linters check only files on disk. See |ale-lint-file-linters| + +* Ada + * `ada_language_server` + * `cspell` + * `gcc` + * `gnatpp` +* Ansible + * `ansible-language-server` + * `ansible-lint`!! +* API Blueprint + * `drafter` +* APKBUILD + * `apkbuild-lint` + * `secfixes-check` +* AsciiDoc + * `alex` + * `cspell` + * `languagetool`!! + * `proselint` + * `redpen` + * `textlint` + * `vale` + * `write-good` +* ASM + * `gcc` +* AVRA + * `avra` +* Awk + * `gawk` +* Bash + * `bashate` + * `cspell` + * `language-server` + * `shell` (-n flag) + * `shellcheck` + * `shfmt` +* Bats + * `shellcheck` +* Bazel + * `buildifier` +* BibTeX + * `bibclean` +* Bicep + * `bicep` +* BitBake + * `oelint-adv` +* Bourne Shell + * `shell` (-n flag) + * `shellcheck` + * `shfmt` +* C + * `astyle` + * `ccls` + * `clang` (`cc`) + * `clang-format` + * `clangd` + * `clangtidy`!! + * `cppcheck` + * `cpplint`!! + * `cquery` + * `cspell` + * `flawfinder` + * `gcc` (`cc`) + * `uncrustify` +* C# + * `clang-format` + * `csc`!! + * `cspell` + * `dotnet-format` + * `mcs` + * `mcsc`!! + * `uncrustify` +* C++ (filetype cpp) + * `astyle` + * `ccls` + * `clang` (`cc`) + * `clang-format` + * `clangcheck`!! + * `clangd` + * `clangtidy`!! + * `clazy`!! + * `cppcheck` + * `cpplint`!! + * `cquery` + * `cspell` + * `flawfinder` + * `gcc` (`cc`) + * `uncrustify` +* Cairo + * `starknet` +* Chef + * `cookstyle` + * `foodcritic`!! +* Clojure + * `clj-kondo` + * `joker` +* CloudFormation + * `cfn-python-lint` +* CMake + * `cmake-format` + * `cmake-lint` + * `cmakelint` +* CoffeeScript + * `coffee` + * `coffeelint` +* Crystal + * `ameba`!! + * `crystal`!! +* CSS + * `VSCode CSS language server` + * `cspell` + * `css-beautify` + * `csslint` + * `fecs` + * `prettier` + * `stylelint` +* Cucumber + * `cucumber` +* CUDA + * `clang-format` + * `clangd` + * `nvcc`!! +* Cypher + * `cypher-lint` +* Cython (pyrex filetype) + * `cython` +* D + * `dfmt` + * `dls` + * `dmd` + * `uncrustify` +* Dafny + * `dafny`!! +* Dart + * `analysis_server` + * `dart-analyze`!! + * `dart-format`!! + * `dartfmt`!! + * `language_server` +* desktop + * `desktop-file-validate` +* Dhall + * `dhall-format` + * `dhall-freeze` + * `dhall-lint` +* Dockerfile + * `dockerfile_lint` + * `dprint` + * `hadolint` +* Elixir + * `credo` + * `cspell` + * `dialyxir` + * `dogma`!! + * `elixir-ls` + * `mix`!! +* Elm + * `elm-format` + * `elm-ls` + * `elm-make` +* Erb + * `erb` + * `erblint` + * `erubi` + * `erubis` + * `ruumba` +* Erlang + * `SyntaxErl` + * `dialyzer`!! + * `elvis`!! + * `erlang_ls` + * `erlc` + * `erlfmt` +* Fish + * `fish` (-n flag) + * `fish_indent` +* Fortran + * `gcc` + * `language_server` +* Fountain + * `proselint` +* FusionScript + * `fusion-lint` +* Git Commit Messages + * `gitlint` +* GLSL + * `glslang` + * `glslls` +* Go + * `bingo` + * `cspell` + * `go build`!! + * `go mod`!! + * `go vet`!! + * `gofmt` + * `gofumpt` + * `goimports` + * `golangci-lint`!! + * `golangserver` + * `golines` + * `golint` + * `gometalinter`!! + * `gopls` + * `gosimple`!! + * `gotype`!! + * `revive`!! + * `staticcheck`!! +* GraphQL + * `eslint` + * `gqlint` + * `prettier` +* Hack + * `hack` + * `hackfmt` + * `hhast` +* Haml + * `haml-lint` +* Handlebars + * `ember-template-lint` +* Haskell + * `brittany` + * `cabal-ghc` + * `cspell` + * `floskell` + * `ghc` + * `ghc-mod` + * `hdevtools` + * `hfmt` + * `hie` + * `hindent` + * `hlint` + * `hls` + * `ormolu` + * `stack-build`!! + * `stack-ghc` + * `stylish-haskell` +* HCL + * `packer-fmt` + * `terraform-fmt` +* HTML + * `VSCode HTML language server` + * `alex` + * `angular` + * `cspell` + * `fecs` + * `html-beautify` + * `htmlhint` + * `prettier` + * `proselint` + * `tidy` + * `write-good` +* Idris + * `idris` +* Ink + * `ink-language-server` +* Inko + * `inko` !! +* ISPC + * `ispc`!! +* Java + * `PMD` + * `checkstyle`!! + * `clang-format` + * `cspell` + * `eclipselsp` + * `google-java-format` + * `javac` + * `javalsp` + * `uncrustify` +* JavaScript + * `clang-format` + * `cspell` + * `deno` + * `dprint` + * `eslint` + * `fecs` + * `flow` + * `jscs` + * `jshint` + * `prettier` + * `prettier-eslint` + * `prettier-standard` + * `standard` + * `tsserver` + * `xo` +* JSON + * `VSCode JSON language server` + * `clang-format` + * `cspell` + * `dprint` + * `eslint` + * `fixjson` + * `jq` + * `jsonlint` + * `prettier` + * `spectral` +* JSON5 + * `eslint` +* JSONC + * `eslint` +* Jsonnet + * `jsonnet-lint` + * `jsonnetfmt` +* Julia + * `languageserver` +* Kotlin + * `kotlinc`!! + * `ktlint` + * `languageserver` +* LaTeX (tex) + * `alex` + * `chktex` + * `cspell` + * `lacheck` + * `proselint` + * `redpen` + * `texlab` + * `textlint` + * `vale` + * `write-good` +* Less + * `lessc` + * `prettier` + * `stylelint` +* LLVM + * `llc` +* Lua + * `cspell` + * `lua-format` + * `luac` + * `luacheck` + * `luafmt` + * `selene` + * `stylua` +* Mail + * `alex` + * `languagetool`!! + * `proselint` + * `vale` +* Make + * `checkmake` +* Markdown + * `alex` + * `cspell` + * `languagetool`!! + * `markdownlint`!! + * `mdl` + * `pandoc` + * `prettier` + * `proselint` + * `redpen` + * `remark-lint` + * `textlint` + * `vale` + * `write-good` +* MATLAB + * `mlint` +* Mercury + * `mmc`!! +* NASM + * `nasm`!! +* Nim + * `nim check`!! + * `nimlsp` + * `nimpretty` +* nix + * `nix-instantiate` + * `nixfmt` + * `nixpkgs-fmt` + * `rnix-lsp` + * `statix` +* nroff + * `alex` + * `proselint` + * `write-good` +* Objective-C + * `ccls` + * `clang` + * `clang-format` + * `clangd` + * `uncrustify` +* Objective-C++ + * `clang` + * `clangd` + * `uncrustify` +* OCaml + * `dune` + * `merlin` (see |ale-ocaml-merlin|) + * `ocamlformat` + * `ocamllsp` + * `ocp-indent` + * `ols` +* OpenApi + * `ibm_validator` + * `prettier` + * `yamllint` +* OpenSCAD + * `SCA2D` +* Packer + * `packer-fmt-fixer` +* Pascal + * `ptop` +* Pawn + * `uncrustify` +* Perl + * `perl -c` + * `perl-critic` + * `perltidy` +* Perl6 + * `perl6 -c` +* PHP + * `cspell` + * `intelephense` + * `langserver` + * `phan` + * `php -l` + * `php-cs-fixer` + * `phpactor` + * `phpcbf` + * `phpcs` + * `phpmd` + * `phpstan` + * `pint` + * `psalm`!! + * `tlint` +* PO + * `alex` + * `msgfmt` + * `proselint` + * `write-good` +* Pod + * `alex` + * `proselint` + * `write-good` +* Pony + * `ponyc` +* PowerShell + * `cspell` + * `powershell` + * `psscriptanalyzer` +* Prolog + * `swipl` +* proto + * `buf-format`!! + * `buf-lint`!! + * `clang-format` + * `protoc-gen-lint`!! + * `protolint`!! +* Pug + * `pug-lint` +* Puppet + * `languageserver` + * `puppet` + * `puppet-lint` +* PureScript + * `purescript-language-server` + * `purs-tidy` + * `purty` +* Python + * `autoflake`!! + * `autoimport` + * `autopep8` + * `bandit` + * `black` + * `cspell` + * `flake8` + * `flakehell` + * `isort` + * `mypy` + * `prospector`!! + * `pycodestyle` + * `pydocstyle` + * `pyflakes` + * `pyflyby` + * `pylama`!! + * `pylint`!! + * `pylsp` + * `pyre` + * `pyright` + * `refurb` + * `reorder-python-imports` + * ruff + * `unimport` + * `vulture`!! + * `yapf` +* QML + * `qmlfmt` + * `qmllint` +* R + * `languageserver` + * `lintr` + * `styler` +* Racket + * `racket-langserver` + * `raco` + * `raco_fmt` +* Re:VIEW + * `redpen` +* ReasonML + * `merlin` + * `ols` + * `reason-language-server` + * `refmt` +* Rego + * `cspell` + * `opacheck` + * `opafmt` +* reStructuredText + * `alex` + * `cspell` + * `proselint` + * `redpen` + * `rstcheck` + * `textlint` + * `vale` + * `write-good` +* Robot + * `rflint` +* RPM spec + * `rpmlint` +* Ruby + * `brakeman`!! + * `cspell` + * `debride` + * `prettier` + * `rails_best_practices`!! + * `reek` + * `rubocop` + * `ruby` + * `rufo` + * `solargraph` + * `sorbet` + * `standardrb` + * `syntax_tree` +* Rust + * `cargo`!! + * `cspell` + * `rls` + * `rust-analyzer` + * `rustc` (see |ale-integration-rust|) + * `rustfmt` +* Salt + * `salt-lint` +* Sass + * `sass-lint` + * `stylelint` +* Scala + * `cspell` + * `fsc` + * `metals` + * `sbtserver` + * `scalac` + * `scalafmt` + * `scalastyle` +* SCSS + * `prettier` + * `sass-lint` + * `scss-lint` + * `stylelint` +* Slim + * `slim-lint` +* SML + * `smlnj` +* Solidity + * `solc` + * `solhint` + * `solium` +* SQL + * `dprint` + * `pgformatter` + * `sql-lint` + * `sqlfluff` + * `sqlfmt` + * `sqlformat` + * `sqlint` +* Stylus + * `stylelint` +* SugarSS + * `stylelint` +* Svelte + * `prettier` + * `svelteserver` +* Swift + * Apple `swift-format` + * `cspell` + * `sourcekit-lsp` + * `swiftformat` + * `swiftlint` +* systemd + * `systemd-analyze`!! +* Tcl + * `nagelfar`!! +* Terraform + * `checkov` + * `terraform` + * `terraform-fmt-fixer` + * `terraform-ls` + * `terraform-lsp` + * `tflint` + * `tfsec` +* Texinfo + * `alex` + * `cspell` + * `proselint` + * `write-good` +* Text^ + * `alex` + * `cspell` + * `languagetool`!! + * `proselint` + * `redpen` + * `textlint` + * `vale` + * `write-good` +* Thrift + * `thrift` + * `thriftcheck` +* TOML + * `dprint` +* TypeScript + * `cspell` + * `deno` + * `dprint` + * `eslint` + * `fecs` + * `prettier` + * `standard` + * `tslint` + * `tsserver` + * `typecheck` +* V + * `v`!! + * `vfmt` +* VALA + * `uncrustify` + * `vala_lint`!! +* Verilog + * `hdl-checker` + * `iverilog` + * `verilator` + * `vlog` + * `xvlog` + * `yosys`!! +* VHDL + * `ghdl` + * `vcom` + * `xvhdl` +* Vim + * `vimls` + * `vint` +* Vim help^ + * `alex` + * `proselint` + * `write-good` +* Vue + * `cspell` + * `prettier` + * `vls` + * `volar` +* WGSL + * `naga` +* XHTML + * `alex` + * `cspell` + * `proselint` + * `write-good` +* XML + * `xmllint` +* YAML + * `actionlint` + * `circleci`!! + * `gitlablint` + * `prettier` + * `spectral` + * `swaglint` + * `yaml-language-server` + * `yamlfix` + * `yamllint` +* YANG + * `yang-lsp` +* Zeek + * `zeek`!! +* Zig + * `zigfmt` + * `zls` + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-svelte.txt b/dot_vim/plugged/ale/doc/ale-svelte.txt new file mode 100644 index 0000000..92f109f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-svelte.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE Svelte Integration *ale-svelte-options* + + +=============================================================================== +prettier *ale-svelte-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +svelteserver *ale-svelte-svelteserver* + +g:ale_svelte_svelteserver_executable *g:ale_svelte_svelteserver_executable* + *b:ale_svelte_svelteserver_executable* + Type: |String| + Default: `'svelteserver'` + + See |ale-integrations-local-executables| + + +g:ale_svelte_svelteserver_use_global *g:ale_svelte_svelteserver_use_global* + *b:ale_svelte_svelteserver_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-swift.txt b/dot_vim/plugged/ale/doc/ale-swift.txt new file mode 100644 index 0000000..a443eab --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-swift.txt @@ -0,0 +1,67 @@ +=============================================================================== +ALE Swift Integration *ale-swift-options* + + +=============================================================================== +apple-swift-format *ale-swift-apple-swift-format* + +There are 3 options to enable linting and fixing with Apple's swift-format: + +1. Install the local executable in your path, as described here: + https://github.com/apple/swift-format +2. Install the executable via your OS package manager, for instance via + Homebrew with `brew install swift-format` +3. Your Swift project has a dependency on the swift-format package, so it can + be run with `swift run swift-format lint ...` In this case, you need to set + a variable, see |g:ale_swift_appleswiftformat_use_swiftpm|. + +Additionally, ALE tries to locate and use the nearest existing `.swift-format` +configuration file. + + +g:ale_swift_appleswiftformat_executable + *g:ale_swift_appleswiftformat_executable* + *b:ale_swift_appleswiftformat_executable* + Type: |String| + Default: `'swift-format'` + + This variable can be modified to change the executable path for + `swift-format`. + + +g:ale_swift_appleswiftformat_use_swiftpm + *g:ale_swift_appleswiftformat_use_swiftpm* + *b:ale_swift_appleswiftformat_use_swiftpm* + Type: |Number| + Default: `0` + + When set to `1`, this option will cause ALE to use + `swift run swift-format lint ...` instead of the global executable. Use this + option if your Swift project has a dependency on the swift-format package. + + See |ale-integrations-local-executables| + + +=============================================================================== +cspell *ale-swift-cspell* + +See |ale-cspell-options| + + +=============================================================================== +sourcekitlsp *ale-swift-sourcekitlsp* + +To enable the SourceKit-LSP you need to install and build the executable as +described here: https://github.com/apple/sourcekit-lsp#building-sourcekit-lsp + + +g:ale_sourcekit_lsp_executable *g:ale_sourcekit_lsp_executable* + *b:ale_sourcekit_lsp_executable* + Type: |String| + Default: `'sourcekit-lsp'` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-systemd.txt b/dot_vim/plugged/ale/doc/ale-systemd.txt new file mode 100644 index 0000000..13c7037 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-systemd.txt @@ -0,0 +1,14 @@ +=============================================================================== +ALE systemd Integration *ale-systemd-options* + + +=============================================================================== +systemd-analyze *ale-systemd-analyze* + +ALE supports checking user systemd units with `systemd-analyze --user verify` +Checks will only work with user unit files in their proper location. There +aren't any options, and checks can only run after saving the file. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-tcl.txt b/dot_vim/plugged/ale/doc/ale-tcl.txt new file mode 100644 index 0000000..497c9fd --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-tcl.txt @@ -0,0 +1,25 @@ +=============================================================================== +ALE Tcl Integration *ale-tcl-options* + + +=============================================================================== +nagelfar *ale-tcl-nagelfar* + +g:ale_tcl_nagelfar_executable *g:ale_tcl_nagelfar_executable* + *b:ale_tcl_nagelfar_executable* + Type: |String| + Default: `'nagelfar.tcl'` + + This variable can be changed to change the path to nagelfar. + + +g:ale_tcl_nagelfar_options *g:ale_tcl_nagelfar_options* + *b:ale_tcl_nagelfar_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to nagelfar. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-terraform.txt b/dot_vim/plugged/ale/doc/ale-terraform.txt new file mode 100644 index 0000000..91a7dd1 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-terraform.txt @@ -0,0 +1,138 @@ +=============================================================================== +ALE Terraform Integration *ale-terraform-options* + + +=============================================================================== +checkov *ale-terraform-checkov* + +g:ale_terraform_checkov_executable *g:ale_terraform_checkov_executable* + *b:ale_terraform_checkov_executable* + + Type: |String| + Default: `'checkov'` + + This variable can be changed to use a different executable for checkov. + + +g:ale_terraform_checkov_options *g:ale_terraform_checkov_options* + *b:ale_terraform_checkov_options* + Type: |String| + Default: `''` + + This variable can be changed to set additional options for checkov. + +=============================================================================== +terraform-fmt-fixer *ale-terraform-fmt-fixer* + +g:ale_terraform_fmt_executable *g:ale_terraform_fmt_executable* + *b:ale_terraform_fmt_executable* + + Type: |String| + Default: `'terraform'` + + This variable can be changed to use a different executable for terraform. + + +g:ale_terraform_fmt_options *g:ale_terraform_fmt_options* + *b:ale_terraform_fmt_options* + Type: |String| + Default: `''` + + +=============================================================================== +terraform *ale-terraform-terraform* + +g:ale_terraform_terraform_executable *g:ale_terraform_terraform_executable* + *b:ale_terraform_terraform_executable* + + Type: |String| + Default: `'terraform'` + + This variable can be changed to use a different executable for terraform. + + +=============================================================================== +terraform-ls *ale-terraform-terraform-ls* + +Official terraform language server. More stable than *terraform-lsp* but +currently has less features. + +g:ale_terraform_ls_executable *g:ale_terraform_ls_executable* + *b:ale_terraform_ls_executable* + Type: |String| + Default: `'terraform-ls'` + + This variable can be changed to use a different executable for terraform-ls. + + +g:ale_terraform_ls_options *g:ale_terraform_ls_options* + *b:ale_terraform_ls_options* + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to terraform-ls. + + +=============================================================================== +terraform-lsp *ale-terraform-terraform-lsp* + +g:ale_terraform_langserver_executable *g:ale_terraform_langserver_executable* + *b:ale_terraform_langserver_executable* + Type: |String| + Default: `'terraform-lsp'` + + This variable can be changed to use a different executable for terraform-lsp. + + +g:ale_terraform_langserver_options *g:ale_terraform_langserver_options* + *b:ale_terraform_langserver_options* + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to terraform-lsp. + + +=============================================================================== +tflint *ale-terraform-tflint* + +g:ale_terraform_tflint_executable *g:ale_terraform_tflint_executable* + *b:ale_terraform_tflint_executable* + + Type: |String| + Default: `'tflint'` + + This variable can be changed to use a different executable for tflint. + + +g:ale_terraform_tflint_options *g:ale_terraform_tflint_options* + *b:ale_terraform_tflint_options* + Type: |String| + Default: `'-f json'` + + This variable can be changed to pass different options to tflint. Ale does + expect json output from tflint, so if you change this, you'll probably want + to include '-f json' in your new value. + + +=============================================================================== +tfsec *ale-terraform-tfsec* + +g:ale_terraform_tfsec_executable *g:ale_terraform_tfsec_executable* + *b:ale_terraform_tfsec_executable* + + Type: |String| + Default: `'tfsec'` + + This variable can be changed to use a different executable for tfsec. + +g:ale_terraform_tfsec_options *g:ale_terraform_tfsec_options* + *b:ale_terraform_tfsec_options* + + Type: |String| + Default: `''` + + This variable can be changed to pass custom CLI flags to tfsec. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-tex.txt b/dot_vim/plugged/ale/doc/ale-tex.txt new file mode 100644 index 0000000..fa0d827 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-tex.txt @@ -0,0 +1,95 @@ +=============================================================================== +ALE TeX Integration *ale-tex-options* + + +=============================================================================== +chktex *ale-tex-chktex* + +g:ale_tex_chktex_executable *g:ale_tex_chktex_executable* + *b:ale_tex_chktex_executable* + Type: |String| + Default: `'chktex'` + + This variable can be changed to change the path to chktex. + + +g:ale_tex_chktex_options *g:ale_tex_chktex_options* + *b:ale_tex_chktex_options* + Type: |String| + Default: `'-I'` + + This variable can be changed to modify flags given to chktex. + + +=============================================================================== +cspell *ale-tex-cspell* + +See |ale-cspell-options| + + +=============================================================================== +lacheck *ale-tex-lacheck* + +g:ale_lacheck_executable *g:ale_lacheck_executable* + *b:ale_lacheck_executable* + Type: |String| + Default: `'lacheck'` + + This variable can be changed to change the path to lacheck. + + +=============================================================================== +latexindent *ale-tex-latexindent* + +g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable* + *b:ale_tex_latexindent_executable* + Type: |String| + Default: `'latexindent'` + + This variable can be changed to change the path to latexindent. + + +g:ale_tex_latexindent_options *g:ale_tex_latexindent_options* + *b:ale_tex_latexindent_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to latexindent. + + +=============================================================================== +texlab *ale-tex-texlab* + +g:ale_tex_texlab_executable *g:ale_tex_texlab_executable* + *b:ale_tex_texlab_executable* + Type: |String| + Default: `'texlab'` + + This variable can be changed to change the path to texlab. + + +g:ale_tex_texlab_options *g:ale_tex_texlab_options* + *b:ale_tex_texlab_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to texlab command. + +g:ale_tex_texlab_config *g:ale_tex_texlab_config* + *b:ale_tex_texlab_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing LSP configuration settings used to initialize texlab + language server. Refer to texlab documentation for possible settings: + + https://github.com/latex-lsp/texlab/blob/master/docs/options.md + + For example to set build onSave initialization setting: + +> + let g:ale_tex_texlab_config = {"build":{"onSave":v:true}} +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-texinfo.txt b/dot_vim/plugged/ale/doc/ale-texinfo.txt new file mode 100644 index 0000000..53d42b6 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-texinfo.txt @@ -0,0 +1,18 @@ +=============================================================================== +ALE Texinfo Integration *ale-texinfo-options* + + +=============================================================================== +cspell *ale-texinfo-cspell* + +See |ale-cspell-options| + + +=============================================================================== +write-good *ale-texinfo-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-text.txt b/dot_vim/plugged/ale/doc/ale-text.txt new file mode 100644 index 0000000..4e4d0b2 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-text.txt @@ -0,0 +1,48 @@ +=============================================================================== +ALE Text Integration *ale-text-options* + + +============================================================================== +cspell *ale-text-cspell* + +See |ale-cspell-options| + + +=============================================================================== +textlint *ale-text-textlint* + +The options for the textlint linter are global because it does not make +sense to have them specified on a per-language basis. + +g:ale_textlint_executable *g:ale_textlint_executable* + *b:ale_textlint_executable* + Type: |String| + Default: `'textlint'` + + See |ale-integrations-local-executables| + + +g:ale_textlint_options *g:ale_textlint_options* + *b:ale_textlint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to textlint. + + +g:ale_textlint_use_global *g:ale_textlint_use_global* + *b:ale_textlint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +write-good *ale-text-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-thrift.txt b/dot_vim/plugged/ale/doc/ale-thrift.txt new file mode 100644 index 0000000..810127b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-thrift.txt @@ -0,0 +1,65 @@ +=============================================================================== +ALE Thrift Integration *ale-thrift-options* + + +=============================================================================== +thrift *ale-thrift-thrift* + +The `thrift` linter works by compiling the buffer's contents and reporting any +errors reported by the parser and the configured code generator(s). + +g:ale_thrift_thrift_executable *g:ale_thrift_thrift_executable* + *b:ale_thrift_thrift_executable* + Type: |String| + Default: `'thrift'` + + See |ale-integrations-local-executables| + + +g:ale_thrift_thrift_generators *g:ale_thrift_thrift_generators* + *b:ale_thrift_thrift_generators* + Type: |List| of |String|s + Default: `['cpp']` + + This list must contain one or more named code generators. Generator options + can be included as part of each string, e.g. `['py:dynamic']`. + + +g:ale_thrift_thrift_includes *g:ale_thrift_thrift_includes* + *b:ale_thrift_thrift_includes* + Type: |List| of |String|s + Default: `['.']` + + This list contains paths that will be searched for thrift `include` + directives. + + +g:ale_thrift_thrift_options *g:ale_thrift_thrift_options* + *b:ale_thrift_thrift_options* + Type: |String| + Default: `'-strict'` + + This variable can be changed to customize the additional command-line + arguments that are passed to the thrift compiler. + +=============================================================================== +thriftcheck *ale-thrift-thriftcheck* + +g:ale_thrift_thriftcheck_executable *g:ale_thrift_thriftcheck_executable* + *b:ale_thrift_thriftcheck_executable* + Type: |String| + Default: `'thriftcheck'` + + See |ale-integrations-local-executables| + + +g:ale_thrift_thriftcheck_options *g:ale_thrift_thriftcheck_options* + *b:ale_thrift_thriftcheck_options* + Type: |String| + Default: `''` + + This variable can be changed to customize the additional command-line + arguments that are passed to thriftcheck. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-toml.txt b/dot_vim/plugged/ale/doc/ale-toml.txt new file mode 100644 index 0000000..222a91f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-toml.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE TOML Integration *ale-toml-options* + + +=============================================================================== +dprint *ale-toml-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/toml + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-typescript.txt b/dot_vim/plugged/ale/doc/ale-typescript.txt new file mode 100644 index 0000000..4a99379 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-typescript.txt @@ -0,0 +1,223 @@ +=============================================================================== +ALE TypeScript Integration *ale-typescript-options* + + +=============================================================================== +cspell *ale-typescript-cspell* + +See |ale-cspell-options| + + +=============================================================================== +deno *ale-typescript-deno* + +Starting from version 1.6.0, Deno comes with its own language server. Earlier +versions are not supported. + +g:ale_deno_executable *g:ale_deno_executable* + *b:ale_deno_executable* + Type: |String| + Default: `'deno'` + + +g:ale_deno_lsp_project_root *g:ale_deno_lsp_project_root* + *b:ale_deno_lsp_project_root* + Type: |String| + Default: `''` + + If this variable is left unset, ALE will try to find the project root by + executing the following steps in the given order: + + 1. Find an ancestor directory containing a tsconfig.json. + 2. Find an ancestor directory containing a .git folder. + 3. Use the directory of the current buffer (if the buffer was opened from + a file). + + +g:ale_deno_unstable *g:ale_deno_unstable* + *b:ale_deno_unstable* + Type: |Number| + Default: `0` + + Enable or disable unstable Deno features and APIs. + + +g:ale_deno_importMap *g:ale_deno_importMap* + *b:ale_deno_importMap* + Type: |String| + Default: `'import_map.json'` + + Specify the import map filename to load url maps in a deno project. + + +=============================================================================== +dprint *ale-typescript-dprint* + +See |ale-dprint-options| and https://dprint.dev/plugins/typescript + + +=============================================================================== +eslint *ale-typescript-eslint* + +Because of how TypeScript compiles code to JavaScript and how interrelated +the two languages are, the `eslint` linter for TypeScript uses the JavaScript +options for `eslint` too. See: |ale-javascript-eslint|. + + +=============================================================================== +prettier *ale-typescript-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +standard *ale-typescript-standard* + +g:ale_typescript_standard_executable *g:ale_typescript_standard_executable* + *b:ale_typescript_standard_executable* + Type: |String| + Default: `'standard'` + + See |ale-integrations-local-executables| + + +g:ale_typescript_standard_options *g:ale_typescript_standard_options* + *b:ale_typescript_standard_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to standard. + + +g:ale_typescript_standard_use_global *g:ale_typescript_standard_use_global* + *b:ale_typescript_standard_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +tslint *ale-typescript-tslint* + +This linter isn't recommended, because TSLint can't be used for checking for +problems while you type. You should probably use the tsserver plugin instead. +tsserver plugins are described here: +https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin + +Follow the instructions on the plugin website for installing it: +https://github.com/Microsoft/typescript-tslint-plugin + +Then disable TSLint in vimrc or any other Vim configuration file. > + let g:ale_linters_ignore = {'typescript': ['tslint']} +< + +g:ale_typescript_tslint_executable *g:ale_typescript_tslint_executable* + *b:ale_typescript_tslint_executable* + Type: |String| + Default: `'tslint'` + + See |ale-integrations-local-executables| + + +g:ale_typescript_tslint_config_path *g:ale_typescript_tslint_config_path* + *b:ale_typescript_tslint_config_path* + Type: |String| + Default: `''` + + ALE will first discover the tslint.json path in an ancestor directory. If no + such path exists, this variable will be used instead. + + +g:ale_typescript_tslint_ignore_empty_files + *g:ale_typescript_tslint_ignore_empty_files* + *b:ale_typescript_tslint_ignore_empty_files* + Type: |Number| + Default: `0` + + When set to `1`, ALE will not report any problems for empty files with + TSLint. ALE will still execute TSLint for the files, but ignore any problems + reported. This stops ALE from complaining about newly created files, + and files where lines have been added and then removed. + + +g:ale_typescript_tslint_rules_dir *g:ale_typescript_tslint_rules_dir* + *b:ale_typescript_tslint_rules_dir* + Type: |String| + Default: `''` + + If this variable is set, ALE will use it as the rules directory for tslint. + + +g:ale_typescript_tslint_use_global *g:ale_typescript_tslint_use_global* + *b:ale_typescript_tslint_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +tsserver *ale-typescript-tsserver* + +g:ale_typescript_tsserver_executable *g:ale_typescript_tsserver_executable* + *b:ale_typescript_tsserver_executable* + Type: |String| + Default: `'tsserver'` + + ALE will first discover the tsserver path in an ancestor node_modules + directory. If no such path exists, this variable will be used instead. + + If you wish to use only a globally installed version of tsserver, set + |g:ale_typescript_tsserver_use_global| to `1`. + + +g:ale_typescript_tsserver_config_path *g:ale_typescript_tsserver_config_path* + *b:ale_typescript_tsserver_config_path* + Type: |String| + Default: `''` + + ALE will first discover the tsserver.json path in an ancestor directory. If + no such path exists, this variable will be used instead. + + +g:ale_typescript_tsserver_use_global *g:ale_typescript_tsserver_use_global* + *b:ale_typescript_tsserver_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for a local path for + tsserver first. If this variable is set to `1`, then ALE will always use the + global version of tsserver, in preference to locally installed versions of + tsserver in node_modules. + + +=============================================================================== +xo *ale-typescript-xo* + +g:ale_typescript_xo_executable *g:ale_typescript_xo_executable* + *b:ale_typescript_xo_executable* + Type: |String| + Default: `'xo'` + + See |ale-integrations-local-executables| + + +g:ale_typescript_xo_options *g:ale_typescript_xo_options* + *b:ale_typescript_xo_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to xo. + + +g:ale_typescript_xo_use_global *g:ale_typescript_xo_use_global* + *b:ale_typescript_xo_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-v.txt b/dot_vim/plugged/ale/doc/ale-v.txt new file mode 100644 index 0000000..8c64144 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-v.txt @@ -0,0 +1,45 @@ +=============================================================================== +ALE V Integration *ale-v-options* + + +=============================================================================== +Integration Information + +`v` is V's build tool. `vfmt` (called as `v fmt` from the same +executable that does the builds) is the autoformatter/fixer. + +g:ale_v_v_executable *g:ale_v_v_executable* + *b:ale_v_v_executable* + + Type: |String| + Default: `'v'` + + The executable that will be run for the `v` linter and the `vfmt` fixer. + + +=============================================================================== +v *ale-v-v* + +g:ale_v_v_options *g:ale_v_v_options* + *b:ale_v_v_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the v linter. + They are injected directly after "v .". + + +=============================================================================== +vfmt *ale-v-vfmt* + +g:ale_v_vfmt_options *g:ale_v_vfmt_options* + *b:ale_v_vfmt_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the vfmt fixer. + They are injected directly after "v fmt". + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-vala.txt b/dot_vim/plugged/ale/doc/ale-vala.txt new file mode 100644 index 0000000..d48f68b --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-vala.txt @@ -0,0 +1,33 @@ +=============================================================================== +ALE VALA Integration *ale-vala-options* + + +=============================================================================== +uncrustify *ale-vala-uncrustify* + +See |ale-c-uncrustify| for information about the available options. + + +=============================================================================== +Vala-Lint *ale-vala-vala-lint* + +g:vala_vala_lint_executable *g:vala_vala_lint_executable* + *b:vala_vala_lint_executable* + Type: |String| + Default: `'io.elementary.vala-lint'` + + This variable can be set to specify a Vala-Lint executable file. + + +g:vala_vala_lint_config_filename *g:vala_vala_lint_config_filename* + *b:vala_vala_lint_config_filename* + Type: |String| + Default: `'vala-lint.conf'` + + This variable can be set to specify a Vala-Lint config filename. When a file + with the specified name was not found or this variable was set to empty, + Vala-Lint will be executed without specifying a config filename. + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-verilog.txt b/dot_vim/plugged/ale/doc/ale-verilog.txt new file mode 100644 index 0000000..611ed2f --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-verilog.txt @@ -0,0 +1,142 @@ +=============================================================================== +ALE Verilog/SystemVerilog Integration *ale-verilog-options* + + +=============================================================================== +ALE can use six different linters for Verilog HDL: + + HDL Checker + Using `hdl_checker --lsp` + + iverilog: + Using `iverilog -t null -Wall` + + verilator + Using `verilator --lint-only -Wall` + + ModelSim/Questa + Using `vlog -quiet -lint` + + Vivado + Using `xvlog` + + Yosys + Using `ysoys -Q -T -p 'read_verilog'` + +By default, both 'verilog' and 'systemverilog' filetypes are checked. + +You can limit 'systemverilog' files to be checked using only 'verilator' by +defining 'g:ale_linters' variable: +> + au FileType systemverilog + \ let g:ale_linters = {'systemverilog' : ['verilator'],} +< + +=============================================================================== +General notes + +Linters/compilers that utilize a "work" directory for analyzing designs- such +as ModelSim and Vivado- can be passed the location of these directories as +part of their respective option strings listed below. This is useful for +holistic analysis of a file (e.g. a design with components, packages, or other +code defined external to the current file as part of a larger project) or +when wanting to simply pass an alternative location for the auto-generated +work directories (such as '/tmp') so as to not muddle the current directory. +Since these type of linters often use this work directory for holding compiled +design data as part of a single build process, they sometimes cannot handle +the frequent, asynchronous application launches when linting while text is +changing. This can happen in the form of hangs or crashes. To help prevent +this when using these linters, it may help to run linting less frequently; for +example, only when a file is saved. + +HDL Checker is an alternative for some of the issues described above. It wraps +around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can +handle mixed language (VHDL, Verilog, SystemVerilog) designs. + +=============================================================================== +hdl-checker *ale-verilog-hdl-checker* + +See |ale-vhdl-hdl-checker| + + +=============================================================================== +iverilog *ale-verilog-iverilog* + + No additional options + + +=============================================================================== +verilator *ale-verilog-verilator* + +g:ale_verilog_verilator_options *g:ale_verilog_verilator_options* + *b:ale_verilog_verilator_options* + Type: |String| + Default: `''` + + This variable can be changed to modify 'verilator' command arguments + + For example `'-sv --default-language "1800-2012"'` if you want to enable + SystemVerilog parsing and select the 2012 version of the language. + + +=============================================================================== +vlog *ale-verilog-vlog* + +g:ale_verilog_vlog_executable *g:ale_verilog_vlog_executable* + *b:ale_verilog_vlog_executable* + Type: |String| + Default: `'vlog'` + + This variable can be changed to the path to the 'vlog' executable. + + +g:ale_verilog_vlog_options *g:ale_verilog_vlog_options* + *b:ale_verilog_vlog_options* + Type: |String| + Default: `'-quiet -lint'` + + This variable can be changed to modify the flags/options passed to 'vlog'. + + +=============================================================================== +xvlog *ale-verilog-xvlog* + +g:ale_verilog_xvlog_executable *g:ale_verilog_xvlog_executable* + *b:ale_verilog_xvlog_executable* + Type: |String| + Default: `'xvlog'` + + This variable can be changed to the path to the 'xvlog' executable. + + +g:ale_verilog_xvlog_options *g:ale_verilog_xvlog_options* + *b:ale_verilog_xvlog_options* + Type: |String| + Default: `''` + + This variable can be changed to modify the flags/options passed to 'xvlog'. + + +=============================================================================== +yosys *ale-verilog-yosys* + +g:ale_verilog_yosys_executable *g:ale_verilog_yosys_executable* + *b:ale_verilog_yosys_executable* + Type: |String| + Default: `'yosys'` + + This variable can be changed to the path to the 'yosys' executable. + + +g:ale_verilog_yosys_options *g:ale_verilog_yosys_options* + *b:ale_verilog_yosys_options* + Type: |String| + Default: `'-Q -T -p ''read_verilog %s'''` + + This variable can be changed to modify the flags/options passed to 'yosys'. + By default, Yosys is an interactive program. To obtain linting functionality, + the `'read_verilog'` command is used. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-vhdl.txt b/dot_vim/plugged/ale/doc/ale-vhdl.txt new file mode 100644 index 0000000..c287024 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-vhdl.txt @@ -0,0 +1,157 @@ +=============================================================================== +ALE VHDL Integration *ale-vhdl-options* + + +=============================================================================== +ALE can use four different linters for VHDL: + + ghdl: + Using `ghdl --std=08` + + ModelSim/Questa + Using `vcom -2008 -quiet -lint` + + Vivado + Using `xvhdl --2008` + + HDL Checker + Using `hdl_checker --lsp` + +=============================================================================== +General notes + +ghdl, ModelSim/Questa and Vivado linters default to VHDL-2008 support. This, +and other options, can be changed with each linter's respective option +variable. + +Linters/compilers that utilize a "work" directory for analyzing designs- such +as ModelSim and Vivado- can be passed the location of these directories as +part of their respective option strings listed below. This is useful for +holistic analysis of a file (e.g. a design with components, packages, or other +code defined external to the current file as part of a larger project) or +when wanting to simply pass an alternative location for the auto-generated +work directories (such as '/tmp') so as to not muddle the current directory. +Since these type of linters often use this work directory for holding compiled +design data as part of a single build process, they sometimes cannot handle +the frequent, asynchronous application launches when linting while text is +changing. This can happen in the form of hangs or crashes. To help prevent +this when using these linters, it may help to run linting less frequently; for +example, only when a file is saved. + +HDL Checker is an alternative for some of the issues described above. It wraps +around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can +handle mixed language (VHDL, Verilog, SystemVerilog) designs. + +=============================================================================== +ghdl *ale-vhdl-ghdl* + +g:ale_vhdl_ghdl_executable *g:ale_vhdl_ghdl_executable* + *b:ale_vhdl_ghdl_executable* + Type: |String| + Default: `'ghdl'` + + This variable can be changed to the path to the 'ghdl' executable. + + +g:ale_vhdl_ghdl_options *g:ale_vhdl_ghdl_options* + *b:ale_vhdl_ghdl_options* + Type: |String| + Default: `'--std=08'` + + This variable can be changed to modify the flags/options passed to 'ghdl'. + + +=============================================================================== +hdl-checker *ale-vhdl-hdl-checker* + +HDL Checker is a wrapper for VHDL/Verilg/SystemVerilog tools that aims to +reduce the boilerplate code needed to set things up. It can automatically +infer libraries for VHDL sources, determine the compilation order and provide +some static checks. + +You can install it using pip: +> + $ pip install hdl-checker + +`hdl-checker` will be run from a detected project root, determined by the +following methods, in order: + +1. Find the first directory containing a configuration file (see + |g:ale_hdl_checker_config_file|) +2. If no configuration file can be found, find the first directory containing + a folder named `'.git' +3. If no such folder is found, use the directory of the current buffer + + +g:ale_hdl_checker_executable + *g:ale_hdl_checker_executable* + *b:ale_hdl_checker_executable* + Type: |String| + Default: `'hdl_checker'` + + This variable can be changed to the path to the 'hdl_checker' executable. + + +g:ale_hdl_checker_options *g:ale_hdl_checker_options* + *b:ale_hdl_checker_options* + Type: |String| + Default: `''` + + This variable can be changed to modify the flags/options passed to the + 'hdl_checker' server startup command. + + +g:ale_hdl_checker_config_file *g:ale_hdl_checker_config_file* + *b:ale_hdl_checker_config_file* + Type: |String| + Default: `'.hdl_checker.config'` (Unix), + `'_hdl_checker.config'` (Windows) + + This variable can be changed to modify the config file HDL Checker will try + to look for. It will also affect how the project's root directory is + determined (see |ale-vhdl-hdl-checker|). + + More info on the configuration file format can be found at: + https://github.com/suoto/hdl_checker/wiki/Setting-up-a-project + + +=============================================================================== +vcom *ale-vhdl-vcom* + +g:ale_vhdl_vcom_executable *g:ale_vhdl_vcom_executable* + *b:ale_vhdl_vcom_executable* + Type: |String| + Default: `'vcom'` + + This variable can be changed to the path to the 'vcom' executable. + + +g:ale_vhdl_vcom_options *g:ale_vhdl_vcom_options* + *b:ale_vhdl_vcom_options* + Type: |String| + Default: `'-2008 -quiet -lint'` + + This variable can be changed to modify the flags/options passed to 'vcom'. + + +=============================================================================== +xvhdl *ale-vhdl-xvhdl* + +g:ale_vhdl_xvhdl_executable *g:ale_vhdl_xvhdl_executable* + *b:ale_vhdl_xvhdl_executable* + Type: |String| + Default: `'xvhdl'` + + This variable can be changed to the path to the 'xvhdl' executable. + + +g:ale_vhdl_xvhdl_options *g:ale_vhdl_xvhdl_options* + *b:ale_vhdl_xvhdl_options* + Type: |String| + Default: `'--2008'` + + This variable can be changed to modify the flags/options passed to 'xvhdl'. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-vim-help.txt b/dot_vim/plugged/ale/doc/ale-vim-help.txt new file mode 100644 index 0000000..3cbe20d --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-vim-help.txt @@ -0,0 +1,12 @@ +=============================================================================== +ALE Vim help Integration *ale-vim-help-options* + + +=============================================================================== +write-good *ale-vim-help-write-good* + +See |ale-write-good-options| + + +=============================================================================== +vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-vim.txt b/dot_vim/plugged/ale/doc/ale-vim.txt new file mode 100644 index 0000000..f85b43e --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-vim.txt @@ -0,0 +1,82 @@ +=============================================================================== +ALE Vim Integration *ale-vim-options* + + +=============================================================================== +vimls *ale-vim-vimls* + + The `vim-language-server` is the engine that powers VimL editor support + using the Language Server Protocol. See the installation instructions: + https://github.com/iamcco/vim-language-server#install + +g:ale_vim_vimls_executable *g:ale_vim_vimls_executable* + *b:ale_vim_vimls_executable* + Type: |String| + Default: `'vim-language-server'` + + This option can be set to change the executable path for vimls. + + +g:ale_vim_vimls_config *g:ale_vim_vimls_config* + *b:ale_vim_vimls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example: > + { + \ 'vim': { + \ 'iskeyword': '@,48-57,_,192-255,-#', + \ 'vimruntime': '', + \ 'runtimepath': '', + \ 'diagnostic': { + \ 'enable': v:true + \ }, + \ 'indexes': { + \ 'runtimepath': v:true, + \ 'gap': 100, + \ 'count': 3, + \ 'projectRootPatterns' : ['.git', 'autoload', 'plugin'] + \ }, + \ 'suggest': { + \ 'fromVimruntime': v:true, + \ 'fromRuntimepath': v:false + \ }, + \ } + \} +< + Consult the vim-language-server documentation for more information about + settings. + + +g:ale_vim_vimls_use_global *g:ale_vim_vimls_use_global* + *b:ale_vim_vimls_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +vint *ale-vim-vint* + +g:ale_vim_vint_executable *g:ale_vim_vint_executable* + *b:ale_vim_vint_executable* + Type: |String| + Default: `'vint'` + + This option can be set to change the executable path for Vint. + + +g:ale_vim_vint_show_style_issues *g:ale_vim_vint_show_style_issues* + *b:ale_vim_vint_show_style_issues* + Type: |Number| + Default: `1` + + This variable will enable/disable style issues for Vint. When this option + is disabled, only warnings and errors which are not purely style issues + will be reported. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-vue.txt b/dot_vim/plugged/ale/doc/ale-vue.txt new file mode 100644 index 0000000..40106b2 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-vue.txt @@ -0,0 +1,68 @@ +=============================================================================== +ALE Vue Integration *ale-vue-options* + + +=============================================================================== +cspell *ale-vue-cspell* + +See |ale-cspell-options| + + +=============================================================================== +prettier *ale-vue-prettier* + +See |ale-javascript-prettier| for information about the available options. + + +=============================================================================== +vls *ale-vue-vls* + +g:ale_vue_vls_executable *g:ale_vue_vls_executable* + *b:ale_vue_vls_executable* + Type: |String| + Default: `'vls'` + + See |ale-integrations-local-executables| + + +g:ale_vue_vls_use_global *g:ale_vue_vls_use_global* + *b:ale_vue_vls_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +volar *ale-vue-volar* + + It is required to have typescript installed in your project as your dev + dependency: `npm i -D typescript` + +g:ale_vue_volar_executable *g:ale_vue_volar_executable* + *b:ale_vue_volar_executable* + Type: |String| + Default: `'vue-language-server'` + + See |ale-integrations-local-executables| + + +g:ale_vue_volar_use_global *g:ale_vue_volar_use_global* + *b:ale_vue_volar_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:vue_volar_init_options *g:ale_vue_volar_init_options* + *b:ale_vue_volar_init_options* + Type: |Dictionary| + Default: `{ ... }` + + Default is too long to show here, take a look at it over + `ale_linters/vue/volar.vim` + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-wgsl.txt b/dot_vim/plugged/ale/doc/ale-wgsl.txt new file mode 100644 index 0000000..5254f43 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-wgsl.txt @@ -0,0 +1,17 @@ +=============================================================================== +ALE WGSL Integration *ale-wgsl-options* + + +=============================================================================== +naga *ale-wgsl-naga* + +g:ale_wgsl_naga_executable *g:ale_wgsl_naga_executable* + *b:ale_wgsl_naga_executable* + Type: |String| + Default: `'naga'` + + The executable that will be run for the `naga` linter. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-xhtml.txt b/dot_vim/plugged/ale/doc/ale-xhtml.txt new file mode 100644 index 0000000..10ca5b8 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-xhtml.txt @@ -0,0 +1,18 @@ +=============================================================================== +ALE XHTML Integration *ale-xhtml-options* + + +=============================================================================== +cspell *ale-xhtml-cspell* + +See |ale-cspell-options| + + +=============================================================================== +write-good *ale-xhtml-write-good* + +See |ale-write-good-options| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-xml.txt b/dot_vim/plugged/ale/doc/ale-xml.txt new file mode 100644 index 0000000..a7180df --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-xml.txt @@ -0,0 +1,34 @@ +=============================================================================== +ALE XML Integration *ale-xml-options* + + +=============================================================================== +xmllint *ale-xml-xmllint* + +g:ale_xml_xmllint_executable *g:ale_xml_xmllint_executable* + *b:ale_xml_xmllint_executable* + Type: |String| + Default: `'xmllint'` + + This variable can be set to change the path to xmllint. + + +g:ale_xml_xmllint_options *g:ale_xml_xmllint_options* + *b:ale_xml_xmllint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to xmllint. + + +g:ale_xml_xmllint_indentsize *g:ale_xml_xmllint_indentsize* + *b:ale_xml_xmllint_indentsize* + Type: |Number| + Default: `2` + + This variable can be sent to specify the amount of spaces used for + indentation. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-yaml.txt b/dot_vim/plugged/ale/doc/ale-yaml.txt new file mode 100644 index 0000000..b3450b8 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-yaml.txt @@ -0,0 +1,331 @@ +=============================================================================== +ALE YAML Integration *ale-yaml-options* + + +=============================================================================== +actionlint *ale-yaml-actionlint* + +Website: https://github.com/rhysd/actionlint + + +Installation +------------------------------------------------------------------------------- + +See installation guide: https://github.com/rhysd/actionlint#quick-start + +This linter is disabled by default and must be enabled by setting `g:ale_linters`. +To enable it only for Github Action YAML files a configuration like this is +better: + +> + au BufRead,BufNewFile */.github/*/*.y{,a}ml + \ let b:ale_linters = {'yaml': ['actionlint']} +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_actionlint_executable *g:ale_yaml_actionlint_executable* + *b:ale_yaml_actionlint_executable* + Type: |String| + Default: `'actionlint'` + + This variable can be set to change the path to actionlint. + +g:ale_yaml_actionlint_options *g:ale_yaml_actionlint_options* + *b:ale_yaml_actionlint_options* + + Type: |String| + Default: `''` + + This variable can be set to add extra options to actionlint executable. + + For example, to disable running `shellcheck` and `pyflakes` external commands, + you may want to set: +> + let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes=' +< + Please note that passing `-format` as option is not supported at the moment. + +=============================================================================== +circleci *ale-yaml-circleci* + +Website: https://circleci.com/docs/2.0/local-cli + + +Installation +------------------------------------------------------------------------------- + +Follow the instructions on the website, and make sure to test that you can +validate configuration files with: > + + circleci config validate - < .circleci/config.yml +< + +As long as the validator runs correctly, you should be able to see errors when +you save the configuration file. The validator doesn't run as you type because +it sends network requests, and running too often would overload the circleci +servers. + + +=============================================================================== +prettier *ale-yaml-prettier* + +Website: https://github.com/prettier/prettier + + +Installation +------------------------------------------------------------------------------- + +Install prettier either globally or locally: > + + npm install prettier -g # global + npm install prettier # local +< + +=============================================================================== +spectral *ale-yaml-spectral* + +Website: https://github.com/stoplightio/spectral + + +Installation +------------------------------------------------------------------------------- + +Install spectral either globally or locally: > + + npm install @stoplight/spectral -g # global + npm install @stoplight/spectral # local +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_spectral_executable *g:ale_yaml_spectral_executable* + *b:ale_yaml_spectral_executable* + Type: |String| + Default: `'spectral'` + + This variable can be set to change the path to spectral. + +g:ale_yaml_spectral_use_global *g:ale_yaml_spectral_use_global* + *b:ale_yaml_spectral_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +swaglint *ale-yaml-swaglint* + +Website: https://github.com/byCedric/swaglint + + +Installation +------------------------------------------------------------------------------- + +Install swaglint either globally or locally: > + + npm install swaglint -g # global + npm install swaglint # local +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_swaglint_executable *g:ale_yaml_swaglint_executable* + *b:ale_yaml_swaglint_executable* + Type: |String| + Default: `'swaglint'` + + This variable can be set to change the path to swaglint. + + +g:ale_yaml_swaglint_use_global *g:ale_yaml_swaglint_use_global* + *b:ale_yaml_swaglint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +yaml-language-server *ale-yaml-language-server* + +Website: https://github.com/redhat-developer/yaml-language-server + + +Installation +------------------------------------------------------------------------------- + +Install yaml-language-server either globally or locally: > + + npm install yaml-language-server -g # global + npm install yaml-language-server # local + + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_ls_executable *g:ale_yaml_ls_executable* + *b:ale_yaml_ls_executable* + Type: |String| + Default: `'yaml-language-server'` + + This variable can be set to change the path to yaml-language-server. + + +g:ale_yaml_ls_config *g:ale_yaml_ls_config* + *b:ale_yaml_ls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. For example, to enable schema store: > + { + \ 'yaml': { + \ 'schemaStore': { + \ 'enable': v:true, + \ }, + \ }, + \ } +< + Consult the yaml-language-server documentation for more information about + settings. + + +g:ale_yaml_ls_use_global *g:ale_yaml_ls_use_global* + *b:ale_yaml_ls_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +yamlfix *ale-yaml-yamlfix* + +Website: https://lyz-code.github.io/yamlfix + + +Installation +------------------------------------------------------------------------------- + +Install yamlfix: > + + pip install yamlfix +< + +Options +------------------------------------------------------------------------------- +g:ale_yaml_yamlfix_executable *g:ale_yaml_yamlfix_executable* + *b:ale_yaml_yamlfix_executable* + Type: |String| + Default: `'yamlfix'` + + See |ale-integrations-local-executables| + + +g:ale_yaml_yamlfix_options *g:ale_yaml_yamlfix_options* + *b:ale_yaml_yamlfix_options* + Type: |String| + Default: `''` + + This variable can be set to pass extra options to yamlfix. + +g:ale_yaml_yamlfix_use_global *g:ale_yaml_yamlfix_use_global* + *b:ale_yaml_yamlfix_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== +yamllint *ale-yaml-yamllint* + +Website: https://github.com/adrienverge/yamllint + + +Installation +------------------------------------------------------------------------------- + +Install yamllint in your a virtualenv directory, locally, or globally: > + + pip install yamllint # After activating virtualenv + pip install --user yamllint # Install to ~/.local/bin + sudo pip install yamllint # Install globally + +See |g:ale_virtualenv_dir_names| for configuring how ALE searches for +virtualenv directories. + + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_yamllint_executable *g:ale_yaml_yamllint_executable* + *b:ale_yaml_yamllint_executable* + Type: |String| + Default: `'yamllint'` + + This variable can be set to change the path to yamllint. + + +g:ale_yaml_yamllint_options *g:ale_yaml_yamllint_options* + *b:ale_yaml_yamllint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to yamllint. + + +=============================================================================== +gitlablint *ale-yaml-gitlablint* + +Website: https://github.com/elijah-roberts/gitlab-lint + + +Installation +------------------------------------------------------------------------------- + +Install yamllint in your a virtualenv directory, locally, or globally: > + + pip3 install gitlab_lint # After activating virtualenv + pip3 install --user gitlab_lint # Install to ~/.local/bin + sudo pip3 install gitlab_lint # Install globally + +See |g:ale_virtualenv_dir_names| for configuring how ALE searches for +virtualenv directories. + +Is recommended to use |g:ale_pattern_options| to enable this linter so it only +applies to 'gitlab-ci.yml' files and not all yaml files: +> + let g:ale_pattern_options = { + \ '.gitlab-ci\.yml$': { + \ 'ale_linters': ['gitlablint'], + \ }, + \} +< + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_gitlablint_executable *g:ale_yaml_gitlablint_executable* + *b:ale_yaml_gitlablint_executable* + Type: |String| + Default: `'gll'` + + This variable can be set to change the path to gll. + + +g:ale_yaml_gitlablint_options *g:ale_yaml_gitlablint_options* + *b:ale_yaml_gitlablint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to gll. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-yang.txt b/dot_vim/plugged/ale/doc/ale-yang.txt new file mode 100644 index 0000000..ad61973 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-yang.txt @@ -0,0 +1,17 @@ +=============================================================================== +ALE YANG Integration *ale-yang-options* + + +=============================================================================== +yang-lsp *ale-yang-lsp* + +g:ale_yang_lsp_executable *g:ale_yang_lsp_executable* + *b:ale_yang_lsp_executable* + Type: |String| + Default: `'yang-language-server'` + + This variable can be changed to use a different executable for yang-lsp. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale-zeek.txt b/dot_vim/plugged/ale/doc/ale-zeek.txt new file mode 100644 index 0000000..910bc06 --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-zeek.txt @@ -0,0 +1,23 @@ +=============================================================================== +ALE Zeek Integration *ale-zeek-options* + *ale-integration-zeek* + +=============================================================================== +Integration Information + + Currently, the only supported linter for Zeek is zeek. + +=============================================================================== +zeek *ale-zeek-zeek* + +g:ale_zeek_zeek_executable *g:ale_zeek_zeek_executable* + *b:ale_zeek_zeek_executable* + Type: |String| + Default: `'zeek'` + + This variable can be modified to change the executable path for `zeek`. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/dot_vim/plugged/ale/doc/ale-zig.txt b/dot_vim/plugged/ale/doc/ale-zig.txt new file mode 100644 index 0000000..cafa12a --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale-zig.txt @@ -0,0 +1,45 @@ +=============================================================================== +ALE Zig Integration *ale-zig-options* + *ale-integration-zig* + +=============================================================================== +Integration Information + + Currently, the only supported linter for zig is zls. + + +=============================================================================== +zigfmt *ale-zig-zigfmt* + +g:ale_zig_zigfmt_executable *g:ale_zig_zigfmt_executable* + *b:ale_zig_zigfmt_executable* + Type: |String| + Default: `'zig'` + + The executable that will be run for the `zig fmt` fixer. + + +=============================================================================== +zls *ale-zig-zls* + +g:ale_zig_zls_executable *g:ale_zig_zls_executable* + *b:ale_zig_zls_executable* + Type: |String| + Default: `'zls'` + + This variable can be modified to change the executable path for `zls`. + + +g:ale_zig_zls_config *g:ale_zig_zls_config* + *b:ale_zig_zls_config* + Type: |Dictionary| + Default: `{}` + + WARNING: As of writing, zls does not support receiving configuration + from the client. This variable is a PLACEHOLDER until it does. + + Dictionary with configuration settings for zls. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/ale.txt b/dot_vim/plugged/ale/doc/ale.txt new file mode 100644 index 0000000..949ceae --- /dev/null +++ b/dot_vim/plugged/ale/doc/ale.txt @@ -0,0 +1,4660 @@ +*ale.txt* Plugin to lint and fix files asynchronously +*ale* + +ALE - Asynchronous Lint Engine + +=============================================================================== +CONTENTS *ale-contents* + + 1. Introduction.........................|ale-introduction| + 2. Supported Languages & Tools..........|ale-support| + 3. Linting..............................|ale-lint| + 3.1 Linting On Other Machines.........|ale-lint-other-machines| + 3.2 Adding Language Servers...........|ale-lint-language-servers| + 3.3 Other Sources.....................|ale-lint-other-sources| + 4. Fixing Problems......................|ale-fix| + 5. Language Server Protocol Support.....|ale-lsp| + 5.1 Completion........................|ale-completion| + 5.2 Go To Definition..................|ale-go-to-definition| + 5.3 Go To Type Definition.............|ale-go-to-type-definition| + 5.4 Go To Implementation..............|ale-go-to-type-implementation| + 5.5 Find References...................|ale-find-references| + 5.6 Hovering..........................|ale-hover| + 5.7 Symbol Search.....................|ale-symbol-search| + 5.8 Refactoring: Rename, Actions......|ale-refactor| + 6. Global Options.......................|ale-options| + 6.1 Highlights........................|ale-highlights| + 7. Linter/Fixer Options.................|ale-integration-options| + 7.1 Options for alex..................|ale-alex-options| + 7.2 Options for cspell................|ale-cspell-options| + 7.3 Options for languagetool..........|ale-languagetool-options| + 7.4 Options for write-good............|ale-write-good-options| + 7.5 Other Linter/Fixer Options........|ale-other-integration-options| + 8. Commands/Keybinds....................|ale-commands| + 9. API..................................|ale-api| + 10. Special Thanks......................|ale-special-thanks| + 11. Contact.............................|ale-contact| + +=============================================================================== +1. Introduction *ale-introduction* + +ALE provides the means to run linters asynchronously in Vim in a variety of +languages and tools. ALE sends the contents of buffers to linter programs +using the |job-control| features available in Vim 8 and NeoVim. For Vim 8, +Vim must be compiled with the |job| and |channel| and |timers| features +as a minimum. + +ALE supports the following key features for linting: + +1. Running linters when text is changed. +2. Running linters when files are opened. +3. Running linters when files are saved. (When a global flag is set.) +4. Populating the |loclist| with warning and errors. +5. Setting |signs| with warnings and errors for error markers. +6. Using |echo| to show error messages when the cursor moves. +7. Setting syntax highlights for errors. + +ALE can fix problems with files with the |ALEFix| command, using the same job +control functionality used for checking for problems. Try using the +|ALEFixSuggest| command for browsing tools that can be used to fix problems +for the current buffer. + +If you are interested in contributing to the development of ALE, read the +developer documentation. See |ale-development| + +=============================================================================== +2. Supported Languages & Tools *ale-support* + +ALE supports a wide variety of languages and tools. See |ale-supported-list| +for the full list. + +=============================================================================== +3. Linting *ale-lint* + +ALE's primary focus is on checking for problems with your code with various +programs via some Vim code for integrating with those programs, referred to +as 'linters.' ALE supports a wide array of programs for linting by default, +but additional programs can be added easily by defining files in |runtimepath| +with the filename pattern `ale_linters//.vim`. For more +information on defining new linters, see the extensive documentation +for |ale#linter#Define()|. + +Without any configuration, ALE will attempt to check all of the code for every +file you open in Vim with all available tools by default. To see what ALE +is doing, and what options have been set, try using the |:ALEInfo| command. + +Most of the linters ALE runs will check the Vim buffer you are editing instead +of the file on disk. This allows you to check your code for errors before you +have even saved your changes. ALE will check your code in the following +circumstances, which can be configured with the associated options. + +* When you modify a buffer. - |g:ale_lint_on_text_changed| +* On leaving insert mode. - |g:ale_lint_on_insert_leave| +* When you open a new or modified buffer. - |g:ale_lint_on_enter| +* When you save a buffer. - |g:ale_lint_on_save| +* When the filetype changes for a buffer. - |g:ale_lint_on_filetype_changed| +* If ALE is used to check code manually. - |:ALELint| + + *ale-lint-settings-on-startup* + +It is worth reading the documentation for every option. You should configure +which events ALE will use before ALE is loaded, so it can optimize which +autocmd commands to run. You can force autocmd commands to be reloaded with +`:ALEDisable | ALEEnable` + +This also applies to the autocmd commands used for |g:ale_echo_cursor|. + + *ale-lint-file-linters* + +Some programs must be run against files which have been saved to disk, and +simply do not support reading temporary files or stdin, either of which are +required for ALE to be able to check for errors as you type. The programs +which behave this way are documented in the lists and tables of supported +programs. ALE will only lint files with these programs in the following +circumstances. + +* When you open a new or modified buffer. - |g:ale_lint_on_enter| +* When you save a buffer. - |g:ale_lint_on_save| +* When the filetype changes for a buffer. - |g:ale_lint_on_filetype_changed| +* If ALE is used to check code manually. - |:ALELint| + +ALE will report problems with your code in the following ways, listed with +their relevant options. + +* By updating loclist. (On by default) - |g:ale_set_loclist| +* By updating quickfix. (Off by default) - |g:ale_set_quickfix| +* By setting error highlights. - |g:ale_set_highlights| +* By creating signs in the sign column. - |g:ale_set_signs| +* By echoing messages based on your cursor. - |g:ale_echo_cursor| +* By inline text based on your cursor. - |g:ale_virtualtext_cursor| +* By displaying the preview based on your cursor. - |g:ale_cursor_detail| +* By showing balloons for your mouse cursor - |g:ale_set_balloons| + +Please consult the documentation for each option, which can reveal some other +ways of tweaking the behavior of each way of displaying problems. You can +disable or enable whichever options you prefer. + +Most settings can be configured for each buffer. (|b:| instead of |g:|), +including disabling ALE for certain buffers with |b:ale_enabled|. The +|g:ale_pattern_options| setting can be used to configure files differently +based on regular expressions for filenames. For configuring entire projects, +the buffer-local options can be used with external plugins for reading Vim +project configuration files. Buffer-local settings can also be used in +ftplugin files for different filetypes. + +ALE offers several options for controlling which linters are run. + +* Selecting linters to run. - |g:ale_linters| +* Aliasing filetypes for linters - |g:ale_linter_aliases| +* Only running linters you asked for. - |g:ale_linters_explicit| +* Disabling only a subset of linters. - |g:ale_linters_ignore| +* Disabling LSP linters and `tsserver`. - |g:ale_disable_lsp| + +You can stop ALE any currently running linters with the |ALELintStop| command. +Any existing problems will be kept. + +------------------------------------------------------------------------------- +3.1 Linting On Other Machines *ale-lint-other-machines* + +ALE offers support for running linters or fixers on files you are editing +locally on other machines, so long as the other machine has access to the file +you are editing. This could be a linter or fixer run inside of a Docker image, +running in a virtual machine, running on a remote server, etc. + +In order to run tools on other machines, you will need to configure your tools +to run via scripts that execute commands on those machines, such as by setting +the ALE `_executable` options for those tools to a path for a script to run, +or by using |g:ale_command_wrapper| to specify a script to wrap all commands +that are run by ALE, before they are executed. For tools that ALE runs where +ALE looks for locally installed executables first, you may need to set the +`_use_global` options for those tools to `1`, or you can set +|g:ale_use_global_executables| to `1` before ALE is loaded to only use global +executables for all tools. + +In order for ALE to properly lint or fix files which are running on another +file system, you must provide ALE with |List|s of strings for mapping paths to +and from your local file system and the remote file system, such as the file +system of your Docker container. See |g:ale_filename_mappings| for all of the +different ways these filename mappings can be configured. + +For example, you might configure `pylint` to run via Docker by creating a +script like so. > + + #!/usr/bin/env bash + + exec docker run -i --rm -v "$(pwd):/data" cytopia/pylint "$@" +< + +You will run to run Docker commands with `-i` in order to read from stdin. + +With the above script in mind, you might configure ALE to lint your Python +project with `pylint` by providing the path to the script to execute, and +mappings which describe how to between the two file systems in your +`python.vim` |ftplugin| file, like so: > + + if expand('%:p') =~# '^/home/w0rp/git/test-pylint/' + let b:ale_linters = ['pylint'] + let b:ale_python_pylint_use_global = 1 + " This is the path to the script above. + let b:ale_python_pylint_executable = '/home/w0rp/git/test-pylint/pylint.sh' + " /data matches the path in Docker. + let b:ale_filename_mappings = { + \ 'pylint': [ + \ ['/home/w0rp/git/test-pylint', '/data'], + \ ], + \} + endif +< + +You might consider using a Vim plugin for loading Vim configuration files +specific to each project, if you have a lot of projects to manage. + + +------------------------------------------------------------------------------- +3.2 Adding Language Servers *ale-lint-language-servers* + +ALE comes with many default configurations for language servers, so they can +be detected and run automatically. ALE can connect to other language servers +by defining a new linter for a filetype. New linters can be defined in |vimrc|, +in plugin files, or `ale_linters` directories in |runtimepath|. + +See |ale-linter-loading-behavior| for more information on loading linters. + +A minimal configuration for a language server linter might look so. > + + call ale#linter#Define('filetype_here', { + \ 'name': 'any_name_you_want', + \ 'lsp': 'stdio', + \ 'executable': '/path/to/executable', + \ 'command': '%e run', + \ 'project_root': '/path/to/root_of_project', + \}) +< +For language servers that use a TCP or named pipe socket connection, you +should define the address to connect to instead. > + + call ale#linter#Define('filetype_here', { + \ 'name': 'any_name_you_want', + \ 'lsp': 'socket', + \ 'address': 'servername:1234', + \ 'project_root': '/path/to/root_of_project', + \}) +< + Most of the options for a language server can be replaced with a |Funcref| + for a function accepting a buffer number for dynamically computing values + such as the executable path, the project path, the server address, etc, + most of which can also be determined based on executing some other + asynchronous task. See |ale#command#Run()| for computing linter options + based on asynchronous results. + + See |ale#linter#Define()| for a detailed explanation of all of the options + for configuring linters. + + +------------------------------------------------------------------------------- +3.3 Other Sources *ale-lint-other-sources* + +Problems for a buffer can be taken from other sources and rendered by ALE. +This allows ALE to be used in combination with other plugins which also want +to display any problems they might find with a buffer. ALE's API includes the +following components for making this possible. + +* |ale#other_source#StartChecking()| - Tell ALE that a buffer is being checked. +* |ale#other_source#ShowResults()| - Show results from another source. +* |ALEWantResults| - A signal for when ALE wants results. + +Other resources can provide results for ALE to display at any time, following +ALE's loclist format. (See |ale-loclist-format|) For example: > + + " Tell ALE to show some results. + " This function can be called at any time. + call ale#other_source#ShowResults(bufnr(''), 'some-linter-name', [ + \ {'text': 'Something went wrong', 'lnum': 13}, + \]) +< + +Other sources should use a unique name for identifying themselves. A single +linter name can be used for all problems from another source, or a series of +unique linter names can be used. Results can be cleared for that source by +providing an empty List. + +|ale#other_source#StartChecking()| should be called whenever another source +starts checking a buffer, so other tools can know that a buffer is being +checked by some plugin. The |ALEWantResults| autocmd event can be used to +start checking a buffer for problems every time that ALE does. When +|ALEWantResults| is signaled, |g:ale_want_results_buffer| will be set to the +number of the buffer that ALE wants to check. +|ale#other_source#StartChecking()| should be called synchronously, and other +sources should perform their checks on a buffer in the background +asynchronously, so they don't interrupt editing. + +|ale#other_source#ShowResults()| must not be called synchronously before +ALE's engine executes its code after the |ALEWantResults| event runs. If +there are immediate results to provide to ALE, a 0 millisecond timer with +|timer_start()| can be set instead up to call |ale#other_source#ShowResults()| +after ALE has first executed its engine code for its own sources. + +A plugin might integrate its own checks with ALE like so: > + + augroup SomeGroupName + autocmd! + autocmd User ALEWantResults call Hook(g:ale_want_results_buffer) + augroup END + + function! DoBackgroundWork(buffer) abort + " Start some work in the background here. + " ... + " Then call WorkDone(a:buffer, results) + endfunction + + function! Hook(buffer) abort + " Tell ALE we're going to check this buffer. + call ale#other_source#StartChecking(a:buffer, 'some-name') + call DoBackgroundWork(a:buffer) + endfunction + + function! WorkDone(buffer, results) abort + " Send results to ALE after they have been collected. + call ale#other_source#ShowResults(a:buffer, 'some-name', a:results) + endfunction +< + +=============================================================================== +4. Fixing Problems *ale-fix* + +ALE can fix problems with files with the |ALEFix| command. |ALEFix| +accepts names of fixers to be applied as arguments. Alternatively, +when no arguments are provided, the variable |g:ale_fixers| will be +read for getting a |List| of commands for filetypes, split on `.`, and +the functions named in |g:ale_fixers| will be executed for fixing the +errors. + +The |ALEFixSuggest| command can be used to suggest tools that be used to +fix problems for the current buffer. + +The values for `g:ale_fixers` can be a list of |String|, |Funcref|, or +|lambda| values. String values must either name a function, or a short name +for a function set in the ALE fixer registry. + +Each function for fixing errors must accept either one argument `(buffer)` or +two arguments `(buffer, lines)`, representing the buffer being fixed and the +lines to fix. The functions must return either `0`, for changing nothing, a +|List| for new lines to set, a |Dictionary| for describing a command to be +run in the background, or the result of |ale#command#Run()|. + +Functions receiving a variable number of arguments will not receive the second +argument `lines`. Functions should name two arguments if the `lines` argument +is desired. This is required to avoid unnecessary copying of the lines of +the buffers being checked. + +When a |Dictionary| is returned for an |ALEFix| callback, the following keys +are supported for running the commands. + + `cwd` An optional |String| for setting the working directory + for the command. + + If not set, or `v:null`, the `cwd` of the last command + that spawn this one will be used. + + `command` A |String| for the command to run. This key is required. + + When `%t` is included in a command string, a temporary + file will be created, containing the lines from the file + after previous adjustment have been done. + + See |ale-command-format-strings| for formatting options. + + `read_temporary_file` When set to `1`, ALE will read the contents of the + temporary file created for `%t`. This option can be used + for commands which need to modify some file on disk in + order to fix files. + + `process_with` An optional callback for post-processing. + + The callback must accept arguments `(bufnr, output)`: + the buffer number undergoing fixing and the fixer's + output as a |List| of |String|s. It must return a |List| + of |String|s that will be the new contents of the + buffer. + + This callback is useful to remove excess lines from the + command's output or apply additional changes to the + output. + + + `read_buffer` An optional key for disabling reading the buffer. + + When set to `0`, ALE will not pipe the buffer's data + into the command via stdin. This option is ignored and + the buffer is not read when `read_temporary_file` is + `1`. + + This option defaults to `1`. + + *ale-fix-configuration* + +Synchronous functions and asynchronous jobs will be run in a sequence for +fixing files, and can be combined. For example: +> + let g:ale_fixers = { + \ 'javascript': [ + \ 'DoSomething', + \ 'eslint', + \ {buffer, lines -> filter(lines, 'v:val !=~ ''^\s*//''')}, + \ ], + \} + + ALEFix +< +The above example will call a function called `DoSomething` which could act +upon some lines immediately, then run `eslint` from the ALE registry, and +then call a lambda function which will remove every single line comment +from the file. + +For buffer-local settings, such as in |g:ale_pattern_options| or in ftplugin +files, a |List| may be used for configuring the fixers instead. +> + " Same as the above, only a List can be used instead of a Dictionary. + let b:ale_fixers = [ + \ 'DoSomething', + \ 'eslint', + \ {buffer, lines -> filter(lines, 'v:val !=~ ''^\s*//''')}, + \] + + ALEFix +< +For convenience, a plug mapping is defined for |ALEFix|, so you can set up a +keybind easily for fixing files. > + + " Bind F8 to fixing problems with ALE + nmap (ale_fix) +< +Files can be fixed automatically with the following options, which are all off +by default. + +|g:ale_fix_on_save| - Fix files when they are saved. + +Fixers can be disabled on save with |g:ale_fix_on_save_ignore|. They will +still be run when you manually run |ALEFix|. + +Fixers can be run on another machines, just like linters, such as fixers run +from a Docker container, running in a virtual machine, running a remote +server, etc. See |ale-lint-other-machines|. + + +=============================================================================== +5. Language Server Protocol Support *ale-lsp* + +ALE offers some support for integrating with Language Server Protocol (LSP) +servers. LSP linters can be used in combination with any other linter, and +will automatically connect to LSP servers when needed. ALE also supports +`tsserver` for TypeScript, which uses a different but very similar protocol. + +If you want to use another plugin for LSP features and tsserver, you can use +the |g:ale_disable_lsp| setting to disable ALE's own LSP integrations, or +ignore particular linters with |g:ale_linters_ignore|. + +------------------------------------------------------------------------------- +5.1 Completion *ale-completion* + +ALE offers support for automatic completion of code while you type. +Completion is only supported while at least one LSP linter is enabled. ALE +will only suggest symbols provided by the LSP servers. + + *ale-deoplete-integration* + +ALE integrates with Deoplete for offering automatic completion data. ALE's +completion source for Deoplete is named `'ale'`, and should enabled +automatically if Deoplete is enabled and configured correctly. Deoplete +integration should not be combined with ALE's own implementation. + + *ale-asyncomplete-integration* + +ALE additionally integrates with asyncomplete.vim for offering automatic +completion data. ALE's asyncomplete source requires registration and should +use the defaults provided by the |asyncomplete#sources#ale#get_source_options| function > + + " Use ALE's function for asyncomplete defaults + au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#ale#get_source_options({ + \ 'priority': 10, " Provide your own overrides here + \ })) +> +ALE also offers its own completion implementation, which does not require any +other plugins. Suggestions will be made while you type after completion is +enabled. ALE's own completion implementation can be enabled by setting +|g:ale_completion_enabled| to `1`. This setting must be set to `1` before ALE +is loaded. The delay for completion can be configured with +|g:ale_completion_delay|. This setting should not be enabled if you wish to +use ALE as a completion source for other plugins. + +ALE automatic completion will not work when 'paste' is active. Only set +'paste' when you are copy and pasting text into your buffers. + +ALE automatic completion will interfere with default insert completion with +`CTRL-N` and so on (|compl-vim|). You can write your own keybinds and a +function in your |vimrc| file to force insert completion instead, like so: > + + function! SmartInsertCompletion() abort + " Use the default CTRL-N in completion menus + if pumvisible() + return "\" + endif + + " Exit and re-enter insert mode, and use insert completion + return "\a\" + endfunction + + inoremap =SmartInsertCompletion() +< +ALE provides an 'omnifunc' function |ale#completion#OmniFunc| for triggering +completion manually with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| > + + " Use ALE's function for omnicompletion. + set omnifunc=ale#completion#OmniFunc +< + *ale-completion-fallback* + +You can write your own completion function and fallback on other methods of +completion by checking if there are no results that ALE can determine. For +example, for Python code, you could fall back on the `python3complete` +function. > + + function! TestCompletionFunc(findstart, base) abort + let l:result = ale#completion#OmniFunc(a:findstart, a:base) + + " Check if ALE couldn't find anything. + if (a:findstart && l:result is -3) + \|| (!a:findstart && empty(l:result)) + " Defer to another omnifunc if ALE couldn't find anything. + return python3complete#Complete(a:findstart, a:base) + endif + + return l:result + endfunction + + set omnifunc=TestCompletionFunc +< +See |complete-functions| for documentation on how to write completion +functions. + +ALE will only suggest so many possible matches for completion. The maximum +number of items can be controlled with |g:ale_completion_max_suggestions|. + +If you don't like some of the suggestions you see, you can filter them out +with |g:ale_completion_excluded_words| or |b:ale_completion_excluded_words|. + +The |ALEComplete| command can be used to show completion suggestions manually, +even when |g:ale_completion_enabled| is set to `0`. For manually requesting +completion information with Deoplete, consult Deoplete's documentation. + +ALE supports automatic imports from external modules. This behavior can be +disabled by setting the |g:ale_completion_autoimport| variable to `0`. +Disabling automatic imports can drop some or all completion items from +some LSP servers (e.g. eclipselsp). + +You can manually request imports for symbols at the cursor with the +|ALEImport| command. The word at the cursor must be an exact match for some +potential completion result which includes additional text to insert into the +current buffer, which ALE will assume is code for an import line. This command +can be useful when your code already contains something you need to import. + +You can execute other commands whenever ALE inserts some completion text with +the |ALECompletePost| event. + +When working with TypeScript files, ALE can remove warnings from your +completions by setting the |g:ale_completion_tsserver_remove_warnings| +variable to 1. + + *ale-completion-completeopt-bug* + +ALE Automatic completion implementation replaces |completeopt| before opening +the omnicomplete menu with . In some versions of Vim, the value set +for the option will not be respected. If you experience issues with Vim +automatically inserting text while you type, set the following option in +vimrc, and your issues should go away. > + + set completeopt=menu,menuone,preview,noselect,noinsert +< +Or alternatively, if you want to show documentation in popups: > + + set completeopt=menu,menuone,popup,noselect,noinsert +< + *ale-symbols* + +ALE provides a set of basic completion symbols. If you want to replace those +symbols with others, you can set the variable |g:ale_completion_symbols| with +a mapping of the type of completion to the symbol or other string that you +would like to use. An example here shows the available options for symbols > + + let g:ale_completion_symbols = { + \ 'text': '', + \ 'method': '', + \ 'function': '', + \ 'constructor': '', + \ 'field': 'ï‚­', + \ 'variable': 'ï„¡', + \ 'class': '', + \ 'interface': '', + \ 'module': '', + \ 'property': 'ï‚­', + \ 'unit': 'unit', + \ 'value': 'val', + \ 'enum': '', + \ 'keyword': 'keyword', + \ 'snippet': '', + \ 'color': 'color', + \ 'file': '', + \ 'reference': 'ref', + \ 'folder': 'î—¿', + \ 'enum member': '', + \ 'constant': 'ï„¡', + \ 'struct': '', + \ 'event': 'event', + \ 'operator': 'ï‚­', + \ 'type_parameter': 'type param', + \ '': 'v' + \ } +< +------------------------------------------------------------------------------- +5.2 Go To Definition *ale-go-to-definition* + +ALE supports jumping to the files and locations where symbols are defined +through any enabled LSP linters. The locations ALE will jump to depend on the +information returned by LSP servers. The |ALEGoToDefinition| command will jump +to the definition of symbols under the cursor. See the documentation for the +command for configuring how the location will be displayed. + +ALE will update Vim's |tagstack| automatically unless |g:ale_update_tagstack| is +set to `0`. + +------------------------------------------------------------------------------- +5.3 Go To Type Definition *ale-go-to-type-definition* + +ALE supports jumping to the files and locations where symbols' types are +defined through any enabled LSP linters. The locations ALE will jump to depend +on the information returned by LSP servers. The |ALEGoToTypeDefinition| +command will jump to the definition of symbols under the cursor. See the +documentation for the command for configuring how the location will be +displayed. + +------------------------------------------------------------------------------- +5.4 Go To Implementation *ale-go-to-implementation* + +ALE supports jumping to the files and locations where symbols are implemented +through any enabled LSP linters. The locations ALE will jump to depend on the +information returned by LSP servers. The |ALEGoToImplementation| command will +jump to the implementation of symbols under the cursor. See the documentation +for the command for configuring how the location will be displayed. + +------------------------------------------------------------------------------- +5.5 Find References *ale-find-references* + +ALE supports finding references for symbols though any enabled LSP linters +with the |ALEFindReferences| command. See the documentation for the command +for a full list of options. + +------------------------------------------------------------------------------- +5.6 Hovering *ale-hover* + +ALE supports "hover" information for printing brief information about symbols +at the cursor taken from LSP linters. The following commands are supported: + +|ALEHover| - Print information about the symbol at the cursor. + +Truncated information will be displayed when the cursor rests on a symbol by +default, as long as there are no problems on the same line. You can disable +this behavior by setting |g:ale_hover_cursor| to `0`. + +If |g:ale_set_balloons| is set to `1` and your version of Vim supports the +|balloon_show()| function, then "hover" information also show up when you move +the mouse over a symbol in a buffer. Diagnostic information will take priority +over hover information for balloons. If a line contains a problem, that +problem will be displayed in a balloon instead of hover information. + +Hover information can be displayed in the preview window instead by setting +|g:ale_hover_to_preview| to `1`. + +When using Neovim or Vim with |popupwin|, if |g:ale_hover_to_floating_preview| +or |g:ale_floating_preview| is set to 1, the hover information will show in a +floating window. The borders of the floating preview window can be customized +by setting |g:ale_floating_window_border|. + +For Vim 8.1+ terminals, mouse hovering is disabled by default. Enabling +|balloonexpr| commands in terminals can cause scrolling issues in terminals, +so ALE will not attempt to show balloons unless |g:ale_set_balloons| is set to +`1` before ALE is loaded. + +For enabling mouse support in terminals, you may have to change your mouse +settings. For example: > + + " Example mouse settings. + " You will need to try different settings, depending on your terminal. + set mouse=a + set ttymouse=xterm +< + +Documentation for symbols at the cursor can be retrieved using the +|ALEDocumentation| command. This command is only available for `tsserver`. + +------------------------------------------------------------------------------- +5.7 Symbol Search *ale-symbol-search* + +ALE supports searching for workspace symbols via LSP linters with the +|ALESymbolSearch| command. See the documentation for the command +for a full list of options. + +------------------------------------------------------------------------------- +5.8 Refactoring: Rename, Actions *ale-refactor* + +ALE supports renaming symbols in code such as variables or class names with +the |ALERename| command. + +`ALEFileRename` will rename file and fix import paths (tsserver only). + +|ALECodeAction| will execute actions on the cursor or applied to a visual +range selection, such as automatically fixing errors. + +Actions will appear in the right click mouse menu by default for GUI versions +of Vim, unless disabled by setting |g:ale_popup_menu_enabled| to `0`. + +Make sure to set your Vim to move the cursor position whenever you right +click, and enable the mouse menu: > + + set mouse=a + set mousemodel=popup_setpos +< +You may wish to remove some other menu items you don't want to see: > + + silent! aunmenu PopUp.Select\ Word + silent! aunmenu PopUp.Select\ Sentence + silent! aunmenu PopUp.Select\ Paragraph + silent! aunmenu PopUp.Select\ Line + silent! aunmenu PopUp.Select\ Block + silent! aunmenu PopUp.Select\ Blockwise + silent! aunmenu PopUp.Select\ All +< +=============================================================================== +6. Global Options *ale-options* + +g:airline#extensions#ale#enabled *g:airline#extensions#ale#enabled* + + Type: |Number| + Default: `1` + + Enables or disables the |airline|'s native extension for ale, which displays + warnings and errors in the status line, prefixed by + |airline#extensions#ale#error_symbol| and + |airline#extensions#ale#warning_symbol|. + + +g:ale_cache_executable_check_failures *g:ale_cache_executable_check_failures* + + Type: |Number| + Default: not set + + When set to `1`, ALE will cache failing executable checks for linters. By + default, only executable checks which succeed will be cached. + + When this option is set to `1`, Vim will have to be restarted after new + executables are installed for ALE to be able to run linters for those + executables. + + +g:ale_change_sign_column_color *g:ale_change_sign_column_color* + + Type: |Number| + Default: `0` + + When set to `1`, this option will set different highlights for the sign + column itself when ALE reports problems with a file. This option can be + combined with |g:ale_sign_column_always|. + + ALE uses the following highlight groups for highlighting the sign column: + + `ALESignColumnWithErrors` - Links to `error` by default. + `ALESignColumnWithoutErrors` - Uses the value for `SignColumn` by default. + + The sign column color can only be changed globally in Vim. The sign column + might produce unexpected results if editing different files in split + windows. + + +g:ale_close_preview_on_insert *g:ale_close_preview_on_insert* + + Type: |Number| + Default: `0` + + When this option is set to `1`, ALE's |preview-window| will be automatically + closed upon entering Insert Mode. This option can be used in combination + with |g:ale_cursor_detail| for automatically displaying the preview window + on problem lines, and automatically closing it again when editing text. + + This setting must be set to `1` before ALE is loaded for this behavior + to be enabled. See |ale-lint-settings-on-startup|. + + +g:ale_command_wrapper *g:ale_command_wrapper* + *b:ale_command_wrapper* + Type: |String| + Default: `''` + + An option for wrapping all commands that ALE runs, for linters, fixers, + and LSP commands. This option can be set globally, or for specific buffers. + + This option can be used to apply nice to all commands. For example: > + + " Prefix all commands with nice. + let g:ale_command_wrapper = 'nice -n5' +< + Use the |ALEInfo| command to view the commands that are run. All of the + arguments for commands will be put on the end of the wrapped command by + default. A `%*` marker can be used to spread the arguments in the wrapped + command. > + + " Has the same effect as the above. + let g:ale_command_wrapper = 'nice -n5 %*' +< + + For passing all of the arguments for a command as one argument to a wrapper, + `%@` can be used instead. > + + " Will result in say: /bin/bash -c 'other-wrapper -c "some command" -x' + let g:ale_command_wrapper = 'other-wrapper -c %@ -x' +< + For commands including `&&` or `;`, only the last command in the list will + be passed to the wrapper. `&&` is most commonly used in ALE to change the + working directory before running a command. + + +g:ale_completion_delay *g:ale_completion_delay* + + Type: |Number| + Default: `100` + + The number of milliseconds before ALE will send a request to a language + server for completions after you have finished typing. + + See |ale-completion| + + +g:ale_completion_enabled *g:ale_completion_enabled* + *b:ale_completion_enabled* + + Type: |Number| + Default: `0` + + When this option is set to `1`, completion support will be enabled. + + This setting must be set to `1` before ALE is loaded for this behavior + to be enabled. + + This setting should not be enabled if you wish to use ALE as a completion + source for other completion plugins. + + ALE automatic completion will not work when 'paste' is active. Only set + 'paste' when you are copy and pasting text into your buffers. + + A buffer-local version of this setting `b:ale_completion_enabled` can be set + to `0` to disable ALE's automatic completion support for a single buffer. + ALE's completion support must be enabled globally to be enabled locally. + + See |ale-completion| + + + *g:ale_completion_tsserver_remove_warnings* +g:ale_completion_tsserver_remove_warnings + + Type: |Number| + Default: `0` + + When this option is set to `0`, ALE will return all completion items, + including those that are a warning. Warnings can be excluded from completed + items by setting it to `1`. + + +g:ale_completion_autoimport *g:ale_completion_autoimport* + + Type: |Number| + Default: `1` + + When this option is set to `1`, ALE will try to automatically import + completion results from external modules. It can be disabled by setting it + to `0`. Some LSP servers include auto imports on every completion item so + disabling automatic imports may drop some or all completion items returnend + by it (e.g. eclipselsp). + + +g:ale_completion_excluded_words *g:ale_completion_excluded_words* + *b:ale_completion_excluded_words* + Type: |List| + Default: `[]` + + This option can be set to a list of |String| values for "words" to exclude + from completion results, as in the words for |complete-items|. The strings + will be matched exactly in a case-sensitive manner. (|==#|) + + This setting can be configured in ftplugin files with buffer variables, so + that different lists can be used for different filetypes. For example: > + + " In ~/.vim/ftplugin/typescript.vim + + " Don't suggest `it` or `describe` so we can use snippets for those words. + let b:ale_completion_excluded_words = ['it', 'describe'] +< + +g:ale_completion_symbols *g:ale_completion_symbols* + + Type: |Dictionary| + + + A mapping from completion types to symbols for completions. See + |ale-symbols| for more information. + + By default, this mapping only uses built in Vim completion kinds, but it can + be updated to use any unicode character for the completion kind. For + example: > + let g:ale_completion_symbols = { + \ 'text': '', + \ 'method': '', + \ 'function': '', + \ 'constructor': '', + \ 'field': 'ï‚­', + \ 'variable': 'ï„¡', + \ 'class': '', + \ 'interface': '', + \ 'module': '', + \ 'property': 'ï‚­', + \ 'unit': 'v', + \ 'value': 'v', + \ 'enum': 't', + \ 'keyword': 'v', + \ 'snippet': 'v', + \ 'color': 'v', + \ 'file': 'v', + \ 'reference': 'v', + \ 'folder': 'v', + \ 'enum_member': 'm', + \ 'constant': 'm', + \ 'struct': 't', + \ 'event': 'v', + \ 'operator': 'f', + \ 'type_parameter': 'p', + \ '': 'v' + \ }) +< + +g:ale_completion_max_suggestions *g:ale_completion_max_suggestions* + + Type: |Number| + Default: `50` + + The maximum number of items ALE will suggest in completion menus for + automatic completion. + + Setting this number higher will require more processing time, and may + suggest too much noise. Setting this number lower will require less + processing time, but some suggestions will not be included, so you might not + be able to see the suggestions you want. + + Adjust this option as needed, depending on the complexity of your codebase + and your available processing power. + +g:ale_cursor_detail *g:ale_cursor_detail* + + Type: |Number| + Default: `0` + + When this option is set to `1`, ALE's |preview-window| will be automatically + opened when the cursor moves onto lines with problems. ALE will search for + problems using the same logic that |g:ale_echo_cursor| uses. The preview + window will be closed automatically when you move away from the line. + + Messages are only displayed after a short delay. See |g:ale_echo_delay|. + + The preview window is opened without stealing focus, which means your cursor + will stay in the same buffer as it currently is. + + The preview window can be closed automatically upon entering Insert mode + by setting |g:ale_close_preview_on_insert| to `1`. + + Either this setting or |g:ale_echo_cursor| must be set to `1` before ALE is + loaded for messages to be displayed. See |ale-lint-settings-on-startup|. + + +g:ale_default_navigation *g:ale_default_navigation* + *b:ale_default_navigation* + + Type: |String| + Default: `'buffer'` + + The default method for navigating away from the current buffer to another + buffer, such as for |ALEFindReferences|, or |ALEGoToDefinition|. + + +g:ale_detail_to_floating_preview *g:ale_detail_to_floating_preview* + *b:ale_detail_to_floating_preview* + Type: |Number| + Default: `0` + + When this option is set to `1`, Neovim or Vim with |popupwin| will use a + floating window for ALEDetail output. + + +g:ale_disable_lsp *g:ale_disable_lsp* + *b:ale_disable_lsp* + + Type: |Number| + Default: `0` + + When this option is set to `1`, ALE ignores all linters powered by LSP, + and also `tsserver`. + + Please see also |ale-lsp|. + + +g:ale_echo_cursor *g:ale_echo_cursor* + + Type: |Number| + Default: `1` + + When this option is set to `1`, a truncated message will be echoed when a + cursor is near a warning or error. ALE will attempt to find the warning or + error at a column nearest to the cursor when the cursor is resting on a line + which contains a warning or error. This option can be set to `0` to disable + this behavior. + + Messages are only displayed after a short delay. See |g:ale_echo_delay|. + + The format of the message can be customized with |g:ale_echo_msg_format|. + + Either this setting or |g:ale_cursor_detail| must be set to `1` before ALE + is loaded for messages to be displayed. See |ale-lint-settings-on-startup|. + + +g:ale_echo_delay *g:ale_echo_delay* + *b:ale_echo_delay* + Type: |Number| + Default: `10` + + Given any integer, this option controls the number of milliseconds before + ALE will echo or preview a message for a problem near the cursor. + + The value can be increased to decrease the amount of processing ALE will do + for files displaying a large number of problems. + + +g:ale_echo_msg_error_str *g:ale_echo_msg_error_str* + + Type: |String| + Default: `'Error'` + + The string used for `%severity%` for errors. See |g:ale_echo_msg_format| + + +g:ale_echo_msg_format *g:ale_echo_msg_format* + *b:ale_echo_msg_format* + + Type: |String| + Default: `'%code: %%s'` + + This variable defines a message format for echoed messages. The following + sequences of characters will be replaced. + + `%s` - replaced with the text for the problem + `%...code...% `- replaced with the error code + `%linter%` - replaced with the name of the linter + `%severity%` - replaced with the severity of the problem (e.g. `Error`) + `%type%` - replaced with the type of the problem (e.g. `E`) + + The strings for `%severity%` can be configured with the following options. + + |g:ale_echo_msg_error_str| - Defaults to `'Error'` + |g:ale_echo_msg_info_str| - Defaults to `'Info'` + |g:ale_echo_msg_warning_str| - Defaults to `'Warning'` + + `%code%` is replaced with the error code, and replaced with an empty string + when there is no error code. Any extra characters between the percent signs + will be printed when an error code is present. For example, a message like + `(error code): message` will be printed for `'%(code): %%s'` and simply the + message will be printed when there is no code. + + |g:ale_echo_cursor| needs to be set to 1 for messages to be displayed. + + The echo message format can also be configured separately for each buffer, + so different formats can be used for different languages. (Say in ftplugin + files.) + + +g:ale_echo_msg_info_str *g:ale_echo_msg_info_str* + + Type: |String| + Default: `'Info'` + + The string used for `%severity%` for info. See |g:ale_echo_msg_format| + + +g:ale_echo_msg_log_str *g:ale_echo_msg_log_str* + + Type: |String| + Default: `'Log'` + + The string used for `%severity%` for log, used only for handling LSP show + message requests. See |g:ale_lsp_show_message_format| + + +g:ale_echo_msg_warning_str *g:ale_echo_msg_warning_str* + + Type: |String| + Default: `'Warning'` + + The string used for `%severity%` for warnings. See |g:ale_echo_msg_format| + + +g:ale_enabled *g:ale_enabled* + *b:ale_enabled* + + Type: |Number| + Default: `1` + + When set to `0`, this option will completely disable ALE, such that no + error checking will be performed, etc. ALE can be toggled on and off with + the |ALEToggle| command, which changes this option. + + ALE can be disabled in each buffer by setting `let b:ale_enabled = 0` + Disabling ALE based on filename patterns can be accomplished by setting + a regular expression for |g:ale_pattern_options|. For example: > + + " Disable linting for all minified JS files. + let g:ale_pattern_options = {'\.min.js$': {'ale_enabled': 0}} +< + + See |g:ale_pattern_options| for more information on that option. + + +g:ale_exclude_highlights *g:ale_exclude_highlights* + *b:ale_exclude_highlights* + + Type: |List| + Default: `[]` + + A list of regular expressions for matching against highlight messages to + remove. For example: > + + " Do not highlight messages matching strings like these. + let b:ale_exclude_highlights = ['line too long', 'foo.*bar'] +< + See also: |g:ale_set_highlights| + + +g:ale_fixers *g:ale_fixers* + *b:ale_fixers* + + Type: |Dictionary| + Default: `{}` + + A mapping from filetypes to |List| values for functions for fixing errors. + See |ale-fix| for more information. + + This variable can be overridden with variables in each buffer. + `b:ale_fixers` can be set to a |List| of callbacks instead, which can be + more convenient. + + A special `'*'` key be used as a wildcard filetype for configuring fixers + for every other type of file. For example: > + + " Fix Python files with 'bar'. + " Don't fix 'html' files. + " Fix everything else with 'foo'. + let g:ale_fixers = {'python': ['bar'], 'html': [], '*': ['foo']} +< + +g:ale_fix_on_save *g:ale_fix_on_save* + *b:ale_fix_on_save* + + Type: |Number| + Default: `0` + + When set to 1, ALE will fix files when they are saved. + + If |g:ale_lint_on_save| is set to 1, files will be checked with linters + after files are fixed, only when the buffer is open, or re-opened. Changes + to the file will be saved to the file on disk. + + Files will not be fixed on `:wq`, so you should check your code before + closing a buffer. + + Fixing files can be disabled or enabled for individual buffers by setting + `b:ale_fix_on_save` to `0` or `1`. + + Some fixers can be excluded from being run automatically when you save files + with the |g:ale_fix_on_save_ignore| setting. + + +g:ale_fix_on_save_ignore *g:ale_fix_on_save_ignore* + *b:ale_fix_on_save_ignore* + + Type: |Dictionary| or |List| + Default: `{}` + + Given a |Dictionary| mapping filetypes to |Lists| of fixers to ignore, or + just a |List| of fixers to ignore, exclude those fixers from being run + automatically when files are saved. + + You can disable some fixers in your ftplugin file: > + + " Disable fixers 'b' and 'c' when fixing on safe for this buffer. + let b:ale_fix_on_save_ignore = ['b', 'c'] + " Alternatively, define ignore lists for different filetypes. + let b:ale_fix_on_save_ignore = {'foo': ['b'], 'bar': ['c']} +< + You can disable some fixers globally per filetype like so: > + + let g:ale_fixers = {'foo': ['a', 'b'], 'bar': ['c', 'd']} + let g:ale_fix_on_save = 1 + " For filetype `foo.bar`, only fixers 'b' and 'd' will be run on save. + let g:ale_fix_on_save_ignore = {'foo': ['a'], 'bar': ['c']} + " Alternatively, disable these fixers on save for all filetypes. + let g:ale_fix_on_save_ignore = ['a', 'c'] +< + You can ignore fixers based on matching |Funcref| values too: > + + let g:AddBar = {buffer, lines -> lines + ['bar']} + let g:ale_fixers = {'foo': g:AddBar} + " The lambda fixer will be ignored, as it will be found in the ignore list. + let g:ale_fix_on_save_ignore = [g:AddBar] +< + +g:ale_floating_preview *g:ale_floating_preview* + + Type: |Number| + Default: `0` + + When set to `1`, Neovim or Vim with |popupwin| will use a floating window + for ale's preview window. + This is equivalent to setting |g:ale_hover_to_floating_preview| and + |g:ale_detail_to_floating_preview| to `1`. + + +g:ale_floating_preview_popup_opts *g:ale_floating_preview_popup_opts* + + Type: |String| or |Dictionary| + Default: `''` + + Either a dictionary of options or the string name of a function that returns a + dictionary of options. This will be used as an argument to |popup_create| for + Vim users or |nvim_open_win| for NeoVim users. Note that in either case, the + resulting dictionary is merged with ALE defaults rather than expliciting overriding + them. This only takes effect if |g:ale_floating_preview| is enabled. + + NOTE: for Vim users see |popup_create-arguments|, for NeoVim users see + |nvim_open_win| for argument details + + For example, to enhance popups with a title: > + + function! CustomOpts() abort { + let [l:info, l:loc] = ale#util#FindItemAtCursor(bufnr('')) + return {'title': ' ALE: ' . (l:loc.linter_name) . ' '} + endfunction +< + + +g:ale_floating_window_border *g:ale_floating_window_border* + + Type: |List| + Default: `['|', '-', '+', '+', '+', '+', '|', '-']` + + When set to `[]`, window borders are disabled. The elements in the list set + the the characters for the left side, top, top-left corner, top-right + corner, bottom-right corner, bottom-left corner, right side, and bottom of + the floating window, respectively. + + If the terminal supports Unicode, you might try setting the value to + ` ['│', '─', 'â•­', 'â•®', '╯', 'â•°', '│', '─']`, to make it look nicer. + + NOTE: For compatibility with previous versions, if the list does not have + elements for the right side and bottom, the left side and top will be used + instead. + + +g:ale_history_enabled *g:ale_history_enabled* + + Type: |Number| + Default: `1` + + When set to `1`, ALE will remember the last few commands which were run + for every buffer which is open. This information can be viewed with the + |ALEInfo| command. The size of the buffer can be controlled with the + |g:ale_max_buffer_history_size| option. + + This option can be disabled if storing a command history is not desired. + + +g:ale_history_log_output *g:ale_history_log_output* + + Type: |Number| + Default: `1` + + When set to `1`, ALE will store the output of commands which have completed + successfully in the command history, and the output will be displayed when + using |ALEInfo|. + + |g:ale_history_enabled| must be set to `1` for this output to be stored or + printed. + + Some memory will be consumed by this option. It is very useful for figuring + out what went wrong with linters, and for bug reports. Turn this option off + if you want to save on some memory usage. + + +g:ale_hover_cursor *g:ale_hover_cursor* + + Type: |Number| + Default: `1` + + If set to `1`, ALE will show truncated information in the echo line about + the symbol at the cursor automatically when the |CursorHold| event is fired. + The delay before requesting hover information is based on 'updatetime', as + with all |CursorHold| events. + + If there's a problem on the line where the cursor is resting, ALE will not + show any hover information. + + See |ale-hover| for more information on hover information. + + This setting must be set to `1` before ALE is loaded for this behavior + to be enabled. See |ale-lint-settings-on-startup|. + + +g:ale_hover_to_preview *g:ale_hover_to_preview* + *b:ale_hover_to_preview* + Type: |Number| + Default: `0` + + If set to `1`, hover messages will be displayed in the preview window, + instead of in balloons or the message line. + + +g:ale_hover_to_floating_preview *g:ale_hover_to_floating_preview* + *b:ale_hover_to_floating_preview* + Type: |Number| + Default: `0` + + If set to `1`, Neovim or Vim with |popupwin| will use floating windows for + hover messages. + + +g:ale_keep_list_window_open *g:ale_keep_list_window_open* + *b:ale_keep_list_window_open* + Type: |Number| + Default: `0` + + When set to `1`, this option will keep the loclist or quickfix windows event + after all warnings/errors have been removed for files. By default the + loclist or quickfix windows will be closed automatically when there are no + warnings or errors. + + See |g:ale_open_list| + + +g:ale_list_window_size *g:ale_list_window_size* + *b:ale_list_window_size* + Type: |Number| + Default: `10` + + This number configures the number of lines to set for the height of windows + opened automatically for ALE problems. The default of `10` matches the Vim + default height. + + See |g:ale_open_list| for information on automatically opening windows + for quickfix or the loclist. + + +g:ale_lint_delay *g:ale_lint_delay* + *b:ale_lint_delay* + Type: |Number| + Default: `200` + + This variable controls the milliseconds delay after which the linters will + be run after text is changed. This option is only meaningful with the + |g:ale_lint_on_text_changed| variable set to `always`, `insert`, or `normal`. + + A buffer-local option, `b:ale_lint_delay`, can be set to change the delay + for different buffers, such as in |ftplugin| files. + + +g:ale_lint_on_enter *g:ale_lint_on_enter* + + Type: |Number| + Default: `1` + + When this option is set to `1`, the |BufWinEnter| event will be used to + apply linters when buffers are first opened. If this is not desired, this + variable can be set to `0` in your vimrc file to disable this behavior. + + The |FileChangedShellPost| and |BufEnter| events will be used to check if + files have been changed outside of Vim. If a file is changed outside of + Vim, it will be checked when it is next opened. + + You should set this setting once before ALE is loaded, and restart Vim if + you want to change your preferences. See |ale-lint-settings-on-startup|. + + +g:ale_lint_on_filetype_changed *g:ale_lint_on_filetype_changed* + + Type: |Number| + Default: `1` + + This option will cause ALE to run when the filetype for a file is changed + after a buffer has first been loaded. A short delay will be used before + linting will be done, so the filetype can be changed quickly several times + in a row, but resulting in only one lint cycle. + + You should set this setting once before ALE is loaded, and restart Vim if + you want to change your preferences. See |ale-lint-settings-on-startup|. + + +g:ale_lint_on_save *g:ale_lint_on_save* + + Type: |Number| + Default: `1` + + This option will make ALE run the linters whenever a file is saved when it + it set to `1` in your vimrc file. This option can be used in combination + with the |g:ale_lint_on_enter| and |g:ale_lint_on_text_changed| options to + make ALE only check files after that have been saved, if that is what is + desired. + + +g:ale_lint_on_text_changed *g:ale_lint_on_text_changed* + + Type: |String| + Default: `'normal'` + + This option controls how ALE will check your files as you make changes. + The following values can be used. + + `'always'`, `'1'`, or `1` - Check buffers on |TextChanged| or |TextChangedI|. + `'normal'` - Check buffers only on |TextChanged|. + `'insert'` - Check buffers only on |TextChangedI|. + `'never'`, `'0'`, or `0` - Never check buffers on changes. + + ALE will check buffers after a short delay, with a timer which resets on + each change. The delay can be configured by adjusting the |g:ale_lint_delay| + variable. + *ale-linting-interrupts-mapping* + + Due to a bug in Vim, ALE can interrupt mappings with pending key presses, + per |timeoutlen|. If this happens, follow the advice for enabling + |g:ale_lint_on_insert_leave| below, and set this option to `'normal'`, or + disable it entirely. + + You should set this setting once before ALE is loaded, and restart Vim if + you want to change your preferences. See |ale-lint-settings-on-startup|. + + +g:ale_lint_on_insert_leave *g:ale_lint_on_insert_leave* + *b:ale_lint_on_insert_leave* + + Type: |Number| + Default: `1` + + When set to `1` in your vimrc file, this option will cause ALE to run + linters when you leave insert mode. + + ALE will not lint files when you escape insert mode with |CTRL-C| by + default. You can make ALE lint files with this option when you use |CTRL-C| + with the following mapping. > + + " Make using Ctrl+C do the same as Escape, to trigger autocmd commands + inoremap +< + A buffer-local version of this setting `b:ale_lint_on_insert_leave` can be + set to `0` to disable linting when leaving insert mode. The setting must + be enabled globally to be enabled locally. + + You should set this setting once before ALE is loaded, and restart Vim if + you want to change your preferences. See |ale-lint-settings-on-startup|. + + +g:ale_linter_aliases *g:ale_linter_aliases* + *b:ale_linter_aliases* + Type: |Dictionary| + Default: `{}` + + The |g:ale_linter_aliases| option can be used to set aliases from one + filetype to another. A given filetype can be mapped to use the linters + run for another given filetype. + + This |Dictionary| will be merged with a default dictionary containing the + following values: > + + { + \ 'Dockerfile': 'dockerfile', + \ 'csh': 'sh', + \ 'javascriptreact': ['javascript', 'jsx'], + \ 'plaintex': 'tex', + \ 'ps1': 'powershell', + \ 'rmarkdown': 'r', + \ 'rmd': 'r', + \ 'systemverilog': 'verilog', + \ 'typescriptreact': ['typescript', 'tsx'], + \ 'vader': ['vim', 'vader'], + \ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'], + \ 'vimwiki': 'markdown', + \ 'vue': ['vue', 'javascript'], + \ 'xsd': ['xsd', 'xml'], + \ 'xslt': ['xslt', 'xml'], + \ 'zsh': 'sh', + \} +< + For example, if you wish to map a new filetype `'foobar'` to run the `'php'` + linters, you could set the following: > + + let g:ale_linter_aliases = {'foobar': 'php'} +< + When combined with the |g:ale_linters| option, the original filetype + (`'foobar'`) will be used for determining which linters to run, + not the aliased type (`'php'`). This allows an aliased type to run a + different set of linters from the type it is being mapped to. + + Passing a list of filetypes is also supported. Say you want to lint + javascript and css embedded in HTML (using linters that support that). + You could alias `html` like so: + + `let g:ale_linter_aliases = {'html': ['html', 'javascript', 'css']}` + + Note that `html` itself was included as an alias. That is because aliases + will override the original linters for the aliased filetype. + + Linter aliases can be configured in each buffer with buffer-local variables. + ALE will first look for aliases for filetypes in the `b:ale_linter_aliases` + variable, then `g:ale_linter_aliases`, and then a default Dictionary. + + `b:ale_linter_aliases` can be set to a |List| or a |String|, to tell ALE to + load the linters for specific filetypes for a given buffer. > + + let b:ale_linter_aliases = ['html', 'javascript', 'css'] + " OR, Alias a filetype to only a single filetype with a String. + let b:ale_linter_aliases = 'javascript' +< + No linters will be loaded when the buffer's filetype is empty. + + +g:ale_filename_mappings *g:ale_filename_mappings* + *b:ale_filename_mappings* + + Type: |Dictionary| or |List| + Default: `{}` + + Either a |Dictionary| mapping a linter or fixer name, as displayed in + |:ALEInfo|, to a |List| of two-item |List|s for filename mappings, or just a + |List| of two-item |List|s. When given some paths to files, the value of + this setting will be used to convert filenames on a local file system to + filenames on some remote file system, such as paths in a Docker image, + virtual machine, or network drive. + + For example: > + + let g:ale_filename_mappings = { + \ 'pylint': [ + \ ['/home/john/proj', '/data'], + \ ], + \} +< + With the above configuration, a filename such as `/home/john/proj/foo.py` + will be provided to the linter/fixer as `/data/foo.py`, and paths parsed + from linter results such as `/data/foo.py` will be converted back to + `/home/john/proj/foo.py`. + + You can use `*` as to apply a |List| of filename mappings to all other + linters or fixers not otherwise matched. > + + " Use one List of paths for pylint. + " Use another List of paths for everything else. + let g:ale_filename_mappings = { + \ 'pylint': [ + \ ['/home/john/proj', '/data'], + \ ], + \ '*': [ + \ ['/home/john/proj', '/other-data'], + \ ], + \} +< + If you just want every single linter or fixer to use the same filename + mapping, you can just use a |List|. > + + " Same as above, but for ALL linters and fixers. + let g:ale_filename_mappings = [ + \ ['/home/john/proj', '/data'], + \] +< + You can provide many such filename paths for multiple projects. Paths are + matched by checking if the start of a file path matches the given strings, + in a case-sensitive manner. Earlier entries in the |List| will be tried + before later entries when mapping to a given file system. + + Buffer-local options can be set to the same values to override the global + options, such as in |ftplugin| files. + + NOTE: Only fixers registered with a short name can support filename mapping + by their fixer names. See |ale-fix|. Filename mappings set for all tools by + using only a |List| for the setting will also be applied to fixers not in + the registry. + + NOTE: In order for this filename mapping to work correctly, linters and + fixers must exclusively determine paths to files to lint or fix via ALE + command formatting as per |ale-command-format-strings|, and paths parsed + from linter files must be provided in `filename` keys if a linter returns + results for more than one file at a time, as per |ale-loclist-format|. If + you discover a linter or fixer which does not behave properly, please report + it as an issue. + + If you are running a linter or fixer through Docker or another remote file + system, you may have to mount your temporary directory, which you can + discover with the following command: > + + :echo fnamemodify(tempname(), ':h:h') +< + You should provide a mapping from this temporary directory to whatever you + mount this directory to in Docker, or whatever remote file system you are + working with. + + You can inspect the filename mappings ALE will use with the + |ale#GetFilenameMappings()| function. + + +g:ale_linters *g:ale_linters* + *b:ale_linters* + Type: |Dictionary| + Default: `{}` + + The |g:ale_linters| option sets a |Dictionary| mapping a filetype to a + |List| of linter programs to be run when checking particular filetypes. + + This |Dictionary| will be merged with a default dictionary containing the + following values: > + + { + \ 'apkbuild': ['apkbuild_lint', 'secfixes_check'], + \ 'csh': ['shell'], + \ 'elixir': ['credo', 'dialyxir', 'dogma'], + \ 'go': ['gofmt', 'golint', 'gopls', 'govet'], + \ 'hack': ['hack'], + \ 'help': [], + \ 'inko': ['inko'], + \ 'json': ['jsonlint', 'spectral'], + \ 'json': ['jsonlint', 'spectral', 'vscodejson'], + \ 'json5': [], + \ 'jsonc': [], + \ 'perl': ['perlcritic'], + \ 'perl6': [], + \ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], + \ 'rust': ['cargo', 'rls'], + \ 'spec': [], + \ 'text': [], + \ 'vader': ['vimls'], + \ 'vue': ['eslint', 'vls'], + \ 'zsh': ['shell'], + \ 'v': ['v'], + \ 'yaml': ['spectral', 'yaml-language-server', 'yamllint'], + \} +< + This option can be used to enable only a particular set of linters for a + file. For example, you can enable only `eslint` for JavaScript files: > + + let g:ale_linters = {'javascript': ['eslint']} +< + If you want to disable all linters for a particular filetype, you can pass + an empty list of linters as the value: > + + let g:ale_linters = {'javascript': []} +< + All linters will be run for unspecified filetypes. All available linters can + be enabled explicitly for a given filetype by passing the string `'all'`, + instead of a List. > + + let g:ale_linters = {'c': 'all'} +< + Linters can be configured in each buffer with buffer-local variables. ALE + will first look for linters for filetypes in the `b:ale_linters` variable, + then `g:ale_linters`, and then the default Dictionary mentioned above. + + `b:ale_linters` can be set to a List, or the string `'all'`. When linters + for two different filetypes share the same name, the first linter loaded + will be used. Any ambiguity can be resolved by using a Dictionary specifying + which linter to run for which filetype instead. > + + " Use ESLint for the buffer if the filetype includes 'javascript'. + let b:ale_linters = {'javascript': ['eslint'], 'html': ['tidy']} + " Use a List for the same setting. This will work in most cases. + let b:ale_linters = ['eslint', 'tidy'] + " Disable all linters for the buffer. + let b:ale_linters = [] + " Explicitly enable all available linters for the filetype. + let b:ale_linters = 'all' +< + ALE can be configured to disable all linters unless otherwise specified with + `g:ale_enabled` or `b:ale_enabled` with the option |g:ale_linters_explicit|. + + +g:ale_linters_explicit *g:ale_linters_explicit* + + Type: |Number| + Default: `0` + + When set to `1`, only the linters from |g:ale_linters| and |b:ale_linters| + will be enabled. The default behavior for ALE is to enable as many linters + as possible, unless otherwise specified. + + +g:ale_linters_ignore *g:ale_linters_ignore* + *b:ale_linters_ignore* + + Type: |Dictionary| or |List| + Default: `{}` + + Linters to ignore. Commands for ignored linters will not be run, and + diagnostics for LSP linters will be ignored. (See |ale-lsp|) + + This setting can be set to a |Dictionary| mapping filetypes to linter names, + just like |g:ale_linters|, to list linters to ignore. Ignore lists will be + applied after everything else. > + + " Select flake8 and pylint, and ignore pylint, so only flake8 is run. + let g:ale_linters = {'python': ['flake8', 'pylint']} + let g:ale_linters_ignore = {'python': ['pylint']} +< + This setting can be set to simply a |List| of linter names, which is + especially more convenient when using the setting in ftplugin files for + particular buffers. > + + " The same as above, in a ftplugin/python.vim. + let b:ale_linters = ['flake8', 'pylint'] + let b:ale_linters_ignore = ['pylint'] +< + +g:ale_list_vertical *g:ale_list_vertical* + *b:ale_list_vertical* + Type: |Number| + Default: `0` + + When set to `1`, this will cause ALE to open any windows (loclist or + quickfix) vertically instead of horizontally (|vert| |lopen|) or (|vert| + |copen|) + + +g:ale_loclist_msg_format *g:ale_loclist_msg_format* + *b:ale_loclist_msg_format* + + Type: |String| + Default: `g:ale_echo_msg_format` + + This option is the same as |g:ale_echo_msg_format|, but for formatting the + message used for the loclist and the quickfix list. + + The strings for configuring `%severity%` are also used for this option. + + +g:ale_lsp_show_message_format *g:ale_lsp_show_message_format* + + Type: |String| + Default: `'%severity%:%linter%: %s'` + + This variable defines the format that messages received from an LSP will + have when echoed. The following sequences of characters will be replaced. + + `%s` - replaced with the message text + `%linter%` - replaced with the name of the linter + `%severity%` - replaced with the severity of the message + + The strings for `%severity%` levels "error", "info" and "warning" are shared + with |g:ale_echo_msg_format|. Severity "log" is unique to + |g:ale_lsp_show_message_format| and it can be configured via + + |g:ale_echo_msg_log_str| - Defaults to `'Log'` + + Please note that |g:ale_lsp_show_message_format| *can not* be configured + separately for each buffer like |g:ale_echo_msg_format| can. + + +g:ale_lsp_show_message_severity *g:ale_lsp_show_message_severity* + + Type: |String| + Default: `'error'` + + This variable defines the minimum severity level an LSP message needs to be + displayed. Messages below this level are discarded; please note that + messages with `Log` severity level are always discarded. + + Possible values follow the LSP spec `MessageType` definition: + + `'error'` - Displays only errors. + `'warning'` - Displays errors and warnings. + `'information'` - Displays errors, warnings and infos + `'log'` - Same as `'information'` + `'disabled'` - Doesn't display any information at all. + + +g:ale_lsp_suggestions *g:ale_lsp_suggestions* + + Type: |Number| + Default: `0` + + If set to `1`, show hints/suggestions from LSP servers or tsserver, in + addition to warnings and errors. + + +g:ale_max_buffer_history_size *g:ale_max_buffer_history_size* + + Type: |Number| + Default: `20` + + This setting controls the maximum number of commands which will be stored in + the command history used for |ALEInfo|. Command history will be rotated in + a FIFO manner. If set to a number <= 0, then the history will be + continuously set to an empty |List|. + + History can be disabled completely with |g:ale_history_enabled|. + + +g:ale_max_signs *g:ale_max_signs* + *b:ale_max_signs* + Type: |Number| + Default: `-1` + + When set to any positive integer, ALE will not render any more than the + given number of signs for any one buffer. + + When set to `0`, no signs will be set, but sign processing will still be + done, so existing signs can be removed. + + When set to any other value, no limit will be imposed on the number of signs + set. + + For disabling sign processing, see |g:ale_set_signs|. + + +g:ale_maximum_file_size *g:ale_maximum_file_size* + *b:ale_maximum_file_size* + Type: |Number| + Default: not set + + A maximum file size in bytes for ALE to check. If set to any positive + number, ALE will skip checking files larger than the given size. + + +g:ale_open_list *g:ale_open_list* + *b:ale_open_list* + Type: |Number| or |String| + Default: `0` + + When set to `1`, this will cause ALE to automatically open a window for the + loclist (|lopen|) or for the quickfix list instead if |g:ale_set_quickfix| + is `1`. (|copen|) + + When set to any higher numberical value, ALE will only open the window when + the number of warnings or errors are at least that many. + + When set to `'on_save'`, ALE will only open the loclist after buffers have + been saved. The list will be opened some time after buffers are saved and + any linter for a buffer returns results. + + The window will be kept open until all warnings or errors are cleared, + including those not set by ALE, unless |g:ale_keep_list_window_open| is set + to `1`, in which case the window will be kept open when no problems are + found. + + The window size can be configured with |g:ale_list_window_size|. + + Windows can be opened vertically with |g:ale_list_vertical|. + + If you want to close the loclist window automatically when the buffer is + closed, you can set up the following |autocmd| command: > + + augroup CloseLoclistWindowGroup + autocmd! + autocmd QuitPre * if empty(&buftype) | lclose | endif + augroup END + +< +g:ale_pattern_options *g:ale_pattern_options* + + Type: |Dictionary| + Default: not set + + This option maps regular expression patterns to |Dictionary| values for + buffer variables. This option can be set to automatically configure + different settings for different files. For example: > + + " Use just ESLint for linting and fixing files which end in '.foo.js' + let g:ale_pattern_options = { + \ '\.foo\.js$': { + \ 'ale_linters': ['eslint'], + \ 'ale_fixers': ['eslint'], + \ }, + \} +< + See |b:ale_linters| and |b:ale_fixers| for information for those options. + + Filenames are matched with |match()|, and patterns depend on the |magic| + setting, unless prefixed with the special escape sequences like `'\v'`, etc. + The patterns can match any part of a filename. The absolute path of the + filename will be used for matching, taken from `expand('%:p')`. + + The options for every match for the filename will be applied, with the + pattern keys sorted in alphabetical order. Options for `'zebra'` will + override the options for `'alpha'` for a filename `alpha-zebra`. + + +g:ale_pattern_options_enabled *g:ale_pattern_options_enabled* + + Type: |Number| + Default: not set + + This option can be used for disabling pattern options. If set to `0`, ALE + will not set buffer variables per |g:ale_pattern_options|. + + +g:ale_popup_menu_enabled *g:ale_popup_menu_enabled* + + Type: |Number| + Default: `has('gui_running')` + + When this option is set to `1`, ALE will show code actions and rename + capabilities in the right click mouse menu when there's a LSP server or + tsserver available. See |ale-refactor|. + + This feature is only supported in GUI versions of Vim. + + This setting must be set to `1` before ALE is loaded for this behavior + to be enabled. See |ale-lint-settings-on-startup|. + + +g:ale_rename_tsserver_find_in_comments *g:ale_rename_tsserver_find_in_comments* + + Type: |Number| + Default: `0` + + If enabled, this option will tell tsserver to find and replace text in + comments when calling |ALERename|. It can be enabled by settings the value + to `1`. + + +g:ale_rename_tsserver_find_in_strings *g:ale_rename_tsserver_find_in_strings* + + + Type: |Number| + Default: `0` + + If enabled, this option will tell tsserver to find and replace text in + strings when calling |ALERename|. It can be enabled by settings the value to + `1`. + + +g:ale_root *g:ale_root* + *b:ale_root* + + Type: |Dictionary| or |String| + Default: `{}` + + This option is used to determine the project root for a linter. If the value + is a |Dictionary|, it maps a linter to either a |String| containing the + project root or a |Funcref| to call to look up the root. The |Funcref| is + provided the buffer number as its argument. + + The buffer-specific variable may additionally be a string containing the + project root itself. + + If neither variable yields a result, a linter-specific function is invoked to + detect a project root. If this, too, yields no result, and the linter is an + LSP linter, it will not run. + + +g:ale_set_balloons *g:ale_set_balloons* + *b:ale_set_balloons* + + Type: |Number| or |String| + Default: `has('balloon_eval') && has('gui_running')` + + When this option is set to `1`, balloon messages will be displayed for + problems or hover information if available. + + Problems nearest to the line the mouse cursor is over will be displayed. If + there are no problems to show, and one of the linters is an LSP linter + supporting "Hover" information, per |ale-hover|, then brief information + about the symbol under the cursor will be displayed in a balloon. + + This option can be set to `'hover'` to only enable balloons for hover + message, so diagnostics are never shown in balloons. You may wish to + configure use this setting only in GUI Vim like so: > + + let g:ale_set_balloons = has('gui_running') ? 'hover' : 0 +< + + Balloons can be enabled for terminal versions of Vim that support balloons, + but some versions of Vim will produce strange mouse behavior when balloons + are enabled. To configure balloons for your terminal, you should first + configure your |ttymouse| setting, and then consider setting + `g:ale_set_balloons` to `1` before ALE is loaded. + + `b:ale_set_balloons` can be set to `0` to disable balloons for a buffer. + Balloons cannot be enabled for a specific buffer when not initially enabled + globally. + + Balloons will not be shown when |g:ale_enabled| or |b:ale_enabled| is `0`. + + +g:ale_set_balloons_legacy_echo *g:ale_set_balloons_legacy_echo* + *b:ale_set_balloons_legacy_echo* + Type: |Number| + Default: not set + + If set to `1`, moving your mouse over documents in Vim will make ALE ask + `tsserver` or `LSP` servers for information about the symbol where the mouse + cursor is, and print that information into Vim's echo line. This is an + option for supporting older versions of Vim which do not properly support + balloons in an asynchronous manner. + + If your version of Vim supports the |balloon_show| function, then this + option does nothing meaningful. + + +g:ale_set_highlights *g:ale_set_highlights* + + Type: |Number| + Default: `has('syntax')` + + When this option is set to `1`, highlights will be set for problems. + + ALE will use the following highlight groups for problems: + + |ALEError| - Items with `'type': 'E'` + |ALEWarning| - Items with `'type': 'W'` + |ALEInfo.| - Items with `'type': 'I'` + |ALEStyleError| - Items with `'type': 'E'` and `'sub_type': 'style'` + |ALEStyleWarning| - Items with `'type': 'W'` and `'sub_type': 'style'` + + When |g:ale_set_signs| is set to `0`, the following highlights for entire + lines will be set. + + |ALEErrorLine| - All items with `'type': 'E'` + |ALEWarningLine| - All items with `'type': 'W'` + |ALEInfoLine| - All items with `'type': 'I'` + + Vim can only highlight the characters up to the last column in a buffer for + match highlights, whereas the line highlights when signs are enabled will + run to the edge of the screen. + + Highlights can be excluded with the |g:ale_exclude_highlights| option. + + +g:ale_set_loclist *g:ale_set_loclist* + + Type: |Number| + Default: `1` + + When this option is set to `1`, the |loclist| will be populated with any + warnings and errors which are found by ALE. This feature can be used to + implement jumping between errors through typical use of |lnext| and |lprev|. + + +g:ale_set_quickfix *g:ale_set_quickfix* + + Type: |Number| + Default: `0` + + When this option is set to `1`, the |quickfix| list will be populated with + any problems which are found by ALE, instead of the |loclist|. The loclist + will never be populated when this option is on. + + Problems from every buffer ALE has checked will be included in the quickfix + list, which can be checked with |:copen|. Problems will be de-duplicated. + + This feature should not be used in combination with tools for searching for + matches and commands like |:cfdo|, as ALE will replace the quickfix list + pretty frequently. If you wish to use such tools, you should populate the + loclist or use |ALEPopulateQuickfix| instead. + + +g:ale_set_signs *g:ale_set_signs* + + Type: |Number| + Default: `has('signs')` + + When this option is set to `1`, the |sign| column will be populated with + signs marking where problems appear in the file. + + ALE will use the following highlight groups for problems: + + |ALEErrorSign| - Items with `'type': 'E'` + |ALEWarningSign| - Items with `'type': 'W'` + |ALEInfoSign| - Items with `'type': 'I'` + |ALEStyleErrorSign| - Items with `'type': 'E'` and `'sub_type': 'style'` + |ALEStyleWarningSign| - Items with `'type': 'W'` and `'sub_type': 'style'` + + In addition to the style of the signs, the style of lines where signs appear + can be configured with the following highlights: + + |ALEErrorLine| - All items with `'type': 'E'` + |ALEWarningLine| - All items with `'type': 'W'` + |ALEInfoLine| - All items with `'type': 'I'` + + With Neovim 0.3.2 or higher, ALE can use the `numhl` option to highlight the + 'number' column. It uses the following highlight groups. + + |ALEErrorSignLineNr| - Items with `'type': 'E'` + |ALEWarningSignLineNr| - Items with `'type': 'W'` + |ALEInfoSignLineNr| - Items with `'type': 'I'` + |ALEStyleErrorSignLineNr| - Items with `'type': 'E'` and `'sub_type': 'style'` + |ALEStyleWarningSignLineNr| - Items with `'type': 'W'` and `'sub_type': 'style'` + + To enable line number highlighting |g:ale_sign_highlight_linenrs| must be + set to `1` before ALE is loaded. + + The markers for the highlights can be customized with the following options: + + |g:ale_sign_error| + |g:ale_sign_warning| + |g:ale_sign_info| + |g:ale_sign_style_error| + |g:ale_sign_style_warning| + + When multiple problems exist on the same line, the signs will take + precedence in the order above, from highest to lowest. + + To limit the number of signs ALE will set, see |g:ale_max_signs|. + + +g:ale_sign_priority *g:ale_sign_priority* + + Type: |Number| + Default: `30` + + From Neovim 0.4.0 and Vim 8.1, ALE can set sign priority to all signs. The + larger this value is, the higher priority ALE signs have over other plugin + signs. See |sign-priority| for further details on how priority works. + + +g:ale_shell *g:ale_shell* + *b:ale_shell* + + Type: |String| + Default: not set + + Override the shell used by ALE for executing commands. ALE uses 'shell' by + default, but falls back in `/bin/sh` if the default shell looks like `fish` + or `pwsh`, which are not compatible with all of the commands run by ALE. The + shell specified with this option will be used even if it might not work in + all cases. + + For Windows, ALE uses `cmd` when this option isn't set. Setting this option + will apply shell escaping to the command string, even on Windows. + + NOTE: Consider setting |g:ale_shell_arguments| if this option is defined. + + +g:ale_shell_arguments *g:ale_shell_arguments* + *b:ale_shell_arguments* + + Type: |String| + Default: not set + + This option specifies the arguments to use for executing a command with a + custom shell, per |g:ale_shell|. If this option is not set, 'shellcmdflag' + will be used instead. + + +g:ale_sign_column_always *g:ale_sign_column_always* + + Type: |Number| + Default: `0` + + By default, the sign gutter will disappear when all warnings and errors have + been fixed for a file. When this option is set to `1`, the sign column will + remain open. This can be preferable if you don't want the text in your file + to move around as you edit a file. + + +g:ale_sign_error *g:ale_sign_error* + + Type: |String| + Default: `'>>'` + + The sign for errors in the sign gutter. + + +g:ale_sign_info *g:ale_sign_info* + + Type: |String| + Default: `g:ale_sign_warning` + + The sign for "info" markers in the sign gutter. + + +g:ale_sign_style_error *g:ale_sign_style_error* + + Type: |String| + Default: `g:ale_sign_error` + + The sign for style errors in the sign gutter. + + +g:ale_sign_style_warning *g:ale_sign_style_warning* + + Type: |String| + Default: `g:ale_sign_warning` + + The sign for style warnings in the sign gutter. + + +g:ale_sign_offset *g:ale_sign_offset* + + Type: |Number| + Default: `1000000` + + This variable controls offset from which numeric IDs will be generated for + new signs. Signs cannot share the same ID values, so when two Vim plugins + set signs at the same time, the IDs have to be configured such that they do + not conflict with one another. If the IDs used by ALE are found to conflict + with some other plugin, this offset value can be changed, and hopefully both + plugins will work together. See |sign-place| for more information on how + signs are set. + + +g:ale_sign_warning *g:ale_sign_warning* + + Type: |String| + Default: `'--'` + + The sign for warnings in the sign gutter. + + +g:ale_sign_highlight_linenrs *g:ale_sign_highlight_linenrs* + + Type: |Number| + Default: `0` + + When set to `1`, this option enables highlighting problems on the 'number' + column in Vim versions that support `numhl` highlights. This option must be + configured before ALE is loaded. + + +g:ale_update_tagstack *g:ale_update_tagstack* + *b:ale_update_tagstack* + Type: |Number| + Default: `1` + + This option can be set to disable updating Vim's |tagstack| automatically. + + +g:ale_type_map *g:ale_type_map* + *b:ale_type_map* + Type: |Dictionary| + Default: `{}` + + This option can be set re-map problem types for linters. Each key in the + |Dictionary| should be the name of a linter, and each value must be a + |Dictionary| mapping problem types from one type to another. The following + types are supported: + + `'E'` - `{'type': 'E'}` + `'ES'` - `{'type': 'E', 'sub_type': 'style'}` + `'W'` - `{'type': 'W'}` + `'WS'` - `{'type': 'W', 'sub_type': 'style'}` + `'I'` - `{'type': 'I'}` + + For example, if you want to turn flake8 errors into warnings, you can write + the following: > + + let g:ale_type_map = {'flake8': {'ES': 'WS', 'E': 'W'}} +< + If you wanted to turn style errors and warnings into regular errors and + warnings, you can write the following: > + + let g:ale_type_map = {'flake8': {'ES': 'E', 'WS': 'W'}} +< + Type maps can be set per-buffer with `b:ale_type_map`. + + +g:ale_use_global_executables *g:ale_use_global_executables* + + Type: |Number| + Default: not set + + This option can be set to change the default for all `_use_global` options. + This option must be set before ALE is loaded, preferably in a vimrc file. + + See |ale-integrations-local-executables| for more information on those + options. + + +g:ale_virtualtext_cursor *g:ale_virtualtext_cursor* + + Type: |Number| + Default: `'all'` (if supported, otherwise `'disabled'`) + + This option controls how ALE will display problems using |virtual-text|. + The following values can be used. + + `'all'`, `'2'`, or `2` - Show problems for all lines. + `'current'`, `'1'`, or `1` - Show problems for the current line. + `'disabled'`, `'0'`, or `0` - Do not show problems with virtual-text. + + Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|. + + Messages can be prefixed prefixed with a string. See |g:ale_virtualtext_prefix|. + + ALE will use the following highlight groups for problems: + + |ALEVirtualTextError| - Items with `'type': 'E'` + |ALEVirtualTextWarning| - Items with `'type': 'W'` + |ALEVirtualTextInfo| - Items with `'type': 'I'` + |ALEVirtualTextStyleError| - Items with `'type': 'E'` and `'sub_type': 'style'` + |ALEVirtualTextStyleWarning| - Items with `'type': 'W'` and `'sub_type': 'style'` + + +g:ale_virtualtext_delay *g:ale_virtualtext_delay* + *b:ale_virtualtext_delay* + Type: |Number| + Default: `10` + + Given any integer, this option controls the number of milliseconds before + ALE will show a message for a problem near the cursor. + + The value can be increased to decrease the amount of processing ALE will do + for files displaying a large number of problems. + + +g:ale_virtualtext_prefix *g:ale_virtualtext_prefix* + *b:ale_virtualtext_prefix* + Type: |String| + Default: `'%comment% %type%: '` + + Prefix to be used with |g:ale_virtualtext_cursor|. + + This setting can be changed in each buffer with `b:ale_virtualtext_prefix`. + + All of the same format markers used for |g:ale_echo_msg_format| can be used + for defining the prefix, including some additional sequences of characters. + + `%comment%` - replaced with comment characters in the current language + + ALE will read the comment characters from |&commentstring|, reading only the + part before `%s`, with whitespace trimmed. If comment syntax cannot be + pulled from |&commentstring|, ALE will default to `'#'`. + + +g:ale_virtualenv_dir_names *g:ale_virtualenv_dir_names* + *b:ale_virtualenv_dir_names* + + Type: |List| + Default: `['.env', '.venv', 'env', 've-py3', 've', 'virtualenv', 'venv']` + + A list of directory names to be used when searching upwards from Python + files to discover virtulenv directories with. + + For directory named `'foo'`, ALE will search for `'foo/bin/activate'` + (`foo\Scripts\activate\` on Windows) in all directories on and above the + directory containing the Python file to find virtualenv paths. + + +g:ale_warn_about_trailing_blank_lines *g:ale_warn_about_trailing_blank_lines* + *b:ale_warn_about_trailing_blank_lines* + + Type: |Number| + Default: `1` + + When this option is set to `1`, warnings about trailing blank lines will be + shown. + + This option behaves similarly to |g:ale_warn_about_trailing_whitespace|. + + +g:ale_warn_about_trailing_whitespace *g:ale_warn_about_trailing_whitespace* + *b:ale_warn_about_trailing_whitespace* + + Type: |Number| + Default: `1` + + When this option is set to `1`, warnings relating to trailing whitespace on + lines will be shown. If warnings are too irritating while editing buffers, + and you have configured Vim to automatically remove trailing whitespace, + you can disable these warnings by setting this option to `0`. + + Not all linters may respect this option. If a linter does not, please file a + bug report, and it may be possible to add such support. + + This option may be configured on a per buffer basis. + + +g:ale_windows_node_executable_path *g:ale_windows_node_executable_path* + *b:ale_windows_node_executable_path* + + Type: |String| + Default: `'node.exe'` + + This variable is used as the path to the executable to use for executing + scripts with Node.js on Windows. + + For Windows, any file with a `.js` file extension needs to be executed with + the node executable explicitly. Otherwise, Windows could try and open the + scripts with other applications, like a text editor. Therefore, these + scripts are executed with whatever executable is configured with this + setting. + + +------------------------------------------------------------------------------- +6.1. Highlights *ale-highlights* + +ALEError *ALEError* + + Default: `highlight link ALEError SpellBad` + + The highlight for highlighted errors. See |g:ale_set_highlights|. + + +ALEErrorLine *ALEErrorLine* + + Default: Undefined + + The highlight for an entire line where errors appear. Only the first + line for a problem will be highlighted. + + See |g:ale_set_signs| and |g:ale_set_highlights|. + + +ALEErrorSign *ALEErrorSign* + + Default: `highlight link ALEErrorSign error` + + The highlight for error signs. See |g:ale_set_signs|. + + +ALEErrorSignLineNr *ALEErrorSignLineNr* + + Default: `highlight link ALEErrorSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + +ALEInfo *ALEInfo.* + *ALEInfo-highlight* + Default: `highlight link ALEInfo ALEWarning` + + The highlight for highlighted info messages. See |g:ale_set_highlights|. + + +ALEInfoSign *ALEInfoSign* + + Default: `highlight link ALEInfoSign ALEWarningSign` + + The highlight for info message signs. See |g:ale_set_signs|. + + +ALEInfoLine *ALEInfoLine* + + Default: Undefined + + The highlight for entire lines where info messages appear. Only the first + line for a problem will be highlighted. + + See |g:ale_set_signs| and |g:ale_set_highlights|. + + +ALEInfoSignLineNr *ALEInfoSignLineNr* + + Default: `highlight link ALEInfoSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + +ALEStyleError *ALEStyleError* + + Default: `highlight link ALEStyleError ALEError` + + The highlight for highlighted style errors. See |g:ale_set_highlights|. + + +ALEStyleErrorSign *ALEStyleErrorSign* + + Default: `highlight link ALEStyleErrorSign ALEErrorSign` + + The highlight for style error signs. See |g:ale_set_signs|. + + +ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr* + + Default: `highlight link ALEStyleErrorSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + +ALEStyleWarning *ALEStyleWarning* + + Default: `highlight link ALEStyleWarning ALEError` + + The highlight for highlighted style warnings. See |g:ale_set_highlights|. + + +ALEStyleWarningSign *ALEStyleWarningSign* + + Default: `highlight link ALEStyleWarningSign ALEWarningSign` + + The highlight for style warning signs. See |g:ale_set_signs|. + + +ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr* + + Default: `highlight link ALEStyleWarningSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + +ALEVirtualTextError *ALEVirtualTextError* + + Default: `highlight link ALEVirtualTextError Comment` + + The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. + + +ALEVirtualTextInfo *ALEVirtualTextInfo* + + Default: `highlight link ALEVirtualTextInfo ALEVirtualTextWarning` + + The highlight for virtualtext info. See |g:ale_virtualtext_cursor|. + + +ALEVirtualTextStyleError *ALEVirtualTextStyleError* + + Default: `highlight link ALEVirtualTextStyleError ALEVirtualTextError` + + The highlight for virtualtext style errors. See |g:ale_virtualtext_cursor|. + + +ALEVirtualTextStyleWarning *ALEVirtualTextStyleWarning* + + Default: `highlight link ALEVirtualTextStyleWarning ALEVirtualTextWarning` + + The highlight for virtualtext style warnings. See |g:ale_virtualtext_cursor|. + + +ALEVirtualTextWarning *ALEVirtualTextWarning* + + Default: `highlight link ALEVirtualTextWarning Comment` + + The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. + + +ALEWarning *ALEWarning* + + Default: `highlight link ALEWarning SpellCap` + + The highlight for highlighted warnings. See |g:ale_set_highlights|. + + +ALEWarningLine *ALEWarningLine* + + Default: Undefined + + The highlight for entire lines where warnings appear. Only the first line + for a problem will be highlighted. + + See |g:ale_set_signs| and |g:ale_set_highlights|. + + +ALEWarningSign *ALEWarningSign* + + Default: `highlight link ALEWarningSign todo` + + The highlight for warning signs. See |g:ale_set_signs|. + + +ALEWarningSignLineNr *ALEWarningSignLineNr* + + Default: `highlight link ALEWarningSignLineNr CursorLineNr` + + The highlight for error signs. See |g:ale_set_signs|. + + NOTE: This highlight is only available on Neovim 0.3.2 or higher. + + +=============================================================================== +7. Linter/Fixer Options *ale-integration-options* + +Linter and fixer options are documented below and in individual help files. + +Every option for programs can be set globally, or individually for each +buffer. For example, `b:ale_python_flake8_executable` will override any +values set for `g:ale_python_flake8_executable`. + + *ale-integrations-local-executables* + +Some tools will prefer to search for locally-installed executables, unless +configured otherwise. For example, the `eslint` linter will search for +various executable paths in `node_modules`. The `flake8` linter will search +for virtualenv directories. + +If you prefer to use global executables for those tools, set the relevant +`_use_global` and `_executable` options for those linters. > + + " Use the global executable with a special name for eslint. + let g:ale_javascript_eslint_executable = 'special-eslint' + let g:ale_javascript_eslint_use_global = 1 + + " Use the global executable with a special name for flake8. + let g:ale_python_flake8_executable = '/foo/bar/flake8' + let g:ale_python_flake8_use_global = 1 +< +|g:ale_use_global_executables| can be set to `1` in your vimrc file to make +ALE use global executables for all linters by default. + +The option |g:ale_virtualenv_dir_names| controls the local virtualenv paths +ALE will use to search for Python executables. + + +------------------------------------------------------------------------------- +7.1. Options for alex *ale-alex-options* + +The options for `alex` are shared between all filetypes, so options can be +configured once. + +g:ale_alex_executable *g:ale_alex_executable* + *b:ale_alex_executable* + Type: |String| + Default: `'alex'` + + See |ale-integrations-local-executables| + + +g:ale_alex_use_global *g:ale_alex_use_global* + *b:ale_alex_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.2. Options for cspell *ale-cspell-options* + +The options for `cspell` are shared between all filetypes, so options can be +configured only once. + +g:ale_cspell_executable *g:ale_cspell_executable* + *b:ale_cspell_executable* + Type: |String| + Default: `'cspell'` + + See |ale-integrations-local-executables| + + +g:ale_cspell_options *g:ale_cspell_options* + *b:ale_cspell_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to `cspell`. + + +g:ale_cspell_use_global *g:ale_cspell_use_global* + *b:ale_cspell_use_global* + Type: |Number| + Default: `get(g: 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.3. Options for dprint *ale-dprint-options* + +`dprint` is a fixer for many file types, including: (java|type)script, +json(c?), markdown, and more. See https://dprint.dev/plugins for an up-to-date +list of supported plugins and their configuration options. + +g:ale_dprint_executable *g:ale_dprint_executable* + *b:ale_dprint_executable* + Type: |String| + Default: `'dprint'` + + See |ale-integrations-local-executables| + + +g:ale_dprint_config *g:ale_dprint_config* + *b:ale_dprint_config* + Type: |String| + Default: `'dprint.json'` + + This variable can be changed to provide a config file to `dprint`. The + default is the nearest `dprint.json` searching upward from the current + buffer. + + See https://dprint.dev/config and https://plugins.dprint.dev + + +g:ale_dprint_options *g:ale_dprint_options* + *b:ale_dprint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to `dprint`. + + +g:ale_dprint_use_global *g:ale_dprint_use_global* + *b:ale_dprint_use_global* + Type: |Number| + Default: `get(g: 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.4. Options for languagetool *ale-languagetool-options* + +g:ale_languagetool_executable *g:ale_languagetool_executable* + *b:ale_languagetool_executable* + + Type: |String| + Default: `'languagetool'` + + The executable to run for languagetool. + + +g:ale_languagetool_options *g:ale_languagetool_options* + *b:ale_languagetool_options* + Type: |String| + Default: `'--autoDetect'` + + This variable can be set to pass additional options to languagetool. + + +------------------------------------------------------------------------------- +7.5. Options for write-good *ale-write-good-options* + +The options for `write-good` are shared between all filetypes, so options can +be configured once. + +g:ale_writegood_executable *g:ale_writegood_executable* + *b:ale_writegood_executable* + Type: |String| + Default: `'writegood'` + + See |ale-integrations-local-executables| + + +g:ale_writegood_options *g:ale_writegood_options* + *b:ale_writegood_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to writegood. + + +g:ale_writegood_use_global *g:ale_writegood_use_global* + *b:ale_writegood_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.6. Other Linter/Fixer Options *ale-other-integration-options* + +ALE supports a very wide variety of tools. Other linter or fixer options are +documented in additional help files. + + ada.....................................|ale-ada-options| + cspell................................|ale-ada-cspell| + gcc...................................|ale-ada-gcc| + gnatpp................................|ale-ada-gnatpp| + ada-language-server...................|ale-ada-language-server| + ansible.................................|ale-ansible-options| + ansible-language-server...............|ale-ansible-language-server| + ansible-lint..........................|ale-ansible-ansible-lint| + apkbuild................................|ale-apkbuild-options| + apkbuild-lint.........................|ale-apkbuild-apkbuild-lint| + secfixes-check........................|ale-apkbuild-secfixes-check| + asciidoc................................|ale-asciidoc-options| + cspell................................|ale-asciidoc-cspell| + write-good............................|ale-asciidoc-write-good| + textlint..............................|ale-asciidoc-textlint| + asm.....................................|ale-asm-options| + gcc...................................|ale-asm-gcc| + avra....................................|ale-avra-options| + avra..................................|ale-avra-avra| + awk.....................................|ale-awk-options| + gawk..................................|ale-awk-gawk| + bats....................................|ale-bats-options| + shellcheck............................|ale-bats-shellcheck| + bazel...................................|ale-bazel-options| + buildifier............................|ale-bazel-buildifier| + bib.....................................|ale-bib-options| + bibclean..............................|ale-bib-bibclean| + bicep...................................|ale-bicep-options| + bicep.................................|ale-bicep-bicep| + bitbake.................................|ale-bitbake-options| + oelint-adv............................|ale-bitbake-oelint_adv| + c.......................................|ale-c-options| + astyle................................|ale-c-astyle| + cc....................................|ale-c-cc| + ccls..................................|ale-c-ccls| + clangd................................|ale-c-clangd| + clang-format..........................|ale-c-clangformat| + clangtidy.............................|ale-c-clangtidy| + cppcheck..............................|ale-c-cppcheck| + cquery................................|ale-c-cquery| + cspell................................|ale-c-cspell| + flawfinder............................|ale-c-flawfinder| + uncrustify............................|ale-c-uncrustify| + cairo...................................|ale-cairo-options| + starknet..............................|ale-cairo-starknet| + chef....................................|ale-chef-options| + cookstyle.............................|ale-chef-cookstyle| + foodcritic............................|ale-chef-foodcritic| + clojure.................................|ale-clojure-options| + clj-kondo.............................|ale-clojure-clj-kondo| + joker.................................|ale-clojure-joker| + cloudformation..........................|ale-cloudformation-options| + cfn-python-lint.......................|ale-cloudformation-cfn-python-lint| + cmake...................................|ale-cmake-options| + cmakelint.............................|ale-cmake-cmakelint| + cmake-lint............................|ale-cmake-cmake-lint| + cmake-format..........................|ale-cmake-cmakeformat| + cpp.....................................|ale-cpp-options| + astyle................................|ale-cpp-astyle| + cc....................................|ale-cpp-cc| + ccls..................................|ale-cpp-ccls| + clangcheck............................|ale-cpp-clangcheck| + clangd................................|ale-cpp-clangd| + clang-format..........................|ale-cpp-clangformat| + clangtidy.............................|ale-cpp-clangtidy| + clazy.................................|ale-cpp-clazy| + cppcheck..............................|ale-cpp-cppcheck| + cpplint...............................|ale-cpp-cpplint| + cquery................................|ale-cpp-cquery| + cspell................................|ale-cpp-cspell| + flawfinder............................|ale-cpp-flawfinder| + uncrustify............................|ale-cpp-uncrustify| + c#......................................|ale-cs-options| + clang-format..........................|ale-cs-clangformat| + csc...................................|ale-cs-csc| + cspell................................|ale-cs-cspell| + dotnet-format.........................|ale-cs-dotnet-format| + mcs...................................|ale-cs-mcs| + mcsc..................................|ale-cs-mcsc| + uncrustify............................|ale-cs-uncrustify| + css.....................................|ale-css-options| + cspell................................|ale-css-cspell| + css-beautify..........................|ale-css-css-beautify| + fecs..................................|ale-css-fecs| + prettier..............................|ale-css-prettier| + stylelint.............................|ale-css-stylelint| + vscodecss.............................|ale-css-vscode| + cuda....................................|ale-cuda-options| + clang-format..........................|ale-cuda-clangformat| + clangd................................|ale-cuda-clangd| + nvcc..................................|ale-cuda-nvcc| + d.......................................|ale-d-options| + dfmt..................................|ale-d-dfmt| + dls...................................|ale-d-dls| + uncrustify............................|ale-d-uncrustify| + dafny...................................|ale-dafny-options| + dafny.................................|ale-dafny-dafny| + dart....................................|ale-dart-options| + analysis_server.......................|ale-dart-analysis_server| + dart-analyze..........................|ale-dart-analyze| + dart-format...........................|ale-dart-format| + dartfmt...............................|ale-dart-dartfmt| + desktop.................................|ale-desktop-options| + desktop-file-validate.................|ale-desktop-desktop-file-validate| + dhall...................................|ale-dhall-options| + dhall-format..........................|ale-dhall-format| + dhall-freeze..........................|ale-dhall-freeze| + dhall-lint............................|ale-dhall-lint| + dockerfile..............................|ale-dockerfile-options| + dockerfile_lint.......................|ale-dockerfile-dockerfile_lint| + dprint................................|ale-dockerfile-dprint| + hadolint..............................|ale-dockerfile-hadolint| + elixir..................................|ale-elixir-options| + mix...................................|ale-elixir-mix| + mix_format............................|ale-elixir-mix-format| + dialyxir..............................|ale-elixir-dialyxir| + elixir-ls.............................|ale-elixir-elixir-ls| + credo.................................|ale-elixir-credo| + cspell................................|ale-elixir-cspell| + elm.....................................|ale-elm-options| + elm-format............................|ale-elm-elm-format| + elm-ls................................|ale-elm-elm-ls| + elm-make..............................|ale-elm-elm-make| + erlang..................................|ale-erlang-options| + dialyzer..............................|ale-erlang-dialyzer| + elvis.................................|ale-erlang-elvis| + erlang_ls.............................|ale-erlang-erlang_ls| + erlc..................................|ale-erlang-erlc| + erlfmt................................|ale-erlang-erlfmt| + syntaxerl.............................|ale-erlang-syntaxerl| + eruby...................................|ale-eruby-options| + erblint...............................|ale-eruby-erblint| + ruumba................................|ale-eruby-ruumba| + fish....................................|ale-fish-options| + fish_indent...........................|ale-fish-fish_indent| + fortran.................................|ale-fortran-options| + gcc...................................|ale-fortran-gcc| + language_server.......................|ale-fortran-language-server| + fountain................................|ale-fountain-options| + fusionscript............................|ale-fuse-options| + fusion-lint...........................|ale-fuse-fusionlint| + git commit..............................|ale-gitcommit-options| + gitlint...............................|ale-gitcommit-gitlint| + glsl....................................|ale-glsl-options| + glslang...............................|ale-glsl-glslang| + glslls................................|ale-glsl-glslls| + go......................................|ale-go-options| + bingo.................................|ale-go-bingo| + cspell................................|ale-go-cspell| + gobuild...............................|ale-go-gobuild| + gofmt.................................|ale-go-gofmt| + gofumpt...............................|ale-go-gofumpt| + golangci-lint.........................|ale-go-golangci-lint| + golangserver..........................|ale-go-golangserver| + golines...............................|ale-go-golines| + golint................................|ale-go-golint| + gometalinter..........................|ale-go-gometalinter| + gopls.................................|ale-go-gopls| + govet.................................|ale-go-govet| + revive................................|ale-go-revive| + staticcheck...........................|ale-go-staticcheck| + graphql.................................|ale-graphql-options| + eslint................................|ale-graphql-eslint| + gqlint................................|ale-graphql-gqlint| + prettier..............................|ale-graphql-prettier| + hack....................................|ale-hack-options| + hack..................................|ale-hack-hack| + hackfmt...............................|ale-hack-hackfmt| + hhast.................................|ale-hack-hhast| + handlebars..............................|ale-handlebars-options| + prettier..............................|ale-handlebars-prettier| + ember-template-lint...................|ale-handlebars-embertemplatelint| + haskell.................................|ale-haskell-options| + brittany..............................|ale-haskell-brittany| + cspell................................|ale-haskell-cspell| + floskell..............................|ale-haskell-floskell| + ghc...................................|ale-haskell-ghc| + ghc-mod...............................|ale-haskell-ghc-mod| + cabal-ghc.............................|ale-haskell-cabal-ghc| + hdevtools.............................|ale-haskell-hdevtools| + hfmt..................................|ale-haskell-hfmt| + hindent...............................|ale-haskell-hindent| + hlint.................................|ale-haskell-hlint| + hls...................................|ale-haskell-hls| + stack-build...........................|ale-haskell-stack-build| + stack-ghc.............................|ale-haskell-stack-ghc| + stylish-haskell.......................|ale-haskell-stylish-haskell| + hie...................................|ale-haskell-hie| + ormolu................................|ale-haskell-ormolu| + hcl.....................................|ale-hcl-options| + packer-fmt............................|ale-hcl-packer-fmt| + terraform-fmt.........................|ale-hcl-terraform-fmt| + help....................................|ale-help-options| + cspell................................|ale-help-cspell| + html....................................|ale-html-options| + angular...............................|ale-html-angular| + cspell................................|ale-html-cspell| + fecs..................................|ale-html-fecs| + html-beautify.........................|ale-html-beautify| + htmlhint..............................|ale-html-htmlhint| + prettier..............................|ale-html-prettier| + stylelint.............................|ale-html-stylelint| + tidy..................................|ale-html-tidy| + vscodehtml............................|ale-html-vscode| + write-good............................|ale-html-write-good| + idris...................................|ale-idris-options| + idris.................................|ale-idris-idris| + ink.....................................|ale-ink-options| + ink-language-server...................|ale-ink-language-server| + inko....................................|ale-inko-options| + inko..................................|ale-inko-inko| + ispc....................................|ale-ispc-options| + ispc..................................|ale-ispc-ispc| + java....................................|ale-java-options| + checkstyle............................|ale-java-checkstyle| + clang-format..........................|ale-java-clangformat| + cspell................................|ale-java-cspell| + javac.................................|ale-java-javac| + google-java-format....................|ale-java-google-java-format| + pmd...................................|ale-java-pmd| + javalsp...............................|ale-java-javalsp| + eclipselsp............................|ale-java-eclipselsp| + uncrustify............................|ale-java-uncrustify| + javascript..............................|ale-javascript-options| + clang-format..........................|ale-javascript-clangformat| + cspell................................|ale-javascript-cspell| + deno..................................|ale-javascript-deno| + dprint................................|ale-javascript-dprint| + eslint................................|ale-javascript-eslint| + fecs..................................|ale-javascript-fecs| + flow..................................|ale-javascript-flow| + importjs..............................|ale-javascript-importjs| + jscs..................................|ale-javascript-jscs| + jshint................................|ale-javascript-jshint| + prettier..............................|ale-javascript-prettier| + prettier-eslint.......................|ale-javascript-prettier-eslint| + prettier-standard.....................|ale-javascript-prettier-standard| + standard..............................|ale-javascript-standard| + xo....................................|ale-javascript-xo| + json....................................|ale-json-options| + clang-format..........................|ale-json-clangformat| + cspell................................|ale-json-cspell| + dprint................................|ale-json-dprint| + eslint................................|ale-json-eslint| + fixjson...............................|ale-json-fixjson| + jsonlint..............................|ale-json-jsonlint| + jq....................................|ale-json-jq| + prettier..............................|ale-json-prettier| + spectral..............................|ale-json-spectral| + vscodejson............................|ale-json-vscode| + jsonc...................................|ale-jsonc-options| + eslint................................|ale-jsonc-eslint| + jsonnet.................................|ale-jsonnet-options| + jsonnetfmt............................|ale-jsonnet-jsonnetfmt| + jsonnet-lint..........................|ale-jsonnet-jsonnet-lint| + json5...................................|ale-json5-options| + eslint................................|ale-json5-eslint| + julia...................................|ale-julia-options| + languageserver........................|ale-julia-languageserver| + kotlin..................................|ale-kotlin-options| + kotlinc...............................|ale-kotlin-kotlinc| + ktlint................................|ale-kotlin-ktlint| + languageserver........................|ale-kotlin-languageserver| + latex...................................|ale-latex-options| + cspell................................|ale-latex-cspell| + write-good............................|ale-latex-write-good| + textlint..............................|ale-latex-textlint| + less....................................|ale-less-options| + lessc.................................|ale-less-lessc| + prettier..............................|ale-less-prettier| + stylelint.............................|ale-less-stylelint| + llvm....................................|ale-llvm-options| + llc...................................|ale-llvm-llc| + lua.....................................|ale-lua-options| + cspell................................|ale-lua-cspell| + lua-format............................|ale-lua-lua-format| + luac..................................|ale-lua-luac| + luacheck..............................|ale-lua-luacheck| + luafmt................................|ale-lua-luafmt| + selene................................|ale-lua-selene| + stylua................................|ale-lua-stylua| + make....................................|ale-make-options| + checkmake.............................|ale-make-checkmake| + markdown................................|ale-markdown-options| + cspell................................|ale-markdown-cspell| + dprint................................|ale-markdown-dprint| + markdownlint..........................|ale-markdown-markdownlint| + mdl...................................|ale-markdown-mdl| + pandoc................................|ale-markdown-pandoc| + prettier..............................|ale-markdown-prettier| + remark-lint...........................|ale-markdown-remark-lint| + textlint..............................|ale-markdown-textlint| + write-good............................|ale-markdown-write-good| + mercury.................................|ale-mercury-options| + mmc...................................|ale-mercury-mmc| + nasm....................................|ale-nasm-options| + nasm..................................|ale-nasm-nasm| + nim.....................................|ale-nim-options| + nimcheck..............................|ale-nim-nimcheck| + nimlsp................................|ale-nim-nimlsp| + nimpretty.............................|ale-nim-nimpretty| + nix.....................................|ale-nix-options| + nixfmt................................|ale-nix-nixfmt| + nixpkgs-fmt...........................|ale-nix-nixpkgs-fmt| + statix................................|ale-nix-statix| + nroff...................................|ale-nroff-options| + write-good............................|ale-nroff-write-good| + objc....................................|ale-objc-options| + ccls..................................|ale-objc-ccls| + clang.................................|ale-objc-clang| + clang-format..........................|ale-objc-clangformat| + clangd................................|ale-objc-clangd| + uncrustify............................|ale-objc-uncrustify| + objcpp..................................|ale-objcpp-options| + clang.................................|ale-objcpp-clang| + clangd................................|ale-objcpp-clangd| + uncrustify............................|ale-objcpp-uncrustify| + ocaml...................................|ale-ocaml-options| + dune..................................|ale-ocaml-dune| + merlin................................|ale-ocaml-merlin| + ocamllsp..............................|ale-ocaml-ocamllsp| + ols...................................|ale-ocaml-ols| + ocamlformat...........................|ale-ocaml-ocamlformat| + ocp-indent............................|ale-ocaml-ocp-indent| + openapi.................................|ale-openapi-options| + ibm_validator.........................|ale-openapi-ibm-validator| + prettier..............................|ale-openapi-prettier| + yamllint..............................|ale-openapi-yamllint| + openscad................................|ale-openscad-options| + sca2d.................................|ale-openscad-sca2d| + packer..................................|ale-packer-options| + packer-fmt-fixer......................|ale-packer-fmt-fixer| + pascal..................................|ale-pascal-options| + ptop..................................|ale-pascal-ptop| + pawn....................................|ale-pawn-options| + uncrustify............................|ale-pawn-uncrustify| + perl....................................|ale-perl-options| + perl..................................|ale-perl-perl| + perlcritic............................|ale-perl-perlcritic| + perltidy..............................|ale-perl-perltidy| + perl6...................................|ale-perl6-options| + perl6.................................|ale-perl6-perl6| + php.....................................|ale-php-options| + cspell................................|ale-php-cspell| + langserver............................|ale-php-langserver| + phan..................................|ale-php-phan| + phpcbf................................|ale-php-phpcbf| + phpcs.................................|ale-php-phpcs| + phpmd.................................|ale-php-phpmd| + phpstan...............................|ale-php-phpstan| + psalm.................................|ale-php-psalm| + php-cs-fixer..........................|ale-php-php-cs-fixer| + php...................................|ale-php-php| + pint..................................|ale-php-pint| + tlint.................................|ale-php-tlint| + intelephense..........................|ale-php-intelephense| + po......................................|ale-po-options| + write-good............................|ale-po-write-good| + pod.....................................|ale-pod-options| + write-good............................|ale-pod-write-good| + pony....................................|ale-pony-options| + ponyc.................................|ale-pony-ponyc| + powershell..............................|ale-powershell-options| + cspell................................|ale-powershell-cspell| + powershell............................|ale-powershell-powershell| + psscriptanalyzer......................|ale-powershell-psscriptanalyzer| + prolog..................................|ale-prolog-options| + swipl.................................|ale-prolog-swipl| + proto...................................|ale-proto-options| + buf-format............................|ale-proto-buf-format| + buf-lint..............................|ale-proto-buf-lint| + clang-format..........................|ale-proto-clangformat| + protoc-gen-lint.......................|ale-proto-protoc-gen-lint| + protolint.............................|ale-proto-protolint| + pug.....................................|ale-pug-options| + puglint...............................|ale-pug-puglint| + puppet..................................|ale-puppet-options| + puppet................................|ale-puppet-puppet| + puppetlint............................|ale-puppet-puppetlint| + puppet-languageserver.................|ale-puppet-languageserver| + purescript..............................|ale-purescript-options| + purescript-language-server............|ale-purescript-language-server| + purs-tidy.............................|ale-purescript-tidy| + purty.................................|ale-purescript-purty| + pyrex (cython)..........................|ale-pyrex-options| + cython................................|ale-pyrex-cython| + python..................................|ale-python-options| + autoflake.............................|ale-python-autoflake| + autoimport............................|ale-python-autoimport| + autopep8..............................|ale-python-autopep8| + bandit................................|ale-python-bandit| + black.................................|ale-python-black| + cspell................................|ale-python-cspell| + flake8................................|ale-python-flake8| + flakehell.............................|ale-python-flakehell| + isort.................................|ale-python-isort| + mypy..................................|ale-python-mypy| + prospector............................|ale-python-prospector| + pycodestyle...........................|ale-python-pycodestyle| + pydocstyle............................|ale-python-pydocstyle| + pyflakes..............................|ale-python-pyflakes| + pyflyby...............................|ale-python-pyflyby| + pylama................................|ale-python-pylama| + pylint................................|ale-python-pylint| + pylsp.................................|ale-python-pylsp| + pyre..................................|ale-python-pyre| + pyright...............................|ale-python-pyright| + refurb................................|ale-python-refurb| + reorder-python-imports................|ale-python-reorder_python_imports| + ruff..................................|ale-python-ruff| + unimport..............................|ale-python-unimport| + vulture...............................|ale-python-vulture| + yapf..................................|ale-python-yapf| + qml.....................................|ale-qml-options| + qmlfmt................................|ale-qml-qmlfmt| + r.......................................|ale-r-options| + languageserver........................|ale-r-languageserver| + lintr.................................|ale-r-lintr| + styler................................|ale-r-styler| + racket..................................|ale-racket-options| + racket_langserver.....................|ale-racket-langserver| + raco_fmt..............................|ale-racket-raco-fmt| + reasonml................................|ale-reasonml-options| + merlin................................|ale-reasonml-merlin| + ols...................................|ale-reasonml-ols| + reason-language-server................|ale-reasonml-language-server| + refmt.................................|ale-reasonml-refmt| + rego....................................|ale-rego-options| + cspell................................|ale-rego-cspell| + opacheck..............................|ale-rego-opa-check| + opafmt................................|ale-rego-opa-fmt-fixer| + restructuredtext........................|ale-restructuredtext-options| + cspell................................|ale-restructuredtext-cspell| + textlint..............................|ale-restructuredtext-textlint| + write-good............................|ale-restructuredtext-write-good| + robot...................................|ale-robot-options| + rflint................................|ale-robot-rflint| + ruby....................................|ale-ruby-options| + brakeman..............................|ale-ruby-brakeman| + cspell................................|ale-ruby-cspell| + debride...............................|ale-ruby-debride| + prettier..............................|ale-ruby-prettier| + rails_best_practices..................|ale-ruby-rails_best_practices| + reek..................................|ale-ruby-reek| + rubocop...............................|ale-ruby-rubocop| + ruby..................................|ale-ruby-ruby| + rufo..................................|ale-ruby-rufo| + solargraph............................|ale-ruby-solargraph| + sorbet................................|ale-ruby-sorbet| + standardrb............................|ale-ruby-standardrb| + syntax_tree...........................|ale-ruby-syntax_tree| + rust....................................|ale-rust-options| + analyzer..............................|ale-rust-analyzer| + cargo.................................|ale-rust-cargo| + cspell................................|ale-rust-cspell| + rls...................................|ale-rust-rls| + rustc.................................|ale-rust-rustc| + rustfmt...............................|ale-rust-rustfmt| + salt....................................|ale-salt-options| + salt-lint.............................|ale-salt-salt-lint| + sass....................................|ale-sass-options| + sasslint..............................|ale-sass-sasslint| + stylelint.............................|ale-sass-stylelint| + scala...................................|ale-scala-options| + cspell................................|ale-scala-cspell| + metals................................|ale-scala-metals| + sbtserver.............................|ale-scala-sbtserver| + scalafmt..............................|ale-scala-scalafmt| + scalastyle............................|ale-scala-scalastyle| + scss....................................|ale-scss-options| + prettier..............................|ale-scss-prettier| + sasslint..............................|ale-scss-sasslint| + stylelint.............................|ale-scss-stylelint| + sh......................................|ale-sh-options| + bashate...............................|ale-sh-bashate| + cspell................................|ale-sh-cspell| + sh-language-server....................|ale-sh-language-server| + shell.................................|ale-sh-shell| + shellcheck............................|ale-sh-shellcheck| + shfmt.................................|ale-sh-shfmt| + sml.....................................|ale-sml-options| + smlnj.................................|ale-sml-smlnj| + solidity................................|ale-solidity-options| + solc..................................|ale-solidity-solc| + solhint...............................|ale-solidity-solhint| + solium................................|ale-solidity-solium| + spec....................................|ale-spec-options| + rpmlint...............................|ale-spec-rpmlint| + sql.....................................|ale-sql-options| + dprint................................|ale-sql-dprint| + pgformatter...........................|ale-sql-pgformatter| + sqlfluff..............................|ale-sql-sqlfluff| + sqlfmt................................|ale-sql-sqlfmt| + sqlformat.............................|ale-sql-sqlformat| + stylus..................................|ale-stylus-options| + stylelint.............................|ale-stylus-stylelint| + sugarss.................................|ale-sugarss-options| + stylelint.............................|ale-sugarss-stylelint| + svelte..................................|ale-svelte-options| + prettier..............................|ale-svelte-prettier| + svelteserver..........................|ale-svelte-svelteserver| + swift...................................|ale-swift-options| + apple-swift-format....................|ale-swift-apple-swift-format| + cspell................................|ale-swift-cspell| + sourcekitlsp..........................|ale-swift-sourcekitlsp| + systemd.................................|ale-systemd-options| + systemd-analyze.......................|ale-systemd-analyze| + tcl.....................................|ale-tcl-options| + nagelfar..............................|ale-tcl-nagelfar| + terraform...............................|ale-terraform-options| + checkov...............................|ale-terraform-checkov| + terraform-fmt-fixer...................|ale-terraform-fmt-fixer| + terraform.............................|ale-terraform-terraform| + terraform-ls..........................|ale-terraform-terraform-ls| + terraform-lsp.........................|ale-terraform-terraform-lsp| + tflint................................|ale-terraform-tflint| + tfsec.................................|ale-terraform-tfsec| + tex.....................................|ale-tex-options| + chktex................................|ale-tex-chktex| + cspell................................|ale-tex-cspell| + lacheck...............................|ale-tex-lacheck| + latexindent...........................|ale-tex-latexindent| + texlab................................|ale-tex-texlab| + texinfo.................................|ale-texinfo-options| + cspell................................|ale-texinfo-cspell| + write-good............................|ale-texinfo-write-good| + text....................................|ale-text-options| + cspell................................|ale-text-cspell| + textlint..............................|ale-text-textlint| + write-good............................|ale-text-write-good| + thrift..................................|ale-thrift-options| + thrift................................|ale-thrift-thrift| + thriftcheck...........................|ale-thrift-thriftcheck| + toml....................................|ale-toml-options| + dprint................................|ale-toml-dprint| + typescript..............................|ale-typescript-options| + cspell................................|ale-typescript-cspell| + deno..................................|ale-typescript-deno| + dprint................................|ale-typescript-dprint| + eslint................................|ale-typescript-eslint| + prettier..............................|ale-typescript-prettier| + standard..............................|ale-typescript-standard| + tslint................................|ale-typescript-tslint| + tsserver..............................|ale-typescript-tsserver| + xo....................................|ale-typescript-xo| + v.......................................|ale-v-options| + v.....................................|ale-v-v| + vfmt..................................|ale-v-vfmt| + vala....................................|ale-vala-options| + uncrustify............................|ale-vala-uncrustify| + verilog/systemverilog...................|ale-verilog-options| + hdl-checker...........................|ale-verilog-hdl-checker| + iverilog..............................|ale-verilog-iverilog| + verilator.............................|ale-verilog-verilator| + vlog..................................|ale-verilog-vlog| + xvlog.................................|ale-verilog-xvlog| + yosys.................................|ale-verilog-yosys| + vhdl....................................|ale-vhdl-options| + ghdl..................................|ale-vhdl-ghdl| + hdl-checker...........................|ale-vhdl-hdl-checker| + vcom..................................|ale-vhdl-vcom| + xvhdl.................................|ale-vhdl-xvhdl| + vim help................................|ale-vim-help-options| + write-good............................|ale-vim-help-write-good| + vim.....................................|ale-vim-options| + vimls.................................|ale-vim-vimls| + vint..................................|ale-vim-vint| + vue.....................................|ale-vue-options| + cspell................................|ale-vue-cspell| + prettier..............................|ale-vue-prettier| + vls...................................|ale-vue-vls| + volar.................................|ale-vue-volar| + wgsl....................................|ale-wgsl-options| + naga..................................|ale-wgsl-naga| + xhtml...................................|ale-xhtml-options| + cspell................................|ale-xhtml-cspell| + write-good............................|ale-xhtml-write-good| + xml.....................................|ale-xml-options| + xmllint...............................|ale-xml-xmllint| + yaml....................................|ale-yaml-options| + actionlint............................|ale-yaml-actionlint| + circleci..............................|ale-yaml-circleci| + prettier..............................|ale-yaml-prettier| + spectral..............................|ale-yaml-spectral| + swaglint..............................|ale-yaml-swaglint| + yaml-language-server..................|ale-yaml-language-server| + yamlfix...............................|ale-yaml-yamlfix| + yamllint..............................|ale-yaml-yamllint| + gitlablint............................|ale-yaml-gitlablint| + yang....................................|ale-yang-options| + yang-lsp..............................|ale-yang-lsp| + zeek....................................|ale-zeek-options| + zeek..................................|ale-zeek-zeek| + zig.....................................|ale-zig-options| + zigfmt................................|ale-zig-zigfmt| + zls...................................|ale-zig-zls| + + +=============================================================================== +8. Commands/Keybinds *ale-commands* + +ALEComplete *ALEComplete* + + Manually trigger LSP autocomplete and show the menu. Works only when called + from insert mode. > + + inoremap :ALEComplete +< + A plug mapping `(ale_complete)` is defined for this command. > + + imap (ale_complete) +< +ALEDocumentation *ALEDocumentation* + + Similar to the |ALEHover| command, retrieve documentation information for + the symbol at the cursor. Documentation data will always be shown in a + preview window, no matter how small the documentation content is. + + NOTE: This command is only available for `tsserver`. + + A plug mapping `(ale_documentation)` is defined for this command. + + +ALEFindReferences *ALEFindReferences* + + Find references in the codebase for the symbol under the cursor using the + enabled LSP linters for the buffer. ALE will display a preview window + containing the results if some references are found. + + The window can be navigated using the usual Vim navigation commands. The + Enter key (``) can be used to jump to a referencing location, or the `t` + key can be used to jump to the location in a new tab. + + The locations opened in different ways using the following variations. + + `:ALEFindReferences -tab` - Open the location in a new tab. + `:ALEFindReferences -split` - Open the location in a horizontal split. + `:ALEFindReferences -vsplit` - Open the location in a vertical split. + `:ALEFindReferences -quickfix` - Put the locations into quickfix list. + + The default method used for navigating to a new location can be changed + by modifying |g:ale_default_navigation|. + + You can add `-relative` to the command to view results with relatives paths, + instead of absolute paths. This option has no effect if `-quickfix` is used. + + The selection can be opened again with the |ALERepeatSelection| command. + + You can jump back to the position you were at before going to a reference of + something with jump motions like CTRL-O. See |jump-motions|. + + A plug mapping `(ale_find_references)` is defined for this command. + You can define additional plug mapping with any additional options you want + like so: > + + nnoremap (my_mapping) :ALEFindReferences -relative +< + +ALEFix *ALEFix* + + Fix problems with the current buffer. See |ale-fix| for more information. + + If the command is run with a bang (`:ALEFix!`), all warnings will be + suppressed, including warnings about no fixers being defined, and warnings + about not being able to apply fixes to a file because it has been changed. + + A plug mapping `(ale_fix)` is defined for this command. + + +ALEFixSuggest *ALEFixSuggest* + + Suggest tools that can be used to fix problems in the current buffer. + + See |ale-fix| for more information. + + +ALEGoToDefinition `` *ALEGoToDefinition* + + Jump to the definition of a symbol under the cursor using the enabled LSP + linters for the buffer. ALE will jump to a definition if an LSP server + provides a location to jump to. Otherwise, ALE will do nothing. + + The locations opened in different ways using the following variations. + + `:ALEGoToDefinition -tab` - Open the location in a new tab. + `:ALEGoToDefinition -split` - Open the location in a horizontal split. + `:ALEGoToDefinition -vsplit` - Open the location in a vertical split. + + The default method used for navigating to a new location can be changed + by modifying |g:ale_default_navigation|. + + You can jump back to the position you were at before going to the definition + of something with jump motions like CTRL-O. See |jump-motions|. + + You should consider using the 'hidden' option in combination with this + command. Otherwise, Vim will refuse to leave the buffer you're jumping from + unless you have saved your edits. + + The following Plug mappings are defined for this command, which correspond + to the following commands. + + `(ale_go_to_definition)` - `:ALEGoToDefinition` + `(ale_go_to_definition_in_tab)` - `:ALEGoToDefinition -tab` + `(ale_go_to_definition_in_split)` - `:ALEGoToDefinition -split` + `(ale_go_to_definition_in_vsplit)` - `:ALEGoToDefinition -vsplit` + + +ALEGoToTypeDefinition *ALEGoToTypeDefinition* + + This works similar to |ALEGoToDefinition| but instead jumps to the + definition of a type of a symbol under the cursor. ALE will jump to a + definition if an LSP server provides a location to jump to. Otherwise, ALE + will do nothing. + + The locations opened in different ways using the following variations. + + `:ALEGoToTypeDefinition -tab` - Open the location in a new tab. + `:ALEGoToTypeDefinition -split` - Open the location in a horizontal split. + `:ALEGoToTypeDefinition -vsplit` - Open the location in a vertical split. + + The default method used for navigating to a new location can be changed + by modifying |g:ale_default_navigation|. + + You can jump back to the position you were at before going to the definition + of something with jump motions like CTRL-O. See |jump-motions|. + + The following Plug mappings are defined for this command, which correspond + to the following commands. + + `(ale_go_to_type_definition)` - `:ALEGoToTypeDefinition` + `(ale_go_to_type_definition_in_tab)` - `:ALEGoToTypeDefinition -tab` + `(ale_go_to_type_definition_in_split)` - `:ALEGoToTypeDefinition -split` + `(ale_go_to_type_definition_in_vsplit)` - `:ALEGoToTypeDefinition -vsplit` + + +ALEGoToImplementation *ALEGoToImplementation* + + This works similar to |ALEGoToDefinition| but instead jumps to the + implementation of symbol under the cursor. ALE will jump to a definition if + an LSP server provides a location to jump to. Otherwise, ALE will do nothing. + + The locations opened in different ways using the following variations. + + `:ALEGoToImplementation -tab` - Open the location in a new tab. + `:ALEGoToImplementation -split` - Open the location in a horizontal split. + `:ALEGoToImplementation -vsplit` - Open the location in a vertical split. + + The default method used for navigating to a new location can be changed + by modifying |g:ale_default_navigation|. + + You can jump back to the position you were at before going to the definition + of something with jump motions like CTRL-O. See |jump-motions|. + + The following Plug mappings are defined for this command, which correspond + to the following commands. + + `(ale_go_to_implementation)` - `:ALEGoToImplementation` + `(ale_go_to_implementation_in_tab)` - `:ALEGoToImplementation -tab` + `(ale_go_to_implementation_in_split)` - `:ALEGoToImplementation -split` + `(ale_go_to_implementation_in_vsplit)` - `:ALEGoToImplementation -vsplit` + + +ALEHover *ALEHover* + + Print brief information about the symbol under the cursor, taken from any + available LSP linters. There may be a small non-blocking delay before + information is printed. + + NOTE: In Vim 8, long messages will be shown in a preview window, as Vim 8 + does not support showing a prompt to press enter to continue for long + messages from asynchronous callbacks. + + A plug mapping `(ale_hover)` is defined for this command. + + +ALEImport *ALEImport* + + Try to import a symbol using `tsserver` or a Language Server. + + ALE will look for completions for the word at the cursor which contain + additional text edits that possible insert lines to import the symbol. The + first match with additional text edits will be used, and may add other code + to the current buffer other than import lines. + + If linting is enabled, and |g:ale_lint_on_text_changed| is set to ever check + buffers when text is changed, the buffer will be checked again after changes + are made. + + A Plug mapping `(ale_import)` is defined for this command. This + mapping should only be bound for normal mode. + + +ALEOrganizeImports *ALEOrganizeImports* + + Organize imports using tsserver. Currently not implemented for LSPs. + + +ALERename *ALERename* + + Rename a symbol using `tsserver` or a Language Server. + + The symbol where the cursor is resting will be the symbol renamed, and a + prompt will open to request a new name. + + The rename operation will save all modified buffers when `set nohidden` is + set, because that disables leaving unsaved buffers in the background. See + `:help hidden` for more details. + +ALEFileRename *ALEFileRename* + + Rename a file and fix imports using `tsserver`. + +ALECodeAction *ALECodeAction* + + Apply a code action via LSP servers or `tsserver`. + + If there is an error present on a line that can be fixed, ALE will + automatically fix a line, unless there are multiple possible code fixes to + apply. + + This command can be run in visual mode apply actions, such as applicable + refactors. A menu will be shown to select code action to apply. + + +ALERepeatSelection *ALERepeatSelection* + + Repeat the last selection displayed in the preview window. + + +ALESymbolSearch `` *ALESymbolSearch* + + Search for symbols in the workspace, taken from any available LSP linters. + + The arguments provided to this command will be used as a search query for + finding symbols in the workspace, such as functions, types, etc. + + You can add `-relative` to the command to view results with relatives paths, + instead of absolute paths. + + *:ALELint* +ALELint *ALELint* + + Run ALE once for the current buffer. This command can be used to run ALE + manually, instead of automatically, if desired. + + This command will also run linters where `lint_file` is evaluates to `1`, + meaning linters which check the file instead of the Vim buffer. + + A plug mapping `(ale_lint)` is defined for this command. + + +ALELintStop *ALELintStop* + + Stop any currently running jobs for checking the current buffer. + + Any problems from previous linter results will continue to be shown. + + +ALEPopulateQuickfix *ALEPopulateQuickfix* +ALEPopulateLocList *ALEPopulateLocList* + + Manually populate the |quickfix| or |location-list| and show the + corresponding list. Useful when you have other uses for both the |quickfix| + and |location-list| and don't want them automatically populated. Be sure to + disable auto populating: > + + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 +< + With these settings, ALE will still run checking and display it with signs, + highlighting, and other output described in |ale-lint-file-linters|. + +ALEPrevious *ALEPrevious* +ALEPreviousWrap *ALEPreviousWrap* +ALENext *ALENext* +ALENextWrap *ALENextWrap* +ALEFirst *ALEFirst* +ALELast *ALELast* + *ale-navigation-commands* + + Move between warnings or errors in a buffer. ALE will only navigate between + the errors or warnings it generated, even if both |g:ale_set_quickfix| + and |g:ale_set_loclist| are set to `0`. + + `ALEPrevious` and `ALENext` will stop at the top and bottom of a file, while + `ALEPreviousWrap` and `ALENextWrap` will wrap around the file to find + the last or first warning or error in the file, respectively. + + `ALEPrevious` and `ALENext` take optional flags arguments to custom their + behavior : + `-wrap` enable wrapping around the file + `-error`, `-warning` and `-info` enable jumping to errors, warnings or infos + respectively, ignoring anything else. They are mutually exclusive and if + several are provided the priority is the following: error > warning > info. + `-style` and `-nostyle` allow you to jump respectively to style error or + warning and to not style error or warning. They also are mutually + exclusive and nostyle has priority over style. + + Flags can be combined to create create custom jumping. Thus you can use + ":ALENext -wrap -error -nosyle" to jump to the next error which is not a + style error while going back to the beginning of the file if needed. + + `ALEFirst` goes to the first error or warning in the buffer, while `ALELast` + goes to the last one. + + The following || mappings are defined for the commands: > + (ale_previous) - ALEPrevious + (ale_previous_wrap) - ALEPreviousWrap + (ale_previous_error) - ALEPrevious -error + (ale_previous_wrap_error) - ALEPrevious -wrap -error + (ale_previous_warning) - ALEPrevious -warning + (ale_previous_wrap_warning) - ALEPrevious -wrap -warning + (ale_next) - ALENext + (ale_next_wrap) - ALENextWrap + (ale_next_error) - ALENext -error + (ale_next_wrap_error) - ALENext -wrap -error + (ale_next_warning) - ALENext -warning + (ale_next_wrap_warning) - ALENext -wrap -warning + (ale_first) - ALEFirst + (ale_last) - ALELast +< + For example, these commands could be bound to the keys Ctrl + j + and Ctrl + k: > + + " Map movement through errors without wrapping. + nmap (ale_previous) + nmap (ale_next) + " OR map keys to use wrapping. + nmap (ale_previous_wrap) + nmap (ale_next_wrap) +< + +ALEToggle *ALEToggle* +ALEEnable *ALEEnable* +ALEDisable *ALEDisable* +ALEToggleBuffer *ALEToggleBuffer* +ALEEnableBuffer *ALEEnableBuffer* +ALEDisableBuffer *ALEDisableBuffer* + + `ALEToggle`, `ALEEnable`, and `ALEDisable` enable or disable ALE linting, + including all of its autocmd events, loclist items, quickfix items, signs, + current jobs, etc., globally. Executing any of these commands will change + the |g:ale_enabled| variable. + + ALE can be disabled or enabled for only a single buffer with + `ALEToggleBuffer`, `ALEEnableBuffer`, and `ALEDisableBuffer`. Disabling ALE + for a buffer will not remove autocmd events, but will prevent ALE from + checking for problems and reporting problems for whatever buffer the + `ALEDisableBuffer` or `ALEToggleBuffer` command is executed from. These + commands can be used for temporarily disabling ALE for a buffer. These + commands will modify the |b:ale_enabled| variable. + + ALE linting cannot be enabled for a single buffer when it is disabled + globally, as disabling ALE globally removes the autocmd events needed to + perform linting with. + + The following plug mappings are defined, for conveniently defining keybinds: + + |ALEToggle| - `(ale_toggle)` + |ALEEnable| - `(ale_enable)` + |ALEDisable| - `(ale_disable)` + |ALEToggleBuffer| - `(ale_toggle_buffer)` + |ALEEnableBuffer| - `(ale_enable_buffer)` + |ALEDisableBuffer| - `(ale_disable_buffer)` + + For removing problems reported by ALE, but leaving ALE enabled, see + |ALEReset| and |ALEResetBuffer|. + + *:ALEDetail* +ALEDetail *ALEDetail* + + Show the full linter message for the problem nearest to the cursor on the + given line in the preview window. The preview window can be easily closed + with the `q` key. If there is no message to show, the window will not be + opened. + + If a loclist item has a `detail` key set, the message for that key will be + preferred over `text`. See |ale-loclist-format|. + + A plug mapping `(ale_detail)` is defined for this command. + + + *:ALEInfo* +ALEInfo *ALEInfo* +ALEInfoToClipboard *ALEInfoToClipboard* + + Print runtime information about ALE, including the values of global and + buffer-local settings for ALE, the linters that are enabled, the commands + that have been run, and the output of commands. + + ALE will log the commands that are run by default. If you wish to disable + this, set |g:ale_history_enabled| to `0`. Because it could be expensive, ALE + does not remember the output of recent commands by default. Set + |g:ale_history_log_output| to `1` to enable logging of output for commands. + ALE will only log the output captured for parsing problems, etc. + + The command `:ALEInfoToClipboard` can be used to output ALEInfo directly to + your clipboard. This might not work on every machine. + + `:ALEInfoToFile` will write the ALE runtime information to a given filename. + The filename works just like |:w|. + + +ALEReset *ALEReset* +ALEResetBuffer *ALEResetBuffer* + + `ALEReset` will remove all problems reported by ALE for all buffers. + `ALEResetBuffer` will remove all problems reported for a single buffer. + + Either command will leave ALE linting enabled, so ALE will report problems + when linting is performed again. See |ale-lint| for more information. + + The following plug mappings are defined, for conveniently defining keybinds: + + |ALEReset| - `(ale_reset)` + |ALEResetBuffer| - `(ale_reset_buffer)` + + ALE can be disabled globally or for a buffer with |ALEDisable| or + |ALEDisableBuffer|. + + +ALEStopAllLSPs *ALEStopAllLSPs* + + `ALEStopAllLSPs` will close and stop all channels and jobs for all LSP-like + clients, including tsserver, remove all of the data stored for them, and + delete all of the problems found for them, updating every linted buffer. + + This command can be used when LSP clients mess up and need to be restarted. + + +=============================================================================== +9. API *ale-api* + +ALE offers a number of functions for running linters or fixers, or defining +them. The following functions are part of the publicly documented part of that +API, and should be expected to continue to work. + + +ale#Env(variable_name, value) *ale#Env()* + + Given a variable name and a string value, produce a string for including in + a command for setting environment variables. This function can be used for + building a command like so. > + + :echo string(ale#Env('VAR', 'some value') . 'command') + 'VAR=''some value'' command' # On Linux or Mac OSX + 'set VAR="some value" && command' # On Windows + + +ale#GetFilenameMappings(buffer, name) *ale#GetFilenameMappings()* + + Given a `buffer` and the `name` of either a linter for fixer, return a + |List| of two-item |List|s that describe mapping to and from the local and + foreign file systems for running a particular linter or fixer. + + See |g:ale_filename_mappings| for details on filename mapping. + + +ale#Has(feature) *ale#Has()* + + Return `1` if ALE supports a given feature, like |has()| for Vim features. + + ALE versions can be checked with version strings in the format + `ale#Has('ale-x.y.z')`, such as `ale#Has('ale-2.4.0')`. + + +ale#Pad(string) *ale#Pad()* + + Given a string or any |empty()| value, return either the string prefixed + with a single space, or an empty string. This function can be used to build + parts of a command from variables. + + +ale#Queue(delay, [linting_flag, buffer_number]) *ale#Queue()* + + Run linters for the current buffer, based on the filetype of the buffer, + with a given `delay`. A `delay` of `0` will run the linters immediately. + The linters will always be run in the background. Calling this function + again from the same buffer + + An optional `linting_flag` argument can be given. If `linting_flag` is + `'lint_file'`, then linters where the `lint_file` option evaluates to `1` + will be run. Otherwise, those linters will not be run. + + An optional `buffer_number` argument can be given for specifying the buffer + to check. The active buffer (`bufnr('')`) will be checked by default. + + *ale-cool-down* + If an exception is thrown when queuing/running ALE linters, ALE will enter + a cool down period where it will stop checking anything for a short period + of time. This is to prevent ALE from seriously annoying users if a linter + is broken, or when developing ALE itself. + + +ale#command#CreateDirectory(buffer) *ale#command#CreateDirectory()* + + Create a new temporary directory with a unique name, and manage that + directory with |ale#command#ManageDirectory()|, so it will be removed as soon + as possible. + + It is advised to only call this function from a callback function for + returning a linter command to run. + + +ale#command#CreateFile(buffer) *ale#command#CreateFile()* + + Create a new temporary file with a unique name, and manage that file with + |ale#command#ManageFile()|, so it will be removed as soon as possible. + + It is advised to only call this function from a callback function for + returning a linter command to run. + + +ale#command#Run(buffer, command, callback, [options]) *ale#command#Run()* + + Start running a job in the background, and pass the results to the given + callback later. + + This function can be used for computing the results of ALE linter or fixer + functions asynchronously with jobs. `buffer` must match the buffer being + linted or fixed, `command` must be a |String| for a shell command to + execute, `callback` must be defined as a |Funcref| to call later with the + results, and an optional |Dictionary| of `options` can be provided. + + The `callback` will receive the arguments `(buffer, output, metadata)`, + where the `buffer` will match the buffer given to the function, the `output` + will be a `List` of lines of output from the job that was run, and the + `metadata` will be a |Dictionary| with additional information about the job + that was run, including: + + `exit_code` - A |Number| with the exit code for the program that was run. + + The result of this function is either a special |Dictionary| ALE will use + for waiting for the command to finish, or `0` if the job is not started. The + The return value of the `callback` will be used as the eventual result for + whatever value is being given to ALE. For example: > + + function! s:GetCommand(buffer, output, meta) abort + " Do something with a:output here, from the foo command. + + " This is used as the command to run for linting. + return 'final command' + endfunction + + " ... + + 'command': {b -> ale#command#Run(b, 'foo', function('s:GetCommand'))} +< + The result of a callback can also be the result of another call to this + function, so that several commands can be arbitrarily chained together. For + example: > + + function! s:GetAnotherCommand(buffer, output, meta) abort + " We can finally return this command. + return 'last command' + endfunction + + function! s:GetCommand(buffer, output, meta) abort + " We can return another deferred result. + return ale#command#Run( + \ a:buffer, + \ 'second command', + \ function('s:GetAnotherCommand') + \) + endfunction + + " ... + + 'command': {b -> ale#command#Run(b, 'foo', function('s:GetCommand'))} +< + The following `options` can be provided. + + `cwd` - An optional |String| for setting the working directory + for the command, just as per |ale#linter#Define|. + + If not set, or `v:null`, the `cwd` of the last command + that spawned this one will be used. + + `output_stream` - Either `'stdout'`, `'stderr'`, `'both'`, or + `'none`' for selecting which output streams to read + lines from. + + The default is `'stdout'` + + `executable` - An executable for formatting into `%e` in the + command. If this option is not provided, formatting + commands with `%e` will not work. + + `read_buffer` - If set to `1`, the buffer will be piped into the + command. + + The default is `0`. + + `input` - When creating temporary files with `%t` or piping + text into a command `input` can be set to a |List| of + text to use instead of the buffer's text. + + `filename_mappings` - A |List| of two-item |List|s describing filename + mappings to apply for formatted filenames in the + command string, as per |g:ale_filename_mappings|. + + If the call to this function is being used for a + linter or fixer, the mappings should be provided with + this option, and can be retrieved easily with + |ale#GetFilenameMappings()|. + + The default is `[]`. + + + +ale#command#EscapeCommandPart(command_part) *ale#command#EscapeCommandPart()* + + Given a |String|, return a |String| with all `%` characters replaced with + `%%` instead. This function can be used to escape strings which are + dynamically generated for commands before handing them over to ALE, + so that ALE doesn't treat any strings with `%` formatting sequences + specially. + + +ale#command#ManageDirectory(buffer, directory) *ale#command#ManageDirectory()* + + Like |ale#command#ManageFile()|, but directories and all of their contents + will be deleted, akin to `rm -rf directory`, which could lead to loss of + data if mistakes are made. This command will also delete any temporary + filenames given to it. + + It is advised to use |ale#command#ManageFile()| instead for deleting single + files. + + +ale#command#ManageFile(buffer, filename) *ale#command#ManageFile()* + + Given a buffer number for a buffer currently running some linting or fixing + tasks and a filename, register a filename with ALE for automatic deletion + after linting or fixing is complete, or when Vim exits. + + If Vim exits suddenly, ALE will try its best to remove temporary files, but + ALE cannot guarantee with absolute certainty that the files will be removed. + It is advised to create temporary files in the operating system's managed + temporary file directory, such as with |tempname()|. + + Directory names should not be given to this function. ALE will only delete + files and symlinks given to this function. This is to prevent entire + directories from being accidentally deleted, say in cases of writing + `dir . '/' . filename` where `filename` is actually `''`, etc. ALE instead + manages directories separately with the |ale#command#ManageDirectory| function. + + +ale#completion#OmniFunc(findstart, base) *ale#completion#OmniFunc()* + + A completion function to use with 'omnifunc'. + + See |ale-completion|. + + +ale#engine#GetLoclist(buffer) *ale#engine#GetLoclist()* + + Given a buffer number, this function will return the list of problems + reported by ALE for a given buffer in the format accepted by |setqflist()|. + + A reference to the buffer's list of problems will be returned. The list must + be copied before applying |map()| or |filter()|. + + +ale#engine#IsCheckingBuffer(buffer) *ale#engine#IsCheckingBuffer()* + + Given a buffer number, returns `1` when ALE is busy checking that buffer. + + This function can be used for status lines, tab names, etc. + + +ale#fix#registry#Add(name, func, filetypes, desc, [aliases]) + *ale#fix#registry#Add()* + + Given a |String| `name` for a name to add to the registry, a |String| `func` + for a function name, a |List| `filetypes` for a list of filetypes to + set for suggestions, and a |String| `desc` for a short description of + the fixer, register a fixer in the registry. + + The `name` can then be used for |g:ale_fixers| in place of the function + name, and suggested for fixing files. + + An optional |List| of |String|s for aliases can be passed as the `aliases` + argument. These aliases can also be used for looking up a fixer function. + ALE will search for fixers in the registry first by `name`, then by their + `aliases`. + + For example to register a custom fixer for `luafmt`: > + + function! FormatLua(buffer) abort + return { + \ 'command': 'luafmt --stdin' + \} + endfunction + + execute ale#fix#registry#Add('luafmt', 'FormatLua', ['lua'], 'luafmt for lua') + + " You can now use it in g:ale_fixers + let g:ale_fixers = { + \ 'lua': ['luafmt'] + } +< + +ale#linter#Define(filetype, linter) *ale#linter#Define()* + + Given a |String| for a filetype and a |Dictionary| Describing a linter + configuration, add a linter for the given filetype. The dictionaries each + offer the following options: + + `name` The name of the linter. These names will be used by + |g:ale_linters| option for enabling/disabling + particular linters. + + This argument is required. + + `callback` A |String| or |Funcref| for a callback function + accepting two arguments (buffer, lines), for a + buffer number the output is for, and the lines of + output from a linter. + + This callback function should return a |List| of + |Dictionary| objects in the format accepted by + |setqflist()|. The |List| will be sorted by line and + then column order so it can be searched with a binary + search by in future before being passed on to the + |loclist|, etc. + + This argument is required, unless the linter is an + LSP linter. In which case, this argument must not be + defined, as LSP linters handle diagnostics + automatically. See |ale-lsp-linters|. + + If the function named does not exist, including if + the function is later deleted, ALE will behave as if + the callback returned an empty list. + + The keys for each item in the List will be handled in + the following manner: + *ale-loclist-format* + `text` - This error message is required. + `detail` - An optional, more descriptive message. + This message can be displayed with the |ALEDetail| + command instead of the message for `text`, if set. + `lnum` - The line number is required. Any strings + will be automatically converted to numbers by + using `str2nr()`. + + Line 0 will be moved to line 1, and lines beyond + the end of the file will be moved to the end. + `col` - The column number is optional and will + default to `0`. Any strings will be automatically + converted to number using `str2nr()`. + `end_col` - An optional end column number. + This key can be set to specify the column problems + end on, for improved highlighting. + `end_lnum` - An optional end line number. + This key can set along with `end_col` for + highlighting multi-line problems. + `bufnr` - This key represents the buffer number the + problems are for. This value will default to + the buffer number being checked. + + The `filename` key can be set instead of this key, + and then the eventual `bufnr` value in the final + list will either represent the number for an open + buffer or `-1` for a file not open in any buffer. + `filename` - An optional filename for the file the + problems are for. This should be an absolute path to + a file. + + Problems for files which have not yet been opened + will be set in those files after they are opened + and have been checked at least once. + + Temporary files in directories used for Vim + temporary files with `tempname()` will be assumed + to be the buffer being checked, unless the `bufnr` + key is also set with a valid number for some other + buffer. + `vcol` - Defaults to `0`. + + If set to `1`, ALE will convert virtual column + positions for `col` and `end_col` to byte column + positions. If the buffer is changed in-between + checking it and displaying the results, the + calculated byte column positions will probably be + wrong. + `type` - Defaults to `'E'`. + `nr` - Defaults to `-1`. + + Numeric error code. If `nr` is not `-1`, `code` + likely should contain the string representation of + the same value. + `code` - No default; may be unset. + + Human-readable |String| error code. + + `executable` A |String| naming the executable itself which + will be run, or a |Funcref| for a function to call + for computing the executable, accepting a buffer + number. + + The result can be computed with |ale#command#Run()|. + + This value will be used to check if the program + requested is installed or not. + + If an `executable` is not defined, the command will + be run without checking if a program is executable + first. Defining an executable path is recommended to + avoid starting too many processes. + + `command` A |String| for a command to run asynchronously, or a + |Funcref| for a function to call for computing the + command, accepting a buffer number. + + The result can be computed with |ale#command#Run()|. + + The command string can be formatted with format + markers. See |ale-command-format-strings|. + + This command will be fed the lines from the buffer to + check, and will produce the lines of output given to + the `callback`. + + `cwd` An optional |String| for setting the working + directory for the command, or a |Funcref| for a + function to call for computing the command, accepting + a buffer number. The working directory can be + specified as a format string for determining the path + dynamically. See |ale-command-format-strings|. + + To set the working directory to the directory + containing the file you're checking, you should + probably use `'%s:h'` as the option value. + + If this option is absent or the string is empty, the + `command` will be run with no determined working + directory in particular. + + The directory specified with this option will be used + as the default working directory for all commands run + in a chain with |ale#command#Run()|, unless otherwise + specified. + + `output_stream` A |String| for the output stream the lines of output + should be read from for the command which is run. The + accepted values are `'stdout'`, `'stderr'`, and + `'both'`. This argument defaults to `'stdout'`. This + argument can be set for linter programs which output + their errors and warnings to the stderr stream + instead of stdout. The option `'both'` will read + from both stder and stdout at the same time. + + `read_buffer` A |Number| (`0` or `1`) indicating whether a command + should read the Vim buffer as input via stdin. This + option is set to `1` by default, and can be disabled + if a command manually reads from a temporary file + instead, etc. + + This option behaves as if it was set to `0` when the + `lint_file` option evaluates to `1`. + + *ale-lint-file* + `lint_file` A |Number| (`0` or `1`), or a |Funcref| for a function + accepting a buffer number for computing either `0` or + `1`, indicating whether a command should read the file + instead of the Vim buffer. This option can be used + for linters which must check the file on disk, and + which cannot check a Vim buffer instead. + + The result can be computed with |ale#command#Run()|. + + Linters where the eventual value of this option + evaluates to `1` will not be run as a user types, per + |g:ale_lint_on_text_changed|. Linters will instead be + run only when events occur against the file on disk, + including |g:ale_lint_on_enter| and + |g:ale_lint_on_save|. Linters where this option + evaluates to `1` will also be run when the |ALELint| + command is run. + + When this option is evaluates to `1`, ALE will behave + as if `read_buffer` was set to `0`. + + *ale-lsp-linters* + `lsp` A |String| for defining LSP (Language Server Protocol) + linters. + + This argument may be omitted or `''` when a linter + does not represent an LSP linter. + + When this argument is set to `'stdio'`, then the + linter will be defined as an LSP linter which keeps a + process for a language server running, and + communicates with it directly via a |channel|. + `executable` and `command` must be set. + + When this argument is set to `'socket'`, then the + linter will be defined as an LSP linter via a TCP + or named pipe socket connection. `address` must be set. + + ALE will not start a server automatically. + + When this argument is not empty `project_root` must + be defined. + + `language` can be defined to describe the language + for a file. The filetype will be used as the language + by default. + + LSP linters handle diagnostics automatically, so + the `callback` argument must not be defined. + + An optional `completion_filter` callback may be + defined for filtering completion results. + + `initialization_options` may be defined to pass + initialization options to the LSP. + + `lsp_config` may be defined to pass configuration + settings to the LSP. + + `address` A |String| representing an address to connect to, + or a |Funcref| accepting a buffer number and + returning the |String|. If the value contains a + colon, it is interpreted as referring to a TCP + socket; otherwise it is interpreted as the path of a + named pipe. + + The result can be computed with |ale#command#Run()|. + + This argument must only be set if the `lsp` argument + is set to `'socket'`. + + `project_root` A |String| representing a path to the project for + the file being checked with the language server, or + a |Funcref| accepting a buffer number and returning + the |String|. + + If an empty string is returned, the file will not be + checked at all. + + This argument must only be set if the `lsp` argument + is also set to a non-empty string. + + `language` A |String| representing the name of the language + being checked, or a |Funcref| accepting a buffer + number and returning the |String|. This string will + be sent to the LSP to tell it what type of language + is being checked. + + If a language isn't provided, the language will + default to the value of the filetype given to + |ale#linter#Define|. + + `completion_filter` A |String| or |Funcref| for a callback function + accepting a buffer number and a completion item. + + The completion item will be a |Dictionary| following + the Language Server Protocol `CompletionItem` + interface as described in the specification, + available online here: + https://microsoft.github.io/language-server-protocol + + `aliases` A |List| of aliases for the linter name. + + This argument can be set with alternative names for + selecting the linter with |g:ale_linters|. This + setting can make it easier to guess the linter name + by offering a few alternatives. + + `initialization_options` A |Dictionary| of initialization options for LSPs, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. + + This will be fed (as JSON) to the LSP in the + initialize command. + + `lsp_config` A |Dictionary| for configuring a language server, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. + + This will be fed (as JSON) to the LSP in the + workspace/didChangeConfiguration command. + + If temporary files or directories are created for commands run with + `command`, then these temporary files or directories can be managed by ALE, + for automatic deletion. See |ale#command#ManageFile()| and + |ale#command#ManageDirectory| for more information. + + *ale-command-format-strings* + + All command strings will be formatted for special character sequences. + Any substring `%s` will be replaced with the full path to the current file + being edited. This format option can be used to pass the exact filename + being edited to a program. + + For example: > + 'command': 'eslint -f unix --stdin --stdin-filename %s' +< + Any substring `%t` will be replaced with a path to a temporary file. Merely + adding `%t` will cause ALE to create a temporary file containing the + contents of the buffer being checked. All occurrences of `%t` in command + strings will reference the one temporary file. The temporary file will be + created inside a temporary directory, and the entire temporary directory + will be automatically deleted, following the behavior of + |ale#command#ManageDirectory|. This option can be used for some linters which + do not support reading from stdin. + + For example: > + 'command': 'ghc -fno-code -v0 %t', +< + Any substring `%e` will be replaced with the escaped executable supplied + with `executable`. This provides a convenient way to define a command string + which needs to include a dynamic executable name, but which is otherwise + static. + + For example: > + 'command': '%e --some-argument', +< + The character sequence `%%` can be used to emit a literal `%` into a + command, so literal character sequences `%s` and `%t` can be escaped by + using `%%s` and `%%t` instead, etc. + + Some |filename-modifiers| can be applied to `%s` and `%t`. Only `:h`, `:t`, + `:r`, and `:e` may be applied, other modifiers will be ignored. Filename + modifiers can be applied to the format markers by placing them after them. + + For example: > + 'command': '%s:h %s:e %s:h:t', +< + Given a path `/foo/baz/bar.txt`, the above command string will generate + something akin to `'/foo/baz' 'txt' 'baz'` + + If a callback for a command generates part of a command string which might + possibly contain `%%`, `%s`, `%t`, or `%e`, where the special formatting + behavior is not desired, the |ale#command#EscapeCommandPart()| function can + be used to replace those characters to avoid formatting issues. + + *ale-linter-loading-behavior* + + Linters for ALE will be loaded by searching |runtimepath| in the following + format: > + + ale_linters//.vim +< + Any linters which exist anywhere in |runtimepath| with that directory + structure will be automatically loaded for the matching |filetype|. Filetypes + containing `.` characters will be split into individual parts, and files + will be loaded for each filetype between the `.` characters. + + Linters can be defined from vimrc and other files as long as this function + is loaded first. For example, the following code will define a Hello World + linter in vimrc in Vim 8: > + + " Plugins have to be loaded first. + " If you are using a plugin manager, run that first. + packloadall + + call ale#linter#Define('vim', { + \ 'name': 'echo-test', + \ 'executable': 'echo', + \ 'command': 'echo hello world', + \ 'callback': {buffer, lines -> map(lines, '{"text": v:val, "lnum": 1}')}, + \}) +< + +ale#linter#Get(filetype) *ale#linter#Get()* + + Return all of linters configured for a given filetype as a |List| of + |Dictionary| values in the format specified by |ale#linter#Define()|. + + Filetypes may be dot-separated to invoke linters for multiple filetypes: + for instance, the filetype `javascript.jsx` will return linters for both the + `javascript` and `jsx` filetype. + + Aliases may be defined in as described in |g:ale_linter_aliases|. Aliases + are applied after dot-separated filetypes are broken up into their + components. + + +ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()* + + Given a `filetype`, prevent any more linters from being loaded from + |runtimepath| for that filetype. This function can be called from vimrc or + similar to prevent ALE from loading linters. + + +ale#lsp_linter#SendRequest(buffer, linter_name, message, [Handler]) + *ale#lsp_linter#SendRequest()* + + Send a custom request to an LSP linter. The arguments are defined as + follows: + + `buffer` A valid buffer number. + + `linter_name` A |String| identifying an LSP linter that is available and + enabled for the |filetype| of `buffer`. + + `message` A |List| in the form `[is_notification, method, parameters]`, + containing three elements: + `is_notification` - an |Integer| that has value 1 if the + request is a notification, 0 otherwise; + `method` - a |String|, identifying an LSP method supported + by `linter`; + `parameters` - a |dictionary| of LSP parameters that are + applicable to `method`. + + `Handler` Optional argument, meaningful only when `message[0]` is 0. + A |Funcref| that is called when a response to the request is + received, and takes as unique argument a dictionary + representing the response obtained from the server. + + +ale#other_source#ShowResults(buffer, linter_name, loclist) + *ale#other_source#ShowResults()* + + Show results from another source of information. + + `buffer` must be a valid buffer number, and `linter_name` must be a unique + name for identifying another source of information. The `loclist` given + where the problems in a buffer are, and should be provided in the format ALE + uses for regular linter results. See |ale-loclist-format|. + + +ale#other_source#StartChecking(buffer, linter_name) + *ale#other_source#StartChecking()* + + Tell ALE that another source of information has started checking a buffer. + + `buffer` must be a valid buffer number, and `linter_name` must be a unique + name for identifying another source of information. + + +ale#statusline#Count(buffer) *ale#statusline#Count()* + + Given the number of a buffer which may have problems, return a |Dictionary| + containing information about the number of problems detected by ALE. The + following keys are supported: + + `error` -> The number of problems with type `E` and `sub_type != 'style'` + `warning` -> The number of problems with type `W` and `sub_type != 'style'` + `info` -> The number of problems with type `I` + `style_error` -> The number of problems with type `E` and `sub_type == 'style'` + `style_warning` -> The number of problems with type `W` and `sub_type == 'style'` + `total` -> The total number of problems. + + +ale#statusline#FirstProblem(buffer, type) *ale#statusline#FirstProblem()* + + Returns a copy of the first entry in the `loclist` that matches the supplied + buffer number and problem type. If there is no such entry, an empty dictionary + is returned. + Problem type should be one of the strings listed below: + + `error` -> Returns the first `loclist` item with type `E` and + `sub_type != 'style'` + `warning` -> First item with type `W` and `sub_type != 'style'` + `info` -> First item with type `I` + `style_error` -> First item with type `E` and `sub_type == 'style'` + `style_warning` -> First item with type `W` and `sub_type == 'style'` + + +b:ale_linted *b:ale_linted* + + `b:ale_linted` is set to the number of times a buffer has been checked by + ALE after all linters for one lint cycle have finished checking a buffer. + This variable may not be defined until ALE first checks a buffer, so it + should be accessed with |get()| or |getbufvar()|. For example: > + + " Print a message indicating how many times ALE has checked this buffer. + echo 'ALE has checked this buffer ' . get(b:, 'ale_linted') . ' time(s).' + " Print 'checked' using getbufvar() if a buffer has been checked. + echo getbufvar(bufnr(''), 'ale_linted', 0) > 0 ? 'checked' : 'not checked' +< + +g:ale_want_results_buffer *g:ale_want_results_buffer* + + `g:ale_want_results_buffer` is set to the number of the buffer being checked + when the |ALEWantResults| event is signaled. This variable should be read to + figure out which buffer other sources should lint. + + +ALECompletePost *ALECompletePost-autocmd* + *ALECompletePost* + + This |User| autocmd is triggered after ALE inserts an item on + |CompleteDone|. This event can be used to run commands after a buffer + is changed by ALE as the result of completion. For example, |ALEFix| can + be configured to run automatically when completion is done: > + + augroup FixAfterComplete + autocmd! + " Run ALEFix when completion items are added. + autocmd User ALECompletePost ALEFix! + " If ALE starts fixing a file, stop linters running for now. + autocmd User ALEFixPre ALELintStop + augroup END +< + +ALELintPre *ALELintPre-autocmd* + *ALELintPre* +ALELintPost *ALELintPost-autocmd* + *ALELintPost* +ALEFixPre *ALEFixPre-autocmd* + *ALEFixPre* +ALEFixPost *ALEFixPost-autocmd* + *ALEFixPost* + + These |User| autocommands are triggered before and after every lint or fix + cycle. They can be used to update statuslines, send notifications, etc. + The autocmd commands are run with |:silent|, so |:unsilent| is required for + echoing messages. + + For example to change the color of the statusline while the linter is + running: +> + augroup ALEProgress + autocmd! + autocmd User ALELintPre hi Statusline ctermfg=darkgrey + autocmd User ALELintPost hi Statusline ctermfg=NONE + augroup END +< + Or to display the progress in the statusline: +> + let s:ale_running = 0 + let l:stl .= '%{s:ale_running ? "[linting]" : ""}' + augroup ALEProgress + autocmd! + autocmd User ALELintPre let s:ale_running = 1 | redrawstatus + autocmd User ALELintPost let s:ale_running = 0 | redrawstatus + augroup END + +< +ALEJobStarted *ALEJobStarted-autocmd* + *ALEJobStarted* + + This |User| autocommand is triggered immediately after a job is successfully + run. This provides better accuracy for checking linter status with + |ale#engine#IsCheckingBuffer()| over |ALELintPre-autocmd|, which is actually + triggered before any linters are executed. + +ALELSPStarted *ALELSPStarted-autocmd* + *ALELSPStarted* + + This |User| autocommand is triggered immediately after an LSP connection is + successfully initialized. This provides a way to perform any additional + initialization work, such as setting up buffer-level mappings. + + +ALEWantResults *ALEWantResults-autocmd* + *ALEWantResults* + + This |User| autocommand is triggered before ALE begins a lint cycle. Another + source can respond by calling |ale#other_source#StartChecking()|, and + |ALELintPre| will be signaled thereafter, to allow other plugins to know + that another source is checking the buffer. + + |g:ale_want_results_buffer| will be set to the number for a buffer being + checked when the event is signaled, and deleted after the event is done. + This variable should be read to know which buffer to check. + + Other plugins can use this event to start checking buffers when ALE events + for checking buffers are triggered. + + +=============================================================================== +10. Special Thanks *ale-special-thanks* + +Special thanks to Mark Grealish (https://www.bhalash.com/) for providing ALE's +snazzy looking ale glass logo. Cheers, Mark! + +=============================================================================== +11. Contact *ale-contact* + +If you like this plugin, and wish to get in touch, check out the GitHub +page for issues and more at https://github.com/dense-analysis/ale + +If you wish to contact the author of this plugin directly, please feel +free to send an email to devw0rp@gmail.com. + +Please drink responsibly, or not at all, which is ironically the preference +of w0rp, who is teetotal. + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/dot_vim/plugged/ale/doc/tags b/dot_vim/plugged/ale/doc/tags new file mode 100644 index 0000000..88da9b4 --- /dev/null +++ b/dot_vim/plugged/ale/doc/tags @@ -0,0 +1,2561 @@ +:ALEDetail ale.txt /*:ALEDetail* +:ALEInfo ale.txt /*:ALEInfo* +:ALELint ale.txt /*:ALELint* +ALECodeAction ale.txt /*ALECodeAction* +ALEComplete ale.txt /*ALEComplete* +ALECompletePost ale.txt /*ALECompletePost* +ALECompletePost-autocmd ale.txt /*ALECompletePost-autocmd* +ALEDetail ale.txt /*ALEDetail* +ALEDisable ale.txt /*ALEDisable* +ALEDisableBuffer ale.txt /*ALEDisableBuffer* +ALEDocumentation ale.txt /*ALEDocumentation* +ALEEnable ale.txt /*ALEEnable* +ALEEnableBuffer ale.txt /*ALEEnableBuffer* +ALEError ale.txt /*ALEError* +ALEErrorLine ale.txt /*ALEErrorLine* +ALEErrorSign ale.txt /*ALEErrorSign* +ALEErrorSignLineNr ale.txt /*ALEErrorSignLineNr* +ALEFileRename ale.txt /*ALEFileRename* +ALEFindReferences ale.txt /*ALEFindReferences* +ALEFirst ale.txt /*ALEFirst* +ALEFix ale.txt /*ALEFix* +ALEFixPost ale.txt /*ALEFixPost* +ALEFixPost-autocmd ale.txt /*ALEFixPost-autocmd* +ALEFixPre ale.txt /*ALEFixPre* +ALEFixPre-autocmd ale.txt /*ALEFixPre-autocmd* +ALEFixSuggest ale.txt /*ALEFixSuggest* +ALEGoToDefinition ale.txt /*ALEGoToDefinition* +ALEGoToImplementation ale.txt /*ALEGoToImplementation* +ALEGoToTypeDefinition ale.txt /*ALEGoToTypeDefinition* +ALEHover ale.txt /*ALEHover* +ALEImport ale.txt /*ALEImport* +ALEInfo ale.txt /*ALEInfo* +ALEInfo-highlight ale.txt /*ALEInfo-highlight* +ALEInfo. ale.txt /*ALEInfo.* +ALEInfoLine ale.txt /*ALEInfoLine* +ALEInfoSign ale.txt /*ALEInfoSign* +ALEInfoSignLineNr ale.txt /*ALEInfoSignLineNr* +ALEInfoToClipboard ale.txt /*ALEInfoToClipboard* +ALEJobStarted ale.txt /*ALEJobStarted* +ALEJobStarted-autocmd ale.txt /*ALEJobStarted-autocmd* +ALELSPStarted ale.txt /*ALELSPStarted* +ALELSPStarted-autocmd ale.txt /*ALELSPStarted-autocmd* +ALELast ale.txt /*ALELast* +ALELint ale.txt /*ALELint* +ALELintPost ale.txt /*ALELintPost* +ALELintPost-autocmd ale.txt /*ALELintPost-autocmd* +ALELintPre ale.txt /*ALELintPre* +ALELintPre-autocmd ale.txt /*ALELintPre-autocmd* +ALELintStop ale.txt /*ALELintStop* +ALENext ale.txt /*ALENext* +ALENextWrap ale.txt /*ALENextWrap* +ALEOrganizeImports ale.txt /*ALEOrganizeImports* +ALEPopulateLocList ale.txt /*ALEPopulateLocList* +ALEPopulateQuickfix ale.txt /*ALEPopulateQuickfix* +ALEPrevious ale.txt /*ALEPrevious* +ALEPreviousWrap ale.txt /*ALEPreviousWrap* +ALERename ale.txt /*ALERename* +ALERepeatSelection ale.txt /*ALERepeatSelection* +ALEReset ale.txt /*ALEReset* +ALEResetBuffer ale.txt /*ALEResetBuffer* +ALEStopAllLSPs ale.txt /*ALEStopAllLSPs* +ALEStyleError ale.txt /*ALEStyleError* +ALEStyleErrorSign ale.txt /*ALEStyleErrorSign* +ALEStyleErrorSignLineNr ale.txt /*ALEStyleErrorSignLineNr* +ALEStyleWarning ale.txt /*ALEStyleWarning* +ALEStyleWarningSign ale.txt /*ALEStyleWarningSign* +ALEStyleWarningSignLineNr ale.txt /*ALEStyleWarningSignLineNr* +ALESymbolSearch ale.txt /*ALESymbolSearch* +ALEToggle ale.txt /*ALEToggle* +ALEToggleBuffer ale.txt /*ALEToggleBuffer* +ALEVirtualTextError ale.txt /*ALEVirtualTextError* +ALEVirtualTextInfo ale.txt /*ALEVirtualTextInfo* +ALEVirtualTextStyleError ale.txt /*ALEVirtualTextStyleError* +ALEVirtualTextStyleWarning ale.txt /*ALEVirtualTextStyleWarning* +ALEVirtualTextWarning ale.txt /*ALEVirtualTextWarning* +ALEWantResults ale.txt /*ALEWantResults* +ALEWantResults-autocmd ale.txt /*ALEWantResults-autocmd* +ALEWarning ale.txt /*ALEWarning* +ALEWarningLine ale.txt /*ALEWarningLine* +ALEWarningSign ale.txt /*ALEWarningSign* +ALEWarningSignLineNr ale.txt /*ALEWarningSignLineNr* +ale ale.txt /*ale* +ale#Env() ale.txt /*ale#Env()* +ale#GetFilenameMappings() ale.txt /*ale#GetFilenameMappings()* +ale#Has() ale.txt /*ale#Has()* +ale#Pad() ale.txt /*ale#Pad()* +ale#Queue() ale.txt /*ale#Queue()* +ale#command#CreateDirectory() ale.txt /*ale#command#CreateDirectory()* +ale#command#CreateFile() ale.txt /*ale#command#CreateFile()* +ale#command#EscapeCommandPart() ale.txt /*ale#command#EscapeCommandPart()* +ale#command#ManageDirectory() ale.txt /*ale#command#ManageDirectory()* +ale#command#ManageFile() ale.txt /*ale#command#ManageFile()* +ale#command#Run() ale.txt /*ale#command#Run()* +ale#completion#OmniFunc() ale.txt /*ale#completion#OmniFunc()* +ale#engine#GetLoclist() ale.txt /*ale#engine#GetLoclist()* +ale#engine#IsCheckingBuffer() ale.txt /*ale#engine#IsCheckingBuffer()* +ale#fix#registry#Add() ale.txt /*ale#fix#registry#Add()* +ale#linter#Define() ale.txt /*ale#linter#Define()* +ale#linter#Get() ale.txt /*ale#linter#Get()* +ale#linter#PreventLoading() ale.txt /*ale#linter#PreventLoading()* +ale#lsp_linter#SendRequest() ale.txt /*ale#lsp_linter#SendRequest()* +ale#other_source#ShowResults() ale.txt /*ale#other_source#ShowResults()* +ale#other_source#StartChecking() ale.txt /*ale#other_source#StartChecking()* +ale#statusline#Count() ale.txt /*ale#statusline#Count()* +ale#statusline#FirstProblem() ale.txt /*ale#statusline#FirstProblem()* +ale-ada-cspell ale-ada.txt /*ale-ada-cspell* +ale-ada-gcc ale-ada.txt /*ale-ada-gcc* +ale-ada-gnatpp ale-ada.txt /*ale-ada-gnatpp* +ale-ada-language-server ale-ada.txt /*ale-ada-language-server* +ale-ada-options ale-ada.txt /*ale-ada-options* +ale-alex-options ale.txt /*ale-alex-options* +ale-ansible-ansible-lint ale-ansible.txt /*ale-ansible-ansible-lint* +ale-ansible-language-server ale-ansible.txt /*ale-ansible-language-server* +ale-ansible-options ale-ansible.txt /*ale-ansible-options* +ale-api ale.txt /*ale-api* +ale-apkbuild-apkbuild-lint ale-apkbuild.txt /*ale-apkbuild-apkbuild-lint* +ale-apkbuild-options ale-apkbuild.txt /*ale-apkbuild-options* +ale-apkbuild-secfixes-check ale-apkbuild.txt /*ale-apkbuild-secfixes-check* +ale-asciidoc-cspell ale-asciidoc.txt /*ale-asciidoc-cspell* +ale-asciidoc-options ale-asciidoc.txt /*ale-asciidoc-options* +ale-asciidoc-textlint ale-asciidoc.txt /*ale-asciidoc-textlint* +ale-asciidoc-write-good ale-asciidoc.txt /*ale-asciidoc-write-good* +ale-asm-gcc ale-asm.txt /*ale-asm-gcc* +ale-asm-options ale-asm.txt /*ale-asm-options* +ale-asyncomplete-integration ale.txt /*ale-asyncomplete-integration* +ale-avra-avra ale-avra.txt /*ale-avra-avra* +ale-avra-options ale-avra.txt /*ale-avra-options* +ale-awk-gawk ale-awk.txt /*ale-awk-gawk* +ale-awk-options ale-awk.txt /*ale-awk-options* +ale-bats-options ale-bats.txt /*ale-bats-options* +ale-bats-shellcheck ale-bats.txt /*ale-bats-shellcheck* +ale-bazel-buildifier ale-bazel.txt /*ale-bazel-buildifier* +ale-bazel-options ale-bazel.txt /*ale-bazel-options* +ale-bib-bibclean ale-bib.txt /*ale-bib-bibclean* +ale-bib-options ale-bib.txt /*ale-bib-options* +ale-bicep-bicep ale-bicep.txt /*ale-bicep-bicep* +ale-bicep-options ale-bicep.txt /*ale-bicep-options* +ale-bitbake-oelint_adv ale-bitbake.txt /*ale-bitbake-oelint_adv* +ale-bitbake-options ale-bitbake.txt /*ale-bitbake-options* +ale-c-astyle ale-c.txt /*ale-c-astyle* +ale-c-cc ale-c.txt /*ale-c-cc* +ale-c-ccls ale-c.txt /*ale-c-ccls* +ale-c-clang ale-c.txt /*ale-c-clang* +ale-c-clangd ale-c.txt /*ale-c-clangd* +ale-c-clangformat ale-c.txt /*ale-c-clangformat* +ale-c-clangtidy ale-c.txt /*ale-c-clangtidy* +ale-c-cppcheck ale-c.txt /*ale-c-cppcheck* +ale-c-cquery ale-c.txt /*ale-c-cquery* +ale-c-cspell ale-c.txt /*ale-c-cspell* +ale-c-flawfinder ale-c.txt /*ale-c-flawfinder* +ale-c-gcc ale-c.txt /*ale-c-gcc* +ale-c-options ale-c.txt /*ale-c-options* +ale-c-uncrustify ale-c.txt /*ale-c-uncrustify* +ale-cairo-options ale-cairo.txt /*ale-cairo-options* +ale-cairo-starknet ale-cairo.txt /*ale-cairo-starknet* +ale-chef-cookstyle ale-chef.txt /*ale-chef-cookstyle* +ale-chef-foodcritic ale-chef.txt /*ale-chef-foodcritic* +ale-chef-options ale-chef.txt /*ale-chef-options* +ale-clojure-clj-kondo ale-clojure.txt /*ale-clojure-clj-kondo* +ale-clojure-joker ale-clojure.txt /*ale-clojure-joker* +ale-clojure-options ale-clojure.txt /*ale-clojure-options* +ale-cloudformation-cfn-python-lint ale-cloudformation.txt /*ale-cloudformation-cfn-python-lint* +ale-cloudformation-options ale-cloudformation.txt /*ale-cloudformation-options* +ale-cmake-cmake-lint ale-cmake.txt /*ale-cmake-cmake-lint* +ale-cmake-cmakeformat ale-cmake.txt /*ale-cmake-cmakeformat* +ale-cmake-cmakelint ale-cmake.txt /*ale-cmake-cmakelint* +ale-cmake-options ale-cmake.txt /*ale-cmake-options* +ale-coding-standards ale-development.txt /*ale-coding-standards* +ale-command-format-strings ale.txt /*ale-command-format-strings* +ale-commands ale.txt /*ale-commands* +ale-completion ale.txt /*ale-completion* +ale-completion-completeopt-bug ale.txt /*ale-completion-completeopt-bug* +ale-completion-fallback ale.txt /*ale-completion-fallback* +ale-contact ale.txt /*ale-contact* +ale-contents ale.txt /*ale-contents* +ale-cool-down ale.txt /*ale-cool-down* +ale-cpp-astyle ale-cpp.txt /*ale-cpp-astyle* +ale-cpp-cc ale-cpp.txt /*ale-cpp-cc* +ale-cpp-ccls ale-cpp.txt /*ale-cpp-ccls* +ale-cpp-clang ale-cpp.txt /*ale-cpp-clang* +ale-cpp-clangcheck ale-cpp.txt /*ale-cpp-clangcheck* +ale-cpp-clangd ale-cpp.txt /*ale-cpp-clangd* +ale-cpp-clangformat ale-cpp.txt /*ale-cpp-clangformat* +ale-cpp-clangtidy ale-cpp.txt /*ale-cpp-clangtidy* +ale-cpp-clazy ale-cpp.txt /*ale-cpp-clazy* +ale-cpp-cppcheck ale-cpp.txt /*ale-cpp-cppcheck* +ale-cpp-cpplint ale-cpp.txt /*ale-cpp-cpplint* +ale-cpp-cquery ale-cpp.txt /*ale-cpp-cquery* +ale-cpp-cspell ale-cpp.txt /*ale-cpp-cspell* +ale-cpp-flawfinder ale-cpp.txt /*ale-cpp-flawfinder* +ale-cpp-gcc ale-cpp.txt /*ale-cpp-gcc* +ale-cpp-options ale-cpp.txt /*ale-cpp-options* +ale-cpp-uncrustify ale-cpp.txt /*ale-cpp-uncrustify* +ale-cs-clangformat ale-cs.txt /*ale-cs-clangformat* +ale-cs-csc ale-cs.txt /*ale-cs-csc* +ale-cs-cspell ale-cs.txt /*ale-cs-cspell* +ale-cs-dotnet-format ale-cs.txt /*ale-cs-dotnet-format* +ale-cs-mcs ale-cs.txt /*ale-cs-mcs* +ale-cs-mcsc ale-cs.txt /*ale-cs-mcsc* +ale-cs-options ale-cs.txt /*ale-cs-options* +ale-cs-uncrustify ale-cs.txt /*ale-cs-uncrustify* +ale-cspell-options ale.txt /*ale-cspell-options* +ale-css-cspell ale-css.txt /*ale-css-cspell* +ale-css-css-beautify ale-css.txt /*ale-css-css-beautify* +ale-css-fecs ale-css.txt /*ale-css-fecs* +ale-css-options ale-css.txt /*ale-css-options* +ale-css-prettier ale-css.txt /*ale-css-prettier* +ale-css-stylelint ale-css.txt /*ale-css-stylelint* +ale-css-vscode ale-css.txt /*ale-css-vscode* +ale-cuda-clangd ale-cuda.txt /*ale-cuda-clangd* +ale-cuda-clangformat ale-cuda.txt /*ale-cuda-clangformat* +ale-cuda-nvcc ale-cuda.txt /*ale-cuda-nvcc* +ale-cuda-options ale-cuda.txt /*ale-cuda-options* +ale-d-dfmt ale-d.txt /*ale-d-dfmt* +ale-d-dls ale-d.txt /*ale-d-dls* +ale-d-options ale-d.txt /*ale-d-options* +ale-d-uncrustify ale-d.txt /*ale-d-uncrustify* +ale-dafny-dafny ale-dafny.txt /*ale-dafny-dafny* +ale-dafny-options ale-dafny.txt /*ale-dafny-options* +ale-dart-analysis_server ale-dart.txt /*ale-dart-analysis_server* +ale-dart-analyze ale-dart.txt /*ale-dart-analyze* +ale-dart-dartfmt ale-dart.txt /*ale-dart-dartfmt* +ale-dart-format ale-dart.txt /*ale-dart-format* +ale-dart-options ale-dart.txt /*ale-dart-options* +ale-deoplete-integration ale.txt /*ale-deoplete-integration* +ale-design-goals ale-development.txt /*ale-design-goals* +ale-desktop-desktop-file-validate ale-desktop.txt /*ale-desktop-desktop-file-validate* +ale-desktop-options ale-desktop.txt /*ale-desktop-options* +ale-dev ale-development.txt /*ale-dev* +ale-dev-tests ale-development.txt /*ale-dev-tests* +ale-development ale-development.txt /*ale-development* +ale-development-contents ale-development.txt /*ale-development-contents* +ale-development-contributing ale-development.txt /*ale-development-contributing* +ale-development-fixer-tests ale-development.txt /*ale-development-fixer-tests* +ale-development-introduction ale-development.txt /*ale-development-introduction* +ale-development-linter-tests ale-development.txt /*ale-development-linter-tests* +ale-development-release ale-development.txt /*ale-development-release* +ale-development-tests ale-development.txt /*ale-development-tests* +ale-development-windows-tests ale-development.txt /*ale-development-windows-tests* +ale-development.txt ale-development.txt /*ale-development.txt* +ale-dhall-format ale-dhall.txt /*ale-dhall-format* +ale-dhall-freeze ale-dhall.txt /*ale-dhall-freeze* +ale-dhall-lint ale-dhall.txt /*ale-dhall-lint* +ale-dhall-options ale-dhall.txt /*ale-dhall-options* +ale-dockerfile-dockerfile_lint ale-dockerfile.txt /*ale-dockerfile-dockerfile_lint* +ale-dockerfile-dprint ale-dockerfile.txt /*ale-dockerfile-dprint* +ale-dockerfile-hadolint ale-dockerfile.txt /*ale-dockerfile-hadolint* +ale-dockerfile-options ale-dockerfile.txt /*ale-dockerfile-options* +ale-dprint-options ale.txt /*ale-dprint-options* +ale-elixir-credo ale-elixir.txt /*ale-elixir-credo* +ale-elixir-cspell ale-elixir.txt /*ale-elixir-cspell* +ale-elixir-dialyxir ale-elixir.txt /*ale-elixir-dialyxir* +ale-elixir-elixir-ls ale-elixir.txt /*ale-elixir-elixir-ls* +ale-elixir-mix ale-elixir.txt /*ale-elixir-mix* +ale-elixir-mix-format ale-elixir.txt /*ale-elixir-mix-format* +ale-elixir-options ale-elixir.txt /*ale-elixir-options* +ale-elm-elm-format ale-elm.txt /*ale-elm-elm-format* +ale-elm-elm-ls ale-elm.txt /*ale-elm-elm-ls* +ale-elm-elm-make ale-elm.txt /*ale-elm-elm-make* +ale-elm-options ale-elm.txt /*ale-elm-options* +ale-erlang-dialyzer ale-erlang.txt /*ale-erlang-dialyzer* +ale-erlang-elvis ale-erlang.txt /*ale-erlang-elvis* +ale-erlang-erlang_ls ale-erlang.txt /*ale-erlang-erlang_ls* +ale-erlang-erlc ale-erlang.txt /*ale-erlang-erlc* +ale-erlang-erlfmt ale-erlang.txt /*ale-erlang-erlfmt* +ale-erlang-options ale-erlang.txt /*ale-erlang-options* +ale-erlang-syntaxerl ale-erlang.txt /*ale-erlang-syntaxerl* +ale-eruby-erblint ale-eruby.txt /*ale-eruby-erblint* +ale-eruby-options ale-eruby.txt /*ale-eruby-options* +ale-eruby-ruumba ale-eruby.txt /*ale-eruby-ruumba* +ale-eslint-nested-configuration-files ale-javascript.txt /*ale-eslint-nested-configuration-files* +ale-find-references ale.txt /*ale-find-references* +ale-fish-fish_indent ale-fish.txt /*ale-fish-fish_indent* +ale-fish-options ale-fish.txt /*ale-fish-options* +ale-fix ale.txt /*ale-fix* +ale-fix-configuration ale.txt /*ale-fix-configuration* +ale-fortran-gcc ale-fortran.txt /*ale-fortran-gcc* +ale-fortran-language-server ale-fortran.txt /*ale-fortran-language-server* +ale-fortran-options ale-fortran.txt /*ale-fortran-options* +ale-fountain-options ale-fountain.txt /*ale-fountain-options* +ale-fuse-fusionlint ale-fuse.txt /*ale-fuse-fusionlint* +ale-fuse-options ale-fuse.txt /*ale-fuse-options* +ale-gitcommit-gitlint ale-gitcommit.txt /*ale-gitcommit-gitlint* +ale-gitcommit-options ale-gitcommit.txt /*ale-gitcommit-options* +ale-glsl-glslang ale-glsl.txt /*ale-glsl-glslang* +ale-glsl-glslls ale-glsl.txt /*ale-glsl-glslls* +ale-glsl-options ale-glsl.txt /*ale-glsl-options* +ale-go-bingo ale-go.txt /*ale-go-bingo* +ale-go-cspell ale-go.txt /*ale-go-cspell* +ale-go-gobuild ale-go.txt /*ale-go-gobuild* +ale-go-gofmt ale-go.txt /*ale-go-gofmt* +ale-go-gofumpt ale-go.txt /*ale-go-gofumpt* +ale-go-golangci-lint ale-go.txt /*ale-go-golangci-lint* +ale-go-golangserver ale-go.txt /*ale-go-golangserver* +ale-go-golines ale-go.txt /*ale-go-golines* +ale-go-golint ale-go.txt /*ale-go-golint* +ale-go-gometalinter ale-go.txt /*ale-go-gometalinter* +ale-go-gopls ale-go.txt /*ale-go-gopls* +ale-go-govet ale-go.txt /*ale-go-govet* +ale-go-options ale-go.txt /*ale-go-options* +ale-go-revive ale-go.txt /*ale-go-revive* +ale-go-staticcheck ale-go.txt /*ale-go-staticcheck* +ale-go-to-definition ale.txt /*ale-go-to-definition* +ale-go-to-implementation ale.txt /*ale-go-to-implementation* +ale-go-to-type-definition ale.txt /*ale-go-to-type-definition* +ale-graphql-eslint ale-graphql.txt /*ale-graphql-eslint* +ale-graphql-gqlint ale-graphql.txt /*ale-graphql-gqlint* +ale-graphql-options ale-graphql.txt /*ale-graphql-options* +ale-graphql-prettier ale-graphql.txt /*ale-graphql-prettier* +ale-hack-hack ale-hack.txt /*ale-hack-hack* +ale-hack-hackfmt ale-hack.txt /*ale-hack-hackfmt* +ale-hack-hhast ale-hack.txt /*ale-hack-hhast* +ale-hack-options ale-hack.txt /*ale-hack-options* +ale-handlebars-embertemplatelint ale-handlebars.txt /*ale-handlebars-embertemplatelint* +ale-handlebars-options ale-handlebars.txt /*ale-handlebars-options* +ale-handlebars-prettier ale-handlebars.txt /*ale-handlebars-prettier* +ale-haskell-brittany ale-haskell.txt /*ale-haskell-brittany* +ale-haskell-cabal-ghc ale-haskell.txt /*ale-haskell-cabal-ghc* +ale-haskell-cspell ale-haskell.txt /*ale-haskell-cspell* +ale-haskell-floskell ale-haskell.txt /*ale-haskell-floskell* +ale-haskell-ghc ale-haskell.txt /*ale-haskell-ghc* +ale-haskell-ghc-mod ale-haskell.txt /*ale-haskell-ghc-mod* +ale-haskell-hdevtools ale-haskell.txt /*ale-haskell-hdevtools* +ale-haskell-hfmt ale-haskell.txt /*ale-haskell-hfmt* +ale-haskell-hie ale-haskell.txt /*ale-haskell-hie* +ale-haskell-hindent ale-haskell.txt /*ale-haskell-hindent* +ale-haskell-hlint ale-haskell.txt /*ale-haskell-hlint* +ale-haskell-hls ale-haskell.txt /*ale-haskell-hls* +ale-haskell-options ale-haskell.txt /*ale-haskell-options* +ale-haskell-ormolu ale-haskell.txt /*ale-haskell-ormolu* +ale-haskell-stack-build ale-haskell.txt /*ale-haskell-stack-build* +ale-haskell-stack-ghc ale-haskell.txt /*ale-haskell-stack-ghc* +ale-haskell-stylish-haskell ale-haskell.txt /*ale-haskell-stylish-haskell* +ale-hcl-options ale-hcl.txt /*ale-hcl-options* +ale-hcl-packer-fmt ale-hcl.txt /*ale-hcl-packer-fmt* +ale-hcl-terraform-fmt ale-hcl.txt /*ale-hcl-terraform-fmt* +ale-help-cspell ale-help.txt /*ale-help-cspell* +ale-help-options ale-help.txt /*ale-help-options* +ale-highlights ale.txt /*ale-highlights* +ale-hover ale.txt /*ale-hover* +ale-html-angular ale-html.txt /*ale-html-angular* +ale-html-beautify ale-html.txt /*ale-html-beautify* +ale-html-cspell ale-html.txt /*ale-html-cspell* +ale-html-fecs ale-html.txt /*ale-html-fecs* +ale-html-htmlhint ale-html.txt /*ale-html-htmlhint* +ale-html-options ale-html.txt /*ale-html-options* +ale-html-prettier ale-html.txt /*ale-html-prettier* +ale-html-stylelint ale-html.txt /*ale-html-stylelint* +ale-html-tidy ale-html.txt /*ale-html-tidy* +ale-html-vscode ale-html.txt /*ale-html-vscode* +ale-html-write-good ale-html.txt /*ale-html-write-good* +ale-idris-idris ale-idris.txt /*ale-idris-idris* +ale-idris-options ale-idris.txt /*ale-idris-options* +ale-ink-language-server ale-ink.txt /*ale-ink-language-server* +ale-ink-options ale-ink.txt /*ale-ink-options* +ale-inko-inko ale-inko.txt /*ale-inko-inko* +ale-inko-options ale-inko.txt /*ale-inko-options* +ale-integration-glsl ale-glsl.txt /*ale-integration-glsl* +ale-integration-hack ale-hack.txt /*ale-integration-hack* +ale-integration-inko ale-inko.txt /*ale-integration-inko* +ale-integration-kotlin ale-kotlin.txt /*ale-integration-kotlin* +ale-integration-options ale.txt /*ale-integration-options* +ale-integration-rust ale-rust.txt /*ale-integration-rust* +ale-integration-spec ale-spec.txt /*ale-integration-spec* +ale-integration-zeek ale-zeek.txt /*ale-integration-zeek* +ale-integration-zig ale-zig.txt /*ale-integration-zig* +ale-integrations-local-executables ale.txt /*ale-integrations-local-executables* +ale-introduction ale.txt /*ale-introduction* +ale-ispc-ispc ale-ispc.txt /*ale-ispc-ispc* +ale-ispc-options ale-ispc.txt /*ale-ispc-options* +ale-java-checkstyle ale-java.txt /*ale-java-checkstyle* +ale-java-clangformat ale-java.txt /*ale-java-clangformat* +ale-java-cspell ale-java.txt /*ale-java-cspell* +ale-java-eclipselsp ale-java.txt /*ale-java-eclipselsp* +ale-java-google-java-format ale-java.txt /*ale-java-google-java-format* +ale-java-javac ale-java.txt /*ale-java-javac* +ale-java-javalsp ale-java.txt /*ale-java-javalsp* +ale-java-options ale-java.txt /*ale-java-options* +ale-java-pmd ale-java.txt /*ale-java-pmd* +ale-java-uncrustify ale-java.txt /*ale-java-uncrustify* +ale-javascript-clangformat ale-javascript.txt /*ale-javascript-clangformat* +ale-javascript-cspell ale-javascript.txt /*ale-javascript-cspell* +ale-javascript-deno ale-javascript.txt /*ale-javascript-deno* +ale-javascript-dprint ale-javascript.txt /*ale-javascript-dprint* +ale-javascript-eslint ale-javascript.txt /*ale-javascript-eslint* +ale-javascript-fecs ale-javascript.txt /*ale-javascript-fecs* +ale-javascript-flow ale-javascript.txt /*ale-javascript-flow* +ale-javascript-importjs ale-javascript.txt /*ale-javascript-importjs* +ale-javascript-jscs ale-javascript.txt /*ale-javascript-jscs* +ale-javascript-jshint ale-javascript.txt /*ale-javascript-jshint* +ale-javascript-options ale-javascript.txt /*ale-javascript-options* +ale-javascript-prettier ale-javascript.txt /*ale-javascript-prettier* +ale-javascript-prettier-eslint ale-javascript.txt /*ale-javascript-prettier-eslint* +ale-javascript-prettier-standard ale-javascript.txt /*ale-javascript-prettier-standard* +ale-javascript-standard ale-javascript.txt /*ale-javascript-standard* +ale-javascript-xo ale-javascript.txt /*ale-javascript-xo* +ale-json-clangformat ale-json.txt /*ale-json-clangformat* +ale-json-cspell ale-json.txt /*ale-json-cspell* +ale-json-dprint ale-json.txt /*ale-json-dprint* +ale-json-eslint ale-json.txt /*ale-json-eslint* +ale-json-fixjson ale-json.txt /*ale-json-fixjson* +ale-json-jq ale-json.txt /*ale-json-jq* +ale-json-jsonlint ale-json.txt /*ale-json-jsonlint* +ale-json-options ale-json.txt /*ale-json-options* +ale-json-prettier ale-json.txt /*ale-json-prettier* +ale-json-spectral ale-json.txt /*ale-json-spectral* +ale-json-vscode ale-json.txt /*ale-json-vscode* +ale-json5-eslint ale-json5.txt /*ale-json5-eslint* +ale-json5-options ale-json5.txt /*ale-json5-options* +ale-jsonc-eslint ale-jsonc.txt /*ale-jsonc-eslint* +ale-jsonc-options ale-jsonc.txt /*ale-jsonc-options* +ale-jsonnet-jsonnet-lint ale-jsonnet.txt /*ale-jsonnet-jsonnet-lint* +ale-jsonnet-jsonnetfmt ale-jsonnet.txt /*ale-jsonnet-jsonnetfmt* +ale-jsonnet-options ale-jsonnet.txt /*ale-jsonnet-options* +ale-julia-languageserver ale-julia.txt /*ale-julia-languageserver* +ale-julia-options ale-julia.txt /*ale-julia-options* +ale-kotlin-kotlinc ale-kotlin.txt /*ale-kotlin-kotlinc* +ale-kotlin-ktlint ale-kotlin.txt /*ale-kotlin-ktlint* +ale-kotlin-languageserver ale-kotlin.txt /*ale-kotlin-languageserver* +ale-kotlin-options ale-kotlin.txt /*ale-kotlin-options* +ale-languagetool-options ale.txt /*ale-languagetool-options* +ale-latex-cspell ale-latex.txt /*ale-latex-cspell* +ale-latex-options ale-latex.txt /*ale-latex-options* +ale-latex-textlint ale-latex.txt /*ale-latex-textlint* +ale-latex-write-good ale-latex.txt /*ale-latex-write-good* +ale-less-lessc ale-less.txt /*ale-less-lessc* +ale-less-options ale-less.txt /*ale-less-options* +ale-less-prettier ale-less.txt /*ale-less-prettier* +ale-less-stylelint ale-less.txt /*ale-less-stylelint* +ale-lint ale.txt /*ale-lint* +ale-lint-file ale.txt /*ale-lint-file* +ale-lint-file-linters ale.txt /*ale-lint-file-linters* +ale-lint-language-servers ale.txt /*ale-lint-language-servers* +ale-lint-other-machines ale.txt /*ale-lint-other-machines* +ale-lint-other-sources ale.txt /*ale-lint-other-sources* +ale-lint-settings-on-startup ale.txt /*ale-lint-settings-on-startup* +ale-linter-loading-behavior ale.txt /*ale-linter-loading-behavior* +ale-linting-interrupts-mapping ale.txt /*ale-linting-interrupts-mapping* +ale-llvm-llc ale-llvm.txt /*ale-llvm-llc* +ale-llvm-options ale-llvm.txt /*ale-llvm-options* +ale-loclist-format ale.txt /*ale-loclist-format* +ale-lsp ale.txt /*ale-lsp* +ale-lsp-linters ale.txt /*ale-lsp-linters* +ale-lua-cspell ale-lua.txt /*ale-lua-cspell* +ale-lua-lua-format ale-lua.txt /*ale-lua-lua-format* +ale-lua-luac ale-lua.txt /*ale-lua-luac* +ale-lua-luacheck ale-lua.txt /*ale-lua-luacheck* +ale-lua-luafmt ale-lua.txt /*ale-lua-luafmt* +ale-lua-options ale-lua.txt /*ale-lua-options* +ale-lua-selene ale-lua.txt /*ale-lua-selene* +ale-lua-stylua ale-lua.txt /*ale-lua-stylua* +ale-make-checkmake ale-make.txt /*ale-make-checkmake* +ale-make-options ale-make.txt /*ale-make-options* +ale-markdown-cspell ale-markdown.txt /*ale-markdown-cspell* +ale-markdown-dprint ale-markdown.txt /*ale-markdown-dprint* +ale-markdown-markdownlint ale-markdown.txt /*ale-markdown-markdownlint* +ale-markdown-mdl ale-markdown.txt /*ale-markdown-mdl* +ale-markdown-options ale-markdown.txt /*ale-markdown-options* +ale-markdown-pandoc ale-markdown.txt /*ale-markdown-pandoc* +ale-markdown-prettier ale-markdown.txt /*ale-markdown-prettier* +ale-markdown-remark-lint ale-markdown.txt /*ale-markdown-remark-lint* +ale-markdown-textlint ale-markdown.txt /*ale-markdown-textlint* +ale-markdown-write-good ale-markdown.txt /*ale-markdown-write-good* +ale-mercury-mmc ale-mercury.txt /*ale-mercury-mmc* +ale-mercury-options ale-mercury.txt /*ale-mercury-options* +ale-nasm-nasm ale-nasm.txt /*ale-nasm-nasm* +ale-nasm-options ale-nasm.txt /*ale-nasm-options* +ale-navigation-commands ale.txt /*ale-navigation-commands* +ale-nim-nimcheck ale-nim.txt /*ale-nim-nimcheck* +ale-nim-nimlsp ale-nim.txt /*ale-nim-nimlsp* +ale-nim-nimpretty ale-nim.txt /*ale-nim-nimpretty* +ale-nim-options ale-nim.txt /*ale-nim-options* +ale-nix-nixfmt ale-nix.txt /*ale-nix-nixfmt* +ale-nix-nixpkgs-fmt ale-nix.txt /*ale-nix-nixpkgs-fmt* +ale-nix-options ale-nix.txt /*ale-nix-options* +ale-nix-statix ale-nix.txt /*ale-nix-statix* +ale-nroff-options ale-nroff.txt /*ale-nroff-options* +ale-nroff-write-good ale-nroff.txt /*ale-nroff-write-good* +ale-objc-ccls ale-objc.txt /*ale-objc-ccls* +ale-objc-clang ale-objc.txt /*ale-objc-clang* +ale-objc-clangd ale-objc.txt /*ale-objc-clangd* +ale-objc-clangformat ale-objc.txt /*ale-objc-clangformat* +ale-objc-options ale-objc.txt /*ale-objc-options* +ale-objc-uncrustify ale-objc.txt /*ale-objc-uncrustify* +ale-objcpp-clang ale-objcpp.txt /*ale-objcpp-clang* +ale-objcpp-clangd ale-objcpp.txt /*ale-objcpp-clangd* +ale-objcpp-options ale-objcpp.txt /*ale-objcpp-options* +ale-objcpp-uncrustify ale-objcpp.txt /*ale-objcpp-uncrustify* +ale-ocaml-dune ale-ocaml.txt /*ale-ocaml-dune* +ale-ocaml-merlin ale-ocaml.txt /*ale-ocaml-merlin* +ale-ocaml-ocamlformat ale-ocaml.txt /*ale-ocaml-ocamlformat* +ale-ocaml-ocamllsp ale-ocaml.txt /*ale-ocaml-ocamllsp* +ale-ocaml-ocp-indent ale-ocaml.txt /*ale-ocaml-ocp-indent* +ale-ocaml-ols ale-ocaml.txt /*ale-ocaml-ols* +ale-ocaml-options ale-ocaml.txt /*ale-ocaml-options* +ale-openapi-ibm-validator ale-openapi.txt /*ale-openapi-ibm-validator* +ale-openapi-options ale-openapi.txt /*ale-openapi-options* +ale-openapi-prettier ale-openapi.txt /*ale-openapi-prettier* +ale-openapi-yamllint ale-openapi.txt /*ale-openapi-yamllint* +ale-openscad-options ale-openscad.txt /*ale-openscad-options* +ale-openscad-sca2d ale-openscad.txt /*ale-openscad-sca2d* +ale-options ale.txt /*ale-options* +ale-other-integration-options ale.txt /*ale-other-integration-options* +ale-packer-fmt-fixer ale-packer.txt /*ale-packer-fmt-fixer* +ale-packer-options ale-packer.txt /*ale-packer-options* +ale-pascal-options ale-pascal.txt /*ale-pascal-options* +ale-pascal-ptop ale-pascal.txt /*ale-pascal-ptop* +ale-pawn-options ale-pawn.txt /*ale-pawn-options* +ale-pawn-uncrustify ale-pawn.txt /*ale-pawn-uncrustify* +ale-perl-options ale-perl.txt /*ale-perl-options* +ale-perl-perl ale-perl.txt /*ale-perl-perl* +ale-perl-perlcritic ale-perl.txt /*ale-perl-perlcritic* +ale-perl-perltidy ale-perl.txt /*ale-perl-perltidy* +ale-perl6-options ale-perl6.txt /*ale-perl6-options* +ale-perl6-perl6 ale-perl6.txt /*ale-perl6-perl6* +ale-php-cspell ale-php.txt /*ale-php-cspell* +ale-php-intelephense ale-php.txt /*ale-php-intelephense* +ale-php-langserver ale-php.txt /*ale-php-langserver* +ale-php-options ale-php.txt /*ale-php-options* +ale-php-phan ale-php.txt /*ale-php-phan* +ale-php-php ale-php.txt /*ale-php-php* +ale-php-php-cs-fixer ale-php.txt /*ale-php-php-cs-fixer* +ale-php-phpcbf ale-php.txt /*ale-php-phpcbf* +ale-php-phpcs ale-php.txt /*ale-php-phpcs* +ale-php-phpmd ale-php.txt /*ale-php-phpmd* +ale-php-phpstan ale-php.txt /*ale-php-phpstan* +ale-php-pint ale-php.txt /*ale-php-pint* +ale-php-psalm ale-php.txt /*ale-php-psalm* +ale-php-tlint ale-php.txt /*ale-php-tlint* +ale-po-options ale-po.txt /*ale-po-options* +ale-po-write-good ale-po.txt /*ale-po-write-good* +ale-pod-options ale-pod.txt /*ale-pod-options* +ale-pod-write-good ale-pod.txt /*ale-pod-write-good* +ale-pony-options ale-pony.txt /*ale-pony-options* +ale-pony-ponyc ale-pony.txt /*ale-pony-ponyc* +ale-powershell-cspell ale-powershell.txt /*ale-powershell-cspell* +ale-powershell-options ale-powershell.txt /*ale-powershell-options* +ale-powershell-powershell ale-powershell.txt /*ale-powershell-powershell* +ale-powershell-psscriptanalyzer ale-powershell.txt /*ale-powershell-psscriptanalyzer* +ale-prolog-options ale-prolog.txt /*ale-prolog-options* +ale-prolog-swipl ale-prolog.txt /*ale-prolog-swipl* +ale-proto-buf-format ale-proto.txt /*ale-proto-buf-format* +ale-proto-buf-lint ale-proto.txt /*ale-proto-buf-lint* +ale-proto-clangformat ale-proto.txt /*ale-proto-clangformat* +ale-proto-options ale-proto.txt /*ale-proto-options* +ale-proto-protoc-gen-lint ale-proto.txt /*ale-proto-protoc-gen-lint* +ale-proto-protolint ale-proto.txt /*ale-proto-protolint* +ale-pug-options ale-pug.txt /*ale-pug-options* +ale-pug-puglint ale-pug.txt /*ale-pug-puglint* +ale-puppet-languageserver ale-puppet.txt /*ale-puppet-languageserver* +ale-puppet-options ale-puppet.txt /*ale-puppet-options* +ale-puppet-puppet ale-puppet.txt /*ale-puppet-puppet* +ale-puppet-puppetlint ale-puppet.txt /*ale-puppet-puppetlint* +ale-purescript-language-server ale-purescript.txt /*ale-purescript-language-server* +ale-purescript-options ale-purescript.txt /*ale-purescript-options* +ale-purescript-purty ale-purescript.txt /*ale-purescript-purty* +ale-purescript-tidy ale-purescript.txt /*ale-purescript-tidy* +ale-pyrex-cython ale-pyrex.txt /*ale-pyrex-cython* +ale-pyrex-options ale-pyrex.txt /*ale-pyrex-options* +ale-python-autoflake ale-python.txt /*ale-python-autoflake* +ale-python-autoimport ale-python.txt /*ale-python-autoimport* +ale-python-autopep8 ale-python.txt /*ale-python-autopep8* +ale-python-bandit ale-python.txt /*ale-python-bandit* +ale-python-black ale-python.txt /*ale-python-black* +ale-python-cspell ale-python.txt /*ale-python-cspell* +ale-python-flake8 ale-python.txt /*ale-python-flake8* +ale-python-flakehell ale-python.txt /*ale-python-flakehell* +ale-python-isort ale-python.txt /*ale-python-isort* +ale-python-mypy ale-python.txt /*ale-python-mypy* +ale-python-options ale-python.txt /*ale-python-options* +ale-python-prospector ale-python.txt /*ale-python-prospector* +ale-python-pycodestyle ale-python.txt /*ale-python-pycodestyle* +ale-python-pydocstyle ale-python.txt /*ale-python-pydocstyle* +ale-python-pyflakes ale-python.txt /*ale-python-pyflakes* +ale-python-pyflyby ale-python.txt /*ale-python-pyflyby* +ale-python-pylama ale-python.txt /*ale-python-pylama* +ale-python-pylint ale-python.txt /*ale-python-pylint* +ale-python-pylsp ale-python.txt /*ale-python-pylsp* +ale-python-pyre ale-python.txt /*ale-python-pyre* +ale-python-pyright ale-python.txt /*ale-python-pyright* +ale-python-refurb ale-python.txt /*ale-python-refurb* +ale-python-reorder_python_imports ale-python.txt /*ale-python-reorder_python_imports* +ale-python-root ale-python.txt /*ale-python-root* +ale-python-ruff ale-python.txt /*ale-python-ruff* +ale-python-unimport ale-python.txt /*ale-python-unimport* +ale-python-vulture ale-python.txt /*ale-python-vulture* +ale-python-yapf ale-python.txt /*ale-python-yapf* +ale-qml-options ale-qml.txt /*ale-qml-options* +ale-qml-qmlfmt ale-qml.txt /*ale-qml-qmlfmt* +ale-r-languageserver ale-r.txt /*ale-r-languageserver* +ale-r-lintr ale-r.txt /*ale-r-lintr* +ale-r-options ale-r.txt /*ale-r-options* +ale-r-styler ale-r.txt /*ale-r-styler* +ale-racket-langserver ale-racket.txt /*ale-racket-langserver* +ale-racket-options ale-racket.txt /*ale-racket-options* +ale-racket-raco-fmt ale-racket.txt /*ale-racket-raco-fmt* +ale-reasonml-language-server ale-reasonml.txt /*ale-reasonml-language-server* +ale-reasonml-merlin ale-reasonml.txt /*ale-reasonml-merlin* +ale-reasonml-ols ale-reasonml.txt /*ale-reasonml-ols* +ale-reasonml-options ale-reasonml.txt /*ale-reasonml-options* +ale-reasonml-refmt ale-reasonml.txt /*ale-reasonml-refmt* +ale-refactor ale.txt /*ale-refactor* +ale-rego-cspell ale-rego.txt /*ale-rego-cspell* +ale-rego-opa-check ale-rego.txt /*ale-rego-opa-check* +ale-rego-opa-fmt-fixer ale-rego.txt /*ale-rego-opa-fmt-fixer* +ale-rego-options ale-rego.txt /*ale-rego-options* +ale-restructuredtext-cspell ale-restructuredtext.txt /*ale-restructuredtext-cspell* +ale-restructuredtext-options ale-restructuredtext.txt /*ale-restructuredtext-options* +ale-restructuredtext-textlint ale-restructuredtext.txt /*ale-restructuredtext-textlint* +ale-restructuredtext-write-good ale-restructuredtext.txt /*ale-restructuredtext-write-good* +ale-robot-options ale-robot.txt /*ale-robot-options* +ale-robot-rflint ale-robot.txt /*ale-robot-rflint* +ale-ruby-brakeman ale-ruby.txt /*ale-ruby-brakeman* +ale-ruby-cspell ale-ruby.txt /*ale-ruby-cspell* +ale-ruby-debride ale-ruby.txt /*ale-ruby-debride* +ale-ruby-options ale-ruby.txt /*ale-ruby-options* +ale-ruby-prettier ale-ruby.txt /*ale-ruby-prettier* +ale-ruby-rails_best_practices ale-ruby.txt /*ale-ruby-rails_best_practices* +ale-ruby-reek ale-ruby.txt /*ale-ruby-reek* +ale-ruby-rubocop ale-ruby.txt /*ale-ruby-rubocop* +ale-ruby-ruby ale-ruby.txt /*ale-ruby-ruby* +ale-ruby-rufo ale-ruby.txt /*ale-ruby-rufo* +ale-ruby-solargraph ale-ruby.txt /*ale-ruby-solargraph* +ale-ruby-sorbet ale-ruby.txt /*ale-ruby-sorbet* +ale-ruby-standardrb ale-ruby.txt /*ale-ruby-standardrb* +ale-ruby-syntax_tree ale-ruby.txt /*ale-ruby-syntax_tree* +ale-rust-analyzer ale-rust.txt /*ale-rust-analyzer* +ale-rust-cargo ale-rust.txt /*ale-rust-cargo* +ale-rust-cspell ale-rust.txt /*ale-rust-cspell* +ale-rust-options ale-rust.txt /*ale-rust-options* +ale-rust-rls ale-rust.txt /*ale-rust-rls* +ale-rust-rustc ale-rust.txt /*ale-rust-rustc* +ale-rust-rustfmt ale-rust.txt /*ale-rust-rustfmt* +ale-sass-options ale-sass.txt /*ale-sass-options* +ale-sass-sasslint ale-sass.txt /*ale-sass-sasslint* +ale-sass-stylelint ale-sass.txt /*ale-sass-stylelint* +ale-scala-cspell ale-scala.txt /*ale-scala-cspell* +ale-scala-metals ale-scala.txt /*ale-scala-metals* +ale-scala-options ale-scala.txt /*ale-scala-options* +ale-scala-sbtserver ale-scala.txt /*ale-scala-sbtserver* +ale-scala-scalafmt ale-scala.txt /*ale-scala-scalafmt* +ale-scala-scalastyle ale-scala.txt /*ale-scala-scalastyle* +ale-scss-options ale-scss.txt /*ale-scss-options* +ale-scss-prettier ale-scss.txt /*ale-scss-prettier* +ale-scss-sasslint ale-scss.txt /*ale-scss-sasslint* +ale-scss-stylelint ale-scss.txt /*ale-scss-stylelint* +ale-sh-bashate ale-sh.txt /*ale-sh-bashate* +ale-sh-cspell ale-sh.txt /*ale-sh-cspell* +ale-sh-language-server ale-sh.txt /*ale-sh-language-server* +ale-sh-options ale-sh.txt /*ale-sh-options* +ale-sh-shell ale-sh.txt /*ale-sh-shell* +ale-sh-shellcheck ale-sh.txt /*ale-sh-shellcheck* +ale-sh-shfmt ale-sh.txt /*ale-sh-shfmt* +ale-sml-options ale-sml.txt /*ale-sml-options* +ale-sml-smlnj ale-sml.txt /*ale-sml-smlnj* +ale-sml-smlnj-cm ale-sml.txt /*ale-sml-smlnj-cm* +ale-solidity-options ale-solidity.txt /*ale-solidity-options* +ale-solidity-solc ale-solidity.txt /*ale-solidity-solc* +ale-solidity-solhint ale-solidity.txt /*ale-solidity-solhint* +ale-solidity-solium ale-solidity.txt /*ale-solidity-solium* +ale-spec-options ale-spec.txt /*ale-spec-options* +ale-spec-rpmlint ale-spec.txt /*ale-spec-rpmlint* +ale-special-thanks ale.txt /*ale-special-thanks* +ale-sql-dprint ale-sql.txt /*ale-sql-dprint* +ale-sql-options ale-sql.txt /*ale-sql-options* +ale-sql-pgformatter ale-sql.txt /*ale-sql-pgformatter* +ale-sql-sqlfluff ale-sql.txt /*ale-sql-sqlfluff* +ale-sql-sqlfmt ale-sql.txt /*ale-sql-sqlfmt* +ale-sql-sqlformat ale-sql.txt /*ale-sql-sqlformat* +ale-stylus-options ale-stylus.txt /*ale-stylus-options* +ale-stylus-stylelint ale-stylus.txt /*ale-stylus-stylelint* +ale-sugarss-options ale-sugarss.txt /*ale-sugarss-options* +ale-sugarss-stylelint ale-sugarss.txt /*ale-sugarss-stylelint* +ale-support ale.txt /*ale-support* +ale-supported-languages-and-tools.txt ale-supported-languages-and-tools.txt /*ale-supported-languages-and-tools.txt* +ale-supported-list ale-supported-languages-and-tools.txt /*ale-supported-list* +ale-svelte-options ale-svelte.txt /*ale-svelte-options* +ale-svelte-prettier ale-svelte.txt /*ale-svelte-prettier* +ale-svelte-svelteserver ale-svelte.txt /*ale-svelte-svelteserver* +ale-swift-apple-swift-format ale-swift.txt /*ale-swift-apple-swift-format* +ale-swift-cspell ale-swift.txt /*ale-swift-cspell* +ale-swift-options ale-swift.txt /*ale-swift-options* +ale-swift-sourcekitlsp ale-swift.txt /*ale-swift-sourcekitlsp* +ale-symbol-search ale.txt /*ale-symbol-search* +ale-symbols ale.txt /*ale-symbols* +ale-systemd-analyze ale-systemd.txt /*ale-systemd-analyze* +ale-systemd-options ale-systemd.txt /*ale-systemd-options* +ale-tcl-nagelfar ale-tcl.txt /*ale-tcl-nagelfar* +ale-tcl-options ale-tcl.txt /*ale-tcl-options* +ale-terraform-checkov ale-terraform.txt /*ale-terraform-checkov* +ale-terraform-fmt-fixer ale-terraform.txt /*ale-terraform-fmt-fixer* +ale-terraform-options ale-terraform.txt /*ale-terraform-options* +ale-terraform-terraform ale-terraform.txt /*ale-terraform-terraform* +ale-terraform-terraform-ls ale-terraform.txt /*ale-terraform-terraform-ls* +ale-terraform-terraform-lsp ale-terraform.txt /*ale-terraform-terraform-lsp* +ale-terraform-tflint ale-terraform.txt /*ale-terraform-tflint* +ale-terraform-tfsec ale-terraform.txt /*ale-terraform-tfsec* +ale-tests ale-development.txt /*ale-tests* +ale-tex-chktex ale-tex.txt /*ale-tex-chktex* +ale-tex-cspell ale-tex.txt /*ale-tex-cspell* +ale-tex-lacheck ale-tex.txt /*ale-tex-lacheck* +ale-tex-latexindent ale-tex.txt /*ale-tex-latexindent* +ale-tex-options ale-tex.txt /*ale-tex-options* +ale-tex-texlab ale-tex.txt /*ale-tex-texlab* +ale-texinfo-cspell ale-texinfo.txt /*ale-texinfo-cspell* +ale-texinfo-options ale-texinfo.txt /*ale-texinfo-options* +ale-texinfo-write-good ale-texinfo.txt /*ale-texinfo-write-good* +ale-text-cspell ale-text.txt /*ale-text-cspell* +ale-text-options ale-text.txt /*ale-text-options* +ale-text-textlint ale-text.txt /*ale-text-textlint* +ale-text-write-good ale-text.txt /*ale-text-write-good* +ale-thrift-options ale-thrift.txt /*ale-thrift-options* +ale-thrift-thrift ale-thrift.txt /*ale-thrift-thrift* +ale-thrift-thriftcheck ale-thrift.txt /*ale-thrift-thriftcheck* +ale-toml-dprint ale-toml.txt /*ale-toml-dprint* +ale-toml-options ale-toml.txt /*ale-toml-options* +ale-typescript-cspell ale-typescript.txt /*ale-typescript-cspell* +ale-typescript-deno ale-typescript.txt /*ale-typescript-deno* +ale-typescript-dprint ale-typescript.txt /*ale-typescript-dprint* +ale-typescript-eslint ale-typescript.txt /*ale-typescript-eslint* +ale-typescript-options ale-typescript.txt /*ale-typescript-options* +ale-typescript-prettier ale-typescript.txt /*ale-typescript-prettier* +ale-typescript-standard ale-typescript.txt /*ale-typescript-standard* +ale-typescript-tslint ale-typescript.txt /*ale-typescript-tslint* +ale-typescript-tsserver ale-typescript.txt /*ale-typescript-tsserver* +ale-typescript-xo ale-typescript.txt /*ale-typescript-xo* +ale-v-options ale-v.txt /*ale-v-options* +ale-v-v ale-v.txt /*ale-v-v* +ale-v-vfmt ale-v.txt /*ale-v-vfmt* +ale-vala-options ale-vala.txt /*ale-vala-options* +ale-vala-uncrustify ale-vala.txt /*ale-vala-uncrustify* +ale-vala-vala-lint ale-vala.txt /*ale-vala-vala-lint* +ale-verilog-hdl-checker ale-verilog.txt /*ale-verilog-hdl-checker* +ale-verilog-iverilog ale-verilog.txt /*ale-verilog-iverilog* +ale-verilog-options ale-verilog.txt /*ale-verilog-options* +ale-verilog-verilator ale-verilog.txt /*ale-verilog-verilator* +ale-verilog-vlog ale-verilog.txt /*ale-verilog-vlog* +ale-verilog-xvlog ale-verilog.txt /*ale-verilog-xvlog* +ale-verilog-yosys ale-verilog.txt /*ale-verilog-yosys* +ale-vhdl-ghdl ale-vhdl.txt /*ale-vhdl-ghdl* +ale-vhdl-hdl-checker ale-vhdl.txt /*ale-vhdl-hdl-checker* +ale-vhdl-options ale-vhdl.txt /*ale-vhdl-options* +ale-vhdl-vcom ale-vhdl.txt /*ale-vhdl-vcom* +ale-vhdl-xvhdl ale-vhdl.txt /*ale-vhdl-xvhdl* +ale-vim-help-options ale-vim-help.txt /*ale-vim-help-options* +ale-vim-help-write-good ale-vim-help.txt /*ale-vim-help-write-good* +ale-vim-options ale-vim.txt /*ale-vim-options* +ale-vim-vimls ale-vim.txt /*ale-vim-vimls* +ale-vim-vint ale-vim.txt /*ale-vim-vint* +ale-vue-cspell ale-vue.txt /*ale-vue-cspell* +ale-vue-options ale-vue.txt /*ale-vue-options* +ale-vue-prettier ale-vue.txt /*ale-vue-prettier* +ale-vue-vls ale-vue.txt /*ale-vue-vls* +ale-vue-volar ale-vue.txt /*ale-vue-volar* +ale-wgsl-naga ale-wgsl.txt /*ale-wgsl-naga* +ale-wgsl-options ale-wgsl.txt /*ale-wgsl-options* +ale-write-good-options ale.txt /*ale-write-good-options* +ale-xhtml-cspell ale-xhtml.txt /*ale-xhtml-cspell* +ale-xhtml-options ale-xhtml.txt /*ale-xhtml-options* +ale-xhtml-write-good ale-xhtml.txt /*ale-xhtml-write-good* +ale-xml-options ale-xml.txt /*ale-xml-options* +ale-xml-xmllint ale-xml.txt /*ale-xml-xmllint* +ale-yaml-actionlint ale-yaml.txt /*ale-yaml-actionlint* +ale-yaml-circleci ale-yaml.txt /*ale-yaml-circleci* +ale-yaml-gitlablint ale-yaml.txt /*ale-yaml-gitlablint* +ale-yaml-language-server ale-yaml.txt /*ale-yaml-language-server* +ale-yaml-options ale-yaml.txt /*ale-yaml-options* +ale-yaml-prettier ale-yaml.txt /*ale-yaml-prettier* +ale-yaml-spectral ale-yaml.txt /*ale-yaml-spectral* +ale-yaml-swaglint ale-yaml.txt /*ale-yaml-swaglint* +ale-yaml-yamlfix ale-yaml.txt /*ale-yaml-yamlfix* +ale-yaml-yamllint ale-yaml.txt /*ale-yaml-yamllint* +ale-yang-lsp ale-yang.txt /*ale-yang-lsp* +ale-yang-options ale-yang.txt /*ale-yang-options* +ale-zeek-options ale-zeek.txt /*ale-zeek-options* +ale-zeek-zeek ale-zeek.txt /*ale-zeek-zeek* +ale-zig-options ale-zig.txt /*ale-zig-options* +ale-zig-zigfmt ale-zig.txt /*ale-zig-zigfmt* +ale-zig-zls ale-zig.txt /*ale-zig-zls* +ale.txt ale.txt /*ale.txt* +b:ale-c-flawfinder ale-c.txt /*b:ale-c-flawfinder* +b:ale-cpp-flawfinder ale-cpp.txt /*b:ale-cpp-flawfinder* +b:ale_ada_adals_encoding ale-ada.txt /*b:ale_ada_adals_encoding* +b:ale_ada_adals_executable ale-ada.txt /*b:ale_ada_adals_executable* +b:ale_ada_adals_project ale-ada.txt /*b:ale_ada_adals_project* +b:ale_ada_gcc_executable ale-ada.txt /*b:ale_ada_gcc_executable* +b:ale_ada_gcc_options ale-ada.txt /*b:ale_ada_gcc_options* +b:ale_ada_gnatpp_options ale-ada.txt /*b:ale_ada_gnatpp_options* +b:ale_alex_executable ale.txt /*b:ale_alex_executable* +b:ale_alex_use_global ale.txt /*b:ale_alex_use_global* +b:ale_ansible_ansible_lint_executable ale-ansible.txt /*b:ale_ansible_ansible_lint_executable* +b:ale_ansible_language_server ale-ansible.txt /*b:ale_ansible_language_server* +b:ale_ansible_language_server_config ale-ansible.txt /*b:ale_ansible_language_server_config* +b:ale_apkbuild_apkbuild_lint_executable ale-apkbuild.txt /*b:ale_apkbuild_apkbuild_lint_executable* +b:ale_apkbuild_secfixes_check_executable ale-apkbuild.txt /*b:ale_apkbuild_secfixes_check_executable* +b:ale_asm_gcc_executable ale-asm.txt /*b:ale_asm_gcc_executable* +b:ale_asm_gcc_options ale-asm.txt /*b:ale_asm_gcc_options* +b:ale_avra_avra_executable ale-avra.txt /*b:ale_avra_avra_executable* +b:ale_avra_avra_options ale-avra.txt /*b:ale_avra_avra_options* +b:ale_awk_gawk_executable ale-awk.txt /*b:ale_awk_gawk_executable* +b:ale_awk_gawk_options ale-awk.txt /*b:ale_awk_gawk_options* +b:ale_bazel_buildifier_executable ale-bazel.txt /*b:ale_bazel_buildifier_executable* +b:ale_bazel_buildifier_options ale-bazel.txt /*b:ale_bazel_buildifier_options* +b:ale_bazel_buildifier_use_global ale-bazel.txt /*b:ale_bazel_buildifier_use_global* +b:ale_bicep_bicep_executable ale-bicep.txt /*b:ale_bicep_bicep_executable* +b:ale_bicep_bicep_options ale-bicep.txt /*b:ale_bicep_bicep_options* +b:ale_c_always_make ale-c.txt /*b:ale_c_always_make* +b:ale_c_astyle_executable ale-c.txt /*b:ale_c_astyle_executable* +b:ale_c_astyle_project_options ale-c.txt /*b:ale_c_astyle_project_options* +b:ale_c_build_dir ale-c.txt /*b:ale_c_build_dir* +b:ale_c_build_dir_names ale-c.txt /*b:ale_c_build_dir_names* +b:ale_c_cc_executable ale-c.txt /*b:ale_c_cc_executable* +b:ale_c_cc_header_exts ale-c.txt /*b:ale_c_cc_header_exts* +b:ale_c_cc_options ale-c.txt /*b:ale_c_cc_options* +b:ale_c_cc_use_header_lang_flag ale-c.txt /*b:ale_c_cc_use_header_lang_flag* +b:ale_c_ccls_executable ale-c.txt /*b:ale_c_ccls_executable* +b:ale_c_ccls_init_options ale-c.txt /*b:ale_c_ccls_init_options* +b:ale_c_clangd_executable ale-c.txt /*b:ale_c_clangd_executable* +b:ale_c_clangd_options ale-c.txt /*b:ale_c_clangd_options* +b:ale_c_clangformat_executable ale-c.txt /*b:ale_c_clangformat_executable* +b:ale_c_clangformat_options ale-c.txt /*b:ale_c_clangformat_options* +b:ale_c_clangformat_style_option ale-c.txt /*b:ale_c_clangformat_style_option* +b:ale_c_clangformat_use_local_file ale-c.txt /*b:ale_c_clangformat_use_local_file* +b:ale_c_clangtidy_checks ale-c.txt /*b:ale_c_clangtidy_checks* +b:ale_c_clangtidy_executable ale-c.txt /*b:ale_c_clangtidy_executable* +b:ale_c_clangtidy_extra_options ale-c.txt /*b:ale_c_clangtidy_extra_options* +b:ale_c_clangtidy_fix_errors ale-c.txt /*b:ale_c_clangtidy_fix_errors* +b:ale_c_clangtidy_options ale-c.txt /*b:ale_c_clangtidy_options* +b:ale_c_cppcheck_executable ale-c.txt /*b:ale_c_cppcheck_executable* +b:ale_c_cppcheck_options ale-c.txt /*b:ale_c_cppcheck_options* +b:ale_c_cpplint_executable ale-cpp.txt /*b:ale_c_cpplint_executable* +b:ale_c_cpplint_options ale-cpp.txt /*b:ale_c_cpplint_options* +b:ale_c_cquery_cache_directory ale-c.txt /*b:ale_c_cquery_cache_directory* +b:ale_c_cquery_executable ale-c.txt /*b:ale_c_cquery_executable* +b:ale_c_flawfinder_error_severity ale-c.txt /*b:ale_c_flawfinder_error_severity* +b:ale_c_flawfinder_executable ale-c.txt /*b:ale_c_flawfinder_executable* +b:ale_c_flawfinder_minlevel ale-c.txt /*b:ale_c_flawfinder_minlevel* +b:ale_c_parse_compile_commands ale-c.txt /*b:ale_c_parse_compile_commands* +b:ale_c_parse_makefile ale-c.txt /*b:ale_c_parse_makefile* +b:ale_c_uncrustify_executable ale-c.txt /*b:ale_c_uncrustify_executable* +b:ale_c_uncrustify_options ale-c.txt /*b:ale_c_uncrustify_options* +b:ale_cairo_starknet_executable ale-cairo.txt /*b:ale_cairo_starknet_executable* +b:ale_chef_cookstyle_executable ale-chef.txt /*b:ale_chef_cookstyle_executable* +b:ale_chef_cookstyle_options ale-chef.txt /*b:ale_chef_cookstyle_options* +b:ale_chef_foodcritic_executable ale-chef.txt /*b:ale_chef_foodcritic_executable* +b:ale_chef_foodcritic_options ale-chef.txt /*b:ale_chef_foodcritic_options* +b:ale_clojure_clj_kondo_options ale-clojure.txt /*b:ale_clojure_clj_kondo_options* +b:ale_cmake_cmake_lint_executable ale-cmake.txt /*b:ale_cmake_cmake_lint_executable* +b:ale_cmake_cmake_lint_options ale-cmake.txt /*b:ale_cmake_cmake_lint_options* +b:ale_cmake_cmakeformat_executable ale-cmake.txt /*b:ale_cmake_cmakeformat_executable* +b:ale_cmake_cmakeformat_options ale-cmake.txt /*b:ale_cmake_cmakeformat_options* +b:ale_cmake_cmakelint_executable ale-cmake.txt /*b:ale_cmake_cmakelint_executable* +b:ale_cmake_cmakelint_options ale-cmake.txt /*b:ale_cmake_cmakelint_options* +b:ale_command_wrapper ale.txt /*b:ale_command_wrapper* +b:ale_completion_enabled ale.txt /*b:ale_completion_enabled* +b:ale_completion_excluded_words ale.txt /*b:ale_completion_excluded_words* +b:ale_cpp_astyle_executable ale-cpp.txt /*b:ale_cpp_astyle_executable* +b:ale_cpp_astyle_project_options ale-cpp.txt /*b:ale_cpp_astyle_project_options* +b:ale_cpp_cc_executable ale-cpp.txt /*b:ale_cpp_cc_executable* +b:ale_cpp_cc_header_exts ale-cpp.txt /*b:ale_cpp_cc_header_exts* +b:ale_cpp_cc_options ale-cpp.txt /*b:ale_cpp_cc_options* +b:ale_cpp_cc_use_header_lang_flag ale-cpp.txt /*b:ale_cpp_cc_use_header_lang_flag* +b:ale_cpp_ccls_executable ale-cpp.txt /*b:ale_cpp_ccls_executable* +b:ale_cpp_ccls_init_options ale-cpp.txt /*b:ale_cpp_ccls_init_options* +b:ale_cpp_clangcheck_executable ale-cpp.txt /*b:ale_cpp_clangcheck_executable* +b:ale_cpp_clangcheck_options ale-cpp.txt /*b:ale_cpp_clangcheck_options* +b:ale_cpp_clangd_executable ale-cpp.txt /*b:ale_cpp_clangd_executable* +b:ale_cpp_clangd_options ale-cpp.txt /*b:ale_cpp_clangd_options* +b:ale_cpp_clangtidy_checks ale-cpp.txt /*b:ale_cpp_clangtidy_checks* +b:ale_cpp_clangtidy_executable ale-cpp.txt /*b:ale_cpp_clangtidy_executable* +b:ale_cpp_clangtidy_extra_options ale-cpp.txt /*b:ale_cpp_clangtidy_extra_options* +b:ale_cpp_clangtidy_fix_errors ale-cpp.txt /*b:ale_cpp_clangtidy_fix_errors* +b:ale_cpp_clangtidy_options ale-cpp.txt /*b:ale_cpp_clangtidy_options* +b:ale_cpp_clazy_checks ale-cpp.txt /*b:ale_cpp_clazy_checks* +b:ale_cpp_clazy_executable ale-cpp.txt /*b:ale_cpp_clazy_executable* +b:ale_cpp_clazy_options ale-cpp.txt /*b:ale_cpp_clazy_options* +b:ale_cpp_cppcheck_executable ale-cpp.txt /*b:ale_cpp_cppcheck_executable* +b:ale_cpp_cppcheck_options ale-cpp.txt /*b:ale_cpp_cppcheck_options* +b:ale_cpp_cpplint_executable ale-cpp.txt /*b:ale_cpp_cpplint_executable* +b:ale_cpp_cpplint_options ale-cpp.txt /*b:ale_cpp_cpplint_options* +b:ale_cpp_cquery_cache_directory ale-cpp.txt /*b:ale_cpp_cquery_cache_directory* +b:ale_cpp_cquery_executable ale-cpp.txt /*b:ale_cpp_cquery_executable* +b:ale_cpp_flawfinder_executable ale-cpp.txt /*b:ale_cpp_flawfinder_executable* +b:ale_cpp_flawfinder_minlevel ale-cpp.txt /*b:ale_cpp_flawfinder_minlevel* +b:ale_cs_csc_assemblies ale-cs.txt /*b:ale_cs_csc_assemblies* +b:ale_cs_csc_assembly_path ale-cs.txt /*b:ale_cs_csc_assembly_path* +b:ale_cs_csc_options ale-cs.txt /*b:ale_cs_csc_options* +b:ale_cs_csc_source ale-cs.txt /*b:ale_cs_csc_source* +b:ale_cs_dotnet_format_executable ale-cs.txt /*b:ale_cs_dotnet_format_executable* +b:ale_cs_dotnet_format_options ale-cs.txt /*b:ale_cs_dotnet_format_options* +b:ale_cs_mcs_options ale-cs.txt /*b:ale_cs_mcs_options* +b:ale_cs_mcsc_assemblies ale-cs.txt /*b:ale_cs_mcsc_assemblies* +b:ale_cs_mcsc_assembly_path ale-cs.txt /*b:ale_cs_mcsc_assembly_path* +b:ale_cs_mcsc_options ale-cs.txt /*b:ale_cs_mcsc_options* +b:ale_cs_mcsc_source ale-cs.txt /*b:ale_cs_mcsc_source* +b:ale_cspell_executable ale.txt /*b:ale_cspell_executable* +b:ale_cspell_options ale.txt /*b:ale_cspell_options* +b:ale_cspell_use_global ale.txt /*b:ale_cspell_use_global* +b:ale_css_css_beautify_executable ale-css.txt /*b:ale_css_css_beautify_executable* +b:ale_css_css_beautify_options ale-css.txt /*b:ale_css_css_beautify_options* +b:ale_css_css_beautify_use_global ale-css.txt /*b:ale_css_css_beautify_use_global* +b:ale_css_stylelint_executable ale-css.txt /*b:ale_css_stylelint_executable* +b:ale_css_stylelint_options ale-css.txt /*b:ale_css_stylelint_options* +b:ale_css_stylelint_use_global ale-css.txt /*b:ale_css_stylelint_use_global* +b:ale_cuda_clangd_executable ale-cuda.txt /*b:ale_cuda_clangd_executable* +b:ale_cuda_clangd_options ale-cuda.txt /*b:ale_cuda_clangd_options* +b:ale_cuda_nvcc_executable ale-cuda.txt /*b:ale_cuda_nvcc_executable* +b:ale_cuda_nvcc_options ale-cuda.txt /*b:ale_cuda_nvcc_options* +b:ale_d_dfmt_options ale-d.txt /*b:ale_d_dfmt_options* +b:ale_d_dls_executable ale-d.txt /*b:ale_d_dls_executable* +b:ale_dafny_dafny_timelimit ale-dafny.txt /*b:ale_dafny_dafny_timelimit* +b:ale_dart_analysis_server_executable ale-dart.txt /*b:ale_dart_analysis_server_executable* +b:ale_dart_analyze_executable ale-dart.txt /*b:ale_dart_analyze_executable* +b:ale_dart_dartfmt_executable ale-dart.txt /*b:ale_dart_dartfmt_executable* +b:ale_dart_dartfmt_options ale-dart.txt /*b:ale_dart_dartfmt_options* +b:ale_dart_format_executable ale-dart.txt /*b:ale_dart_format_executable* +b:ale_dart_format_options ale-dart.txt /*b:ale_dart_format_options* +b:ale_default_navigation ale.txt /*b:ale_default_navigation* +b:ale_deno_executable ale-typescript.txt /*b:ale_deno_executable* +b:ale_deno_importMap ale-typescript.txt /*b:ale_deno_importMap* +b:ale_deno_lsp_project_root ale-typescript.txt /*b:ale_deno_lsp_project_root* +b:ale_deno_unstable ale-typescript.txt /*b:ale_deno_unstable* +b:ale_desktop_desktop_file_validate_options ale-desktop.txt /*b:ale_desktop_desktop_file_validate_options* +b:ale_detail_to_floating_preview ale.txt /*b:ale_detail_to_floating_preview* +b:ale_dhall_executable ale-dhall.txt /*b:ale_dhall_executable* +b:ale_dhall_freeze_options ale-dhall.txt /*b:ale_dhall_freeze_options* +b:ale_dhall_options ale-dhall.txt /*b:ale_dhall_options* +b:ale_disable_lsp ale.txt /*b:ale_disable_lsp* +b:ale_dockerfile_dockerfile_lint_executable ale-dockerfile.txt /*b:ale_dockerfile_dockerfile_lint_executable* +b:ale_dockerfile_dockerfile_lint_options ale-dockerfile.txt /*b:ale_dockerfile_dockerfile_lint_options* +b:ale_dockerfile_hadolint_image ale-dockerfile.txt /*b:ale_dockerfile_hadolint_image* +b:ale_dockerfile_hadolint_options ale-dockerfile.txt /*b:ale_dockerfile_hadolint_options* +b:ale_dockerfile_hadolint_use_docker ale-dockerfile.txt /*b:ale_dockerfile_hadolint_use_docker* +b:ale_dprint_config ale.txt /*b:ale_dprint_config* +b:ale_dprint_executable ale.txt /*b:ale_dprint_executable* +b:ale_dprint_options ale.txt /*b:ale_dprint_options* +b:ale_dprint_use_global ale.txt /*b:ale_dprint_use_global* +b:ale_echo_delay ale.txt /*b:ale_echo_delay* +b:ale_echo_msg_format ale.txt /*b:ale_echo_msg_format* +b:ale_elixir_elixir_ls_config ale-elixir.txt /*b:ale_elixir_elixir_ls_config* +b:ale_elixir_elixir_ls_release ale-elixir.txt /*b:ale_elixir_elixir_ls_release* +b:ale_elixir_mix_format_options ale-elixir.txt /*b:ale_elixir_mix_format_options* +b:ale_elixir_mix_options ale-elixir.txt /*b:ale_elixir_mix_options* +b:ale_elm_format_executable ale-elm.txt /*b:ale_elm_format_executable* +b:ale_elm_format_options ale-elm.txt /*b:ale_elm_format_options* +b:ale_elm_format_use_global ale-elm.txt /*b:ale_elm_format_use_global* +b:ale_elm_ls_elm_analyse_trigger ale-elm.txt /*b:ale_elm_ls_elm_analyse_trigger* +b:ale_elm_ls_elm_format_path ale-elm.txt /*b:ale_elm_ls_elm_format_path* +b:ale_elm_ls_elm_path ale-elm.txt /*b:ale_elm_ls_elm_path* +b:ale_elm_ls_elm_test_path ale-elm.txt /*b:ale_elm_ls_elm_test_path* +b:ale_elm_ls_executable ale-elm.txt /*b:ale_elm_ls_executable* +b:ale_elm_ls_use_global ale-elm.txt /*b:ale_elm_ls_use_global* +b:ale_elm_make_executable ale-elm.txt /*b:ale_elm_make_executable* +b:ale_elm_make_use_global ale-elm.txt /*b:ale_elm_make_use_global* +b:ale_enabled ale.txt /*b:ale_enabled* +b:ale_erlang_dialyzer_executable ale-erlang.txt /*b:ale_erlang_dialyzer_executable* +b:ale_erlang_dialyzer_options ale-erlang.txt /*b:ale_erlang_dialyzer_options* +b:ale_erlang_dialyzer_plt_file ale-erlang.txt /*b:ale_erlang_dialyzer_plt_file* +b:ale_erlang_dialyzer_rebar3_profile ale-erlang.txt /*b:ale_erlang_dialyzer_rebar3_profile* +b:ale_erlang_elvis_executable ale-erlang.txt /*b:ale_erlang_elvis_executable* +b:ale_erlang_erlang_ls_executable ale-erlang.txt /*b:ale_erlang_erlang_ls_executable* +b:ale_erlang_erlang_ls_log_dir ale-erlang.txt /*b:ale_erlang_erlang_ls_log_dir* +b:ale_erlang_erlang_ls_log_level ale-erlang.txt /*b:ale_erlang_erlang_ls_log_level* +b:ale_erlang_erlc_executable ale-erlang.txt /*b:ale_erlang_erlc_executable* +b:ale_erlang_erlc_options ale-erlang.txt /*b:ale_erlang_erlc_options* +b:ale_erlang_erlfmt_executable ale-erlang.txt /*b:ale_erlang_erlfmt_executable* +b:ale_erlang_erlfmt_options ale-erlang.txt /*b:ale_erlang_erlfmt_options* +b:ale_erlang_syntaxerl_executable ale-erlang.txt /*b:ale_erlang_syntaxerl_executable* +b:ale_eruby_erblint_executable ale-eruby.txt /*b:ale_eruby_erblint_executable* +b:ale_eruby_ruumba_executable ale-eruby.txt /*b:ale_eruby_ruumba_executable* +b:ale_exclude_highlights ale.txt /*b:ale_exclude_highlights* +b:ale_filename_mappings ale.txt /*b:ale_filename_mappings* +b:ale_fish_fish_indent_executable ale-fish.txt /*b:ale_fish_fish_indent_executable* +b:ale_fish_fish_indent_options ale-fish.txt /*b:ale_fish_fish_indent_options* +b:ale_fix_on_save ale.txt /*b:ale_fix_on_save* +b:ale_fix_on_save_ignore ale.txt /*b:ale_fix_on_save_ignore* +b:ale_fixers ale.txt /*b:ale_fixers* +b:ale_fortran_gcc_executable ale-fortran.txt /*b:ale_fortran_gcc_executable* +b:ale_fortran_gcc_options ale-fortran.txt /*b:ale_fortran_gcc_options* +b:ale_fortran_gcc_use_free_form ale-fortran.txt /*b:ale_fortran_gcc_use_free_form* +b:ale_fortran_language_server_executable ale-fortran.txt /*b:ale_fortran_language_server_executable* +b:ale_fortran_language_server_use_global ale-fortran.txt /*b:ale_fortran_language_server_use_global* +b:ale_fuse_fusionlint_executable ale-fuse.txt /*b:ale_fuse_fusionlint_executable* +b:ale_fuse_fusionlint_options ale-fuse.txt /*b:ale_fuse_fusionlint_options* +b:ale_gitcommit_gitlint_executable ale-gitcommit.txt /*b:ale_gitcommit_gitlint_executable* +b:ale_gitcommit_gitlint_options ale-gitcommit.txt /*b:ale_gitcommit_gitlint_options* +b:ale_gitcommit_gitlint_use_global ale-gitcommit.txt /*b:ale_gitcommit_gitlint_use_global* +b:ale_glsl_glslang_executable ale-glsl.txt /*b:ale_glsl_glslang_executable* +b:ale_glsl_glslang_options ale-glsl.txt /*b:ale_glsl_glslang_options* +b:ale_glsl_glslls_executable ale-glsl.txt /*b:ale_glsl_glslls_executable* +b:ale_glsl_glslls_logfile ale-glsl.txt /*b:ale_glsl_glslls_logfile* +b:ale_go_bingo_executable ale-go.txt /*b:ale_go_bingo_executable* +b:ale_go_bingo_options ale-go.txt /*b:ale_go_bingo_options* +b:ale_go_go111module ale-go.txt /*b:ale_go_go111module* +b:ale_go_go_executable ale-go.txt /*b:ale_go_go_executable* +b:ale_go_gobuild_options ale-go.txt /*b:ale_go_gobuild_options* +b:ale_go_gofmt_options ale-go.txt /*b:ale_go_gofmt_options* +b:ale_go_gofumpt_executable ale-go.txt /*b:ale_go_gofumpt_executable* +b:ale_go_gofumpt_options ale-go.txt /*b:ale_go_gofumpt_options* +b:ale_go_golangci_lint_executable ale-go.txt /*b:ale_go_golangci_lint_executable* +b:ale_go_golangci_lint_options ale-go.txt /*b:ale_go_golangci_lint_options* +b:ale_go_golangci_lint_package ale-go.txt /*b:ale_go_golangci_lint_package* +b:ale_go_golines_options ale-go.txt /*b:ale_go_golines_options* +b:ale_go_golint_executable ale-go.txt /*b:ale_go_golint_executable* +b:ale_go_golint_options ale-go.txt /*b:ale_go_golint_options* +b:ale_go_gometalinter_executable ale-go.txt /*b:ale_go_gometalinter_executable* +b:ale_go_gometalinter_lint_package ale-go.txt /*b:ale_go_gometalinter_lint_package* +b:ale_go_gometalinter_options ale-go.txt /*b:ale_go_gometalinter_options* +b:ale_go_gopls_executable ale-go.txt /*b:ale_go_gopls_executable* +b:ale_go_gopls_init_options ale-go.txt /*b:ale_go_gopls_init_options* +b:ale_go_gopls_options ale-go.txt /*b:ale_go_gopls_options* +b:ale_go_gopls_use_global ale-go.txt /*b:ale_go_gopls_use_global* +b:ale_go_govet_options ale-go.txt /*b:ale_go_govet_options* +b:ale_go_langserver_executable ale-go.txt /*b:ale_go_langserver_executable* +b:ale_go_langserver_options ale-go.txt /*b:ale_go_langserver_options* +b:ale_go_lines_executable ale-go.txt /*b:ale_go_lines_executable* +b:ale_go_revive_executable ale-go.txt /*b:ale_go_revive_executable* +b:ale_go_revive_options ale-go.txt /*b:ale_go_revive_options* +b:ale_go_staticcheck_executable ale-go.txt /*b:ale_go_staticcheck_executable* +b:ale_go_staticcheck_lint_package ale-go.txt /*b:ale_go_staticcheck_lint_package* +b:ale_go_staticcheck_options ale-go.txt /*b:ale_go_staticcheck_options* +b:ale_go_staticcheck_use_global ale-go.txt /*b:ale_go_staticcheck_use_global* +b:ale_hack_hack_executable ale-hack.txt /*b:ale_hack_hack_executable* +b:ale_hack_hackfmt_options ale-hack.txt /*b:ale_hack_hackfmt_options* +b:ale_hack_hhast_executable ale-hack.txt /*b:ale_hack_hhast_executable* +b:ale_handlebars_embertemplatelint_executable ale-handlebars.txt /*b:ale_handlebars_embertemplatelint_executable* +b:ale_handlebars_embertemplatelint_use_global ale-handlebars.txt /*b:ale_handlebars_embertemplatelint_use_global* +b:ale_haskell_brittany_executable ale-haskell.txt /*b:ale_haskell_brittany_executable* +b:ale_haskell_cabal_ghc_options ale-haskell.txt /*b:ale_haskell_cabal_ghc_options* +b:ale_haskell_floskell_executable ale-haskell.txt /*b:ale_haskell_floskell_executable* +b:ale_haskell_ghc_mod_executable ale-haskell.txt /*b:ale_haskell_ghc_mod_executable* +b:ale_haskell_ghc_options ale-haskell.txt /*b:ale_haskell_ghc_options* +b:ale_haskell_hdevtools_executable ale-haskell.txt /*b:ale_haskell_hdevtools_executable* +b:ale_haskell_hdevtools_options ale-haskell.txt /*b:ale_haskell_hdevtools_options* +b:ale_haskell_hfmt_executable ale-haskell.txt /*b:ale_haskell_hfmt_executable* +b:ale_haskell_hie_executable ale-haskell.txt /*b:ale_haskell_hie_executable* +b:ale_haskell_hindent_executable ale-haskell.txt /*b:ale_haskell_hindent_executable* +b:ale_haskell_hlint_executable ale-haskell.txt /*b:ale_haskell_hlint_executable* +b:ale_haskell_hls_config ale-haskell.txt /*b:ale_haskell_hls_config* +b:ale_haskell_hls_executable ale-haskell.txt /*b:ale_haskell_hls_executable* +b:ale_haskell_ormolu_executable ale-haskell.txt /*b:ale_haskell_ormolu_executable* +b:ale_haskell_ormolu_options ale-haskell.txt /*b:ale_haskell_ormolu_options* +b:ale_haskell_stack_build_options ale-haskell.txt /*b:ale_haskell_stack_build_options* +b:ale_haskell_stack_ghc_options ale-haskell.txt /*b:ale_haskell_stack_ghc_options* +b:ale_haskell_stylish_haskell_executable ale-haskell.txt /*b:ale_haskell_stylish_haskell_executable* +b:ale_hdl_checker_config_file ale-vhdl.txt /*b:ale_hdl_checker_config_file* +b:ale_hdl_checker_executable ale-vhdl.txt /*b:ale_hdl_checker_executable* +b:ale_hdl_checker_options ale-vhdl.txt /*b:ale_hdl_checker_options* +b:ale_hover_to_floating_preview ale.txt /*b:ale_hover_to_floating_preview* +b:ale_hover_to_preview ale.txt /*b:ale_hover_to_preview* +b:ale_html_angular_executable ale-html.txt /*b:ale_html_angular_executable* +b:ale_html_angular_use_global ale-html.txt /*b:ale_html_angular_use_global* +b:ale_html_beautify_executable ale-html.txt /*b:ale_html_beautify_executable* +b:ale_html_beautify_options ale-html.txt /*b:ale_html_beautify_options* +b:ale_html_beautify_use_global ale-html.txt /*b:ale_html_beautify_use_global* +b:ale_html_htmlhint_executable ale-html.txt /*b:ale_html_htmlhint_executable* +b:ale_html_htmlhint_options ale-html.txt /*b:ale_html_htmlhint_options* +b:ale_html_htmlhint_use_global ale-html.txt /*b:ale_html_htmlhint_use_global* +b:ale_html_stylelint_executable ale-html.txt /*b:ale_html_stylelint_executable* +b:ale_html_stylelint_options ale-html.txt /*b:ale_html_stylelint_options* +b:ale_html_stylelint_use_global ale-html.txt /*b:ale_html_stylelint_use_global* +b:ale_html_tidy_executable ale-html.txt /*b:ale_html_tidy_executable* +b:ale_html_tidy_options ale-html.txt /*b:ale_html_tidy_options* +b:ale_idris_idris_executable ale-idris.txt /*b:ale_idris_idris_executable* +b:ale_idris_idris_options ale-idris.txt /*b:ale_idris_idris_options* +b:ale_inko_inko_executable ale-inko.txt /*b:ale_inko_inko_executable* +b:ale_ispc_ispc_executable ale-ispc.txt /*b:ale_ispc_ispc_executable* +b:ale_ispc_ispc_options ale-ispc.txt /*b:ale_ispc_ispc_options* +b:ale_java_checkstyle_config ale-java.txt /*b:ale_java_checkstyle_config* +b:ale_java_checkstyle_executable ale-java.txt /*b:ale_java_checkstyle_executable* +b:ale_java_checkstyle_options ale-java.txt /*b:ale_java_checkstyle_options* +b:ale_java_eclipse_config_path ale-java.txt /*b:ale_java_eclipse_config_path* +b:ale_java_eclipse_executable ale-java.txt /*b:ale_java_eclipse_executable* +b:ale_java_eclipselsp_javaagent ale-java.txt /*b:ale_java_eclipselsp_javaagent* +b:ale_java_eclipselsp_path ale-java.txt /*b:ale_java_eclipselsp_path* +b:ale_java_eclipselsp_workspace_path ale-java.txt /*b:ale_java_eclipselsp_workspace_path* +b:ale_java_google_java_format_executable ale-java.txt /*b:ale_java_google_java_format_executable* +b:ale_java_google_java_format_options ale-java.txt /*b:ale_java_google_java_format_options* +b:ale_java_javac_classpath ale-java.txt /*b:ale_java_javac_classpath* +b:ale_java_javac_executable ale-java.txt /*b:ale_java_javac_executable* +b:ale_java_javac_options ale-java.txt /*b:ale_java_javac_options* +b:ale_java_javac_sourcepath ale-java.txt /*b:ale_java_javac_sourcepath* +b:ale_java_javalsp_config ale-java.txt /*b:ale_java_javalsp_config* +b:ale_java_javalsp_executable ale-java.txt /*b:ale_java_javalsp_executable* +b:ale_java_pmd_options ale-java.txt /*b:ale_java_pmd_options* +b:ale_javascript_eslint_executable ale-javascript.txt /*b:ale_javascript_eslint_executable* +b:ale_javascript_eslint_options ale-javascript.txt /*b:ale_javascript_eslint_options* +b:ale_javascript_eslint_suppress_eslintignore ale-javascript.txt /*b:ale_javascript_eslint_suppress_eslintignore* +b:ale_javascript_eslint_suppress_missing_config ale-javascript.txt /*b:ale_javascript_eslint_suppress_missing_config* +b:ale_javascript_eslint_use_global ale-javascript.txt /*b:ale_javascript_eslint_use_global* +b:ale_javascript_fecs_executable ale-javascript.txt /*b:ale_javascript_fecs_executable* +b:ale_javascript_fecs_use_global ale-javascript.txt /*b:ale_javascript_fecs_use_global* +b:ale_javascript_flow_executable ale-javascript.txt /*b:ale_javascript_flow_executable* +b:ale_javascript_flow_use_global ale-javascript.txt /*b:ale_javascript_flow_use_global* +b:ale_javascript_flow_use_home_config ale-javascript.txt /*b:ale_javascript_flow_use_home_config* +b:ale_javascript_flow_use_respect_pragma ale-javascript.txt /*b:ale_javascript_flow_use_respect_pragma* +b:ale_javascript_importjs_executable ale-javascript.txt /*b:ale_javascript_importjs_executable* +b:ale_javascript_jscs_executable ale-javascript.txt /*b:ale_javascript_jscs_executable* +b:ale_javascript_jscs_use_global ale-javascript.txt /*b:ale_javascript_jscs_use_global* +b:ale_javascript_jshint_executable ale-javascript.txt /*b:ale_javascript_jshint_executable* +b:ale_javascript_jshint_use_global ale-javascript.txt /*b:ale_javascript_jshint_use_global* +b:ale_javascript_prettier_eslint_executable ale-javascript.txt /*b:ale_javascript_prettier_eslint_executable* +b:ale_javascript_prettier_eslint_options ale-javascript.txt /*b:ale_javascript_prettier_eslint_options* +b:ale_javascript_prettier_eslint_use_global ale-javascript.txt /*b:ale_javascript_prettier_eslint_use_global* +b:ale_javascript_prettier_executable ale-javascript.txt /*b:ale_javascript_prettier_executable* +b:ale_javascript_prettier_options ale-javascript.txt /*b:ale_javascript_prettier_options* +b:ale_javascript_prettier_standard_executable ale-javascript.txt /*b:ale_javascript_prettier_standard_executable* +b:ale_javascript_prettier_standard_options ale-javascript.txt /*b:ale_javascript_prettier_standard_options* +b:ale_javascript_prettier_standard_use_global ale-javascript.txt /*b:ale_javascript_prettier_standard_use_global* +b:ale_javascript_prettier_use_global ale-javascript.txt /*b:ale_javascript_prettier_use_global* +b:ale_javascript_standard_executable ale-javascript.txt /*b:ale_javascript_standard_executable* +b:ale_javascript_standard_options ale-javascript.txt /*b:ale_javascript_standard_options* +b:ale_javascript_standard_use_global ale-javascript.txt /*b:ale_javascript_standard_use_global* +b:ale_javascript_xo_executable ale-javascript.txt /*b:ale_javascript_xo_executable* +b:ale_javascript_xo_options ale-javascript.txt /*b:ale_javascript_xo_options* +b:ale_javascript_xo_use_global ale-javascript.txt /*b:ale_javascript_xo_use_global* +b:ale_json_fixjson_executable ale-json.txt /*b:ale_json_fixjson_executable* +b:ale_json_fixjson_options ale-json.txt /*b:ale_json_fixjson_options* +b:ale_json_fixjson_use_global ale-json.txt /*b:ale_json_fixjson_use_global* +b:ale_json_jq_executable ale-json.txt /*b:ale_json_jq_executable* +b:ale_json_jq_filters ale-json.txt /*b:ale_json_jq_filters* +b:ale_json_jq_options ale-json.txt /*b:ale_json_jq_options* +b:ale_json_jsonlint_executable ale-json.txt /*b:ale_json_jsonlint_executable* +b:ale_json_jsonlint_use_global ale-json.txt /*b:ale_json_jsonlint_use_global* +b:ale_json_spectral_executable ale-json.txt /*b:ale_json_spectral_executable* +b:ale_json_spectral_use_global ale-json.txt /*b:ale_json_spectral_use_global* +b:ale_jsonnet_jsonnet_lint_executable ale-jsonnet.txt /*b:ale_jsonnet_jsonnet_lint_executable* +b:ale_jsonnet_jsonnet_lint_options ale-jsonnet.txt /*b:ale_jsonnet_jsonnet_lint_options* +b:ale_jsonnet_jsonnetfmt_executable ale-jsonnet.txt /*b:ale_jsonnet_jsonnetfmt_executable* +b:ale_jsonnet_jsonnetfmt_options ale-jsonnet.txt /*b:ale_jsonnet_jsonnetfmt_options* +b:ale_julia_executable ale-julia.txt /*b:ale_julia_executable* +b:ale_keep_list_window_open ale.txt /*b:ale_keep_list_window_open* +b:ale_lacheck_executable ale-tex.txt /*b:ale_lacheck_executable* +b:ale_languagetool_executable ale.txt /*b:ale_languagetool_executable* +b:ale_languagetool_options ale.txt /*b:ale_languagetool_options* +b:ale_less_lessc_executable ale-less.txt /*b:ale_less_lessc_executable* +b:ale_less_lessc_options ale-less.txt /*b:ale_less_lessc_options* +b:ale_less_lessc_use_global ale-less.txt /*b:ale_less_lessc_use_global* +b:ale_less_stylelint_executable ale-less.txt /*b:ale_less_stylelint_executable* +b:ale_less_stylelint_options ale-less.txt /*b:ale_less_stylelint_options* +b:ale_less_stylelint_use_global ale-less.txt /*b:ale_less_stylelint_use_global* +b:ale_lint_delay ale.txt /*b:ale_lint_delay* +b:ale_lint_on_insert_leave ale.txt /*b:ale_lint_on_insert_leave* +b:ale_linted ale.txt /*b:ale_linted* +b:ale_linter_aliases ale.txt /*b:ale_linter_aliases* +b:ale_linters ale.txt /*b:ale_linters* +b:ale_linters_ignore ale.txt /*b:ale_linters_ignore* +b:ale_list_vertical ale.txt /*b:ale_list_vertical* +b:ale_list_window_size ale.txt /*b:ale_list_window_size* +b:ale_llvm_llc_executable ale-llvm.txt /*b:ale_llvm_llc_executable* +b:ale_loclist_msg_format ale.txt /*b:ale_loclist_msg_format* +b:ale_lua_lua_format_executable ale-lua.txt /*b:ale_lua_lua_format_executable* +b:ale_lua_lua_format_options ale-lua.txt /*b:ale_lua_lua_format_options* +b:ale_lua_luac_executable ale-lua.txt /*b:ale_lua_luac_executable* +b:ale_lua_luacheck_executable ale-lua.txt /*b:ale_lua_luacheck_executable* +b:ale_lua_luacheck_options ale-lua.txt /*b:ale_lua_luacheck_options* +b:ale_lua_luafmt_executable ale-lua.txt /*b:ale_lua_luafmt_executable* +b:ale_lua_luafmt_options ale-lua.txt /*b:ale_lua_luafmt_options* +b:ale_lua_selene_executable ale-lua.txt /*b:ale_lua_selene_executable* +b:ale_lua_selene_options ale-lua.txt /*b:ale_lua_selene_options* +b:ale_lua_stylua_executable ale-lua.txt /*b:ale_lua_stylua_executable* +b:ale_lua_stylua_options ale-lua.txt /*b:ale_lua_stylua_options* +b:ale_make_checkmake_config ale-make.txt /*b:ale_make_checkmake_config* +b:ale_markdown_markdownlint_executable ale-markdown.txt /*b:ale_markdown_markdownlint_executable* +b:ale_markdown_markdownlint_options ale-markdown.txt /*b:ale_markdown_markdownlint_options* +b:ale_markdown_mdl_executable ale-markdown.txt /*b:ale_markdown_mdl_executable* +b:ale_markdown_mdl_options ale-markdown.txt /*b:ale_markdown_mdl_options* +b:ale_markdown_pandoc_executable ale-markdown.txt /*b:ale_markdown_pandoc_executable* +b:ale_markdown_pandoc_options ale-markdown.txt /*b:ale_markdown_pandoc_options* +b:ale_markdown_remark_lint_executable ale-markdown.txt /*b:ale_markdown_remark_lint_executable* +b:ale_markdown_remark_lint_options ale-markdown.txt /*b:ale_markdown_remark_lint_options* +b:ale_markdown_remark_lint_use_global ale-markdown.txt /*b:ale_markdown_remark_lint_use_global* +b:ale_max_signs ale.txt /*b:ale_max_signs* +b:ale_maximum_file_size ale.txt /*b:ale_maximum_file_size* +b:ale_mercury_mmc_executable ale-mercury.txt /*b:ale_mercury_mmc_executable* +b:ale_mercury_mmc_options ale-mercury.txt /*b:ale_mercury_mmc_options* +b:ale_nasm_nasm_executable ale-nasm.txt /*b:ale_nasm_nasm_executable* +b:ale_nasm_nasm_options ale-nasm.txt /*b:ale_nasm_nasm_options* +b:ale_nim_nimpretty_executable ale-nim.txt /*b:ale_nim_nimpretty_executable* +b:ale_nim_nimpretty_options ale-nim.txt /*b:ale_nim_nimpretty_options* +b:ale_nix_fix_check_executable ale-nix.txt /*b:ale_nix_fix_check_executable* +b:ale_nix_nixfmt_executable ale-nix.txt /*b:ale_nix_nixfmt_executable* +b:ale_nix_nixfmt_options ale-nix.txt /*b:ale_nix_nixfmt_options* +b:ale_nix_nixpkgsfmt_executable ale-nix.txt /*b:ale_nix_nixpkgsfmt_executable* +b:ale_nix_nixpkgsfmt_options ale-nix.txt /*b:ale_nix_nixpkgsfmt_options* +b:ale_nix_statix_check_executable ale-nix.txt /*b:ale_nix_statix_check_executable* +b:ale_nix_statix_check_options ale-nix.txt /*b:ale_nix_statix_check_options* +b:ale_nix_statix_fix_options ale-nix.txt /*b:ale_nix_statix_fix_options* +b:ale_objc_ccls_executable ale-objc.txt /*b:ale_objc_ccls_executable* +b:ale_objc_ccls_init_options ale-objc.txt /*b:ale_objc_ccls_init_options* +b:ale_objc_clang_options ale-objc.txt /*b:ale_objc_clang_options* +b:ale_objc_clangd_executable ale-objc.txt /*b:ale_objc_clangd_executable* +b:ale_objc_clangd_options ale-objc.txt /*b:ale_objc_clangd_options* +b:ale_objcpp_clang_options ale-objcpp.txt /*b:ale_objcpp_clang_options* +b:ale_objcpp_clangd_executable ale-objcpp.txt /*b:ale_objcpp_clangd_executable* +b:ale_objcpp_clangd_options ale-objcpp.txt /*b:ale_objcpp_clangd_options* +b:ale_ocaml_dune_executable ale-ocaml.txt /*b:ale_ocaml_dune_executable* +b:ale_ocaml_dune_options ale-ocaml.txt /*b:ale_ocaml_dune_options* +b:ale_ocaml_ocamlformat_executable ale-ocaml.txt /*b:ale_ocaml_ocamlformat_executable* +b:ale_ocaml_ocamlformat_options ale-ocaml.txt /*b:ale_ocaml_ocamlformat_options* +b:ale_ocaml_ocamllsp_use_opam ale-ocaml.txt /*b:ale_ocaml_ocamllsp_use_opam* +b:ale_ocaml_ocp_indent_config ale-ocaml.txt /*b:ale_ocaml_ocp_indent_config* +b:ale_ocaml_ocp_indent_executable ale-ocaml.txt /*b:ale_ocaml_ocp_indent_executable* +b:ale_ocaml_ocp_indent_options ale-ocaml.txt /*b:ale_ocaml_ocp_indent_options* +b:ale_ocaml_ols_executable ale-ocaml.txt /*b:ale_ocaml_ols_executable* +b:ale_ocaml_ols_use_global ale-ocaml.txt /*b:ale_ocaml_ols_use_global* +b:ale_opa_fmt_executable ale-rego.txt /*b:ale_opa_fmt_executable* +b:ale_opa_fmt_options ale-rego.txt /*b:ale_opa_fmt_options* +b:ale_open_list ale.txt /*b:ale_open_list* +b:ale_openapi_ibm_validator_executable ale-openapi.txt /*b:ale_openapi_ibm_validator_executable* +b:ale_openapi_ibm_validator_options ale-openapi.txt /*b:ale_openapi_ibm_validator_options* +b:ale_openscad_sca2d_executable ale-openscad.txt /*b:ale_openscad_sca2d_executable* +b:ale_openscad_sca2d_options ale-openscad.txt /*b:ale_openscad_sca2d_options* +b:ale_packer_fmt_executable ale-packer.txt /*b:ale_packer_fmt_executable* +b:ale_packer_fmt_options ale-packer.txt /*b:ale_packer_fmt_options* +b:ale_pascal_ptop_executable ale-pascal.txt /*b:ale_pascal_ptop_executable* +b:ale_pascal_ptop_options ale-pascal.txt /*b:ale_pascal_ptop_options* +b:ale_perl6_perl6_executable ale-perl6.txt /*b:ale_perl6_perl6_executable* +b:ale_perl6_perl6_options ale-perl6.txt /*b:ale_perl6_perl6_options* +b:ale_perl_perl_executable ale-perl.txt /*b:ale_perl_perl_executable* +b:ale_perl_perl_options ale-perl.txt /*b:ale_perl_perl_options* +b:ale_perl_perlcritic_executable ale-perl.txt /*b:ale_perl_perlcritic_executable* +b:ale_perl_perlcritic_options ale-perl.txt /*b:ale_perl_perlcritic_options* +b:ale_perl_perlcritic_profile ale-perl.txt /*b:ale_perl_perlcritic_profile* +b:ale_perl_perltidy_options ale-perl.txt /*b:ale_perl_perltidy_options* +b:ale_php_cs_fixer_executable ale-php.txt /*b:ale_php_cs_fixer_executable* +b:ale_php_cs_fixer_options ale-php.txt /*b:ale_php_cs_fixer_options* +b:ale_php_cs_fixer_use_global ale-php.txt /*b:ale_php_cs_fixer_use_global* +b:ale_php_intelephense_config ale-php.txt /*b:ale_php_intelephense_config* +b:ale_php_intelephense_executable ale-php.txt /*b:ale_php_intelephense_executable* +b:ale_php_intelephense_use_global ale-php.txt /*b:ale_php_intelephense_use_global* +b:ale_php_langserver_executable ale-php.txt /*b:ale_php_langserver_executable* +b:ale_php_langserver_use_global ale-php.txt /*b:ale_php_langserver_use_global* +b:ale_php_phan_executable ale-php.txt /*b:ale_php_phan_executable* +b:ale_php_phan_minimum_severity ale-php.txt /*b:ale_php_phan_minimum_severity* +b:ale_php_phan_use_client ale-php.txt /*b:ale_php_phan_use_client* +b:ale_php_php_executable ale-php.txt /*b:ale_php_php_executable* +b:ale_php_phpcbf_executable ale-php.txt /*b:ale_php_phpcbf_executable* +b:ale_php_phpcbf_options ale-php.txt /*b:ale_php_phpcbf_options* +b:ale_php_phpcbf_standard ale-php.txt /*b:ale_php_phpcbf_standard* +b:ale_php_phpcbf_use_global ale-php.txt /*b:ale_php_phpcbf_use_global* +b:ale_php_phpcs_executable ale-php.txt /*b:ale_php_phpcs_executable* +b:ale_php_phpcs_options ale-php.txt /*b:ale_php_phpcs_options* +b:ale_php_phpcs_standard ale-php.txt /*b:ale_php_phpcs_standard* +b:ale_php_phpcs_use_global ale-php.txt /*b:ale_php_phpcs_use_global* +b:ale_php_phpmd_executable ale-php.txt /*b:ale_php_phpmd_executable* +b:ale_php_phpmd_ruleset ale-php.txt /*b:ale_php_phpmd_ruleset* +b:ale_php_phpstan_autoload ale-php.txt /*b:ale_php_phpstan_autoload* +b:ale_php_phpstan_configuration ale-php.txt /*b:ale_php_phpstan_configuration* +b:ale_php_phpstan_executable ale-php.txt /*b:ale_php_phpstan_executable* +b:ale_php_phpstan_level ale-php.txt /*b:ale_php_phpstan_level* +b:ale_php_phpstan_memory-limit ale-php.txt /*b:ale_php_phpstan_memory-limit* +b:ale_php_pint_executable ale-php.txt /*b:ale_php_pint_executable* +b:ale_php_pint_options ale-php.txt /*b:ale_php_pint_options* +b:ale_php_pint_use_global ale-php.txt /*b:ale_php_pint_use_global* +b:ale_php_psalm_executable ale-php.txt /*b:ale_php_psalm_executable* +b:ale_php_psalm_options ale-php.txt /*b:ale_php_psalm_options* +b:ale_php_psalm_use_global ale-php.txt /*b:ale_php_psalm_use_global* +b:ale_php_tlint_executable ale-php.txt /*b:ale_php_tlint_executable* +b:ale_php_tlint_options ale-php.txt /*b:ale_php_tlint_options* +b:ale_php_tlint_use_global ale-php.txt /*b:ale_php_tlint_use_global* +b:ale_pony_ponyc_executable ale-pony.txt /*b:ale_pony_ponyc_executable* +b:ale_pony_ponyc_options ale-pony.txt /*b:ale_pony_ponyc_options* +b:ale_powershell_powershell_executable ale-powershell.txt /*b:ale_powershell_powershell_executable* +b:ale_powershell_psscriptanalyzer_exclusions ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_exclusions* +b:ale_powershell_psscriptanalyzer_executable ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_executable* +b:ale_powershell_psscriptanalyzer_module ale-powershell.txt /*b:ale_powershell_psscriptanalyzer_module* +b:ale_prolog_swipl_alarm ale-prolog.txt /*b:ale_prolog_swipl_alarm* +b:ale_prolog_swipl_alarm_handler ale-prolog.txt /*b:ale_prolog_swipl_alarm_handler* +b:ale_prolog_swipl_executable ale-prolog.txt /*b:ale_prolog_swipl_executable* +b:ale_prolog_swipl_load ale-prolog.txt /*b:ale_prolog_swipl_load* +b:ale_prolog_swipl_timeout ale-prolog.txt /*b:ale_prolog_swipl_timeout* +b:ale_pug_puglint_executable ale-pug.txt /*b:ale_pug_puglint_executable* +b:ale_pug_puglint_options ale-pug.txt /*b:ale_pug_puglint_options* +b:ale_pug_puglint_use_global ale-pug.txt /*b:ale_pug_puglint_use_global* +b:ale_puppet_languageserver_executable ale-puppet.txt /*b:ale_puppet_languageserver_executable* +b:ale_puppet_puppet_executable ale-puppet.txt /*b:ale_puppet_puppet_executable* +b:ale_puppet_puppet_options ale-puppet.txt /*b:ale_puppet_puppet_options* +b:ale_puppet_puppetlint_executable ale-puppet.txt /*b:ale_puppet_puppetlint_executable* +b:ale_puppet_puppetlint_options ale-puppet.txt /*b:ale_puppet_puppetlint_options* +b:ale_purescript_purty_executable ale-purescript.txt /*b:ale_purescript_purty_executable* +b:ale_purescript_tidy_executable ale-purescript.txt /*b:ale_purescript_tidy_executable* +b:ale_purescript_tidy_options ale-purescript.txt /*b:ale_purescript_tidy_options* +b:ale_purescript_tidy_use_global ale-purescript.txt /*b:ale_purescript_tidy_use_global* +b:ale_pyrex_cython_executable ale-pyrex.txt /*b:ale_pyrex_cython_executable* +b:ale_pyrex_cython_options ale-pyrex.txt /*b:ale_pyrex_cython_options* +b:ale_python_auto_pipenv ale-python.txt /*b:ale_python_auto_pipenv* +b:ale_python_auto_poetry ale-python.txt /*b:ale_python_auto_poetry* +b:ale_python_autoflake_executable ale-python.txt /*b:ale_python_autoflake_executable* +b:ale_python_autoflake_options ale-python.txt /*b:ale_python_autoflake_options* +b:ale_python_autoflake_use_global ale-python.txt /*b:ale_python_autoflake_use_global* +b:ale_python_autoimport_executable ale-python.txt /*b:ale_python_autoimport_executable* +b:ale_python_autoimport_options ale-python.txt /*b:ale_python_autoimport_options* +b:ale_python_autoimport_use_global ale-python.txt /*b:ale_python_autoimport_use_global* +b:ale_python_autopep8_executable ale-python.txt /*b:ale_python_autopep8_executable* +b:ale_python_autopep8_options ale-python.txt /*b:ale_python_autopep8_options* +b:ale_python_autopep8_use_global ale-python.txt /*b:ale_python_autopep8_use_global* +b:ale_python_bandit_auto_pipenv ale-python.txt /*b:ale_python_bandit_auto_pipenv* +b:ale_python_bandit_auto_poetry ale-python.txt /*b:ale_python_bandit_auto_poetry* +b:ale_python_bandit_executable ale-python.txt /*b:ale_python_bandit_executable* +b:ale_python_bandit_options ale-python.txt /*b:ale_python_bandit_options* +b:ale_python_bandit_use_config ale-python.txt /*b:ale_python_bandit_use_config* +b:ale_python_bandit_use_global ale-python.txt /*b:ale_python_bandit_use_global* +b:ale_python_black_auto_pipenv ale-python.txt /*b:ale_python_black_auto_pipenv* +b:ale_python_black_auto_poetry ale-python.txt /*b:ale_python_black_auto_poetry* +b:ale_python_black_change_directory ale-python.txt /*b:ale_python_black_change_directory* +b:ale_python_black_executable ale-python.txt /*b:ale_python_black_executable* +b:ale_python_black_options ale-python.txt /*b:ale_python_black_options* +b:ale_python_black_use_global ale-python.txt /*b:ale_python_black_use_global* +b:ale_python_flake8_auto_pipenv ale-python.txt /*b:ale_python_flake8_auto_pipenv* +b:ale_python_flake8_auto_poetry ale-python.txt /*b:ale_python_flake8_auto_poetry* +b:ale_python_flake8_change_directory ale-python.txt /*b:ale_python_flake8_change_directory* +b:ale_python_flake8_executable ale-python.txt /*b:ale_python_flake8_executable* +b:ale_python_flake8_options ale-python.txt /*b:ale_python_flake8_options* +b:ale_python_flake8_use_global ale-python.txt /*b:ale_python_flake8_use_global* +b:ale_python_flakehell_auto_pipenv ale-python.txt /*b:ale_python_flakehell_auto_pipenv* +b:ale_python_flakehell_auto_poetry ale-python.txt /*b:ale_python_flakehell_auto_poetry* +b:ale_python_flakehell_change_directory ale-python.txt /*b:ale_python_flakehell_change_directory* +b:ale_python_flakehell_executable ale-python.txt /*b:ale_python_flakehell_executable* +b:ale_python_flakehell_options ale-python.txt /*b:ale_python_flakehell_options* +b:ale_python_flakehell_use_global ale-python.txt /*b:ale_python_flakehell_use_global* +b:ale_python_isort_auto_pipenv ale-python.txt /*b:ale_python_isort_auto_pipenv* +b:ale_python_isort_auto_poetry ale-python.txt /*b:ale_python_isort_auto_poetry* +b:ale_python_isort_executable ale-python.txt /*b:ale_python_isort_executable* +b:ale_python_isort_options ale-python.txt /*b:ale_python_isort_options* +b:ale_python_isort_use_global ale-python.txt /*b:ale_python_isort_use_global* +b:ale_python_mypy_auto_pipenv ale-python.txt /*b:ale_python_mypy_auto_pipenv* +b:ale_python_mypy_auto_poetry ale-python.txt /*b:ale_python_mypy_auto_poetry* +b:ale_python_mypy_executable ale-python.txt /*b:ale_python_mypy_executable* +b:ale_python_mypy_ignore_invalid_syntax ale-python.txt /*b:ale_python_mypy_ignore_invalid_syntax* +b:ale_python_mypy_options ale-python.txt /*b:ale_python_mypy_options* +b:ale_python_mypy_show_notes ale-python.txt /*b:ale_python_mypy_show_notes* +b:ale_python_mypy_use_global ale-python.txt /*b:ale_python_mypy_use_global* +b:ale_python_prospector_auto_pipenv ale-python.txt /*b:ale_python_prospector_auto_pipenv* +b:ale_python_prospector_auto_poetry ale-python.txt /*b:ale_python_prospector_auto_poetry* +b:ale_python_prospector_executable ale-python.txt /*b:ale_python_prospector_executable* +b:ale_python_prospector_options ale-python.txt /*b:ale_python_prospector_options* +b:ale_python_prospector_use_global ale-python.txt /*b:ale_python_prospector_use_global* +b:ale_python_pycodestyle_auto_pipenv ale-python.txt /*b:ale_python_pycodestyle_auto_pipenv* +b:ale_python_pycodestyle_auto_poetry ale-python.txt /*b:ale_python_pycodestyle_auto_poetry* +b:ale_python_pycodestyle_executable ale-python.txt /*b:ale_python_pycodestyle_executable* +b:ale_python_pycodestyle_options ale-python.txt /*b:ale_python_pycodestyle_options* +b:ale_python_pycodestyle_use_global ale-python.txt /*b:ale_python_pycodestyle_use_global* +b:ale_python_pydocstyle_auto_pipenv ale-python.txt /*b:ale_python_pydocstyle_auto_pipenv* +b:ale_python_pydocstyle_auto_poetry ale-python.txt /*b:ale_python_pydocstyle_auto_poetry* +b:ale_python_pydocstyle_executable ale-python.txt /*b:ale_python_pydocstyle_executable* +b:ale_python_pydocstyle_options ale-python.txt /*b:ale_python_pydocstyle_options* +b:ale_python_pydocstyle_use_global ale-python.txt /*b:ale_python_pydocstyle_use_global* +b:ale_python_pyflakes_auto_pipenv ale-python.txt /*b:ale_python_pyflakes_auto_pipenv* +b:ale_python_pyflakes_auto_poetry ale-python.txt /*b:ale_python_pyflakes_auto_poetry* +b:ale_python_pyflakes_executable ale-python.txt /*b:ale_python_pyflakes_executable* +b:ale_python_pyflyby_auto_pipenv ale-python.txt /*b:ale_python_pyflyby_auto_pipenv* +b:ale_python_pyflyby_auto_poetry ale-python.txt /*b:ale_python_pyflyby_auto_poetry* +b:ale_python_pyflyby_executable ale-python.txt /*b:ale_python_pyflyby_executable* +b:ale_python_pyflyby_options ale-python.txt /*b:ale_python_pyflyby_options* +b:ale_python_pyflyby_use_global ale-python.txt /*b:ale_python_pyflyby_use_global* +b:ale_python_pylama_auto_pipenv ale-python.txt /*b:ale_python_pylama_auto_pipenv* +b:ale_python_pylama_auto_poetry ale-python.txt /*b:ale_python_pylama_auto_poetry* +b:ale_python_pylama_change_directory ale-python.txt /*b:ale_python_pylama_change_directory* +b:ale_python_pylama_executable ale-python.txt /*b:ale_python_pylama_executable* +b:ale_python_pylama_options ale-python.txt /*b:ale_python_pylama_options* +b:ale_python_pylama_use_global ale-python.txt /*b:ale_python_pylama_use_global* +b:ale_python_pylint_auto_pipenv ale-python.txt /*b:ale_python_pylint_auto_pipenv* +b:ale_python_pylint_auto_poetry ale-python.txt /*b:ale_python_pylint_auto_poetry* +b:ale_python_pylint_change_directory ale-python.txt /*b:ale_python_pylint_change_directory* +b:ale_python_pylint_executable ale-python.txt /*b:ale_python_pylint_executable* +b:ale_python_pylint_options ale-python.txt /*b:ale_python_pylint_options* +b:ale_python_pylint_use_global ale-python.txt /*b:ale_python_pylint_use_global* +b:ale_python_pylint_use_msg_id ale-python.txt /*b:ale_python_pylint_use_msg_id* +b:ale_python_pylsp_auto_pipenv ale-python.txt /*b:ale_python_pylsp_auto_pipenv* +b:ale_python_pylsp_auto_poetry ale-python.txt /*b:ale_python_pylsp_auto_poetry* +b:ale_python_pylsp_config ale-python.txt /*b:ale_python_pylsp_config* +b:ale_python_pylsp_executable ale-python.txt /*b:ale_python_pylsp_executable* +b:ale_python_pylsp_options ale-python.txt /*b:ale_python_pylsp_options* +b:ale_python_pylsp_use_global ale-python.txt /*b:ale_python_pylsp_use_global* +b:ale_python_pyre_auto_pipenv ale-python.txt /*b:ale_python_pyre_auto_pipenv* +b:ale_python_pyre_auto_poetry ale-python.txt /*b:ale_python_pyre_auto_poetry* +b:ale_python_pyre_executable ale-python.txt /*b:ale_python_pyre_executable* +b:ale_python_pyre_use_global ale-python.txt /*b:ale_python_pyre_use_global* +b:ale_python_pyright_config ale-python.txt /*b:ale_python_pyright_config* +b:ale_python_pyright_executable ale-python.txt /*b:ale_python_pyright_executable* +b:ale_python_refurb_auto_pipenv ale-python.txt /*b:ale_python_refurb_auto_pipenv* +b:ale_python_refurb_auto_poetry ale-python.txt /*b:ale_python_refurb_auto_poetry* +b:ale_python_refurb_change_directory ale-python.txt /*b:ale_python_refurb_change_directory* +b:ale_python_refurb_executable ale-python.txt /*b:ale_python_refurb_executable* +b:ale_python_refurb_options ale-python.txt /*b:ale_python_refurb_options* +b:ale_python_refurb_use_global ale-python.txt /*b:ale_python_refurb_use_global* +b:ale_python_reorder_python_imports_executable ale-python.txt /*b:ale_python_reorder_python_imports_executable* +b:ale_python_reorder_python_imports_options ale-python.txt /*b:ale_python_reorder_python_imports_options* +b:ale_python_reorder_python_imports_use_global ale-python.txt /*b:ale_python_reorder_python_imports_use_global* +b:ale_python_ruff_auto_pipenv ale-python.txt /*b:ale_python_ruff_auto_pipenv* +b:ale_python_ruff_auto_poetry ale-python.txt /*b:ale_python_ruff_auto_poetry* +b:ale_python_ruff_change_directory ale-python.txt /*b:ale_python_ruff_change_directory* +b:ale_python_ruff_executable ale-python.txt /*b:ale_python_ruff_executable* +b:ale_python_ruff_options ale-python.txt /*b:ale_python_ruff_options* +b:ale_python_ruff_use_global ale-python.txt /*b:ale_python_ruff_use_global* +b:ale_python_unimport_auto_pipenv ale-python.txt /*b:ale_python_unimport_auto_pipenv* +b:ale_python_unimport_auto_poetry ale-python.txt /*b:ale_python_unimport_auto_poetry* +b:ale_python_unimport_executable ale-python.txt /*b:ale_python_unimport_executable* +b:ale_python_unimport_options ale-python.txt /*b:ale_python_unimport_options* +b:ale_python_unimport_use_global ale-python.txt /*b:ale_python_unimport_use_global* +b:ale_python_vulture_change_directory ale-python.txt /*b:ale_python_vulture_change_directory* +b:ale_python_vulture_executable ale-python.txt /*b:ale_python_vulture_executable* +b:ale_python_vulture_options ale-python.txt /*b:ale_python_vulture_options* +b:ale_python_vulture_use_global ale-python.txt /*b:ale_python_vulture_use_global* +b:ale_python_yapf_executable ale-python.txt /*b:ale_python_yapf_executable* +b:ale_python_yapf_use_global ale-python.txt /*b:ale_python_yapf_use_global* +b:ale_qml_qmlfmt_executable ale-qml.txt /*b:ale_qml_qmlfmt_executable* +b:ale_r_languageserver_cmd ale-r.txt /*b:ale_r_languageserver_cmd* +b:ale_r_languageserver_config ale-r.txt /*b:ale_r_languageserver_config* +b:ale_r_lintr_lint_package ale-r.txt /*b:ale_r_lintr_lint_package* +b:ale_r_lintr_options ale-r.txt /*b:ale_r_lintr_options* +b:ale_r_styler_options ale-r.txt /*b:ale_r_styler_options* +b:ale_racket_raco_fmt_executable ale-racket.txt /*b:ale_racket_raco_fmt_executable* +b:ale_racket_raco_fmt_options ale-racket.txt /*b:ale_racket_raco_fmt_options* +b:ale_reason_ls_executable ale-reasonml.txt /*b:ale_reason_ls_executable* +b:ale_reason_ols_executable ale-reasonml.txt /*b:ale_reason_ols_executable* +b:ale_reason_ols_use_global ale-reasonml.txt /*b:ale_reason_ols_use_global* +b:ale_reasonml_refmt_executable ale-reasonml.txt /*b:ale_reasonml_refmt_executable* +b:ale_reasonml_refmt_options ale-reasonml.txt /*b:ale_reasonml_refmt_options* +b:ale_robot_rflint_executable ale-robot.txt /*b:ale_robot_rflint_executable* +b:ale_root ale.txt /*b:ale_root* +b:ale_ruby_brakeman_executable ale-ruby.txt /*b:ale_ruby_brakeman_executable* +b:ale_ruby_brakeman_options ale-ruby.txt /*b:ale_ruby_brakeman_options* +b:ale_ruby_debride_executable ale-ruby.txt /*b:ale_ruby_debride_executable* +b:ale_ruby_debride_options ale-ruby.txt /*b:ale_ruby_debride_options* +b:ale_ruby_erblint_options ale-eruby.txt /*b:ale_ruby_erblint_options* +b:ale_ruby_rails_best_practices_executable ale-ruby.txt /*b:ale_ruby_rails_best_practices_executable* +b:ale_ruby_rails_best_practices_options ale-ruby.txt /*b:ale_ruby_rails_best_practices_options* +b:ale_ruby_reek_executable ale-ruby.txt /*b:ale_ruby_reek_executable* +b:ale_ruby_reek_show_context ale-ruby.txt /*b:ale_ruby_reek_show_context* +b:ale_ruby_reek_show_wiki_link ale-ruby.txt /*b:ale_ruby_reek_show_wiki_link* +b:ale_ruby_rubocop_auto_correct_all ale-ruby.txt /*b:ale_ruby_rubocop_auto_correct_all* +b:ale_ruby_rubocop_executable ale-ruby.txt /*b:ale_ruby_rubocop_executable* +b:ale_ruby_rubocop_options ale-ruby.txt /*b:ale_ruby_rubocop_options* +b:ale_ruby_ruby_executable ale-ruby.txt /*b:ale_ruby_ruby_executable* +b:ale_ruby_rufo_executable ale-ruby.txt /*b:ale_ruby_rufo_executable* +b:ale_ruby_ruumba_options ale-eruby.txt /*b:ale_ruby_ruumba_options* +b:ale_ruby_solargraph_executable ale-ruby.txt /*b:ale_ruby_solargraph_executable* +b:ale_ruby_sorbet_enable_watchman ale-ruby.txt /*b:ale_ruby_sorbet_enable_watchman* +b:ale_ruby_sorbet_executable ale-ruby.txt /*b:ale_ruby_sorbet_executable* +b:ale_ruby_sorbet_options ale-ruby.txt /*b:ale_ruby_sorbet_options* +b:ale_ruby_standardrb_executable ale-ruby.txt /*b:ale_ruby_standardrb_executable* +b:ale_ruby_standardrb_options ale-ruby.txt /*b:ale_ruby_standardrb_options* +b:ale_ruby_syntax_tree_executable ale-ruby.txt /*b:ale_ruby_syntax_tree_executable* +b:ale_ruby_syntax_tree_options ale-ruby.txt /*b:ale_ruby_syntax_tree_options* +b:ale_rust_analyzer_config ale-rust.txt /*b:ale_rust_analyzer_config* +b:ale_rust_analyzer_executable ale-rust.txt /*b:ale_rust_analyzer_executable* +b:ale_rust_cargo_avoid_whole_workspace ale-rust.txt /*b:ale_rust_cargo_avoid_whole_workspace* +b:ale_rust_cargo_check_all_targets ale-rust.txt /*b:ale_rust_cargo_check_all_targets* +b:ale_rust_cargo_check_examples ale-rust.txt /*b:ale_rust_cargo_check_examples* +b:ale_rust_cargo_check_tests ale-rust.txt /*b:ale_rust_cargo_check_tests* +b:ale_rust_cargo_clippy_options ale-rust.txt /*b:ale_rust_cargo_clippy_options* +b:ale_rust_cargo_default_feature_behavior ale-rust.txt /*b:ale_rust_cargo_default_feature_behavior* +b:ale_rust_cargo_include_features ale-rust.txt /*b:ale_rust_cargo_include_features* +b:ale_rust_cargo_target_dir ale-rust.txt /*b:ale_rust_cargo_target_dir* +b:ale_rust_cargo_use_check ale-rust.txt /*b:ale_rust_cargo_use_check* +b:ale_rust_cargo_use_clippy ale-rust.txt /*b:ale_rust_cargo_use_clippy* +b:ale_rust_ignore_error_codes ale-rust.txt /*b:ale_rust_ignore_error_codes* +b:ale_rust_ignore_secondary_spans ale-rust.txt /*b:ale_rust_ignore_secondary_spans* +b:ale_rust_rls_config ale-rust.txt /*b:ale_rust_rls_config* +b:ale_rust_rls_executable ale-rust.txt /*b:ale_rust_rls_executable* +b:ale_rust_rls_toolchain ale-rust.txt /*b:ale_rust_rls_toolchain* +b:ale_rust_rustc_options ale-rust.txt /*b:ale_rust_rustc_options* +b:ale_rust_rustfmt_executable ale-rust.txt /*b:ale_rust_rustfmt_executable* +b:ale_rust_rustfmt_options ale-rust.txt /*b:ale_rust_rustfmt_options* +b:ale_sass_stylelint_executable ale-sass.txt /*b:ale_sass_stylelint_executable* +b:ale_sass_stylelint_use_global ale-sass.txt /*b:ale_sass_stylelint_use_global* +b:ale_scala_metals_executable ale-scala.txt /*b:ale_scala_metals_executable* +b:ale_scala_metals_project_root ale-scala.txt /*b:ale_scala_metals_project_root* +b:ale_scala_sbtserver_address ale-scala.txt /*b:ale_scala_sbtserver_address* +b:ale_scala_sbtserver_project_root ale-scala.txt /*b:ale_scala_sbtserver_project_root* +b:ale_scala_scalafmt_executable ale-scala.txt /*b:ale_scala_scalafmt_executable* +b:ale_scala_scalafmt_options ale-scala.txt /*b:ale_scala_scalafmt_options* +b:ale_scala_scalastyle_config ale-scala.txt /*b:ale_scala_scalastyle_config* +b:ale_scala_scalastyle_options ale-scala.txt /*b:ale_scala_scalastyle_options* +b:ale_scss_sasslint_executable ale-scss.txt /*b:ale_scss_sasslint_executable* +b:ale_scss_sasslint_options ale-scss.txt /*b:ale_scss_sasslint_options* +b:ale_scss_sasslint_use_global ale-scss.txt /*b:ale_scss_sasslint_use_global* +b:ale_scss_stylelint_executable ale-scss.txt /*b:ale_scss_stylelint_executable* +b:ale_scss_stylelint_options ale-scss.txt /*b:ale_scss_stylelint_options* +b:ale_scss_stylelint_use_global ale-scss.txt /*b:ale_scss_stylelint_use_global* +b:ale_set_balloons ale.txt /*b:ale_set_balloons* +b:ale_set_balloons_legacy_echo ale.txt /*b:ale_set_balloons_legacy_echo* +b:ale_sh_bashate_executable ale-sh.txt /*b:ale_sh_bashate_executable* +b:ale_sh_bashate_options ale-sh.txt /*b:ale_sh_bashate_options* +b:ale_sh_language_server_executable ale-sh.txt /*b:ale_sh_language_server_executable* +b:ale_sh_language_server_use_global ale-sh.txt /*b:ale_sh_language_server_use_global* +b:ale_sh_shell_default_shell ale-sh.txt /*b:ale_sh_shell_default_shell* +b:ale_sh_shellcheck_change_directory ale-sh.txt /*b:ale_sh_shellcheck_change_directory* +b:ale_sh_shellcheck_dialect ale-sh.txt /*b:ale_sh_shellcheck_dialect* +b:ale_sh_shellcheck_exclusions ale-sh.txt /*b:ale_sh_shellcheck_exclusions* +b:ale_sh_shellcheck_executable ale-sh.txt /*b:ale_sh_shellcheck_executable* +b:ale_sh_shellcheck_options ale-sh.txt /*b:ale_sh_shellcheck_options* +b:ale_sh_shfmt_options ale-sh.txt /*b:ale_sh_shfmt_options* +b:ale_shell ale.txt /*b:ale_shell* +b:ale_shell_arguments ale.txt /*b:ale_shell_arguments* +b:ale_sml_smlnj_cm_file ale-sml.txt /*b:ale_sml_smlnj_cm_file* +b:ale_solidity_solc_executable ale-solidity.txt /*b:ale_solidity_solc_executable* +b:ale_solidity_solc_options ale-solidity.txt /*b:ale_solidity_solc_options* +b:ale_sourcekit_lsp_executable ale-swift.txt /*b:ale_sourcekit_lsp_executable* +b:ale_spec_rpmlint_executable ale-spec.txt /*b:ale_spec_rpmlint_executable* +b:ale_spec_rpmlint_options ale-spec.txt /*b:ale_spec_rpmlint_options* +b:ale_sql_pgformatter_executable ale-sql.txt /*b:ale_sql_pgformatter_executable* +b:ale_sql_pgformatter_options ale-sql.txt /*b:ale_sql_pgformatter_options* +b:ale_sql_sqlfluff_executable ale-sql.txt /*b:ale_sql_sqlfluff_executable* +b:ale_sql_sqlfluff_options ale-sql.txt /*b:ale_sql_sqlfluff_options* +b:ale_sql_sqlfmt_executable ale-sql.txt /*b:ale_sql_sqlfmt_executable* +b:ale_sql_sqlfmt_options ale-sql.txt /*b:ale_sql_sqlfmt_options* +b:ale_sql_sqlformat_executable ale-sql.txt /*b:ale_sql_sqlformat_executable* +b:ale_sql_sqlformat_options ale-sql.txt /*b:ale_sql_sqlformat_options* +b:ale_stylus_stylelint_executable ale-stylus.txt /*b:ale_stylus_stylelint_executable* +b:ale_stylus_stylelint_options ale-stylus.txt /*b:ale_stylus_stylelint_options* +b:ale_stylus_stylelint_use_global ale-stylus.txt /*b:ale_stylus_stylelint_use_global* +b:ale_sugarss_stylelint_executable ale-sugarss.txt /*b:ale_sugarss_stylelint_executable* +b:ale_sugarss_stylelint_options ale-sugarss.txt /*b:ale_sugarss_stylelint_options* +b:ale_sugarss_stylelint_use_global ale-sugarss.txt /*b:ale_sugarss_stylelint_use_global* +b:ale_svelte_svelteserver_executable ale-svelte.txt /*b:ale_svelte_svelteserver_executable* +b:ale_svelte_svelteserver_use_global ale-svelte.txt /*b:ale_svelte_svelteserver_use_global* +b:ale_swift_appleswiftformat_executable ale-swift.txt /*b:ale_swift_appleswiftformat_executable* +b:ale_swift_appleswiftformat_use_swiftpm ale-swift.txt /*b:ale_swift_appleswiftformat_use_swiftpm* +b:ale_tcl_nagelfar_executable ale-tcl.txt /*b:ale_tcl_nagelfar_executable* +b:ale_tcl_nagelfar_options ale-tcl.txt /*b:ale_tcl_nagelfar_options* +b:ale_terraform_checkov_executable ale-terraform.txt /*b:ale_terraform_checkov_executable* +b:ale_terraform_checkov_options ale-terraform.txt /*b:ale_terraform_checkov_options* +b:ale_terraform_fmt_executable ale-terraform.txt /*b:ale_terraform_fmt_executable* +b:ale_terraform_fmt_options ale-terraform.txt /*b:ale_terraform_fmt_options* +b:ale_terraform_langserver_executable ale-terraform.txt /*b:ale_terraform_langserver_executable* +b:ale_terraform_langserver_options ale-terraform.txt /*b:ale_terraform_langserver_options* +b:ale_terraform_ls_executable ale-terraform.txt /*b:ale_terraform_ls_executable* +b:ale_terraform_ls_options ale-terraform.txt /*b:ale_terraform_ls_options* +b:ale_terraform_terraform_executable ale-terraform.txt /*b:ale_terraform_terraform_executable* +b:ale_terraform_tflint_executable ale-terraform.txt /*b:ale_terraform_tflint_executable* +b:ale_terraform_tflint_options ale-terraform.txt /*b:ale_terraform_tflint_options* +b:ale_terraform_tfsec_executable ale-terraform.txt /*b:ale_terraform_tfsec_executable* +b:ale_terraform_tfsec_options ale-terraform.txt /*b:ale_terraform_tfsec_options* +b:ale_tex_chktex_executable ale-tex.txt /*b:ale_tex_chktex_executable* +b:ale_tex_chktex_options ale-tex.txt /*b:ale_tex_chktex_options* +b:ale_tex_latexindent_executable ale-tex.txt /*b:ale_tex_latexindent_executable* +b:ale_tex_latexindent_options ale-tex.txt /*b:ale_tex_latexindent_options* +b:ale_tex_texlab_config ale-tex.txt /*b:ale_tex_texlab_config* +b:ale_tex_texlab_executable ale-tex.txt /*b:ale_tex_texlab_executable* +b:ale_tex_texlab_options ale-tex.txt /*b:ale_tex_texlab_options* +b:ale_textlint_executable ale-text.txt /*b:ale_textlint_executable* +b:ale_textlint_options ale-text.txt /*b:ale_textlint_options* +b:ale_textlint_use_global ale-text.txt /*b:ale_textlint_use_global* +b:ale_thrift_thrift_executable ale-thrift.txt /*b:ale_thrift_thrift_executable* +b:ale_thrift_thrift_generators ale-thrift.txt /*b:ale_thrift_thrift_generators* +b:ale_thrift_thrift_includes ale-thrift.txt /*b:ale_thrift_thrift_includes* +b:ale_thrift_thrift_options ale-thrift.txt /*b:ale_thrift_thrift_options* +b:ale_thrift_thriftcheck_executable ale-thrift.txt /*b:ale_thrift_thriftcheck_executable* +b:ale_thrift_thriftcheck_options ale-thrift.txt /*b:ale_thrift_thriftcheck_options* +b:ale_type_map ale.txt /*b:ale_type_map* +b:ale_typescript_standard_executable ale-typescript.txt /*b:ale_typescript_standard_executable* +b:ale_typescript_standard_options ale-typescript.txt /*b:ale_typescript_standard_options* +b:ale_typescript_standard_use_global ale-typescript.txt /*b:ale_typescript_standard_use_global* +b:ale_typescript_tslint_config_path ale-typescript.txt /*b:ale_typescript_tslint_config_path* +b:ale_typescript_tslint_executable ale-typescript.txt /*b:ale_typescript_tslint_executable* +b:ale_typescript_tslint_ignore_empty_files ale-typescript.txt /*b:ale_typescript_tslint_ignore_empty_files* +b:ale_typescript_tslint_rules_dir ale-typescript.txt /*b:ale_typescript_tslint_rules_dir* +b:ale_typescript_tslint_use_global ale-typescript.txt /*b:ale_typescript_tslint_use_global* +b:ale_typescript_tsserver_config_path ale-typescript.txt /*b:ale_typescript_tsserver_config_path* +b:ale_typescript_tsserver_executable ale-typescript.txt /*b:ale_typescript_tsserver_executable* +b:ale_typescript_tsserver_use_global ale-typescript.txt /*b:ale_typescript_tsserver_use_global* +b:ale_typescript_xo_executable ale-typescript.txt /*b:ale_typescript_xo_executable* +b:ale_typescript_xo_options ale-typescript.txt /*b:ale_typescript_xo_options* +b:ale_typescript_xo_use_global ale-typescript.txt /*b:ale_typescript_xo_use_global* +b:ale_update_tagstack ale.txt /*b:ale_update_tagstack* +b:ale_v_v_executable ale-v.txt /*b:ale_v_v_executable* +b:ale_v_v_options ale-v.txt /*b:ale_v_v_options* +b:ale_v_vfmt_options ale-v.txt /*b:ale_v_vfmt_options* +b:ale_verilog_verilator_options ale-verilog.txt /*b:ale_verilog_verilator_options* +b:ale_verilog_vlog_executable ale-verilog.txt /*b:ale_verilog_vlog_executable* +b:ale_verilog_vlog_options ale-verilog.txt /*b:ale_verilog_vlog_options* +b:ale_verilog_xvlog_executable ale-verilog.txt /*b:ale_verilog_xvlog_executable* +b:ale_verilog_xvlog_options ale-verilog.txt /*b:ale_verilog_xvlog_options* +b:ale_verilog_yosys_executable ale-verilog.txt /*b:ale_verilog_yosys_executable* +b:ale_verilog_yosys_options ale-verilog.txt /*b:ale_verilog_yosys_options* +b:ale_vhdl_ghdl_executable ale-vhdl.txt /*b:ale_vhdl_ghdl_executable* +b:ale_vhdl_ghdl_options ale-vhdl.txt /*b:ale_vhdl_ghdl_options* +b:ale_vhdl_vcom_executable ale-vhdl.txt /*b:ale_vhdl_vcom_executable* +b:ale_vhdl_vcom_options ale-vhdl.txt /*b:ale_vhdl_vcom_options* +b:ale_vhdl_xvhdl_executable ale-vhdl.txt /*b:ale_vhdl_xvhdl_executable* +b:ale_vhdl_xvhdl_options ale-vhdl.txt /*b:ale_vhdl_xvhdl_options* +b:ale_vim_vimls_config ale-vim.txt /*b:ale_vim_vimls_config* +b:ale_vim_vimls_executable ale-vim.txt /*b:ale_vim_vimls_executable* +b:ale_vim_vimls_use_global ale-vim.txt /*b:ale_vim_vimls_use_global* +b:ale_vim_vint_executable ale-vim.txt /*b:ale_vim_vint_executable* +b:ale_vim_vint_show_style_issues ale-vim.txt /*b:ale_vim_vint_show_style_issues* +b:ale_virtualenv_dir_names ale.txt /*b:ale_virtualenv_dir_names* +b:ale_virtualtext_delay ale.txt /*b:ale_virtualtext_delay* +b:ale_virtualtext_prefix ale.txt /*b:ale_virtualtext_prefix* +b:ale_vue_vls_executable ale-vue.txt /*b:ale_vue_vls_executable* +b:ale_vue_vls_use_global ale-vue.txt /*b:ale_vue_vls_use_global* +b:ale_vue_volar_executable ale-vue.txt /*b:ale_vue_volar_executable* +b:ale_vue_volar_init_options ale-vue.txt /*b:ale_vue_volar_init_options* +b:ale_vue_volar_use_global ale-vue.txt /*b:ale_vue_volar_use_global* +b:ale_warn_about_trailing_blank_lines ale.txt /*b:ale_warn_about_trailing_blank_lines* +b:ale_warn_about_trailing_whitespace ale.txt /*b:ale_warn_about_trailing_whitespace* +b:ale_wgsl_naga_executable ale-wgsl.txt /*b:ale_wgsl_naga_executable* +b:ale_windows_node_executable_path ale.txt /*b:ale_windows_node_executable_path* +b:ale_writegood_executable ale.txt /*b:ale_writegood_executable* +b:ale_writegood_options ale.txt /*b:ale_writegood_options* +b:ale_writegood_use_global ale.txt /*b:ale_writegood_use_global* +b:ale_xml_xmllint_executable ale-xml.txt /*b:ale_xml_xmllint_executable* +b:ale_xml_xmllint_indentsize ale-xml.txt /*b:ale_xml_xmllint_indentsize* +b:ale_xml_xmllint_options ale-xml.txt /*b:ale_xml_xmllint_options* +b:ale_yaml_actionlint_executable ale-yaml.txt /*b:ale_yaml_actionlint_executable* +b:ale_yaml_actionlint_options ale-yaml.txt /*b:ale_yaml_actionlint_options* +b:ale_yaml_gitlablint_executable ale-yaml.txt /*b:ale_yaml_gitlablint_executable* +b:ale_yaml_gitlablint_options ale-yaml.txt /*b:ale_yaml_gitlablint_options* +b:ale_yaml_ls_config ale-yaml.txt /*b:ale_yaml_ls_config* +b:ale_yaml_ls_executable ale-yaml.txt /*b:ale_yaml_ls_executable* +b:ale_yaml_ls_use_global ale-yaml.txt /*b:ale_yaml_ls_use_global* +b:ale_yaml_spectral_executable ale-yaml.txt /*b:ale_yaml_spectral_executable* +b:ale_yaml_spectral_use_global ale-yaml.txt /*b:ale_yaml_spectral_use_global* +b:ale_yaml_swaglint_executable ale-yaml.txt /*b:ale_yaml_swaglint_executable* +b:ale_yaml_swaglint_use_global ale-yaml.txt /*b:ale_yaml_swaglint_use_global* +b:ale_yaml_yamlfix_executable ale-yaml.txt /*b:ale_yaml_yamlfix_executable* +b:ale_yaml_yamlfix_options ale-yaml.txt /*b:ale_yaml_yamlfix_options* +b:ale_yaml_yamlfix_use_global ale-yaml.txt /*b:ale_yaml_yamlfix_use_global* +b:ale_yaml_yamllint_executable ale-yaml.txt /*b:ale_yaml_yamllint_executable* +b:ale_yaml_yamllint_options ale-yaml.txt /*b:ale_yaml_yamllint_options* +b:ale_yang_lsp_executable ale-yang.txt /*b:ale_yang_lsp_executable* +b:ale_zeek_zeek_executable ale-zeek.txt /*b:ale_zeek_zeek_executable* +b:ale_zig_zigfmt_executable ale-zig.txt /*b:ale_zig_zigfmt_executable* +b:ale_zig_zls_config ale-zig.txt /*b:ale_zig_zls_config* +b:ale_zig_zls_executable ale-zig.txt /*b:ale_zig_zls_executable* +b:rego_opacheck_executable ale-rego.txt /*b:rego_opacheck_executable* +b:rego_opacheck_options ale-rego.txt /*b:rego_opacheck_options* +b:vala_vala_lint_config_filename ale-vala.txt /*b:vala_vala_lint_config_filename* +b:vala_vala_lint_executable ale-vala.txt /*b:vala_vala_lint_executable* +g:airline#extensions#ale#enabled ale.txt /*g:airline#extensions#ale#enabled* +g:ale-c-flawfinder ale-c.txt /*g:ale-c-flawfinder* +g:ale-cpp-flawfinder ale-cpp.txt /*g:ale-cpp-flawfinder* +g:ale_ada_adals_encoding ale-ada.txt /*g:ale_ada_adals_encoding* +g:ale_ada_adals_executable ale-ada.txt /*g:ale_ada_adals_executable* +g:ale_ada_adals_project ale-ada.txt /*g:ale_ada_adals_project* +g:ale_ada_gcc_executable ale-ada.txt /*g:ale_ada_gcc_executable* +g:ale_ada_gcc_options ale-ada.txt /*g:ale_ada_gcc_options* +g:ale_ada_gnatpp_options ale-ada.txt /*g:ale_ada_gnatpp_options* +g:ale_alex_executable ale.txt /*g:ale_alex_executable* +g:ale_alex_use_global ale.txt /*g:ale_alex_use_global* +g:ale_ansible_ansible_lint_executable ale-ansible.txt /*g:ale_ansible_ansible_lint_executable* +g:ale_ansible_language_server ale-ansible.txt /*g:ale_ansible_language_server* +g:ale_ansible_language_server_config ale-ansible.txt /*g:ale_ansible_language_server_config* +g:ale_apkbuild_apkbuild_lint_executable ale-apkbuild.txt /*g:ale_apkbuild_apkbuild_lint_executable* +g:ale_apkbuild_secfixes_check_executable ale-apkbuild.txt /*g:ale_apkbuild_secfixes_check_executable* +g:ale_asm_gcc_executable ale-asm.txt /*g:ale_asm_gcc_executable* +g:ale_asm_gcc_options ale-asm.txt /*g:ale_asm_gcc_options* +g:ale_avra_avra_executable ale-avra.txt /*g:ale_avra_avra_executable* +g:ale_avra_avra_options ale-avra.txt /*g:ale_avra_avra_options* +g:ale_awk_gawk_executable ale-awk.txt /*g:ale_awk_gawk_executable* +g:ale_awk_gawk_options ale-awk.txt /*g:ale_awk_gawk_options* +g:ale_bazel_buildifier_executable ale-bazel.txt /*g:ale_bazel_buildifier_executable* +g:ale_bazel_buildifier_options ale-bazel.txt /*g:ale_bazel_buildifier_options* +g:ale_bazel_buildifier_use_global ale-bazel.txt /*g:ale_bazel_buildifier_use_global* +g:ale_bib_bibclean_executable ale-bib.txt /*g:ale_bib_bibclean_executable* +g:ale_bib_bibclean_options ale-bib.txt /*g:ale_bib_bibclean_options* +g:ale_bicep_bicep_executable ale-bicep.txt /*g:ale_bicep_bicep_executable* +g:ale_bicep_bicep_options ale-bicep.txt /*g:ale_bicep_bicep_options* +g:ale_bitbake_oelint_adv_config ale-bitbake.txt /*g:ale_bitbake_oelint_adv_config* +g:ale_bitbake_oelint_adv_executable ale-bitbake.txt /*g:ale_bitbake_oelint_adv_executable* +g:ale_bitbake_oelint_adv_options ale-bitbake.txt /*g:ale_bitbake_oelint_adv_options* +g:ale_c_always_make ale-c.txt /*g:ale_c_always_make* +g:ale_c_astyle_executable ale-c.txt /*g:ale_c_astyle_executable* +g:ale_c_astyle_project_options ale-c.txt /*g:ale_c_astyle_project_options* +g:ale_c_build_dir ale-c.txt /*g:ale_c_build_dir* +g:ale_c_build_dir_names ale-c.txt /*g:ale_c_build_dir_names* +g:ale_c_cc_executable ale-c.txt /*g:ale_c_cc_executable* +g:ale_c_cc_header_exts ale-c.txt /*g:ale_c_cc_header_exts* +g:ale_c_cc_options ale-c.txt /*g:ale_c_cc_options* +g:ale_c_cc_use_header_lang_flag ale-c.txt /*g:ale_c_cc_use_header_lang_flag* +g:ale_c_ccls_executable ale-c.txt /*g:ale_c_ccls_executable* +g:ale_c_ccls_init_options ale-c.txt /*g:ale_c_ccls_init_options* +g:ale_c_clangd_executable ale-c.txt /*g:ale_c_clangd_executable* +g:ale_c_clangd_options ale-c.txt /*g:ale_c_clangd_options* +g:ale_c_clangformat_executable ale-c.txt /*g:ale_c_clangformat_executable* +g:ale_c_clangformat_options ale-c.txt /*g:ale_c_clangformat_options* +g:ale_c_clangformat_style_option ale-c.txt /*g:ale_c_clangformat_style_option* +g:ale_c_clangformat_use_local_file ale-c.txt /*g:ale_c_clangformat_use_local_file* +g:ale_c_clangtidy_checks ale-c.txt /*g:ale_c_clangtidy_checks* +g:ale_c_clangtidy_executable ale-c.txt /*g:ale_c_clangtidy_executable* +g:ale_c_clangtidy_extra_options ale-c.txt /*g:ale_c_clangtidy_extra_options* +g:ale_c_clangtidy_fix_errors ale-c.txt /*g:ale_c_clangtidy_fix_errors* +g:ale_c_clangtidy_options ale-c.txt /*g:ale_c_clangtidy_options* +g:ale_c_cppcheck_executable ale-c.txt /*g:ale_c_cppcheck_executable* +g:ale_c_cppcheck_options ale-c.txt /*g:ale_c_cppcheck_options* +g:ale_c_cpplint_executable ale-cpp.txt /*g:ale_c_cpplint_executable* +g:ale_c_cpplint_options ale-cpp.txt /*g:ale_c_cpplint_options* +g:ale_c_cquery_cache_directory ale-c.txt /*g:ale_c_cquery_cache_directory* +g:ale_c_cquery_executable ale-c.txt /*g:ale_c_cquery_executable* +g:ale_c_flawfinder_error_severity ale-c.txt /*g:ale_c_flawfinder_error_severity* +g:ale_c_flawfinder_executable ale-c.txt /*g:ale_c_flawfinder_executable* +g:ale_c_flawfinder_minlevel ale-c.txt /*g:ale_c_flawfinder_minlevel* +g:ale_c_parse_compile_commands ale-c.txt /*g:ale_c_parse_compile_commands* +g:ale_c_parse_makefile ale-c.txt /*g:ale_c_parse_makefile* +g:ale_c_uncrustify_executable ale-c.txt /*g:ale_c_uncrustify_executable* +g:ale_c_uncrustify_options ale-c.txt /*g:ale_c_uncrustify_options* +g:ale_cache_executable_check_failures ale.txt /*g:ale_cache_executable_check_failures* +g:ale_cairo_starknet_executable ale-cairo.txt /*g:ale_cairo_starknet_executable* +g:ale_change_sign_column_color ale.txt /*g:ale_change_sign_column_color* +g:ale_chef_cookstyle_executable ale-chef.txt /*g:ale_chef_cookstyle_executable* +g:ale_chef_cookstyle_options ale-chef.txt /*g:ale_chef_cookstyle_options* +g:ale_chef_foodcritic_executable ale-chef.txt /*g:ale_chef_foodcritic_executable* +g:ale_chef_foodcritic_options ale-chef.txt /*g:ale_chef_foodcritic_options* +g:ale_clojure_clj_kondo_options ale-clojure.txt /*g:ale_clojure_clj_kondo_options* +g:ale_close_preview_on_insert ale.txt /*g:ale_close_preview_on_insert* +g:ale_cmake_cmake_lint_executable ale-cmake.txt /*g:ale_cmake_cmake_lint_executable* +g:ale_cmake_cmake_lint_options ale-cmake.txt /*g:ale_cmake_cmake_lint_options* +g:ale_cmake_cmakeformat_executable ale-cmake.txt /*g:ale_cmake_cmakeformat_executable* +g:ale_cmake_cmakeformat_options ale-cmake.txt /*g:ale_cmake_cmakeformat_options* +g:ale_cmake_cmakelint_executable ale-cmake.txt /*g:ale_cmake_cmakelint_executable* +g:ale_cmake_cmakelint_options ale-cmake.txt /*g:ale_cmake_cmakelint_options* +g:ale_command_wrapper ale.txt /*g:ale_command_wrapper* +g:ale_completion_autoimport ale.txt /*g:ale_completion_autoimport* +g:ale_completion_delay ale.txt /*g:ale_completion_delay* +g:ale_completion_enabled ale.txt /*g:ale_completion_enabled* +g:ale_completion_excluded_words ale.txt /*g:ale_completion_excluded_words* +g:ale_completion_max_suggestions ale.txt /*g:ale_completion_max_suggestions* +g:ale_completion_symbols ale.txt /*g:ale_completion_symbols* +g:ale_completion_tsserver_remove_warnings ale.txt /*g:ale_completion_tsserver_remove_warnings* +g:ale_cpp_astyle_executable ale-cpp.txt /*g:ale_cpp_astyle_executable* +g:ale_cpp_astyle_project_options ale-cpp.txt /*g:ale_cpp_astyle_project_options* +g:ale_cpp_cc_executable ale-cpp.txt /*g:ale_cpp_cc_executable* +g:ale_cpp_cc_header_exts ale-cpp.txt /*g:ale_cpp_cc_header_exts* +g:ale_cpp_cc_options ale-cpp.txt /*g:ale_cpp_cc_options* +g:ale_cpp_cc_use_header_lang_flag ale-cpp.txt /*g:ale_cpp_cc_use_header_lang_flag* +g:ale_cpp_ccls_executable ale-cpp.txt /*g:ale_cpp_ccls_executable* +g:ale_cpp_ccls_init_options ale-cpp.txt /*g:ale_cpp_ccls_init_options* +g:ale_cpp_clangcheck_executable ale-cpp.txt /*g:ale_cpp_clangcheck_executable* +g:ale_cpp_clangcheck_options ale-cpp.txt /*g:ale_cpp_clangcheck_options* +g:ale_cpp_clangd_executable ale-cpp.txt /*g:ale_cpp_clangd_executable* +g:ale_cpp_clangd_options ale-cpp.txt /*g:ale_cpp_clangd_options* +g:ale_cpp_clangtidy_checks ale-cpp.txt /*g:ale_cpp_clangtidy_checks* +g:ale_cpp_clangtidy_executable ale-cpp.txt /*g:ale_cpp_clangtidy_executable* +g:ale_cpp_clangtidy_extra_options ale-cpp.txt /*g:ale_cpp_clangtidy_extra_options* +g:ale_cpp_clangtidy_fix_errors ale-cpp.txt /*g:ale_cpp_clangtidy_fix_errors* +g:ale_cpp_clangtidy_options ale-cpp.txt /*g:ale_cpp_clangtidy_options* +g:ale_cpp_clazy_checks ale-cpp.txt /*g:ale_cpp_clazy_checks* +g:ale_cpp_clazy_executable ale-cpp.txt /*g:ale_cpp_clazy_executable* +g:ale_cpp_clazy_options ale-cpp.txt /*g:ale_cpp_clazy_options* +g:ale_cpp_cppcheck_executable ale-cpp.txt /*g:ale_cpp_cppcheck_executable* +g:ale_cpp_cppcheck_options ale-cpp.txt /*g:ale_cpp_cppcheck_options* +g:ale_cpp_cpplint_executable ale-cpp.txt /*g:ale_cpp_cpplint_executable* +g:ale_cpp_cpplint_options ale-cpp.txt /*g:ale_cpp_cpplint_options* +g:ale_cpp_cquery_cache_directory ale-cpp.txt /*g:ale_cpp_cquery_cache_directory* +g:ale_cpp_cquery_executable ale-cpp.txt /*g:ale_cpp_cquery_executable* +g:ale_cpp_flawfinder_executable ale-cpp.txt /*g:ale_cpp_flawfinder_executable* +g:ale_cpp_flawfinder_minlevel ale-cpp.txt /*g:ale_cpp_flawfinder_minlevel* +g:ale_cs_csc_assemblies ale-cs.txt /*g:ale_cs_csc_assemblies* +g:ale_cs_csc_assembly_path ale-cs.txt /*g:ale_cs_csc_assembly_path* +g:ale_cs_csc_options ale-cs.txt /*g:ale_cs_csc_options* +g:ale_cs_csc_source ale-cs.txt /*g:ale_cs_csc_source* +g:ale_cs_dotnet_format_executable ale-cs.txt /*g:ale_cs_dotnet_format_executable* +g:ale_cs_dotnet_format_options ale-cs.txt /*g:ale_cs_dotnet_format_options* +g:ale_cs_mcs_options ale-cs.txt /*g:ale_cs_mcs_options* +g:ale_cs_mcsc_assemblies ale-cs.txt /*g:ale_cs_mcsc_assemblies* +g:ale_cs_mcsc_assembly_path ale-cs.txt /*g:ale_cs_mcsc_assembly_path* +g:ale_cs_mcsc_options ale-cs.txt /*g:ale_cs_mcsc_options* +g:ale_cs_mcsc_source ale-cs.txt /*g:ale_cs_mcsc_source* +g:ale_cspell_executable ale.txt /*g:ale_cspell_executable* +g:ale_cspell_options ale.txt /*g:ale_cspell_options* +g:ale_cspell_use_global ale.txt /*g:ale_cspell_use_global* +g:ale_css_css_beautify_executable ale-css.txt /*g:ale_css_css_beautify_executable* +g:ale_css_css_beautify_options ale-css.txt /*g:ale_css_css_beautify_options* +g:ale_css_css_beautify_use_global ale-css.txt /*g:ale_css_css_beautify_use_global* +g:ale_css_stylelint_executable ale-css.txt /*g:ale_css_stylelint_executable* +g:ale_css_stylelint_options ale-css.txt /*g:ale_css_stylelint_options* +g:ale_css_stylelint_use_global ale-css.txt /*g:ale_css_stylelint_use_global* +g:ale_cuda_clangd_executable ale-cuda.txt /*g:ale_cuda_clangd_executable* +g:ale_cuda_clangd_options ale-cuda.txt /*g:ale_cuda_clangd_options* +g:ale_cuda_nvcc_executable ale-cuda.txt /*g:ale_cuda_nvcc_executable* +g:ale_cuda_nvcc_options ale-cuda.txt /*g:ale_cuda_nvcc_options* +g:ale_cursor_detail ale.txt /*g:ale_cursor_detail* +g:ale_d_dfmt_options ale-d.txt /*g:ale_d_dfmt_options* +g:ale_d_dls_executable ale-d.txt /*g:ale_d_dls_executable* +g:ale_dafny_dafny_timelimit ale-dafny.txt /*g:ale_dafny_dafny_timelimit* +g:ale_dart_analysis_server_executable ale-dart.txt /*g:ale_dart_analysis_server_executable* +g:ale_dart_analyze_executable ale-dart.txt /*g:ale_dart_analyze_executable* +g:ale_dart_dartfmt_executable ale-dart.txt /*g:ale_dart_dartfmt_executable* +g:ale_dart_dartfmt_options ale-dart.txt /*g:ale_dart_dartfmt_options* +g:ale_dart_format_executable ale-dart.txt /*g:ale_dart_format_executable* +g:ale_dart_format_options ale-dart.txt /*g:ale_dart_format_options* +g:ale_default_navigation ale.txt /*g:ale_default_navigation* +g:ale_deno_executable ale-typescript.txt /*g:ale_deno_executable* +g:ale_deno_importMap ale-typescript.txt /*g:ale_deno_importMap* +g:ale_deno_lsp_project_root ale-typescript.txt /*g:ale_deno_lsp_project_root* +g:ale_deno_unstable ale-typescript.txt /*g:ale_deno_unstable* +g:ale_desktop_desktop_file_validate_options ale-desktop.txt /*g:ale_desktop_desktop_file_validate_options* +g:ale_detail_to_floating_preview ale.txt /*g:ale_detail_to_floating_preview* +g:ale_dhall_executable ale-dhall.txt /*g:ale_dhall_executable* +g:ale_dhall_freeze_options ale-dhall.txt /*g:ale_dhall_freeze_options* +g:ale_dhall_options ale-dhall.txt /*g:ale_dhall_options* +g:ale_disable_lsp ale.txt /*g:ale_disable_lsp* +g:ale_dockerfile_dockerfile_lint_executable ale-dockerfile.txt /*g:ale_dockerfile_dockerfile_lint_executable* +g:ale_dockerfile_dockerfile_lint_options ale-dockerfile.txt /*g:ale_dockerfile_dockerfile_lint_options* +g:ale_dockerfile_hadolint_image ale-dockerfile.txt /*g:ale_dockerfile_hadolint_image* +g:ale_dockerfile_hadolint_options ale-dockerfile.txt /*g:ale_dockerfile_hadolint_options* +g:ale_dockerfile_hadolint_use_docker ale-dockerfile.txt /*g:ale_dockerfile_hadolint_use_docker* +g:ale_dprint_config ale.txt /*g:ale_dprint_config* +g:ale_dprint_executable ale.txt /*g:ale_dprint_executable* +g:ale_dprint_options ale.txt /*g:ale_dprint_options* +g:ale_dprint_use_global ale.txt /*g:ale_dprint_use_global* +g:ale_echo_cursor ale.txt /*g:ale_echo_cursor* +g:ale_echo_delay ale.txt /*g:ale_echo_delay* +g:ale_echo_msg_error_str ale.txt /*g:ale_echo_msg_error_str* +g:ale_echo_msg_format ale.txt /*g:ale_echo_msg_format* +g:ale_echo_msg_info_str ale.txt /*g:ale_echo_msg_info_str* +g:ale_echo_msg_log_str ale.txt /*g:ale_echo_msg_log_str* +g:ale_echo_msg_warning_str ale.txt /*g:ale_echo_msg_warning_str* +g:ale_elixir_credo_config_file ale-elixir.txt /*g:ale_elixir_credo_config_file* +g:ale_elixir_credo_strict ale-elixir.txt /*g:ale_elixir_credo_strict* +g:ale_elixir_elixir_ls_config ale-elixir.txt /*g:ale_elixir_elixir_ls_config* +g:ale_elixir_elixir_ls_release ale-elixir.txt /*g:ale_elixir_elixir_ls_release* +g:ale_elixir_mix_format_options ale-elixir.txt /*g:ale_elixir_mix_format_options* +g:ale_elixir_mix_options ale-elixir.txt /*g:ale_elixir_mix_options* +g:ale_elm_format_executable ale-elm.txt /*g:ale_elm_format_executable* +g:ale_elm_format_options ale-elm.txt /*g:ale_elm_format_options* +g:ale_elm_format_use_global ale-elm.txt /*g:ale_elm_format_use_global* +g:ale_elm_ls_elm_analyse_trigger ale-elm.txt /*g:ale_elm_ls_elm_analyse_trigger* +g:ale_elm_ls_elm_format_path ale-elm.txt /*g:ale_elm_ls_elm_format_path* +g:ale_elm_ls_elm_path ale-elm.txt /*g:ale_elm_ls_elm_path* +g:ale_elm_ls_elm_test_path ale-elm.txt /*g:ale_elm_ls_elm_test_path* +g:ale_elm_ls_executable ale-elm.txt /*g:ale_elm_ls_executable* +g:ale_elm_ls_use_global ale-elm.txt /*g:ale_elm_ls_use_global* +g:ale_elm_make_executable ale-elm.txt /*g:ale_elm_make_executable* +g:ale_elm_make_use_global ale-elm.txt /*g:ale_elm_make_use_global* +g:ale_enabled ale.txt /*g:ale_enabled* +g:ale_erlang_dialyzer_executable ale-erlang.txt /*g:ale_erlang_dialyzer_executable* +g:ale_erlang_dialyzer_options ale-erlang.txt /*g:ale_erlang_dialyzer_options* +g:ale_erlang_dialyzer_plt_file ale-erlang.txt /*g:ale_erlang_dialyzer_plt_file* +g:ale_erlang_dialyzer_rebar3_profile ale-erlang.txt /*g:ale_erlang_dialyzer_rebar3_profile* +g:ale_erlang_elvis_executable ale-erlang.txt /*g:ale_erlang_elvis_executable* +g:ale_erlang_erlang_ls_executable ale-erlang.txt /*g:ale_erlang_erlang_ls_executable* +g:ale_erlang_erlang_ls_log_dir ale-erlang.txt /*g:ale_erlang_erlang_ls_log_dir* +g:ale_erlang_erlang_ls_log_level ale-erlang.txt /*g:ale_erlang_erlang_ls_log_level* +g:ale_erlang_erlc_executable ale-erlang.txt /*g:ale_erlang_erlc_executable* +g:ale_erlang_erlc_options ale-erlang.txt /*g:ale_erlang_erlc_options* +g:ale_erlang_erlfmt_executable ale-erlang.txt /*g:ale_erlang_erlfmt_executable* +g:ale_erlang_erlfmt_options ale-erlang.txt /*g:ale_erlang_erlfmt_options* +g:ale_erlang_syntaxerl_executable ale-erlang.txt /*g:ale_erlang_syntaxerl_executable* +g:ale_eruby_erblint_executable ale-eruby.txt /*g:ale_eruby_erblint_executable* +g:ale_eruby_ruumba_executable ale-eruby.txt /*g:ale_eruby_ruumba_executable* +g:ale_exclude_highlights ale.txt /*g:ale_exclude_highlights* +g:ale_filename_mappings ale.txt /*g:ale_filename_mappings* +g:ale_fish_fish_indent_executable ale-fish.txt /*g:ale_fish_fish_indent_executable* +g:ale_fish_fish_indent_options ale-fish.txt /*g:ale_fish_fish_indent_options* +g:ale_fix_on_save ale.txt /*g:ale_fix_on_save* +g:ale_fix_on_save_ignore ale.txt /*g:ale_fix_on_save_ignore* +g:ale_fixers ale.txt /*g:ale_fixers* +g:ale_floating_preview ale.txt /*g:ale_floating_preview* +g:ale_floating_preview_popup_opts ale.txt /*g:ale_floating_preview_popup_opts* +g:ale_floating_window_border ale.txt /*g:ale_floating_window_border* +g:ale_fortran_gcc_executable ale-fortran.txt /*g:ale_fortran_gcc_executable* +g:ale_fortran_gcc_options ale-fortran.txt /*g:ale_fortran_gcc_options* +g:ale_fortran_gcc_use_free_form ale-fortran.txt /*g:ale_fortran_gcc_use_free_form* +g:ale_fortran_language_server_executable ale-fortran.txt /*g:ale_fortran_language_server_executable* +g:ale_fortran_language_server_use_global ale-fortran.txt /*g:ale_fortran_language_server_use_global* +g:ale_fuse_fusionlint_executable ale-fuse.txt /*g:ale_fuse_fusionlint_executable* +g:ale_fuse_fusionlint_options ale-fuse.txt /*g:ale_fuse_fusionlint_options* +g:ale_gitcommit_gitlint_executable ale-gitcommit.txt /*g:ale_gitcommit_gitlint_executable* +g:ale_gitcommit_gitlint_options ale-gitcommit.txt /*g:ale_gitcommit_gitlint_options* +g:ale_gitcommit_gitlint_use_global ale-gitcommit.txt /*g:ale_gitcommit_gitlint_use_global* +g:ale_glsl_glslang_executable ale-glsl.txt /*g:ale_glsl_glslang_executable* +g:ale_glsl_glslang_options ale-glsl.txt /*g:ale_glsl_glslang_options* +g:ale_glsl_glslls_executable ale-glsl.txt /*g:ale_glsl_glslls_executable* +g:ale_glsl_glslls_logfile ale-glsl.txt /*g:ale_glsl_glslls_logfile* +g:ale_go_bingo_executable ale-go.txt /*g:ale_go_bingo_executable* +g:ale_go_bingo_options ale-go.txt /*g:ale_go_bingo_options* +g:ale_go_go111module ale-go.txt /*g:ale_go_go111module* +g:ale_go_go_executable ale-go.txt /*g:ale_go_go_executable* +g:ale_go_gobuild_options ale-go.txt /*g:ale_go_gobuild_options* +g:ale_go_gofmt_options ale-go.txt /*g:ale_go_gofmt_options* +g:ale_go_gofumpt_executable ale-go.txt /*g:ale_go_gofumpt_executable* +g:ale_go_gofumpt_options ale-go.txt /*g:ale_go_gofumpt_options* +g:ale_go_golangci_lint_executable ale-go.txt /*g:ale_go_golangci_lint_executable* +g:ale_go_golangci_lint_options ale-go.txt /*g:ale_go_golangci_lint_options* +g:ale_go_golangci_lint_package ale-go.txt /*g:ale_go_golangci_lint_package* +g:ale_go_golines_options ale-go.txt /*g:ale_go_golines_options* +g:ale_go_golint_executable ale-go.txt /*g:ale_go_golint_executable* +g:ale_go_golint_options ale-go.txt /*g:ale_go_golint_options* +g:ale_go_gometalinter_executable ale-go.txt /*g:ale_go_gometalinter_executable* +g:ale_go_gometalinter_lint_package ale-go.txt /*g:ale_go_gometalinter_lint_package* +g:ale_go_gometalinter_options ale-go.txt /*g:ale_go_gometalinter_options* +g:ale_go_gopls_executable ale-go.txt /*g:ale_go_gopls_executable* +g:ale_go_gopls_init_options ale-go.txt /*g:ale_go_gopls_init_options* +g:ale_go_gopls_options ale-go.txt /*g:ale_go_gopls_options* +g:ale_go_gopls_use_global ale-go.txt /*g:ale_go_gopls_use_global* +g:ale_go_govet_options ale-go.txt /*g:ale_go_govet_options* +g:ale_go_langserver_executable ale-go.txt /*g:ale_go_langserver_executable* +g:ale_go_langserver_options ale-go.txt /*g:ale_go_langserver_options* +g:ale_go_lines_executable ale-go.txt /*g:ale_go_lines_executable* +g:ale_go_revive_executable ale-go.txt /*g:ale_go_revive_executable* +g:ale_go_revive_options ale-go.txt /*g:ale_go_revive_options* +g:ale_go_staticcheck_executable ale-go.txt /*g:ale_go_staticcheck_executable* +g:ale_go_staticcheck_lint_package ale-go.txt /*g:ale_go_staticcheck_lint_package* +g:ale_go_staticcheck_options ale-go.txt /*g:ale_go_staticcheck_options* +g:ale_go_staticcheck_use_global ale-go.txt /*g:ale_go_staticcheck_use_global* +g:ale_hack_hack_executable ale-hack.txt /*g:ale_hack_hack_executable* +g:ale_hack_hackfmt_options ale-hack.txt /*g:ale_hack_hackfmt_options* +g:ale_hack_hhast_executable ale-hack.txt /*g:ale_hack_hhast_executable* +g:ale_handlebars_embertemplatelint_executable ale-handlebars.txt /*g:ale_handlebars_embertemplatelint_executable* +g:ale_handlebars_embertemplatelint_use_global ale-handlebars.txt /*g:ale_handlebars_embertemplatelint_use_global* +g:ale_haskell_brittany_executable ale-haskell.txt /*g:ale_haskell_brittany_executable* +g:ale_haskell_cabal_ghc_options ale-haskell.txt /*g:ale_haskell_cabal_ghc_options* +g:ale_haskell_floskell_executable ale-haskell.txt /*g:ale_haskell_floskell_executable* +g:ale_haskell_ghc_mod_executable ale-haskell.txt /*g:ale_haskell_ghc_mod_executable* +g:ale_haskell_ghc_options ale-haskell.txt /*g:ale_haskell_ghc_options* +g:ale_haskell_hdevtools_executable ale-haskell.txt /*g:ale_haskell_hdevtools_executable* +g:ale_haskell_hdevtools_options ale-haskell.txt /*g:ale_haskell_hdevtools_options* +g:ale_haskell_hfmt_executable ale-haskell.txt /*g:ale_haskell_hfmt_executable* +g:ale_haskell_hie_executable ale-haskell.txt /*g:ale_haskell_hie_executable* +g:ale_haskell_hindent_executable ale-haskell.txt /*g:ale_haskell_hindent_executable* +g:ale_haskell_hlint_executable ale-haskell.txt /*g:ale_haskell_hlint_executable* +g:ale_haskell_hls_config ale-haskell.txt /*g:ale_haskell_hls_config* +g:ale_haskell_hls_executable ale-haskell.txt /*g:ale_haskell_hls_executable* +g:ale_haskell_ormolu_executable ale-haskell.txt /*g:ale_haskell_ormolu_executable* +g:ale_haskell_ormolu_options ale-haskell.txt /*g:ale_haskell_ormolu_options* +g:ale_haskell_stack_build_options ale-haskell.txt /*g:ale_haskell_stack_build_options* +g:ale_haskell_stack_ghc_options ale-haskell.txt /*g:ale_haskell_stack_ghc_options* +g:ale_haskell_stylish_haskell_executable ale-haskell.txt /*g:ale_haskell_stylish_haskell_executable* +g:ale_hdl_checker_config_file ale-vhdl.txt /*g:ale_hdl_checker_config_file* +g:ale_hdl_checker_executable ale-vhdl.txt /*g:ale_hdl_checker_executable* +g:ale_hdl_checker_options ale-vhdl.txt /*g:ale_hdl_checker_options* +g:ale_history_enabled ale.txt /*g:ale_history_enabled* +g:ale_history_log_output ale.txt /*g:ale_history_log_output* +g:ale_hover_cursor ale.txt /*g:ale_hover_cursor* +g:ale_hover_to_floating_preview ale.txt /*g:ale_hover_to_floating_preview* +g:ale_hover_to_preview ale.txt /*g:ale_hover_to_preview* +g:ale_html_angular_executable ale-html.txt /*g:ale_html_angular_executable* +g:ale_html_angular_use_global ale-html.txt /*g:ale_html_angular_use_global* +g:ale_html_beautify_executable ale-html.txt /*g:ale_html_beautify_executable* +g:ale_html_beautify_options ale-html.txt /*g:ale_html_beautify_options* +g:ale_html_beautify_use_global ale-html.txt /*g:ale_html_beautify_use_global* +g:ale_html_htmlhint_executable ale-html.txt /*g:ale_html_htmlhint_executable* +g:ale_html_htmlhint_options ale-html.txt /*g:ale_html_htmlhint_options* +g:ale_html_htmlhint_use_global ale-html.txt /*g:ale_html_htmlhint_use_global* +g:ale_html_stylelint_executable ale-html.txt /*g:ale_html_stylelint_executable* +g:ale_html_stylelint_options ale-html.txt /*g:ale_html_stylelint_options* +g:ale_html_stylelint_use_global ale-html.txt /*g:ale_html_stylelint_use_global* +g:ale_html_tidy_executable ale-html.txt /*g:ale_html_tidy_executable* +g:ale_html_tidy_options ale-html.txt /*g:ale_html_tidy_options* +g:ale_idris_idris_executable ale-idris.txt /*g:ale_idris_idris_executable* +g:ale_idris_idris_options ale-idris.txt /*g:ale_idris_idris_options* +g:ale_inko_inko_executable ale-inko.txt /*g:ale_inko_inko_executable* +g:ale_ispc_ispc_executable ale-ispc.txt /*g:ale_ispc_ispc_executable* +g:ale_ispc_ispc_options ale-ispc.txt /*g:ale_ispc_ispc_options* +g:ale_java_checkstyle_config ale-java.txt /*g:ale_java_checkstyle_config* +g:ale_java_checkstyle_executable ale-java.txt /*g:ale_java_checkstyle_executable* +g:ale_java_checkstyle_options ale-java.txt /*g:ale_java_checkstyle_options* +g:ale_java_eclipse_config_path ale-java.txt /*g:ale_java_eclipse_config_path* +g:ale_java_eclipse_executable ale-java.txt /*g:ale_java_eclipse_executable* +g:ale_java_eclipselsp_javaagent ale-java.txt /*g:ale_java_eclipselsp_javaagent* +g:ale_java_eclipselsp_path ale-java.txt /*g:ale_java_eclipselsp_path* +g:ale_java_eclipselsp_workspace_path ale-java.txt /*g:ale_java_eclipselsp_workspace_path* +g:ale_java_google_java_format_executable ale-java.txt /*g:ale_java_google_java_format_executable* +g:ale_java_google_java_format_options ale-java.txt /*g:ale_java_google_java_format_options* +g:ale_java_javac_classpath ale-java.txt /*g:ale_java_javac_classpath* +g:ale_java_javac_executable ale-java.txt /*g:ale_java_javac_executable* +g:ale_java_javac_options ale-java.txt /*g:ale_java_javac_options* +g:ale_java_javac_sourcepath ale-java.txt /*g:ale_java_javac_sourcepath* +g:ale_java_javalsp_config ale-java.txt /*g:ale_java_javalsp_config* +g:ale_java_javalsp_executable ale-java.txt /*g:ale_java_javalsp_executable* +g:ale_java_pmd_options ale-java.txt /*g:ale_java_pmd_options* +g:ale_javascript_eslint_executable ale-javascript.txt /*g:ale_javascript_eslint_executable* +g:ale_javascript_eslint_options ale-javascript.txt /*g:ale_javascript_eslint_options* +g:ale_javascript_eslint_suppress_eslintignore ale-javascript.txt /*g:ale_javascript_eslint_suppress_eslintignore* +g:ale_javascript_eslint_suppress_missing_config ale-javascript.txt /*g:ale_javascript_eslint_suppress_missing_config* +g:ale_javascript_eslint_use_global ale-javascript.txt /*g:ale_javascript_eslint_use_global* +g:ale_javascript_fecs_executable ale-javascript.txt /*g:ale_javascript_fecs_executable* +g:ale_javascript_fecs_use_global ale-javascript.txt /*g:ale_javascript_fecs_use_global* +g:ale_javascript_flow_executable ale-javascript.txt /*g:ale_javascript_flow_executable* +g:ale_javascript_flow_use_global ale-javascript.txt /*g:ale_javascript_flow_use_global* +g:ale_javascript_flow_use_home_config ale-javascript.txt /*g:ale_javascript_flow_use_home_config* +g:ale_javascript_flow_use_respect_pragma ale-javascript.txt /*g:ale_javascript_flow_use_respect_pragma* +g:ale_javascript_importjs_executable ale-javascript.txt /*g:ale_javascript_importjs_executable* +g:ale_javascript_jscs_executable ale-javascript.txt /*g:ale_javascript_jscs_executable* +g:ale_javascript_jscs_use_global ale-javascript.txt /*g:ale_javascript_jscs_use_global* +g:ale_javascript_jshint_executable ale-javascript.txt /*g:ale_javascript_jshint_executable* +g:ale_javascript_jshint_use_global ale-javascript.txt /*g:ale_javascript_jshint_use_global* +g:ale_javascript_prettier_eslint_executable ale-javascript.txt /*g:ale_javascript_prettier_eslint_executable* +g:ale_javascript_prettier_eslint_options ale-javascript.txt /*g:ale_javascript_prettier_eslint_options* +g:ale_javascript_prettier_eslint_use_global ale-javascript.txt /*g:ale_javascript_prettier_eslint_use_global* +g:ale_javascript_prettier_executable ale-javascript.txt /*g:ale_javascript_prettier_executable* +g:ale_javascript_prettier_options ale-javascript.txt /*g:ale_javascript_prettier_options* +g:ale_javascript_prettier_standard_executable ale-javascript.txt /*g:ale_javascript_prettier_standard_executable* +g:ale_javascript_prettier_standard_options ale-javascript.txt /*g:ale_javascript_prettier_standard_options* +g:ale_javascript_prettier_standard_use_global ale-javascript.txt /*g:ale_javascript_prettier_standard_use_global* +g:ale_javascript_prettier_use_global ale-javascript.txt /*g:ale_javascript_prettier_use_global* +g:ale_javascript_standard_executable ale-javascript.txt /*g:ale_javascript_standard_executable* +g:ale_javascript_standard_options ale-javascript.txt /*g:ale_javascript_standard_options* +g:ale_javascript_standard_use_global ale-javascript.txt /*g:ale_javascript_standard_use_global* +g:ale_javascript_xo_executable ale-javascript.txt /*g:ale_javascript_xo_executable* +g:ale_javascript_xo_options ale-javascript.txt /*g:ale_javascript_xo_options* +g:ale_javascript_xo_use_global ale-javascript.txt /*g:ale_javascript_xo_use_global* +g:ale_json_fixjson_executable ale-json.txt /*g:ale_json_fixjson_executable* +g:ale_json_fixjson_options ale-json.txt /*g:ale_json_fixjson_options* +g:ale_json_fixjson_use_global ale-json.txt /*g:ale_json_fixjson_use_global* +g:ale_json_jq_executable ale-json.txt /*g:ale_json_jq_executable* +g:ale_json_jq_filters ale-json.txt /*g:ale_json_jq_filters* +g:ale_json_jq_options ale-json.txt /*g:ale_json_jq_options* +g:ale_json_jsonlint_executable ale-json.txt /*g:ale_json_jsonlint_executable* +g:ale_json_jsonlint_use_global ale-json.txt /*g:ale_json_jsonlint_use_global* +g:ale_json_spectral_executable ale-json.txt /*g:ale_json_spectral_executable* +g:ale_json_spectral_use_global ale-json.txt /*g:ale_json_spectral_use_global* +g:ale_jsonnet_jsonnet_lint_executable ale-jsonnet.txt /*g:ale_jsonnet_jsonnet_lint_executable* +g:ale_jsonnet_jsonnet_lint_options ale-jsonnet.txt /*g:ale_jsonnet_jsonnet_lint_options* +g:ale_jsonnet_jsonnetfmt_executable ale-jsonnet.txt /*g:ale_jsonnet_jsonnetfmt_executable* +g:ale_jsonnet_jsonnetfmt_options ale-jsonnet.txt /*g:ale_jsonnet_jsonnetfmt_options* +g:ale_julia_executable ale-julia.txt /*g:ale_julia_executable* +g:ale_keep_list_window_open ale.txt /*g:ale_keep_list_window_open* +g:ale_kotlin_kotlinc_classpath ale-kotlin.txt /*g:ale_kotlin_kotlinc_classpath* +g:ale_kotlin_kotlinc_config_file ale-kotlin.txt /*g:ale_kotlin_kotlinc_config_file* +g:ale_kotlin_kotlinc_enable_config ale-kotlin.txt /*g:ale_kotlin_kotlinc_enable_config* +g:ale_kotlin_kotlinc_module_filename ale-kotlin.txt /*g:ale_kotlin_kotlinc_module_filename* +g:ale_kotlin_kotlinc_options ale-kotlin.txt /*g:ale_kotlin_kotlinc_options* +g:ale_kotlin_kotlinc_sourcepath ale-kotlin.txt /*g:ale_kotlin_kotlinc_sourcepath* +g:ale_kotlin_kotlinc_use_module_file ale-kotlin.txt /*g:ale_kotlin_kotlinc_use_module_file* +g:ale_kotlin_ktlint_executable ale-kotlin.txt /*g:ale_kotlin_ktlint_executable* +g:ale_kotlin_ktlint_options ale-kotlin.txt /*g:ale_kotlin_ktlint_options* +g:ale_kotlin_ktlint_rulesets ale-kotlin.txt /*g:ale_kotlin_ktlint_rulesets* +g:ale_kotlin_languageserver_executable ale-kotlin.txt /*g:ale_kotlin_languageserver_executable* +g:ale_lacheck_executable ale-tex.txt /*g:ale_lacheck_executable* +g:ale_languagetool_executable ale.txt /*g:ale_languagetool_executable* +g:ale_languagetool_options ale.txt /*g:ale_languagetool_options* +g:ale_less_lessc_executable ale-less.txt /*g:ale_less_lessc_executable* +g:ale_less_lessc_options ale-less.txt /*g:ale_less_lessc_options* +g:ale_less_lessc_use_global ale-less.txt /*g:ale_less_lessc_use_global* +g:ale_less_stylelint_executable ale-less.txt /*g:ale_less_stylelint_executable* +g:ale_less_stylelint_options ale-less.txt /*g:ale_less_stylelint_options* +g:ale_less_stylelint_use_global ale-less.txt /*g:ale_less_stylelint_use_global* +g:ale_lint_delay ale.txt /*g:ale_lint_delay* +g:ale_lint_on_enter ale.txt /*g:ale_lint_on_enter* +g:ale_lint_on_filetype_changed ale.txt /*g:ale_lint_on_filetype_changed* +g:ale_lint_on_insert_leave ale.txt /*g:ale_lint_on_insert_leave* +g:ale_lint_on_save ale.txt /*g:ale_lint_on_save* +g:ale_lint_on_text_changed ale.txt /*g:ale_lint_on_text_changed* +g:ale_linter_aliases ale.txt /*g:ale_linter_aliases* +g:ale_linters ale.txt /*g:ale_linters* +g:ale_linters_explicit ale.txt /*g:ale_linters_explicit* +g:ale_linters_ignore ale.txt /*g:ale_linters_ignore* +g:ale_list_vertical ale.txt /*g:ale_list_vertical* +g:ale_list_window_size ale.txt /*g:ale_list_window_size* +g:ale_llvm_llc_executable ale-llvm.txt /*g:ale_llvm_llc_executable* +g:ale_loclist_msg_format ale.txt /*g:ale_loclist_msg_format* +g:ale_lsp_show_message_format ale.txt /*g:ale_lsp_show_message_format* +g:ale_lsp_show_message_severity ale.txt /*g:ale_lsp_show_message_severity* +g:ale_lsp_suggestions ale.txt /*g:ale_lsp_suggestions* +g:ale_lua_lua_format_executable ale-lua.txt /*g:ale_lua_lua_format_executable* +g:ale_lua_lua_format_options ale-lua.txt /*g:ale_lua_lua_format_options* +g:ale_lua_luac_executable ale-lua.txt /*g:ale_lua_luac_executable* +g:ale_lua_luacheck_executable ale-lua.txt /*g:ale_lua_luacheck_executable* +g:ale_lua_luacheck_options ale-lua.txt /*g:ale_lua_luacheck_options* +g:ale_lua_luafmt_executable ale-lua.txt /*g:ale_lua_luafmt_executable* +g:ale_lua_luafmt_options ale-lua.txt /*g:ale_lua_luafmt_options* +g:ale_lua_selene_executable ale-lua.txt /*g:ale_lua_selene_executable* +g:ale_lua_selene_options ale-lua.txt /*g:ale_lua_selene_options* +g:ale_lua_stylua_executable ale-lua.txt /*g:ale_lua_stylua_executable* +g:ale_lua_stylua_options ale-lua.txt /*g:ale_lua_stylua_options* +g:ale_make_checkmake_config ale-make.txt /*g:ale_make_checkmake_config* +g:ale_markdown_markdownlint_executable ale-markdown.txt /*g:ale_markdown_markdownlint_executable* +g:ale_markdown_markdownlint_options ale-markdown.txt /*g:ale_markdown_markdownlint_options* +g:ale_markdown_mdl_executable ale-markdown.txt /*g:ale_markdown_mdl_executable* +g:ale_markdown_mdl_options ale-markdown.txt /*g:ale_markdown_mdl_options* +g:ale_markdown_pandoc_executable ale-markdown.txt /*g:ale_markdown_pandoc_executable* +g:ale_markdown_pandoc_options ale-markdown.txt /*g:ale_markdown_pandoc_options* +g:ale_markdown_remark_lint_executable ale-markdown.txt /*g:ale_markdown_remark_lint_executable* +g:ale_markdown_remark_lint_options ale-markdown.txt /*g:ale_markdown_remark_lint_options* +g:ale_markdown_remark_lint_use_global ale-markdown.txt /*g:ale_markdown_remark_lint_use_global* +g:ale_max_buffer_history_size ale.txt /*g:ale_max_buffer_history_size* +g:ale_max_signs ale.txt /*g:ale_max_signs* +g:ale_maximum_file_size ale.txt /*g:ale_maximum_file_size* +g:ale_mercury_mmc_executable ale-mercury.txt /*g:ale_mercury_mmc_executable* +g:ale_mercury_mmc_options ale-mercury.txt /*g:ale_mercury_mmc_options* +g:ale_nasm_nasm_executable ale-nasm.txt /*g:ale_nasm_nasm_executable* +g:ale_nasm_nasm_options ale-nasm.txt /*g:ale_nasm_nasm_options* +g:ale_nim_nimpretty_executable ale-nim.txt /*g:ale_nim_nimpretty_executable* +g:ale_nim_nimpretty_options ale-nim.txt /*g:ale_nim_nimpretty_options* +g:ale_nix_fix_check_executable ale-nix.txt /*g:ale_nix_fix_check_executable* +g:ale_nix_nixfmt_executable ale-nix.txt /*g:ale_nix_nixfmt_executable* +g:ale_nix_nixfmt_options ale-nix.txt /*g:ale_nix_nixfmt_options* +g:ale_nix_nixpkgsfmt_executable ale-nix.txt /*g:ale_nix_nixpkgsfmt_executable* +g:ale_nix_nixpkgsfmt_options ale-nix.txt /*g:ale_nix_nixpkgsfmt_options* +g:ale_nix_statix_check_executable ale-nix.txt /*g:ale_nix_statix_check_executable* +g:ale_nix_statix_check_options ale-nix.txt /*g:ale_nix_statix_check_options* +g:ale_nix_statix_fix_options ale-nix.txt /*g:ale_nix_statix_fix_options* +g:ale_objc_ccls_executable ale-objc.txt /*g:ale_objc_ccls_executable* +g:ale_objc_ccls_init_options ale-objc.txt /*g:ale_objc_ccls_init_options* +g:ale_objc_clang_options ale-objc.txt /*g:ale_objc_clang_options* +g:ale_objc_clangd_executable ale-objc.txt /*g:ale_objc_clangd_executable* +g:ale_objc_clangd_options ale-objc.txt /*g:ale_objc_clangd_options* +g:ale_objcpp_clang_options ale-objcpp.txt /*g:ale_objcpp_clang_options* +g:ale_objcpp_clangd_executable ale-objcpp.txt /*g:ale_objcpp_clangd_executable* +g:ale_objcpp_clangd_options ale-objcpp.txt /*g:ale_objcpp_clangd_options* +g:ale_ocaml_dune_executable ale-ocaml.txt /*g:ale_ocaml_dune_executable* +g:ale_ocaml_dune_options ale-ocaml.txt /*g:ale_ocaml_dune_options* +g:ale_ocaml_ocamlformat_executable ale-ocaml.txt /*g:ale_ocaml_ocamlformat_executable* +g:ale_ocaml_ocamlformat_options ale-ocaml.txt /*g:ale_ocaml_ocamlformat_options* +g:ale_ocaml_ocamllsp_use_opam ale-ocaml.txt /*g:ale_ocaml_ocamllsp_use_opam* +g:ale_ocaml_ocp_indent_config ale-ocaml.txt /*g:ale_ocaml_ocp_indent_config* +g:ale_ocaml_ocp_indent_executable ale-ocaml.txt /*g:ale_ocaml_ocp_indent_executable* +g:ale_ocaml_ocp_indent_options ale-ocaml.txt /*g:ale_ocaml_ocp_indent_options* +g:ale_ocaml_ols_executable ale-ocaml.txt /*g:ale_ocaml_ols_executable* +g:ale_ocaml_ols_use_global ale-ocaml.txt /*g:ale_ocaml_ols_use_global* +g:ale_opa_fmt_executable ale-rego.txt /*g:ale_opa_fmt_executable* +g:ale_opa_fmt_options ale-rego.txt /*g:ale_opa_fmt_options* +g:ale_open_list ale.txt /*g:ale_open_list* +g:ale_openapi_ibm_validator_executable ale-openapi.txt /*g:ale_openapi_ibm_validator_executable* +g:ale_openapi_ibm_validator_options ale-openapi.txt /*g:ale_openapi_ibm_validator_options* +g:ale_openscad_sca2d_executable ale-openscad.txt /*g:ale_openscad_sca2d_executable* +g:ale_openscad_sca2d_options ale-openscad.txt /*g:ale_openscad_sca2d_options* +g:ale_packer_fmt_executable ale-packer.txt /*g:ale_packer_fmt_executable* +g:ale_packer_fmt_options ale-packer.txt /*g:ale_packer_fmt_options* +g:ale_pascal_ptop_executable ale-pascal.txt /*g:ale_pascal_ptop_executable* +g:ale_pascal_ptop_options ale-pascal.txt /*g:ale_pascal_ptop_options* +g:ale_pattern_options ale.txt /*g:ale_pattern_options* +g:ale_pattern_options_enabled ale.txt /*g:ale_pattern_options_enabled* +g:ale_perl6_perl6_executable ale-perl6.txt /*g:ale_perl6_perl6_executable* +g:ale_perl6_perl6_options ale-perl6.txt /*g:ale_perl6_perl6_options* +g:ale_perl_perl_executable ale-perl.txt /*g:ale_perl_perl_executable* +g:ale_perl_perl_options ale-perl.txt /*g:ale_perl_perl_options* +g:ale_perl_perlcritic_executable ale-perl.txt /*g:ale_perl_perlcritic_executable* +g:ale_perl_perlcritic_options ale-perl.txt /*g:ale_perl_perlcritic_options* +g:ale_perl_perlcritic_profile ale-perl.txt /*g:ale_perl_perlcritic_profile* +g:ale_perl_perlcritic_showrules ale-perl.txt /*g:ale_perl_perlcritic_showrules* +g:ale_perl_perltidy_options ale-perl.txt /*g:ale_perl_perltidy_options* +g:ale_php_cs_fixer_executable ale-php.txt /*g:ale_php_cs_fixer_executable* +g:ale_php_cs_fixer_options ale-php.txt /*g:ale_php_cs_fixer_options* +g:ale_php_cs_fixer_use_global ale-php.txt /*g:ale_php_cs_fixer_use_global* +g:ale_php_intelephense_config ale-php.txt /*g:ale_php_intelephense_config* +g:ale_php_intelephense_executable ale-php.txt /*g:ale_php_intelephense_executable* +g:ale_php_intelephense_use_global ale-php.txt /*g:ale_php_intelephense_use_global* +g:ale_php_langserver_executable ale-php.txt /*g:ale_php_langserver_executable* +g:ale_php_langserver_use_global ale-php.txt /*g:ale_php_langserver_use_global* +g:ale_php_phan_executable ale-php.txt /*g:ale_php_phan_executable* +g:ale_php_phan_minimum_severity ale-php.txt /*g:ale_php_phan_minimum_severity* +g:ale_php_phan_use_client ale-php.txt /*g:ale_php_phan_use_client* +g:ale_php_php_executable ale-php.txt /*g:ale_php_php_executable* +g:ale_php_phpcbf_executable ale-php.txt /*g:ale_php_phpcbf_executable* +g:ale_php_phpcbf_options ale-php.txt /*g:ale_php_phpcbf_options* +g:ale_php_phpcbf_standard ale-php.txt /*g:ale_php_phpcbf_standard* +g:ale_php_phpcbf_use_global ale-php.txt /*g:ale_php_phpcbf_use_global* +g:ale_php_phpcs_executable ale-php.txt /*g:ale_php_phpcs_executable* +g:ale_php_phpcs_options ale-php.txt /*g:ale_php_phpcs_options* +g:ale_php_phpcs_standard ale-php.txt /*g:ale_php_phpcs_standard* +g:ale_php_phpcs_use_global ale-php.txt /*g:ale_php_phpcs_use_global* +g:ale_php_phpmd_executable ale-php.txt /*g:ale_php_phpmd_executable* +g:ale_php_phpmd_ruleset ale-php.txt /*g:ale_php_phpmd_ruleset* +g:ale_php_phpstan_autoload ale-php.txt /*g:ale_php_phpstan_autoload* +g:ale_php_phpstan_configuration ale-php.txt /*g:ale_php_phpstan_configuration* +g:ale_php_phpstan_executable ale-php.txt /*g:ale_php_phpstan_executable* +g:ale_php_phpstan_level ale-php.txt /*g:ale_php_phpstan_level* +g:ale_php_phpstan_memory-limit ale-php.txt /*g:ale_php_phpstan_memory-limit* +g:ale_php_pint_executable ale-php.txt /*g:ale_php_pint_executable* +g:ale_php_pint_options ale-php.txt /*g:ale_php_pint_options* +g:ale_php_pint_use_global ale-php.txt /*g:ale_php_pint_use_global* +g:ale_php_psalm_executable ale-php.txt /*g:ale_php_psalm_executable* +g:ale_php_psalm_options ale-php.txt /*g:ale_php_psalm_options* +g:ale_php_psalm_use_global ale-php.txt /*g:ale_php_psalm_use_global* +g:ale_php_tlint_executable ale-php.txt /*g:ale_php_tlint_executable* +g:ale_php_tlint_options ale-php.txt /*g:ale_php_tlint_options* +g:ale_php_tlint_use_global ale-php.txt /*g:ale_php_tlint_use_global* +g:ale_pony_ponyc_executable ale-pony.txt /*g:ale_pony_ponyc_executable* +g:ale_pony_ponyc_options ale-pony.txt /*g:ale_pony_ponyc_options* +g:ale_popup_menu_enabled ale.txt /*g:ale_popup_menu_enabled* +g:ale_powershell_powershell_executable ale-powershell.txt /*g:ale_powershell_powershell_executable* +g:ale_powershell_psscriptanalyzer_exclusions ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_exclusions* +g:ale_powershell_psscriptanalyzer_executable ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_executable* +g:ale_powershell_psscriptanalyzer_module ale-powershell.txt /*g:ale_powershell_psscriptanalyzer_module* +g:ale_prolog_swipl_alarm ale-prolog.txt /*g:ale_prolog_swipl_alarm* +g:ale_prolog_swipl_alarm_handler ale-prolog.txt /*g:ale_prolog_swipl_alarm_handler* +g:ale_prolog_swipl_executable ale-prolog.txt /*g:ale_prolog_swipl_executable* +g:ale_prolog_swipl_load ale-prolog.txt /*g:ale_prolog_swipl_load* +g:ale_prolog_swipl_timeout ale-prolog.txt /*g:ale_prolog_swipl_timeout* +g:ale_proto_buf_format_executable ale-proto.txt /*g:ale_proto_buf_format_executable* +g:ale_proto_buf_lint_config ale-proto.txt /*g:ale_proto_buf_lint_config* +g:ale_proto_buf_lint_executable ale-proto.txt /*g:ale_proto_buf_lint_executable* +g:ale_proto_protoc_gen_lint_options ale-proto.txt /*g:ale_proto_protoc_gen_lint_options* +g:ale_proto_protolint_config ale-proto.txt /*g:ale_proto_protolint_config* +g:ale_proto_protolint_executable ale-proto.txt /*g:ale_proto_protolint_executable* +g:ale_pug_puglint_executable ale-pug.txt /*g:ale_pug_puglint_executable* +g:ale_pug_puglint_options ale-pug.txt /*g:ale_pug_puglint_options* +g:ale_pug_puglint_use_global ale-pug.txt /*g:ale_pug_puglint_use_global* +g:ale_puppet_languageserver_executable ale-puppet.txt /*g:ale_puppet_languageserver_executable* +g:ale_puppet_puppet_executable ale-puppet.txt /*g:ale_puppet_puppet_executable* +g:ale_puppet_puppet_options ale-puppet.txt /*g:ale_puppet_puppet_options* +g:ale_puppet_puppetlint_executable ale-puppet.txt /*g:ale_puppet_puppetlint_executable* +g:ale_puppet_puppetlint_options ale-puppet.txt /*g:ale_puppet_puppetlint_options* +g:ale_purescript_purty_executable ale-purescript.txt /*g:ale_purescript_purty_executable* +g:ale_purescript_tidy_executable ale-purescript.txt /*g:ale_purescript_tidy_executable* +g:ale_purescript_tidy_options ale-purescript.txt /*g:ale_purescript_tidy_options* +g:ale_purescript_tidy_use_global ale-purescript.txt /*g:ale_purescript_tidy_use_global* +g:ale_pyrex_cython_executable ale-pyrex.txt /*g:ale_pyrex_cython_executable* +g:ale_pyrex_cython_options ale-pyrex.txt /*g:ale_pyrex_cython_options* +g:ale_python_auto_pipenv ale-python.txt /*g:ale_python_auto_pipenv* +g:ale_python_auto_poetry ale-python.txt /*g:ale_python_auto_poetry* +g:ale_python_autoflake_executable ale-python.txt /*g:ale_python_autoflake_executable* +g:ale_python_autoflake_options ale-python.txt /*g:ale_python_autoflake_options* +g:ale_python_autoflake_use_global ale-python.txt /*g:ale_python_autoflake_use_global* +g:ale_python_autoimport_executable ale-python.txt /*g:ale_python_autoimport_executable* +g:ale_python_autoimport_options ale-python.txt /*g:ale_python_autoimport_options* +g:ale_python_autoimport_use_global ale-python.txt /*g:ale_python_autoimport_use_global* +g:ale_python_autopep8_executable ale-python.txt /*g:ale_python_autopep8_executable* +g:ale_python_autopep8_options ale-python.txt /*g:ale_python_autopep8_options* +g:ale_python_autopep8_use_global ale-python.txt /*g:ale_python_autopep8_use_global* +g:ale_python_bandit_auto_pipenv ale-python.txt /*g:ale_python_bandit_auto_pipenv* +g:ale_python_bandit_auto_poetry ale-python.txt /*g:ale_python_bandit_auto_poetry* +g:ale_python_bandit_executable ale-python.txt /*g:ale_python_bandit_executable* +g:ale_python_bandit_options ale-python.txt /*g:ale_python_bandit_options* +g:ale_python_bandit_use_config ale-python.txt /*g:ale_python_bandit_use_config* +g:ale_python_bandit_use_global ale-python.txt /*g:ale_python_bandit_use_global* +g:ale_python_black_auto_pipenv ale-python.txt /*g:ale_python_black_auto_pipenv* +g:ale_python_black_auto_poetry ale-python.txt /*g:ale_python_black_auto_poetry* +g:ale_python_black_change_directory ale-python.txt /*g:ale_python_black_change_directory* +g:ale_python_black_executable ale-python.txt /*g:ale_python_black_executable* +g:ale_python_black_options ale-python.txt /*g:ale_python_black_options* +g:ale_python_black_use_global ale-python.txt /*g:ale_python_black_use_global* +g:ale_python_flake8_auto_pipenv ale-python.txt /*g:ale_python_flake8_auto_pipenv* +g:ale_python_flake8_auto_poetry ale-python.txt /*g:ale_python_flake8_auto_poetry* +g:ale_python_flake8_change_directory ale-python.txt /*g:ale_python_flake8_change_directory* +g:ale_python_flake8_executable ale-python.txt /*g:ale_python_flake8_executable* +g:ale_python_flake8_options ale-python.txt /*g:ale_python_flake8_options* +g:ale_python_flake8_use_global ale-python.txt /*g:ale_python_flake8_use_global* +g:ale_python_flakehell_auto_pipenv ale-python.txt /*g:ale_python_flakehell_auto_pipenv* +g:ale_python_flakehell_auto_poetry ale-python.txt /*g:ale_python_flakehell_auto_poetry* +g:ale_python_flakehell_executable ale-python.txt /*g:ale_python_flakehell_executable* +g:ale_python_flakehell_options ale-python.txt /*g:ale_python_flakehell_options* +g:ale_python_flakehell_use_global ale-python.txt /*g:ale_python_flakehell_use_global* +g:ale_python_isort_auto_pipenv ale-python.txt /*g:ale_python_isort_auto_pipenv* +g:ale_python_isort_auto_poetry ale-python.txt /*g:ale_python_isort_auto_poetry* +g:ale_python_isort_executable ale-python.txt /*g:ale_python_isort_executable* +g:ale_python_isort_options ale-python.txt /*g:ale_python_isort_options* +g:ale_python_isort_use_global ale-python.txt /*g:ale_python_isort_use_global* +g:ale_python_mypy_auto_pipenv ale-python.txt /*g:ale_python_mypy_auto_pipenv* +g:ale_python_mypy_auto_poetry ale-python.txt /*g:ale_python_mypy_auto_poetry* +g:ale_python_mypy_executable ale-python.txt /*g:ale_python_mypy_executable* +g:ale_python_mypy_ignore_invalid_syntax ale-python.txt /*g:ale_python_mypy_ignore_invalid_syntax* +g:ale_python_mypy_options ale-python.txt /*g:ale_python_mypy_options* +g:ale_python_mypy_show_notes ale-python.txt /*g:ale_python_mypy_show_notes* +g:ale_python_mypy_use_global ale-python.txt /*g:ale_python_mypy_use_global* +g:ale_python_prospector_auto_pipenv ale-python.txt /*g:ale_python_prospector_auto_pipenv* +g:ale_python_prospector_auto_poetry ale-python.txt /*g:ale_python_prospector_auto_poetry* +g:ale_python_prospector_executable ale-python.txt /*g:ale_python_prospector_executable* +g:ale_python_prospector_options ale-python.txt /*g:ale_python_prospector_options* +g:ale_python_prospector_use_global ale-python.txt /*g:ale_python_prospector_use_global* +g:ale_python_pycodestyle_auto_pipenv ale-python.txt /*g:ale_python_pycodestyle_auto_pipenv* +g:ale_python_pycodestyle_auto_poetry ale-python.txt /*g:ale_python_pycodestyle_auto_poetry* +g:ale_python_pycodestyle_executable ale-python.txt /*g:ale_python_pycodestyle_executable* +g:ale_python_pycodestyle_options ale-python.txt /*g:ale_python_pycodestyle_options* +g:ale_python_pycodestyle_use_global ale-python.txt /*g:ale_python_pycodestyle_use_global* +g:ale_python_pydocstyle_auto_pipenv ale-python.txt /*g:ale_python_pydocstyle_auto_pipenv* +g:ale_python_pydocstyle_auto_poetry ale-python.txt /*g:ale_python_pydocstyle_auto_poetry* +g:ale_python_pydocstyle_executable ale-python.txt /*g:ale_python_pydocstyle_executable* +g:ale_python_pydocstyle_options ale-python.txt /*g:ale_python_pydocstyle_options* +g:ale_python_pydocstyle_use_global ale-python.txt /*g:ale_python_pydocstyle_use_global* +g:ale_python_pyflakes_auto_pipenv ale-python.txt /*g:ale_python_pyflakes_auto_pipenv* +g:ale_python_pyflakes_auto_poetry ale-python.txt /*g:ale_python_pyflakes_auto_poetry* +g:ale_python_pyflakes_executable ale-python.txt /*g:ale_python_pyflakes_executable* +g:ale_python_pyflyby_auto_pipenv ale-python.txt /*g:ale_python_pyflyby_auto_pipenv* +g:ale_python_pyflyby_auto_poetry ale-python.txt /*g:ale_python_pyflyby_auto_poetry* +g:ale_python_pyflyby_executable ale-python.txt /*g:ale_python_pyflyby_executable* +g:ale_python_pyflyby_options ale-python.txt /*g:ale_python_pyflyby_options* +g:ale_python_pyflyby_use_global ale-python.txt /*g:ale_python_pyflyby_use_global* +g:ale_python_pylama_auto_pipenv ale-python.txt /*g:ale_python_pylama_auto_pipenv* +g:ale_python_pylama_auto_poetry ale-python.txt /*g:ale_python_pylama_auto_poetry* +g:ale_python_pylama_change_directory ale-python.txt /*g:ale_python_pylama_change_directory* +g:ale_python_pylama_executable ale-python.txt /*g:ale_python_pylama_executable* +g:ale_python_pylama_options ale-python.txt /*g:ale_python_pylama_options* +g:ale_python_pylama_use_global ale-python.txt /*g:ale_python_pylama_use_global* +g:ale_python_pylint_auto_pipenv ale-python.txt /*g:ale_python_pylint_auto_pipenv* +g:ale_python_pylint_auto_poetry ale-python.txt /*g:ale_python_pylint_auto_poetry* +g:ale_python_pylint_change_directory ale-python.txt /*g:ale_python_pylint_change_directory* +g:ale_python_pylint_executable ale-python.txt /*g:ale_python_pylint_executable* +g:ale_python_pylint_options ale-python.txt /*g:ale_python_pylint_options* +g:ale_python_pylint_use_global ale-python.txt /*g:ale_python_pylint_use_global* +g:ale_python_pylint_use_msg_id ale-python.txt /*g:ale_python_pylint_use_msg_id* +g:ale_python_pylsp_auto_pipenv ale-python.txt /*g:ale_python_pylsp_auto_pipenv* +g:ale_python_pylsp_auto_poetry ale-python.txt /*g:ale_python_pylsp_auto_poetry* +g:ale_python_pylsp_config ale-python.txt /*g:ale_python_pylsp_config* +g:ale_python_pylsp_executable ale-python.txt /*g:ale_python_pylsp_executable* +g:ale_python_pylsp_options ale-python.txt /*g:ale_python_pylsp_options* +g:ale_python_pylsp_use_global ale-python.txt /*g:ale_python_pylsp_use_global* +g:ale_python_pyre_auto_pipenv ale-python.txt /*g:ale_python_pyre_auto_pipenv* +g:ale_python_pyre_auto_poetry ale-python.txt /*g:ale_python_pyre_auto_poetry* +g:ale_python_pyre_executable ale-python.txt /*g:ale_python_pyre_executable* +g:ale_python_pyre_use_global ale-python.txt /*g:ale_python_pyre_use_global* +g:ale_python_pyright_config ale-python.txt /*g:ale_python_pyright_config* +g:ale_python_pyright_executable ale-python.txt /*g:ale_python_pyright_executable* +g:ale_python_refurb_auto_pipenv ale-python.txt /*g:ale_python_refurb_auto_pipenv* +g:ale_python_refurb_auto_poetry ale-python.txt /*g:ale_python_refurb_auto_poetry* +g:ale_python_refurb_change_directory ale-python.txt /*g:ale_python_refurb_change_directory* +g:ale_python_refurb_executable ale-python.txt /*g:ale_python_refurb_executable* +g:ale_python_refurb_options ale-python.txt /*g:ale_python_refurb_options* +g:ale_python_refurb_use_global ale-python.txt /*g:ale_python_refurb_use_global* +g:ale_python_reorder_python_imports_executable ale-python.txt /*g:ale_python_reorder_python_imports_executable* +g:ale_python_reorder_python_imports_options ale-python.txt /*g:ale_python_reorder_python_imports_options* +g:ale_python_reorder_python_imports_use_global ale-python.txt /*g:ale_python_reorder_python_imports_use_global* +g:ale_python_ruff_auto_pipenv ale-python.txt /*g:ale_python_ruff_auto_pipenv* +g:ale_python_ruff_auto_poetry ale-python.txt /*g:ale_python_ruff_auto_poetry* +g:ale_python_ruff_change_directory ale-python.txt /*g:ale_python_ruff_change_directory* +g:ale_python_ruff_executable ale-python.txt /*g:ale_python_ruff_executable* +g:ale_python_ruff_options ale-python.txt /*g:ale_python_ruff_options* +g:ale_python_ruff_use_global ale-python.txt /*g:ale_python_ruff_use_global* +g:ale_python_unimport_auto_pipenv ale-python.txt /*g:ale_python_unimport_auto_pipenv* +g:ale_python_unimport_auto_poetry ale-python.txt /*g:ale_python_unimport_auto_poetry* +g:ale_python_unimport_executable ale-python.txt /*g:ale_python_unimport_executable* +g:ale_python_unimport_options ale-python.txt /*g:ale_python_unimport_options* +g:ale_python_unimport_use_global ale-python.txt /*g:ale_python_unimport_use_global* +g:ale_python_vulture_change_directory ale-python.txt /*g:ale_python_vulture_change_directory* +g:ale_python_vulture_executable ale-python.txt /*g:ale_python_vulture_executable* +g:ale_python_vulture_options ale-python.txt /*g:ale_python_vulture_options* +g:ale_python_vulture_use_global ale-python.txt /*g:ale_python_vulture_use_global* +g:ale_python_yapf_executable ale-python.txt /*g:ale_python_yapf_executable* +g:ale_python_yapf_use_global ale-python.txt /*g:ale_python_yapf_use_global* +g:ale_qml_qmlfmt_executable ale-qml.txt /*g:ale_qml_qmlfmt_executable* +g:ale_r_languageserver_cmd ale-r.txt /*g:ale_r_languageserver_cmd* +g:ale_r_languageserver_config ale-r.txt /*g:ale_r_languageserver_config* +g:ale_r_lintr_lint_package ale-r.txt /*g:ale_r_lintr_lint_package* +g:ale_r_lintr_options ale-r.txt /*g:ale_r_lintr_options* +g:ale_r_styler_options ale-r.txt /*g:ale_r_styler_options* +g:ale_racket_raco_fmt_executable ale-racket.txt /*g:ale_racket_raco_fmt_executable* +g:ale_racket_raco_fmt_options ale-racket.txt /*g:ale_racket_raco_fmt_options* +g:ale_reason_ls_executable ale-reasonml.txt /*g:ale_reason_ls_executable* +g:ale_reason_ols_executable ale-reasonml.txt /*g:ale_reason_ols_executable* +g:ale_reason_ols_use_global ale-reasonml.txt /*g:ale_reason_ols_use_global* +g:ale_reasonml_refmt_executable ale-reasonml.txt /*g:ale_reasonml_refmt_executable* +g:ale_reasonml_refmt_options ale-reasonml.txt /*g:ale_reasonml_refmt_options* +g:ale_rename_tsserver_find_in_comments ale.txt /*g:ale_rename_tsserver_find_in_comments* +g:ale_rename_tsserver_find_in_strings ale.txt /*g:ale_rename_tsserver_find_in_strings* +g:ale_robot_rflint_executable ale-robot.txt /*g:ale_robot_rflint_executable* +g:ale_root ale.txt /*g:ale_root* +g:ale_ruby_brakeman_executable ale-ruby.txt /*g:ale_ruby_brakeman_executable* +g:ale_ruby_brakeman_options ale-ruby.txt /*g:ale_ruby_brakeman_options* +g:ale_ruby_debride_executable ale-ruby.txt /*g:ale_ruby_debride_executable* +g:ale_ruby_debride_options ale-ruby.txt /*g:ale_ruby_debride_options* +g:ale_ruby_erblint_options ale-eruby.txt /*g:ale_ruby_erblint_options* +g:ale_ruby_rails_best_practices_executable ale-ruby.txt /*g:ale_ruby_rails_best_practices_executable* +g:ale_ruby_rails_best_practices_options ale-ruby.txt /*g:ale_ruby_rails_best_practices_options* +g:ale_ruby_reek_executable ale-ruby.txt /*g:ale_ruby_reek_executable* +g:ale_ruby_reek_show_context ale-ruby.txt /*g:ale_ruby_reek_show_context* +g:ale_ruby_reek_show_wiki_link ale-ruby.txt /*g:ale_ruby_reek_show_wiki_link* +g:ale_ruby_rubocop_auto_correct_all ale-ruby.txt /*g:ale_ruby_rubocop_auto_correct_all* +g:ale_ruby_rubocop_executable ale-ruby.txt /*g:ale_ruby_rubocop_executable* +g:ale_ruby_rubocop_options ale-ruby.txt /*g:ale_ruby_rubocop_options* +g:ale_ruby_ruby_executable ale-ruby.txt /*g:ale_ruby_ruby_executable* +g:ale_ruby_rufo_executable ale-ruby.txt /*g:ale_ruby_rufo_executable* +g:ale_ruby_ruumba_options ale-eruby.txt /*g:ale_ruby_ruumba_options* +g:ale_ruby_solargraph_executable ale-ruby.txt /*g:ale_ruby_solargraph_executable* +g:ale_ruby_sorbet_enable_watchman ale-ruby.txt /*g:ale_ruby_sorbet_enable_watchman* +g:ale_ruby_sorbet_executable ale-ruby.txt /*g:ale_ruby_sorbet_executable* +g:ale_ruby_sorbet_options ale-ruby.txt /*g:ale_ruby_sorbet_options* +g:ale_ruby_standardrb_executable ale-ruby.txt /*g:ale_ruby_standardrb_executable* +g:ale_ruby_standardrb_options ale-ruby.txt /*g:ale_ruby_standardrb_options* +g:ale_ruby_syntax_tree_executable ale-ruby.txt /*g:ale_ruby_syntax_tree_executable* +g:ale_ruby_syntax_tree_options ale-ruby.txt /*g:ale_ruby_syntax_tree_options* +g:ale_rust_analyzer_config ale-rust.txt /*g:ale_rust_analyzer_config* +g:ale_rust_analyzer_executable ale-rust.txt /*g:ale_rust_analyzer_executable* +g:ale_rust_cargo_avoid_whole_workspace ale-rust.txt /*g:ale_rust_cargo_avoid_whole_workspace* +g:ale_rust_cargo_check_all_targets ale-rust.txt /*g:ale_rust_cargo_check_all_targets* +g:ale_rust_cargo_check_examples ale-rust.txt /*g:ale_rust_cargo_check_examples* +g:ale_rust_cargo_check_tests ale-rust.txt /*g:ale_rust_cargo_check_tests* +g:ale_rust_cargo_clippy_options ale-rust.txt /*g:ale_rust_cargo_clippy_options* +g:ale_rust_cargo_default_feature_behavior ale-rust.txt /*g:ale_rust_cargo_default_feature_behavior* +g:ale_rust_cargo_include_features ale-rust.txt /*g:ale_rust_cargo_include_features* +g:ale_rust_cargo_target_dir ale-rust.txt /*g:ale_rust_cargo_target_dir* +g:ale_rust_cargo_use_check ale-rust.txt /*g:ale_rust_cargo_use_check* +g:ale_rust_cargo_use_clippy ale-rust.txt /*g:ale_rust_cargo_use_clippy* +g:ale_rust_ignore_error_codes ale-rust.txt /*g:ale_rust_ignore_error_codes* +g:ale_rust_ignore_secondary_spans ale-rust.txt /*g:ale_rust_ignore_secondary_spans* +g:ale_rust_rls_config ale-rust.txt /*g:ale_rust_rls_config* +g:ale_rust_rls_executable ale-rust.txt /*g:ale_rust_rls_executable* +g:ale_rust_rls_toolchain ale-rust.txt /*g:ale_rust_rls_toolchain* +g:ale_rust_rustc_options ale-rust.txt /*g:ale_rust_rustc_options* +g:ale_rust_rustfmt_executable ale-rust.txt /*g:ale_rust_rustfmt_executable* +g:ale_rust_rustfmt_options ale-rust.txt /*g:ale_rust_rustfmt_options* +g:ale_sass_stylelint_executable ale-sass.txt /*g:ale_sass_stylelint_executable* +g:ale_sass_stylelint_use_global ale-sass.txt /*g:ale_sass_stylelint_use_global* +g:ale_scala_metals_executable ale-scala.txt /*g:ale_scala_metals_executable* +g:ale_scala_metals_project_root ale-scala.txt /*g:ale_scala_metals_project_root* +g:ale_scala_sbtserver_address ale-scala.txt /*g:ale_scala_sbtserver_address* +g:ale_scala_sbtserver_project_root ale-scala.txt /*g:ale_scala_sbtserver_project_root* +g:ale_scala_scalafmt_executable ale-scala.txt /*g:ale_scala_scalafmt_executable* +g:ale_scala_scalafmt_options ale-scala.txt /*g:ale_scala_scalafmt_options* +g:ale_scala_scalastyle_config ale-scala.txt /*g:ale_scala_scalastyle_config* +g:ale_scala_scalastyle_options ale-scala.txt /*g:ale_scala_scalastyle_options* +g:ale_scss_sasslint_executable ale-scss.txt /*g:ale_scss_sasslint_executable* +g:ale_scss_sasslint_options ale-scss.txt /*g:ale_scss_sasslint_options* +g:ale_scss_sasslint_use_global ale-scss.txt /*g:ale_scss_sasslint_use_global* +g:ale_scss_stylelint_executable ale-scss.txt /*g:ale_scss_stylelint_executable* +g:ale_scss_stylelint_options ale-scss.txt /*g:ale_scss_stylelint_options* +g:ale_scss_stylelint_use_global ale-scss.txt /*g:ale_scss_stylelint_use_global* +g:ale_set_balloons ale.txt /*g:ale_set_balloons* +g:ale_set_balloons_legacy_echo ale.txt /*g:ale_set_balloons_legacy_echo* +g:ale_set_highlights ale.txt /*g:ale_set_highlights* +g:ale_set_loclist ale.txt /*g:ale_set_loclist* +g:ale_set_quickfix ale.txt /*g:ale_set_quickfix* +g:ale_set_signs ale.txt /*g:ale_set_signs* +g:ale_sh_bashate_executable ale-sh.txt /*g:ale_sh_bashate_executable* +g:ale_sh_bashate_options ale-sh.txt /*g:ale_sh_bashate_options* +g:ale_sh_language_server_executable ale-sh.txt /*g:ale_sh_language_server_executable* +g:ale_sh_language_server_use_global ale-sh.txt /*g:ale_sh_language_server_use_global* +g:ale_sh_shell_default_shell ale-sh.txt /*g:ale_sh_shell_default_shell* +g:ale_sh_shellcheck_change_directory ale-sh.txt /*g:ale_sh_shellcheck_change_directory* +g:ale_sh_shellcheck_dialect ale-sh.txt /*g:ale_sh_shellcheck_dialect* +g:ale_sh_shellcheck_exclusions ale-sh.txt /*g:ale_sh_shellcheck_exclusions* +g:ale_sh_shellcheck_executable ale-sh.txt /*g:ale_sh_shellcheck_executable* +g:ale_sh_shellcheck_options ale-sh.txt /*g:ale_sh_shellcheck_options* +g:ale_sh_shfmt_options ale-sh.txt /*g:ale_sh_shfmt_options* +g:ale_shell ale.txt /*g:ale_shell* +g:ale_shell_arguments ale.txt /*g:ale_shell_arguments* +g:ale_sign_column_always ale.txt /*g:ale_sign_column_always* +g:ale_sign_error ale.txt /*g:ale_sign_error* +g:ale_sign_highlight_linenrs ale.txt /*g:ale_sign_highlight_linenrs* +g:ale_sign_info ale.txt /*g:ale_sign_info* +g:ale_sign_offset ale.txt /*g:ale_sign_offset* +g:ale_sign_priority ale.txt /*g:ale_sign_priority* +g:ale_sign_style_error ale.txt /*g:ale_sign_style_error* +g:ale_sign_style_warning ale.txt /*g:ale_sign_style_warning* +g:ale_sign_warning ale.txt /*g:ale_sign_warning* +g:ale_sml_smlnj_cm_file ale-sml.txt /*g:ale_sml_smlnj_cm_file* +g:ale_solidity_solc_executable ale-solidity.txt /*g:ale_solidity_solc_executable* +g:ale_solidity_solc_options ale-solidity.txt /*g:ale_solidity_solc_options* +g:ale_sourcekit_lsp_executable ale-swift.txt /*g:ale_sourcekit_lsp_executable* +g:ale_spec_rpmlint_executable ale-spec.txt /*g:ale_spec_rpmlint_executable* +g:ale_spec_rpmlint_options ale-spec.txt /*g:ale_spec_rpmlint_options* +g:ale_sql_pgformatter_executable ale-sql.txt /*g:ale_sql_pgformatter_executable* +g:ale_sql_pgformatter_options ale-sql.txt /*g:ale_sql_pgformatter_options* +g:ale_sql_sqlfluff_executable ale-sql.txt /*g:ale_sql_sqlfluff_executable* +g:ale_sql_sqlfluff_options ale-sql.txt /*g:ale_sql_sqlfluff_options* +g:ale_sql_sqlfmt_executable ale-sql.txt /*g:ale_sql_sqlfmt_executable* +g:ale_sql_sqlfmt_options ale-sql.txt /*g:ale_sql_sqlfmt_options* +g:ale_sql_sqlformat_executable ale-sql.txt /*g:ale_sql_sqlformat_executable* +g:ale_sql_sqlformat_options ale-sql.txt /*g:ale_sql_sqlformat_options* +g:ale_stylus_stylelint_executable ale-stylus.txt /*g:ale_stylus_stylelint_executable* +g:ale_stylus_stylelint_options ale-stylus.txt /*g:ale_stylus_stylelint_options* +g:ale_stylus_stylelint_use_global ale-stylus.txt /*g:ale_stylus_stylelint_use_global* +g:ale_sugarss_stylelint_executable ale-sugarss.txt /*g:ale_sugarss_stylelint_executable* +g:ale_sugarss_stylelint_options ale-sugarss.txt /*g:ale_sugarss_stylelint_options* +g:ale_sugarss_stylelint_use_global ale-sugarss.txt /*g:ale_sugarss_stylelint_use_global* +g:ale_svelte_svelteserver_executable ale-svelte.txt /*g:ale_svelte_svelteserver_executable* +g:ale_svelte_svelteserver_use_global ale-svelte.txt /*g:ale_svelte_svelteserver_use_global* +g:ale_swift_appleswiftformat_executable ale-swift.txt /*g:ale_swift_appleswiftformat_executable* +g:ale_swift_appleswiftformat_use_swiftpm ale-swift.txt /*g:ale_swift_appleswiftformat_use_swiftpm* +g:ale_tcl_nagelfar_executable ale-tcl.txt /*g:ale_tcl_nagelfar_executable* +g:ale_tcl_nagelfar_options ale-tcl.txt /*g:ale_tcl_nagelfar_options* +g:ale_terraform_checkov_executable ale-terraform.txt /*g:ale_terraform_checkov_executable* +g:ale_terraform_checkov_options ale-terraform.txt /*g:ale_terraform_checkov_options* +g:ale_terraform_fmt_executable ale-terraform.txt /*g:ale_terraform_fmt_executable* +g:ale_terraform_fmt_options ale-terraform.txt /*g:ale_terraform_fmt_options* +g:ale_terraform_langserver_executable ale-terraform.txt /*g:ale_terraform_langserver_executable* +g:ale_terraform_langserver_options ale-terraform.txt /*g:ale_terraform_langserver_options* +g:ale_terraform_ls_executable ale-terraform.txt /*g:ale_terraform_ls_executable* +g:ale_terraform_ls_options ale-terraform.txt /*g:ale_terraform_ls_options* +g:ale_terraform_terraform_executable ale-terraform.txt /*g:ale_terraform_terraform_executable* +g:ale_terraform_tflint_executable ale-terraform.txt /*g:ale_terraform_tflint_executable* +g:ale_terraform_tflint_options ale-terraform.txt /*g:ale_terraform_tflint_options* +g:ale_terraform_tfsec_executable ale-terraform.txt /*g:ale_terraform_tfsec_executable* +g:ale_terraform_tfsec_options ale-terraform.txt /*g:ale_terraform_tfsec_options* +g:ale_tex_chktex_executable ale-tex.txt /*g:ale_tex_chktex_executable* +g:ale_tex_chktex_options ale-tex.txt /*g:ale_tex_chktex_options* +g:ale_tex_latexindent_executable ale-tex.txt /*g:ale_tex_latexindent_executable* +g:ale_tex_latexindent_options ale-tex.txt /*g:ale_tex_latexindent_options* +g:ale_tex_texlab_config ale-tex.txt /*g:ale_tex_texlab_config* +g:ale_tex_texlab_executable ale-tex.txt /*g:ale_tex_texlab_executable* +g:ale_tex_texlab_options ale-tex.txt /*g:ale_tex_texlab_options* +g:ale_textlint_executable ale-text.txt /*g:ale_textlint_executable* +g:ale_textlint_options ale-text.txt /*g:ale_textlint_options* +g:ale_textlint_use_global ale-text.txt /*g:ale_textlint_use_global* +g:ale_thrift_thrift_executable ale-thrift.txt /*g:ale_thrift_thrift_executable* +g:ale_thrift_thrift_generators ale-thrift.txt /*g:ale_thrift_thrift_generators* +g:ale_thrift_thrift_includes ale-thrift.txt /*g:ale_thrift_thrift_includes* +g:ale_thrift_thrift_options ale-thrift.txt /*g:ale_thrift_thrift_options* +g:ale_thrift_thriftcheck_executable ale-thrift.txt /*g:ale_thrift_thriftcheck_executable* +g:ale_thrift_thriftcheck_options ale-thrift.txt /*g:ale_thrift_thriftcheck_options* +g:ale_type_map ale.txt /*g:ale_type_map* +g:ale_typescript_standard_executable ale-typescript.txt /*g:ale_typescript_standard_executable* +g:ale_typescript_standard_options ale-typescript.txt /*g:ale_typescript_standard_options* +g:ale_typescript_standard_use_global ale-typescript.txt /*g:ale_typescript_standard_use_global* +g:ale_typescript_tslint_config_path ale-typescript.txt /*g:ale_typescript_tslint_config_path* +g:ale_typescript_tslint_executable ale-typescript.txt /*g:ale_typescript_tslint_executable* +g:ale_typescript_tslint_ignore_empty_files ale-typescript.txt /*g:ale_typescript_tslint_ignore_empty_files* +g:ale_typescript_tslint_rules_dir ale-typescript.txt /*g:ale_typescript_tslint_rules_dir* +g:ale_typescript_tslint_use_global ale-typescript.txt /*g:ale_typescript_tslint_use_global* +g:ale_typescript_tsserver_config_path ale-typescript.txt /*g:ale_typescript_tsserver_config_path* +g:ale_typescript_tsserver_executable ale-typescript.txt /*g:ale_typescript_tsserver_executable* +g:ale_typescript_tsserver_use_global ale-typescript.txt /*g:ale_typescript_tsserver_use_global* +g:ale_typescript_xo_executable ale-typescript.txt /*g:ale_typescript_xo_executable* +g:ale_typescript_xo_options ale-typescript.txt /*g:ale_typescript_xo_options* +g:ale_typescript_xo_use_global ale-typescript.txt /*g:ale_typescript_xo_use_global* +g:ale_update_tagstack ale.txt /*g:ale_update_tagstack* +g:ale_use_global_executables ale.txt /*g:ale_use_global_executables* +g:ale_v_v_executable ale-v.txt /*g:ale_v_v_executable* +g:ale_v_v_options ale-v.txt /*g:ale_v_v_options* +g:ale_v_vfmt_options ale-v.txt /*g:ale_v_vfmt_options* +g:ale_verilog_verilator_options ale-verilog.txt /*g:ale_verilog_verilator_options* +g:ale_verilog_vlog_executable ale-verilog.txt /*g:ale_verilog_vlog_executable* +g:ale_verilog_vlog_options ale-verilog.txt /*g:ale_verilog_vlog_options* +g:ale_verilog_xvlog_executable ale-verilog.txt /*g:ale_verilog_xvlog_executable* +g:ale_verilog_xvlog_options ale-verilog.txt /*g:ale_verilog_xvlog_options* +g:ale_verilog_yosys_executable ale-verilog.txt /*g:ale_verilog_yosys_executable* +g:ale_verilog_yosys_options ale-verilog.txt /*g:ale_verilog_yosys_options* +g:ale_vhdl_ghdl_executable ale-vhdl.txt /*g:ale_vhdl_ghdl_executable* +g:ale_vhdl_ghdl_options ale-vhdl.txt /*g:ale_vhdl_ghdl_options* +g:ale_vhdl_vcom_executable ale-vhdl.txt /*g:ale_vhdl_vcom_executable* +g:ale_vhdl_vcom_options ale-vhdl.txt /*g:ale_vhdl_vcom_options* +g:ale_vhdl_xvhdl_executable ale-vhdl.txt /*g:ale_vhdl_xvhdl_executable* +g:ale_vhdl_xvhdl_options ale-vhdl.txt /*g:ale_vhdl_xvhdl_options* +g:ale_vim_vimls_config ale-vim.txt /*g:ale_vim_vimls_config* +g:ale_vim_vimls_executable ale-vim.txt /*g:ale_vim_vimls_executable* +g:ale_vim_vimls_use_global ale-vim.txt /*g:ale_vim_vimls_use_global* +g:ale_vim_vint_executable ale-vim.txt /*g:ale_vim_vint_executable* +g:ale_vim_vint_show_style_issues ale-vim.txt /*g:ale_vim_vint_show_style_issues* +g:ale_virtualenv_dir_names ale.txt /*g:ale_virtualenv_dir_names* +g:ale_virtualtext_cursor ale.txt /*g:ale_virtualtext_cursor* +g:ale_virtualtext_delay ale.txt /*g:ale_virtualtext_delay* +g:ale_virtualtext_prefix ale.txt /*g:ale_virtualtext_prefix* +g:ale_vue_vls_executable ale-vue.txt /*g:ale_vue_vls_executable* +g:ale_vue_vls_use_global ale-vue.txt /*g:ale_vue_vls_use_global* +g:ale_vue_volar_executable ale-vue.txt /*g:ale_vue_volar_executable* +g:ale_vue_volar_init_options ale-vue.txt /*g:ale_vue_volar_init_options* +g:ale_vue_volar_use_global ale-vue.txt /*g:ale_vue_volar_use_global* +g:ale_want_results_buffer ale.txt /*g:ale_want_results_buffer* +g:ale_warn_about_trailing_blank_lines ale.txt /*g:ale_warn_about_trailing_blank_lines* +g:ale_warn_about_trailing_whitespace ale.txt /*g:ale_warn_about_trailing_whitespace* +g:ale_wgsl_naga_executable ale-wgsl.txt /*g:ale_wgsl_naga_executable* +g:ale_windows_node_executable_path ale.txt /*g:ale_windows_node_executable_path* +g:ale_writegood_executable ale.txt /*g:ale_writegood_executable* +g:ale_writegood_options ale.txt /*g:ale_writegood_options* +g:ale_writegood_use_global ale.txt /*g:ale_writegood_use_global* +g:ale_xml_xmllint_executable ale-xml.txt /*g:ale_xml_xmllint_executable* +g:ale_xml_xmllint_indentsize ale-xml.txt /*g:ale_xml_xmllint_indentsize* +g:ale_xml_xmllint_options ale-xml.txt /*g:ale_xml_xmllint_options* +g:ale_yaml_actionlint_executable ale-yaml.txt /*g:ale_yaml_actionlint_executable* +g:ale_yaml_actionlint_options ale-yaml.txt /*g:ale_yaml_actionlint_options* +g:ale_yaml_gitlablint_executable ale-yaml.txt /*g:ale_yaml_gitlablint_executable* +g:ale_yaml_gitlablint_options ale-yaml.txt /*g:ale_yaml_gitlablint_options* +g:ale_yaml_ls_config ale-yaml.txt /*g:ale_yaml_ls_config* +g:ale_yaml_ls_executable ale-yaml.txt /*g:ale_yaml_ls_executable* +g:ale_yaml_ls_use_global ale-yaml.txt /*g:ale_yaml_ls_use_global* +g:ale_yaml_spectral_executable ale-yaml.txt /*g:ale_yaml_spectral_executable* +g:ale_yaml_spectral_use_global ale-yaml.txt /*g:ale_yaml_spectral_use_global* +g:ale_yaml_swaglint_executable ale-yaml.txt /*g:ale_yaml_swaglint_executable* +g:ale_yaml_swaglint_use_global ale-yaml.txt /*g:ale_yaml_swaglint_use_global* +g:ale_yaml_yamlfix_executable ale-yaml.txt /*g:ale_yaml_yamlfix_executable* +g:ale_yaml_yamlfix_options ale-yaml.txt /*g:ale_yaml_yamlfix_options* +g:ale_yaml_yamlfix_use_global ale-yaml.txt /*g:ale_yaml_yamlfix_use_global* +g:ale_yaml_yamllint_executable ale-yaml.txt /*g:ale_yaml_yamllint_executable* +g:ale_yaml_yamllint_options ale-yaml.txt /*g:ale_yaml_yamllint_options* +g:ale_yang_lsp_executable ale-yang.txt /*g:ale_yang_lsp_executable* +g:ale_zeek_zeek_executable ale-zeek.txt /*g:ale_zeek_zeek_executable* +g:ale_zig_zigfmt_executable ale-zig.txt /*g:ale_zig_zigfmt_executable* +g:ale_zig_zls_config ale-zig.txt /*g:ale_zig_zls_config* +g:ale_zig_zls_executable ale-zig.txt /*g:ale_zig_zls_executable* +g:html_tidy_use_global ale-html.txt /*g:html_tidy_use_global* +g:nim_nimlsp_nim_sources ale-nim.txt /*g:nim_nimlsp_nim_sources* +g:rego_opacheck_executable ale-rego.txt /*g:rego_opacheck_executable* +g:rego_opacheck_options ale-rego.txt /*g:rego_opacheck_options* +g:vala_vala_lint_config_filename ale-vala.txt /*g:vala_vala_lint_config_filename* +g:vala_vala_lint_executable ale-vala.txt /*g:vala_vala_lint_executable* +terraform-lsp ale-terraform.txt /*terraform-lsp* diff --git a/dot_vim/plugged/ale/dot_appveyor.yml b/dot_vim/plugged/ale/dot_appveyor.yml new file mode 100644 index 0000000..e6f2a1e --- /dev/null +++ b/dot_vim/plugged/ale/dot_appveyor.yml @@ -0,0 +1,48 @@ +--- +# Disabling building for AppVeyor. We are just testing things. +build: false +clone_depth: 10 +# Use the directory C:\testplugin so test directories will mostly work. +clone_folder: C:\testplugin + +branches: + only: + - master + - /v\d+\.\d+\.(x|\d+)/ + +# Cache the vim and vader directories between builds. +cache: + - C:\vim -> .appveyor.yml + - C:\vader -> .appveyor.yml + +init: + # Stop git from changing newlines + - git config --global core.autocrlf input + +# NOTE: If you change the Vim or Vader versions here, please also update the +# instructions for running tests on Windows in ale-development.txt + +install: + # Download and unpack Vim + - ps: >- + if (!(Test-Path -Path C:\vim)){ + Add-Type -A System.IO.Compression.FileSystem + Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip ` + -OutFile C:\vim.zip + [IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim') + Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip ` + -OutFile C:\rt.zip + [IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim') + } + # Clone Vader and check out the commit we want + - ps: >- + if (!(Test-Path -Path C:\vader)){ + git clone https://github.com/junegunn/vader.vim C:\vader 2> $null + cd C:\vader + git checkout -qf c6243dd81c98350df4dec608fa972df98fa2a3af 2> $null + } + +test_script: + - cd C:\testplugin + - 'C:\vim\vim\vim80\vim.exe -u test\vimrc "+Vader! + test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*.vader"' diff --git a/dot_vim/plugged/ale/dot_editorconfig b/dot_vim/plugged/ale/dot_editorconfig new file mode 100644 index 0000000..d9b95d6 --- /dev/null +++ b/dot_vim/plugged/ale/dot_editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Match and apply these rules for all file +# types you open in your code editor +[*] +# Unix-style newlines +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true diff --git a/dot_vim/plugged/ale/dot_git/HEAD b/dot_vim/plugged/ale/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/ale/dot_git/branches/.keep b/dot_vim/plugged/ale/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/dot_git/config b/dot_vim/plugged/ale/dot_git/config new file mode 100644 index 0000000..c8dc9b2 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/dense-analysis/ale.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/ale/dot_git/description b/dot_vim/plugged/ale/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/ale/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/ale/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/ale/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/ale/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/ale/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/ale/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/ale/dot_git/hooks/post-update.sample b/dot_vim/plugged/ale/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-push.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/ale/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/ale/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/ale/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/ale/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/ale/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/ale/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/ale/dot_git/index b/dot_vim/plugged/ale/dot_git/index new file mode 100644 index 0000000..fe03eb0 Binary files /dev/null and b/dot_vim/plugged/ale/dot_git/index differ diff --git a/dot_vim/plugged/ale/dot_git/info/exclude b/dot_vim/plugged/ale/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/ale/dot_git/logs/HEAD b/dot_vim/plugged/ale/dot_git/logs/HEAD new file mode 100644 index 0000000..6856f33 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa LinlyBoi 1673460166 +0200 clone: from https://github.com/dense-analysis/ale.git +69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa 69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa LinlyBoi 1673460166 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/ale/dot_git/logs/refs/heads/master b/dot_vim/plugged/ale/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..9a1ad84 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa LinlyBoi 1673460166 +0200 clone: from https://github.com/dense-analysis/ale.git diff --git a/dot_vim/plugged/ale/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/ale/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..9a1ad84 --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa LinlyBoi 1673460166 +0200 clone: from https://github.com/dense-analysis/ale.git diff --git a/dot_vim/plugged/ale/dot_git/objects/info/.keep b/dot_vim/plugged/ale/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.idx b/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.idx new file mode 100644 index 0000000..461a536 Binary files /dev/null and b/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.idx differ diff --git a/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.pack b/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.pack new file mode 100644 index 0000000..3470b3c Binary files /dev/null and b/dot_vim/plugged/ale/dot_git/objects/pack/readonly_pack-065dba8ccc2287167c324ef036a5261c7f156062.pack differ diff --git a/dot_vim/plugged/ale/dot_git/packed-refs b/dot_vim/plugged/ale/dot_git/packed-refs new file mode 100644 index 0000000..d36e68d --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/packed-refs @@ -0,0 +1,62 @@ +# pack-refs with: peeled fully-peeled sorted +69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa refs/remotes/origin/master +62195b7a68a6b92a8cbbb8bc5fad4670408ffa92 refs/remotes/origin/v1.0.x +97b410bbba88b119995c935b519164685537b579 refs/remotes/origin/v1.1.x +84004665d5010ed2a7f56301bece94ac61359fe6 refs/remotes/origin/v1.2.x +76b5c9283da30f90acadda0da3b77534909c88d7 refs/remotes/origin/v1.3.x +cedc3e1a1f26b458a7f62f9758b6b425e711c826 refs/remotes/origin/v1.4.x +a94f7aaa7e34af4084dade820840985f90d9928b refs/remotes/origin/v1.5.x +5556fcbd1c271001d22b88a9d4533b3d64e0e394 refs/remotes/origin/v1.6.x +c7a9ffcb9ca9c179d30af0dd27d817ec48c58a5a refs/remotes/origin/v1.7.x +4c3bd8a84f990c362d7a927c2349dd4cc5e6c2d1 refs/remotes/origin/v1.8.x +ae3b13d132c89d0b6a88102eec0cddd03989b759 refs/remotes/origin/v1.9.x +2ee3dcdd62ad8a5e6eee8821e158b606e0516f82 refs/remotes/origin/v2.0.x +c76d8aa0b59f877fbc7d741a18f0c0485b62fb7b refs/remotes/origin/v2.1.x +0c17ba2a0fa90d219e52fdb64c29cc65fd950e97 refs/remotes/origin/v2.2.x +0c6370f41a2e474fc8468a40e5b9a9312347d743 refs/remotes/origin/v2.3.x +d837169f1d10f0fee605cc17564c68563db94601 refs/remotes/origin/v2.4.x +80ab12c7b645b392feb98723873d77b045a0a7e2 refs/remotes/origin/v2.5.x +b24fd13423656e14fa266405e1f238f0ec65cfb3 refs/remotes/origin/v2.6.x +26e61fad6929e4c3eff6b0c3940bb20955e94d0c refs/remotes/origin/v2.7.x +08295ce17405cb5f6c80d2f726262493bfd21210 refs/remotes/origin/v3.0.x +b2702c68293d7fd548d87803ce61ce02f8821226 refs/remotes/origin/v3.1.x +f0fa1377218fe3ee622d16c1f882bef841c6a5e2 refs/remotes/origin/v3.2.x +0382c9d8c1f45aaacc8800b6d88f0041b6812469 refs/remotes/origin/v3.3.x +62195b7a68a6b92a8cbbb8bc5fad4670408ffa92 refs/tags/v1.0.0 +73e0f87eba043594668d9b34b63d489c59140c4f refs/tags/v1.1.0 +97b410bbba88b119995c935b519164685537b579 refs/tags/v1.1.1 +55827116805832d318c9b02152dbc0faf8bb8c91 refs/tags/v1.2.0 +84004665d5010ed2a7f56301bece94ac61359fe6 refs/tags/v1.2.1 +32f21751f4722abdb10b9da3b6cf088240d46421 refs/tags/v1.3.0 +76b5c9283da30f90acadda0da3b77534909c88d7 refs/tags/v1.3.1 +14cca6d1155720124bcc735b189212096a76391a refs/tags/v1.4.0 +cedc3e1a1f26b458a7f62f9758b6b425e711c826 refs/tags/v1.4.1 +73ec83d055a62019c41e699981e841e395219cca refs/tags/v1.5.0 +b8dcdc984bfb1e8cc1adbb77c47c650db2d3caf0 refs/tags/v1.5.1 +a94f7aaa7e34af4084dade820840985f90d9928b refs/tags/v1.5.2 +be5c7a09ced7b8fd0fa3bf964fa3364ef0751a21 refs/tags/v1.6.0 +d8abe0d6a2902234c2cc551ac94f57a84a9ff17e refs/tags/v1.6.1 +5556fcbd1c271001d22b88a9d4533b3d64e0e394 refs/tags/v1.6.2 +1568bf81281507aaaa8c71af85e244e94bd2924c refs/tags/v1.7.0 +c7a9ffcb9ca9c179d30af0dd27d817ec48c58a5a refs/tags/v1.7.1 +164c711b3da5a51a2323a3bd613df251ce455ca5 refs/tags/v1.8.0 +4c3bd8a84f990c362d7a927c2349dd4cc5e6c2d1 refs/tags/v1.8.1 +10e1545630943aa98320b62f97f79a6f85340e51 refs/tags/v1.9.0 +ae3b13d132c89d0b6a88102eec0cddd03989b759 refs/tags/v1.9.1 +db85b931ec83de3382b75b7e9a18f1cf8ae8ce43 refs/tags/v2.0.0 +2ee3dcdd62ad8a5e6eee8821e158b606e0516f82 refs/tags/v2.0.1 +1a4456cf2ab6be682e87c4d8c9811c73e69c1b65 refs/tags/v2.1.0 +c76d8aa0b59f877fbc7d741a18f0c0485b62fb7b refs/tags/v2.1.1 +143c3cd09f52996c90b78059275a400d3c2327b0 refs/tags/v2.2.0 +0c17ba2a0fa90d219e52fdb64c29cc65fd950e97 refs/tags/v2.2.1 +1d4f98553852499e0f8ebd951db6ada2b1d973e3 refs/tags/v2.3.0 +0c6370f41a2e474fc8468a40e5b9a9312347d743 refs/tags/v2.3.1 +02af53b8b0a9a47c4e66e52747d98ee74bbb8118 refs/tags/v2.4.0 +d837169f1d10f0fee605cc17564c68563db94601 refs/tags/v2.4.1 +80ab12c7b645b392feb98723873d77b045a0a7e2 refs/tags/v2.5.0 +b24fd13423656e14fa266405e1f238f0ec65cfb3 refs/tags/v2.6.0 +1428c7b29e50af56f53ee1d587679d97a027dd72 refs/tags/v2.7.0 +08295ce17405cb5f6c80d2f726262493bfd21210 refs/tags/v3.0.0 +388cf3374312b05122151bc68691bf09a69ff840 refs/tags/v3.1.0 +560e6340ce10ce90fac587096fb147eea43e624d refs/tags/v3.2.0 +31010ad1d1358f14c7025168f529a0f6e512138e refs/tags/v3.3.0 diff --git a/dot_vim/plugged/ale/dot_git/refs/heads/master b/dot_vim/plugged/ale/dot_git/refs/heads/master new file mode 100644 index 0000000..79e430a --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/refs/heads/master @@ -0,0 +1 @@ +69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa diff --git a/dot_vim/plugged/ale/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/ale/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/ale/dot_git/refs/tags/.keep b/dot_vim/plugged/ale/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/dot_git/shallow b/dot_vim/plugged/ale/dot_git/shallow new file mode 100644 index 0000000..8e3ebbe --- /dev/null +++ b/dot_vim/plugged/ale/dot_git/shallow @@ -0,0 +1,43 @@ +02af53b8b0a9a47c4e66e52747d98ee74bbb8118 +0382c9d8c1f45aaacc8800b6d88f0041b6812469 +08295ce17405cb5f6c80d2f726262493bfd21210 +0c17ba2a0fa90d219e52fdb64c29cc65fd950e97 +0c6370f41a2e474fc8468a40e5b9a9312347d743 +10e1545630943aa98320b62f97f79a6f85340e51 +1428c7b29e50af56f53ee1d587679d97a027dd72 +143c3cd09f52996c90b78059275a400d3c2327b0 +14cca6d1155720124bcc735b189212096a76391a +1568bf81281507aaaa8c71af85e244e94bd2924c +164c711b3da5a51a2323a3bd613df251ce455ca5 +1a4456cf2ab6be682e87c4d8c9811c73e69c1b65 +1d4f98553852499e0f8ebd951db6ada2b1d973e3 +26e61fad6929e4c3eff6b0c3940bb20955e94d0c +2ee3dcdd62ad8a5e6eee8821e158b606e0516f82 +31010ad1d1358f14c7025168f529a0f6e512138e +32f21751f4722abdb10b9da3b6cf088240d46421 +388cf3374312b05122151bc68691bf09a69ff840 +4c3bd8a84f990c362d7a927c2349dd4cc5e6c2d1 +5556fcbd1c271001d22b88a9d4533b3d64e0e394 +55827116805832d318c9b02152dbc0faf8bb8c91 +560e6340ce10ce90fac587096fb147eea43e624d +62195b7a68a6b92a8cbbb8bc5fad4670408ffa92 +69c1dc8b5f3d215d4a0538265b2d257c2ed7a8fa +73e0f87eba043594668d9b34b63d489c59140c4f +73ec83d055a62019c41e699981e841e395219cca +76b5c9283da30f90acadda0da3b77534909c88d7 +80ab12c7b645b392feb98723873d77b045a0a7e2 +84004665d5010ed2a7f56301bece94ac61359fe6 +97b410bbba88b119995c935b519164685537b579 +a94f7aaa7e34af4084dade820840985f90d9928b +ae3b13d132c89d0b6a88102eec0cddd03989b759 +b24fd13423656e14fa266405e1f238f0ec65cfb3 +b2702c68293d7fd548d87803ce61ce02f8821226 +b8dcdc984bfb1e8cc1adbb77c47c650db2d3caf0 +be5c7a09ced7b8fd0fa3bf964fa3364ef0751a21 +c76d8aa0b59f877fbc7d741a18f0c0485b62fb7b +c7a9ffcb9ca9c179d30af0dd27d817ec48c58a5a +cedc3e1a1f26b458a7f62f9758b6b425e711c826 +d837169f1d10f0fee605cc17564c68563db94601 +d8abe0d6a2902234c2cc551ac94f57a84a9ff17e +db85b931ec83de3382b75b7e9a18f1cf8ae8ce43 +f0fa1377218fe3ee622d16c1f882bef841c6a5e2 diff --git a/dot_vim/plugged/ale/dot_gitattributes b/dot_vim/plugged/ale/dot_gitattributes new file mode 100644 index 0000000..b1235f8 --- /dev/null +++ b/dot_vim/plugged/ale/dot_gitattributes @@ -0,0 +1,13 @@ +.* export-ignore +/CODE_OF_CONDUCT.md export-ignore +/CONTRIBUTING.md export-ignore +/Dockerfile export-ignore +/ISSUE_TEMPLATE export-ignore +/ISSUE_TEMPLATE.md export-ignore +/Makefile export-ignore +/PULL_REQUEST_TEMPLATE.md export-ignore +/README.md export-ignore +/img export-ignore +/run-tests export-ignore +/run-tests.bat export-ignore +/test export-ignore diff --git a/dot_vim/plugged/ale/dot_github/CODE_OF_CONDUCT.md b/dot_vim/plugged/ale/dot_github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..587bb37 --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +Codes of conduct are totally unnecessary and dumb. + +Just don't be a jerk and have fun. diff --git a/dot_vim/plugged/ale/dot_github/CONTRIBUTING.md b/dot_vim/plugged/ale/dot_github/CONTRIBUTING.md new file mode 100644 index 0000000..f2e7474 --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/CONTRIBUTING.md @@ -0,0 +1,25 @@ +## Guidelines + +Have fun, and work on whatever floats your boat. Take It Easy :tm:. + +For help with contributing to ALE, see `:help ale-development` in Vim, or view +the help file online [here](/doc/ale-development.txt). + +## Creating Issues + +Before creating any issues, please look through the current list of issues and +pull requests, and ensure that the issue hasn't already been reported. If an +issue has already been reported, but you have some new insight, please add +a comment to the existing issue. + +Please read the FAQ in the README before creating any issues. A feature +you desire may already exist and be documented, or the FAQ might explain +how to solve a problem you have already. + +Please try and describe any issues reported with as much detail as you can +provide about your Vim version, the linter you were trying to run, your +operating system, or any other information you think might be helpful. + +Please describe your issue in clear, grammatically correct, and easy to +understand English. You are more likely to see an issue resolved if others +can understand you. diff --git a/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/config.yml b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..fdffb5f --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +--- +blank_issues_enabled: false +contact_links: + - name: Ask for Help + url: https://github.com/dense-analysis/ale/discussions/new?category=q-a-ask-for-help-with-problems + about: Ask for Help in ALE Discussions diff --git a/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/report-a-bug.md b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/report-a-bug.md new file mode 100644 index 0000000..cf92f33 --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/report-a-bug.md @@ -0,0 +1,48 @@ +--- +name: Report a bug +labels: bug +about: Report a bug with ALE. + +--- + + + +## Information + +**VIM version** + + + +Operating System: + +## What went wrong + + + +Something went wrong in specifically this place, and I also searched through both open and closed issues for the same problem before reporting a bug here. + +Are you having trouble configuring ALE? Try asking for help on [Stack Exchange](https://vi.stackexchange.com/) or perhaps on [Reddit](https://www.reddit.com/r/vim/) instead. The GitHub issue tracker should be used for reporting bugs or asking for new features. + +## Reproducing the bug + + + +1. I did this. +2. Then this happened. + +### :ALEInfo +
+ Expand + + + +
diff --git a/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-a-new-linter-or-fixer.md b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-a-new-linter-or-fixer.md new file mode 100644 index 0000000..ad235e5 --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-a-new-linter-or-fixer.md @@ -0,0 +1,21 @@ +--- +name: Suggest a new linter or fixer +labels: new tool +about: Suggest a new tool ALE can officially integrate with. + +--- + + + +**Name:** foobar +**URL:** https://foo.bar.com + + diff --git a/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-an-improvement.md b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-an-improvement.md new file mode 100644 index 0000000..d39d0ac --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/ISSUE_TEMPLATE/suggest-an-improvement.md @@ -0,0 +1,8 @@ +--- +name: Suggest an improvement +labels: enhancement +about: Suggest some way to improve ALE, or add a new feature. + +--- + + diff --git a/dot_vim/plugged/ale/dot_github/PULL_REQUEST_TEMPLATE.md b/dot_vim/plugged/ale/dot_github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..785da9b --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ + + +Where are the tests? Have you added tests? Have you updated the tests? Read the +comment above and the documentation referenced in it first. Write tests! + +Seriously, read `:help ale-dev` and write tests. diff --git a/dot_vim/plugged/ale/dot_github/stale.yml b/dot_vim/plugged/ale/dot_github/stale.yml new file mode 100644 index 0000000..e20c092 --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/stale.yml @@ -0,0 +1,17 @@ +--- +# This configuration closes stale PRs after 56 + 7 days. +# That's 8 weeks until stale bot complains, and a week until it closes a PR. +# Issues in ALE are never, ever stale. They are either resolved or not. +only: pulls +daysUntilStale: 56 +daysUntilClose: 7 +exemptLabels: [] +staleLabel: stale +markComment: > + This pull request has been automatically marked as stale because it has not + been updated recently. Make sure to write tests and document your changes. + See `:help ale-dev` for information on writing tests. + + If your pull request is good to merge, bother w0rp or another maintainer + again, and get them to merge it. +closeComment: false diff --git a/dot_vim/plugged/ale/dot_github/workflows/main.yml b/dot_vim/plugged/ale/dot_github/workflows/main.yml new file mode 100644 index 0000000..4910a5e --- /dev/null +++ b/dot_vim/plugged/ale/dot_github/workflows/main.yml @@ -0,0 +1,37 @@ +--- +name: CI +on: # yamllint disable-line rule:truthy + push: + branches: [ master ] # yamllint disable-line rule:brackets + tags: + - v[0-9]+.[0-9]+.x + - v[0-9]+.[0-9]+.[0-9]+ + pull_request: + branches: [ master ] # yamllint disable-line rule:brackets + +jobs: + build_image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build docker run image + shell: bash + env: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PASS: ${{ secrets.DOCKER_HUB_PASS }} + run: ./run-tests --build-image + test_ale: + needs: build_image + runs-on: ubuntu-latest + strategy: + matrix: + vim-version: + - '--vim-80-only' + - '--vim-90-only' + - '--neovim-02-only' + - '--neovim-08-only' + - '--linters-only' + steps: + - uses: actions/checkout@v2 + - name: Run tests + run: ./run-tests -v ${{ matrix.vim-version }} diff --git a/dot_vim/plugged/ale/dot_gitignore b/dot_vim/plugged/ale/dot_gitignore new file mode 100644 index 0000000..7711fb9 --- /dev/null +++ b/dot_vim/plugged/ale/dot_gitignore @@ -0,0 +1,12 @@ +!.editorconfig +*.obj +*.pyc +# Ignore all hidden files everywhere. +# Use `git add -f` to add hidden files. +.* +/doc/tags +/init.vim +/test/ale-info-test-file +/vader_output +__pycache__ +tags diff --git a/dot_vim/plugged/ale/dot_vintrc.yaml b/dot_vim/plugged/ale/dot_vintrc.yaml new file mode 100644 index 0000000..ce04d47 --- /dev/null +++ b/dot_vim/plugged/ale/dot_vintrc.yaml @@ -0,0 +1,5 @@ +policies: + # Disable a violation that is thrown randomly for reasons I still + # do not understand. + ProhibitMissingScriptEncoding: + enabled: false diff --git a/dot_vim/plugged/ale/executable_run-tests b/dot_vim/plugged/ale/executable_run-tests new file mode 100644 index 0000000..41460fc --- /dev/null +++ b/dot_vim/plugged/ale/executable_run-tests @@ -0,0 +1,270 @@ +#!/usr/bin/env bash + +# Author: w0rp +# +# This script runs tests for the ALE project. Run `./run-tests --help` for +# options, or read the output below. +# + +image=denseanalysis/ale + +# Create docker image tag based on Dockerfile contents +if [ -n "$(command -v md5)" ]; then + image_tag=$(md5 -q Dockerfile) +else + image_tag=$(md5sum Dockerfile | cut -d' ' -f1) +fi +git_version=$(git describe --always --tags) + +# Used in all test scripts for running the selected Docker image. +DOCKER_RUN_IMAGE="$image:$image_tag" +export DOCKER_RUN_IMAGE + +tests='test/*.vader test/*/*.vader test/*/*/*.vader' +# These flags are forwarded to the script for running Vader tests. +verbose_flag='' +quiet_flag='' +run_neovim_02_tests=1 +run_neovim_08_tests=1 +run_vim_80_tests=1 +run_vim_90_tests=1 +run_linters=1 + +while [ $# -ne 0 ]; do + case $1 in + -v) + verbose_flag='-v' + shift + ;; + -q) + quiet_flag='-q' + shift + ;; + --build-image) + run_vim_80_tests=0 + run_vim_90_tests=0 + run_neovim_02_tests=0 + run_neovim_08_tests=0 + run_linters=0 + shift + ;; + --neovim-only) + run_vim_80_tests=0 + run_vim_90_tests=0 + run_linters=0 + shift + ;; + --neovim-02-only) + run_neovim_08_tests=0 + run_vim_80_tests=0 + run_vim_90_tests=0 + run_linters=0 + shift + ;; + --neovim-08-only) + run_neovim_02_tests=0 + run_vim_80_tests=0 + run_vim_90_tests=0 + run_linters=0 + shift + ;; + --vim-only) + run_neovim_02_tests=0 + run_neovim_08_tests=0 + run_linters=0 + shift + ;; + --vim-80-only) + run_neovim_02_tests=0 + run_neovim_08_tests=0 + run_vim_90_tests=0 + run_linters=0 + shift + ;; + --vim-90-only) + run_neovim_02_tests=0 + run_neovim_08_tests=0 + run_vim_80_tests=0 + run_linters=0 + shift + ;; + --linters-only) + run_vim_80_tests=0 + run_vim_90_tests=0 + run_neovim_02_tests=0 + run_neovim_08_tests=0 + shift + ;; + --fast) + run_vim_80_tests=0 + run_vim_90_tests=0 + run_neovim_02_tests=0 + run_neovim_08_tests=1 + shift + ;; + --help) + echo 'Usage: ./run-tests [OPTION]... [FILE]...' + echo + echo 'Filenames can be given as arguments to run a subset of tests.' + echo 'For example: ./run-tests test/test_ale_var.vader' + echo + echo 'Options:' + echo ' -v Enable verbose output' + echo ' -q Hide output for successful tests' + echo ' --build-image Run docker image build only.' + echo ' --neovim-only Run tests only for NeoVim' + echo ' --neovim-02-only Run tests only for NeoVim 0.2' + echo ' --neovim-08-only Run tests only for NeoVim 0.8' + echo ' --vim-only Run tests only for Vim' + echo ' --vim-80-only Run tests only for Vim 8.2' + echo ' --vim-90-only Run tests only for Vim 9.0' + echo ' --linters-only Run only Vint and custom checks' + echo ' --fast Run only the fastest Vim and custom checks' + echo ' --help Show this help text' + echo ' -- Stop parsing options after this' + exit 0 + ;; + --) + shift + break + ;; + -?*) + echo "Invalid argument: $1" 1>&2 + exit 1 + ;; + *) + break + ;; + esac +done + +# Allow tests to be passed as arguments. +if [ $# -ne 0 ]; then + # This doesn't perfectly handle work splitting, but none of our files + # have spaces in the names. + tests="$*" + + # Don't run other tools when targeting tests. + run_linters=0 +fi + +# Delete .swp files in the test directory, which cause Vim 8 to hang. +find test -name '*.swp' -delete + +# Check if docker un image is available locally +has_image=$(docker images --quiet "${image}:${image_tag}" | wc -l) + +if [ "$has_image" -eq 0 ] +then + + echo "Downloading run image ${image}:${image_tag}" + docker pull "${image}:${image_tag}" &> /dev/null + + if [ $? -eq 1 ] + then + echo "Could not pull image ${image}:${image_tag}" + echo "Building run image ${image}:${image_tag}" + docker build --build-arg GIT_VERSION="$git_version" -t "${image}:${image_tag}" . + docker tag "${image}:${image_tag}" "${image}:latest" + + if [[ -z "${DOCKER_HUB_USER:-}" || -z "${DOCKER_HUB_PASS:-}" ]] + then + echo "Docker Hub credentials not set, skip push" + else + echo "Push ${image}:${image_tag} to Docker Hub" + echo "$DOCKER_HUB_PASS" | docker login -u "$DOCKER_HUB_USER" --password-stdin + docker push "${image}:${image_tag}" + fi + fi +else + echo "Docker run image ${image}:${image_tag} ready" +fi + +set -e +set -u + +docker tag "${image}:${image_tag}" "${image}:latest" + +output_dir=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') + +trap '{ rm -rf "$output_dir"; }' EXIT + +file_number=0 +pid_list='' + +# Used for killing tests when you kill the script. +cancel_tests() { + set +e + + if [ -n "$pid_list" ]; then + for pid in $pid_list; do + kill "$pid" + wait "$pid" + done + fi + + # shellcheck disable=SC2046 + docker kill $(docker ps -a -q --filter ancestor="$image" --format='{{.ID}}') &> /dev/null + + if [ -d "$output_dir" ]; then + rm -rf "$output_dir" + fi + + echo + exit 1 +} + +trap cancel_tests INT TERM + +for vim in $(docker run --rm "$DOCKER_RUN_IMAGE" ls /vim-build/bin | grep '^neovim\|^vim' ); do + if ( [[ $vim =~ ^vim-v8.0 ]] && ((run_vim_80_tests)) ) \ + || ( [[ $vim =~ ^vim-v9.0 ]] && ((run_vim_90_tests)) ) \ + || ( [[ $vim =~ ^neovim-v0.2 ]] && ((run_neovim_02_tests)) ) \ + || ( [[ $vim =~ ^neovim-v0.8 ]] && ((run_neovim_08_tests)) ); then + echo "Starting Vim: $vim..." + file_number=$((file_number+1)) + test/script/run-vader-tests $quiet_flag $verbose_flag "$vim" "$tests" \ + > "$output_dir/$file_number" 2>&1 & + pid_list="$pid_list $!" + fi +done + +if ((run_linters)); then + echo "Starting Vint..." + file_number=$((file_number+1)) + test/script/run-vint > "$output_dir/$file_number" 2>&1 & + pid_list="$pid_list $!" + + echo "Starting Custom checks..." + file_number=$((file_number+1)) + test/script/custom-checks &> "$output_dir/$file_number" 2>&1 & + pid_list="$pid_list $!" +fi + +echo + +failed=0 +index=0 + +for pid in $pid_list; do + this_failed=0 + index=$((index+1)) + + if ! wait "$pid"; then + failed=1 + this_failed=1 + fi + + # Hide output for things that passed if -q is set. + if [ "$quiet_flag" != '-q' ] || ((this_failed)); then + cat "$output_dir/$index" + fi +done + +if ((failed)); then + echo 'Something went wrong!' +else + echo 'All tests passed!' +fi + +exit $failed diff --git a/dot_vim/plugged/ale/ftplugin/ale-fix-suggest.vim b/dot_vim/plugged/ale/ftplugin/ale-fix-suggest.vim new file mode 100644 index 0000000..189a4dc --- /dev/null +++ b/dot_vim/plugged/ale/ftplugin/ale-fix-suggest.vim @@ -0,0 +1,2 @@ +" Close the ALEFixSuggest window with the q key. +noremap q :q! diff --git a/dot_vim/plugged/ale/ftplugin/ale-preview-selection.vim b/dot_vim/plugged/ale/ftplugin/ale-preview-selection.vim new file mode 100644 index 0000000..7ec8406 --- /dev/null +++ b/dot_vim/plugged/ale/ftplugin/ale-preview-selection.vim @@ -0,0 +1,16 @@ +" Close the ALEPreviewWindow window with the q key. +noremap q :q! +" Disable some keybinds for the selection window. +noremap v +noremap i +noremap I +noremap +noremap +noremap +noremap a +noremap A +noremap o +noremap O +" Keybinds for opening selection items. +noremap :call ale#preview#OpenSelection() +noremap t :call ale#preview#OpenSelectionInTab() diff --git a/dot_vim/plugged/ale/ftplugin/ale-preview.vim b/dot_vim/plugged/ale/ftplugin/ale-preview.vim new file mode 100644 index 0000000..ffbffbd --- /dev/null +++ b/dot_vim/plugged/ale/ftplugin/ale-preview.vim @@ -0,0 +1,2 @@ +" Close the ALEPreviewWindow window with the q key. +noremap q :q! diff --git a/dot_vim/plugged/ale/plugin/ale.vim b/dot_vim/plugged/ale/plugin/ale.vim new file mode 100644 index 0000000..6aa115e --- /dev/null +++ b/dot_vim/plugged/ale/plugin/ale.vim @@ -0,0 +1,354 @@ +" Author: w0rp +" Description: Main entry point for the plugin: sets up prefs and autocommands +" Preferences can be set in vimrc files and so on to configure ale + +" Sanity Checks + +if exists('g:loaded_ale_dont_use_this_in_other_plugins_please') + finish +endif + +" Set a special flag used only by this plugin for preventing doubly +" loading the script. +let g:loaded_ale_dont_use_this_in_other_plugins_please = 1 + +" A flag for detecting if the required features are set. +if has('nvim') + let s:has_features = has('timers') && has('nvim-0.2.0') +else + " Check if Job and Channel functions are available, instead of the + " features. This works better on old MacVim versions. + let s:has_features = has('timers') && exists('*job_start') && exists('*ch_close_in') +endif + +if !s:has_features + " Only output a warning if editing some special files. + if index(['', 'gitcommit'], &filetype) == -1 + " no-custom-checks + echoerr 'ALE requires NeoVim >= 0.2.0 or Vim 8 with +timers +job +channel' + " no-custom-checks + echoerr 'Please update your editor appropriately.' + endif + + " Stop here, as it won't work. + finish +endif + +" Set this flag so that other plugins can use it, like airline. +let g:loaded_ale = 1 + +" This global variable is used internally by ALE for tracking information for +" each buffer which linters are being run against. +let g:ale_buffer_info = {} +" This global Dictionary tracks data for fixing code. Don't mess with it. +let g:ale_fix_buffer_data = {} + +" User Configuration + +" This option prevents ALE autocmd commands from being run for particular +" filetypes which can cause issues. +let g:ale_filetype_blacklist = [ +\ 'dirvish', +\ 'nerdtree', +\ 'qf', +\ 'tags', +\ 'unite', +\] + +" This Dictionary configures which linters are enabled for which languages. +let g:ale_linters = get(g:, 'ale_linters', {}) +" This option can be changed to only enable explicitly selected linters. +let g:ale_linters_explicit = get(g:, 'ale_linters_explicit', 0) + +" This Dictionary configures which functions will be used for fixing problems. +let g:ale_fixers = get(g:, 'ale_fixers', {}) + +" This Dictionary allows users to set up filetype aliases for new filetypes. +let g:ale_linter_aliases = get(g:, 'ale_linter_aliases', {}) + +" This flag can be set with a number of milliseconds for delaying the +" execution of a linter when text is changed. The timeout will be set and +" cleared each time text is changed, so repeated edits won't trigger the +" jobs for linting until enough time has passed after editing is done. +let g:ale_lint_delay = get(g:, 'ale_lint_delay', 200) + +" This flag can be set to 'never' to disable linting when text is changed. +" This flag can also be set to 'always' or 'insert' to lint when text is +" changed in both normal and insert mode, or only in insert mode respectively. +let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 'normal') + +" This flag can be set to 1 to enable linting when leaving insert mode. +let g:ale_lint_on_insert_leave = get(g:, 'ale_lint_on_insert_leave', 1) + +" This flag can be set to 0 to disable linting when the buffer is entered. +let g:ale_lint_on_enter = get(g:, 'ale_lint_on_enter', 1) + +" This flag can be set to 1 to enable linting when a buffer is written. +let g:ale_lint_on_save = get(g:, 'ale_lint_on_save', 1) + +" This flag can be set to 1 to enable linting when the filetype is changed. +let g:ale_lint_on_filetype_changed = get(g:, 'ale_lint_on_filetype_changed', 1) + +" If set to 1, hints and suggestion from LSP servers and tsserver will be shown. +let g:ale_lsp_suggestions = get(g:, 'ale_lsp_suggestions', 0) + +" This flag can be set to 1 to enable automatically fixing files on save. +let g:ale_fix_on_save = get(g:, 'ale_fix_on_save', 0) + +" This flag may be set to 0 to disable ale. After ale is loaded, :ALEToggle +" should be used instead. +let g:ale_enabled = get(g:, 'ale_enabled', 1) + +" A Dictionary mapping linter or fixer names to Arrays of two-item Arrays +" mapping filename paths from one system to another. +let g:ale_filename_mappings = get(g:, 'ale_filename_mappings', {}) + +" This Dictionary configures the default project roots for various linters. +let g:ale_root = get(g:, 'ale_root', {}) + +" These flags dictates if ale uses the quickfix or the loclist (loclist is the +" default, quickfix overrides loclist). +let g:ale_set_loclist = get(g:, 'ale_set_loclist', 1) +let g:ale_set_quickfix = get(g:, 'ale_set_quickfix', 0) + +" This flag can be set to 0 to disable setting signs. +" This is enabled by default only if the 'signs' feature exists. +let g:ale_set_signs = get(g:, 'ale_set_signs', has('signs')) + +" This flag can be set to 0 to disable setting error highlights. +let g:ale_set_highlights = get(g:, 'ale_set_highlights', has('syntax')) + +" This List can be configured to exclude particular highlights. +let g:ale_exclude_highlights = get(g:, 'ale_exclude_highlights', []) + +" This flag can be set to 0 to disable echoing when the cursor moves. +let g:ale_echo_cursor = get(g:, 'ale_echo_cursor', 1) + +" This flag can be set to 1 to automatically show errors in the preview window. +let g:ale_cursor_detail = get(g:, 'ale_cursor_detail', 0) + +" This flag can be changed to disable/enable virtual text. +let g:ale_virtualtext_cursor = get(g:, 'ale_virtualtext_cursor', (has('nvim-0.3.2') || has('patch-9.0.0297') && has('textprop') && has('popupwin')) ? 'all' : 'disabled') + +" This flag can be set to 1 to enable LSP hover messages at the cursor. +let g:ale_hover_cursor = get(g:, 'ale_hover_cursor', 1) + +" This flag can be set to 1 to automatically close the preview window upon +" entering Insert Mode. +let g:ale_close_preview_on_insert = get(g:, 'ale_close_preview_on_insert', 0) + +" This flag can be set to 0 to disable balloon support. +let g:ale_set_balloons = get(g:, 'ale_set_balloons', has('balloon_eval') && has('gui_running')) + +" Use preview window for hover messages. +let g:ale_hover_to_preview = get(g:, 'ale_hover_to_preview', 0) + +" Float preview windows in Neovim +let g:ale_floating_preview = get(g:, 'ale_floating_preview', 0) + +" Hovers use floating windows in Neovim +let g:ale_hover_to_floating_preview = get(g:, 'ale_hover_to_floating_preview', 0) + +" Detail uses floating windows in Neovim +let g:ale_detail_to_floating_preview = get(g:, 'ale_detail_to_floating_preview', 0) + +" Border setting for floating preview windows +" The elements in the list set the characters for the left, top, top-left, +" top-right, bottom-right, bottom-left, right, and bottom of the border +" respectively +let g:ale_floating_window_border = get(g:, 'ale_floating_window_border', ['|', '-', '+', '+', '+', '+', '|', '-']) + +" This flag can be set to 0 to disable warnings for trailing whitespace +let g:ale_warn_about_trailing_whitespace = get(g:, 'ale_warn_about_trailing_whitespace', 1) +" This flag can be set to 0 to disable warnings for trailing blank lines +let g:ale_warn_about_trailing_blank_lines = get(g:, 'ale_warn_about_trailing_blank_lines', 1) + +" A flag for enabling or disabling the command history. +let g:ale_history_enabled = get(g:, 'ale_history_enabled', 1) + +" A flag for storing the full output of commands in the history. +let g:ale_history_log_output = get(g:, 'ale_history_log_output', 1) + +" Enable automatic completion with LSP servers and tsserver +let g:ale_completion_enabled = get(g:, 'ale_completion_enabled', 0) + +" Enable automatic detection of pipenv for Python linters. +let g:ale_python_auto_pipenv = get(g:, 'ale_python_auto_pipenv', 0) + +" Enable automatic detection of poetry for Python linters. +let g:ale_python_auto_poetry = get(g:, 'ale_python_auto_poetry', 0) + +" This variable can be overridden to set the GO111MODULE environment variable. +let g:ale_go_go111module = get(g:, 'ale_go_go111module', '') + +" Default executable for deno, needed set before plugin start +let g:ale_deno_executable = get(g:, 'ale_deno_executable', 'deno') + +" If 1, enable a popup menu for commands. +let g:ale_popup_menu_enabled = get(g:, 'ale_popup_menu_enabled', has('gui_running')) + +if g:ale_set_balloons is 1 || g:ale_set_balloons is# 'hover' + call ale#balloon#Enable() +endif + +if g:ale_completion_enabled + call ale#completion#Enable() +endif + +if g:ale_popup_menu_enabled + call ale#code_action#EnablePopUpMenu() +endif + +" Define commands for moving through warnings and errors. +command! -bar -nargs=* ALEPrevious +\ :call ale#loclist_jumping#WrapJump('before', ) +command! -bar -nargs=* ALENext +\ :call ale#loclist_jumping#WrapJump('after', ) + +command! -bar ALEPreviousWrap :call ale#loclist_jumping#Jump('before', 1) +command! -bar ALENextWrap :call ale#loclist_jumping#Jump('after', 1) +command! -bar ALEFirst :call ale#loclist_jumping#JumpToIndex(0) +command! -bar ALELast :call ale#loclist_jumping#JumpToIndex(-1) + +" A command for showing error details. +command! -bar ALEDetail :call ale#cursor#ShowCursorDetail() + +" Define commands for turning ALE on or off. +command! -bar ALEToggle :call ale#toggle#Toggle() +command! -bar ALEEnable :call ale#toggle#Enable() +command! -bar ALEDisable :call ale#toggle#Disable() +command! -bar ALEReset :call ale#toggle#Reset() +" Commands for turning ALE on or off for a buffer. +command! -bar ALEToggleBuffer :call ale#toggle#ToggleBuffer(bufnr('')) +command! -bar ALEEnableBuffer :call ale#toggle#EnableBuffer(bufnr('')) +command! -bar ALEDisableBuffer :call ale#toggle#DisableBuffer(bufnr('')) +command! -bar ALEResetBuffer :call ale#toggle#ResetBuffer(bufnr('')) +" A command to stop all LSP-like clients, including tsserver. +command! -bar ALEStopAllLSPs :call ale#lsp#reset#StopAllLSPs() + +" A command for linting manually. +command! -bar ALELint :call ale#Queue(0, 'lint_file') +" Stop current jobs when linting. +command! -bar ALELintStop :call ale#engine#Stop(bufnr('')) + +" Commands to manually populate the quickfixes. +command! -bar ALEPopulateQuickfix :call ale#list#ForcePopulateErrorList(1) +command! -bar ALEPopulateLocList :call ale#list#ForcePopulateErrorList(0) + +" Define a command to get information about current filetype. +command! -bar ALEInfo :call ale#debugging#Info() +" The same, but copy output to your clipboard. +command! -bar ALEInfoToClipboard :call ale#debugging#InfoToClipboard() +" Copy ALE information to a file. +command! -bar -nargs=1 ALEInfoToFile :call ale#debugging#InfoToFile() + +" Fix problems in files. +command! -bar -bang -nargs=* -complete=customlist,ale#fix#registry#CompleteFixers ALEFix :call ale#fix#Fix(bufnr(''), '', ) +" Suggest registered functions to use for fixing problems. +command! -bar ALEFixSuggest :call ale#fix#registry#Suggest(&filetype) + +" Go to definition for tsserver and LSP +command! -bar -nargs=* ALEGoToDefinition :call ale#definition#GoToCommandHandler('', ) + +" Go to type definition for tsserver and LSP +command! -bar -nargs=* ALEGoToTypeDefinition :call ale#definition#GoToCommandHandler('type', ) + +" Go to implementation for tsserver and LSP +command! -bar -nargs=* ALEGoToImplementation :call ale#definition#GoToCommandHandler('implementation', ) + +" Repeat a previous selection in the preview window +command! -bar ALERepeatSelection :call ale#preview#RepeatSelection() + +" Find references for tsserver and LSP +command! -bar -nargs=* ALEFindReferences :call ale#references#Find() + +" Show summary information for the cursor. +command! -bar ALEHover :call ale#hover#ShowAtCursor() + +" Show documentation for the cursor. +command! -bar ALEDocumentation :call ale#hover#ShowDocumentationAtCursor() + +" Search for appearances of a symbol, such as a type name or function name. +command! -nargs=1 ALESymbolSearch :call ale#symbol#Search() + +" Complete text with tsserver and LSP +command! -bar ALEComplete :call ale#completion#GetCompletions('ale-manual') + +" Try to find completions for the current symbol that add additional text. +command! -bar ALEImport :call ale#completion#Import() + +" Rename symbols using tsserver and LSP +command! -bar -bang ALERename :call ale#rename#Execute() + +" Rename file using tsserver +command! -bar -bang ALEFileRename :call ale#filerename#Execute() + +" Apply code actions to a range. +command! -bar -range ALECodeAction :call ale#codefix#Execute() + +" Organize import statements using tsserver +command! -bar ALEOrganizeImports :call ale#organize_imports#Execute() + +" mappings for commands +nnoremap (ale_previous) :ALEPrevious +nnoremap (ale_previous_wrap) :ALEPreviousWrap +nnoremap (ale_previous_error) :ALEPrevious -error +nnoremap (ale_previous_wrap_error) :ALEPrevious -wrap -error +nnoremap (ale_previous_warning) :ALEPrevious -warning +nnoremap (ale_previous_wrap_warning) :ALEPrevious -wrap -warning +nnoremap (ale_next) :ALENext +nnoremap (ale_next_wrap) :ALENextWrap +nnoremap (ale_next_error) :ALENext -error +nnoremap (ale_next_wrap_error) :ALENext -wrap -error +nnoremap (ale_next_warning) :ALENext -warning +nnoremap (ale_next_wrap_warning) :ALENext -wrap -warning +nnoremap (ale_first) :ALEFirst +nnoremap (ale_last) :ALELast +nnoremap (ale_toggle) :ALEToggle +nnoremap (ale_enable) :ALEEnable +nnoremap (ale_disable) :ALEDisable +nnoremap (ale_reset) :ALEReset +nnoremap (ale_toggle_buffer) :ALEToggleBuffer +nnoremap (ale_enable_buffer) :ALEEnableBuffer +nnoremap (ale_disable_buffer) :ALEDisableBuffer +nnoremap (ale_reset_buffer) :ALEResetBuffer +nnoremap (ale_lint) :ALELint +nnoremap (ale_detail) :ALEDetail +nnoremap (ale_fix) :ALEFix +nnoremap (ale_go_to_definition) :ALEGoToDefinition +nnoremap (ale_go_to_definition_in_tab) :ALEGoToDefinition -tab +nnoremap (ale_go_to_definition_in_split) :ALEGoToDefinition -split +nnoremap (ale_go_to_definition_in_vsplit) :ALEGoToDefinition -vsplit +nnoremap (ale_go_to_type_definition) :ALEGoToTypeDefinition +nnoremap (ale_go_to_type_definition_in_tab) :ALEGoToTypeDefinition -tab +nnoremap (ale_go_to_type_definition_in_split) :ALEGoToTypeDefinition -split +nnoremap (ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinition -vsplit +nnoremap (ale_go_to_implementation) :ALEGoToImplementation +nnoremap (ale_go_to_implementation_in_tab) :ALEGoToImplementation -tab +nnoremap (ale_go_to_implementation_in_split) :ALEGoToImplementation -split +nnoremap (ale_go_to_implementation_in_vsplit) :ALEGoToImplementation -vsplit +nnoremap (ale_find_references) :ALEFindReferences +nnoremap (ale_hover) :ALEHover +nnoremap (ale_documentation) :ALEDocumentation +inoremap (ale_complete) :ALEComplete +nnoremap (ale_import) :ALEImport +nnoremap (ale_rename) :ALERename +nnoremap (ale_filerename) :ALEFileRename +nnoremap (ale_code_action) :ALECodeAction +nnoremap (ale_repeat_selection) :ALERepeatSelection + +" Set up autocmd groups now. +call ale#events#Init() + +" Housekeeping + +augroup ALECleanupGroup + autocmd! + " Clean up buffers automatically when they are unloaded. + autocmd BufDelete * if exists('*ale#engine#Cleanup') | call ale#engine#Cleanup(str2nr(expand(''))) | endif + autocmd QuitPre * call ale#events#QuitEvent(str2nr(expand(''))) + + if exists('##VimSuspend') + autocmd VimSuspend * if exists('*ale#engine#CleanupEveryBuffer') | call ale#engine#CleanupEveryBuffer() | endif + endif +augroup END diff --git a/dot_vim/plugged/ale/rplugin/python3/deoplete/sources/ale.py b/dot_vim/plugged/ale/rplugin/python3/deoplete/sources/ale.py new file mode 100644 index 0000000..a692dc3 --- /dev/null +++ b/dot_vim/plugged/ale/rplugin/python3/deoplete/sources/ale.py @@ -0,0 +1,62 @@ +""" +A Deoplete source for ALE completion via tsserver and LSP. +""" +__author__ = 'Joao Paulo, w0rp' + +try: + from deoplete.source.base import Base +except ImportError: + # Mock the Base class if deoplete isn't available, as mock isn't available + # in the Docker image. + class Base(object): + def __init__(self, vim): + pass + + +# Make sure this code is valid in Python 2, used for running unit tests. +class Source(Base): + + def __init__(self, vim): + super(Source, self).__init__(vim) + + self.name = 'ale' + self.mark = '[L]' + self.rank = 1000 + self.is_bytepos = True + self.min_pattern_length = 1 + self.is_volatile = True + # Do not forget to update s:trigger_character_map in completion.vim in + # updating entries in this map. + self.input_patterns = { + '_': r'\.\w*$', + 'rust': r'(\.|::)\w*$', + 'typescript': r'(\.|\'|")\w*$', + 'cpp': r'(\.|::|->)\w*$', + 'c': r'(\.|->)\w*$', + } + + # Returns an integer for the start position, as with omnifunc. + def get_complete_position(self, context): + return self.vim.call( + 'ale#completion#GetCompletionPositionForDeoplete', context['input'] + ) + + def gather_candidates(self, context): + # Stop early if ALE can't provide completion data for this buffer. + if not self.vim.call('ale#completion#CanProvideCompletions'): + return None + + event = context.get('event') + + if event == 'Async': + result = self.vim.call('ale#completion#GetCompletionResult') + + return result or [] + + if context.get('is_refresh'): + self.vim.command( + "call ale#completion#GetCompletions('ale-callback', " + + "{'callback': {completions -> deoplete#auto_complete() }})" + ) + + return [] diff --git a/dot_vim/plugged/ale/run-tests.bat b/dot_vim/plugged/ale/run-tests.bat new file mode 100644 index 0000000..9ba6b55 --- /dev/null +++ b/dot_vim/plugged/ale/run-tests.bat @@ -0,0 +1,30 @@ +@echo off +REM Run tests on Windows. +REM +REM To run these tests, you should set up your Windows machine with the same +REM paths that are used in AppVeyor. + +set tests=test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*/*.vader + +REM Use the first argument for selecting tests to run. +if not "%1"=="" set tests=%1 + +set VADER_OUTPUT_FILE=%~dp0\vader_output +REM Automatically re-run Windows tests, which can fail some times. +set tries=0 + +:RUN_TESTS +set /a tries=%tries%+1 +type nul > "%VADER_OUTPUT_FILE%" +C:\vim\vim\vim80\vim.exe -u test/vimrc "+Vader! %tests%" +set code=%ERRORLEVEL% + +IF %code% EQU 0 GOTO :SHOW_RESULTS +IF %tries% GEQ 2 GOTO :SHOW_RESULTS +GOTO :RUN_TESTS + +:SHOW_RESULTS +type "%VADER_OUTPUT_FILE%" +del "%VADER_OUTPUT_FILE%" + +exit /B %code% diff --git a/dot_vim/plugged/ale/supported-tools.md b/dot_vim/plugged/ale/supported-tools.md new file mode 100644 index 0000000..d6ea92b --- /dev/null +++ b/dot_vim/plugged/ale/supported-tools.md @@ -0,0 +1,707 @@ +# ALE Supported Languages and Tools + +This plugin supports the following languages and tools. All available +tools will be run in combination, so they can be complementary. + + + +**Legend** + +| Key | Definition | +| ------------- | ----------------------------------------------------------------- | +| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` | +| :warning: | Disabled by default | + +--- + +* Ada + * [ada_language_server](https://github.com/AdaCore/ada_language_server) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [gcc](https://gcc.gnu.org) + * [gnatpp](https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/gnat_utility_programs.html#the-gnat-pretty-printer-gnatpp) :floppy_disk: +* Ansible + * [ansible-language-server](https://github.com/ansible/ansible-language-server/) + * [ansible-lint](https://github.com/willthames/ansible-lint) :floppy_disk: +* API Blueprint + * [drafter](https://github.com/apiaryio/drafter) +* APKBUILD + * [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools) + * [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools) +* AsciiDoc + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [languagetool](https://languagetool.org/) :floppy_disk: + * [proselint](http://proselint.com/) + * [redpen](http://redpen.cc/) + * [textlint](https://textlint.github.io/) + * [vale](https://github.com/ValeLint/vale) + * [write-good](https://github.com/btford/write-good) +* ASM + * [gcc](https://gcc.gnu.org) +* AVRA + * [avra](https://github.com/Ro5bert/avra) +* Awk + * [gawk](https://www.gnu.org/software/gawk/) +* Bash + * [bashate](https://github.com/openstack/bashate) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [language-server](https://github.com/mads-hartmann/bash-language-server) + * shell [-n flag](https://www.gnu.org/software/bash/manual/bash.html#index-set) + * [shellcheck](https://www.shellcheck.net/) + * [shfmt](https://github.com/mvdan/sh) +* Bats + * [shellcheck](https://www.shellcheck.net/) +* Bazel + * [buildifier](https://github.com/bazelbuild/buildtools) +* BibTeX + * [bibclean](http://ftp.math.utah.edu/pub/bibclean/) +* Bicep + * [bicep](https://github.com/Azure/bicep) :floppy_disk: +* BitBake + * [oelint-adv](https://github.com/priv-kweihmann/oelint-adv) +* Bourne Shell + * shell [-n flag](http://linux.die.net/man/1/sh) + * [shellcheck](https://www.shellcheck.net/) + * [shfmt](https://github.com/mvdan/sh) +* C + * [astyle](http://astyle.sourceforge.net/) + * [ccls](https://github.com/MaskRay/ccls) + * [clang](http://clang.llvm.org/) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [clangd](https://clang.llvm.org/extra/clangd.html) + * [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk: + * [cppcheck](http://cppcheck.sourceforge.net) + * [cpplint](https://github.com/cpplint/cpplint) + * [cquery](https://github.com/cquery-project/cquery) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [flawfinder](https://www.dwheeler.com/flawfinder/) + * [gcc](https://gcc.gnu.org/) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* C# + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [csc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-csc` for details and configuration + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [dotnet-format](https://github.com/dotnet/format) + * [mcs](http://www.mono-project.com/docs/about-mono/languages/csharp/) see:`help ale-cs-mcs` for details + * [mcsc](http://www.mono-project.com/docs/about-mono/languages/csharp/) :floppy_disk: see:`help ale-cs-mcsc` for details and configuration + * [uncrustify](https://github.com/uncrustify/uncrustify) +* C++ (filetype cpp) + * [astyle](http://astyle.sourceforge.net/) + * [ccls](https://github.com/MaskRay/ccls) + * [clang](http://clang.llvm.org/) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk: + * [clangd](https://clang.llvm.org/extra/clangd.html) + * [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk: + * [clazy](https://github.com/KDE/clazy) :floppy_disk: + * [cppcheck](http://cppcheck.sourceforge.net) + * [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk: + * [cquery](https://github.com/cquery-project/cquery) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [flawfinder](https://www.dwheeler.com/flawfinder/) + * [gcc](https://gcc.gnu.org/) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* Cairo + * [starknet](https://starknet.io/docs) +* Chef + * [cookstyle](https://docs.chef.io/cookstyle.html) + * [foodcritic](http://www.foodcritic.io/) :floppy_disk: +* Clojure + * [clj-kondo](https://github.com/borkdude/clj-kondo) + * [joker](https://github.com/candid82/joker) +* CloudFormation + * [cfn-python-lint](https://github.com/awslabs/cfn-python-lint) +* CMake + * [cmake-format](https://github.com/cheshirekow/cmake_format) + * [cmake-lint](https://github.com/cheshirekow/cmake_format) + * [cmakelint](https://github.com/cmake-lint/cmake-lint) +* CoffeeScript + * [coffee](http://coffeescript.org/) + * [coffeelint](https://www.npmjs.com/package/coffeelint) +* Crystal + * [ameba](https://github.com/veelenga/ameba) :floppy_disk: + * [crystal](https://crystal-lang.org/) :floppy_disk: +* CSS + * [VSCode CSS language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [css-beautify](https://github.com/beautify-web/js-beautify) + * [csslint](http://csslint.net/) + * [fecs](http://fecs.baidu.com/) + * [prettier](https://github.com/prettier/prettier) + * [stylelint](https://github.com/stylelint/stylelint) +* Cucumber + * [cucumber](https://cucumber.io/) +* CUDA + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [clangd](https://clang.llvm.org/extra/clangd.html) + * [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk: +* Cypher + * [cypher-lint](https://github.com/cleishm/libcypher-parser) +* Cython (pyrex filetype) + * [cython](http://cython.org/) +* D + * [dfmt](https://github.com/dlang-community/dfmt) + * [dls](https://github.com/d-language-server/dls) + * [dmd](https://dlang.org/dmd-linux.html) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* Dafny + * [dafny](https://rise4fun.com/Dafny) :floppy_disk: +* Dart + * [analysis_server](https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server) + * [dart-analyze](https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli) :floppy_disk: + * [dart-format](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) + * [dartfmt](https://github.com/dart-lang/sdk/tree/master/utils/dartfmt) + * [language_server](https://github.com/natebosch/dart_language_server) +* desktop + * [desktop-file-validate](https://www.freedesktop.org/wiki/Software/desktop-file-utils/) +* Dhall + * [dhall-format](https://github.com/dhall-lang/dhall-lang) + * [dhall-freeze](https://github.com/dhall-lang/dhall-lang) + * [dhall-lint](https://github.com/dhall-lang/dhall-lang) +* Dockerfile + * [dockerfile_lint](https://github.com/projectatomic/dockerfile_lint) + * [dprint](https://dprint.dev) + * [hadolint](https://github.com/hadolint/hadolint) +* Elixir + * [credo](https://github.com/rrrene/credo) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: + * [dialyxir](https://github.com/jeremyjh/dialyxir) + * [dogma](https://github.com/lpil/dogma) :floppy_disk: + * [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning: + * [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk: +* Elm + * [elm-format](https://github.com/avh4/elm-format) + * [elm-ls](https://github.com/elm-tooling/elm-language-server) + * [elm-make](https://github.com/elm/compiler) +* Erb + * [erb](https://apidock.com/ruby/ERB) + * [erblint](https://github.com/Shopify/erb-lint) + * [erubi](https://github.com/jeremyevans/erubi) + * [erubis](https://github.com/kwatch/erubis) + * [ruumba](https://github.com/ericqweinstein/ruumba) +* Erlang + * [SyntaxErl](https://github.com/ten0s/syntaxerl) + * [dialyzer](http://erlang.org/doc/man/dialyzer.html) :floppy_disk: + * [elvis](https://github.com/inaka/elvis) :floppy_disk: + * [erlang_ls](https://github.com/erlang-ls/erlang_ls) + * [erlc](http://erlang.org/doc/man/erlc.html) + * [erlfmt](https://github.com/WhatsApp/erlfmt) +* Fish + * fish [-n flag](https://linux.die.net/man/1/fish) + * [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html) +* Fortran + * [gcc](https://gcc.gnu.org/) + * [language_server](https://github.com/hansec/fortran-language-server) +* Fountain + * [proselint](http://proselint.com/) +* FusionScript + * [fusion-lint](https://github.com/RyanSquared/fusionscript) +* Git Commit Messages + * [gitlint](https://github.com/jorisroovers/gitlint) +* GLSL + * [glslang](https://github.com/KhronosGroup/glslang) + * [glslls](https://github.com/svenstaro/glsl-language-server) +* Go + * [bingo](https://github.com/saibing/bingo) :warning: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: + * [go build](https://golang.org/cmd/go/) :warning: :floppy_disk: + * [go mod](https://golang.org/cmd/go/) :warning: :floppy_disk: + * [go vet](https://golang.org/cmd/vet/) :floppy_disk: + * [gofmt](https://golang.org/cmd/gofmt/) + * [gofumpt](https://github.com/mvdan/gofumpt) + * [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning: + * [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk: + * [golangserver](https://github.com/sourcegraph/go-langserver) :warning: + * [golines](https://github.com/segmentio/golines) + * [golint](https://godoc.org/github.com/golang/lint) + * [gometalinter](https://github.com/alecthomas/gometalinter) :warning: :floppy_disk: + * [gopls](https://github.com/golang/go/wiki/gopls) + * [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk: + * [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk: + * [revive](https://github.com/mgechev/revive) :warning: :floppy_disk: + * [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk: +* GraphQL + * [eslint](http://eslint.org/) + * [gqlint](https://github.com/happylinks/gqlint) + * [prettier](https://github.com/prettier/prettier) +* Hack + * [hack](http://hacklang.org/) + * [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt) + * [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`) +* Haml + * [haml-lint](https://github.com/brigade/haml-lint) +* Handlebars + * [ember-template-lint](https://github.com/rwjblue/ember-template-lint) +* Haskell + * [brittany](https://github.com/lspitzner/brittany) + * [cabal-ghc](https://www.haskell.org/cabal/) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [floskell](https://github.com/ennocramer/floskell) + * [ghc](https://www.haskell.org/ghc/) + * [ghc-mod](https://github.com/DanielG/ghc-mod) + * [hdevtools](https://hackage.haskell.org/package/hdevtools) + * [hfmt](https://github.com/danstiner/hfmt) + * [hie](https://github.com/haskell/haskell-ide-engine) + * [hindent](https://hackage.haskell.org/package/hindent) + * [hlint](https://hackage.haskell.org/package/hlint) + * [hls](https://github.com/haskell/haskell-language-server) + * [ormolu](https://github.com/tweag/ormolu) + * [stack-build](https://haskellstack.org/) :floppy_disk: + * [stack-ghc](https://haskellstack.org/) + * [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) +* HCL + * [packer-fmt](https://github.com/hashicorp/packer) + * [terraform-fmt](https://github.com/hashicorp/terraform) +* HTML + * [VSCode HTML language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [alex](https://github.com/get-alex/alex) + * [angular](https://www.npmjs.com/package/@angular/language-server) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [fecs](http://fecs.baidu.com/) + * [html-beautify](https://beautifier.io/) + * [htmlhint](http://htmlhint.com/) + * [prettier](https://github.com/prettier/prettier) + * [proselint](http://proselint.com/) + * [tidy](http://www.html-tidy.org/) + * [write-good](https://github.com/btford/write-good) +* Idris + * [idris](http://www.idris-lang.org/) +* Ink + * [ink-language-server](https://github.com/ephread/ink-language-server) +* Inko + * [inko](https://inko-lang.org/) :floppy_disk: +* ISPC + * [ispc](https://ispc.github.io/) :floppy_disk: +* Java + * [PMD](https://pmd.github.io/) + * [checkstyle](http://checkstyle.sourceforge.net) :floppy_disk: + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls) + * [google-java-format](https://github.com/google/google-java-format) + * [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html) + * [javalsp](https://github.com/georgewfraser/vscode-javac) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* JavaScript + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [deno](https://deno.land/) + * [dprint](https://dprint.dev/) + * [eslint](http://eslint.org/) + * [fecs](http://fecs.baidu.com/) + * [flow](https://flowtype.org/) + * [jscs](https://jscs-dev.github.io/) + * [jshint](http://jshint.com/) + * [prettier](https://github.com/prettier/prettier) + * [prettier-eslint](https://github.com/prettier/prettier-eslint-cli) + * [prettier-standard](https://github.com/sheerun/prettier-standard) + * [standard](http://standardjs.com/) + * [tsserver](https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29) + * [xo](https://github.com/sindresorhus/xo) +* JSON + * [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning: + * [dprint](https://dprint.dev) + * [eslint](http://eslint.org/) :warning: + * [fixjson](https://github.com/rhysd/fixjson) + * [jq](https://stedolan.github.io/jq/) :warning: + * [jsonlint](https://github.com/zaach/jsonlint) + * [prettier](https://github.com/prettier/prettier) + * [spectral](https://github.com/stoplightio/spectral) +* JSON5 + * [eslint](http://eslint.org/) :warning: +* JSONC + * [eslint](http://eslint.org/) :warning: +* Jsonnet + * [jsonnet-lint](https://jsonnet.org/learning/tools.html) + * [jsonnetfmt](https://jsonnet.org/learning/tools.html) +* Julia + * [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl) +* Kotlin + * [kotlinc](https://kotlinlang.org) :floppy_disk: + * [ktlint](https://ktlint.github.io) + * [languageserver](https://github.com/fwcd/KotlinLanguageServer) see `:help ale-integration-kotlin` for configuration instructions +* LaTeX + * [alex](https://github.com/get-alex/alex) + * [chktex](http://www.nongnu.org/chktex/) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [lacheck](https://www.ctan.org/pkg/lacheck) + * [proselint](http://proselint.com/) + * [redpen](http://redpen.cc/) + * [texlab](https://texlab.netlify.com) + * [textlint](https://textlint.github.io/) + * [vale](https://github.com/ValeLint/vale) + * [write-good](https://github.com/btford/write-good) +* Less + * [lessc](https://www.npmjs.com/package/less) + * [prettier](https://github.com/prettier/prettier) + * [stylelint](https://github.com/stylelint/stylelint) +* LLVM + * [llc](https://llvm.org/docs/CommandGuide/llc.html) +* Lua + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [lua-format](https://github.com/Koihik/LuaFormatter) + * [luac](https://www.lua.org/manual/5.1/luac.html) + * [luacheck](https://github.com/mpeterv/luacheck) + * [luafmt](https://github.com/trixnz/lua-fmt) + * [selene](https://github.com/Kampfkarren/selene) + * [stylua](https://github.com/johnnymorganz/stylua) +* Mail + * [alex](https://github.com/get-alex/alex) + * [languagetool](https://languagetool.org/) :floppy_disk: + * [proselint](http://proselint.com/) + * [vale](https://github.com/ValeLint/vale) +* Make + * [checkmake](https://github.com/mrtazz/checkmake) +* Markdown + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [languagetool](https://languagetool.org/) :floppy_disk: + * [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk: + * [mdl](https://github.com/mivok/markdownlint) + * [pandoc](https://pandoc.org) + * [prettier](https://github.com/prettier/prettier) + * [proselint](http://proselint.com/) + * [redpen](http://redpen.cc/) + * [remark-lint](https://github.com/wooorm/remark-lint) + * [textlint](https://textlint.github.io/) + * [vale](https://github.com/ValeLint/vale) + * [write-good](https://github.com/btford/write-good) +* MATLAB + * [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) +* Mercury + * [mmc](http://mercurylang.org) :floppy_disk: +* NASM + * [nasm](https://www.nasm.us/) :floppy_disk: +* Nim + * [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk: + * [nimlsp](https://github.com/PMunch/nimlsp) + * nimpretty +* nix + * [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate) + * [nixfmt](https://github.com/serokell/nixfmt) + * [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt) + * [rnix-lsp](https://github.com/nix-community/rnix-lsp) + * [statix](https://github.com/nerdypepper/statix) +* nroff + * [alex](https://github.com/get-alex/alex) + * [proselint](http://proselint.com/) + * [write-good](https://github.com/btford/write-good) +* Objective-C + * [ccls](https://github.com/MaskRay/ccls) + * [clang](http://clang.llvm.org/) + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [clangd](https://clang.llvm.org/extra/clangd.html) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* Objective-C++ + * [clang](http://clang.llvm.org/) + * [clangd](https://clang.llvm.org/extra/clangd.html) + * [uncrustify](https://github.com/uncrustify/uncrustify) +* OCaml + * [dune](https://dune.build/) + * [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions + * [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) + * [ocamllsp](https://github.com/ocaml/ocaml-lsp) + * [ocp-indent](https://github.com/OCamlPro/ocp-indent) + * [ols](https://github.com/freebroccolo/ocaml-language-server) +* OpenApi + * [ibm_validator](https://github.com/IBM/openapi-validator) + * [prettier](https://github.com/prettier/prettier) + * [yamllint](https://yamllint.readthedocs.io/) +* OpenSCAD + * [SCA2D](https://gitlab.com/bath_open_instrumentation_group/sca2d) :floppy_disk: +* Packer (HCL) + * [packer-fmt-fixer](https://github.com/hashicorp/packer) +* Pascal + * [ptop](https://www.freepascal.org/tools/ptop.var) +* Pawn + * [uncrustify](https://github.com/uncrustify/uncrustify) +* Perl + * [perl -c](https://perl.org/) :warning: + * [perl-critic](https://metacpan.org/pod/Perl::Critic) + * [perltidy](https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy) +* Perl6 + * [perl6 -c](https://perl6.org) :warning: +* PHP + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [intelephense](https://github.com/bmewburn/intelephense-docs) + * [langserver](https://github.com/felixfbecker/php-language-server) + * [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions + * [php -l](https://secure.php.net/) + * [php-cs-fixer](https://cs.symfony.com) + * [phpactor](https://github.com/phpactor/phpactor) + * [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer) + * [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) + * [phpmd](https://phpmd.org) + * [phpstan](https://github.com/phpstan/phpstan) + * [pint](https://github.com/laravel/pint) :beer: + * [psalm](https://getpsalm.org) :floppy_disk: + * [tlint](https://github.com/tightenco/tlint) +* PO + * [alex](https://github.com/get-alex/alex) + * [msgfmt](https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html) + * [proselint](http://proselint.com/) + * [write-good](https://github.com/btford/write-good) +* Pod + * [alex](https://github.com/get-alex/alex) + * [proselint](http://proselint.com/) + * [write-good](https://github.com/btford/write-good) +* Pony + * [ponyc](https://github.com/ponylang/ponyc) +* PowerShell + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [powershell](https://github.com/PowerShell/PowerShell) + * [psscriptanalyzer](https://github.com/PowerShell/PSScriptAnalyzer) +* Prolog + * [swipl](https://github.com/SWI-Prolog/swipl-devel) +* proto + * [buf-format](https://github.com/bufbuild/buf) :floppy_disk: + * [buf-lint](https://github.com/bufbuild/buf) :floppy_disk: + * [clang-format](https://clang.llvm.org/docs/ClangFormat.html) + * [protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint) :floppy_disk: + * [protolint](https://github.com/yoheimuta/protolint) :floppy_disk: +* Pug + * [pug-lint](https://github.com/pugjs/pug-lint) +* Puppet + * [languageserver](https://github.com/lingua-pupuli/puppet-editor-services) + * [puppet](https://puppet.com) + * [puppet-lint](https://puppet-lint.com) +* PureScript + * [purescript-language-server](https://github.com/nwolverson/purescript-language-server) + * [purs-tidy](https://github.com/natefaubion/purescript-tidy) + * [purty](https://gitlab.com/joneshf/purty) +* Python + * [autoflake](https://github.com/myint/autoflake) :floppy_disk: + * [autoimport](https://lyz-code.github.io/autoimport/) + * [autopep8](https://github.com/hhatto/autopep8) + * [bandit](https://github.com/PyCQA/bandit) :warning: + * [black](https://github.com/psf/black) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [flake8](http://flake8.pycqa.org/en/latest/) + * [flakehell](https://github.com/flakehell/flakehell) + * [isort](https://github.com/timothycrosley/isort) + * [mypy](http://mypy-lang.org/) + * [prospector](https://github.com/PyCQA/prospector) :warning: :floppy_disk: + * [pycodestyle](https://github.com/PyCQA/pycodestyle) :warning: + * [pydocstyle](https://www.pydocstyle.org/) :warning: + * [pyflakes](https://github.com/PyCQA/pyflakes) + * [pyflyby](https://github.com/deshaw/pyflyby) :warning: + * [pylama](https://github.com/klen/pylama) :floppy_disk: + * [pylint](https://www.pylint.org/) :floppy_disk: + * [pylsp](https://github.com/python-lsp/python-lsp-server) :warning: + * [pyre](https://github.com/facebook/pyre-check) :warning: + * [pyright](https://github.com/microsoft/pyright) + * [refurb](https://github.com/dosisod/refurb) :floppy_disk: + * [reorder-python-imports](https://github.com/asottile/reorder_python_imports) + * [ruff](https://github.com/charliermarsh/ruff) + * [unimport](https://github.com/hakancelik96/unimport) + * [vulture](https://github.com/jendrikseipp/vulture) :warning: :floppy_disk: + * [yapf](https://github.com/google/yapf) +* QML + * [qmlfmt](https://github.com/jesperhh/qmlfmt) + * [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint) +* R + * [languageserver](https://github.com/REditorSupport/languageserver) + * [lintr](https://github.com/jimhester/lintr) + * [styler](https://github.com/r-lib/styler) +* Racket + * [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master) + * [raco](https://docs.racket-lang.org/raco/) + * [raco_fmt](https://docs.racket-lang.org/fmt/) +* Re:VIEW + * [redpen](http://redpen.cc/) +* ReasonML + * [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions + * [ols](https://github.com/freebroccolo/ocaml-language-server) + * [reason-language-server](https://github.com/jaredly/reason-language-server) + * [refmt](https://github.com/reasonml/reason-cli) +* Rego + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [opacheck](https://www.openpolicyagent.org/docs/latest/cli/#opa-check) + * [opafmt](https://www.openpolicyagent.org/docs/latest/cli/#opa-fmt) +* reStructuredText + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [proselint](http://proselint.com/) + * [redpen](http://redpen.cc/) + * [rstcheck](https://github.com/myint/rstcheck) + * [textlint](https://textlint.github.io/) + * [vale](https://github.com/ValeLint/vale) + * [write-good](https://github.com/btford/write-good) +* Robot + * [rflint](https://github.com/boakley/robotframework-lint) +* RPM spec + * [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`) +* Ruby + * [brakeman](http://brakemanscanner.org/) :floppy_disk: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [debride](https://github.com/seattlerb/debride) + * [prettier](https://github.com/prettier/plugin-ruby) + * [rails_best_practices](https://github.com/flyerhzm/rails_best_practices) :floppy_disk: + * [reek](https://github.com/troessner/reek) + * [rubocop](https://github.com/bbatsov/rubocop) + * [ruby](https://www.ruby-lang.org) + * [rufo](https://github.com/ruby-formatter/rufo) + * [solargraph](https://solargraph.org) + * [sorbet](https://github.com/sorbet/sorbet) + * [standardrb](https://github.com/testdouble/standard) + * [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) +* Rust + * [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [rls](https://github.com/rust-lang-nursery/rls) :warning: + * [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) :warning: + * [rustc](https://www.rust-lang.org/) :warning: + * [rustfmt](https://github.com/rust-lang-nursery/rustfmt) +* Salt + * [salt-lint](https://github.com/warpnet/salt-lint) +* Sass + * [sass-lint](https://www.npmjs.com/package/sass-lint) + * [stylelint](https://github.com/stylelint/stylelint) +* Scala + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html) + * [metals](https://scalameta.org/metals/) + * [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html) + * [scalac](http://scala-lang.org) + * [scalafmt](https://scalameta.org/scalafmt/) + * [scalastyle](http://www.scalastyle.org) +* SCSS + * [prettier](https://github.com/prettier/prettier) + * [sass-lint](https://www.npmjs.com/package/sass-lint) + * [scss-lint](https://github.com/brigade/scss-lint) + * [stylelint](https://github.com/stylelint/stylelint) +* Slim + * [slim-lint](https://github.com/sds/slim-lint) +* SML + * [smlnj](http://www.smlnj.org/) +* Solidity + * [solc](https://solidity.readthedocs.io/) + * [solhint](https://github.com/protofire/solhint) + * [solium](https://github.com/duaraghav8/Solium) +* SQL + * [dprint](https://dprint.dev) + * [pgformatter](https://github.com/darold/pgFormatter) + * [sql-lint](https://github.com/joereynolds/sql-lint) + * [sqlfluff](https://github.com/sqlfluff/sqlfluff) + * [sqlfmt](https://github.com/jackc/sqlfmt) + * [sqlformat](https://github.com/andialbrecht/sqlparse) + * [sqlint](https://github.com/purcell/sqlint) +* Stylus + * [stylelint](https://github.com/stylelint/stylelint) +* SugarSS + * [stylelint](https://github.com/stylelint/stylelint) +* Svelte + * [prettier](https://github.com/prettier/prettier) + * [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) +* Swift + * [Apple swift-format](https://github.com/apple/swift-format) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) + * [swiftformat](https://github.com/nicklockwood/SwiftFormat) + * [swiftlint](https://github.com/realm/SwiftLint) +* systemd + * [systemd-analyze](https://www.freedesktop.org/software/systemd/man/systemd-analyze.html) :floppy_disk: +* Tcl + * [nagelfar](http://nagelfar.sourceforge.net) :floppy_disk: +* Terraform + * [checkov](https://github.com/bridgecrewio/checkov) + * [terraform](https://github.com/hashicorp/terraform) + * [terraform-fmt-fixer](https://github.com/hashicorp/terraform) + * [terraform-ls](https://github.com/hashicorp/terraform-ls) + * [terraform-lsp](https://github.com/juliosueiras/terraform-lsp) + * [tflint](https://github.com/wata727/tflint) + * [tfsec](https://github.com/aquasecurity/tfsec) +* Texinfo + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [proselint](http://proselint.com/) + * [write-good](https://github.com/btford/write-good) +* Text + * [alex](https://github.com/get-alex/alex) :warning: + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [languagetool](https://languagetool.org/) :floppy_disk: + * [proselint](http://proselint.com/) :warning: + * [redpen](http://redpen.cc/) :warning: + * [textlint](https://textlint.github.io/) :warning: + * [vale](https://github.com/ValeLint/vale) :warning: + * [write-good](https://github.com/btford/write-good) :warning: +* Thrift + * [thrift](http://thrift.apache.org/) + * [thriftcheck](https://github.com/pinterest/thriftcheck) +* TOML + * [dprint](https://dprint.dev) +* TypeScript + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [deno](https://deno.land/) + * [dprint](https://dprint.dev/) + * [eslint](http://eslint.org/) + * [fecs](http://fecs.baidu.com/) + * [prettier](https://github.com/prettier/prettier) + * [standard](http://standardjs.com/) + * [tslint](https://github.com/palantir/tslint) + * [tsserver](https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29) + * typecheck +* V + * [v](https://github.com/vlang/v/) :floppy_disk: + * [vfmt](https://github.com/vlang/v/) +* VALA + * [uncrustify](https://github.com/uncrustify/uncrustify) + * [vala_lint](https://github.com/vala-lang/vala-lint) :floppy_disk: +* Verilog + * [hdl-checker](https://pypi.org/project/hdl-checker) + * [iverilog](https://github.com/steveicarus/iverilog) + * [verilator](http://www.veripool.org/projects/verilator/wiki/Intro) + * [vlog](https://www.mentor.com/products/fv/questa/) + * [xvlog](https://www.xilinx.com/products/design-tools/vivado.html) + * [yosys](http://www.clifford.at/yosys/) :floppy_disk: +* VHDL + * [ghdl](https://github.com/ghdl/ghdl) + * [vcom](https://www.mentor.com/products/fv/questa/) + * [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html) +* Vim + * [vimls](https://github.com/iamcco/vim-language-server) + * [vint](https://github.com/Kuniwak/vint) +* Vim help + * [alex](https://github.com/get-alex/alex) :warning: + * [proselint](http://proselint.com/) :warning: + * [write-good](https://github.com/btford/write-good) :warning: +* Vue + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [prettier](https://github.com/prettier/prettier) + * [vls](https://github.com/vuejs/vetur/tree/master/server) + * [volar](https://github.com/johnsoncodehk/volar) +* WGSL + * [naga](https://github.com/gfx-rs/naga) +* XHTML + * [alex](https://github.com/get-alex/alex) + * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) + * [proselint](http://proselint.com/) + * [write-good](https://github.com/btford/write-good) +* XML + * [xmllint](http://xmlsoft.org/xmllint.html) +* YAML + * [actionlint](https://github.com/rhysd/actionlint) :warning: + * [circleci](https://circleci.com/docs/2.0/local-cli) :floppy_disk: :warning: + * [gitlablint](https://github.com/elijah-roberts/gitlab-lint) + * [prettier](https://github.com/prettier/prettier) + * [spectral](https://github.com/stoplightio/spectral) + * [swaglint](https://github.com/byCedric/swaglint) :warning: + * [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) + * [yamlfix](https://lyz-code.github.io/yamlfix) + * [yamllint](https://yamllint.readthedocs.io/) +* YANG + * [yang-lsp](https://github.com/theia-ide/yang-lsp) +* Zeek + * [zeek](http://zeek.org) :floppy_disk: +* Zig + * [zigfmt](https://github.com/ziglang/zig) + * [zls](https://github.com/zigtools/zls) diff --git a/dot_vim/plugged/ale/syntax/ale-fix-suggest.vim b/dot_vim/plugged/ale/syntax/ale-fix-suggest.vim new file mode 100644 index 0000000..b112f5b --- /dev/null +++ b/dot_vim/plugged/ale/syntax/ale-fix-suggest.vim @@ -0,0 +1,13 @@ +if exists('b:current_syntax') + finish +endif + +syn match aleFixerComment /^.*$/ +syn match aleFixerName /\(^\|, \)'[^']*'/ +syn match aleFixerHelp /^See :help ale-fix-configuration/ + +hi def link aleFixerComment Comment +hi def link aleFixerName String +hi def link aleFixerHelp Statement + +let b:current_syntax = 'ale-fix-suggest' diff --git a/dot_vim/plugged/ale/syntax/ale-preview-selection.vim b/dot_vim/plugged/ale/syntax/ale-preview-selection.vim new file mode 100644 index 0000000..879ba09 --- /dev/null +++ b/dot_vim/plugged/ale/syntax/ale-preview-selection.vim @@ -0,0 +1,11 @@ +if exists('b:current_syntax') + finish +endif + +syn match alePreviewSelectionFilename /\v^([a-zA-Z]?:?[^:]+)/ +syn match alPreviewNumber /\v:\d+:\d+$/ + +hi def link alePreviewSelectionFilename String +hi def link alePreviewNumber Number + +let b:current_syntax = 'ale-preview-selection' diff --git a/dot_vim/plugged/ale/test/completion/test_ale_import_command.vader b/dot_vim/plugged/ale/test/completion/test_ale_import_command.vader new file mode 100644 index 0000000..4770466 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_ale_import_command.vader @@ -0,0 +1,562 @@ +Before: + Save g:ale_enabled + Save b:ale_enabled + Save g:ale_lint_on_text_changed + Save g:ale_completion_enabled + Save g:ale_completion_autoimport + Save g:ale_completion_max_suggestions + Save g:ale_linters + Save b:ale_linters + + let g:ale_enabled = 0 + let b:ale_enabled = 0 + let g:ale_lint_on_text_changed = 'always' + let g:ale_completion_enabled = 0 + let g:ale_completion_autoimport = 0 + let g:ale_completion_max_suggestions = 50 + let g:ale_linters = {'typescript': ['tsserver'], 'python': ['pyre']} + unlet! b:ale_linters + + let g:server_started_value = 1 + let g:request_id = 0 + let g:LastCallback = v:null + let g:LastHandleCallback = v:null + let g:sent_message_list = [] + let g:code_action_list = [] + let g:execute_list = [] + let g:ale_queue_call_list = [] + + runtime autoload/ale.vim + runtime autoload/ale/util.vim + runtime autoload/ale/code_action.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + + function! ale#util#Execute(expr) abort + call add(g:execute_list, a:expr) + endfunction + + function! ale#Queue(...) abort + call add(g:ale_queue_call_list, a:000) + endfunction + + function! ale#lsp#RegisterCallback(id, Callback) abort + let g:LastHandleCallback = a:Callback + endfunction + + function! ale#lsp#NotifyForChanges(id, buffer) abort + endfunction + + function! ale#lsp#HasCapability(id, capability) abort + return 1 + endfunction + + function! ale#lsp#Send(id, message) abort + let g:request_id += 1 + + call add(g:sent_message_list, a:message) + + return g:request_id + endfunction + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:LastCallback = a:Callback + + return g:server_started_value + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + Assert !get(a:options, 'should_save') + + call add(g:code_action_list, a:code_action) + endfunction + + function GetLastMessage() + return get(g:execute_list, -1, '') + endfunction + + function CheckLintStates(conn_id, message) + " Check that we request more linter results after adding completions. + AssertEqual [[0, '']], g:ale_queue_call_list + + let g:ale_enabled = 0 + + let g:ale_queue_call_list = [] + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [], g:ale_queue_call_list + + let g:ale_enabled = 1 + let g:ale_lint_on_text_changed = 1 + + let g:ale_queue_call_list = [] + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [[0, '']], g:ale_queue_call_list + + let g:ale_lint_on_text_changed = 'normal' + + let g:ale_queue_call_list = [] + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [[0, '']], g:ale_queue_call_list + + let g:ale_lint_on_text_changed = 'insert' + + let g:ale_queue_call_list = [] + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [[0, '']], g:ale_queue_call_list + + let g:ale_queue_call_list = [] + let g:ale_lint_on_text_changed = 'never' + + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [], g:ale_queue_call_list + + let g:ale_lint_on_text_changed = '0' + + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [], g:ale_queue_call_list + + let g:ale_lint_on_text_changed = 0 + + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [], g:ale_queue_call_list + + let g:ale_lint_on_text_changed = 'xxx' + + call g:LastHandleCallback(a:conn_id, a:message) + AssertEqual [], g:ale_queue_call_list + endfunction + +After: + call ale#linter#Reset() + + Restore + + delfunction GetLastMessage + delfunction CheckLintStates + + unlet! g:LastCallback + unlet! g:LastHandleCallback + unlet! g:request_id + unlet! g:server_started_value + unlet! g:sent_message_list + unlet! g:code_action_list + unlet! g:ale_queue_call_list + unlet! g:execute_list + unlet! g:received_message + unlet! b:ale_old_omnifunc + unlet! b:ale_old_completeopt + unlet! b:ale_completion_info + unlet! b:ale_completion_result + unlet! b:ale_complete_done_time + + runtime autoload/ale.vim + runtime autoload/ale/util.vim + runtime autoload/ale/code_action.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + +Given typescript(Some example TypeScript code): + let xyz = 123 + let foo = missingword + + let abc = 456 + +Execute(ALEImport should complain when there's no word at the cursor): + call setpos('.', [bufnr(''), 3, 1, 0]) + ALEImport + + AssertEqual 'echom ''Nothing to complete at cursor!''', GetLastMessage() + +Execute(ALEImport should tell the user if no LSP is available): + let g:server_started_value = 0 + + call setpos('.', [bufnr(''), 2, 16, 0]) + ALEImport + + AssertEqual + \ 'echom ''No completion providers are available.''', + \ GetLastMessage() + +Execute(ALEImport should request imports correctly for tsserver): + call setpos('.', [bufnr(''), 2, 16, 0]) + + ALEImport + + AssertEqual + \ { + \ 'conn_id': 0, + \ 'request_id': 0, + \ 'source': 'ale-import', + \ 'column': 21, + \ 'line': 2, + \ 'line_length': 21, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastCallback isnot v:null + + call g:LastCallback(ale#linter#Get(&filetype)[0], { + \ 'connection_id': 347, + \ 'buffer': bufnr(''), + \}) + + AssertEqual + \ { + \ 'conn_id': 347, + \ 'request_id': 1, + \ 'source': 'ale-import', + \ 'column': 21, + \ 'line': 2, + \ 'line_length': 21, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastHandleCallback isnot v:null + + call g:LastHandleCallback(347, { + \ 'request_seq': 1, + \ 'command': 'completions', + \ 'body': [ + \ {'name': 'missingwordIgnoreMe'}, + \ {'name': 'missingword'}, + \ ], + \}) + + AssertEqual + \ [ + \ [0, 'ts@completions', { + \ 'file': expand('%:p'), + \ 'includeExternalModuleExports': 1, + \ 'offset': 21, + \ 'line': 2, + \ 'prefix': 'missingword', + \ }], + \ [0, 'ts@completionEntryDetails', { + \ 'file': expand('%:p'), + \ 'entryNames': [{'name': 'missingword'}], + \ 'offset': 21, + \ 'line': 2, + \ }] + \ ], + \ g:sent_message_list + AssertEqual 2, b:ale_completion_info.request_id + + let g:ale_enabled = 1 + let g:received_message = { + \ 'request_seq': 2, + \ 'command': 'completionEntryDetails', + \ 'body': [ + \ { + \ 'name': 'missingword', + \ 'kind': 'className', + \ 'displayParts': [], + \ 'codeActions': [{ + \ 'description': 'import { missingword } from "./Something";', + \ 'changes': [], + \ }], + \ }, + \ ], + \} + call g:LastHandleCallback(347, g:received_message) + + AssertEqual + \ [ + \ { + \ 'description': 'import { missingword } from "./Something";', + \ 'changes': [], + \ }, + \ ], + \ g:code_action_list + + call CheckLintStates(347, g:received_message) + +Execute(ALEImport should tell the user when no completions were found from tsserver): + call setpos('.', [bufnr(''), 2, 16, 0]) + + ALEImport + + AssertEqual + \ { + \ 'conn_id': 0, + \ 'request_id': 0, + \ 'source': 'ale-import', + \ 'column': 21, + \ 'line': 2, + \ 'line_length': 21, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastCallback isnot v:null + + call g:LastCallback(ale#linter#Get(&filetype)[0], { + \ 'connection_id': 347, + \ 'buffer': bufnr(''), + \}) + + AssertEqual + \ { + \ 'conn_id': 347, + \ 'request_id': 1, + \ 'source': 'ale-import', + \ 'column': 21, + \ 'line': 2, + \ 'line_length': 21, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastHandleCallback isnot v:null + + call g:LastHandleCallback(347, { + \ 'request_seq': 1, + \ 'command': 'completions', + \ 'body': [ + \ {'name': 'missingwordIgnoreMe'}, + \ ], + \}) + + AssertEqual 'echom ''No possible imports found.''', GetLastMessage() + +Given python(Some example Python code): + xyz = 123 + foo = missingword + + abc = 456 + +Execute(ALEImport should request imports correctly for language servers): + call setpos('.', [bufnr(''), 2, 12, 0]) + + ALEImport + + AssertEqual + \ { + \ 'conn_id': 0, + \ 'request_id': 0, + \ 'source': 'ale-import', + \ 'column': 17, + \ 'line': 2, + \ 'line_length': 17, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastCallback isnot v:null + + call g:LastCallback(ale#linter#Get(&filetype)[0], { + \ 'connection_id': 347, + \ 'buffer': bufnr(''), + \}) + + AssertEqual + \ { + \ 'conn_id': 347, + \ 'request_id': 1, + \ 'source': 'ale-import', + \ 'column': 17, + \ 'line': 2, + \ 'line_length': 17, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', + \ }, + \ b:ale_completion_info + Assert g:LastHandleCallback isnot v:null + + AssertEqual + \ [ + \ [0, 'textDocument/completion', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'character': 16, 'line': 1} + \ }], + \ ], + \ g:sent_message_list + AssertEqual 1, b:ale_completion_info.request_id + + let g:ale_enabled = 1 + let g:received_message = { + \ 'id': 1, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'Some other word we should ignore', + \ 'filterText': 'missingwordIgnoreMe', + \ 'insertText': 'missingwordIgnoreMe', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingwordIgnoreMe', + \ 'sortText': '3ee19999missingword', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': {'line': 1, 'character': 1}, + \ 'end': {'line': 2, 'character': 1}, + \ }, + \ 'newText': 'from something import missingwordIgnoreMe', + \ }, + \ ], + \ }, + \ { + \ 'detail': 'Some word without text edits', + \ 'filterText': 'missingword', + \ 'insertText': 'missingword', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingword', + \ 'sortText': '3ee19999missingword', + \ }, + \ { + \ 'detail': 'The word we should use', + \ 'filterText': 'missingword', + \ 'insertText': 'missingword', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingword', + \ 'sortText': '3ee19999missingword', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': {'line': 1, 'character': 1}, + \ 'end': {'line': 2, 'character': 1}, + \ }, + \ 'newText': 'from something import missingword', + \ }, + \ ], + \ }, + \ { + \ 'detail': 'The other word we should not use', + \ 'filterText': 'missingword', + \ 'insertText': 'missingword', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingword', + \ 'sortText': '3ee19999missingword', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': {'line': 1, 'character': 1}, + \ 'end': {'line': 2, 'character': 1}, + \ }, + \ 'newText': 'from something_else import missingword', + \ }, + \ ], + \ }, + \ ], + \ }, + \} + call g:LastHandleCallback(347, g:received_message) + + AssertEqual + \ [ + \ { + \ 'description': 'completion', + \ 'changes': [ + \ { + \ 'fileName': expand('%:p'), + \ 'textChanges': [ + \ { + \ 'start': {'line': 2, 'offset': 2}, + \ 'end': {'line': 3, 'offset': 2}, + \ 'newText': 'from something import missingword', + \ }, + \ ], + \ }, + \ ], + \ }, + \ ], + \ g:code_action_list + + call CheckLintStates(347, g:received_message) + +Execute(ALEImport should tell the user when no completions were found from a language server): + call setpos('.', [bufnr(''), 2, 12, 0]) + + ALEImport + + AssertEqual + \ { + \ 'conn_id': 0, + \ 'request_id': 0, + \ 'source': 'ale-import', + \ 'column': 17, + \ 'line': 2, + \ 'line_length': 17, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ }, + \ b:ale_completion_info + Assert g:LastCallback isnot v:null + + call g:LastCallback(ale#linter#Get(&filetype)[0], { + \ 'connection_id': 347, + \ 'buffer': bufnr(''), + \}) + + AssertEqual + \ { + \ 'conn_id': 347, + \ 'request_id': 1, + \ 'source': 'ale-import', + \ 'column': 17, + \ 'line': 2, + \ 'line_length': 17, + \ 'prefix': 'missingword', + \ 'additional_edits_only': 1, + \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', + \ }, + \ b:ale_completion_info + Assert g:LastHandleCallback isnot v:null + + AssertEqual + \ [ + \ [0, 'textDocument/completion', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'character': 16, 'line': 1} + \ }], + \ ], + \ g:sent_message_list + AssertEqual 1, b:ale_completion_info.request_id + + let g:received_message = { + \ 'id': 1, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'Some other word we should ignore', + \ 'filterText': 'missingwordIgnoreMe', + \ 'insertText': 'missingwordIgnoreMe', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingwordIgnoreMe', + \ 'sortText': '3ee19999missingword', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': {'line': 1, 'character': 1}, + \ 'end': {'line': 2, 'character': 1}, + \ }, + \ 'newText': 'from something import missingwordIgnoreMe', + \ }, + \ ], + \ }, + \ { + \ 'detail': 'Some word without text edits', + \ 'filterText': 'missingword', + \ 'insertText': 'missingword', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' missingword', + \ 'sortText': '3ee19999missingword', + \ }, + \ ], + \ }, + \} + call g:LastHandleCallback(347, g:received_message) + + AssertEqual 'echom ''No possible imports found.''', GetLastMessage() diff --git a/dot_vim/plugged/ale/test/completion/test_complete_events.vader b/dot_vim/plugged/ale/test/completion/test_complete_events.vader new file mode 100644 index 0000000..cee1598 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_complete_events.vader @@ -0,0 +1,35 @@ +Before: + let g:complete_post_triggered = 0 + + augroup VaderTest + autocmd! + autocmd User ALECompletePost let g:complete_post_triggered = 1 + augroup END + +After: + unlet! b:ale_completion_info + unlet! g:complete_post_triggered + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + +Execute(ALECompletePost should not be triggered when completion is cancelled): + call ale#completion#HandleUserData({}) + + Assert !g:complete_post_triggered + +Execute(ALECompletePost should not be triggered when tools other than ALE insert completions): + call ale#completion#HandleUserData({'user_data': ''}) + call ale#completion#HandleUserData({'user_data': '{}'}) + + Assert !g:complete_post_triggered + +Execute(ALECompletePost should be triggered when ALE inserts completions): + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \}) + + Assert g:complete_post_triggered diff --git a/dot_vim/plugged/ale/test/completion/test_completion_events.vader b/dot_vim/plugged/ale/test/completion/test_completion_events.vader new file mode 100644 index 0000000..ed6dbea --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_completion_events.vader @@ -0,0 +1,486 @@ +Before: + Save g:ale_completion_enabled + Save g:ale_completion_delay + Save g:ale_completion_max_suggestions + Save &l:omnifunc + Save &l:completeopt + + unlet! b:ale_completion_enabled + let g:ale_completion_enabled = 1 + let g:get_completions_called = 0 + let g:feedkeys_calls = [] + let g:fake_mode = 'i' + + let b:ale_linters = { + \ 'typescript': ['tsserver'], + \} + + let &l:completeopt = 'menu,menuone,preview,noselect,noinsert' + + runtime autoload/ale/util.vim + + function! ale#util#FeedKeys(string) abort + call add(g:feedkeys_calls, [a:string]) + endfunction + + " Pretend we're in insert mode for most tests. + function! ale#util#Mode(...) abort + return g:fake_mode + endfunction + + function! CheckCompletionCalled(expect_success) abort + let g:get_completions_called = 0 + + " We just want to check if the function is called. + function! ale#completion#GetCompletions(source) + let g:get_completions_called = 1 + endfunction + + let g:ale_completion_delay = 0 + + " Run this check a few times, as it can fail randomly. + for l:i in range(has('nvim-0.3') || has('win32') ? 5 : 1) + call ale#completion#Queue() + sleep 1m + + if g:get_completions_called is a:expect_success + break + endif + endfor + + AssertEqual a:expect_success, g:get_completions_called + endfunction + + let g:handle_code_action_called = 0 + function! MockHandleCodeAction() abort + " delfunction! ale#code_action#HandleCodeAction + function! ale#code_action#HandleCodeAction(action, options) abort + Assert !get(a:options, 'should_save') + let g:handle_code_action_called += 1 + endfunction + endfunction + +After: + Restore + + unlet! b:ale_completion_enabled + unlet! g:output + unlet! g:fake_mode + unlet! g:get_completions_called + unlet! g:handle_code_action_called + unlet! b:ale_old_omnifunc + unlet! b:ale_old_completeopt + unlet! b:ale_completion_info + unlet! b:ale_completion_result + unlet! b:ale_complete_done_time + unlet! b:ale_linters + + delfunction CheckCompletionCalled + delfunction ale#code_action#HandleCodeAction + delfunction MockHandleCodeAction + + if exists('*CompleteCallback') + delfunction CompleteCallback + endif + + " Stop any timers we left behind. + " This stops the tests from failing randomly. + call ale#completion#StopTimer() + + " Reset the function. The runtime command below should fix this, but doesn't + " seem to fix it. + function! ale#util#Mode(...) abort + return call('mode', a:000) + endfunction + + runtime autoload/ale/completion.vim + runtime autoload/ale/code_action.vim + runtime autoload/ale/util.vim + +Execute(ale#completion#GetCompletions should be called when the cursor position stays the same): + call CheckCompletionCalled(1) + +Execute(ale#completion#GetCompletions should not be called if the global setting is disabled): + let g:ale_completion_enabled = 0 + call CheckCompletionCalled(0) + +Execute(ale#completion#GetCompletions should not be called if the buffer setting is disabled): + let b:ale_completion_enabled = 0 + call CheckCompletionCalled(0) + +Given typescript(): + let abc = y. + let foo = ab + let foo = (ab) + +Execute(ale#completion#GetCompletions should not be called when the cursor position changes): + call setpos('.', [bufnr(''), 1, 2, 0]) + + " We just want to check if the function is called. + function! ale#completion#GetCompletions(source) + let g:get_completions_called = 1 + endfunction + + let g:ale_completion_delay = 0 + call ale#completion#Queue() + + " Change the cursor position before the callback is triggered. + call setpos('.', [bufnr(''), 2, 2, 0]) + + sleep 1m + + Assert !g:get_completions_called + +Execute(ale#completion#GetCompletions should not be called if you switch to normal mode): + let &l:completeopt = 'menu,preview' + let g:fake_mode = 'n' + + " We just want to check if the function is called. + function! ale#completion#GetCompletions(source) + let g:get_completions_called = 1 + endfunction + + let g:ale_completion_delay = 0 + call ale#completion#Queue() + + sleep 1m + + Assert !g:get_completions_called + +Execute(Completion should not be done shortly after the CompleteDone function): + call CheckCompletionCalled(1) + call ale#completion#Done() + call CheckCompletionCalled(0) + +Execute(ale#completion#Show() should remember the omnifunc setting and replace it): + let &l:omnifunc = 'FooBar' + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual 'FooBar', b:ale_old_omnifunc + AssertEqual 'ale#completion#AutomaticOmniFunc', &l:omnifunc + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#Show() should remember the completeopt setting and replace it): + let &l:completeopt = 'menu' + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual 'menu', b:ale_old_completeopt + AssertEqual 'menu,menuone,noinsert', &l:completeopt + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#Show() should set the preview option if it's set): + let &l:completeopt = 'menu,preview' + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual 'menu,preview', b:ale_old_completeopt + AssertEqual 'menu,menuone,noinsert,preview', &l:completeopt + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#Show() should not replace the completeopt setting for manual completion): + let b:ale_completion_info = {'source': 'ale-manual'} + + let &l:completeopt = 'menu,preview' + + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + Assert !exists('b:ale_old_completeopt') + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#AutomaticOmniFunc() should also remember the completeopt setting and replace it): + let &l:completeopt = 'menu,noselect' + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#AutomaticOmniFunc(0, '') + + AssertEqual 'menu,noselect', b:ale_old_completeopt + AssertEqual 'menu,menuone,noinsert,noselect', &l:completeopt + +Execute(ale#completion#AutomaticOmniFunc() should set the preview option if it's set): + let &l:completeopt = 'menu,preview' + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#AutomaticOmniFunc(0, '') + + AssertEqual 'menu,preview', b:ale_old_completeopt + AssertEqual 'menu,menuone,noinsert,preview', &l:completeopt + +Execute(ale#completion#Show() should make the correct feedkeys() call for automatic completion): + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#Show() should make the correct feedkeys() call for manual completion): + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual [], g:feedkeys_calls + sleep 1ms + AssertEqual [["\(ale_show_completion_menu)"]], g:feedkeys_calls + +Execute(ale#completion#Show() should not call feedkeys() for other sources): + let b:ale_completion_info = {'source': 'other-source'} + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + sleep 1ms + AssertEqual [], g:feedkeys_calls + +Execute(ale#completion#Show() shouldn't do anything if you switch back to normal mode): + let &l:completeopt = 'menu,preview' + let g:fake_mode = 'n' + + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual 'menu,preview', &l:completeopt + Assert !exists('b:ale_old_omnifunc') + Assert !exists('b:ale_old_completeopt') + Assert !exists('b:ale_completion_result') + AssertEqual [], g:feedkeys_calls + +Execute(ale#completion#Show() should save the result it is given): + call ale#completion#Show([]) + + AssertEqual [], b:ale_completion_result + + call ale#completion#Show([{'word': 'x', 'kind': 'v', 'icase': 1}]) + + AssertEqual [{'word': 'x', 'kind': 'v', 'icase': 1}], b:ale_completion_result + +Execute(ale#completion#Done() should restore old omnifunc values): + let b:ale_old_omnifunc = 'FooBar' + + call ale#completion#Done() + + " We reset the old omnifunc setting and remove the buffer variable. + AssertEqual 'FooBar', &l:omnifunc + Assert !has_key(b:, 'ale_old_omnifunc') + +Execute(ale#completion#Done() should restore the old completeopt setting): + let b:ale_old_completeopt = 'menu' + + call ale#completion#Done() + + AssertEqual 'menu', &l:completeopt + Assert !has_key(b:, 'ale_old_completeopt') + +Execute(ale#completion#Done() should leave settings alone when none were remembered): + let &l:omnifunc = 'BazBoz' + let &l:completeopt = 'menu' + + call ale#completion#Done() + + AssertEqual 'BazBoz', &l:omnifunc + AssertEqual 'menu', &l:completeopt + +Execute(The completion request_id should be reset when queuing again): + let b:ale_completion_info = {'request_id': 123} + + let g:ale_completion_delay = 0 + call ale#completion#Queue() + sleep 1m + + AssertEqual 0, b:ale_completion_info.request_id + +Execute(b:ale_completion_info should be set up correctly when requesting completions automatically): + let b:ale_completion_result = [] + call setpos('.', [bufnr(''), 3, 14, 0]) + call ale#completion#GetCompletions('ale-automatic') + + AssertEqual + \ { + \ 'request_id': 0, + \ 'conn_id': 0, + \ 'column': 14, + \ 'line_length': 14, + \ 'line': 3, + \ 'prefix': 'ab', + \ 'source': 'ale-automatic', + \ }, + \ b:ale_completion_info + Assert !exists('b:ale_completion_result') + +Execute(b:ale_completion_info should be set up correctly when requesting completions manually): + let b:ale_completion_result = [] + call setpos('.', [bufnr(''), 3, 14, 0]) + ALEComplete + + AssertEqual + \ { + \ 'request_id': 0, + \ 'conn_id': 0, + \ 'column': 14, + \ 'line_length': 14, + \ 'line': 3, + \ 'prefix': 'ab', + \ 'source': 'ale-manual', + \ }, + \ b:ale_completion_info + Assert !exists('b:ale_completion_result') + +Execute(b:ale_completion_info should be set up correctly for other sources): + let b:ale_completion_result = [] + call setpos('.', [bufnr(''), 3, 14, 0]) + call ale#completion#GetCompletions('ale-callback') + + AssertEqual + \ { + \ 'request_id': 0, + \ 'conn_id': 0, + \ 'column': 14, + \ 'line_length': 14, + \ 'line': 3, + \ 'prefix': 'ab', + \ 'source': 'ale-callback', + \ }, + \ b:ale_completion_info + Assert !exists('b:ale_completion_result') + +Execute(b:ale_completion_info should be set up correctly when requesting completions via callback): + let b:ale_completion_result = [] + call setpos('.', [bufnr(''), 3, 14, 0]) + + function! CompleteCallback() abort + echo 'Called' + endfunction + + + call ale#completion#GetCompletions('ale-callback', {'callback': funcref('CompleteCallback')}) + + AssertEqual + \ { + \ 'request_id': 0, + \ 'conn_id': 0, + \ 'column': 14, + \ 'line_length': 14, + \ 'line': 3, + \ 'prefix': 'ab', + \ 'source': 'ale-callback', + \ }, + \ b:ale_completion_info + Assert !exists('b:ale_completion_result') + +Execute(The correct keybinds should be configured): + redir => g:output + silent map (ale_show_completion_menu) + redir END + + AssertEqual + \ [ + \ 'n (ale_show_completion_menu) * :call ale#completion#RestoreCompletionOptions()', + \ 'o (ale_show_completion_menu) * ', + \ 'v (ale_show_completion_menu) * ', + \ ], + \ sort(split(g:output, "\n")) + +Execute(Running the normal mode keybind should reset the settings): + let b:ale_old_omnifunc = 'FooBar' + let b:ale_old_completeopt = 'menu' + + " We can't run the keybind, but we can call the function. + call ale#completion#RestoreCompletionOptions() + + AssertEqual 'FooBar', &l:omnifunc + AssertEqual 'menu', &l:completeopt + Assert !has_key(b:, 'ale_old_omnifunc') + Assert !has_key(b:, 'ale_old_completeopt') + +Execute(HandleUserData should call ale#code_action#HandleCodeAction): + let b:ale_completion_info = {'source': 'ale-manual'} + call MockHandleCodeAction() + + call ale#completion#HandleUserData({}) + AssertEqual g:handle_code_action_called, 0 + + call ale#completion#HandleUserData({ + \ 'user_data': '' + \}) + AssertEqual g:handle_code_action_called, 0 + + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({}), + \}) + AssertEqual g:handle_code_action_called, 0 + + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [], + \ }), + \}) + AssertEqual g:handle_code_action_called, 0 + + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ {'description': '', 'changes': []}, + \ ], + \ }), + \}) + AssertEqual g:handle_code_action_called, 1 + + let b:ale_completion_info = {'source': 'ale-automatic'} + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ {'description': '', 'changes': []}, + \ ], + \ }), + \}) + AssertEqual g:handle_code_action_called, 2 + + let b:ale_completion_info = {'source': 'ale-callback'} + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ {'description': '', 'changes': []}, + \ ], + \ }), + \}) + AssertEqual g:handle_code_action_called, 3 + + let b:ale_completion_info = {'source': 'ale-omnifunc'} + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ {'description': '', 'changes': []}, + \ ], + \ }), + \}) + AssertEqual g:handle_code_action_called, 4 + +Execute(ale#code_action#HandleCodeAction should not be called when when source is not ALE): + call MockHandleCodeAction() + let b:ale_completion_info = {'source': 'syntastic'} + call ale#completion#HandleUserData({ + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ {'description': '', 'changes': []}, + \ ], + \ }), + \}) + AssertEqual g:handle_code_action_called, 0 diff --git a/dot_vim/plugged/ale/test/completion/test_completion_filtering.vader b/dot_vim/plugged/ale/test/completion/test_completion_filtering.vader new file mode 100644 index 0000000..172203a --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_completion_filtering.vader @@ -0,0 +1,142 @@ +Before: + Save g:ale_completion_excluded_words + + let g:ale_completion_excluded_words = [] + +After: + Restore + + unlet! b:ale_completion_excluded_words + unlet! b:suggestions + +Execute(Prefix filtering should work for Lists of strings): + AssertEqual + \ ['FooBar', 'foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'baz', 'foo'], 'foo', 0) + AssertEqual + \ ['FooBar', 'FongBar', 'baz', 'foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'baz', 'foo'], '.', 0) + AssertEqual + \ ['FooBar', 'FongBar', 'baz', 'foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'baz', 'foo'], '', 0) + +Execute(Exact filtering should work): + AssertEqual + \ ['foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'baz', 'foo'], 'foo', 1) + AssertEqual + \ ['FooBar', 'FongBar', 'baz', 'foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'baz', 'foo'], '.', 1) + AssertEqual + \ ['Foo'], + \ ale#completion#Filter(bufnr(''), '', ['FooBar', 'FongBar', 'Foo', 'foo'], 'Foo', 1) + +Execute(Prefix filtering should work for completion items): + AssertEqual + \ [{'word': 'FooBar'}, {'word': 'foo'}], + \ ale#completion#Filter( + \ bufnr(''), + \ '', + \ [ + \ {'word': 'FooBar'}, + \ {'word': 'FongBar'}, + \ {'word': 'baz'}, + \ {'word': 'foo'}, + \ ], + \ 'foo', + \ 0, + \ ) + + AssertEqual + \ [ + \ {'word': 'FooBar'}, + \ {'word': 'FongBar'}, + \ {'word': 'baz'}, + \ {'word': 'foo'}, + \ ], + \ ale#completion#Filter( + \ bufnr(''), + \ '', + \ [ + \ {'word': 'FooBar'}, + \ {'word': 'FongBar'}, + \ {'word': 'baz'}, + \ {'word': 'foo'}, + \ ], + \ '.', + \ 0, + \ ) + +Execute(Excluding words from completion results should work): + let b:ale_completion_excluded_words = ['it', 'describe'] + + AssertEqual + \ [{'word': 'Italian'}], + \ ale#completion#Filter( + \ bufnr(''), + \ '', + \ [ + \ {'word': 'Italian'}, + \ {'word': 'it'}, + \ ], + \ 'it', + \ 0, + \ ) + + AssertEqual + \ [{'word': 'Deutsch'}], + \ ale#completion#Filter( + \ bufnr(''), + \ '', + \ [ + \ {'word': 'describe'}, + \ {'word': 'Deutsch'}, + \ ], + \ 'de', + \ 0, + \ ) + + AssertEqual + \ [{'word': 'Deutsch'}], + \ ale#completion#Filter( + \ bufnr(''), + \ '', + \ [ + \ {'word': 'describe'}, + \ {'word': 'Deutsch'}, + \ ], + \ '.', + \ 0, + \ ) + +Execute(Excluding words from completion results should work with lists of Strings): + let b:ale_completion_excluded_words = ['it', 'describe'] + + AssertEqual + \ ['Italian'], + \ ale#completion#Filter(bufnr(''), '', ['Italian', 'it'], 'it', 0) + AssertEqual + \ ['Deutsch'], + \ ale#completion#Filter(bufnr(''), '', ['describe', 'Deutsch'], 'de', 0) + AssertEqual + \ ['Deutsch'], + \ ale#completion#Filter(bufnr(''), '', ['describe', 'Deutsch'], '.', 0) + AssertEqual + \ ['Deutsch'], + \ ale#completion#Filter(bufnr(''), '', ['Deutsch'], '', 0) + +Execute(Filtering shouldn't modify the original list): + let b:ale_completion_excluded_words = ['it', 'describe'] + let b:suggestions = [{'word': 'describe'}] + + AssertEqual [], ale#completion#Filter(bufnr(''), '', b:suggestions, '.', 0) + AssertEqual b:suggestions, [{'word': 'describe'}] + AssertEqual [], ale#completion#Filter(bufnr(''), '', b:suggestions, 'de', 0) + AssertEqual b:suggestions, [{'word': 'describe'}] + +Execute(Filtering should respect filetype triggers): + let b:suggestions = [{'word': 'describe'}] + + AssertEqual b:suggestions, ale#completion#Filter(bufnr(''), '', b:suggestions, '.', 0) + AssertEqual b:suggestions, ale#completion#Filter(bufnr(''), 'rust', b:suggestions, '.', 0) + AssertEqual b:suggestions, ale#completion#Filter(bufnr(''), 'rust', b:suggestions, '::', 0) diff --git a/dot_vim/plugged/ale/test/completion/test_completion_prefixes.vader b/dot_vim/plugged/ale/test/completion/test_completion_prefixes.vader new file mode 100644 index 0000000..3f2cab1 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_completion_prefixes.vader @@ -0,0 +1,65 @@ +Given typescript(): + let abc = y. + let foo = ab + let foo = (ab) + let string1 = ' + let string2 = " + +Execute(Completion should be done after dots in TypeScript): + AssertEqual '.', ale#completion#GetPrefix(&filetype, 1, 13) + +Execute(Completion should be done after words in TypeScript): + AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 2, 13) + +Execute(Completion should be done after words in parens in TypeScript): + AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 3, 14) + +Execute(Completion should not be done after parens in TypeScript): + AssertEqual '', ale#completion#GetPrefix(&filetype, 3, 15) + +Execute(Completion should be done after strings in TypeScript): + AssertEqual '''', ale#completion#GetPrefix(&filetype, 4, 16) + AssertEqual '"', ale#completion#GetPrefix(&filetype, 5, 16) + +Execute(Completion prefixes should work for other filetypes): + AssertEqual 'ab', ale#completion#GetPrefix('xxxyyyzzz', 3, 14) + +Execute(Completion prefixes should work for other filetypes): + AssertEqual 'ab', ale#completion#GetPrefix('xxxyyyzzz', 3, 14) + +Given rust(): + let abc = y. + let abc = String:: + let foo = (ab) + +Execute(Completion should be done after dots in Rust): + AssertEqual '.', ale#completion#GetPrefix(&filetype, 1, 13) + +Execute(Completion should be done after colons in Rust): + AssertEqual '::', ale#completion#GetPrefix(&filetype, 2, 19) + +Execute(Completion should be done after words in parens in Rust): + AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 3, 14) + +Execute(Completion should not be done after parens in Rust): + AssertEqual '', ale#completion#GetPrefix(&filetype, 3, 15) + +Given lisp(): + (minus-name + (full-name) + +Execute(Completion should be done for function names with minuses in Lisp): + AssertEqual 'minus-name', ale#completion#GetPrefix(&filetype, 1, 12) + +Execute(Completion should not be done after parens in Lisp): + AssertEqual '', ale#completion#GetPrefix(&filetype, 2, 12) + +Given clojure(): + (minus-name + (full-name) + +Execute(Completion should be done for function names with minuses in Clojure): + AssertEqual 'minus-name', ale#completion#GetPrefix(&filetype, 1, 12) + +Execute(Completion should not be done after parens in Clojure): + AssertEqual '', ale#completion#GetPrefix(&filetype, 2, 12) diff --git a/dot_vim/plugged/ale/test/completion/test_lsp_completion_messages.vader b/dot_vim/plugged/ale/test/completion/test_lsp_completion_messages.vader new file mode 100644 index 0000000..f6aa332 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_lsp_completion_messages.vader @@ -0,0 +1,307 @@ +Before: + Save g:ale_completion_delay + Save g:ale_completion_max_suggestions + Save g:ale_completion_info + Save &l:omnifunc + Save &l:completeopt + + let g:ale_completion_enabled = 1 + + call ale#test#SetDirectory('/testplugin/test/completion') + call ale#test#SetFilename('dummy.txt') + + runtime autoload/ale/lsp.vim + + let g:message_list = [] + let g:capability_checked = '' + let g:conn_id = v:null + let g:Callback = '' + let g:init_callback_list = [] + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + call add(g:init_callback_list, {-> a:Callback(a:linter, l:details)}) + endfunction + + " Pretend we're in insert mode for most tests. + function! ale#util#Mode(...) abort + return 'i' + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + " Replace the Send function for LSP, so we can monitor calls to it. + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 1 + endfunction + +After: + Restore + + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + unlet! g:message_list + unlet! g:capability_checked + unlet! g:init_callback_list + unlet! g:conn_id + unlet! g:Callback + unlet! b:ale_old_omnifunc + unlet! b:ale_old_completeopt + unlet! b:ale_completion_info + unlet! b:ale_complete_done_time + unlet! b:ale_linters + unlet! b:ale_tsserver_completion_names + + " Reset the function. + function! ale#util#Mode(...) abort + return call('mode', a:000) + endfunction + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + " Stop any timers we left behind. + " This stops the tests from failing randomly. + call ale#completion#StopTimer() + + runtime autoload/ale/completion.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(The right message should be sent for the initial tsserver request): + runtime ale_linters/typescript/tsserver.vim + let b:ale_linters = ['tsserver'] + " The cursor position needs to match what was saved before. + call setpos('.', [bufnr(''), 1, 3, 0]) + + call ale#completion#GetCompletions('ale-automatic') + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual 1, len(g:init_callback_list) + call map(g:init_callback_list, 'v:val()') + + AssertEqual 'completion', g:capability_checked + + " We should send the right callback. + AssertEqual + \ 'function(''ale#completion#HandleTSServerResponse'')', + \ string(g:Callback) + " We should send the right message. + AssertEqual + \ [[0, 'ts@completions', { + \ 'file': expand('%:p'), + \ 'line': 1, + \ 'offset': 3, + \ 'prefix': 'fo', + \ 'includeExternalModuleExports': g:ale_completion_autoimport, + \ }]], + \ g:message_list + " We should set up the completion info correctly. + AssertEqual + \ { + \ 'line_length': 3, + \ 'conn_id': g:conn_id, + \ 'column': 3, + \ 'request_id': 1, + \ 'line': 1, + \ 'prefix': 'fo', + \ 'source': 'ale-automatic', + \ }, + \ get(b:, 'ale_completion_info', {}) + +Execute(The right message sent to the tsserver LSP when the first completion message is received): + " The cursor position needs to match what was saved before. + call setpos('.', [bufnr(''), 1, 1, 0]) + let b:ale_completion_info = { + \ 'conn_id': 123, + \ 'prefix': 'f', + \ 'request_id': 4, + \ 'line': 1, + \ 'column': 1, + \} + " We should only show up to this many suggestions. + let g:ale_completion_max_suggestions = 3 + + " Handle the response for completions. + call ale#completion#HandleTSServerResponse(123, { + \ 'request_seq': 4, + \ 'command': 'completions', + \ 'body': [ + \ {'name': 'Baz'}, + \ {'name': 'dingDong'}, + \ {'name': 'Foo', 'source': '/path/to/foo.ts'}, + \ {'name': 'FooBar'}, + \ {'name': 'frazzle'}, + \ {'name': 'FFS'}, + \ ], + \}) + + " We should save the names we got in the buffer, as TSServer doesn't return + " details for every name. + AssertEqual [{ + \ 'word': 'Foo', + \ 'source': '/path/to/foo.ts', + \ }, { + \ 'word': 'FooBar', + \ 'source': '', + \ }, { + \ 'word': 'frazzle', + \ 'source': '', + \}], + \ get(b:, 'ale_tsserver_completion_names', []) + + " The entry details messages should have been sent. + AssertEqual + \ [[ + \ 0, + \ 'ts@completionEntryDetails', + \ { + \ 'file': expand('%:p'), + \ 'entryNames': [{ + \ 'name': 'Foo', + \ 'source': '/path/to/foo.ts', + \ }, { + \ 'name': 'FooBar', + \ }, { + \ 'name': 'frazzle', + \ }], + \ 'offset': 1, + \ 'line': 1, + \ }, + \ ]], + \ g:message_list + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(The right message should be sent for the initial LSP request): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + " The cursor position needs to match what was saved before. + call setpos('.', [bufnr(''), 1, 5, 0]) + + call ale#completion#GetCompletions('ale-automatic') + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual 1, len(g:init_callback_list) + call map(g:init_callback_list, 'v:val()') + + AssertEqual 'completion', g:capability_checked + + " We should send the right callback. + AssertEqual + \ 'function(''ale#completion#HandleLSPResponse'')', + \ string(g:Callback) + " We should send the right message. + " The character index needs to be at most the index of the last character on + " the line, or integration with pylsp will be broken. + " + " We need to send the message for changing the document first. + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/completion', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + " We should set up the completion info correctly. + AssertEqual + \ { + \ 'line_length': 3, + \ 'conn_id': g:conn_id, + \ 'column': 3, + \ 'request_id': 1, + \ 'line': 1, + \ 'prefix': 'fo', + \ 'source': 'ale-automatic', + \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', + \ }, + \ get(b:, 'ale_completion_info', {}) + +Execute(Two completion requests shouldn't be sent in a row): + call ale#linter#PreventLoading('python') + call ale#linter#Define('python', { + \ 'name': 'foo', + \ 'lsp': 'stdio', + \ 'executable': 'foo', + \ 'command': 'foo', + \ 'project_root': {-> '/foo/bar'}, + \}) + call ale#linter#Define('python', { + \ 'name': 'bar', + \ 'lsp': 'stdio', + \ 'executable': 'foo', + \ 'command': 'foo', + \ 'project_root': {-> '/foo/bar'}, + \}) + let b:ale_linters = ['foo', 'bar'] + + " The cursor position needs to match what was saved before. + call setpos('.', [bufnr(''), 1, 5, 0]) + + call ale#completion#GetCompletions('ale-automatic') + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual 2, len(g:init_callback_list) + call map(g:init_callback_list, 'v:val()') + + AssertEqual 'completion', g:capability_checked + + " We should only send one completion message for two LSP servers. + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/completion', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list diff --git a/dot_vim/plugged/ale/test/completion/test_lsp_completion_parsing.vader b/dot_vim/plugged/ale/test/completion/test_lsp_completion_parsing.vader new file mode 100644 index 0000000..7fe22e0 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_lsp_completion_parsing.vader @@ -0,0 +1,736 @@ +Before: + Save g:ale_completion_autoimport + Save g:ale_completion_max_suggestions + + let g:ale_completion_max_suggestions = 50 + +After: + Restore + + unlet! b:ale_completion_info + +Execute(Should handle Rust completion results correctly): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'new', 'dup': 0, 'menu': 'pub fn new() -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'with_capacity', 'dup': 0, 'menu': 'pub fn with_capacity(capacity: usize) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_utf8', 'dup': 0, 'menu': 'pub fn from_utf8(vec: Vec) -> Result', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_utf8_lossy', 'dup': 0, 'menu': 'pub fn from_utf8_lossy<''a>(v: &''a [u8]) -> Cow<''a, str>', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_utf16', 'dup': 0, 'menu': 'pub fn from_utf16(v: &[u16]) -> Result', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_utf16_lossy', 'dup': 0, 'menu': 'pub fn from_utf16_lossy(v: &[u16]) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_raw_parts', 'dup': 0, 'menu': 'pub unsafe fn from_raw_parts(buf: *mut u8, length: usize, capacity: usize) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_utf8_unchecked', 'dup': 0, 'menu': 'pub unsafe fn from_utf8_unchecked(bytes: Vec) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_iter', 'dup': 0, 'menu': 'fn from_iter>(iter: I) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_iter', 'dup': 0, 'menu': 'fn from_iter>(iter: I) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_iter', 'dup': 0, 'menu': 'fn from_iter>(iter: I) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_iter', 'dup': 0, 'menu': 'fn from_iter>(iter: I) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_iter', 'dup': 0, 'menu': 'fn from_iter>>(iter: I) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Searcher', 'dup': 0, 'menu': 'type Searcher = <&''b str as Pattern<''a>>::Searcher;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'default', 'dup': 0, 'menu': 'fn default() -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = String;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Output', 'dup': 0, 'menu': 'type Output = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Target', 'dup': 0, 'menu': 'type Target = str;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'Err', 'dup': 0, 'menu': 'type Err = ParseError;', 'info': '', 'kind': 't', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from_str', 'dup': 0, 'menu': 'fn from_str(s: &str) -> Result', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from', 'dup': 0, 'menu': 'fn from(s: &''a str) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from', 'dup': 0, 'menu': 'fn from(s: Box) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'from', 'dup': 0, 'menu': 'fn from(s: Cow<''a, str>) -> String', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'to_vec', 'dup': 0, 'menu': 'pub fn to_vec(&self) -> Vec where T: Clone,', 'info': '', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \], + \ ale#completion#ParseLSPCompletions({ + \ "jsonrpc":"2.0", + \ "id":65, + \ "result":[ + \ { + \ "label":"new", + \ "kind":3, + \ "detail":"pub fn new() -> String" + \ }, + \ { + \ "label":"with_capacity", + \ "kind":3, + \ "detail":"pub fn with_capacity(capacity: usize) -> String" + \ }, + \ { + \ "label":"from_utf8", + \ "kind":3, + \ "detail":"pub fn from_utf8(vec: Vec) -> Result" + \ }, + \ { + \ "label":"from_utf8_lossy", + \ "kind":3, + \ "detail":"pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> Cow<'a, str>" + \ }, + \ { + \ "label":"from_utf16", + \ "kind":3, + \ "detail":"pub fn from_utf16(v: &[u16]) -> Result" + \ }, + \ { + \ "label":"from_utf16_lossy", + \ "kind":3, + \ "detail":"pub fn from_utf16_lossy(v: &[u16]) -> String" + \ }, + \ { + \ "label":"from_raw_parts", + \ "kind":3, + \ "detail":"pub unsafe fn from_raw_parts(buf: *mut u8, length: usize, capacity: usize) -> String" + \ }, + \ { + \ "label":"from_utf8_unchecked", + \ "kind":3, + \ "detail":"pub unsafe fn from_utf8_unchecked(bytes: Vec) -> String" + \ }, + \ { + \ "label":"from_iter", + \ "kind":3, + \ "detail":"fn from_iter>(iter: I) -> String" + \ }, + \ { + \ "label":"from_iter", + \ "kind":3, + \ "detail":"fn from_iter>(iter: I) -> String" + \ }, + \ { + \ "label":"from_iter", + \ "kind":3, + \ "detail":"fn from_iter>(iter: I) -> String" + \ }, + \ { + \ "label":"from_iter", + \ "kind":3, + \ "detail":"fn from_iter>(iter: I) -> String" + \ }, + \ { + \ "label":"from_iter", + \ "kind":3, + \ "detail":"fn from_iter>>(iter: I) -> String" + \ }, + \ { + \ "label":"Searcher", + \ "kind":8, + \ "detail":"type Searcher = <&'b str as Pattern<'a>>::Searcher;" + \ }, + \ { + \ "label":"default", + \ "kind":3, + \ "detail":"fn default() -> String" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = String;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Output", + \ "kind":8, + \ "detail":"type Output = str;" + \ }, + \ { + \ "label":"Target", + \ "kind":8, + \ "detail":"type Target = str;" + \ }, + \ { + \ "label":"Err", + \ "kind":8, + \ "detail":"type Err = ParseError;" + \ }, + \ { + \ "label":"from_str", + \ "kind":3, + \ "detail":"fn from_str(s: &str) -> Result" + \ }, + \ { + \ "label":"from", + \ "kind":3, + \ "detail":"fn from(s: &'a str) -> String" + \ }, + \ { + \ "label":"from", + \ "kind":3, + \ "detail":"fn from(s: Box) -> String" + \ }, + \ { + \ "label":"from", + \ "kind":3, + \ "detail":"fn from(s: Cow<'a, str>) -> String" + \ }, + \ { + \ "label":"to_vec", + \ "kind":3, + \ "detail":"pub fn to_vec(&self) -> Vec\nwhere\n T: Clone," + \ } + \ ] + \ }) + +Execute(Should handle Python completion results correctly): + let g:ale_completion_autoimport = 0 + let b:ale_completion_info = { + \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', + \} + + AssertEqual + \ [ + \ {'word': 'what', 'dup': 0, 'menu': 'example-python-project.bar.Bar', 'info': "what()\n\n", 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ "jsonrpc":"2.0", + \ "id":6, + \ "result":{ + \ "isIncomplete":v:false, + \ "items":[ + \ { + \ "label":"what()", + \ "kind":3, + \ "detail":"example-python-project.bar.Bar", + \ "documentation":"what()\n\n", + \ "sortText":"awhat", + \ "insertText":"what" + \ }, + \ { + \ "label":"__class__", + \ "kind":7, + \ "detail":"object", + \ "documentation":"type(object_or_name, bases, dict)\ntype(object) -> the object's type\ntype(name, bases, dict) -> a new type", + \ "sortText":"z__class__", + \ "insertText":"__class__" + \ }, + \ { + \ "label":"__delattr__(name)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Implement delattr(self, name).", + \ "sortText":"z__delattr__", + \ "insertText":"__delattr__" + \ }, + \ { + \ "label":"__dir__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"__dir__() -> list\ndefault dir() implementation", + \ "sortText":"z__dir__", + \ "insertText":"__dir__" + \ }, + \ { + \ "label":"__doc__", + \ "kind":18, + \ "detail":"object", + \ "documentation":"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.", + \ "sortText":"z__doc__", + \ "insertText":"__doc__" + \ }, + \ { + \ "label":"__eq__(value)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return self==value.", + \ "sortText":"z__eq__", + \ "insertText":"__eq__" + \ }, + \ { + \ "label":"__format__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"default object formatter", + \ "sortText":"z__format__", + \ "insertText":"__format__" + \ }, + \ { + \ "label":"__ge__(value)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return self>=value.", + \ "sortText":"z__ge__", + \ "insertText":"__ge__" + \ }, + \ { + \ "label":"__getattribute__(name)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return getattr(self, name).", + \ "sortText":"z__getattribute__", + \ "insertText":"__getattribute__" + \ }, + \ { + \ "label":"__gt__(value)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return self>value.", + \ "sortText":"z__gt__", + \ "insertText":"__gt__" + \ }, + \ { + \ "label":"__hash__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return hash(self).", + \ "sortText":"z__hash__", + \ "insertText":"__hash__" + \ }, + \ { + \ "label":"__init__(args, kwargs)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Initialize self.\u00a0\u00a0See help(type(self)) for accurate signature.", + \ "sortText":"z__init__", + \ "insertText":"__init__" + \ }, + \ { + \ "label":"__init_subclass__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"This method is called when a class is subclassed.\n\nThe default implementation does nothing. It may be\noverridden to extend subclasses.", + \ "sortText":"z__init_subclass__", + \ "insertText":"__init_subclass__" + \ }, + \ { + \ "label":"__le__(value)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return self<=value.", + \ "sortText":"z__le__", + \ "insertText":"__le__" + \ }, + \ { + \ "label":"__lt__(value)", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return self int\nsize of object in memory, in bytes", + \ "sortText":"z__sizeof__", + \ "insertText":"__sizeof__" + \ }, + \ { + \ "label":"__str__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Return str(self).", + \ "sortText":"z__str__", + \ "insertText":"__str__" + \ }, + \ { + \ "label":"__subclasshook__()", + \ "kind":3, + \ "detail":"object", + \ "documentation":"Abstract classes can override this to customize issubclass().\n\nThis is invoked early on by abc.ABCMeta.__subclasscheck__().\nIt should return True, False or NotImplemented.\u00a0\u00a0If it returns\nNotImplemented, the normal algorithm is used.\u00a0\u00a0Otherwise, it\noverrides the normal algorithm (and the outcome is cached).", + \ "sortText":"z__subclasshook__", + \ "insertText":"__subclasshook__" + \ } + \ ] + \ } + \ }) + +Execute(Should handle extra Python completion results correctly): + let g:ale_completion_autoimport = 0 + + let b:ale_completion_info = { + \ 'completion_filter': 'ale#completion#python#CompletionItemFilter', + \ 'prefix': 'mig', + \} + + AssertEqual + \ [ + \ {'word': 'migrations', 'dup': 0, 'menu': 'xxx', 'info': 'migrations', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ {'word': 'MigEngine', 'dup': 0, 'menu': 'xxx', 'info': 'mig engine', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'jsonrpc': '2.0', + \ 'id': 6, + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'label': 'migrations', + \ 'kind': 3, + \ 'detail': 'xxx', + \ 'documentation': 'migrations', + \ }, + \ { + \ 'label': 'MigEngine', + \ 'kind': 3, + \ 'detail': 'xxx', + \ 'documentation': 'mig engine', + \ }, + \ { + \ 'label': 'ignore me', + \ 'kind': 3, + \ 'detail': 'nope', + \ 'documentation': 'nope', + \ }, + \ ] + \ } + \ }) + +Execute(Should handle missing keys): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'x', 'dup': 0, 'menu': '', 'info': '', 'kind': 'v', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'jsonrpc': '2.0', + \ 'id': 6, + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'label': 'x', + \ }, + \ ] + \ } + \ }) + +Execute(Should handle documentation in the markdown format): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'migrations', 'dup': 0, 'menu': 'xxx', 'info': 'Markdown documentation', 'kind': 'f', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'jsonrpc': '2.0', + \ 'id': 6, + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'label': 'migrations', + \ 'kind': 3, + \ 'detail': 'xxx', + \ 'documentation': { + \ 'kind': 'markdown', + \ 'value': 'Markdown documentation', + \ }, + \ }, + \ ], + \ }, + \ }) + +Execute(Should handle completion messages with textEdit objects): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'next_callback', 'dup': 0, 'menu': 'PlayTimeCallback', 'info': '', 'kind': 'v', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'ignoreme', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'textEdit': { + \ 'newText': 'next_callback', + \ 'range': { + \ 'end': {'character': 13, 'line': 12}, + \ 'start': {'character': 4, 'line': 12}, + \ }, + \ }, + \ }, + \ ], + \ }, + \ }) + +Execute(Should handle completion messages with textEdit objects and no insertTextFormat key): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'next_callback', 'dup': 0, 'menu': 'PlayTimeCallback', 'info': '', 'kind': 'v', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'ignoreme', + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'textEdit': { + \ 'newText': 'next_callback', + \ 'range': { + \ 'end': {'character': 13, 'line': 12}, + \ 'start': {'character': 4, 'line': 12}, + \ }, + \ }, + \ }, + \ ], + \ }, + \ }) + +Execute(Should handle completion messages with the deprecated insertText attribute): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ {'word': 'next_callback', 'dup': 0, 'menu': 'PlayTimeCallback', 'info': '', 'kind': 'v', 'icase': 1, 'user_data': json_encode({'_ale_completion_item': 1})}, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'next_callback', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ }, + \ ], + \ }, + \ }) + +Execute(Should handle completion messages with additionalTextEdits when ale_completion_autoimport is turned on): + let g:ale_completion_autoimport = 1 + + AssertEqual + \ [ + \ { + \ 'word': 'next_callback', + \ 'dup': 1, + \ 'menu': 'PlayTimeCallback', + \ 'info': '', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [ + \ { + \ 'description': 'completion', + \ 'changes': [ + \ { + \ 'fileName': expand('#' . bufnr('') . ':p'), + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 11, + \ 'offset': 2, + \ }, + \ 'end': { + \ 'line': 13, + \ 'offset': 4, + \ }, + \ 'newText': 'from "module" import next_callback', + \ }, + \ ], + \ }, + \ ], + \ }, + \ ], + \ }), + \ }, + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'next_callback', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 10, + \ 'character': 1, + \ }, + \ 'end': { + \ 'line': 12, + \ 'character': 3, + \ }, + \ }, + \ 'newText': 'from "module" import next_callback', + \ }, + \ ], + \ }, + \ ], + \ }, + \ }) + +Execute(Should not handle completion messages with additionalTextEdits when ale_completion_autoimport is turned off): + let g:ale_completion_autoimport = 0 + let b:ale_completion_info = {'line': 30} + + AssertEqual + \ [], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'next_callback', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'additionalTextEdits': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 10, + \ 'character': 1, + \ }, + \ 'end': { + \ 'line': 12, + \ 'character': 3, + \ }, + \ }, + \ 'newText': 'from "module" import next_callback', + \ }, + \ ], + \ }, + \ ], + \ }, + \ }) + +Execute(Should still handle completion messages with empty additionalTextEdits with ale_completion_autoimport turned off): + let g:ale_completion_autoimport = 0 + + AssertEqual + \ [ + \ { + \ 'word': 'next_callback', + \ 'dup': 0, + \ 'menu': 'PlayTimeCallback', + \ 'info': '', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ } + \ ], + \ ale#completion#ParseLSPCompletions({ + \ 'id': 226, + \ 'jsonrpc': '2.0', + \ 'result': { + \ 'isIncomplete': v:false, + \ 'items': [ + \ { + \ 'detail': 'PlayTimeCallback', + \ 'filterText': 'next_callback', + \ 'insertText': 'next_callback', + \ 'insertTextFormat': 1, + \ 'kind': 6, + \ 'label': ' next_callback', + \ 'sortText': '3ee19999next_callback', + \ 'additionalTextEdits': [], + \ }, + \ ], + \ }, + \ }) diff --git a/dot_vim/plugged/ale/test/completion/test_omnifunc_completion.vader b/dot_vim/plugged/ale/test/completion/test_omnifunc_completion.vader new file mode 100644 index 0000000..1db6470 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_omnifunc_completion.vader @@ -0,0 +1,60 @@ +Before: + unlet! b:ale_completion_info + unlet! b:ale_completion_result + + let b:lsp_started = 0 + + runtime autoload/ale/lsp_linter.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + return b:lsp_started + endfunction + + function! SetCompletionResult(...) abort + let b:ale_completion_result = ['foo'] + endfunction + + function! SetCompletionResponse(...) abort + let b:ale_completion_result = ['foo'] + endfunction + +After: + unlet! b:ale_completion_info + unlet! b:ale_completion_result + unlet! b:lsp_started + + delfunction SetCompletionResult + delfunction SetCompletionResponse + + runtime autoload/ale/lsp_linter.vim + + call ale#linter#Reset() + +Given typescript(): + let abc = y. + let foo = ab + let foo = (ab) + +Execute(-3 should be returned when completion results cannot be requested): + AssertEqual -3, ale#completion#OmniFunc(1, '') + +Execute(The start position should be returned when results can be requested): + let b:lsp_started = 1 + call setpos('.', [bufnr(''), 3, 14, 0]) + + AssertEqual 11, ale#completion#OmniFunc(1, '') + +Execute(The omnifunc function should return async results): + " Neovim 0.2.0 and 0.4.4 struggles at running these tests. + if !has('nvim') + call timer_start(0, function('SetCompletionResult')) + + AssertEqual ['foo'], ale#completion#OmniFunc(0, '') + endif + +Execute(The omnifunc function should parse and return async responses): + if !has('nvim') + call timer_start(0, function('SetCompletionResponse')) + + AssertEqual ['foo'], ale#completion#OmniFunc(0, '') + endif diff --git a/dot_vim/plugged/ale/test/completion/test_public_completion_api.vader b/dot_vim/plugged/ale/test/completion/test_public_completion_api.vader new file mode 100644 index 0000000..0339482 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_public_completion_api.vader @@ -0,0 +1,47 @@ +Before: + call ale#linter#Reset() + + unlet! b:ale_linters + unlet! b:ale_completion_info + unlet! b:ale_completion_result + +After: + call ale#linter#Reset() + + unlet! b:ale_linters + unlet! b:ale_completion_info + unlet! b:ale_completion_result + +Execute(ale#completion#GetCompletionResult() should return v:null when there are no results): + AssertEqual v:null, ale#completion#GetCompletionResult() + +Execute(ale#completion#GetCompletionResult() should return a result computed previously): + let b:ale_completion_result = [1] + + AssertEqual [1], ale#completion#GetCompletionResult() + +Execute(ale#completion#GetCompletionPosition() should return 0 when there is no completion information): + AssertEqual 0, ale#completion#GetCompletionPosition() + +Given python(Some Python file): + foo bar + +Execute(ale#completion#GetCompletionPosition() should return the position in the file when information is available): + let b:ale_completion_info = {'line': 1, 'column': 6} + + " This is the first character of 'bar' + AssertEqual 4, ale#completion#GetCompletionPosition() + +Execute(ale#completion#GetCompletionPositionForDeoplete() should return the position on the given input string): + " This is the first character of 'bar' + AssertEqual 4, ale#completion#GetCompletionPositionForDeoplete('foo bar') + +Execute(ale#completion#CanProvideCompletions should return 0 when no completion sources are available): + let b:ale_linters = ['flake8'] + AssertEqual 0, ale#completion#CanProvideCompletions() + +Execute(ale#completion#CanProvideCompletions should return 1 when at least one completion source is available): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + + AssertEqual 1, ale#completion#CanProvideCompletions() diff --git a/dot_vim/plugged/ale/test/completion/test_tsserver_completion_parsing.vader b/dot_vim/plugged/ale/test/completion/test_tsserver_completion_parsing.vader new file mode 100644 index 0000000..231c0f9 --- /dev/null +++ b/dot_vim/plugged/ale/test/completion/test_tsserver_completion_parsing.vader @@ -0,0 +1,309 @@ +Before: + Save g:ale_completion_tsserver_remove_warnings + + let g:ale_completion_tsserver_remove_warnings = 0 + +After: + Restore + + unlet! b:ale_tsserver_completion_names + +Execute(TypeScript completions responses should be parsed correctly): + AssertEqual [], + \ ale#completion#ParseTSServerCompletions({ + \ 'body': [], + \}) + AssertEqual + \ [ + \ { + \ 'word': 'foo', + \ 'source': '/path/to/foo.ts', + \ }, + \ { + \ 'word': 'bar', + \ 'source': '', + \ }, + \ { + \ 'word': 'baz', + \ 'source': '', + \ } + \ ], + \ ale#completion#ParseTSServerCompletions({ + \ 'body': [ + \ {'name': 'foo', 'source': '/path/to/foo.ts'}, + \ {'name': 'bar'}, + \ {'name': 'baz'}, + \ ], + \}) + +Execute(TypeScript completions responses should include warnings): + AssertEqual + \ [ + \ { + \ 'word': 'foo', + \ 'source': '/path/to/foo.ts', + \ }, + \ { + \ 'word': 'bar', + \ 'source': '', + \ }, + \ { + \ 'word': 'baz', + \ 'source': '', + \ } + \ ], + \ ale#completion#ParseTSServerCompletions({ + \ 'body': [ + \ {'name': 'foo', 'source': '/path/to/foo.ts'}, + \ {'name': 'bar', 'kind': 'warning'}, + \ {'name': 'baz'}, + \ ], + \}) + +Execute(TypeScript completions responses should not include warnings if excluded): + let g:ale_completion_tsserver_remove_warnings = 1 + AssertEqual + \ [ + \ { + \ 'word': 'foo', + \ 'source': '/path/to/foo.ts', + \ }, + \ { + \ 'word': 'baz', + \ 'source': '', + \ } + \ ], + \ ale#completion#ParseTSServerCompletions({ + \ 'body': [ + \ {'name': 'foo', 'source': '/path/to/foo.ts'}, + \ {'name': 'bar', 'kind': 'warning'}, + \ {'name': 'baz'}, + \ ], + \}) + +Execute(TypeScript completion details responses should be parsed correctly): + AssertEqual + \ [ + \ { + \ 'word': 'abc', + \ 'menu': '(property) Foo.abc: number', + \ 'info': '', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ { + \ 'word': 'def', + \ 'menu': '(property) Foo.def: number', + \ 'info': 'foo bar baz', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ { + \ 'word': 'ghi', + \ 'menu': '(class) Foo', + \ 'info': '', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ ], + \ ale#completion#ParseTSServerCompletionEntryDetails({ + \ 'body': [ + \ { + \ 'name': 'abc', + \ 'kind': 'parameterName', + \ 'displayParts': [ + \ {'text': '('}, + \ {'text': 'property'}, + \ {'text': ')'}, + \ {'text': ' '}, + \ {'text': 'Foo'}, + \ {'text': '.'}, + \ {'text': 'abc'}, + \ {'text': ':'}, + \ {'text': ' '}, + \ {'text': 'number'}, + \ ], + \ }, + \ { + \ 'name': 'def', + \ 'kind': 'parameterName', + \ 'displayParts': [ + \ {'text': '('}, + \ {'text': 'property'}, + \ {'text': ')'}, + \ {'text': ' '}, + \ {'text': 'Foo'}, + \ {'text': '.'}, + \ {'text': 'def'}, + \ {'text': ':'}, + \ {'text': ' '}, + \ {'text': 'number'}, + \ ], + \ 'documentation': [ + \ {'text': 'foo'}, + \ {'text': ' '}, + \ {'text': 'bar'}, + \ {'text': ' '}, + \ {'text': 'baz'}, + \ ], + \ }, + \ { + \ 'name': 'ghi', + \ 'kind': 'className', + \ 'displayParts': [ + \ {'text': '('}, + \ {'text': 'class'}, + \ {'text': ')'}, + \ {'text': ' '}, + \ {'text': 'Foo'}, + \ ], + \ }, + \ ], + \}) + +Execute(Entries without details should be included in the responses): + let b:ale_tsserver_completion_names = [{ + \ 'word': 'xyz', + \ 'source': '/path/to/xyz.ts', + \ }] + + AssertEqual + \ [ + \ { + \ 'word': 'abc', + \ 'menu': 'import { def } from "./Foo"; (property) Foo.abc: number', + \ 'info': '', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [{ + \ 'description': 'import { def } from "./Foo";', + \ 'changes': [], + \ }], + \ }), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ { + \ 'word': 'def', + \ 'menu': '(property) Foo.def: number', + \ 'info': 'foo bar baz', + \ 'kind': 'v', + \ 'icase': 1, + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ { + \ 'word': 'xyz', + \ 'menu': '', + \ 'info': '', + \ 'kind': 'v', + \ 'user_data': json_encode({'_ale_completion_item': 1}), + \ 'icase': 1, + \ }, + \ ], + \ ale#completion#ParseTSServerCompletionEntryDetails({ + \ 'body': [ + \ { + \ 'name': 'abc', + \ 'kind': 'parameterName', + \ 'displayParts': [ + \ {'text': '('}, + \ {'text': 'property'}, + \ {'text': ')'}, + \ {'text': ' '}, + \ {'text': 'Foo'}, + \ {'text': '.'}, + \ {'text': 'abc'}, + \ {'text': ':'}, + \ {'text': ' '}, + \ {'text': 'number'}, + \ ], + \ 'codeActions': [{ + \ 'description': 'import { def } from "./Foo";', + \ 'changes': [], + \ }], + \ }, + \ { + \ 'name': 'def', + \ 'kind': 'parameterName', + \ 'displayParts': [ + \ {'text': '('}, + \ {'text': 'property'}, + \ {'text': ')'}, + \ {'text': ' '}, + \ {'text': 'Foo'}, + \ {'text': '.'}, + \ {'text': 'def'}, + \ {'text': ':'}, + \ {'text': ' '}, + \ {'text': 'number'}, + \ ], + \ 'documentation': [ + \ {'text': 'foo'}, + \ {'text': ' '}, + \ {'text': 'bar'}, + \ {'text': ' '}, + \ {'text': 'baz'}, + \ ], + \ }, + \ ], + \}) + +Execute(Default imports should be handled correctly): + AssertEqual + \ [ + \ { + \ 'word': 'abcd', + \ 'menu': 'Import default ''abcd'' from module "./foo" (alias) const abcd: 3', + \ 'info': '', + \ 'kind': 't', + \ 'icase': 1, + \ 'user_data': json_encode({ + \ '_ale_completion_item': 1, + \ 'code_actions': [{ + \ 'description': 'Import default ''abcd'' from module "./foo"', + \ 'changes': [], + \ }], + \ }), + \ 'dup': g:ale_completion_autoimport, + \ }, + \ ], + \ ale#completion#ParseTSServerCompletionEntryDetails({ + \ 'body': [ + \ { + \ 'name': 'default', + \ 'kind': 'alias', + \ 'displayParts': [ + \ {'kind': 'punctuation', 'text': '('}, + \ {'kind': 'text', 'text': 'alias'}, + \ {'kind': 'punctuation', 'text': ')'}, + \ {'kind': 'space', 'text': ' '}, + \ {'kind': 'keyword', 'text': 'const'}, + \ {'kind': 'space', 'text': ' '}, + \ {'kind': 'localName', 'text': 'abcd'}, + \ {'kind': 'punctuation', 'text': ':'}, + \ {'kind': 'space', 'text': ' '}, + \ {'kind': 'stringLiteral', 'text': '3'}, + \ {'kind': 'lineBreak', 'text': '^@'}, + \ {'kind': 'keyword', 'text': 'export'}, + \ {'kind': 'space', 'text': ' '}, + \ {'kind': 'keyword', 'text': 'default'}, + \ {'kind': 'space', 'text': ' '}, + \ {'kind': 'aliasName', 'text': 'abcd'} + \ ], + \ 'codeActions': [ + \ { + \ 'description': 'Import default ''abcd'' from module "./foo"', + \ 'changes': [], + \ }, + \ ], + \ }, + \ ], + \ }) diff --git a/dot_vim/plugged/ale/test/dot_config/nvim/symlink_init.vim b/dot_vim/plugged/ale/test/dot_config/nvim/symlink_init.vim new file mode 100644 index 0000000..ada403f --- /dev/null +++ b/dot_vim/plugged/ale/test/dot_config/nvim/symlink_init.vim @@ -0,0 +1 @@ +../../vimrc diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix.vader new file mode 100644 index 0000000..429d1b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix.vader @@ -0,0 +1,884 @@ +Before: + Save g:ale_fixers + Save &shell + Save g:ale_enabled + Save g:ale_fix_on_save + Save g:ale_lint_on_save + Save g:ale_echo_cursor + Save g:ale_command_wrapper + Save g:ale_filename_mappings + + silent! cd /testplugin/test/fix + + unlet! b:ale_lint_on_save + let g:ale_enabled = 0 + let g:ale_echo_cursor = 0 + let g:ale_command_wrapper = '' + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + let g:ale_fix_buffer_data = {} + let g:ale_fixers = { + \ 'testft': [], + \} + let g:ale_filename_mappings = {} + + let g:pre_success = 0 + let g:post_success = 0 + augroup VaderTest + autocmd! + autocmd User ALEFixPre let g:pre_success = 1 + autocmd User ALEFixPost let g:post_success = 1 + augroup END + + if !has('win32') + let &shell = '/bin/bash' + endif + + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('test.txt') + call ale#linter#PreventLoading('testft') + + function AddCarets(buffer, lines) abort + " map() is applied to the original lines here. + " This way, we can ensure that defensive copies are made. + return map(a:lines, '''^'' . v:val') + endfunction + + function Capitalize(buffer, lines) abort + return map(a:lines, 'toupper(v:val)') + endfunction + + function DoNothing(buffer, lines) abort + return 0 + endfunction + + function CatLine(buffer, lines) abort + return {'command': 'cat - <(echo d)'} + endfunction + + function CatLineOneArg(buffer) abort + return {'command': 'cat - <(echo d)'} + endfunction + + function CatLineDeferred(buffer, lines) abort + return ale#command#Run(a:buffer, 'echo', { + \ -> ale#command#Run(a:buffer, 'echo', {-> {'command': 'cat - <(echo d)'}}) + \}) + endfunction + + function ReplaceWithTempFile(buffer, lines) abort + return {'command': 'echo x > %t', 'read_temporary_file': 1} + endfunction + + function CatWithTempFile(buffer, lines) abort + return {'command': 'cat %t <(echo d)'} + endfunction + + function EchoFilename(buffer, lines) abort + return {'command': 'echo %s'} + endfunction + + function RemoveLastLine(buffer, lines) abort + return ['a', 'b'] + endfunction + + function RemoveLastLineOneArg(buffer) abort + return ['a', 'b'] + endfunction + + function! TestCallback(buffer, output) + return [{'lnum': 1, 'col': 1, 'text': 'xxx'}] + endfunction + + " echo will output a single blank line, and we should ignore it. + function! IgnoredEmptyOutput(buffer, output) + return {'command': has('win32') ? 'echo(' : 'echo'} + endfunction + + function! EchoLineNoPipe(buffer, output) + return {'command': 'echo new line', 'read_buffer': 0} + endfunction + + function! SetUpLinters() + call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': 'true', + \ 'command': 'true', + \}) + endfunction + + function GetLastMessage() + redir => l:output + silent mess + redir END + + let l:lines = split(l:output, "\n") + + return empty(l:lines) ? '' : l:lines[-1] + endfunction + + function! FixWithJSONPostProcessing(buffer) abort + let l:ProcessWith = 'JSONPostProcessor' + + " Test with lambdas where support is available. + if has('lambda') + let l:ProcessWith = {buffer, output -> JSONPostProcessor(buffer, output)} + endif + + " Escaping needs to be handled specially for CMD on Windows. + let l:json_string = has('win32') + \ ? '{"output":["x","y","z"]}' + \ : ale#Escape('{"output": ["x", "y", "z"]}') + + return { + \ 'command': 'echo ' . l:json_string, + \ 'read_buffer': 0, + \ 'process_with': l:ProcessWith, + \} + endfunction + + function! JSONPostProcessor(buffer, output) abort + return json_decode(a:output[0]).output + endfunction + +After: + Restore + unlet! g:test_filename + unlet! g:ale_run_synchronously + unlet! g:ale_set_lists_synchronously + unlet! g:ale_run_synchronously_callbacks + unlet! g:ale_emulate_job_failure + unlet! b:ale_fixers + unlet! b:ale_lint_on_save + unlet! b:ale_fix_on_save + unlet! b:ale_quitting + delfunction AddCarets + delfunction Capitalize + delfunction DoNothing + delfunction CatLine + delfunction CatLineOneArg + delfunction CatLineDeferred + delfunction ReplaceWithTempFile + delfunction CatWithTempFile + delfunction EchoFilename + delfunction RemoveLastLine + delfunction RemoveLastLineOneArg + delfunction TestCallback + delfunction SetUpLinters + delfunction GetLastMessage + delfunction IgnoredEmptyOutput + delfunction EchoLineNoPipe + delfunction FixWithJSONPostProcessing + delfunction JSONPostProcessor + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + + call ale#test#RestoreDirectory() + + call ale#fix#registry#ResetToDefaults() + call ale#linter#Reset() + + setlocal buftype=nofile + + if exists('g:test_filename') && filereadable(g:test_filename) + call delete(g:test_filename) + endif + + call setloclist(0, []) + + let g:ale_fix_buffer_data = {} + + " Clear the messages between tests. + echomsg '' + + if !exists('g:ale_command_wrapper') + let g:ale_command_wrapper = '' + endif + +Given testft (A file with three lines): + a + b + c + +Execute(ALEFix should complain when there are no functions to call): + ALEFix + call ale#test#FlushJobs() + AssertEqual 'No fixers have been defined. Try :ALEFixSuggest', GetLastMessage() + +Execute(ALEFix should not complain when the command is run with a bang): + echom 'none' + + ALEFix! + call ale#test#FlushJobs() + AssertEqual 'none', GetLastMessage() + +Execute(ALEFix should apply simple functions): + let g:ale_fixers.testft = ['AddCarets'] + ALEFix + call ale#test#FlushJobs() + +Expect(The first function should be used): + ^a + ^b + ^c + +Execute(Should apply filename mpapings): + " The command echos %s, and we'll map the current path so we can check + " that ALEFix applies filename mappings, end-to-end. + let g:ale_filename_mappings = { + \ 'echo_filename': [ + \ [expand('%:p:h') . '/', '/some/fake/path/'], + \ ], + \} + + call ale#fix#registry#Add('echo_filename', 'EchoFilename', [], 'echo filename') + let g:ale_fixers.testft = ['echo_filename'] + ALEFix + call ale#test#FlushJobs() + " Remote trailing whitespace from the line. + call setline(1, substitute(getline(1), '[ \r]\+$', '', '')) + +Expect(The mapped filename should be printed): + /some/fake/path/test.txt + +Execute(ALEFix should apply simple functions in a chain): + let g:ale_fixers.testft = ['AddCarets', 'Capitalize'] + ALEFix + call ale#test#FlushJobs() + +Expect(Both functions should be used): + ^A + ^B + ^C + +Execute(ALEFix should allow 0 to be returned to skip functions): + let g:ale_fixers.testft = ['DoNothing', 'Capitalize'] + ALEFix + call ale#test#FlushJobs() + +Expect(Only the second function should be applied): + A + B + C + +Execute(The * fixers shouldn't be used if an empty list is set for fixers): + let g:ale_fixers.testft = [] + let g:ale_fixers['*'] = ['Capitalize'] + ALEFix + call ale#test#FlushJobs() + +Expect(Nothing should be changed): + a + b + c + +Execute(* fixers should be used if no filetype is matched): + let g:ale_fixers = {'*': ['Capitalize']} + ALEFix + call ale#test#FlushJobs() + +Expect(The file should be changed): + A + B + C + +Execute(ALEFix should allow commands to be run): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = ['CatLine'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(An extra line should be added): + a + b + c + d + +Execute(ALEFix should use fixers passed in commandline when provided): + let g:ale_fixers.testft = ['RemoveLastLine'] + ALEFix AddCarets Capitalize + call ale#test#FlushJobs() + +Expect(Only fixers passed via command line should be run): + ^A + ^B + ^C + +Execute(ALEFix should allow temporary files to be read): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['x']) + 2,3d + else + let g:ale_fixers.testft = ['ReplaceWithTempFile'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(The line we wrote to the temporary file should be used here): + x + +Execute(ALEFix should not read the temporary file when the option is not set): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = ['CatWithTempFile'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(An extra line should be added): + a + b + c + d + +Execute(ALEFix should allow jobs and simple functions to be combined): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['X']) + 2,3d + else + let g:ale_fixers.testft = ['ReplaceWithTempFile', 'Capitalize'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(The lines from the temporary file should be modified): + X + +Execute(ALEFix should send lines modified by functions to jobs): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['A', 'B', 'C', 'd']) + else + let g:ale_fixers.testft = ['Capitalize', 'CatLine'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(The lines should first be modified by the function, then the job): + A + B + C + d + +Execute(ALEFix should skip commands when jobs fail to run): + let g:ale_emulate_job_failure = 1 + let g:ale_fixers.testft = ['CatLine', 'Capitalize'] + ALEFix + call ale#test#FlushJobs() + +Expect(Only the second function should be applied): + A + B + C + +Execute(ALEFix should handle strings for selecting a single function): + let g:ale_fixers.testft = 'AddCarets' + ALEFix + call ale#test#FlushJobs() + +Expect(The first function should be used): + ^a + ^b + ^c + +Execute(ALEFix should use functions from the registry): + call ale#fix#registry#Add('add_carets', 'AddCarets', [], 'Add some carets') + let g:ale_fixers.testft = ['add_carets'] + ALEFix + call ale#test#FlushJobs() + +Expect(The registry function should be used): + ^a + ^b + ^c + +Execute(ALEFix should be able to remove the last line for files): + let g:ale_fixers.testft = ['RemoveLastLine'] + ALEFix + call ale#test#FlushJobs() + +Expect(There should be only two lines): + a + b + +Execute(ALEFix should accept funcrefs): + let g:ale_fixers.testft = [function('RemoveLastLine')] + ALEFix + call ale#test#FlushJobs() + +Expect(There should be only two lines): + a + b + +Execute(ALEFix should accept lambdas): + if has('nvim') + " NeoVim 0.1.7 can't interpret lambdas correctly, so just set the lines + " to make the test pass. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = [{buffer, lines -> lines + ['d']}] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(There should be an extra line): + a + b + c + d + +Execute(ALEFix should user buffer-local fixer settings): + let g:ale_fixers.testft = ['AddCarets', 'Capitalize'] + let b:ale_fixers = {'testft': ['RemoveLastLine']} + ALEFix + call ale#test#FlushJobs() + +Expect(There should be only two lines): + a + b + +Execute(ALEFix should allow Lists to be used for buffer-local fixer settings): + let g:ale_fixers.testft = ['AddCarets', 'Capitalize'] + let b:ale_fixers = ['RemoveLastLine'] + ALEFix + call ale#test#FlushJobs() + +Expect(There should be only two lines): + a + b + +Given testft (A file with three lines): + a + b + c + +Execute(ALEFix should fix files on the save event): + let g:ale_fix_on_save = 1 + let g:ale_lint_on_save = 1 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + call writefile(getline(1, '$'), g:test_filename) + + let g:ale_fixers.testft = ['Capitalize'] + + " We have to set the buftype to empty so the file will be written. + setlocal buftype= + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + " We should save the file. + AssertEqual ['A', 'B', 'C'], readfile(g:test_filename) + Assert !&modified, 'The file was marked as ''modified''' + + if !has('win32') + " We should have run the linter. + AssertEqual [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 1, + \ 'text': 'xxx', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}], ale#test#GetLoclistWithoutNewerKeys() + endif + +Expect(The buffer should be modified): + A + B + C + +Given testft (A file with three lines): + a + b + c + +Execute(ALEFix should run the linters with b:ale_lint_on_save = 1): + let g:ale_fix_on_save = 0 + let b:ale_fix_on_save = 1 + let g:ale_lint_on_save = 1 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + call writefile(getline(1, '$'), g:test_filename) + + let g:ale_fixers.testft = ['Capitalize'] + + " We have to set the buftype to empty so the file will be written. + setlocal buftype= + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + " We should save the file. + AssertEqual ['A', 'B', 'C'], readfile(g:test_filename) + Assert !&modified, 'The file was marked as ''modified''' + + if !has('win32') + " We should have run the linter. + AssertEqual [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 1, + \ 'text': 'xxx', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}], ale#test#GetLoclistWithoutNewerKeys() + endif + +Expect(The buffer should be modified): + A + B + C + +Execute(ALEFix should not fix files on :wq): + let g:ale_fix_on_save = 1 + let g:ale_lint_on_save = 1 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + call writefile(getline(1, '$'), g:test_filename) + + let g:ale_fixers.testft = ['Capitalize'] + + " We have to set the buftype to empty so the file will be written. + setlocal buftype= + + call ale#events#QuitEvent(bufnr('')) + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + + " We should save the file. + AssertEqual ['a', 'b', 'c'], readfile(g:test_filename) + Assert &modified, 'The was not marked as ''modified''' + + " We should not run the linter. + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Expect(The buffer should not be modified): + a + b + c + +Given testft (A file with three lines): + a + b + c + +Execute(ALEFix should still lint with no linters to be applied): + let g:ale_fix_on_save = 1 + let g:ale_lint_on_save = 1 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + let g:ale_fixers.testft = [] + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + Assert !filereadable(g:test_filename), 'The file should not have been saved' + + if !has('win32') + " We have run the linter. + AssertEqual [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 1, + \ 'text': 'xxx', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}], ale#test#GetLoclistWithoutNewerKeys() + endif + +Expect(The buffer should be the same): + a + b + c + +Execute(ALEFix should still lint when nothing was fixed on save): + let g:ale_fix_on_save = 1 + let g:ale_lint_on_save = 1 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + let g:ale_fixers.testft = ['DoNothing'] + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + Assert !filereadable(g:test_filename), 'The file should not have been saved' + + if !has('win32') + " We should have run the linter. + AssertEqual [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 1, + \ 'text': 'xxx', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}], ale#test#GetLoclistWithoutNewerKeys() + endif + +Expect(The buffer should be the same): + a + b + c + +Execute(ALEFix should not lint the buffer on save if linting on save is disabled globally): + let g:ale_fix_on_save = 1 + let g:ale_lint_on_save = 0 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + let g:ale_fixers.testft = ['DoNothing'] + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + Assert !filereadable(g:test_filename), 'The file should not have been saved' + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Expect(The buffer should be the same): + a + b + c + +Execute(ALEFix should not lint the buffer on save if linting on save is disabled locally): + let g:ale_fix_on_save = 1 + let b:ale_lint_on_save = 0 + let g:ale_enabled = 1 + + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + let g:ale_fixers.testft = ['DoNothing'] + + call SetUpLinters() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + Assert !filereadable(g:test_filename), 'The file should not have been saved' + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Expect(The buffer should be the same): + a + b + c + +Given testft (A file with three lines): + a + b + c + +Execute(ale#fix#InitBufferData() should set up the correct data): + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + call ale#fix#InitBufferData(bufnr(''), 'save_file') + + AssertEqual { + \ bufnr(''): { + \ 'temporary_directory_list': [], + \ 'done': 0, + \ 'lines_before': ['a', 'b', 'c'], + \ 'should_save': 1, + \ 'ignore_file_changed_errors': 0, + \ }, + \}, g:ale_fix_buffer_data + + call ale#fix#InitBufferData(bufnr(''), '!') + + AssertEqual { + \ bufnr(''): { + \ 'temporary_directory_list': [], + \ 'done': 0, + \ 'lines_before': ['a', 'b', 'c'], + \ 'should_save': 0, + \ 'ignore_file_changed_errors': 1, + \ }, + \}, g:ale_fix_buffer_data + +Execute(ALEFix simple functions should be able to accept one argument, the buffer): + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + ALEFix + call ale#test#FlushJobs() + +Expect(There should be only two lines): + a + b + +Execute(ALEFix should modify a buffer that is not modifiable, if it becomes modifiable later): + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + + set nomodifiable + ALEFix + call ale#test#FlushJobs() + set modifiable + call ale#fix#ApplyQueuedFixes(bufnr('')) + +Expect(There should be only two lines): + a + b + +Execute(b:ale_fix_on_save = 1 should override g:ale_fix_on_save = 0): + let g:ale_fix_on_save = 0 + let b:ale_fix_on_save = 1 + + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + call ale#events#SaveEvent(bufnr('')) + +Expect(There should be only two lines): + a + b + +Execute(b:ale_fix_on_save = 0 should override g:ale_fix_on_save = 1): + let g:ale_fix_on_save = 1 + let b:ale_fix_on_save = 0 + + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + call ale#events#SaveEvent(bufnr('')) + +Expect(The lines should be the same): + a + b + c + +Execute(ALEFix functions returning jobs should be able to accept one argument): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = ['CatLine'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(An extra line should be added): + a + b + c + d + +Execute(ALE should print a message telling you something isn't a valid fixer when you type some nonsense): + let g:ale_fixers.testft = ['CatLine', 'invalidname'] + ALEFix + call ale#test#FlushJobs() + + AssertEqual 'There is no fixer named `invalidname`. Check :ALEFixSuggest', GetLastMessage() + +Execute(ALE should complain about invalid fixers with minuses in the name): + let g:ale_fixers.testft = ['foo-bar'] + ALEFix + call ale#test#FlushJobs() + + AssertEqual 'There is no fixer named `foo-bar`. Check :ALEFixSuggest', GetLastMessage() + +Execute(ALE should tolerate valid fixers with minuses in the name): + let g:ale_fixers.testft = ['prettier-standard'] + ALEFix + call ale#test#FlushJobs() + +Execute(Empty output should be ignored): + let g:ale_fixers.testft = ['IgnoredEmptyOutput'] + ALEFix + call ale#test#FlushJobs() + +Expect(The lines should be the same): + a + b + c + +Execute(A temporary file shouldn't be piped into the command when disabled): + let g:ale_fixers.testft = ['EchoLineNoPipe'] + ALEFix + call ale#test#FlushJobs() + + AssertEqual + \ string(ale#job#PrepareCommand(bufnr(''), 'echo new line')), + \ string(ale#history#Get(bufnr(''))[-1].command) + + " Remove trailing whitespace for Windows. + if has('win32') + %s/[[:space:]]*$//g + endif + +Expect(The new line should be used): + new line + +Execute(Post-processing should work): + let g:ale_fixers.testft = ['FixWithJSONPostProcessing'] + ALEFix + call ale#test#FlushJobs() + +Expect(The lines in the JSON should be used): + x + y + z + +Execute(ALEFix should apply autocmds): + let g:ale_fixers.testft = ['AddCarets'] + ALEFix + call ale#test#FlushJobs() + + AssertEqual g:pre_success, 1 + AssertEqual g:post_success, 1 + +Execute(ALEFix should support ale#command#Run): + if has('win32') + " Just skip this test on Windows, we can't run it. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = ['CatLineDeferred'] + ALEFix + call ale#test#FlushJobs() + endif + +Expect(The extra line should be added): + a + b + c + d diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix_aliases.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix_aliases.vader new file mode 100644 index 0000000..d3c47b3 --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix_aliases.vader @@ -0,0 +1,5 @@ +Execute(prettier-eslint should be aliased): + AssertEqual 'ale#fixers#prettier_eslint#Fix', ale#fix#registry#GetFunc('prettier-eslint') + +Execute(prettier-standard should be aliased): + AssertEqual 'ale#fixers#prettier_standard#Fix', ale#fix#registry#GetFunc('prettier-standard') diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix_completion.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix_completion.vader new file mode 100644 index 0000000..6c38bb8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix_completion.vader @@ -0,0 +1,23 @@ +Execute (List of available fixers is empty): + call ale#fix#registry#Clear() + +Then (List of applicable fixers for python file is empty): + AssertEqual [], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add ruby fixer): + call ale#fix#registry#Add('ruby_fixer', 'fixer_fun', ['ruby'], 'ruby fixer') + +Then (List of applicable fixers for python file is still empty): + AssertEqual [], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add generic fixer): + call ale#fix#registry#Add('generic_fixer', 'fixer_fun', [], 'generic fixer') + +Then (Generic fixer should be returned as applicable for python file): + AssertEqual ['generic_fixer'], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add python fixer): + call ale#fix#registry#Add('python_fixer', 'fixer_func', ['python'], 'python fixer') + +Then (List of fixers should contain both generic and python fixers): + AssertEqual ['generic_fixer', 'python_fixer'], ale#fix#registry#GetApplicableFixers('python') diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix_completion_filter.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix_completion_filter.vader new file mode 100644 index 0000000..536b713 --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix_completion_filter.vader @@ -0,0 +1,14 @@ +Before: + call ale#fix#registry#Clear() + call ale#test#SetFilename('test.js') + call ale#fix#registry#Add('prettier', '', ['javascript'], 'prettier') + call ale#fix#registry#Add('eslint', '', ['javascript'], 'eslint') + setfiletype javascript + +Execute(completeFixers returns all of the applicable fixers without an arglead): + AssertEqual ['eslint', 'prettier'], + \ ale#fix#registry#CompleteFixers('', 'ALEFix ', 7) + +Execute(completeFixers returns all of the applicable fixers without an arglead): + AssertEqual ['prettier'], + \ ale#fix#registry#CompleteFixers('pre', 'ALEFix ', 10) diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix_ignore.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix_ignore.vader new file mode 100644 index 0000000..5eb9b9a --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix_ignore.vader @@ -0,0 +1,110 @@ +Before: + Save g:ale_fixers + Save g:ale_fix_on_save + Save g:ale_fix_on_save_ignore + + let g:ale_fix_on_save = 1 + let g:ale_fixers = {'abc': ['a', 'b'], 'xyz': ['c', 'd']} + unlet! b:ale_fixers + unlet! b:ale_fix_on_save_ignore + + function FixerA(buffer, lines) abort + return a:lines + ['a'] + endfunction + + function FixerB(buffer, lines) abort + return a:lines + ['b'] + endfunction + + function FixerC(buffer, lines) abort + return a:lines + ['c'] + endfunction + + function FixerD(buffer, lines) abort + return a:lines + ['d'] + endfunction + + set filetype=abc.xyz + let g:test_filename = tempname() + execute 'noautocmd silent file ' . fnameescape(g:test_filename) + + call ale#fix#registry#Add('a', 'FixerA', ['abc'], '') + call ale#fix#registry#Add('b', 'FixerB', ['abc'], '') + call ale#fix#registry#Add('c', 'FixerC', ['xyz'], '') + call ale#fix#registry#Add('d', 'FixerD', ['xyz'], '') + +After: + Restore + + if exists('g:test_filename') && filereadable(g:test_filename) + call delete(g:test_filename) + endif + + unlet! b:ale_fixers + unlet! b:ale_fix_on_save_ignore + unlet! g:test_filename + + delfunction FixerA + delfunction FixerB + delfunction FixerC + delfunction FixerD + + call ale#fix#registry#ResetToDefaults() + +Given abc.xyz (An empty file): +Execute(Ignoring with a filetype in a global Dictionary should work): + let g:ale_fix_on_save_ignore = {'abc': ['b'], 'xyz': ['c']} + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'd'], getline(1, '$') + +Execute(Ignoring with a filetype in a global List should work): + let g:ale_fix_on_save_ignore = ['b', 'c'] + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'd'], getline(1, '$') + +Execute(Ignoring with a filetype in a local Dictionary should work): + let g:ale_fix_on_save_ignore = {'abc': ['b'], 'xyz': ['c']} + " The local Dictionary should entirely replace the global one. + let b:ale_fix_on_save_ignore = {'abc': ['b']} + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'c', 'd'], getline(1, '$') + +Execute(Ignoring with a filetype in a local List should work): + let g:ale_fix_on_save_ignore = {'abc': ['b'], 'xyz': ['c']} + " The local List should entirely replace the global Dictionary. + let b:ale_fix_on_save_ignore = ['b'] + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'c', 'd'], getline(1, '$') + +Execute(Ignoring functions by reference with a Dictionary should work): + let g:ale_fixers = { + \ 'abc': [function('FixerA'), function('FixerB')], + \ 'xyz': [function('FixerC'), function('FixerD')], + \} + let b:ale_fix_on_save_ignore = { + \ 'abc': [function('FixerB')], + \ 'xyz': [function('FixerC')], + \} + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'd'], getline(1, '$') + +Execute(Ignoring functions by reference with a List should work): + let g:ale_fixers = { + \ 'abc': [function('FixerA'), function('FixerB')], + \ 'xyz': [function('FixerC'), function('FixerD')], + \} + let b:ale_fix_on_save_ignore = [function('FixerB'), function('FixerC')] + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual ['', 'a', 'd'], getline(1, '$') diff --git a/dot_vim/plugged/ale/test/fix/test_ale_fix_suggest.vader b/dot_vim/plugged/ale/test/fix/test_ale_fix_suggest.vader new file mode 100644 index 0000000..1100aee --- /dev/null +++ b/dot_vim/plugged/ale/test/fix/test_ale_fix_suggest.vader @@ -0,0 +1,102 @@ +Before: + call ale#fix#registry#Clear() + + let g:buffer = bufnr('') + + function GetSuggestions() + silent ALEFixSuggest + + if bufnr('') != g:buffer + let l:lines = getline(1, '$') + else + let l:lines = [] + endif + + return l:lines + endfunction + +After: + if bufnr('') != g:buffer + :q! + endif + + unlet! g:buffer + + call ale#fix#registry#ResetToDefaults() + delfunction GetSuggestions + +Execute(ALEFixSuggest should return something sensible with no suggestions): + AssertEqual + \ [ + \ 'There is nothing in the registry to suggest.', + \ '', + \ 'Press q to close this window', + \ ], + \ GetSuggestions() + +Execute(ALEFixSuggest should set the appropriate settings): + silent ALEFixSuggest + + AssertEqual 'ale-fix-suggest', &filetype + Assert !&modified, 'The buffer was marked as modified' + Assert !&modifiable, 'The buffer was modifiable' + +Execute(ALEFixSuggest output should be correct for only generic handlers): + call ale#fix#registry#Add('zed', 'XYZ', [], 'Zedify things.') + call ale#fix#registry#Add('alpha', 'XYZ', [], 'Alpha things.') + + AssertEqual + \ [ + \ 'Try the following generic fixers:', + \ '', + \ '''alpha'' - Alpha things.', + \ '''zed'' - Zedify things.', + \ '', + \ 'See :help ale-fix-configuration', + \ '', + \ 'Press q to close this window', + \ ], + \ GetSuggestions() + +Execute(ALEFixSuggest output should be correct for only filetype handlers): + let &filetype = 'testft2.testft' + + call ale#fix#registry#Add('zed', 'XYZ', ['testft2'], 'Zedify things.') + call ale#fix#registry#Add('alpha', 'XYZ', ['testft'], 'Alpha things.') + + AssertEqual + \ [ + \ 'Try the following fixers appropriate for the filetype:', + \ '', + \ '''alpha'' - Alpha things.', + \ '''zed'' - Zedify things.', + \ '', + \ 'See :help ale-fix-configuration', + \ '', + \ 'Press q to close this window', + \ ], + \ GetSuggestions() + +Execute(ALEFixSuggest should suggest filetype and generic handlers): + let &filetype = 'testft2.testft' + + call ale#fix#registry#Add('zed', 'XYZ', ['testft2'], 'Zedify things.', ['foobar']) + call ale#fix#registry#Add('alpha', 'XYZ', ['testft'], 'Alpha things.') + call ale#fix#registry#Add('generic', 'XYZ', [], 'Generic things.') + + AssertEqual + \ [ + \ 'Try the following fixers appropriate for the filetype:', + \ '', + \ '''alpha'' - Alpha things.', + \ '''zed'', ''foobar'' - Zedify things.', + \ '', + \ 'Try the following generic fixers:', + \ '', + \ '''generic'' - Generic things.', + \ '', + \ 'See :help ale-fix-configuration', + \ '', + \ 'Press q to close this window', + \ ], + \ GetSuggestions() diff --git a/dot_vim/plugged/ale/test/fixers/test_appleswiftformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_appleswiftformat_fixer_callback.vader new file mode 100644 index 0000000..72465f4 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_appleswiftformat_fixer_callback.vader @@ -0,0 +1,47 @@ +Before: + call ale#assert#SetUpFixerTest('swift', 'apple-swift-format') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The swiftformat callback should return the correct default values): + call ale#test#SetFilename('../test-files/swift/dummy.swift') + let g:ale_swift_appleswiftformat_executable = 'xxxinvalid' + let g:ale_swift_appleswiftformat_use_swiftpm = 0 + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_swift_appleswiftformat_executable) + \ . ' format --in-place %t', + \ }, + \ ale#fixers#appleswiftformat#Fix(bufnr('')) + +Execute(The swiftformat callback should return the correct default values and located configuration): + call ale#test#SetDirectory('/testplugin/test/test-files/swift/swift-package-project-with-config') + call ale#test#SetFilename('src/folder/dummy.swift') + + let g:ale_swift_appleswiftformat_executable = 'xxxinvalid' + let g:ale_swift_appleswiftformat_use_swiftpm = 0 + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_swift_appleswiftformat_executable) + \ . ' format --in-place %t --configuration ' . glob(g:dir . '/.swift-format'), + \ }, + \ ale#fixers#appleswiftformat#Fix(bufnr('')) + + call ale#test#RestoreDirectory() + +Execute(The swiftformat callback should use swiftpm is use_swiftpm is set to 1): + call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift') + let g:ale_swift_appleswiftformat_use_swiftpm = 1 + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('swift') + \ . ' run swift-format format --in-place %t', + \ }, + \ ale#fixers#appleswiftformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_astyle_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_astyle_fixer_callback.vader new file mode 100644 index 0000000..9d2e4c8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_astyle_fixer_callback.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_c_astyle_executable + Save g:ale_c_astyle_project_options + Save g:ale_cpp_astyle_project_options + + " Use an invalid global executable, so we don't match it. + let g:ale_c_astyle_executable = 'xxxinvalid' + let g:ale_cpp_astyle_executable = 'invalidpp' + let g:ale_c_astyle_project_options = '' + let g:ale_cpp_astyle_project_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The astyle callback should return the correct default values): + " Because this file doesn't exist, no astylrc config + " exists near it. Therefore, project_options is empty. + call ale#test#SetFilename('../c_files/testfile.c') + let targetfile = bufname(bufnr('%')) + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_astyle_executable) + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) + +Execute(The astyle callback should support cpp files): + " Because this file doesn't exist, no astylrc config + " exists near it. Therefore, project_options is empty. + call ale#test#SetFilename('../cpp_files/dummy.cpp') + set filetype=cpp " The test fails without this + let targetfile = bufname(bufnr('%')) + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_cpp_astyle_executable) + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) + +Execute(The astyle callback should support cpp files with option file set): + call ale#test#SetFilename('../cpp_files/dummy.cpp') + let g:ale_cpp_astyle_project_options = '.astylerc_cpp' + let targetfile = bufname(bufnr('%')) + set filetype=cpp " The test fails without this + + AssertEqual + \ { + \ 'command': ale#Escape('invalidpp') + \ . ' --project=' . g:ale_cpp_astyle_project_options + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) + +Execute(The astyle callback should return the correct default values with a specified option file): + call ale#test#SetFilename('../c_files/testfile.c') + let g:ale_c_astyle_project_options = '.astylerc_c' + let targetfile = bufname(bufnr('%')) + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' --project=' . g:ale_c_astyle_project_options + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) + +Execute(The astyle callback should find nearest default option file _astylrc): + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.c') + let targetfile = bufname(bufnr('%')) + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' --project=_astylerc' + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) + +Execute(The astyle callback should find .astylrc in the same directory as src): + call ale#test#SetFilename('../test-files/cpp/dummy.cpp') + set filetype=cpp " The test fails without this + let targetfile = bufname(bufnr('%')) + + AssertEqual + \ { + \ 'command': ale#Escape('invalidpp') + \ . ' --project=.astylerc' + \ . ' --stdin=' . ale#Escape(targetfile) + \ }, + \ ale#fixers#astyle#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_autoflake_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_autoflake_fixer_callback.vader new file mode 100644 index 0000000..91fc62b --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_autoflake_fixer_callback.vader @@ -0,0 +1,49 @@ +Before: + Save g:ale_python_autoflake_executable + Save g:ale_python_autoflake_options + + " Use an invalid global executable, so we don't match it. + let g:ale_python_autoflake_executable = 'xxxinvalid' + let g:ale_python_autoflake_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + let g:dir = getcwd() + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + Restore + + unlet! b:bin_dir + + call ale#test#RestoreDirectory() + +Execute(The autoflake callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#autoflake#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoflake')) + \ . ' --in-place ' + \ . ' %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#autoflake#Fix(bufnr('')) + + +Execute(The autoflake callback should include options): + let g:ale_python_autoflake_options = '--some-option' + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoflake')) + \ . ' --some-option' + \ . ' --in-place ' + \ . ' %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#autoflake#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_autoimport_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_autoimport_fixer_callback.vader new file mode 100644 index 0000000..edca5c3 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_autoimport_fixer_callback.vader @@ -0,0 +1,47 @@ +Before: + Save g:ale_python_autoimport_executable + Save g:ale_python_autoimport_options + + " Use an invalid global executable, so we don't match it. + let g:ale_python_autoimport_executable = 'xxxinvalid' + let g:ale_python_autoimport_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + Restore + + unlet! b:bin_dir + + call ale#test#RestoreDirectory() + +Execute(The autoimport callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#autoimport#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoimport')) . ' -', + \ }, + \ ale#fixers#autoimport#Fix(bufnr('')) + +Execute(The autoimport callback should respect custom options): + let g:ale_python_autoimport_options = '--multi-line=3 --trailing-comma' + + AssertEqual + \ 0, + \ ale#fixers#autoimport#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoimport')) + \ . ' --multi-line=3 --trailing-comma -', + \ }, + \ ale#fixers#autoimport#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_autopep8_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_autopep8_fixer_callback.vader new file mode 100644 index 0000000..46671ed --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_autopep8_fixer_callback.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_python_autopep8_executable + Save g:ale_python_autopep8_options + + " Use an invalid global executable, so we don't match it. + let g:ale_python_autopep8_executable = 'xxxinvalid' + let g:ale_python_autopep8_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + let g:dir = getcwd() + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + Restore + + unlet! b:bin_dir + + call ale#test#RestoreDirectory() + +Execute(The autopep8 callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#autopep8#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' -'}, + \ ale#fixers#autopep8#Fix(bufnr('')) + +Execute(The autopep8 callback should include options): + let g:ale_python_autopep8_options = '--some-option' + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' --some-option -' }, + \ ale#fixers#autopep8#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_bibclean_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_bibclean_fixer_callback.vader new file mode 100644 index 0000000..88412ec --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_bibclean_fixer_callback.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_bib_bibclean_executable + Save g:ale_bib_bibclean_options + + let g:ale_bib_bibclean_executable = 'xxxinvalid' + let g:ale_bib_bibclean_options = '-align-equals' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + call ale#test#RestoreDirectory() + +Execute(The bibclean callback should return the correct default values): + call ale#test#SetFilename('../test-files/bib/dummy.bib') + + AssertEqual + \ {'command': ale#Escape(g:ale_bib_bibclean_executable) . ' -align-equals'}, + \ ale#fixers#bibclean#Fix(bufnr('')) + +Execute(The bibclean callback should include custom bibclean options): + let g:ale_bib_bibclean_options = '-author -check-values' + call ale#test#SetFilename('../test-files/bib/dummy.bib') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_bib_bibclean_executable) . ' -author -check-values' + \ }, + \ ale#fixers#bibclean#Fix(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/fixers/test_black_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_black_fixer_callback.vader new file mode 100644 index 0000000..bb76a1f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_black_fixer_callback.vader @@ -0,0 +1,67 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'black') + + let g:dir = getcwd() + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! g:dir + unlet! b:bin_dir + +Execute(The black callback should return the correct default values): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' -'}, + \ ale#fixers#black#Fix(bufnr('')) + +Execute(The black callback should include options): + let g:ale_python_black_options = '--some-option' + let g:ale_python_black_change_directory = 0 + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option -' }, + \ ale#fixers#black#Fix(bufnr('')) + +Execute(The black callback should include --pyi for .pyi files): + let g:ale_python_black_change_directory = 0 + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.pyi') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --pyi -' }, + \ ale#fixers#black#Fix(bufnr('')) + +Execute(The black callback should not concatenate options): + let g:ale_python_black_options = '--some-option' + let g:ale_python_black_change_directory = 0 + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.pyi') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option --pyi -' }, + \ ale#fixers#black#Fix(bufnr('')) + +Execute(Pipenv is detected when python_black_auto_pipenv is set): + let g:ale_python_black_auto_pipenv = 1 + let g:ale_python_black_change_directory = 0 + + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertEqual + \ {'command': ale#Escape('pipenv') . ' run black -'}, + \ ale#fixers#black#Fix(bufnr('')) + +Execute(Poetry is detected when python_black_auto_poetry is set): + let g:ale_python_black_auto_poetry = 1 + let g:ale_python_black_change_directory = 0 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertEqual + \ {'command': ale#Escape('poetry') . ' run black -'}, + \ ale#fixers#black#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_break_up_long_lines_python_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_break_up_long_lines_python_fixer.vader new file mode 100644 index 0000000..c7809ac --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_break_up_long_lines_python_fixer.vader @@ -0,0 +1,39 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + call ale#test#RestoreDirectory() + +Execute(Long lines with basic function calls should be broken up correctly): + AssertEqual + \ [ + \ 'def foo():', + \ ' some_variable = this_is_a_longer_function(', + \ 'first_argument,', + \ ' second_argument,', + \ ' third_with_function_call(', + \ 'foo,', + \ ' bar,', + \ '))', + \ ], + \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), [ + \ 'def foo():', + \ ' some_variable = this_is_a_longer_function(first_argument, second_argument, third_with_function_call(foo, bar))', + \ ]) + +Execute(Longer lines should be permitted if a configuration file allows it): + call ale#test#SetFilename('../test-files/long-line/foo/bar.py') + + AssertEqual + \ [ + \ 'x = this_line_is_between_79_and_90_characters(first, second, third, fourth, fifth)', + \ 'y = this_line_is_longer_than_90_characters(', + \ 'much_longer_word,', + \ ' another_longer_word,', + \ ' a_third_long_word,', + \ ')' + \ ], + \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), [ + \ 'x = this_line_is_between_79_and_90_characters(first, second, third, fourth, fifth)', + \ 'y = this_line_is_longer_than_90_characters(much_longer_word, another_longer_word, a_third_long_word)', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_brittany_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_brittany_fixer_callback.vader new file mode 100644 index 0000000..073e368 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_brittany_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_haskell_brittany_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_haskell_brittany_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The brittany callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --write-mode inplace' + \ . ' %t', + \ }, + \ ale#fixers#brittany#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_buf_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_buf_format_fixer_callback.vader new file mode 100644 index 0000000..ee48482 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_buf_format_fixer_callback.vader @@ -0,0 +1,21 @@ +Before: + Save g:ale_proto_buf_format_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_proto_buf_format_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The buf-format callback should return the correct default values): + call ale#test#SetFilename('../test-files/proto/testfile.proto') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' format %t', + \ }, + \ ale#fixers#buf_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_buildifier_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_buildifier_fixer_callback.vader new file mode 100644 index 0000000..f82e8e6 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_buildifier_fixer_callback.vader @@ -0,0 +1,29 @@ +Before: + let g:ale_bazel_buildifier_options = '' + call ale#assert#SetUpFixerTest('bzl', 'buildifier') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The buildifier callback should return the correct default values): + call ale#test#SetFilename('../test-files/bazel/WORKSPACE') + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_bazel_buildifier_executable) + \ . ' -mode fix -lint fix -path ' + \ . ale#Escape(ale#test#GetFilename('../test-files/bazel/WORKSPACE')) + \ . ' -' + \ } + +Execute(The buildifier callback should include any additional options): + call ale#test#SetFilename('../test-files/bazel/WORKSPACE') + let g:ale_bazel_buildifier_options = '--some-option' + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_bazel_buildifier_executable) + \ . ' -mode fix -lint fix -path ' + \ . ale#Escape(ale#test#GetFilename('../test-files/bazel/WORKSPACE')) + \ . ' --some-option -' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_clangformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_clangformat_fixer_callback.vader new file mode 100644 index 0000000..130ca7f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_clangformat_fixer_callback.vader @@ -0,0 +1,64 @@ +Before: + Save g:ale_c_clangformat_executable + Save g:c_clangformat_style_option + Save g:c_clangformat_use_local_file + + " Use an invalid global executable, so we don't match it. + let g:ale_c_clangformat_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + let g:dir = getcwd() + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The clang-format callback should return the correct default values): + call ale#test#SetFilename('../test-files/c/dummy.c') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_clangformat_executable) + \ . ' --assume-filename=' . ale#Escape(bufname(bufnr(''))) + \ }, + \ ale#fixers#clangformat#Fix(bufnr('')) + +Execute(The clangformat callback should include any additional options): + call ale#test#SetFilename('../test-files/c/dummy.c') + let g:ale_c_clangformat_options = '--some-option' + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_clangformat_executable) + \ . ' --assume-filename=' . ale#Escape(bufname(bufnr(''))) + \ . ' --some-option', + \ }, + \ ale#fixers#clangformat#Fix(bufnr('')) + +Execute(The clangformat callback should include style options as well): + call ale#test#SetFilename('../test-files/c/dummy.c') + let g:ale_c_clangformat_options = '--some-option' + let g:ale_c_clangformat_style_option = '{BasedOnStyle: Microsoft, ColumnLimit:80,}' + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_clangformat_executable) + \ . ' --assume-filename=' . ale#Escape(bufname(bufnr(''))) + \ . ' --some-option' . " -style='{BasedOnStyle: Microsoft, ColumnLimit:80,}'", + \ }, + \ ale#fixers#clangformat#Fix(bufnr('')) + +Execute(The clangformat callback should use local file instead of style options): + call ale#test#SetFilename('../test-files/clangformat/with_clangformat/dummy.c') + let g:ale_c_clangformat_options = '--some-option' + let g:ale_c_clangformat_style_option = '{BasedOnStyle: Microsoft, ColumnLimit:80,}' + let g:ale_c_clangformat_use_local_file = 1 + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_clangformat_executable) + \ . ' --assume-filename=' . ale#Escape(bufname(bufnr(''))) + \ . ' --some-option' . ' -style=file', + \ }, + \ ale#fixers#clangformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_clangtidy_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_clangtidy_fixer_callback.vader new file mode 100644 index 0000000..d6678bd --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_clangtidy_fixer_callback.vader @@ -0,0 +1,47 @@ +Before: + Save g:ale_c_build_dir + Save g:ale_c_clangtidy_executable + Save g:ale_c_clangtidy_checks + Save g:ale_c_clangtidy_extra_options + Save g:ale_cpp_clangtidy_executable + Save g:ale_cpp_clangtidy_checks + Save g:ale_cpp_clangtidy_extra_options + + " Use an invalid global executable, so we don't match it. + let g:ale_c_clangtidy_executable = 'xxxinvalid' + let g:ale_c_clangtidy_checks = [] + let g:ale_c_clangtidy_extra_options = '' + let g:ale_cpp_clangtidy_executable = 'xxxinvalidpp' + let g:ale_cpp_clangtidy_checks = [] + let g:ale_cpp_clangtidy_extra_options = '' + let g:ale_c_build_dir = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The clangtidy callback should return the correct default values): + call ale#test#SetFilename('../test-files/c/dummy.c') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_c_clangtidy_executable) + \ . ' -fix -fix-errors %t' + \ }, + \ ale#fixers#clangtidy#Fix(bufnr('')) + +Execute(The clangtidy callback should include any additional options): + call ale#test#SetFilename('../test-files/c/dummy.c') + let g:ale_c_clangtidy_extra_options = '--some-option' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_c_clangtidy_executable) + \ . ' -fix -fix-errors --some-option %t', + \ }, + \ ale#fixers#clangtidy#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_cmakeformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_cmakeformat_fixer_callback.vader new file mode 100644 index 0000000..545fe06 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_cmakeformat_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_cmake_cmakeformat_executable + Save g:ale_cmake_cmakeformat_options + + " Use an invalid global executable, so we don't match it. + let g:ale_cmake_cmakeformat_executable = 'xxxinvalid' + let g:ale_cmake_cmakeformat_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The cmakeformat callback should return the correct default values): + call ale#test#SetFilename('../cmake_files/CMakeList.txt') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' -' + \ }, + \ ale#fixers#cmakeformat#Fix(bufnr('')) + +Execute(The cmakeformat callback should include custom cmakeformat options): + let g:ale_cmake_cmakeformat_options = "-r '(a) -> a'" + call ale#test#SetFilename('../cmake_files/CMakeList.txt') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_cmake_cmakeformat_options + \ . ' -', + \ }, + \ ale#fixers#cmakeformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_crystal_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_crystal_format_fixer_callback.vader new file mode 100644 index 0000000..d7d9588 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_crystal_format_fixer_callback.vader @@ -0,0 +1,33 @@ +Before: + Save g:ale_crystal_format_executable + Save g:ale_crystal_format_options + + " Use an invalid global executable, so we don't match it. + let g:ale_crystal_format_executable = 'xxxinvalid' + let g:ale_crystal_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The crystal format callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' tool format -', + \ }, + \ ale#fixers#crystal#Fix(bufnr('')) + +Execute(The crystal format callback should include custom options): + let g:ale_crystal_format_options = "-list=true" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' tool format ' . g:ale_crystal_format_options + \ . ' -', + \ }, + \ ale#fixers#crystal#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_css_beautify_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_css_beautify_fixer_callback.vader new file mode 100644 index 0000000..a6b6171 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_css_beautify_fixer_callback.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpFixerTest('css', 'css-beautify', 'beautify') + +After: + Restore + + call ale#assert#TearDownFixerTest() + +Execute(The css-beautify callback should return the correct default command): + AssertEqual + \ {'command': ale#Escape('css-beautify') . ' -'}, + \ ale#fixers#css_beautify#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_dart_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dart_format_fixer_callback.vader new file mode 100644 index 0000000..8dfd20b --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dart_format_fixer_callback.vader @@ -0,0 +1,40 @@ +Before: + Save g:ale_dart_format_executable + Save g:ale_dart_format_options + + " Use an invalid global executable, so we don't match it. + let g:ale_dart_format_executable = 'xxxinvalid' + let g:ale_dart_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dart format callback should return the correct default values): + call ale#test#SetFilename('../test-files/dart/testfile.dart') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' %t', + \ }, + \ ale#fixers#dart_format#Fix(bufnr('')) + +Execute(The dart format callback should include custom dart format options): + let g:ale_dart_format_options = "-l 80" + call ale#test#SetFilename('../test-files/dart/testfile.dart') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' ' . g:ale_dart_format_options + \ . ' %t', + \ }, + \ ale#fixers#dart_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_dartfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dartfmt_fixer_callback.vader new file mode 100644 index 0000000..c783c9a --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dartfmt_fixer_callback.vader @@ -0,0 +1,40 @@ +Before: + Save g:ale_dart_dartfmt_executable + Save g:ale_dart_dartfmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_dart_dartfmt_executable = 'xxxinvalid' + let g:ale_dart_dartfmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dartfmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/dart/testfile.dart') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -w' + \ . ' %t', + \ }, + \ ale#fixers#dartfmt#Fix(bufnr('')) + +Execute(The dartfmt callback should include custom dartfmt options): + let g:ale_dart_dartfmt_options = "-l 80" + call ale#test#SetFilename('../test-files/dart/testfile.dart') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -w' + \ . ' ' . g:ale_dart_dartfmt_options + \ . ' %t', + \ }, + \ ale#fixers#dartfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_dfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dfmt_fixer_callback.vader new file mode 100644 index 0000000..5749224 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dfmt_fixer_callback.vader @@ -0,0 +1,40 @@ +Before: + Save g:ale_d_dfmt_executable + Save g:ale_d_dfmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_d_dfmt_executable = 'xxxinvalid' + let g:ale_d_dfmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dfmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/d/test.d') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -i' + \ . ' %t', + \ }, + \ ale#fixers#dfmt#Fix(bufnr('')) + +Execute(The dfmt callback should include custom dfmt options): + let g:ale_d_dfmt_options = "--space-after-cast" + call ale#test#SetFilename('../test-files/d/test.d') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -i' + \ . ' ' . g:ale_d_dfmt_options + \ . ' %t', + \ }, + \ ale#fixers#dfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_dhall_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dhall_format_fixer_callback.vader new file mode 100644 index 0000000..8fa2fe7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dhall_format_fixer_callback.vader @@ -0,0 +1,22 @@ +Before: + Save g:ale_dhall_executable + Save g:ale_dhall_options + + " Use an invalid global executable, so we don’t match it. + let g:ale_dhall_executable = 'odd-dhall' + let g:ale_dhall_options = '--ascii' + + call ale#assert#SetUpFixerTest('dhall', 'dhall-format') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The dhall-format callback should return the correct options): + call ale#test#SetFilename('../dhall_files/testfile.dhall') + + AssertFixer + \ { + \ 'command': ale#Escape('odd-dhall') + \ . ' --ascii' + \ . ' format' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_dhall_freeze_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dhall_freeze_fixer_callback.vader new file mode 100644 index 0000000..0247369 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dhall_freeze_fixer_callback.vader @@ -0,0 +1,22 @@ +Before: + Save g:ale_dhall_executable + Save g:ale_dhall_options + + " Use an invalid global executable, so we don’t match it. + let g:ale_dhall_executable = 'odd-dhall' + let g:ale_dhall_options = '--ascii' + let g:ale_dhall_freeze_options = '--all' + + call ale#assert#SetUpFixerTest('dhall', 'dhall-freeze') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The dhall-freeze callback should return the correct options): + AssertFixer + \ { + \ 'command': ale#Escape('odd-dhall') + \ . ' --ascii' + \ . ' freeze' + \ . ' --all' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_dhall_lint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dhall_lint_fixer_callback.vader new file mode 100644 index 0000000..e2054eb --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dhall_lint_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + Save g:ale_dhall_executable + Save g:ale_dhall_options + + " Use an invalid global executable, so we don’t match it. + let g:ale_dhall_executable = 'odd-dhall' + let g:ale_dhall_options = '--ascii' + + call ale#assert#SetUpFixerTest('dhall', 'dhall-lint') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The dhall-lint callback should return the correct options): + AssertFixer + \ { + \ 'command': ale#Escape('odd-dhall') + \ . ' --ascii' + \ . ' lint' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_dotnet_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dotnet_format_fixer_callback.vader new file mode 100644 index 0000000..a399357 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dotnet_format_fixer_callback.vader @@ -0,0 +1,41 @@ +Before: + Save g:ale_cs_dotnet_format_executable + Save g:ale_cs_dotnet_format_options + + " Use an invalid global executable, so we don't match it. + let g:ale_cs_dotnet_format_executable = 'xxxinvalid' + let g:ale_cs_dotnet_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dotnet format callback should return the correct default values): + call ale#test#SetFilename('../test-files/cs/testfile.cs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' --folder --include %t "$(dirname %t)"', + \ }, + \ ale#fixers#dotnet_format#Fix(bufnr('')) + +Execute(The dotnet format callback should include custom dotnet format options): + let g:ale_cs_dotnet_format_options = "-l 80" + call ale#test#SetFilename('../test-files/cs/testfile.cs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' ' . g:ale_cs_dotnet_format_options + \ . ' --folder --include %t "$(dirname %t)"', + \ }, + \ ale#fixers#dotnet_format#Fix(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/fixers/test_dprint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dprint_fixer_callback.vader new file mode 100644 index 0000000..6a9d011 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dprint_fixer_callback.vader @@ -0,0 +1,44 @@ +Before: + call ale#assert#SetUpFixerTest('typescript', 'dprint') + call ale#test#SetFilename('../test-files/dprint/blank.ts') + let g:ale_dprint_executable_override = 0 + let g:ale_dprint_executable = 'dprint' + let g:ale_dprint_config = '' + +After: + Restore + call ale#assert#TearDownFixerTest() + +Execute(The dprint callback should return 0 for a non-existent executable): + let g:ale_dprint_executable = 'foo' + AssertFixer 0 + +Execute(The dprint callback should return the correct default values): + let g:ale_dprint_executable_override = 1 + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . ' --stdin %s' + \ } + +Execute(The dprint callback should include config): + let g:ale_dprint_executable_override = 1 + let g:ale_dprint_config = 'dprint.json' + + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . ' -c ' + \ . ale#Escape((has('win32') ? 'C:\testplugin\test\test-files\dprint\dprint.json' : '/testplugin/test/test-files/dprint/dprint.json')) + \ . ' --stdin %s' + \ } + +Execute(The dprint callback should include custom options): + let g:ale_dprint_executable_override = 1 + let g:ale_dprint_options = '--verbose' + + AssertFixer { + \ 'command': ale#Escape('dprint') + \ . ' fmt ' + \ . '--verbose' . ' --stdin %s' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_dune_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_dune_fixer_callback.vader new file mode 100644 index 0000000..7fc0733 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_dune_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_ocaml_dune_executable + Save g:ale_ocaml_dune_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ocaml_dune_executable = 'xxxinvalid' + let g:ale_ocaml_dune_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The dune callback should return the correct default values): + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' format', + \ }, + \ ale#fixers#dune#Fix(bufnr('')) + +Execute(The dune callback should include custom dune options): + let g:ale_ocaml_dune_options = "--random-option" + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' format' + \ . ' ' . g:ale_ocaml_dune_options, + \ }, + \ ale#fixers#dune#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_elm_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_elm_format_fixer_callback.vader new file mode 100644 index 0000000..3524473 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_elm_format_fixer_callback.vader @@ -0,0 +1,74 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + unlet! b:ale_elm_format_executable + unlet! b:ale_elm_format_use_global + unlet! b:ale_elm_format_options + + call ale#test#RestoreDirectory() + +Execute(The elm-format command should have default params): + call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format')) + \ . ' %t --yes', + \ }, + \ ale#fixers#elm_format#Fix(bufnr('')) + +Execute(The elm-format command should manage use_global = 1 param): + call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm') + let b:ale_elm_format_use_global = 1 + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('elm-format') + \ . ' %t --yes', + \ }, + \ ale#fixers#elm_format#Fix(bufnr('')) + +Execute(The elm-format command should manage executable param): + call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm') + let b:ale_elm_format_use_global = 1 + let b:ale_elm_format_executable = 'elmformat' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('elmformat') + \ . ' %t --yes', + \ }, + \ ale#fixers#elm_format#Fix(bufnr('')) + +Execute(The elm-format command should manage empty options): + call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm') + let b:ale_elm_format_options = '' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format')) + \ . ' %t', + \ }, + \ ale#fixers#elm_format#Fix(bufnr('')) + +Execute(The elm-format command should manage custom options): + call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm') + let b:ale_elm_format_options = '--param1 --param2' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format')) + \ . ' %t --param1 --param2', + \ }, + \ ale#fixers#elm_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_erblint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_erblint_fixer_callback.vader new file mode 100644 index 0000000..7b56e3a --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_erblint_fixer_callback.vader @@ -0,0 +1,55 @@ +Before: + Save g:ale_eruby_erblint_executable + Save g:ale_eruby_erblint_options + + " Use an invalid global executable, so we don't match it. + let g:ale_eruby_erblint_executable = 'xxxinvalid' + let g:ale_eruby_erblint_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The erblint callback should return the correct default values): + call ale#test#SetFilename('../test-files/eruby/dummy.html.erb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#erblint#PostProcess', + \ 'command': ale#Escape(g:ale_eruby_erblint_executable) + \ . ' --autocorrect --stdin %s', + \ }, + \ ale#fixers#erblint#Fix(bufnr('')) + +Execute(The erblint callback should include custom erblint options): + let g:ale_eruby_erblint_options = '--lint-all' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#erblint#PostProcess', + \ 'command': ale#Escape(g:ale_eruby_erblint_executable) + \ . ' --lint-all' + \ . ' --autocorrect --stdin %s', + \ }, + \ ale#fixers#erblint#Fix(bufnr('')) + +Execute(The erblint post-processor should remove diagnostics content): + AssertEqual + \ [ + \ '
', + \ '', + \ '
', + \ ], + \ ale#fixers#erblint#PostProcess(bufnr(''), [ + \ 'Linting 1 files with 11 autocorrectable linters...', + \ '', + \ '1 error(s) corrected in ERB files', + \ '================ /home/user/demo.html.erb ==================', + \ '
', + \ '', + \ '
', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_erlfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_erlfmt_fixer_callback.vader new file mode 100644 index 0000000..132cd6e --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_erlfmt_fixer_callback.vader @@ -0,0 +1,25 @@ +Before: + Save b:ale_elm_format_executable + Save b:ale_elm_format_options + + let b:ale_elm_format_executable = 'erlfmt' + let b:ale_elm_format_options = '' + +After: + Restore + +Execute(The erlfmt command should handle empty options): + AssertEqual + \ { + \ 'command': ale#Escape('erlfmt') . ' %s' + \ }, + \ ale#fixers#erlfmt#Fix(bufnr('')) + +Execute(The erlfmt command should handle custom options): + let b:ale_erlang_erlfmt_options = '--insert-pragma' + + AssertEqual + \ { + \ 'command': ale#Escape('erlfmt') . ' --insert-pragma %s' + \ }, + \ ale#fixers#erlfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_eslint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_eslint_fixer_callback.vader new file mode 100644 index 0000000..4a1dc47 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_eslint_fixer_callback.vader @@ -0,0 +1,339 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'eslint') + Save g:ale_command_wrapper + + runtime autoload/ale/handlers/eslint.vim + + let g:ale_command_wrapper = '' + +After: + call ale#assert#TearDownFixerTest() + +Execute(The executable path should be correct): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + " eslint_d output with an older eslint version is used here. + GivenCommandOutput ['v4.4.1 (eslint_d v5.1.0)'] + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/.eslintrc.js')) + \ . ' --fix %t', + \ } + +Execute(The ESLint fixer shouldn't run if no configuration file can be found): + call ale#test#SetFilename('../no-configuration') + AssertFixerNotExecuted + +Execute(The ESLint fixer should use a config file option if set for old versions): + call ale#test#SetFilename('../no-configuration') + let b:ale_javascript_eslint_options = '-c /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': '', + \ 'command': ale#Escape('eslint') . ' -c /foo.cfg --fix %t', + \ } + + let b:ale_javascript_eslint_options = '--bar -c /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': '', + \ 'command': ale#Escape('eslint') . ' --bar -c /foo.cfg --fix %t', + \ } + + let b:ale_javascript_eslint_options = '--config /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': '', + \ 'command': ale#Escape('eslint') . ' --config /foo.cfg --fix %t', + \ } + + let b:ale_javascript_eslint_options = '--bar --config /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': '', + \ 'command': ale#Escape('eslint') . ' --bar --config /foo.cfg --fix %t', + \ } + +Execute(The ESLint fixer should use a -c file option if set for eslint_d): + let b:ale_javascript_eslint_executable = '/bin/eslint_d' + GivenCommandOutput ['v3.19.0 (eslint_d v4.2.0)'] + call ale#test#SetFilename('../no-configuration') + let b:ale_javascript_eslint_options = '-c /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ 'cwd': '', + \ 'command': ale#Escape('/bin/eslint_d') + \ . ' -c /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-to-stdout' + \ } + + let b:ale_javascript_eslint_options = '--bar -c /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ 'cwd': '', + \ 'command': ale#Escape('/bin/eslint_d') + \ . ' --bar -c /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-to-stdout' + \ } + + let b:ale_javascript_eslint_options = '--config /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ 'cwd': '', + \ 'command': ale#Escape('/bin/eslint_d') + \ . ' --config /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-to-stdout' + \ } + + let b:ale_javascript_eslint_options = '--bar --config /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ 'cwd': '', + \ 'command': ale#Escape('/bin/eslint_d') + \ . ' --bar --config /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-to-stdout' + \ } + +Execute(The ESLint fixer should use a config file option if set for new versions): + GivenCommandOutput ['4.9.0'] + call ale#test#SetFilename('../no-configuration') + let b:ale_javascript_eslint_options = '-c /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ 'cwd': '', + \ 'command': ale#Escape('eslint') + \ . ' -c /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json' + \ } + + let b:ale_javascript_eslint_options = '--bar -c /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ 'cwd': '', + \ 'command': ale#Escape('eslint') + \ . ' --bar -c /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json' + \ } + + let b:ale_javascript_eslint_options = '--config /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ 'cwd': '', + \ 'command': ale#Escape('eslint') + \ . ' --config /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json' + \ } + + let b:ale_javascript_eslint_options = '--bar --config /foo.cfg' + + AssertFixer + \ { + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ 'cwd': '', + \ 'command': ale#Escape('eslint') + \ . ' --bar --config /foo.cfg' + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json' + \ } + +Execute(The lower priority configuration file in a nested directory should be preferred): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/subdir-with-config/.eslintrc')) + \ . ' --fix %t', + \ } + +Execute(--config in options should override configuration file detection for old versions): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js') + + let b:ale_javascript_eslint_options = '--config /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' --config /foo.cfg' + \ . ' --fix %t', + \ } + + let b:ale_javascript_eslint_options = '-c /foo.cfg' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' -c /foo.cfg' + \ . ' --fix %t', + \ } + +Execute(package.json should be used as a last resort): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-package-json/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/.eslintrc.js')) + \ . ' --fix %t', + \ } + + call ale#test#SetFilename('../test-files/eslint/package.json') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/node_modules/.bin/eslint')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/package.json')) + \ . ' --fix %t', + \ } + +Execute(The version check should be correct): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js') + + " We should run the command to get the version the first time. + GivenCommandOutput ['4.9.0'] + AssertFixer [ + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' --version', + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json', + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ }, + \] + + AssertFixer [ + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json', + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ }, + \] + +Execute(--fix-dry-run should be used for 4.9.0 and up): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + GivenCommandOutput ['4.9.0'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'), + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')) + \ . ' --stdin-filename %s --stdin --fix-dry-run --format=json', + \ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput', + \ } + +Execute(--fix-to-stdout should be used for eslint_d): + call ale#test#SetFilename('../test-files/eslint/app-with-eslint-d/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/package.json')) + \ . ' --fix %t', + \ } + + " The option should be used when eslint_d is new enough. + " We look at the ESLint version instead of the eslint_d version. + GivenCommandOutput ['v3.19.0 (eslint_d v4.2.0)'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d')) + \ . ' --stdin-filename %s --stdin --fix-to-stdout', + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ } + + " The option should be used for new versions too. + GivenCommandOutput ['4.9.0'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d')) + \ . ' --stdin-filename %s --stdin --fix-to-stdout', + \ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput', + \ } + +Execute(The --fix-dry-run post-processor should handle JSON output correctly): + AssertEqual + \ [], + \ ale#fixers#eslint#ProcessFixDryRunOutput(bufnr(''), []) + AssertEqual + \ [], + \ ale#fixers#eslint#ProcessFixDryRunOutput(bufnr(''), ['']) + AssertEqual + \ [], + \ ale#fixers#eslint#ProcessFixDryRunOutput(bufnr(''), ['[{}]']) + AssertEqual + \ ['foo', 'bar'], + \ ale#fixers#eslint#ProcessFixDryRunOutput(bufnr(''), ['[{"output": "foo\nbar"}]']) + +Execute(The eslint_d post-processor should permit regular JavaScript content): + AssertEqual + \ [ + \ 'const x = ''Error: foo''', + \ 'const y = 3', + \ ], + \ ale#fixers#eslint#ProcessEslintDOutput(bufnr(''), [ + \ 'const x = ''Error: foo''', + \ 'const y = 3', + \ ]) + +Execute(The eslint_d post-processor should handle error messages correctly): + AssertEqual + \ [], + \ ale#fixers#eslint#ProcessEslintDOutput(bufnr(''), [ + \ 'Error: No ESLint configuration found.', + \ ]) + +Execute(The eslint_d post-processor should handle failing to connect properly): + AssertEqual + \ [], + \ ale#fixers#eslint#ProcessEslintDOutput(bufnr(''), [ + \ 'Could not connect', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_fecs_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_fecs_fixer_callback.vader new file mode 100644 index 0000000..146c0a8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_fecs_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'fecs') + runtime autoload/ale/handlers/fecs.vim + +After: + call ale#assert#TearDownFixerTest() + +Execute(The fecs fixer should respect to g:ale_javascript_fecs_executable): + let g:ale_javascript_fecs_executable = '../test-files/fecs/fecs' + let g:ale_javascript_fecs_use_global = 1 + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_javascript_fecs_executable) . ' format --replace=true %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#fecs#Fix(bufnr('')) + +Execute(The fecs fixer should return 0 when executable not found): + let g:ale_javascript_fecs_executable = 'fecs-invalid' + let g:ale_javascript_fecs_use_global = 1 + AssertEqual + \ 0, + \ ale#fixers#fecs#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_fish_indent_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_fish_indent_fixer_callback.vader new file mode 100644 index 0000000..3555a97 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_fish_indent_fixer_callback.vader @@ -0,0 +1,40 @@ +Before: + Save g:ale_fish_fish_indent_executable + Save g:ale_fish_fish_indent_options + + " Use an invalid global executable, so we don't match it. + let g:ale_fish_fish_indent_executable = 'xxxinvalid' + let g:ale_fish_fish_indent_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The fish_indent callback should return the correct default values): + call ale#test#SetFilename('../test-files/fish/testfile.fish') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -w ' + \ . ' %t', + \ }, + \ ale#fixers#fish_indent#Fix(bufnr('')) + +Execute(The fish_indent callback should include custom fish_indent options): + let g:ale_fish_fish_indent_options = "-d" + call ale#test#SetFilename('../test-files/fish/testfile.fish') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -w ' + \ . ' -d' + \ . ' %t', + \ }, + \ ale#fixers#fish_indent#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_fixjson_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_fixjson_fixer_callback.vader new file mode 100644 index 0000000..2b023fa --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_fixjson_fixer_callback.vader @@ -0,0 +1,50 @@ +Before: + Save g:ale_json_fixjson_executable + Save g:ale_json_fixjson_options + + let g:ale_json_fixjson_executable = '/path/to/fixjson' + let g:ale_json_fixjson_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + +Execute(The fixjson callback should return the correct default command): + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/fixjson') + \ . ' --stdin-filename ' + \ . ale#Escape(bufname(bufnr(''))) + \ }, + \ ale#fixers#fixjson#Fix(bufnr('')) + +Execute(The fixjson callback should set the buffer name as file name): + call ale#test#SetFilename('../test-files/json/testfile.json') + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/fixjson') + \ . ' --stdin-filename ' + \ . ale#Escape(bufname(bufnr(''))) + \ }, + \ ale#fixers#fixjson#Fix(bufnr('')) + + AssertNotEqual + \ stridx( + \ ale#fixers#fixjson#Fix(bufnr('')).command, + \ 'testfile.json', + \ ), + \ -1 + +Execute(The fixjson callback should include additional options): + let g:ale_json_fixjson_options = '-i 2' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/fixjson') + \ . ' --stdin-filename ' + \ . ale#Escape(bufname(bufnr(''))) + \ . ' -i 2' + \ }, + \ ale#fixers#fixjson#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_floskell_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_floskell_fixer_callback.vader new file mode 100644 index 0000000..66fe920 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_floskell_fixer_callback.vader @@ -0,0 +1,23 @@ +Before: + Save g:ale_haskell_floskell_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_haskell_floskell_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The floskell callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' %t', + \ }, + \ ale#fixers#floskell#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_gnatpp_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_gnatpp_fixer_callback.vader new file mode 100644 index 0000000..7a3ed51 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_gnatpp_fixer_callback.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpFixerTest('ada', 'gnatpp') + +After: + " Reset fixers, variables, etc. + " + " Vader's 'Restore' command will be called here. + call ale#assert#TearDownFixerTest() + +Execute(The default command should be correct): + call ale#test#SetFilename('../test-files/ada/testfile.adb') + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_ada_gnatpp_executable) .' %t', + \ 'read_temporary_file': 1, + \ } + +Execute(The version check should be correct): + call ale#test#SetFilename('../test-files/ada/testfile.adb') + let g:ale_ada_gnatpp_options = '--no-alignment' + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_ada_gnatpp_executable) + \ . ' --no-alignment %t', + \ 'read_temporary_file': 1, + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_gofmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_gofmt_fixer_callback.vader new file mode 100644 index 0000000..579dd3d --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_gofmt_fixer_callback.vader @@ -0,0 +1,50 @@ +Before: + Save g:ale_go_gofmt_executable + Save g:ale_go_gofmt_options + Save g:ale_go_go111module + + " Use an invalid global executable, so we don't match it. + let g:ale_go_gofmt_executable = 'xxxinvalid' + let g:ale_go_gofmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#test#RestoreDirectory() + +Execute(The gofmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/go/testfile.go') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid'), + \ }, + \ ale#fixers#gofmt#Fix(bufnr('')) + +Execute(The gofmt callback should include custom gofmt options): + let g:ale_go_gofmt_options = "-r '(a) -> a'" + + call ale#test#SetFilename('../test-files/go/testfile.go') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_go_gofmt_options, + \ }, + \ ale#fixers#gofmt#Fix(bufnr('')) + +Execute(The gofmt callback should support Go environment variables): + let g:ale_go_go111module = 'off' + + call ale#test#SetFilename('../test-files/go/testfile.go') + + AssertEqual + \ { + \ 'command': ale#Env('GO111MODULE', 'off') + \ . ale#Escape('xxxinvalid') + \ }, + \ ale#fixers#gofmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_gofumpt_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_gofumpt_fixer.vader new file mode 100644 index 0000000..63e04de --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_gofumpt_fixer.vader @@ -0,0 +1,27 @@ +Before: + call ale#assert#SetUpFixerTest('go', 'gofumpt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The gofumpt callback should return the correct default values): + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('gofumpt') . ' -w -- %t' + \} + +Execute(The gofumpt callback should allow custom gofumpt executables): + let g:ale_go_gofumpt_executable = 'foo/bar' + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('foo/bar') . ' -w -- %t' + \} + +Execute(The gofumpt callback should allow custom gofumpt options): + let g:ale_go_gofumpt_options = '--foobar' + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('gofumpt') . ' --foobar -w -- %t' + \} diff --git a/dot_vim/plugged/ale/test/fixers/test_goimports_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_goimports_fixer_callback.vader new file mode 100644 index 0000000..64c75b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_goimports_fixer_callback.vader @@ -0,0 +1,57 @@ +Before: + Save g:ale_go_goimports_executable + Save g:ale_go_goimports_options + Save g:ale_go_go111module + + " Use an invalid global executable, so we don't match it. + let g:ale_go_goimports_executable = 'xxxinvalid' + let g:ale_go_goimports_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + call ale#test#SetFilename('../test-files/go/testfile.go') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#test#RestoreDirectory() + +Execute(The goimports callback should return 0 when the executable isn't executable): + AssertEqual + \ 0, + \ ale#fixers#goimports#Fix(bufnr('')) + +Execute(The goimports callback should the command when the executable test passes): + let g:ale_go_goimports_executable = has('win32') ? 'cmd' : 'echo' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w -srcdir %s %t' + \ }, + \ ale#fixers#goimports#Fix(bufnr('')) + +Execute(The goimports callback should include extra options): + let g:ale_go_goimports_executable = has('win32') ? 'cmd' : 'echo' + let g:ale_go_goimports_options = '--xxx' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_go_goimports_executable) . ' -l -w -srcdir %s --xxx %t' + \ }, + \ ale#fixers#goimports#Fix(bufnr('')) + +Execute(The goimports callback should support Go environment variables): + let g:ale_go_goimports_executable = has('win32') ? 'cmd' : 'echo' + let g:ale_go_go111module = 'on' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Env('GO111MODULE', 'on') + \ . ale#Escape(g:ale_go_goimports_executable) + \ . ' -l -w -srcdir %s %t' + \ }, + \ ale#fixers#goimports#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_golines_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_golines_fixer_callback.vader new file mode 100644 index 0000000..87e53c8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_golines_fixer_callback.vader @@ -0,0 +1,54 @@ +Before: + Save g:ale_go_golines_executable + Save g:ale_go_golines_options + Save g:ale_go_go111module + + " Use an invalid global executable, so we don't match it. + let g:ale_go_golines_executable = 'xxxinvalid' + let g:ale_go_golines_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#test#RestoreDirectory() + +Execute(The golines callback should return 0 when the executable isn't executable): + AssertEqual + \ 0, + \ ale#fixers#golines#Fix(bufnr('')) + + +Execute(The golines callback should return the correct default values): + let g:ale_go_golines_executable = has('win32') ? 'cmd' : 'echo' + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_go_golines_executable), + \ }, + \ ale#fixers#golines#Fix(bufnr('')) + +Execute(The golines callback should include custom golines options): + let g:ale_go_golines_executable = has('win32') ? 'cmd' : 'echo' + let g:ale_go_golines_options = "--max-len --shorten-comments" + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_go_golines_executable) + \ . ' ' . g:ale_go_golines_options, + \ }, + \ ale#fixers#golines#Fix(bufnr('')) + +Execute(The golines callback should support Go environment variables): + let g:ale_go_golines_executable = has('win32') ? 'cmd' : 'echo' + let g:ale_go_go111module = 'off' + + AssertEqual + \ { + \ 'command': ale#Env('GO111MODULE', 'off') + \ . ale#Escape(g:ale_go_golines_executable) + \ }, + \ ale#fixers#golines#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_gomod_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_gomod_fixer_callback.vader new file mode 100644 index 0000000..56fb985 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_gomod_fixer_callback.vader @@ -0,0 +1,41 @@ +Before: + Save g:ale_go_go_executable + Save g:ale_go_go111module + + " Use an invalid global executable, so we don't match it. + let g:ale_go_go_executable = 'xxxinvalid' + let g:ale_go_go111module = '' + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#test#RestoreDirectory() + +Execute(The gomod callback should return the correct default values): + call ale#test#SetFilename('../test-files/go/go.mod') + setl filetype=gomod + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' mod edit -fmt' + \ . ' %t', + \ }, + \ ale#fixers#gomod#Fix(bufnr('')) + +Execute(The gomod callback should support Go environment variables): + call ale#test#SetFilename('../test-files/go/go.mod') + setl filetype=gomod + let g:ale_go_go111module = 'on' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Env('GO111MODULE', 'on') + \ . ale#Escape('xxxinvalid') . ' mod edit -fmt %t' + \ }, + \ ale#fixers#gomod#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_goofle_java_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_goofle_java_format_fixer_callback.vader new file mode 100644 index 0000000..4c28b33 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_goofle_java_format_fixer_callback.vader @@ -0,0 +1,27 @@ +Before: + Save g:ale_java_google_java_format_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_java_google_java_format_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The google-java-format callback should return 0 when the executable isn't executable): + AssertEqual + \ 0, + \ ale#fixers#google_java_format#Fix(bufnr('')) + +Execute(The google-java-format callback should run the command when the executable test passes): + let g:ale_java_google_java_format_executable = has('win32') ? 'cmd' : 'echo' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(ale_java_google_java_format_executable) . ' --replace %t' + \ }, + \ ale#fixers#google_java_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_hackfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_hackfmt_fixer_callback.vader new file mode 100644 index 0000000..d294c15 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_hackfmt_fixer_callback.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_hack_hackfmt_executable + Save g:ale_hack_hackfmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_hack_hackfmt_executable = 'xxxinvalid' + let g:ale_hack_hackfmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The hackfmt callback should return the correct default values): + call ale#test#SetFilename('../hack_files/testfile.hack') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -i %t', + \ }, + \ ale#fixers#hackfmt#Fix(bufnr('')) + +Execute(The hackfmt callback should include custom hackfmt options): + let g:ale_hack_hackfmt_options = "--some-option" + call ale#test#SetFilename('../hack_files/testfile.hack') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -i --some-option %t', + \ }, + \ ale#fixers#hackfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_hfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_hfmt_fixer_callback.vader new file mode 100644 index 0000000..69cd03f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_hfmt_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_haskell_hfmt_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_haskell_hfmt_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The hfmt callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -w' + \ . ' %t', + \ }, + \ ale#fixers#hfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_hindent_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_hindent_fixer_callback.vader new file mode 100644 index 0000000..2e5a8b9 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_hindent_fixer_callback.vader @@ -0,0 +1,18 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The hindent callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('hindent') + \ . ' %t', + \ }, + \ ale#fixers#hindent#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_hlint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_hlint_fixer_callback.vader new file mode 100644 index 0000000..08f08fa --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_hlint_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The hlint callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('hlint') + \ . ' --refactor' + \ . ' --refactor-options="--inplace"' + \ . ' %t', + \ }, + \ ale#fixers#hlint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_html_beautify_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_html_beautify_fixer_callback.vader new file mode 100644 index 0000000..3012c7f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_html_beautify_fixer_callback.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpFixerTest('html', 'html-beautify', 'beautify') + +After: + Restore + + call ale#assert#TearDownFixerTest() + +Execute(The html-beautify callback should return the correct default command): + AssertEqual + \ {'command': ale#Escape('html-beautify') . ' -'}, + \ ale#fixers#html_beautify#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_importjs_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_importjs_fixer_callback.vader new file mode 100644 index 0000000..727e6a1 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_importjs_fixer_callback.vader @@ -0,0 +1,35 @@ +Before: + Save g:ale_javascript_importjs_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_javascript_importjs_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + call ale#test#SetFilename('../test-files/javascript/test.js') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The importjs callback should return 0 when the executable isn't executable): + AssertEqual + \ 0, + \ ale#fixers#importjs#Fix(bufnr('')) + +Execute(The importjs callback should run the command when the executable test passes): + let g:ale_javascript_importjs_executable = has('win32') ? 'cmd' : 'echo' + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#importjs#ProcessOutput', + \ 'command': ale#Escape(g:ale_javascript_importjs_executable) . ' fix %s' + \ }, + \ ale#fixers#importjs#Fix(bufnr('')) + +Execute(The ProcessOutput callback should return the expected output): + let g:testOutput = '{"messages":[],"fileContent":"one\ntwo","unresolvedImports":{}}' + + AssertEqual + \ ['one', 'two'], + \ ale#fixers#importjs#ProcessOutput(bufnr(''), g:testOutput) diff --git a/dot_vim/plugged/ale/test/fixers/test_isort_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_isort_fixer_callback.vader new file mode 100644 index 0000000..8b665d6 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_isort_fixer_callback.vader @@ -0,0 +1,70 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'isort') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! g:dir + unlet! b:bin_dir + +Execute(The isort callback should return the correct default values): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " --filename option exists only after 5.7.0 + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' --filename %s' . ' -', + \ } + +Execute(The isort callback should respect custom options): + let g:ale_python_isort_options = '--multi-line=3 --trailing-comma' + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " --filename option exists only after 5.7.0 + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) + \ . ' --filename %s' . ' --multi-line=3 --trailing-comma -', + \ } + +Execute(Pipenv is detected when python_isort_auto_pipenv is set): + let g:ale_python_isort_auto_pipenv = 1 + + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('pipenv') . ' run isort' . ' --filename %s' . ' -' + \ } + +Execute(Poetry is detected when python_isort_auto_poetry is set): + let g:ale_python_isort_auto_poetry = 1 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('poetry') . ' run isort' . ' --filename %s' . ' -' + \ } + +Execute(The isort callback should not use --filename for older versions): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " --filename option exists only after 5.7.0 + GivenCommandOutput ['VERSION 5.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_jq_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_jq_fixer_callback.vader new file mode 100644 index 0000000..74580d3 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_jq_fixer_callback.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_json_jq_executable + Save g:ale_json_jq_options + Save g:ale_json_jq_filters + +After: + Restore + +Execute(The jq fixer should use the options you set): + let g:ale_json_jq_executable = 'foo' + let g:ale_json_jq_options = '--bar' + let g:ale_json_jq_filters = '.baz' + + AssertEqual + \ {'command': ale#Escape('foo') . ' .baz --bar'}, + \ ale#fixers#jq#Fix(bufnr('')) + +Execute(The jq fixer should return 0 when there are no filters): + let g:ale_json_jq_executable = 'jq' + let g:ale_json_jq_options = '' + + let g:ale_json_jq_filters = '' + + AssertEqual + \ 0, + \ ale#fixers#jq#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_jsonnetfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_jsonnetfmt_fixer_callback.vader new file mode 100644 index 0000000..204d658 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_jsonnetfmt_fixer_callback.vader @@ -0,0 +1,38 @@ +Before: + Save g:ale_jsonnet_jsonnetfmt_executable + Save g:ale_jsonnet_jsonnetfmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_jsonnet_jsonnetfmt_executable = 'xxxinvalid' + let g:ale_jsonnet_jsonnetfmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + call ale#assert#SetUpFixerTest('jsonnet', 'jsonnetfmt') + +After: + call ale#test#RestoreDirectory() + call ale#assert#TearDownFixerTest() + +Execute(The jsonnetfmt callback should return the correct default values): + call ale#test#SetFilename('../jsonnet_files/testfile.jsonnet') + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_jsonnet_jsonnetfmt_executable) + \ . ' -i' + \ . ' %t', + \} + +Execute(The jsonnetfmt callback should include custom options): + let g:ale_jsonnet_jsonnetfmt_options = '--pad-arrays' + + call ale#test#SetFilename('../jsonnet_files/testfile.jsonnet') + + AssertFixer { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_jsonnet_jsonnetfmt_executable) + \ . ' -i' + \ . ' ' . g:ale_jsonnet_jsonnetfmt_options + \ . ' %t', + \} + diff --git a/dot_vim/plugged/ale/test/fixers/test_ktlint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ktlint_fixer_callback.vader new file mode 100644 index 0000000..cfe3920 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ktlint_fixer_callback.vader @@ -0,0 +1,42 @@ +Before: + Save g:ale_kotlin_ktlint_executable + Save g:ale_kotlin_ktlint_options + Save g:ale_kotlin_ktlint_rulesets + + " Use an invalid global executable, so we don't match it. + let g:ale_kotlin_ktlint_executable = 'xxxinvalid' + let g:ale_kotlin_ktlint_options = '' + let g:ale_kotlin_ktlint_rulesets = [] + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The ktlint callback should return the correct default values): + call ale#test#SetFilename('../test-files/kotlin/testfile.kt') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' --stdin' + \ . ' --format', + \ }, + \ ale#fixers#ktlint#Fix(bufnr('')) + +Execute(The ktlint callback should include custom ktlint options): + let g:ale_kotlin_ktlint_options = "--android" + let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom/ruleset.jar'] + call ale#test#SetFilename('../test-files/kotlin/testfile.kt') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_kotlin_ktlint_options + \ . ' --ruleset /path/to/custom/ruleset.jar' + \ . ' --stdin' + \ . ' --format', + \ }, + \ ale#fixers#ktlint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_latexindent_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_latexindent_fixer_callback.vader new file mode 100644 index 0000000..bd4ac69 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_latexindent_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_tex_latexindent_executable + Save g:ale_tex_latexindent_options + + " Use an invalid global executable, so we don't match it. + let g:ale_tex_latexindent_executable = 'xxxinvalid' + let g:ale_tex_latexindent_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The latexindent callback should return the correct default values): + call ale#test#SetFilename('../test-files/tex/testfile.tex') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' -l' + \ }, + \ ale#fixers#latexindent#Fix(bufnr('')) + +Execute(The latexindent callback should include custom gofmt options): + let g:ale_tex_latexindent_options = "-l '~/.indentconfig.yaml'" + call ale#test#SetFilename('../test-files/tex/testfile.tex') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' -l' + \ . ' ' . g:ale_tex_latexindent_options + \ }, + \ ale#fixers#latexindent#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_lua_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_lua_format_fixer_callback.vader new file mode 100644 index 0000000..29cafde --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_lua_format_fixer_callback.vader @@ -0,0 +1,35 @@ +Before: + Save g:ale_lua_lua_format_executable + Save g:ale_lua_lua_format_options + + " Use an invalid global executable, so we don't match it. + let g:ale_lua_lua_format_executable = 'xxxinvalid' + let g:ale_lua_lua_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The lua_format callback should return the correct default values): + call ale#test#SetFilename('../test-files/lua/testfile.lua') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' -i', + \ }, + \ ale#fixers#lua_format#Fix(bufnr('')) + +Execute(The lua_format callback should include custom lua_format options): + let g:ale_lua_lua_format_options = "--no-chop-down-table" + call ale#test#SetFilename('../test-files/lua/testfile.lua') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_lua_lua_format_options + \ . ' -i', + \ }, + \ ale#fixers#lua_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_luafmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_luafmt_fixer_callback.vader new file mode 100644 index 0000000..ef69f29 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_luafmt_fixer_callback.vader @@ -0,0 +1,35 @@ +Before: + Save g:ale_lua_luafmt_executable + Save g:ale_lua_luafmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_lua_luafmt_executable = 'xxxinvalid' + let g:ale_lua_luafmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The luafmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/lua/testfile.lua') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' --stdin', + \ }, + \ ale#fixers#luafmt#Fix(bufnr('')) + +Execute(The luafmt callback should include custom luafmt options): + let g:ale_lua_luafmt_options = "--skip-children" + call ale#test#SetFilename('../test-files/lua/testfile.lua') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_lua_luafmt_options + \ . ' --stdin', + \ }, + \ ale#fixers#luafmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_mix_format_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_mix_format_fixer_callback.vader new file mode 100644 index 0000000..cd492e8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_mix_format_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_elixir_mix_executable + Save g:ale_elixir_mix_format_options + + let g:ale_elixir_mix_executable = 'xxxinvalid' + let g:ale_elixir_mix_format_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The mix_format callback should return the correct default values): + call ale#test#SetFilename('../test-files/elixir/testfile.ex') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format %t', + \ }, + \ ale#fixers#mix_format#Fix(bufnr('')) + +Execute(The mix_format callback should include the correct format options): + let g:ale_elixir_mix_format_options = 'invalid_options' + call ale#test#SetFilename('../test-files/elixir/testfile.ex') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format invalid_options %t', + \ }, + \ ale#fixers#mix_format#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_nimpretty_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_nimpretty_fixer_callback.vader new file mode 100644 index 0000000..a26f649 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_nimpretty_fixer_callback.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpFixerTest('nim', 'nimpretty') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The nimpretty callback should return the correct default values): + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('nimpretty') . ' %t --maxLineLen:80' + \ }, + \ ale#fixers#nimpretty#Fix(bufnr('')) + +Execute(The nimpretty callback should include any additional options): + let g:ale_nim_nimpretty_options = '--some-option' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('nimpretty') . ' %t --some-option' + \ }, + \ ale#fixers#nimpretty#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_nixfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_nixfmt_fixer_callback.vader new file mode 100644 index 0000000..880ac83 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_nixfmt_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_nix_nixfmt_executable + Save g:ale_nix_nixfmt_options + +After: + Restore + +Execute(The nixfmt callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('nixfmt') + \ }, + \ ale#fixers#nixfmt#Fix(bufnr('')) + +Execute(The nixfmt executable and options should be configurable): + let g:ale_nix_nixfmt_executable = '/path/to/nixfmt' + let g:ale_nix_nixfmt_options = '--help' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/nixfmt') + \ . ' --help', + \ }, + \ ale#fixers#nixfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_nixpkgsfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_nixpkgsfmt_fixer_callback.vader new file mode 100644 index 0000000..0065f77 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_nixpkgsfmt_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_nix_nixpkgsfmt_executable + Save g:ale_nix_nixpkgsfmt_options + +After: + Restore + +Execute(The nixpkgs-fmt callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('nixpkgs-fmt') + \ }, + \ ale#fixers#nixpkgsfmt#Fix(bufnr('')) + +Execute(The nixpkgs-fmt executable and options should be configurable): + let g:ale_nix_nixpkgsfmt_executable = '/path/to/nixpkgs-fmt' + let g:ale_nix_nixpkgsfmt_options = '-h' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/nixpkgs-fmt') + \ . ' -h', + \ }, + \ ale#fixers#nixpkgsfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_ocamlformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ocamlformat_fixer_callback.vader new file mode 100644 index 0000000..587fcf5 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ocamlformat_fixer_callback.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_ocaml_ocamlformat_executable + Save g:ale_ocaml_ocamlformat_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ocaml_ocamlformat_executable = 'xxxinvalid' + let g:ale_ocaml_ocamlformat_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The ocamlformat callback should return the correct default values): + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' --name=%s -', + \ }, + \ ale#fixers#ocamlformat#Fix(bufnr('')) + +Execute(The ocamlformat callback should include custom ocamlformat options): + let g:ale_ocaml_ocamlformat_options = "-m 78" + call ale#test#SetFilename('../test-files/ocaml/testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_ocaml_ocamlformat_options + \ . ' --name=%s -', + \ }, + \ ale#fixers#ocamlformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_ocp_indent_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ocp_indent_fixer_callback.vader new file mode 100644 index 0000000..fc336b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ocp_indent_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_ocaml_ocp_indent_executable + Save g:ale_ocaml_ocpindent_options + + " Use an invalid global executable + let g:ale_ocaml_ocp_indent_executable = 'xxxinvalid' + let g:ale_ocaml_ocp_indent_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The ocp_indent callback should return the correct default values): + call ale#test#SetFilename('../test-files/ocaml/ocp_inden_testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ }, + \ ale#fixers#ocp_indent#Fix(bufnr('')) + +Execute(The ocp_indent callback should include custom ocp_indent options): + let g:ale_ocaml_ocp_indent_config = "base=4, type=4" + call ale#test#SetFilename('../test-files/ocaml/ocp_inden_testfile.re') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' --config=' . ale#Escape(g:ale_ocaml_ocp_indent_config) + \ }, + \ ale#fixers#ocp_indent#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_opa_fmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_opa_fmt_fixer_callback.vader new file mode 100644 index 0000000..3b112b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_opa_fmt_fixer_callback.vader @@ -0,0 +1,33 @@ +Before: + Save g:ale_opa_fmt_executable + Save g:ale_opa_fmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_opa_fmt_executable = 'xxxinvalid' + let g:ale_opa_fmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The opa fmt callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt', + \ }, + \ ale#fixers#opafmt#Fix(bufnr('')) + +Execute(The opa fmt callback should include custom options): + let g:ale_opa_fmt_options = "--list" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt' + \ . ' ' . g:ale_opa_fmt_options + \ }, + \ ale#fixers#opafmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_ormolu_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ormolu_fixer_callback.vader new file mode 100644 index 0000000..8df3fca --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ormolu_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_haskell_ormolu_executable + Save g:ale_haskell_ormolu_options + +After: + Restore + +Execute(The ormolu callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('ormolu') + \ }, + \ ale#fixers#ormolu#Fix(bufnr('')) + +Execute(The ormolu executable and options should be configurable): + let g:ale_nix_nixpkgsfmt_executable = '/path/to/ormolu' + let g:ale_nix_nixpkgsfmt_options = '-h' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/ormolu') + \ . ' -h', + \ }, + \ ale#fixers#nixpkgsfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_packer_fmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_packer_fmt_fixer_callback.vader new file mode 100644 index 0000000..2eb07ed --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_packer_fmt_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_packer_fmt_executable + Save g:ale_packer_fmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_packer_fmt_executable = 'xxxinvalid' + let g:ale_packer_fmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The packer fmt callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt -', + \ }, + \ ale#fixers#packer#Fix(bufnr('')) + +Execute(The packer fmt callback should include custom options): + let g:ale_packer_fmt_options = "-list=true" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt' + \ . ' ' . g:ale_packer_fmt_options + \ . ' -', + \ }, + \ ale#fixers#packer#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_pandoc_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_pandoc_fixer_callback.vader new file mode 100644 index 0000000..a364ee5 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_pandoc_fixer_callback.vader @@ -0,0 +1,23 @@ +Before: + Save g:ale_markdown_pandoc_executable + Save g:ale_markdown_pandoc_options + +After: + Restore + +Execute(The pandoc callback should return 'pandoc' as default command): + setlocal noexpandtab + Assert + \ ale#fixers#pandoc#Fix(bufnr('')).command =~# '^' . ale#Escape('pandoc'), + \ "Default command name is expected to be 'pandoc'" + +Execute(The pandoc executable and options should be configurable): + let g:ale_markdown_pandoc_executable = 'foobar' + let g:ale_markdown_pandoc_options = '--some-option' + + AssertEqual + \ { + \ 'command': ale#Escape('foobar') + \ . ' --some-option', + \ }, + \ ale#fixers#pandoc#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_perltidy_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_perltidy_fixer_callback.vader new file mode 100644 index 0000000..c7430bf --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_perltidy_fixer_callback.vader @@ -0,0 +1,40 @@ +Before: + Save g:ale_perl_perltidy_executable + Save g:ale_perl_perltidy_options + + " Use an invalid global executable, so we don't match it. + let g:ale_perl_perltidy_executable = 'xxxinvalid' + let g:ale_perl_perltidy_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The perltidy callback should return the correct default values): + call ale#test#SetFilename('../pl_files/testfile.pl') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -b' + \ . ' %t', + \ }, + \ ale#fixers#perltidy#Fix(bufnr('')) + +Execute(The perltidy callback should include custom perltidy options): + let g:ale_perl_perltidy_options = "-r '(a) -> a'" + call ale#test#SetFilename('../pl_files/testfile.pl') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' -b' + \ . ' ' . g:ale_perl_perltidy_options + \ . ' %t', + \ }, + \ ale#fixers#perltidy#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_pgformatter_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_pgformatter_fixer_callback.vader new file mode 100644 index 0000000..5baa6f6 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_pgformatter_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_sql_pgformatter_executable + Save g:ale_sql_pgformatter_options + +After: + Restore + +Execute(The pgFormatter callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('pg_format') + \ }, + \ ale#fixers#pgformatter#Fix(bufnr('')) + +Execute(The pgFormatter executable and options should be configurable): + let g:ale_sql_pgformatter_executable = '/path/to/pg_format' + let g:ale_sql_pgformatter_options = '-n' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/pg_format') + \ . ' -n', + \ }, + \ ale#fixers#pgformatter#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_php_cs_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_php_cs_fixer.vader new file mode 100644 index 0000000..eb4d78f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_php_cs_fixer.vader @@ -0,0 +1,62 @@ +Before: + Save g:ale_php_cs_fixer_executable + Save g:ale_php_cs_fixer_options + let g:ale_php_cs_fixer_executable = 'php-cs-fixer' + let g:ale_php_cs_fixer_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + + +Execute(project with php-cs-fixer should use local by default): + call ale#test#SetFilename('../test-files/php/project-with-php-cs-fixer/test.php') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-php-cs-fixer/vendor/bin/php-cs-fixer'), + \ ale#fixers#php_cs_fixer#GetExecutable(bufnr('')) + +Execute(use-global should override local detection): + let g:ale_php_cs_fixer_use_global = 1 + call ale#test#SetFilename('../test-files/php/project-with-php-cs-fixer/test.php') + + AssertEqual + \ 'php-cs-fixer', + \ ale#fixers#php_cs_fixer#GetExecutable(bufnr('')) + +Execute(project without php-cs-fixer should use global): + call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/test.php') + + AssertEqual + \ 'php-cs-fixer', + \ ale#fixers#php_cs_fixer#GetExecutable(bufnr('')) + + + + +Execute(The php-cs-fixer callback should return the correct default values): + call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/foo/test.php') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('php-cs-fixer') + \ . ' ' . g:ale_php_cs_fixer_options + \ . ' fix %t' + \ }, + \ ale#fixers#php_cs_fixer#Fix(bufnr('')) + +Execute(The php-cs-fixer callback should include custom php-cs-fixer options): + let g:ale_php_cs_fixer_options = '--config="$HOME/.php_cs"' + call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/test.php') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_php_cs_fixer_executable) + \ . ' --config="$HOME/.php_cs" fix %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#php_cs_fixer#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_phpcbf_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_phpcbf_fixer_callback.vader new file mode 100644 index 0000000..45229a1 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_phpcbf_fixer_callback.vader @@ -0,0 +1,117 @@ +Before: + Save g:ale_php_phpcbf_executable + Save g:ale_php_phpcbf_standard + Save g:ale_php_phpcbf_use_global + + let g:ale_php_phpcbf_executable = 'phpcbf_test' + let g:ale_php_phpcbf_standard = '' + let g:ale_php_phpcbf_options = '' + let g:ale_php_phpcbf_use_global = 0 + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(project with phpcbf should use local by default): + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf'), + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(use-global should override local detection): + let g:ale_php_phpcbf_use_global = 1 + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ 'phpcbf_test', + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(project without phpcbf should use global): + call ale#test#SetFilename('../test-files/php/project-without-phpcbf/foo/test.php') + + AssertEqual + \ 'phpcbf_test', + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(The phpcbf callback should return the correct default values): + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' }, + \ ale#fixers#phpcbf#Fix(bufnr('')) + +Execute(The phpcbf callback should include the phpcbf_standard option): + let g:ale_php_phpcbf_standard = 'phpcbf_ruleset.xml' + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'}, + \ ale#fixers#phpcbf#Fix(bufnr('')) + +Execute(User provided options should be used): + let g:ale_php_phpcbf_options = '--my-user-provided-option my-value' + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . ale#Pad('--my-user-provided-option my-value') . ' -'}, + \ ale#fixers#phpcbf#Fix(bufnr('')) + + +Before: + Save g:ale_php_phpcbf_executable + Save g:ale_php_phpcbf_standard + Save g:ale_php_phpcbf_use_global + + let g:ale_php_phpcbf_executable = 'phpcbf_test' + let g:ale_php_phpcbf_standard = '' + let g:ale_php_phpcbf_options = '' + let g:ale_php_phpcbf_use_global = 0 + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(project with phpcbf should use local by default): + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf'), + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(use-global should override local detection): + let g:ale_php_phpcbf_use_global = 1 + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ 'phpcbf_test', + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(project without phpcbf should use global): + call ale#test#SetFilename('../test-files/php/project-without-phpcbf/foo/test.php') + + AssertEqual + \ 'phpcbf_test', + \ ale#fixers#phpcbf#GetExecutable(bufnr('')) + +Execute(The phpcbf callback should return the correct default values): + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' }, + \ ale#fixers#phpcbf#Fix(bufnr('')) + +Execute(The phpcbf callback should include the phpcbf_standard option): + let g:ale_php_phpcbf_standard = 'phpcbf_ruleset.xml' + call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'}, + \ ale#fixers#phpcbf#Fix(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/fixers/test_pint_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_pint_fixer.vader new file mode 100644 index 0000000..5ea28b3 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_pint_fixer.vader @@ -0,0 +1,62 @@ +Before: + Save g:ale_php_pint_executable + Save g:ale_php_pint_options + let g:ale_php_pint_executable = 'pint' + let g:ale_php_pint_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + + +Execute(project with pint should use local by default): + call ale#test#SetFilename('../test-files/php/project-with-pint/test.php') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-pint/vendor/bin/pint'), + \ ale#fixers#pint#GetExecutable(bufnr('')) + +Execute(use-global should override local detection): + let g:ale_php_pint_use_global = 1 + call ale#test#SetFilename('../test-files/php/project-with-pint/test.php') + + AssertEqual + \ 'pint', + \ ale#fixers#pint#GetExecutable(bufnr('')) + +Execute(project without pint should use global): + call ale#test#SetFilename('../test-files/php/project-without-pint/test.php') + + AssertEqual + \ 'pint', + \ ale#fixers#pint#GetExecutable(bufnr('')) + + + + +Execute(The pint callback should return the correct default values): + call ale#test#SetFilename('../test-files/php/project-without-pint/foo/test.php') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('pint') + \ . ' ' . g:ale_php_pint_options + \ . ' %t' + \ }, + \ ale#fixers#pint#Fix(bufnr('')) + +Execute(The pint callback should include custom pint options): + let g:ale_php_pint_options = '--test' + call ale#test#SetFilename('../test-files/php/project-without-pint/test.php') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_php_pint_executable) + \ . ' --test %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#pint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_prettier_eslint_fixer.callback.vader b/dot_vim/plugged/ale/test/fixers/test_prettier_eslint_fixer.callback.vader new file mode 100644 index 0000000..cfdd1c7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_prettier_eslint_fixer.callback.vader @@ -0,0 +1,97 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'prettier_eslint') + Save g:ale_command_wrapper + + let g:ale_command_wrapper = '' + +After: + call ale#assert#TearDownFixerTest() + +Execute(The default command should be correct): + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('prettier-eslint') + \ . ' %t' + \ . ' --write' + \ } + +Execute(Additional options should be used when set): + let b:ale_javascript_prettier_eslint_options = '--foobar' + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('prettier-eslint') + \ . ' %t' + \ . ' --foobar --write' + \ } + +Execute(--eslint-config-path should be set for 4.2.0 and up): + call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js') + + GivenCommandOutput ['4.2.0'] + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('prettier-eslint') + \ . ' %t' + \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js')) + \ . ' --write' + \ } + +Execute(--eslint-config-path shouldn't be used for older versions): + call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('prettier-eslint') + \ . ' %t' + \ . ' --write' + \ } + +Execute(The version check should be correct): + AssertFixer [ + \ ale#Escape('prettier-eslint') . ' --version', + \ { + \ 'read_temporary_file': 1, + \ 'command': + \ ale#Escape('prettier-eslint') + \ . ' %t' + \ . ' --write' + \ } + \] + +Execute(The new --stdin-filepath option should be used when the version is new enough): + call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js') + + GivenCommandOutput ['4.4.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('prettier-eslint') + \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js')) + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(The version number should be cached): + GivenCommandOutput ['4.4.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('prettier-eslint') + \ . ' --stdin-filepath %s --stdin', + \ } + + GivenCommandOutput [] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('prettier-eslint') + \ . ' --stdin-filepath %s --stdin', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_prettier_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_prettier_fixer_callback.vader new file mode 100644 index 0000000..8da13fc --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_prettier_fixer_callback.vader @@ -0,0 +1,337 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'prettier') + Save g:ale_command_wrapper + + let g:ale_command_wrapper = '' + +After: + call ale#assert#TearDownFixerTest() + +Execute(The prettier callback should return the correct default values): + call ale#test#SetFilename('../test-files/prettier/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' %t' + \ . ' --write', + \ } + +Execute(The --config option should not be set automatically): + let g:ale_javascript_prettier_use_local_config = 1 + call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' %t' + \ . ' --write', + \ } + +Execute(The prettier callback should include custom prettier options): + let g:ale_javascript_prettier_options = '--no-semi' + call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' %t' + \ . ' --no-semi' + \ . ' --write', + \ } + +Execute(The version check should be correct): + call ale#test#SetFilename('../test-files/prettier/testfile.js') + + AssertFixer [ + \ ale#Escape('prettier') . ' --version', + \ {'read_temporary_file': 1, 'command': ale#Escape('prettier') . ' %t --write'} + \] + +Execute(--stdin-filepath should be used when prettier is new enough): + let g:ale_javascript_prettier_options = '--no-semi' + call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js') + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --no-semi' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(The version number should be cached): + call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js') + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --stdin-filepath %s --stdin', + \ } + + GivenCommandOutput [] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser to `babylon` by default, < 1.16.0): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=javascript + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser babylon' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser to `babel` by default, >= 1.16.0): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=javascript + + GivenCommandOutput ['1.16.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser babel' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, TypeScript): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=typescript + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser typescript' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, CSS): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=css + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser css' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, LESS): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=less + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser less' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, SCSS): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=scss + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser scss' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, JSON): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=json + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser json' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, JSON5): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=json5 + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser json5' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, GraphQL): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=graphql + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser graphql' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, Markdown): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=markdown + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser markdown' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, Vue): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=vue + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser vue' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, YAML): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=yaml + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser yaml' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, HTML): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=html + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser html' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on filetype, Ruby): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=ruby + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser ruby' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser based on first filetype of multiple filetypes): + call ale#test#SetFilename('../test-files/prettier/testfile') + + set filetype=css.scss + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser css' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Should set --parser for experimental language, Handlebars): + call ale#test#SetFilename('../test-files/prettier/testfile.hbs') + + set filetype=html.handlebars + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --parser glimmer' + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(Changes to directory where .prettierignore is found): + call ale#test#SetFilename('../test-files/prettier/with_prettierignore/src/testfile.js') + + GivenCommandOutput ['1.6.0'] + AssertFixer + \ { + \ 'cwd': expand('%:p:h:h'), + \ 'command': ale#Escape(g:ale_javascript_prettier_executable) + \ . ' --stdin-filepath %s --stdin', + \ } + +Execute(The prettier_d post-processor should permit regular JavaScript content): + AssertEqual + \ [ + \ 'const x = ''Error: foo''', + \ 'const y = 3', + \ ], + \ ale#fixers#prettier#ProcessPrettierDOutput(bufnr(''), [ + \ 'const x = ''Error: foo''', + \ 'const y = 3', + \ ]) + +Execute(The prettier_d post-processor should handle error messages correctly): + AssertEqual + \ [], + \ ale#fixers#prettier#ProcessPrettierDOutput(bufnr(''), [ + \ 'SyntaxError: Unexpected token, expected "," (36:28)', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_prettier_standard_callback.vader b/dot_vim/plugged/ale/test/fixers/test_prettier_standard_callback.vader new file mode 100644 index 0000000..f5037ed --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_prettier_standard_callback.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'prettier_standard') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The prettier callback should return the correct default values): + call ale#test#SetFilename('../test-files/prettier/testfile.js') + + AssertFixer + \ { + \ 'command': ale#Escape(g:ale_javascript_prettier_standard_executable) + \ . ' --stdin' + \ . ' --stdin-filepath=%s ', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_protolint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_protolint_fixer_callback.vader new file mode 100644 index 0000000..5a6931d --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_protolint_fixer_callback.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpFixerTest('proto', 'protolint') + call ale#test#SetFilename('test.proto') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The default command should be correct): + AssertFixer + \ { + \ 'command': ale#Escape('protolint') + \ . ' -fix' + \ . ' %t', + \ 'read_temporary_file': 1, + \ } + +Execute(The callback should include any additional options): + let b:ale_proto_protolint_executable = '/tmp/protolint' + let b:ale_proto_protolint_config = '/tmp/protolint.yaml' + + AssertFixer + \ { + \ 'command': ale#Escape('/tmp/protolint') + \ . ' -config_path=' . ale#Escape('/tmp/protolint.yaml') + \ . ' -fix' + \ . ' %t', + \ 'read_temporary_file': 1, + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_ptop_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ptop_fixer_callback.vader new file mode 100644 index 0000000..7cf632e --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ptop_fixer_callback.vader @@ -0,0 +1,38 @@ +Before: + Save g:ale_pascal_ptop_executable + Save g:ale_pascal_ptop_options + + " Use an invalid global executable, so we don't match it. + let g:ale_pascal_ptop_executable = 'xxxinvalid' + let g:ale_pascal_ptop_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The ptop callback should return the correct default values): + call ale#test#SetFilename('../test-files/pascal/test.pas') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' %s %t', + \ }, + \ ale#fixers#ptop#Fix(bufnr('')) + +Execute(The ptop callback should include custom ptop options): + let g:ale_pascal_ptop_options = "-i 2" + call ale#test#SetFilename('../test-files/pascal/test.pas') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_pascal_ptop_options + \ . ' %s %t', + \ }, + \ ale#fixers#ptop#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_puppetlint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_puppetlint_fixer_callback.vader new file mode 100644 index 0000000..1a5a6ce --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_puppetlint_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_puppet_puppetlint_executable + Save g:ale_puppet_puppetlint_options + + " Use an invalid global executable, so we don't match it. + let g:ale_puppet_puppetlint_executable = 'xxxinvalid' + let g:ale_puppet_puppetlint_options = '--invalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The puppetlint callback should return the correct default values): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/puppet/dummy.pp') + + AssertEqual + \ {'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_puppet_puppetlint_executable) + \ . ' ' . g:ale_puppet_puppetlint_options + \ . ' --fix %t' }, + \ ale#fixers#puppetlint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_purs_tidy_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_purs_tidy_fixer_callback.vader new file mode 100644 index 0000000..fdeb3f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_purs_tidy_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + Save g:ale_purescript_tidy_executable + Save g:ale_purescript_tidy_options + + " Use an invalid global executable, so we don’t match it. + let g:ale_purescript_tidy_executable = 'odd-purs-tidy' + let g:ale_purescript_tidy_options = '--indent 3' + + call ale#assert#SetUpFixerTest('purescript', 'purs-tidy') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The purs-tidy callback should return the correct custom options): + AssertFixer + \ { + \ 'command': ale#Escape('odd-purs-tidy') + \ . ' format' + \ . ' --indent 3' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_purty_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_purty_fixer_callback.vader new file mode 100644 index 0000000..e83b8c1 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_purty_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_purescript_purty_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_purescript_purty_executable = 'my-special-purty' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The purty callback should return the correct options): + call ale#test#SetFilename('../purescript_files/testfile.purs') + + AssertEqual + \ { + \ 'command': ale#Escape('my-special-purty') + \ . ' --write' + \ . ' %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#purty#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_pyflyby_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_pyflyby_fixer_callback.vader new file mode 100644 index 0000000..d017572 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_pyflyby_fixer_callback.vader @@ -0,0 +1,38 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'pyflyby') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! b:bin_dir + +Execute(The pyflyby callback should return the correct default values): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertFixer + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/tidy-imports')), + \ } + +Execute(Pipenv is detected when python_pyflyby_auto_pipenv is set): + let g:ale_python_pyflyby_auto_pipenv = 1 + + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertFixer + \ { + \ 'command': ale#Escape('pipenv') . ' run tidy-imports' + \ } + +Execute(Poetry is detected when python_pyflyby_auto_poetry is set): + let g:ale_python_pyflyby_auto_poetry = 1 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + GivenCommandOutput ['VERSION 5.7.0'] + AssertFixer + \ { + \ 'command': ale#Escape('poetry') . ' run tidy-imports' + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_python_add_blank_lines_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_python_add_blank_lines_fixer.vader new file mode 100644 index 0000000..7d042c8 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_python_add_blank_lines_fixer.vader @@ -0,0 +1,167 @@ +Before: + Save g:ale_fixers + +After: + Restore + +Given python(Some Python without blank lines): + def foo(): + """ This is a simple test docstring """ + return 1 + + + def bar(): + '''This is another simple test docstring''' + return 1 + return 4 + + + def bar(): + """ + This is a multi-line + docstring + """ + + if x: + pass + for l in x: + pass + for l in x: + pass + break + continue + elif x: + pass + while x: + pass + while x: + pass + else: + pass + if x: + pass + elif x: + pass + else: + pass + +Execute(Blank lines should be added appropriately): + let g:ale_fixers = {'python': ['add_blank_lines_for_python_control_statements']} + ALEFix + +Expect python(Newlines should be added): + def foo(): + """ This is a simple test docstring """ + + return 1 + + + def bar(): + '''This is another simple test docstring''' + + return 1 + + return 4 + + + def bar(): + """ + This is a multi-line + docstring + """ + + if x: + pass + + for l in x: + pass + + for l in x: + pass + + break + + continue + elif x: + pass + + while x: + pass + + while x: + pass + else: + pass + + if x: + pass + elif x: + pass + else: + pass + +Given python(A file with a main block): + import os + + + def main(): + print('hello') + + + if __name__ == '__main__': + main() + +Execute(Fix the file): + let g:ale_fixers = {'python': ['add_blank_lines_for_python_control_statements']} + ALEFix + +Expect python(extra newlines shouldn't be added to the main block): + import os + + + def main(): + print('hello') + + + if __name__ == '__main__': + main() + + +Given python(A file with variables/docstring that start with a control statement): + def some(): + """ + This is a docstring that contains an + break control statement and also contains a + return something funny. + """ + + continue_some_var = True + forward_something = False + + if ( + continue_some_var and + forwarded_something + ): + return True + + +Execute(Fix the file): + let g:ale_fixers = {'python': ['add_blank_lines_for_python_control_statements']} + ALEFix + +Expect python(Extra new lines are not added to the file): + def some(): + """ + This is a docstring that contains an + break control statement and also contains a + return something funny. + """ + + continue_some_var = True + forward_something = False + + if ( + continue_some_var and + forwarded_something + ): + return True diff --git a/dot_vim/plugged/ale/test/fixers/test_qmlfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_qmlfmt_fixer_callback.vader new file mode 100644 index 0000000..e216f2e --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_qmlfmt_fixer_callback.vader @@ -0,0 +1,12 @@ +Before: + Save g:ale_qml_qmlfmt_executable + +After: + Restore + +Execute(The qmlfmt fixer should use the options you set): + let g:ale_qml_qmlfmt_executable = 'foo-exe' + + AssertEqual + \ {'command': ale#Escape('foo-exe')}, + \ ale#fixers#qmlfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_raco_fmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_raco_fmt_fixer_callback.vader new file mode 100644 index 0000000..34c599a --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_raco_fmt_fixer_callback.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpFixerTest('racket', 'raco_fmt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The raco_fmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt') + + AssertFixer {'command': ale#Escape('raco') . ' fmt'} + +Execute(The raco_fmt callback should include custom raco_fmt options): + let g:ale_racket_raco_fmt_options = "--width 100" + call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt') + + AssertFixer {'command': ale#Escape('raco') . ' fmt ' . g:ale_racket_raco_fmt_options} + diff --git a/dot_vim/plugged/ale/test/fixers/test_refmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_refmt_fixer_callback.vader new file mode 100644 index 0000000..01b56be --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_refmt_fixer_callback.vader @@ -0,0 +1,41 @@ +Before: + Save g:ale_reasonml_refmt_executable + Save g:ale_reasonml_refmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_reasonml_refmt_executable = 'xxxinvalid' + let g:ale_reasonml_refmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The refmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/reasonml/testfile.re') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --in-place' + \ . ' %t', + \ }, + \ ale#fixers#refmt#Fix(bufnr('')) + +Execute(The refmt callback should include custom refmt options): + let g:ale_reasonml_refmt_options = "-w 80" + call ale#test#SetFilename('../test-files/reasonml/testfile.re') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_reasonml_refmt_options + \ . ' --in-place' + \ . ' %t', + \ }, + \ ale#fixers#refmt#Fix(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/fixers/test_remark_lint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_remark_lint_fixer_callback.vader new file mode 100644 index 0000000..5e2e342 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_remark_lint_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_markdown_remark_lint_executable + Save g:ale_markdown_remark_lint_options + +After: + Restore + +Execute(The remark callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('remark') + \ }, + \ ale#fixers#remark_lint#Fix(bufnr('')) + +Execute(The remark executable and options should be configurable): + let g:ale_markdown_remark_lint_executable = '/path/to/remark' + let g:ale_markdown_remark_lint_options = '-h' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/remark') + \ . ' -h', + \ }, + \ ale#fixers#remark_lint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_reorder_python_imports_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_reorder_python_imports_fixer_callback.vader new file mode 100644 index 0000000..ead2da7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_reorder_python_imports_fixer_callback.vader @@ -0,0 +1,46 @@ +Before: + Save g:ale_python_reorder_python_imports_executable + Save g:ale_python_reorder_python_imports_options + + " Use an invalid global executable, so we don't match it. + let g:ale_python_reorder_python_imports_executable = 'xxxinvalid' + let g:ale_python_reorder_python_imports_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + Restore + + unlet! b:bin_dir + + call ale#test#RestoreDirectory() + +Execute(The reorder_python_imports callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#reorder_python_imports#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' + \ . b:bin_dir . '/reorder-python-imports')) . ' -', + \ }, + \ ale#fixers#reorder_python_imports#Fix(bufnr('')) + +Execute(The reorder_python_imports callback should respect custom options): + let g:ale_python_reorder_python_imports_options = '--py3-plus' + + AssertEqual + \ 0, + \ ale#fixers#reorder_python_imports#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' + \ . b:bin_dir . '/reorder-python-imports')) . ' --py3-plus -', + \ }, + \ ale#fixers#reorder_python_imports#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_rubocop_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_rubocop_fixer_callback.vader new file mode 100644 index 0000000..f7b0eb6 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_rubocop_fixer_callback.vader @@ -0,0 +1,89 @@ +Before: + Save g:ale_ruby_rubocop_executable + Save g:ale_ruby_rubocop_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_rubocop_executable = 'xxxinvalid' + let g:ale_ruby_rubocop_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The rubocop callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_rubocop_executable) + \ . ' --auto-correct --force-exclusion --stdin %s', + \ }, + \ ale#fixers#rubocop#Fix(bufnr('')) + +Execute(The rubocop callback should include custom rubocop options): + let g:ale_ruby_rubocop_options = '--except Lint/Debugger' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_rubocop_executable) + \ . ' --except Lint/Debugger' + \ . ' --auto-correct --force-exclusion --stdin %s', + \ }, + \ ale#fixers#rubocop#Fix(bufnr('')) + +Execute(The rubocop callback should use auto-correct-all option when set): + let g:ale_ruby_rubocop_auto_correct_all = 1 + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_rubocop_executable) + \ . ' --auto-correct-all --force-exclusion --stdin %s' + \ }, + \ ale#fixers#rubocop#Fix(bufnr('')) + +Execute(The rubocop post-processor should remove diagnostics content): + AssertEqual + \ [ + \ 'class MyModel < ApplicationRecord', + \ ' # rubocop:disable Rails/InverseOf', + \ ' has_one :something', + \ ' # rubocop:enable Rails/InverseOf', + \ 'end', + \ '', + \ 'array = [1, 2, 3,', + \ ' 4, 5, 6]', + \ 'array = [''run'',', + \ ' ''forrest'',', + \ ' ''run'']', + \ ], + \ ale#fixers#rubocop#PostProcess(bufnr(''), [ + \ 'Inspecting 1 file', + \ 'C', + \ '', + \ 'Offenses:', + \ 'app/models/my_model.rb:8:3: C: [Corrected] Layout/ArrayAlignment: ', + \ '4, 5, 6]', + \ '^', + \ '', + \ '1 file inspected, 3 offenses detected, 3 offenses corrected', + \ '====================', + \ 'class MyModel < ApplicationRecord', + \ ' # rubocop:disable Rails/InverseOf', + \ ' has_one :something', + \ ' # rubocop:enable Rails/InverseOf', + \ 'end', + \ '', + \ 'array = [1, 2, 3,', + \ ' 4, 5, 6]', + \ 'array = [''run'',', + \ ' ''forrest'',', + \ ' ''run'']', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_ruff_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_ruff_fixer_callback.vader new file mode 100644 index 0000000..68c7a94 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_ruff_fixer_callback.vader @@ -0,0 +1,122 @@ +Before: + call ale#assert#SetUpFixerTest('python', 'ruff') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + call ale#assert#TearDownFixerTest() + + unlet! g:dir + unlet! b:bin_dir + +Execute(The ruff callback should return the correct default values): + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix -', + \ } + +Execute(The ruff callback should not use stdin for older versions (< 0.0.72)): + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.71'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix %s', + \ } + +Execute(The ruff callback should not change directory if the option is set to 0): + let g:ale_python_ruff_change_directory = 0 + + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + " --fix does not support stdin until 0.0.72 + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) . ' --stdin-filename ' . fname . ' --fix -', + \ } + +Execute(The ruff callback should respect custom options): + let g:ale_python_ruff_options = '--ignore F401 -q' + + let file_path = g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py' + + silent execute 'file ' . fnameescape(file_path) + + let fname = ale#Escape(ale#path#Simplify(file_path)) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir'), + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff')) + \ . ' --ignore F401 -q --stdin-filename '. fname . ' --fix -', + \ } + +Execute(Pipenv is detected when python_ruff_auto_pipenv is set): + let g:ale_python_ruff_auto_pipenv = 1 + let g:ale_python_ruff_change_directory = 0 + + let file_path = '../test-files/python/pipenv/whatever.py' + + call ale#test#SetFilename(file_path) + + let fname = ale#Escape(ale#path#Simplify(g:dir . '/'. file_path)) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('pipenv') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + +Execute(Poetry is detected when python_ruff_auto_poetry is set): + let g:ale_python_ruff_auto_poetry = 1 + let g:ale_python_ruff_change_directory = 0 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + let fname = ale#Escape(ale#path#Simplify(g:dir .'/../test-files/python/poetry/whatever.py')) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape('poetry') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + +Execute(Poetry is detected when python_ruff_auto_poetry is set, and cwd respects change_directory option): + let g:ale_python_ruff_auto_poetry = 1 + let g:ale_python_ruff_change_directory = 1 + + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + let fname = ale#Escape(ale#path#Simplify(g:dir .'/../test-files/python/poetry/whatever.py')) + + GivenCommandOutput ['ruff 0.0.72'] + AssertFixer + \ { + \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/python/poetry'), + \ 'command': ale#Escape('poetry') . ' run ruff --stdin-filename ' . fname . ' --fix -' + \ } + diff --git a/dot_vim/plugged/ale/test/fixers/test_rufo_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_rufo_fixer_callback.vader new file mode 100644 index 0000000..3d539f7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_rufo_fixer_callback.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_ruby_rufo_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_rufo_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The rufo command should contain `bundle exec` when executable is `bundle`): + let g:ale_ruby_rufo_executable = 'bundle' + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ ale#Escape('bundle') . ' exec rufo %t', + \ ale#fixers#rufo#GetCommand(bufnr('')) + +Execute(The rufo callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') . ' %t' + \ }, + \ ale#fixers#rufo#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_rustfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_rustfmt_fixer_callback.vader new file mode 100644 index 0000000..98761c9 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_rustfmt_fixer_callback.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpFixerTest('rust', 'rustfmt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The rustfmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/rust/testfile.rs') + + AssertFixer {'command': ale#Escape('rustfmt')} + +Execute(The rustfmt callback should include custom rustfmt options): + let g:ale_rust_rustfmt_options = "--skip-children" + call ale#test#SetFilename('../test-files/rust/testfile.rs') + + AssertFixer {'command': ale#Escape('rustfmt') . ' ' . g:ale_rust_rustfmt_options} diff --git a/dot_vim/plugged/ale/test/fixers/test_scalafmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_scalafmt_fixer_callback.vader new file mode 100644 index 0000000..2b8dc3e --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_scalafmt_fixer_callback.vader @@ -0,0 +1,66 @@ +Before: + Save g:ale_scala_scalafmt_executable + Save g:ale_scala_scalafmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_scala_scalafmt_executable = 'xxxinvalid' + let g:ale_scala_scalafmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The scalafmt callback should return the correct default values): + call ale#test#SetFilename('../test-files/scala/dummy.scala') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_scala_scalafmt_executable) + \ . ' %t', + \ }, + \ ale#fixers#scalafmt#Fix(bufnr('')) + +Execute(The scalafmt callback should use ng with scalafmt automatically): + let g:ale_scala_scalafmt_executable = 'ng' + call ale#test#SetFilename('../test-files/scala/dummy.scala') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('ng') + \ . ' scalafmt' + \ . ' %t', + \ }, + \ ale#fixers#scalafmt#Fix(bufnr('')) + +Execute(The scalafmt callback should include custom scalafmt options): + let g:ale_scala_scalafmt_options = '--diff' + call ale#test#SetFilename('../test-files/scala/dummy.scala') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_scala_scalafmt_executable) + \ . ' --diff' + \ . ' %t', + \ }, + \ ale#fixers#scalafmt#Fix(bufnr('')) + +Execute(The scalafmt callback should include custom scalafmt options and use ng with scalafmt): + let g:ale_scala_scalafmt_options = '--diff' + let g:ale_scala_scalafmt_executable = 'ng' + call ale#test#SetFilename('../test-files/scala/dummy.scala') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('ng') + \ . ' scalafmt' + \ . ' --diff' + \ . ' %t', + \ }, + \ ale#fixers#scalafmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_shfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_shfmt_fixer_callback.vader new file mode 100644 index 0000000..02fce52 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_shfmt_fixer_callback.vader @@ -0,0 +1,27 @@ +Before: + Save g:ale_sh_shfmt_executable + Save g:ale_sh_shfmt_options + Save &l:expandtab + Save &l:shiftwidth + Save &l:tabstop + +After: + Restore + +Execute(The shfmt callback should return 'shfmt' as default command): + setlocal noexpandtab + Assert + \ ale#fixers#shfmt#Fix(bufnr('')).command =~# '^' . ale#Escape('shfmt'), + \ "Default command name is expected to be 'shfmt'" + +Execute(The shfmt executable and options should be configurable): + let g:ale_sh_shfmt_executable = 'foobar' + let g:ale_sh_shfmt_options = '--some-option' + + AssertEqual + \ { + \ 'command': ale#Escape('foobar') + \ . ' -filename=%s' + \ . ' --some-option', + \ }, + \ ale#fixers#shfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_sorbet_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_sorbet_fixer_callback.vader new file mode 100644 index 0000000..2694a3d --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_sorbet_fixer_callback.vader @@ -0,0 +1,38 @@ +Before: + Save g:ale_ruby_sorbet_executable + Save g:ale_ruby_sorbet_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_sorbet_executable = 'xxxinvalid' + let g:ale_ruby_sorbet_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The sorbet callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_sorbet_executable) + \ . ' tc --autocorrect --file %t', + \ }, + \ ale#fixers#sorbet#Fix(bufnr('')) + +Execute(The sorbet callback should include custom sorbet options): + let g:ale_ruby_sorbet_options = '--enable-experimental-lsp-hover' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_sorbet_executable) + \ . ' tc --enable-experimental-lsp-hover' + \ . ' --autocorrect --file %t', + \ }, + \ ale#fixers#sorbet#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_sqlfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_sqlfmt_fixer_callback.vader new file mode 100644 index 0000000..3046edb --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_sqlfmt_fixer_callback.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_sql_sqlfmt_executable + Save g:ale_sql_sqlfmt_options + +After: + Restore + +Execute(The sqlfmt callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('sqlfmt') + \ . ' -w', + \ }, + \ ale#fixers#sqlfmt#Fix(bufnr('')) + +Execute(The sqlfmt executable and options should be configurable): + let g:ale_sql_sqlfmt_executable = '/path/to/sqlfmt' + let g:ale_sql_sqlfmt_options = '-u' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/sqlfmt') + \ . ' -w' + \ . ' -u', + \ }, + \ ale#fixers#sqlfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_sqlformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_sqlformat_fixer_callback.vader new file mode 100644 index 0000000..4bace08 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_sqlformat_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_sql_sqlformat_executable + Save g:ale_sql_sqlformat_options + +After: + Restore + +Execute(The sqlformat callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('sqlformat') . ' -' + \ }, + \ ale#fixers#sqlformat#Fix(bufnr('')) + +Execute(The sqlformat executable and options should be configurable): + let g:ale_sql_sqlformat_executable = '/path/to/sqlformat' + let g:ale_sql_sqlformat_options = '-a' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/sqlformat') + \ . ' -a -' + \ }, + \ ale#fixers#sqlformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_standard_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_standard_fixer_callback.vader new file mode 100644 index 0000000..9f5eb0e --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_standard_fixer_callback.vader @@ -0,0 +1,31 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + + unlet! b:ale_javascript_standard_executable + unlet! b:ale_javascript_standard_options + +After: + call ale#test#RestoreDirectory() + +Execute(The executable path should be correct): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/standard/bin/cmd.js')) + \ . ' --fix --stdin < %s > %t', + \ }, + \ ale#fixers#standard#Fix(bufnr('')) + +Execute(Custom options should be supported): + let b:ale_javascript_standard_use_global = 1 + let b:ale_javascript_standard_options = '--foo-bar' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('standard') . ' --foo-bar --fix --stdin < %s > %t', + \ }, + \ ale#fixers#standard#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_standardrb_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_standardrb_fixer_callback.vader new file mode 100644 index 0000000..ff82b8f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_standardrb_fixer_callback.vader @@ -0,0 +1,51 @@ +Before: + Save g:ale_ruby_standardrb_executable + Save g:ale_ruby_standardrb_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_standardrb_executable = 'xxxinvalid' + let g:ale_ruby_standardrb_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The standardrb callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_standardrb_executable) + \ . ' --fix --force-exclusion --stdin %s', + \ }, + \ ale#fixers#standardrb#Fix(bufnr('')) + +Execute(The standardrb callback should include configuration files): + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_standardrb_executable) + \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml')) + \ . ' --fix --force-exclusion --stdin %s', + \ }, + \ ale#fixers#standardrb#Fix(bufnr('')) + +Execute(The standardrb callback should include custom rubocop options): + let g:ale_ruby_standardrb_options = '--except Lint/Debugger' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'process_with': 'ale#fixers#rubocop#PostProcess', + \ 'command': ale#Escape(g:ale_ruby_standardrb_executable) + \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml')) + \ . ' --except Lint/Debugger' + \ . ' --fix --force-exclusion --stdin %s', + \ }, + \ ale#fixers#standardrb#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_statix_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_statix_fixer.vader new file mode 100644 index 0000000..c55365a --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_statix_fixer.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpFixerTest('nix', 'statix') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The callback should return the correct default values): + AssertFixer { 'command': ale#Escape('statix') . ' fix --stdin' } + +Execute(The callback should include a custom runtime): + let g:ale_nix_statix_fix_executable = 'foo/bar' + + AssertFixer { 'command': ale#Escape('foo/bar') . ' fix --stdin' } + +Execute(The callback should include custom options): + let g:ale_nix_statix_fix_options = '--foobar' + + AssertFixer { 'command': ale#Escape('statix') . ' fix --stdin --foobar' } diff --git a/dot_vim/plugged/ale/test/fixers/test_stylelint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_stylelint_fixer_callback.vader new file mode 100644 index 0000000..ee7cfdd --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_stylelint_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_stylelint_options + + let g:ale_stylelint_options = '' + + call ale#assert#SetUpFixerTest('css', 'stylelint') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The stylelint callback should return the correct default values): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css') + + AssertFixer + \ { + \ 'read_temporary_file': 0, + \ 'cwd': '%s:h', + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js')) + \ . ' --fix --stdin --stdin-filename %s', + \ } + +Execute(The stylelint callback should include custom stylelint options): + let g:ale_stylelint_options = '--cache' + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css') + + AssertFixer + \ { + \ 'read_temporary_file': 0, + \ 'cwd': '%s:h', + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js')) + \ . ' --cache --fix --stdin --stdin-filename %s', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_styler_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_styler_fixer_callback.vader new file mode 100644 index 0000000..79f71ba --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_styler_fixer_callback.vader @@ -0,0 +1,21 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The styler callback should include custom styler options): + let g:ale_r_styler_options = "a_custom_option" + + AssertEqual + \ { + \ 'command': 'Rscript --vanilla -e ' + \ . '"suppressPackageStartupMessages(library(styler));' + \ . 'style_file(commandArgs(TRUE), transformers = ' + \ . 'a_custom_option)"' + \ . ' %t', + \ 'read_temporary_file': 1, + \ }, + \ ale#fixers#styler#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_stylish_haskell_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_stylish_haskell_fixer_callback.vader new file mode 100644 index 0000000..755d343 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_stylish_haskell_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_haskell_stylish_haskell_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_haskell_stylish_haskell_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The stylish-haskell callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --inplace' + \ . ' %t', + \ }, + \ ale#fixers#stylish_haskell#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_stylua_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_stylua_fixer_callback.vader new file mode 100644 index 0000000..8621c49 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_stylua_fixer_callback.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpFixerTest('lua', 'stylua') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The default command should be correct): + AssertFixer {'command': ale#Escape('stylua') . ' -'} + +Execute(The stylua callback should include custom stylua options): + let g:ale_lua_stylua_executable = 'xxxinvalid' + let g:ale_lua_stylua_options = '--search-parent-directories' + + AssertFixer + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' ' . g:ale_lua_stylua_options + \ . ' -', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_swiftformat_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_swiftformat_fixer_callback.vader new file mode 100644 index 0000000..755c30f --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_swiftformat_fixer_callback.vader @@ -0,0 +1,35 @@ +Before: + Save g:ale_swift_swiftformat_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_swift_swiftformat_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The swiftformat callback should return the correct default values): + call ale#test#SetFilename('../test-files/swift/dummy.swift') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_swift_swiftformat_executable) + \ . ' %t ', + \ }, + \ ale#fixers#swiftformat#Fix(bufnr('')) + +Execute(The swiftformat callback should include any additional options): + call ale#test#SetFilename('../test-files/swift/dummy.swift') + let g:ale_swift_swiftformat_options = '--some-option' + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_swift_swiftformat_executable) + \ . ' %t --some-option', + \ }, + \ ale#fixers#swiftformat#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_syntax_tree_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_syntax_tree_fixer_callback.vader new file mode 100644 index 0000000..4645098 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_syntax_tree_fixer_callback.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_ruby_syntax_tree_executable + Save g:ale_ruby_syntax_tree_options + + " Use an invalid global executable, so we don't match it. + let g:ale_ruby_syntax_tree_executable = 'xxxinvalid' + let g:ale_ruby_syntax_tree_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The syntax_tree callback should return the correct default values): + call ale#test#SetFilename('../test-files/ruby/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_syntax_tree_executable) + \ . ' write %t', + \ }, + \ ale#fixers#syntax_tree#Fix(bufnr('')) + +Execute(The syntax_tree callback should include custom options): + let g:ale_ruby_syntax_tree_options = '--print-width=100 --plugins=plugin/trailing_comma' + call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape(g:ale_ruby_syntax_tree_executable) + \ . ' write --print-width=100 --plugins=plugin/trailing_comma %t', + \ }, + \ ale#fixers#syntax_tree#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_terraform_fmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_terraform_fmt_fixer_callback.vader new file mode 100644 index 0000000..15377a7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_terraform_fmt_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_terraform_fmt_executable + Save g:ale_terraform_fmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_terraform_fmt_executable = 'xxxinvalid' + let g:ale_terraform_fmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The terraform fmt callback should return the correct default values): + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt -', + \ }, + \ ale#fixers#terraform#Fix(bufnr('')) + +Execute(The terraform fmt callback should include custom options): + let g:ale_terraform_fmt_options = "-list=true" + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt' + \ . ' ' . g:ale_terraform_fmt_options + \ . ' -', + \ }, + \ ale#fixers#terraform#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_textlint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_textlint_fixer_callback.vader new file mode 100644 index 0000000..5b6c5b7 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_textlint_fixer_callback.vader @@ -0,0 +1,42 @@ +Before: + Save g:ale_textlint_executable + Save g:ale_textlint_options + Save g:ale_textlint_use_global + + " Use an invalid global executable, so we don't match it. + let g:ale_textlint_executable = 'xxxinvalid' + let g:ale_textlint_options = '' + let g:ale_textlint_use_global = 0 + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The textlint callback should return the correct default values): + call ale#test#SetFilename('../test-files/markdown/testfile.md') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --fix' + \ . ' %t', + \ }, + \ ale#fixers#textlint#Fix(bufnr('')) + +Execute(The textlint callback should include custom textlint options): + let g:ale_textlint_options = "--quiet" + call ale#test#SetFilename('../test-files/markdown/testfile.md') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --fix' + \ . ' ' . g:ale_textlint_options + \ . ' %t', + \ }, + \ ale#fixers#textlint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_tidy_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_tidy_fixer_callback.vader new file mode 100644 index 0000000..25d3d6c --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_tidy_fixer_callback.vader @@ -0,0 +1,25 @@ +Before: + Save g:ale_html_tidy_executable + + let g:ale_html_tidy_executable = '../test-files/tidy/tidy' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The tidy callback should return 0 if tidy not found): + let g:ale_html_tidy_executable = 'xxxinvalidpath' + AssertEqual + \ 0, + \ ale#fixers#tidy#Fix(bufnr('')) + +Execute(The tidy callback should return the correct default command): + AssertEqual + \ { + \ 'command': ale#Escape('../test-files/tidy/tidy') + \ . ' -q --tidy-mark no --show-errors 0 --show-warnings 0' + \ }, + \ ale#fixers#tidy#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_trim_whitespace.vader b/dot_vim/plugged/ale/test/fixers/test_trim_whitespace.vader new file mode 100644 index 0000000..2ffbcb0 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_trim_whitespace.vader @@ -0,0 +1,28 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + call ale#test#RestoreDirectory() + +Execute(Should delete all whitespace at the end of different lines): + AssertEqual + \ [ + \ 'def foo():', + \ ' some_variable = this_is_a_longer_function(', + \ 'first_argument,', + \ ' second_argument,', + \ ' third_with_function_call(', + \ 'foo,', + \ ' bar,', + \ '))', + \ ], + \ ale#fixers#generic#TrimWhitespace(bufnr(''), [ + \ 'def foo():', + \ ' some_variable = this_is_a_longer_function(', + \ 'first_argument,', + \ ' second_argument,', + \ ' third_with_function_call(', + \ 'foo,', + \ ' bar,', + \ '))', + \ ]) diff --git a/dot_vim/plugged/ale/test/fixers/test_tslint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_tslint_fixer_callback.vader new file mode 100644 index 0000000..43fcc5a --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_tslint_fixer_callback.vader @@ -0,0 +1,42 @@ +Before: + Save g:ale_typescript_tslint_executable + Save g:ale_typescript_tslint_config_path + + unlet! g:ale_typescript_tslint_executable + unlet! g:ale_typescript_tslint_config_path + unlet! b:ale_typescript_tslint_executable + unlet! b:ale_typescript_tslint_config_path + + call ale#handlers#tslint#InitVariables() + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The tslint callback should return the correct default values): + let g:ale_typescript_tslint_config_path = 'tslint.json' + call ale#test#SetFilename('../test-files/prettier/testfile.ts') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('tslint') + \ . ' -c ' . ale#Escape('tslint.json') + \ . ' --outputAbsolutePaths --fix %t', + \ }, + \ ale#fixers#tslint#Fix(bufnr('')) + +Execute(The tslint callback should include custom tslint config option): + let g:ale_typescript_tslint_config_path = '.tslintrc' + call ale#test#SetFilename('../test-files/prettier/testfile.ts') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('tslint') + \ . ' -c ' . ale#Escape('.tslintrc') + \ . ' --outputAbsolutePaths --fix %t', + \ }, + \ ale#fixers#tslint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_uncrustify_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_uncrustify_fixer_callback.vader new file mode 100644 index 0000000..c101a31 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_uncrustify_fixer_callback.vader @@ -0,0 +1,108 @@ +Before: + Save g:ale_c_uncrustify_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_c_uncrustify_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The clang-format callback should return the correct default values): + call ale#test#SetFilename('../test-files/c/dummy.c') + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l C' + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + +Execute(The uncrustify callback should include any additional options): + call ale#test#SetFilename('../test-files/c/dummy.c') + let b:ale_c_uncrustify_options = '--some-option' + + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l C --some-option', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + +Execute(The uncrustify callback should set proper language): + unlet b:ale_c_uncrustify_options + + set filetype=c + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l C', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=cpp + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l CPP', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=cs + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l CS', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=objc + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l OC', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=objcpp + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l OC+', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=d + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l D', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=java + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l JAVA', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=vala + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l VALA', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) + + set filetype=p + AssertEqual + \ { + \ 'command': ale#Escape(g:ale_c_uncrustify_executable) + \ . ' --no-backup -l PAWN', + \ }, + \ ale#fixers#uncrustify#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_vfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_vfmt_fixer_callback.vader new file mode 100644 index 0000000..cbab118 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_vfmt_fixer_callback.vader @@ -0,0 +1,44 @@ +Before: + Save g:ale_v_v_executable + Save g:ale_v_vfmt_options + + " Use an invalid global executable, so we don't match it. + let g:ale_v_v_executable = 'xxxinvalid' + let g:ale_v_vfmt_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The vfmt callback should return the correct default values): + call ale#test#SetFilename('../v_files/testfile.v') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt', + \ }, + \ ale#fixers#vfmt#Fix(bufnr('')) + +Execute(The vfmt callback should include custom vfmt options): + let g:ale_v_vfmt_options = "-r '(a) -> a'" + + call ale#test#SetFilename('../v_files/testfile.v') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') + \ . ' fmt ' . g:ale_v_vfmt_options, + \ }, + \ ale#fixers#vfmt#Fix(bufnr('')) + +Execute(The vfmt callback should support Go environment variables): + call ale#test#SetFilename('../v_files/testfile.v') + + AssertEqual + \ { + \ 'command': ale#Escape('xxxinvalid') . ' fmt', + \ }, + \ ale#fixers#vfmt#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_vim_help_tags_alignment_fixer.vader b/dot_vim/plugged/ale/test/fixers/test_vim_help_tags_alignment_fixer.vader new file mode 100644 index 0000000..7e18a77 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_vim_help_tags_alignment_fixer.vader @@ -0,0 +1,19 @@ +Before: + Save g:ale_fixers + +After: + Restore + +Given help(A vim help file with badly aligned tags): + foo *foo* + bar *bar* + baz *bar* + +Execute(Tags should be aligned at the right margin): + let g:ale_fixers = {'help': ['align_help_tags']} + ALEFix + +Expect help(Tags should be aligned): + foo *foo* + bar *bar* + baz *bar* diff --git a/dot_vim/plugged/ale/test/fixers/test_xmllint_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_xmllint_fixer_callback.vader new file mode 100644 index 0000000..54fe05b --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_xmllint_fixer_callback.vader @@ -0,0 +1,46 @@ +Before: + Save g:ale_xml_xmllint_executable + Save g:ale_xml_xmllint_indentsize + Save g:ale_xml_xmllint_options + + let g:ale_xml_xmllint_executable = '/path/to/xmllint' + let g:ale_xml_xmllint_indentsize = '' + let g:ale_xml_xmllint_options = '' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + +Execute(The xmllint callback should return the correct default command): + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/xmllint') + \ . ' --format ' + \ . ale#Escape(bufname(bufnr(''))) + \ }, + \ ale#fixers#xmllint#Fix(bufnr('')) + +Execute(The xmllint callback should include the XMLLINT_INDENT variable): + let g:ale_xml_xmllint_indentsize = 2 + + AssertEqual + \ { + \ 'command': ale#Env('XMLLINT_INDENT', ' ') + \ . ale#Escape('/path/to/xmllint') + \ . ' --format ' + \ . ale#Escape(bufname(bufnr(''))) + \ }, + \ ale#fixers#xmllint#Fix(bufnr('')) + +Execute(The xmllint callback should include additional options): + let g:ale_xml_xmllint_options = '--nonet' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/xmllint') + \ . ' --format ' + \ . ale#Escape(bufname(bufnr(''))) + \ . ' --nonet' + \ }, + \ ale#fixers#xmllint#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_xo_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_xo_fixer_callback.vader new file mode 100644 index 0000000..fe2da8c --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_xo_fixer_callback.vader @@ -0,0 +1,45 @@ +Before: + call ale#assert#SetUpFixerTest('javascript', 'xo') + runtime autoload/ale/handlers/xo.vim + set filetype=javascript + +After: + call ale#assert#TearDownFixerTest() + +Execute(The xo callback should return the correct default values): + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --fix %t', + \ } + +Execute(The xo callback should include custom xo options): + let g:ale_javascript_xo_options = '--space' + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --fix %t' + \ . ' --space', + \ } + +Execute(--stdin should be used when xo is new enough): + let g:ale_javascript_xo_options = '--space' + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js') + + GivenCommandOutput ['0.30.0'] + AssertFixer + \ { + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --stdin --stdin-filename %s' + \ . ' --fix' + \ . ' --space', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_xots_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_xots_fixer_callback.vader new file mode 100644 index 0000000..61a22e6 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_xots_fixer_callback.vader @@ -0,0 +1,45 @@ +Before: + call ale#assert#SetUpFixerTest('typescript', 'xo') + runtime autoload/ale/handlers/xo.vim + set filetype=typescript + +After: + call ale#assert#TearDownFixerTest() + +Execute(The xo callback should return the correct default values): + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --fix %t', + \ } + +Execute(The xo callback should include custom xo options): + let g:ale_typescript_xo_options = '--space' + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts') + + AssertFixer + \ { + \ 'read_temporary_file': 1, + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --fix %t' + \ . ' --space', + \ } + +Execute(--stdin should be used when xo is new enough): + let g:ale_typescript_xo_options = '--space' + call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts') + + GivenCommandOutput ['0.30.0'] + AssertFixer + \ { + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js')) + \ . ' --stdin --stdin-filename %s' + \ . ' --fix' + \ . ' --space', + \ } diff --git a/dot_vim/plugged/ale/test/fixers/test_yamlfix_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_yamlfix_fixer_callback.vader new file mode 100644 index 0000000..1ae5e33 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_yamlfix_fixer_callback.vader @@ -0,0 +1,33 @@ +Before: + call ale#assert#SetUpFixerTest('yaml', 'yamlfix') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + call ale#assert#TearDownFixerTest() + +Execute(The yamlfix callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#yamlfix#Fix(bufnr('')) + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.yaml') + AssertEqual + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yamlfix')) . ' -', + \ }, + \ ale#fixers#yamlfix#Fix(bufnr('')) + +Execute(The yamlfix callback should respect custom options): + let g:ale_yaml_yamlfix_options = '--multi-line=3 --trailing-comma' + + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.yaml') + AssertEqual + \ { + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yamlfix')) + \ . ' --multi-line=3 --trailing-comma -', + \ }, + \ ale#fixers#yamlfix#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_yapf_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_yapf_fixer_callback.vader new file mode 100644 index 0000000..a7fcc07 --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_yapf_fixer_callback.vader @@ -0,0 +1,39 @@ +Before: + Save g:ale_python_yapf_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_python_yapf_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + Restore + + unlet! b:bin_dir + + call ale#test#RestoreDirectory() + +Execute(The yapf callback should return the correct default values): + AssertEqual + \ 0, + \ ale#fixers#yapf#Fix(bufnr('')) + + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yapf'))}, + \ ale#fixers#yapf#Fix(bufnr('')) + \ +Execute(The yapf should include the .style.yapf file if present): + call ale#test#SetFilename('../test-files/python/with_virtualenv/dir_with_yapf_config/foo/bar.py') + + AssertEqual + \ { + \ 'command': + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yapf')) + \ . ' --no-local-style' + \ . ' --style ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/dir_with_yapf_config/.style.yapf')), + \ }, + \ ale#fixers#yapf#Fix(bufnr('')) diff --git a/dot_vim/plugged/ale/test/fixers/test_zigfmt_fixer_callback.vader b/dot_vim/plugged/ale/test/fixers/test_zigfmt_fixer_callback.vader new file mode 100644 index 0000000..47e3dde --- /dev/null +++ b/dot_vim/plugged/ale/test/fixers/test_zigfmt_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpFixerTest('zig', 'zigfmt') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The zig callback should return the correct default values): + AssertFixer { + \ 'command': ale#Escape('zig') . ' fmt %t', + \ 'read_temporary_file': 1, + \} + +Execute(The zig callback should allow custom zig executables): + let g:ale_zig_zigfmt_executable = 'foo/bar' + + AssertFixer { + \ 'command': ale#Escape('foo/bar') . ' fmt %t', + \ 'read_temporary_file': 1, + \} + diff --git a/dot_vim/plugged/ale/test/handler/test_actionlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_actionlint_handler.vader new file mode 100644 index 0000000..3e76212 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_actionlint_handler.vader @@ -0,0 +1,43 @@ +Before: + runtime! ale/handlers/actionlint.vim + +After: + unlet! g:ale_yaml_actionlint_options + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for actionlint): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': '"jobs" section is missing in workflow', + \ 'code': 'syntax-check', + \ }, + \ { + \ 'lnum': 56, + \ 'col': 23, + \ 'type': 'E', + \ 'text': 'property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number}', + \ 'code': 'expression', + \ }, + \ ], + \ ale#handlers#actionlint#Handle(bufnr(''), [ + \ '.codecov.yaml:2:1: "jobs" section is missing in workflow [syntax-check]', + \ 'workflow_call_event.yaml:56:23: property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number} [expression]', + \ ]) + +Execute(Command should always have --no-color and --oneline options): + let g:ale_yaml_actionlint_options = '' + + AssertEqual + \ '%e --no-color --oneline %t', + \ ale#handlers#actionlint#GetCommand(bufnr('')) + +Execute(Options should be added to command): + let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes=' + + AssertEqual + \ '%e -shellcheck= -pyflakes= --no-color --oneline %t', + \ ale#handlers#actionlint#GetCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/handler/test_ada_gcc_handler.vader b/dot_vim/plugged/ale/test/handler/test_ada_gcc_handler.vader new file mode 100644 index 0000000..06ddfe1 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ada_gcc_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/ada/gcc.vim + +After: + call ale#linter#Reset() + +Execute(The gcc handler for Ada should parse input correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 0, + \ 'lnum': 8, + \ 'col': 5, + \ 'type': 'W', + \ 'text': 'variable "X" is assigned but never read', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 6, + \ 'col': 22, + \ 'type': 'E', + \ 'text': 'type definition expected', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 8, + \ 'col': 9, + \ 'type': 'E', + \ 'text': 'aspect specifications not allowed here', + \ }, + \ ], + \ ale_linters#ada#gcc#Handle(0, [ + \ 'foobar.adb:8:05: warning: variable "X" is assigned but never read', + \ 'foobar.ads:6:22: type definition expected', + \ 'foobar.ads:8:09: aspect specifications not allowed here', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_alex_handler.vader b/dot_vim/plugged/ale/test/handler/test_alex_handler.vader new file mode 100644 index 0000000..eb241f8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_alex_handler.vader @@ -0,0 +1,54 @@ +Execute(The alex handler should handle the example from the alex README): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 5, + \ 'end_lnum': 1, + \ 'end_col': 13, + \ 'type': 'W', + \ 'text': '`boogeyman` may be insensitive, use `boogey` instead (retext-equality)', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 42, + \ 'end_lnum': 1, + \ 'end_col': 47, + \ 'type': 'W', + \ 'text': '`master` / `slaves` may be insensitive, use `primary` / `replica` instead (retext-equality)', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 69, + \ 'end_lnum': 1, + \ 'end_col': 74, + \ 'type': 'W', + \ 'text': 'Don’t use “slavesâ€, it’s profane (retext-profanities)', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 52, + \ 'end_lnum': 2, + \ 'end_col': 53, + \ 'type': 'W', + \ 'text': '`he` may be insensitive, use `they`, `it` instead (retext-equality)', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 61, + \ 'end_lnum': 2, + \ 'end_col': 67, + \ 'type': 'W', + \ 'text': '`cripple` may be insensitive, use `person with a limp` instead (retext-equality)', + \ }, + \ ], + \ ale#handlers#alex#Handle(bufnr(''), [ + \ 'example.md', + \ ' 1:5-1:14 warning `boogeyman` may be insensitive, use `boogey` instead boogeyman-boogeywoman retext-equality', + \ ' 1:42-1:48 warning `master` / `slaves` may be insensitive, use `primary` / `replica` instead master-slave retext-equality', + \ ' 1:69-1:75 warning Don’t use “slavesâ€, it’s profane slaves retext-profanities', + \ ' 2:52-2:54 warning `he` may be insensitive, use `they`, `it` instead he-she retext-equality', + \ ' 2:61-2:68 warning `cripple` may be insensitive, use `person with a limp` instead cripple retext-equality', + \ '', + \ 'âš  5 warnings', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_ameba_handler.vader b/dot_vim/plugged/ale/test/handler/test_ameba_handler.vader new file mode 100644 index 0000000..a6f4317 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ameba_handler.vader @@ -0,0 +1,44 @@ +Before: + runtime ale_linters/crystal/ameba.vim + +After: + unlet! g:lines + call ale#linter#Reset() + +Execute(The ameba handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 24, + \ 'col': 28, + \ 'end_col': 29, + \ 'text': 'Trailing whitespace detected', + \ 'code': 'Layout/TrailingWhitespace', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#crystal#ameba#HandleAmebaOutput(123, [ + \ '{"sources":[{"path":"my_file_with_issues.cr","issues":[{"rule_name":"Layout/TrailingWhitespace","message":"Trailing whitespace detected","location":{"line":24,"column":28},"end_location":{"line":null,"column":null}}]},{"path":"my_file_without_issues.cr","issues":[]}],"metadata":{"ameba_version":"0.8.1","crystal_version":"0.26.1"},"summary":{"target_sources_count":2,"issues_count":1}}' + \ ]) + +Execute(The ameba handler should handle when files are checked and no offenses are found): + AssertEqual + \ [], + \ ale_linters#crystal#ameba#HandleAmebaOutput(123, [ + \ '{"sources":[{"path":"my_file_with_issues.cr",issues":[]},{"path":"my_file_without_issues.cr",issues":[]}],"metadata":{ameba_version":"0.8.1",crystal_version":"0.26.1"},"summary":{target_sources_count":2,issues_count":0}}' + \ ]) + +Execute(The ameba handler should handle when no files are checked): + AssertEqual + \ [], + \ ale_linters#crystal#ameba#HandleAmebaOutput(123, [ + \ '{"sources":[],"metadata":{ameba_version":"0.8.1",crystal_version":"0.26.1"},"summary":{target_sources_count":0,issues_count":0}}' + \ ]) + +Execute(The ameba handler should handle blank output without any errors): + AssertEqual + \ [], + \ ale_linters#crystal#ameba#HandleAmebaOutput(123, ['{}']) + AssertEqual + \ [], + \ ale_linters#crystal#ameba#HandleAmebaOutput(123, []) diff --git a/dot_vim/plugged/ale/test/handler/test_ansible_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_ansible_lint_handler.vader new file mode 100644 index 0000000..fbc38f3 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ansible_lint_handler.vader @@ -0,0 +1,101 @@ +Before: + runtime ale_linters/ansible/ansible_lint.vim + call ale#test#SetFilename('test_playbook.yml') + + let b:ale_warn_about_trailing_whitespace = 1 + +After: + unlet! b:ale_warn_about_trailing_whitespace + call ale#linter#Reset() + +Execute(The ansible-lint handler for version group <5 should handle basic errors): + AssertEqual + \ [ + \ { + \ 'lnum': 35, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Trailing whitespace', + \ 'code': 'EANSIBLE0002', + \ }, + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [4, 1, 2], [ + \ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [EANSIBLE0002] Trailing whitespace', + \ ]) + +Execute(The ansible-lint handler for version group <5 should suppress trailing whitespace output when the option is used): + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [4, 1, 2], [ + \ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [EANSIBLE0002] Trailing whitespace', + \ ]) + + +Execute(The ansible-lint handler for version group >=5 should handle basic errors): + AssertEqual + \ [ + \ { + \ 'lnum': 35, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'File permissions unset or incorrect', + \ 'code': 'risky-file-permissions', + \ }, + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [5, 1, 2], [ + \ fnamemodify(tempname(), ':h') . '/test_playbook.yml:35: [risky-file-permissions] [VERY_HIGH] File permissions unset or incorrect', + \ ]) + +Before: + runtime ale_linters/ansible/ansible_lint.vim + call ale#test#SetFilename('test playbook.yml') + +After: + call ale#linter#Reset() + +Execute (The ansible-lint handler for version group <5 should handle names with spaces): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 6, + \ 'type': 'E', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', + \ }, + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [4, 1, 2], [ + \ fnamemodify(tempname(), ':h') . '/test playbook.yml:6:6: E111 indentation is not a multiple of four', + \ ]) + +Execute (The ansible-lint handler for version group >=5 should handle names with spaces): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 148, + \ 'type': 'E', + \ 'text': "'var' is not a valid attribute for a Play", + \ 'code': 'syntax-check', + \ }, + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [5, 1, 2], [ + \ fnamemodify(tempname(), ':h') . "/test playbook.yml:3:148: [syntax-check] [VERY_HIGH] 'var' is not a valid attribute for a Play", + \ ]) + +Execute (The ansible-lint handler should ignore errors from other files): + AssertEqual + \ [ + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [5, 1, 2], [ + \ '/foo/bar/roles/test_playbook.yml:6: [command-instead-of-module] [VERY_LOW] curl used in place of get_url or uri module', + \ ]) + +Execute (The ansible-lint handler should work with empty input): + AssertEqual + \ [ + \ ], + \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [6, 0, 0], []) diff --git a/dot_vim/plugged/ale/test/handler/test_appleswiftformat_handler.vader b/dot_vim/plugged/ale/test/handler/test_appleswiftformat_handler.vader new file mode 100644 index 0000000..818bd9c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_appleswiftformat_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/swift/appleswiftformat.vim + +After: + call ale#linter#Reset() + +Execute(The appleswiftformat handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 21, + \ 'type': 'W', + \ 'code': 'DoNotUseSemicolons', + \ 'text': 'remove '';'' and move the next statement to the new line', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 12, + \ 'type': 'W', + \ 'code': 'Spacing', + \ 'text': 'remove 1 space' + \ }, + \ ], + \ ale_linters#swift#appleswiftformat#Handle(bufnr(''), [ + \ 'Sources/main.swift:4:21: warning: [DoNotUseSemicolons] remove '';'' and move the next statement to the new line', + \ 'Sources/main.swift:3:12: warning: [Spacing] remove 1 space', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_asm_handler.vader b/dot_vim/plugged/ale/test/handler/test_asm_handler.vader new file mode 100644 index 0000000..4ab9999 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_asm_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime ale_linters/asm/gcc.vim + +After: + call ale#linter#Reset() + +Execute(The asm GCC handler should parse lines from GCC 6.3.1 correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': 38, + \ 'text': "too many memory references for `mov'", + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 42, + \ 'text': "incorrect register `%ax' used with `l' suffix", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#asm#gcc#Handle(357, [ + \ "{standard input}: Assembler messages:", + \ "{standard_input}:38: Error: too many memory references for `mov'", + \ "{standard input}:42: Error: incorrect register `%ax' used with `l' suffix", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_atools_handler.vader b/dot_vim/plugged/ale/test/handler/test_atools_handler.vader new file mode 100644 index 0000000..3c22672 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_atools_handler.vader @@ -0,0 +1,85 @@ +Before: + runtime autoload/ale/handlers/atools.vim + +After: + call ale#linter#Reset() + +Execute(The atools handler should handle basic errors or warings): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'text': 'trailing whitespace', + \ 'type': 'E', + \ 'code': 'AL8', + \ }, + \ { + \ 'lnum': 15, + \ 'text': '$pkgname should not be used in the source url', + \ 'type': 'W', + \ 'code': 'AL29', + \ }, + \ ], + \ ale#handlers#atools#Handle(bufnr(''), [ + \ 'IC:[AL8]:APKBUILD:2:trailing whitespace', + \ 'MC:[AL29]:APKBUILD:15:$pkgname should not be used in the source url', + \ ]) + +" Regardless of the severity, if the certainty is [P]ossible and not [C]ertain +" or if regardless of the Certainty the Severity is not [I]mportant or [S]erious +" then it must be a [W]arning +Execute(If we are not Certain or Importantly Serious, be a Warning): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'text': 'This violation is Serious but Possible false positive, I am a Warning!', + \ 'type': 'W', + \ 'code': 'AL', + \ }, + \ { + \ 'lnum': 4, + \ 'text': 'This violation is Important but Possible false positive, I am a Warning!', + \ 'type': 'W', + \ 'code': 'AL', + \ }, + \ { + \ 'lnum': 5, + \ 'text': 'This violation is Minor, I am a Warning!', + \ 'type': 'W', + \ 'code': 'AL', + \ }, + \ { + \ 'lnum': 6, + \ 'text': 'This violation is Style, I am a Warning!', + \ 'type': 'W', + \ 'code': 'AL', + \ }, + \ ], + \ ale#handlers#atools#Handle(bufnr(''), [ + \ 'SP:[AL]:APKBUILD:3:This violation is Serious but Possible false positive, I am a Warning!', + \ 'IP:[AL]:APKBUILD:4:This violation is Important but Possible false positive, I am a Warning!', + \ 'MC:[AL]:APKBUILD:5:This violation is Minor, I am a Warning!', + \ 'TC:[AL]:APKBUILD:6:This violation is Style, I am a Warning!', + \ ]) + +Execute(We should be error if we are Certain it is Serious or Important): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'text': 'This is Certainly Serious, I am an Error!', + \ 'type': 'E', + \ 'code': 'AL', + \ }, + \ { + \ 'lnum': 8, + \ 'text': 'This is Certainly Important, I am an Error!', + \ 'type': 'E', + \ 'code': 'AL', + \ }, + \ ], + \ ale#handlers#atools#Handle(bufnr(''), [ + \ 'SC:[AL]:APKBUILD:7:This is Certainly Serious, I am an Error!', + \ 'IC:[AL]:APKBUILD:8:This is Certainly Important, I am an Error!', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_avra_handler.vader b/dot_vim/plugged/ale/test/handler/test_avra_handler.vader new file mode 100644 index 0000000..0de83fb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_avra_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/avra/avra.vim + +After: + call ale#linter#Reset() + +Execute(The avra handler should parse errors correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'text': "Unknown device: atmega3228p", + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 12, + \ 'text': "Unknown directive: .EQ", + \ 'type': 'E' + \ } + \ ], + \ ale_linters#avra#avra#Handle(bufnr(''), [ + \ "main.asm(3) : Error : Unknown device: atmega3228p", + \ "main.asm(12) : Error : Unknown directive: .EQ" + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_bandit_handler.vader b/dot_vim/plugged/ale/test/handler/test_bandit_handler.vader new file mode 100644 index 0000000..a2793a4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_bandit_handler.vader @@ -0,0 +1,42 @@ +Before: + runtime ale_linters/python/bandit.vim + +After: + call ale#linter#Reset() + +Execute(The bandit handler for Python should parse input correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 0, + \ 'lnum': 2, + \ 'code': 'B404', + \ 'type': 'I', + \ 'text': 'Consider possible security implications associated with subprocess module.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 4, + \ 'code': 'B305', + \ 'type': 'W', + \ 'text': 'Use of insecure cipher mode cryptography.hazmat.primitives.ciphers.modes.ECB.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 6, + \ 'code': 'B609', + \ 'type': 'E', + \ 'text': 'Possible wildcard injection in call: subprocess.Popen', + \ }, + \ ], + \ ale_linters#python#bandit#Handle(0, [ + \ '[main] INFO profile include tests: None', + \ '[main] INFO profile exclude tests: None', + \ '[main] INFO cli include tests: None', + \ '[main] INFO cli exclude tests: None', + \ '[main] INFO running on Python 3.7.2', + \ '[node_visitor] INFO Unable to find qualified name for module: ', + \ '2:B404:LOW:Consider possible security implications associated with subprocess module.', + \ '4:B305:MEDIUM:Use of insecure cipher mode cryptography.hazmat.primitives.ciphers.modes.ECB.', + \ '6:B609:HIGH:Possible wildcard injection in call: subprocess.Popen', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_bashate_handler.vader b/dot_vim/plugged/ale/test/handler/test_bashate_handler.vader new file mode 100644 index 0000000..b61bb95 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_bashate_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/sh/bashate.vim + +After: + call ale#linter#Reset() + +Execute(The bashate handler should handle basic errors): + AssertEqual + \ [ + \ { + \ 'lnum': 777, + \ 'col': 1, + \ 'text': 'E003 Indent not multiple of 4', + \ }, + \ { + \ 'lnum': 783, + \ 'col': 1, + \ 'text': 'E020 Function declaration not in format ^function name {$', + \ }, + \ { + \ 'lnum': 786, + \ 'col': 1, + \ 'text': 'E010 The "do" should be on same line as for', + \ }, + \ { + \ 'lnum': 791, + \ 'col': 1, + \ 'text': 'E006 Line too long', + \ }, + \ ], + \ ale_linters#sh#bashate#Handle(bufnr(''), [ + \ 'run:777:1: E003 Indent not multiple of 4', + \ 'run:783:1: E020 Function declaration not in format ^function name {$', + \ 'run:786:1: E010 The "do" should be on same line as for', + \ 'run:791:1: E006 Line too long', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_bibclean_handler.vader b/dot_vim/plugged/ale/test/handler/test_bibclean_handler.vader new file mode 100644 index 0000000..9da52a9 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_bibclean_handler.vader @@ -0,0 +1,88 @@ +Before: + runtime ale_linters/bib/bibclean.vim + +After: + call ale#linter#Reset() + +Execute(The bibclean handler should parse lines from bibclean <= v2.11.4 correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': '60', + \ 'type': 'W', + \ 'text': 'Unexpected value in ``month = "09"''''.', + \ 'col': '17' + \ }, + \ { + \ 'lnum': '63', + \ 'type': 'E', + \ 'text': 'Expected comma after last field ``keywords''''.', + \ 'col': ' 1' + \ }, + \ { + \ 'lnum': '176', + \ 'type': 'W', + \ 'text': 'Unexpected DOI in URL value ``"https://doi.org/DOI"'''': move to separate DOI = "..." key/value in this entry.', + \ 'col': '14' + \ } + \ ], + \ ale_linters#bib#bibclean#Handle(255, [ + \ "%% \"stdin\", line 60: Unexpected value in ``month = \"09\"''.", + \ "%% File positions: input [main.bib] output [stdout]", + \ "%% Entry input byte=1681 line=50 column= 1 output byte=1680 line=50 column= 0", + \ "%% Value input byte=2137 line=60 column=17 output byte=2137 line=60 column=17", + \ "%% Current input byte=2139 line=60 column=19 output byte=2137 line=60 column=17", + \ "?? \"stdin\", line 71: Expected comma after last field ``keywords''.", + \ "?? File positions: input [main.bib] output [stdout]", + \ "?? Entry input byte=2145 line=63 column= 1 output byte=2146 line=63 column= 0", + \ "?? Value input byte=2528 line=71 column= 2 output byte=2527 line=70 column=49", + \ "?? Current input byte=2529 line=71 column= 3 output byte=2528 line=70 column=50", + \ "%% \"stdin\", line 176: Unexpected DOI in URL value ``\"https://doi.org/DOI\"'': move to separate DOI = \"...\" key/value in this entry.", + \ "%% File positions: input [stdin] output [stdout]", + \ "%% Entry input byte=6813 line=174 column= 1 output byte=8543 line=227 column= 0", + \ "%% Value input byte=6890 line=176 column=14 output byte=8641 line=229 column=17", + \ "%% Current input byte=6938 line=176 column=62 output byte=8641 line=229 column=17" + \ ]) + +Execute(The bibclean handler should parse lines of bibclean > v2.11.4 correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': '60', + \ 'type': 'W', + \ 'text': 'Unexpected value in ``month = "09"''''.', + \ 'col': '17' + \ }, + \ { + \ 'lnum': '63', + \ 'type': 'E', + \ 'text': 'Expected comma after last field ``keywords''''.', + \ 'col': ' 1' + \ }, + \ { + \ 'lnum': '176', + \ 'type': 'W', + \ 'text': 'Unexpected DOI in URL value ``"https://doi.org/DOI"'''': move to separate DOI = "..." key/value in this entry.', + \ 'col': '14' + \ } + \ ], + \ ale_linters#bib#bibclean#Handle(255, [ + \ "%% stdin:60:Unexpected value in ``month = \"09\"''.", + \ "%% File positions: input [main.bib] output [stdout]", + \ "%% Entry input byte=1681 line=50 column= 1 output byte=1680 line=50 column= 0", + \ "%% Value input byte=2137 line=60 column=17 output byte=2137 line=60 column=17", + \ "%% Current input byte=2139 line=60 column=19 output byte=2137 line=60 column=17", + \ "?? stdin:71:Expected comma after last field ``keywords''.", + \ "?? File positions: input [main.bib] output [stdout]", + \ "?? Entry input byte=2145 line=63 column= 1 output byte=2146 line=63 column= 0", + \ "?? Value input byte=2528 line=71 column= 2 output byte=2527 line=70 column=49", + \ "?? Current input byte=2529 line=71 column= 3 output byte=2528 line=70 column=50", + \ "%% stdin:176:Unexpected DOI in URL value ``\"https://doi.org/DOI\"'': move to separate DOI = \"...\" key/value in this entry.", + \ "%% File positions: input [stdin] output [stdout]", + \ "%% Entry input byte=6813 line=174 column= 1 output byte=8543 line=227 column= 0", + \ "%% Value input byte=6890 line=176 column=14 output byte=8641 line=229 column=17", + \ "%% Current input byte=6938 line=176 column=62 output byte=8641 line=229 column=17" + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_bicep_bicep_handler.vader b/dot_vim/plugged/ale/test/handler/test_bicep_bicep_handler.vader new file mode 100644 index 0000000..d105cae --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_bicep_bicep_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/bicep/bicep.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The cmake_lint handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'col': 10, + \ 'type': 'W', + \ 'code': 'no-unused-existing-resources', + \ 'text': 'Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]', + \ }, + \ { + \ 'lnum': 106, + \ 'col': 6, + \ 'type': 'E', + \ 'code': 'BCP019', + \ 'text': 'Expected a new line character at this location.', + \ }, + \ ], + \ ale_linters#bicep#bicep#Handle(1, [ + \ '/tmp/nvimhxqs5D/1/dns.bicep(7,10) : Warning no-unused-existing-resources: Existing resource "asdasd" is declared but never used. [https://aka.ms/bicep/linter/no-unused-existing-resources]', + \ '/tmp/nvimhxqs5D/1/dns.bicep(106,6) : Error BCP019: Expected a new line character at this location.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_bitbake_oelint_adv_handler.vader b/dot_vim/plugged/ale/test/handler/test_bitbake_oelint_adv_handler.vader new file mode 100644 index 0000000..a52e881 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_bitbake_oelint_adv_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/bitbake/oelint_adv.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The oelint_adv handler should handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 1234, + \ 'type': 'I', + \ 'code': 'oelint.var.suggestedvar.BUGTRACKER', + \ 'text': 'Variable ''BUGTRACKER'' should be set', + \ }, + \ { + \ 'lnum': 17, + \ 'type': 'E', + \ 'code': 'oelint.var.mandatoryvar.DESCRIPTION', + \ 'text': 'Variable ''DESCRIPTION'' should be set', + \ }, + \ ], + \ ale_linters#bitbake#oelint_adv#Handle(1, [ + \ '/meta-x/recipes-y/example/example_1.0.bb:1234:info:oelint.var.suggestedvar.BUGTRACKER:Variable ''BUGTRACKER'' should be set', + \ 'example2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_brakeman_handler.vader b/dot_vim/plugged/ale/test/handler/test_brakeman_handler.vader new file mode 100644 index 0000000..ad5376f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_brakeman_handler.vader @@ -0,0 +1,83 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + + runtime ale_linters/ruby/brakeman.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The brakeman handler should parse JSON correctly): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb') + + AssertEqual + \ [ + \ { + \ 'filename': expand('%:p'), + \ 'lnum': 84, + \ 'text': 'SQL Injection Possible SQL injection (Medium)', + \ 'type': 'W', + \ }, + \ { + \ 'filename': expand('%:p'), + \ 'lnum': 1, + \ 'text': 'Mass Assignment Potentially dangerous attribute available for mass assignment (Weak)', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#ruby#brakeman#Handle(bufnr(''), [ + \ '{', + \ '"warnings": [', + \ '{', + \ '"warning_type": "SQL Injection",', + \ '"warning_code": 0,', + \ '"fingerprint": "1234",', + \ '"check_name": "SQL",', + \ '"message": "Possible SQL injection",', + \ '"file": "' . substitute(ale#path#Simplify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",', + \ '"line": 84,', + \ '"link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",', + \ '"code": "Thing.connection.execute(params[:data])",', + \ '"render_path": null,', + \ '"location": {', + \ '"type": "method",', + \ '"class": "Thing",', + \ '"method": "run_raw_sql_from_internet"', + \ '},', + \ '"user_input": "whatever",', + \ '"confidence": "Medium"', + \ '},', + \ '{', + \ '"warning_type": "Mass Assignment",', + \ '"warning_code": 60,', + \ '"fingerprint": "1235",', + \ '"check_name": "ModelAttrAccessible",', + \ '"message": "Potentially dangerous attribute available for mass assignment",', + \ '"file": "' . substitute(ale#path#Simplify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",', + \ '"line": null,', + \ '"link": "http://brakemanscanner.org/docs/warning_types/mass_assignment/",', + \ '"code": ":name",', + \ '"render_path": null,', + \ '"location": {', + \ '"type": "model",', + \ '"model": "Thing"', + \ '},', + \ '"user_input": null,', + \ '"confidence": "Weak"', + \ '}', + \ ']', + \ '}' + \ ]) + +Execute(The brakeman handler should parse JSON correctly when there is no output from brakeman): + AssertEqual + \ [], + \ ale_linters#ruby#brakeman#Handle(347, [ + \ ]) + \ +Execute(The brakeman handler should handle garbage output): + AssertEqual + \ [], + \ ale_linters#ruby#brakeman#Handle(347, [ + \ 'No such command in 2.4.1 of ruby', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cfn_python_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_cfn_python_lint_handler.vader new file mode 100644 index 0000000..2c7ddc6 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cfn_python_lint_handler.vader @@ -0,0 +1,33 @@ +Before: + runtime! ale_linters/cloudformation/cfn_python_lint.vim + call ale#test#SetFilename('sample.template.yaml') + +After: + call ale#linter#Reset() + +Execute(The cfn_python_lint handler should parse items correctly): + AssertEqual + \ [ + \ { + \ 'lnum': '96', + \ 'col': '7', + \ 'end_lnum': '96', + \ 'end_col': '15', + \ 'text': 'Property Resources/Sample/Properties/FromPort should be of type Integer', + \ 'code': 'E3012', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': '97', + \ 'col': '7', + \ 'end_lnum': '97', + \ 'end_col': '15', + \ 'text': 'AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/SampleIpAddress. Example for AllowedPattern "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$"', + \ 'code': 'W2509', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#cloudformation#cfn_python_lint#Handle(bufnr(''), [ + \ fnamemodify(tempname(), ':h') . '/sample.template.yaml:96:7:96:15:E3012:Property Resources/Sample/Properties/FromPort should be of type Integer', + \ fnamemodify(tempname(), ':h') . '/sample.template.yaml:97:7:97:15:W2509:AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/SampleIpAddress. Example for AllowedPattern "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$"', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_checkmake_handler.vader b/dot_vim/plugged/ale/test/handler/test_checkmake_handler.vader new file mode 100644 index 0000000..f1efb23 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_checkmake_handler.vader @@ -0,0 +1,23 @@ +Before: + runtime ale_linters/make/checkmake.vim + +After: + call ale#linter#Reset() + +Execute(Parsing checkmake errors should work): + silent file Makefile + + AssertEqual + \ [ + \ { + \ 'bufnr': 42, + \ 'lnum': 1, + \ 'type': 'E', + \ 'code': 'woops', + \ 'text': 'an error has occurred', + \ } + \ ], + \ ale_linters#make#checkmake#Handle(42, [ + \ "This shouldn't match", + \ '1:woops:an error has occurred', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_checkov_handler.vader b/dot_vim/plugged/ale/test/handler/test_checkov_handler.vader new file mode 100644 index 0000000..9884113 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_checkov_handler.vader @@ -0,0 +1,66 @@ +Before: + runtime ale_linters/terraform/checkov.vim + call ale#test#SetFilename('main.tf') + +After: + call ale#linter#Reset() + +Execute(The JSON output of checkov should be handled correctly): + AssertEqual + \ [ + \ { + \ 'filename': '/main.tf', + \ 'lnum': 22, + \ 'end_lnum': 27, + \ 'text': 'Enable VPC Flow Logs and Intranode Visibility [CKV_GCP_61]', + \ 'detail': "CKV_GCP_61: Enable VPC Flow Logs and Intranode Visibility\n" . + \ 'For more information, see: https://docs.bridgecrew.io/docs/enable-vpc-flow-logs-and-intranode-visibility', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#terraform#checkov#Handle(bufnr(''), [ + \'{', + \' "check_type": "terraform",', + \' "results": {', + \' "failed_checks": [', + \' {', + \' "check_id": "CKV_GCP_61",', + \' "bc_check_id": "BC_GCP_KUBERNETES_18",', + \' "check_name": "Enable VPC Flow Logs and Intranode Visibility",', + \' "check_result": {', + \' "result": "FAILED",', + \' "evaluated_keys": [', + \' "enable_intranode_visibility"', + \' ]', + \' },', + \' "file_path": "/main.tf",', + \' "repo_file_path": "/main.tf",', + \' "file_line_range": [', + \' 22,', + \' 27', + \' ],', + \' "resource": "google_container_cluster.cluster-name",', + \' "evaluations": null,', + \' "check_class": "checkov.terraform.checks.resource.gcp.GKEEnableVPCFlowLogs",', + \' "entity_tags": null,', + \' "resource_address": null,', + \' "guideline": "https://docs.bridgecrew.io/docs/enable-vpc-flow-logs-and-intranode-visibility"', + \' }', + \' ]', + \' }', + \'}' + \ ]) + +Execute(Handle output for no findings correctly): + AssertEqual + \ [], + \ ale_linters#terraform#checkov#Handle(bufnr(''), [ + \'{', + \' "passed": 0,', + \' "failed": 0,', + \' "skipped": 0,', + \' "parsing_errors": 0,', + \' "resource_count": 0,', + \' "checkov_version": "2.0.632"', + \'}' + \]) diff --git a/dot_vim/plugged/ale/test/handler/test_checkstyle_handler.vader b/dot_vim/plugged/ale/test/handler/test_checkstyle_handler.vader new file mode 100644 index 0000000..ea90db3 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_checkstyle_handler.vader @@ -0,0 +1,53 @@ +Before: + runtime ale_linters/java/checkstyle.vim + +After: + call ale#linter#Reset() + +Execute(The checkstyle handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 101, + \ 'col': 0, + \ 'text': '''method def rcurly'' has incorrect indentation level 4, expected level should be 2.', + \ 'code': 'Indentation', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 63, + \ 'col': 3, + \ 'text': 'Missing a Javadoc comment.', + \ 'code': 'JavadocMethod', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 11, + \ 'col': 7, + \ 'text': 'WhitespaceAround: ''if'' is not followed by whitespace.', + \ 'code': 'WhitespaceAround', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#java#checkstyle#Handle(666, [ + \ '[WARN] whatever:101: ''method def rcurly'' has incorrect indentation level 4, expected level should be 2. [Indentation]', + \ '[WARN] whatever:63:3: Missing a Javadoc comment. [JavadocMethod]', + \ '[WARN] whatever:11:7: WhitespaceAround: ''if'' is not followed by whitespace. [WhitespaceAround]', + \ ]) + +Execute(The checkstyle handler should parse lines from older checkstyle versions correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 289, + \ 'text': '''method def modifier'' have incorrect indentation level 4, expected level should be 2.', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#java#checkstyle#Handle(666, [ + \ '/home/languitar/src/rsb-java/rsb-java/src/main/java/rsb/Listener.java:289: warning: ''method def modifier'' have incorrect indentation level 4, expected level should be 2.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_circleci_handler.vader b/dot_vim/plugged/ale/test/handler/test_circleci_handler.vader new file mode 100644 index 0000000..8ffba36 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_circleci_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/yaml/circleci.vim + +After: + call ale#linter#Reset() + +Execute(The circlei handler should return nothing when configs are valid): + AssertEqual + \ [], + \ ale_linters#yaml#circleci#Handle(0, [ + \ 'Config input is valid.', + \ ]) + +Execute(The circlei handler put errors at the top when something is wrong): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': '[#/jobs] expected type: Mapping, found: Integer', + \ 'detail': join([ + \ '[#/jobs] expected type: Mapping, found: Integer', + \ 'Jobs is a map', + \ 'SCHEMA:', + \ ' type: object', + \ 'INPUT:', + \ ' 4', + \ ], "\n"), + \ }, + \ ], + \ ale_linters#yaml#circleci#Handle(0, [ + \ 'Error: ERROR IN CONFIG FILE:', + \ '[#/jobs] expected type: Mapping, found: Integer', + \ 'Jobs is a map', + \ 'SCHEMA:', + \ ' type: object', + \ 'INPUT:', + \ ' 4', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_clang_handler.vader b/dot_vim/plugged/ale/test/handler/test_clang_handler.vader new file mode 100644 index 0000000..cc8eabd --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_clang_handler.vader @@ -0,0 +1,30 @@ +Execute(clang errors from included files should be parsed correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'filename': './b.h', + \ 'type': 'E', + \ 'text': 'expected identifier or ''(''', + \ }, + \ { + \ 'lnum': 3, + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': join([ + \ 'In file included from :3:', + \ 'In file included from ./a.h:1:', + \ './b.h:1:1: error: expected identifier or ''(''', + \ '{{{', + \ '^', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'In file included from :3:', + \ 'In file included from ./a.h:1:', + \ './b.h:1:1: error: expected identifier or ''(''', + \ '{{{', + \ '^', + \ '1 error generated.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_clojure_clj_kondo_handler.vader b/dot_vim/plugged/ale/test/handler/test_clojure_clj_kondo_handler.vader new file mode 100644 index 0000000..9ae7066 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_clojure_clj_kondo_handler.vader @@ -0,0 +1,89 @@ +Before: + runtime ale_linters/clojure/clj_kondo.vim + +After: + call ale#linter#Reset() + +Execute(the clojure clj-kondo handler should be able to handle errors): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ 'test.clj:123:44: error: Unexpected )', + \ ]) + +Execute(the clojure clj-kondo handler should be able to handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 654, + \ 'col': 321, + \ 'type': 'W', + \ 'text': 'warning: inline def', + \ } + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ 'test.clj:654:321: warning: inline def' + \ ]) + +Execute(the clojure clj-kondo handler should be able to handle exceptions): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 321, + \ 'type': 'E', + \ 'text': 'Exception: something horrible happen', + \ } + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ 'test.clj:123:321: Exception: something horrible happen' + \ ]) + +Execute(the clojure clj-kondo handler should be able to handle errors from stdin): + AssertEqual + \ [ + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ ':16:1: error: Unexpected )', + \ ]) + +Execute(the clojure clj-kondo handler should be able to handle windows files): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'error: Unexpected )', + \ } + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ 'C:\my\operating\system\is\silly\core.clj:123:44: error: Unexpected )', + \ ]) + +Execute(the clojure clj-kondo handler should be able to lines without row/col): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#clj_kondo#HandleCljKondoFormat(0, [ + \ 'test.clj::: error: Unexpected )', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_clojure_joker_handler.vader b/dot_vim/plugged/ale/test/handler/test_clojure_joker_handler.vader new file mode 100644 index 0000000..460c62e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_clojure_joker_handler.vader @@ -0,0 +1,75 @@ +Before: + runtime ale_linters/clojure/joker.vim + +After: + call ale#linter#Reset() + +Execute(the clojure joker handler should be able to handle errors): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:123:44: Read error: Unexpected )', + \ ]) + +Execute(the clojure joker handler should be able to handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 654, + \ 'col': 321, + \ 'type': 'W', + \ 'text': 'Parse warning: let form with empty body', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:654:321: Parse warning: let form with empty body' + \ ]) + +Execute(the clojure joker handler should be able to handle exceptions): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 321, + \ 'type': 'E', + \ 'text': 'Exception: something horrible happen', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:123:321: Exception: something horrible happen' + \ ]) + +Execute(the clojure joker handler should be able to handle errors from stdin): + AssertEqual + \ [ + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ ':16:1: Read error: Unexpected )', + \ ]) + +Execute(the clojure joker handler should be able to handle windows files): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'C:\my\operating\system\is\silly\core.clj:123:44: Read error: Unexpected )', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cmake_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_cmake_lint_handler.vader new file mode 100644 index 0000000..26fb8c1 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cmake_lint_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/cmake/cmake_lint.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The cmake_lint handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 126, + \ 'col': 0, + \ 'type': 'W', + \ 'code': 'C0301', + \ 'text': 'Line too long (136/80)', + \ }, + \ { + \ 'lnum': 139, + \ 'col': 4, + \ 'type': 'W', + \ 'code': 'C0113', + \ 'text': 'Missing COMMENT in statement which allows it', + \ }, + \ ], + \ ale_linters#cmake#cmake_lint#Handle(1, [ + \ 'CMakeLists.txt:126: [C0301] Line too long (136/80)', + \ 'CMakeLists.txt:139,04: [C0113] Missing COMMENT in statement which allows it', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_coffeelint_handler.vader b/dot_vim/plugged/ale/test/handler/test_coffeelint_handler.vader new file mode 100644 index 0000000..a061f3a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_coffeelint_handler.vader @@ -0,0 +1,20 @@ +Before: + runtime ale_linters/coffee/coffeelint.vim + +After: + call ale#linter#Reset() + +Execute(The coffeelint handler should parse lines correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': 125, + \ 'text': "Line exceeds maximum allowed length Length is 122, max is 120.", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#coffee#coffeelint#Handle(347, [ + \ "path,lineNumber,lineNumberEnd,level,message", + \ "stdin,125,,error,Line exceeds maximum allowed length Length is 122, max is 120.", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_common_handlers.vader b/dot_vim/plugged/ale/test/handler/test_common_handlers.vader new file mode 100644 index 0000000..ee29da3 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_common_handlers.vader @@ -0,0 +1,181 @@ +Execute(HandleCSSLintFormat should handle CSS errors): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Expected RBRACE at line 2, col 1.', + \ 'code': 'errors', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 5, + \ 'type': 'W', + \ 'text': 'Expected ... but found ''wat''.', + \ 'code': 'known-properties', + \ }, + \ ], + \ ale#handlers#css#HandleCSSLintFormat(42, [ + \ 'something.css: line 2, col 1, Error - Expected RBRACE at line 2, col 1. (errors)', + \ 'something.css: line 2, col 5, Warning - Expected ... but found ''wat''. (known-properties)', + \ ]) + +Execute(HandleCSSLintFormat should handle CSS errors without groups): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'col': 3, + \ 'type': 'W', + \ 'text': 'Unknown property ''fill''.', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 3, + \ 'type': 'W', + \ 'text': 'Unknown property ''fill-opacity''.', + \ }, + \ ], + \ ale#handlers#css#HandleCSSLintFormat(42, [ + \ 'something.css: line 7, col 3, Warning - Unknown property ''fill''.', + \ 'something.css: line 8, col 3, Warning - Unknown property ''fill-opacity''.', + \ ]) + +Execute (HandleGCCFormat should handle the correct lines of output): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 5, + \ 'type': 'W', + \ 'text': 'conversion lacks type at end of format [-Wformat=]', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 27, + \ 'type': 'E', + \ 'text': 'invalid operands to binary - (have ''int'' and ''char *'')', + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormat(42, [ + \ ':8:5: warning: conversion lacks type at end of format [-Wformat=]', + \ ':10:27: error: invalid operands to binary - (have ‘int’ and ‘char *’)', + \ ]) + +Execute (HandleGCCFormat should replace Unicode quotes): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 5, + \ 'type': 'W', + \ 'text': "'''' \"\"", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormat(42, [':8:5: warning: `´‘’ “â€']) + +Execute (HandleUnixFormatAsError should handle some example lines of output): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ }, + \ { + \ 'lnum': 53, + \ 'col': 10, + \ 'type': 'E', + \ 'text': 'if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': '".b" is not a valid class name. Class names must begin with "-", "_" or a letter and can only contain "_", "-", a-z and 0-9.', + \ }, + \ ], + \ ale#handlers#unix#HandleAsError(42, [ + \ 'file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ 'file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)', + \ 'test.pug:1:1 ".b" is not a valid class name. Class names must begin with "-", "_" or a letter and can only contain "_", "-", a-z and 0-9.', + \ ]) + +Execute (HandleUnixFormatAsError should handle lines with no space after the colon): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'foo', + \ }, + \ { + \ 'lnum': 53, + \ 'col': 10, + \ 'type': 'E', + \ 'text': 'bar', + \ }, + \ ], + \ ale#handlers#unix#HandleAsError(42, [ + \ 'some_file.xyz:27:foo', + \ 'some_file.xyz:53:10:bar', + \ ]) + +Execute (HandleUnixFormatAsError should handle names with spaces): + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'col': 90, + \ 'type': 'E', + \ 'text': 'leonard.exclamation.30ppm More than 30 ppm of exclamations. Keep them under control.', + \ }, + \ ], + \ ale#handlers#unix#HandleAsError(42, [ + \ '/Users/rrj/Notes/Astro/Taurus December SM.txt:13:90: leonard.exclamation.30ppm More than 30 ppm of exclamations. Keep them under control.', + \ ]) + +Execute (HandleUnixFormatAsWarning should handle some example lines of output): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ }, + \ { + \ 'lnum': 53, + \ 'col': 10, + \ 'type': 'W', + \ 'text': 'if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)', + \ }, + \ ], + \ ale#handlers#unix#HandleAsWarning(42, [ + \ 'file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ 'file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)', + \ ]) + +Execute (Unix format functions should handle Windows paths): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'foo', + \ }, + \ { + \ 'lnum': 53, + \ 'col': 10, + \ 'type': 'E', + \ 'text': 'foo', + \ }, + \ ], + \ ale#handlers#unix#HandleAsError(42, [ + \ 'C:\Users\w0rp\AppData\Local\Temp\Xyz123.go:27: foo', + \ 'C:\Users\w0rp\AppData\Local\Temp\Xyz123.go:53:10: foo', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cookstyle_handler.vader b/dot_vim/plugged/ale/test/handler/test_cookstyle_handler.vader new file mode 100644 index 0000000..7d705a1 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cookstyle_handler.vader @@ -0,0 +1,22 @@ +Before: + runtime ale_linters/chef/cookstyle.vim + +After: + call ale#linter#Reset() + +Execute(Basic warnings should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 58, + \ 'col': 24, + \ 'code': 'Style/UnneededInterpolation', + \ 'type': 'W', + \ 'end_col': 40, + \ 'text': 'Style/UnneededInterpolation: Prefer `to_s` over string interpolation.', + \ } + \ ], + \ ale_linters#chef#cookstyle#Handle(bufnr(''), [ + \ '{"metadata":{"rubocop_version":"0.62.0","ruby_engine":"ruby","ruby_version":"2.6.0","ruby_patchlevel":"0","ruby_platform":"x86_64-linux"},"files":[{"path":"recipes/default.rb","offenses":[{"severity":"convention","message":"Style/UnneededInterpolation: Prefer `to_s` over string interpolation.","cop_name":"Style/UnneededInterpolation","corrected":false,"location":{"start_line":58,"start_column":24,"last_line":58,"last_column":40,"length":17,"line":58,"column":24}}]}],"summary":{"offense_count":1,"target_file_count":1,"inspected_file_count":1}}' + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_cppcheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_cppcheck_handler.vader new file mode 100644 index 0000000..ef161f4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cppcheck_handler.vader @@ -0,0 +1,93 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + +After: + call ale#test#RestoreDirectory() + +Execute(Basic errors should be handled by cppcheck): + call ale#test#SetFilename('test.cpp') + + AssertEqual + \ [ + \ { + \ 'lnum': 974, + \ 'col' : 6, + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'Array ''n[3]'' accessed at index 3, which is out of bounds.', + \ 'code': 'arrayIndexOutOfBounds' + \ }, + \ { + \ 'lnum': 1185, + \ 'col' : 10, + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'The scope of the variable ''indxStr'' can be reduced.', + \ 'code': 'variableScope' + \ }, + \ ], + \ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [ + \ 'test.cpp:974:6: error: Array ''n[3]'' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\', + \ ' n[3]=3;', + \ ' ^', + \ 'test.cpp:1185:10: style: The scope of the variable ''indxStr'' can be reduced. [variableScope]\', + \ ' char indxStr[16];', + \ ' ^', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 974, + \ 'col' : 1, + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'inconclusive Array ''n[3]'' accessed at index 3, which is out of bounds.', + \ 'code': 'arrayIndexOutOfBounds' + \ }, + \ { + \ 'lnum': 1185, + \ 'col' : 1, + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'The scope of the variable ''indxStr'' can be reduced.', + \ 'code': 'variableScope' + \ }, + \ ], + \ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [ + \ 'test.cpp:974:{column}: error:inconclusive Array ''n[3]'' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\', + \ ' n[3]=3;', + \ ' ^', + \ 'test.cpp:1185:{column}: style:{inconclusive:inconclusive} The scope of the variable ''indxStr'' can be reduced. [variableScope]\', + \ ' char indxStr[16];', + \ ' ^', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col' : 16, + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'misra violation (use --rule-texts= to get proper output)', + \ 'code': 'misra-c2012-2.7' + \ }, + \ ], + \ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [ + \ 'test.cpp:1:16: style: misra violation (use --rule-texts= to get proper output) [misra-c2012-2.7]\', + \ 'void test( int parm ) {}', + \ ' ^', + \ ]) + +Execute(Problems from other files should be ignored by cppcheck): + call ale#test#SetFilename('test.cpp') + + AssertEqual + \ [ + \ ], + \ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [ + \ 'bar.cpp:974:6: error: Array ''n[3]'' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\', + \ ' n[3]=3;', + \ ' ^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cpplint_handler.vader b/dot_vim/plugged/ale/test/handler/test_cpplint_handler.vader new file mode 100644 index 0000000..d8d7b8b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cpplint_handler.vader @@ -0,0 +1,29 @@ +Before: + runtime ale_linters/cpp/cpplint.vim + +After: + call ale#linter#Reset() + +Execute(cpplint warnings from included files should be parsed correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 0, + \ 'text': 'Extra space after ( in function call', + \ 'code': 'whitespace/parents', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 120, + \ 'col': 0, + \ 'text': 'At least two spaces is best between code and comments', + \ 'code': 'whitespace/comments', + \ 'type': 'W', + \ }, + \ ], + \ ale#handlers#cpplint#HandleCppLintFormat(347, [ + \ 'test.cpp:5: Extra space after ( in function call [whitespace/parents] [4]', + \ 'keymap_keys.hpp:120: At least two spaces is best between code and comments [whitespace/comments] [2]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_credo_handler.vader b/dot_vim/plugged/ale/test/handler/test_credo_handler.vader new file mode 100644 index 0000000..1fd54bb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_credo_handler.vader @@ -0,0 +1,53 @@ +Before: + runtime ale_linters/elixir/credo.vim + +After: + call ale#linter#Reset() + +Execute(The credo handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 347, + \ 'lnum': 1, + \ 'col': 24, + \ 'text': 'This code can be refactored', + \ 'type': 'W', + \ }, + \ { + \ 'bufnr': 347, + \ 'lnum': 1, + \ 'col': 4, + \ 'text': 'There is no whitespace around parentheses/brackets most of the time, but here there is.', + \ 'type': 'W', + \ }, + \ { + \ 'bufnr': 347, + \ 'lnum': 5, + \ 'col': 21, + \ 'text': 'TODO comment', + \ 'type': 'I', + \ }, + \ { + \ 'bufnr': 347, + \ 'lnum': 26, + \ 'col': 0, + \ 'text': 'If/else blocks should not have a negated condition in `if`.', + \ 'type': 'I', + \ }, + \ { + \ 'bufnr': 347, + \ 'lnum': 15, + \ 'col': 1, + \ 'text': 'Warning in the code', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#elixir#credo#Handle(347, [ + \ 'This line should be ignored completely', + \ 'lib/my_code/test.ex:1:24: F: This code can be refactored', + \ 'lib/filename.ex:1:4: C: There is no whitespace around parentheses/brackets most of the time, but here there is.', + \ 'lib/my_code/test.ex:5:21: D: TODO comment', + \ 'lib/phoenix/channel.ex:26: R: If/else blocks should not have a negated condition in `if`.', + \ 'lib/my_code/test.ex:15:1: W: Warning in the code', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_crystal_handler.vader b/dot_vim/plugged/ale/test/handler/test_crystal_handler.vader new file mode 100644 index 0000000..209632e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_crystal_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/crystal/crystal.vim + +After: + call ale#linter#Reset() + +Execute(The crystal handler should parse lines correctly and add the column if it can): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'unexpected token: EOF' + \ } + \ ], + \ ale_linters#crystal#crystal#Handle(255, [ + \ '[{"file":"/tmp/test.cr","line":2,"column":1,"size":null,"message":"unexpected token: EOF"}]' + \ ]) + +Execute(The crystal handler should not fail when a missing file is required): + AssertEqual + \ [ { 'lnum':1, 'col': 1, 'text': 'while requiring "./nonexistent.cr"' } ], + \ ale_linters#crystal#crystal#Handle(255, + \ json_encode([ + \ { "file":"/tmp/file.cr","line":1,"column":1,"size":0,"message":"while requiring \"./nonexistent.cr\"" }, + \ { "message": "can't find file './nonexistent.cr' relative to '/tmp'" }, + \ ]) + \ ) diff --git a/dot_vim/plugged/ale/test/handler/test_csc_handler.vader b/dot_vim/plugged/ale/test/handler/test_csc_handler.vader new file mode 100644 index 0000000..3db5b6f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_csc_handler.vader @@ -0,0 +1,98 @@ +Before: + Save g:ale_cs_csc_source + + unlet! g:ale_cs_csc_source + + call ale#test#SetDirectory('/testplugin/test/handler') + call ale#test#SetFilename('Test.cs') + + runtime ale_linters/cs/csc.vim + +After: + unlet! g:ale_cs_csc_source + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The csc handler should work with the default of the buffer's directory): + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col' : 29, + \ 'text': '; expected', + \ 'code': 'CS1001', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(g:dir . '/Test.cs'), + \ }, + \ ], + \ ale_linters#cs#csc#Handle(bufnr(''), [ + \ 'Test.cs(12,29): error CS1001: ; expected', + \ 'Compilation failed: 2 error(s), 1 warnings', + \ ]) + +Execute(The csc handler should handle cannot find symbol errors): + let g:ale_cs_csc_source = '/home/foo/project/bar' + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col' : 29, + \ 'text': '; expected', + \ 'code': 'CS1001', + \ 'type': 'E', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ { + \ 'lnum': 101, + \ 'col': 0, + \ 'text': 'Unexpected processor directive (no #if for this #endif)', + \ 'code': 'CS1028', + \ 'type': 'E', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ { + \ 'lnum': 10, + \ 'col': 12, + \ 'text': 'some warning', + \ 'code': 'CS0123', + \ 'type': 'W', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ ], + \ ale_linters#cs#csc#Handle(bufnr(''), [ + \ 'Test.cs(12,29): error CS1001: ; expected', + \ 'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)', + \ 'Test.cs(10,12): warning CS0123: some warning', + \ 'Compilation failed: 2 error(s), 1 warnings', + \ ]) + +Execute(The csc handler should handle non file specific compiler errors without reporting overal status report as error): + let g:ale_cs_csc_source = '/home/foo/project/bar' + + AssertEqual + \ [ + \ { + \ 'lnum': -1, + \ 'col' : -1, + \ 'text': 'No source files specified.', + \ 'code': 'CS2008', + \ 'type': 'W', + \ 'filename': '', + \ }, + \ { + \ 'lnum': -1, + \ 'col': -1, + \ 'text': 'Outputs without source must have the /out option specified', + \ 'code': 'CS1562', + \ 'type': 'E', + \ 'filename': '', + \ }, + \ ], + \ ale_linters#cs#csc#Handle(bufnr(''), [ + \ 'Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc)', + \ 'Copyright (C) Microsoft Corporation. All rights reserved.', + \ 'warning CS2008: No source files specified.', + \ 'error CS1562: Outputs without source must have the /out option specified', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cspell_handler.vader b/dot_vim/plugged/ale/test/handler/test_cspell_handler.vader new file mode 100644 index 0000000..b74b8d2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cspell_handler.vader @@ -0,0 +1,13 @@ +Execute(The cspell handler should handle cspell output): + AssertEqual + \ [ + \ { + \ 'lnum': 721, + \ 'col': 18, + \ 'type': 'W', + \ 'text': 'Unknown word (stylelint)', + \ }, + \ ], + \ ale#handlers#cspell#Handle(bufnr(''), + \ '/:721:18 - Unknown word (stylelint)' + \) diff --git a/dot_vim/plugged/ale/test/handler/test_cucumber_handler.vader b/dot_vim/plugged/ale/test/handler/test_cucumber_handler.vader new file mode 100644 index 0000000..2b69a78 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cucumber_handler.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/cucumber/cucumber.vim + +After: + call ale#linter#Reset() + +Execute(The cucumber handler parses JSON correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'code': 'E', + \ 'text': 'Undefined step' + \ } + \ ], + \ ale_linters#cucumber#cucumber#Handle(bufnr(''), [ + \ '[{"elements": [{"steps": [{"result": {"status": "undefined"},"match": {"location": "features/cuke.feature:13"},"line": 13,"name": "Something undefined","keyword": "Given "},{"result": {"status": "skipped"},"match": {"location": "/var/lib/gems/2.3.0/gems/cucumber-3.1.0/lib/cucumber/step_match.rb:103"},"line": 14,"name": "I visit the profile page for Alice","keyword": "When "}],"type": "scenario","line": 12,"description": "","name": "Another scenario","keyword": "Scenario","id": "a-user-can-view-another-users-profile;another-scenario"}],"line": 1,"description": "","name": "A user can view another users profile","keyword": "Feature","id": "a-user-can-view-another-users-profile","uri": "features/cuke.feature"}]' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cuda_nvcc_handler.vader b/dot_vim/plugged/ale/test/handler/test_cuda_nvcc_handler.vader new file mode 100644 index 0000000..40e3192 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cuda_nvcc_handler.vader @@ -0,0 +1,41 @@ +Before: + runtime ale_linters/cuda/nvcc.vim + +After: + call ale#linter#Reset() + +Execute(The cuda nvcc handler should parse errors from multiple files for NVCC 8.0): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'this declaration has no storage class or type specifier', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\test.cu' + \ : '/tmp/cudatest/test.cu', + \ }, + \ { + \ 'lnum': 2, + \ 'type': 'E', + \ 'text': 'attribute "global" does not apply here', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\common.h' + \ : '/tmp/cudatest/common.h', + \ }, + \ { + \ 'lnum': 2, + \ 'type': 'E', + \ 'text': 'expected a ";"', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\common.h' + \ : '/tmp/cudatest/common.h', + \ }, + \ ], + \ ale_linters#cuda#nvcc#HandleNVCCFormat(0, [ + \ '/tmp/cudatest/test.cu(1): error: this declaration has no storage class or type specifier', + \ '/tmp/cudatest/common.h(2): error: attribute "global" does not apply here', + \ '/tmp/cudatest/common.h(2): error: expected a ";"', + \ 'At end of source: warning: parsing restarts here after previous syntax error', + \ '3 errors detected in the compilation of "/tmp/tmpxft_00003a9f_00000000-7_test.cpp1.ii".', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_cypher_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_cypher_lint_handler.vader new file mode 100644 index 0000000..066adae --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_cypher_lint_handler.vader @@ -0,0 +1,21 @@ +Before: + runtime ale_linters/cypher/cypher_lint.vim + +After: + call ale#linter#Reset() + +Execute(The cypher-lint handler should handle errors for the current file correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 75, + \ 'type': 'E', + \ 'text': "Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('", + \ }, + \ ], + \ ale_linters#cypher#cypher_lint#Handle(bufnr(''), [ + \ "shakespeare.cql:1:75: Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('", + \ "CREATE (shakespeare:Author {firstname:'William', lastname:'Shakespeare'}),,", + \ " ^", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_dafny_handler.vader b/dot_vim/plugged/ale/test/handler/test_dafny_handler.vader new file mode 100644 index 0000000..4ca288d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_dafny_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/dafny/dafny.vim + +After: + call ale#linter#Reset() + +Execute(The Dafny handler should parse output correctly): + AssertEqual + \ [ + \ { + \ 'filename': 'File.dfy', + \ 'col': 45, + \ 'lnum': 123, + \ 'text': 'A precondition for this call might not hold.', + \ 'type': 'E' + \ }, + \ { + \ 'filename': 'File.dfy', + \ 'col': 90, + \ 'lnum': 678, + \ 'text': 'This is the precondition that might not hold.', + \ 'type': 'W' + \ }, + \ { + \ 'filename': 'File.dfy', + \ 'col': 45, + \ 'lnum': 123, + \ 'text': "Verification of 'Impl$$_22_Proof.__default.PutKeepsMapsFull' timed out after 2 seconds", + \ 'type': 'E' + \ }, + \ ], + \ ale_linters#dafny#dafny#Handle(0, [ + \ 'File.dfy(123,45): Error BP5002: A precondition for this call might not hold.', + \ 'File.dfy(678,90): Related location: This is the precondition that might not hold.', + \ "File.dfy(123,45): Verification of 'Impl$$_22_Proof.__default.PutKeepsMapsFull' timed out after 2 seconds", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_dart_analyze_handler.vader b/dot_vim/plugged/ale/test/handler/test_dart_analyze_handler.vader new file mode 100644 index 0000000..f167582 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_dart_analyze_handler.vader @@ -0,0 +1,35 @@ +Before: + runtime ale_linters/dart/dart_analyze.vim + +After: + call ale#linter#Reset() + +Execute(Basic problems should be parsed correctly): + AssertEqual + \ [ + \ { + \ 'type': 'E', + \ 'text': 'expected_token: Expected to find ''}''', + \ 'lnum': 5, + \ 'col': 1, + \ }, + \ { + \ 'type': 'W', + \ 'text': 'invalid_assignment: A value of type ''String'' can''t be assigned to a variable of type ''int''', + \ 'lnum': 2, + \ 'col': 16, + \ }, + \ { + \ 'type': 'I', + \ 'text': 'dead_code: Dead code. Try removing the code, or fixing the code before it so that it can be reached.', + \ 'lnum': 8, + \ 'col': 3, + \ }, + \ ], + \ ale_linters#dart#dart_analyze#Handle(bufnr(''), [ + \ 'Analyzing main.dart...', + \ ' error - main.dart:5:1 - Expected to find ''}'' - expected_token', + \ 'warning - main.dart:2:16 - A value of type ''String'' can''t be assigned to a variable of type ''int'' - invalid_assignment', + \ ' info - main.dart:8:3 - Dead code. Try removing the code, or fixing the code before it so that it can be reached. - dead_code', + \ '3 issues found.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_debride_handler.vader b/dot_vim/plugged/ale/test/handler/test_debride_handler.vader new file mode 100644 index 0000000..6285146 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_debride_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/ruby/debride.vim + +After: + call ale#linter#Reset() + +Execute(The debride linter parses output correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'text': 'Possible unused method: image_tags', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 7, + \ 'text': 'Possible unused method: not_deleted', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#ruby#debride#HandleOutput(0, [ + \ 'These methods MIGHT not be called:', + \ '', + \ 'Image', + \ ' image_tags app/models/image.rb:2', + \ ' not_deleted app/models/image.rb:7' + \]) diff --git a/dot_vim/plugged/ale/test/handler/test_desktop_file_validate_handler.vader b/dot_vim/plugged/ale/test/handler/test_desktop_file_validate_handler.vader new file mode 100644 index 0000000..8816343 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_desktop_file_validate_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime ale_linters/desktop/desktop_file_validate.vim + +After: + call ale#linter#Reset() + +Execute(The desktop-file-validate handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'key "TerminalOptions" in group "Desktop Entry" is deprecated', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'action "new-private-window" is defined, but there is no matching "Desktop Action new-private-window" group', + \ }, + \ ], + \ ale_linters#desktop#desktop_file_validate#Handle(bufnr(''), [ + \ 'foo.desktop: warning: key "TerminalOptions" in group "Desktop Entry" is deprecated', + \ 'foo.desktop: error: action "new-private-window" is defined, but there is no matching "Desktop Action new-private-window" group', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_dmd_handler.vader b/dot_vim/plugged/ale/test/handler/test_dmd_handler.vader new file mode 100644 index 0000000..32a0498 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_dmd_handler.vader @@ -0,0 +1,41 @@ +Before: + runtime ale_linters/d/dmd.vim + call ale#test#SetDirectory('/testplugin/test/dmd') + call ale#test#SetFilename('test.d') + +After: + call ale#linter#Reset() + call ale#test#RestoreDirectory() + +Execute(Basic errors should be handled by dmd): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/test.d'), + \ 'lnum': '5', + \ 'col' : '8', + \ 'type': 'E', + \ 'text': 'module weak_reference is in file ''dstruct/weak_reference.d'' which cannot be read' + \ }, + \ { + \ 'filename': ale#path#Simplify(g:dir . '/test.d'), + \ 'lnum': '20', + \ 'col' : '10', + \ 'type': 'W', + \ 'text': 'function test.thisoldfunc is deprecated' + \ }, + \ { + \ 'filename': ale#path#Simplify(g:dir . '/foo.d'), + \ 'lnum': '230', + \ 'col' : '9', + \ 'type': 'W', + \ 'text': 'statement is not reachable' + \ } + \ ], + \ ale_linters#d#dmd#Handle(bufnr(''), [ + \ 'test.d(5,8): Error: module weak_reference is in file ''dstruct/weak_reference.d'' which cannot be read', + \ 'import path[0] = source', + \ 'import path[1] = /usr/include/dlang/dmd', + \ ale#path#Simplify(g:dir . '/test.d') . '(20,10): Deprecation: function test.thisoldfunc is deprecated', + \ 'foo.d(230,9): Warning: statement is not reachable', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_dockerfile_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_dockerfile_lint_handler.vader new file mode 100644 index 0000000..a73db8c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_dockerfile_lint_handler.vader @@ -0,0 +1,112 @@ +Before: + runtime ale_linters/dockerfile/dockerfile_lint.vim + +After: + call ale#linter#Reset() + +Execute(The dockerfile_lint handler should handle broken JSON): + AssertEqual + \ [], + \ ale_linters#dockerfile#dockerfile_lint#Handle(bufnr(''), ["{asdf"]) + +Execute(The dockerfile_lint handler should handle an empty string response): + AssertEqual + \ [], + \ ale_linters#dockerfile#dockerfile_lint#Handle(bufnr(''), []) + +Execute(The dockerfile_lint handler should handle an empty result, even if it shouldn't happen): + AssertEqual + \ [], + \ ale_linters#dockerfile#dockerfile_lint#Handle(bufnr(''), ["{}"]) + +Execute(The dockerfile_lint handler should handle a normal example): + AssertEqual + \ [ + \ { + \ 'lnum': -1, + \ 'type': 'E', + \ 'text': "Required LABEL name/key 'Name' is not defined", + \ 'detail': "Required LABEL name/key 'Name' is not defined\n\nhttp://docs.projectatomic.io/container-best-practices/#_recommended_labels_for_your_project", + \ }, + \ { + \ 'lnum': -1, + \ 'type': 'E', + \ 'text': "Required LABEL name/key 'Version' is not defined", + \ 'detail': "Required LABEL name/key 'Version' is not defined\n\nhttp://docs.projectatomic.io/container-best-practices/#_recommended_labels_for_your_project", + \ }, + \ { + \ 'lnum': 3, + \ 'type': 'I', + \ 'text': "the MAINTAINER command is deprecated", + \ 'detail': "the MAINTAINER command is deprecated\n\nMAINTAINER is deprecated in favor of using LABEL since Docker v1.13.0\n\nhttps://github.com/docker/cli/blob/master/docs/deprecated.md#maintainer-in-dockerfile", + \ }, + \ { + \ 'lnum': -1, + \ 'type': 'I', + \ 'text': "There is no 'CMD' instruction", + \ 'detail': "There is no 'CMD' instruction\n\nhttps://docs.docker.com/engine/reference/builder/#cmd", + \ }, + \ ], + \ ale_linters#dockerfile#dockerfile_lint#Handle(bufnr(''), [ + \ '{', + \ ' "error": {', + \ ' "count": 2,', + \ ' "data": [', + \ ' {', + \ " \"message\": \"Required LABEL name/key 'Name' is not defined\",", + \ ' "line": -1,', + \ ' "level": "error",', + \ ' "lineContent": "",', + \ ' "reference_url": [', + \ ' "http://docs.projectatomic.io/container-best-practices/#",', + \ ' "_recommended_labels_for_your_project"', + \ ' ]', + \ ' },', + \ ' {', + \ " \"message\": \"Required LABEL name/key 'Version' is not defined\",", + \ ' "line": -1,', + \ ' "level": "error",', + \ ' "lineContent": "",', + \ ' "reference_url": [', + \ ' "http://docs.projectatomic.io/container-best-practices/#",', + \ ' "_recommended_labels_for_your_project"', + \ ' ]', + \ ' }', + \ ' ]', + \ ' },', + \ ' "warn": {', + \ ' "count": 0,', + \ ' "data": []', + \ ' },', + \ ' "info": {', + \ ' "count": 2,', + \ ' "data": [', + \ ' {', + \ ' "label": "maintainer_deprecated",', + \ ' "regex": {},', + \ ' "level": "info",', + \ ' "message": "the MAINTAINER command is deprecated",', + \ ' "description": "MAINTAINER is deprecated in favor of using LABEL since Docker v1.13.0",', + \ ' "reference_url": [', + \ ' "https://github.com/docker/cli/blob/master/docs/deprecated.md",', + \ ' "#maintainer-in-dockerfile"', + \ ' ],', + \ ' "lineContent": "MAINTAINER Alexander Olofsson ",', + \ ' "line": 3', + \ ' },', + \ ' {', + \ ' "instruction": "CMD",', + \ ' "count": 1,', + \ ' "level": "info",', + \ " \"message\": \"There is no 'CMD' instruction\",", + \ ' "description": "None",', + \ ' "reference_url": [', + \ ' "https://docs.docker.com/engine/reference/builder/",', + \ ' "#cmd"', + \ ' ]', + \ ' }', + \ ' ]', + \ ' },', + \ ' "summary": []', + \ '}', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_dogma_handler.vader b/dot_vim/plugged/ale/test/handler/test_dogma_handler.vader new file mode 100644 index 0000000..ead6d09 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_dogma_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/elixir/dogma.vim + +After: + call ale#linter#Reset() + +Execute(The dogma handler should parse lines correctly): + + AssertEqual + \ [ + \ { + \ 'bufnr': 347, + \ 'lnum': 18, + \ 'col': 5, + \ 'text': 'Some error', + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': 347, + \ 'lnum': 19, + \ 'col': 7, + \ 'text': 'Some warning', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#elixir#dogma#Handle(347, [ + \ 'This line should be ignored completely', + \ 'lib/filename.ex:18:5: C: Some error', + \ 'lib/filename.ex:19:7: R: Some warning', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_drafter_handler.vader b/dot_vim/plugged/ale/test/handler/test_drafter_handler.vader new file mode 100644 index 0000000..1524dde --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_drafter_handler.vader @@ -0,0 +1,37 @@ +Before: + runtime! ale_linters/apiblueprint/drafter.vim + +After: + call ale#linter#Reset() + +Execute(drafter handler should handle errors output): + AssertEqual + \ [ + \ { + \ 'lnum': 25, + \ 'col': 3, + \ 'text': "unable to parse response signature, expected 'response [] [()]'", + \ 'type': "W", + \ }, + \ { + \ 'lnum': 25, + \ 'col': 3, + \ 'text': "missing response HTTP status code, assuming 'Response 200'", + \ 'type': "W", + \ }, + \ { + \ 'lnum': 30, + \ 'col': 7, + \ 'end_lnum': 32, + \ 'end_col': 7, + \ 'text': "message-body asset is expected to be a pre-formatted code block, separate it by a newline and indent every of its line by 12 spaces or 3 tabs", + \ 'type': "W", + \ }, + \ ], + \ ale_linters#apiblueprint#drafter#HandleErrors(bufnr(''), [ + \ "", + \ "OK.", + \ "warning: (3) unable to parse response signature, expected 'response [] [()]'; line 25, column 3 - line 25, column 29", + \ "warning: (6) missing response HTTP status code, assuming 'Response 200'; line 25, column 3 - line 25, column 29", + \ "warning: (10) message-body asset is expected to be a pre-formatted code block, separate it by a newline and indent every of its line by 12 spaces or 3 tabs; line 30, column 7 - line 30, column 11; line 31, column 6 - line 31, column 7; line 32, column 6 - line 32, column 7" + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_elmmake_handler.vader b/dot_vim/plugged/ale/test/handler/test_elmmake_handler.vader new file mode 100644 index 0000000..f5906a8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_elmmake_handler.vader @@ -0,0 +1,299 @@ +Before: + runtime ale_linters/elm/make.vim + +After: + unlet! g:config_error_lines + + call ale#linter#Reset() + + +" Elm 0.19 + +Execute(The elm-make handler should parse Elm 0.19 general problems correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': "error details\n\nstyled details" + \ } + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode({ + \ 'type': 'error', + \ 'path': ale#util#Tempname() . '/Module.elm', + \ 'title': 'UNKNOWN IMPORT', + \ 'message': ["error details\n\n", { 'string': 'styled details' }] + \ }), + \ ]) + +Execute(The elm-make handler should parse Elm 0.19 compilation errors correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 404, + \ 'col': 1, + \ 'end_lnum': 408, + \ 'end_col': 18, + \ 'type': 'E', + \ 'text': "error details 1\n\nstyled details" + \ }, + \ { + \ 'lnum': 406, + \ 'col': 5, + \ 'end_lnum': 407, + \ 'end_col': 17, + \ 'type': 'E', + \ 'text': 'error details 2', + \ }, + \ { + \ 'lnum': 406, + \ 'col': 5, + \ 'end_lnum': 406, + \ 'end_col': 93, + \ 'type': 'E', + \ 'text': 'error details 3', + \ }, + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode({ + \ 'type': 'compile-errors', + \ 'errors': [ + \ { + \ 'path': ale#util#Tempname() . '/Module.elm', + \ 'problems': [ + \ { + \ 'title': 'TYPE MISMATCH', + \ 'message': ["error details 1\n\n", { 'string': 'styled details' }], + \ 'region': { 'start': { 'line': 404, 'column': 1 }, 'end': { 'line': 408, 'column': 18 } } + \ }, + \ { + \ 'title': 'TYPE MISMATCH', + \ 'message': ['error details 2'], + \ 'region': { 'start': {'line': 406, 'column': 5}, 'end': {'line': 407, 'column': 17 } } + \ }, + \ { + \ 'title': 'TYPE MISMATCH', + \ 'message': ['error details 3'], + \ 'region': { 'start': { 'line': 406, 'column': 5}, 'end': {'line': 406, 'column': 93 } } + \ } + \ ] + \ } + \ ] + \ }), + \ ]) + +Execute(The elm-make handler should handle errors in Elm 0.19 imported modules): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': "src/Module.elm - error details\n\nstyled details", + \ 'detail': "src/Module.elm ----------\n\nerror details\n\nstyled details" + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': "Elm - error details\n\nstyled details", + \ 'detail': "Elm ----------\n\nerror details\n\nstyled details" + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': "src/Module.elm:404 - error details\n\nstyled details", + \ 'detail': "src/Module.elm:404 ----------\n\nerror details\n\nstyled details" + \ }, + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode({ + \ 'type': 'error', + \ 'path': 'src/Module.elm', + \ 'title': 'UNKNOWN IMPORT', + \ 'message': ["error details\n\n", { 'string': 'styled details' }] + \ }), + \ json_encode({ + \ 'type': 'error', + \ 'path': v:null, + \ 'title': 'UNKNOWN IMPORT', + \ 'message': ["error details\n\n", { 'string': 'styled details' }] + \ }), + \ json_encode({ + \ 'type': 'compile-errors', + \ 'errors': [ + \ { + \ 'path': 'src/Module.elm', + \ 'problems': [ + \ { + \ 'title': 'TYPE MISMATCH', + \ 'message': ["error details\n\n", { 'string': 'styled details' }], + \ 'region': { 'start': { 'line': 404, 'column': 1 }, 'end': { 'line': 408, 'column': 18 } } + \ } + \ ] + \ } + \ ] + \ }), + \ ]) + + +" Elm 0.18 + +Execute(The elm-make handler should parse Elm 0.18 compilation errors correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 33, + \ 'col': 1, + \ 'end_lnum': 33, + \ 'end_col': 19, + \ 'type': 'W', + \ 'text': 'warning overview', + \ 'detail': "warning overview\n\nwarning details", + \ }, + \ { + \ 'lnum': 404, + \ 'col': 1, + \ 'end_lnum': 408, + \ 'end_col': 18, + \ 'type': 'E', + \ 'text': 'error overview 1', + \ 'detail': "error overview 1\n\nerror details 1", + \ }, + \ { + \ 'lnum': 406, + \ 'col': 5, + \ 'end_lnum': 407, + \ 'end_col': 17, + \ 'type': 'E', + \ 'text': 'error overview 2', + \ 'detail': "error overview 2\n\nerror details 2", + \ }, + \ { + \ 'lnum': 406, + \ 'col': 5, + \ 'end_lnum': 406, + \ 'end_col': 93, + \ 'type': 'E', + \ 'text': 'error overview 3', + \ 'detail': "error overview 3\n\nerror details 3", + \ }, + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode([ + \ { + \ 'tag': 'unused import', + \ 'overview': 'warning overview', + \ 'details': 'warning details', + \ 'region': {'start': { 'line': 33, 'column': 1 }, 'end': { 'line': 33, 'column': 19 } }, + \ 'type': 'warning', + \ 'file': ale#util#Tempname() . '/Module.elm', + \ } + \ ]), + \ json_encode([ + \ { + \ 'tag': 'TYPE MISMATCH', + \ 'overview': 'error overview 1', + \ 'subregion': { 'start': { 'line': 406, 'column': 5 }, 'end': { 'line': 408, 'column': 18 } }, + \ 'details': 'error details 1', + \ 'region': { 'start': { 'line': 404, 'column': 1 }, 'end': { 'line': 408, 'column': 18 } }, + \ 'type': 'error', + \ 'file': ale#util#Tempname() . '/Module.elm', + \ }, + \ { + \ 'tag': 'TYPE MISMATCH', + \ 'overview': 'error overview 2', + \ 'subregion': { 'start': { 'line': 407, 'column': 12 }, 'end': { 'line': 407, 'column': 17 } }, + \ 'details': 'error details 2', + \ 'region': { 'start': { 'line': 406, 'column': 5}, 'end': { 'line': 407, 'column': 17 } }, + \ 'type':'error', + \ 'file': ale#util#Tempname() . '/Module.elm', + \ }, + \ { + \ 'tag': 'TYPE MISMATCH', + \ 'overview': 'error overview 3', + \ 'subregion': { 'start': { 'line': 406, 'column': 88 }, 'end': { 'line': 406, 'column': 93 } }, + \ 'details': 'error details 3', + \ 'region': { 'start': { 'line': 406, 'column': 5 }, 'end': { 'line': 406, 'column': 93 } }, + \ 'type':'error', + \ 'file': ale#util#Tempname() . '/Module.elm', + \ } + \ ]), + \ ]) + +Execute(The elm-make handler should handle errors in Elm 0.18 imported modules): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'src/Module.elm:33 - error overview', + \ 'detail': "src/Module.elm:33 ----------\n\nerror overview\n\nerror details" + \ } + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode([ + \ { + \ 'tag': 'unused import', + \ 'overview': 'warning overview', + \ 'details': 'warning details', + \ 'region': {'start': { 'line': 33, 'column': 1 }, 'end': { 'line': 33, 'column': 19 } }, + \ 'type': 'warning', + \ 'file': 'src/Module.elm', + \ }, + \ { + \ 'tag': 'type error', + \ 'overview': 'error overview', + \ 'details': 'error details', + \ 'region': {'start': { 'line': 33, 'column': 1 }, 'end': { 'line': 33, 'column': 19 } }, + \ 'type': 'error', + \ 'file': 'src/Module.elm', + \ } + \ ]), + \ ]) + +" Generic + +Execute(The elm-make handler should put an error on the first line if a line cannot be parsed): + AssertEqual + \ [ + \ { + \ 'lnum': 404, + \ 'col': 1, + \ 'end_lnum': 408, + \ 'end_col': 18, + \ 'type': 'E', + \ 'text': "error details 1\n\nstyled details" + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'Not JSON', + \ 'detail': "Not JSON\nAlso not JSON", + \ }, + \ ], + \ ale_linters#elm#make#Handle(347, [ + \ json_encode({ + \ 'type': 'compile-errors', + \ 'errors': [ + \ { + \ 'path': ale#util#Tempname() . '/Module.elm', + \ 'problems': [ + \ { + \ 'title': 'TYPE MISMATCH', + \ 'message': ["error details 1\n\n", { 'string': 'styled details' }], + \ 'region': { 'start': { 'line': 404, 'column': 1 }, 'end': { 'line': 408, 'column': 18 } } + \ } + \ ] + \ } + \ ] + \ }), + \ 'Not JSON', + \ 'Also not JSON', + \ ]) + +Execute(The elm-make handler should ignore success lines): + AssertEqual + \ [], + \ ale_linters#elm#make#Handle(347, [ + \ 'Successfully generated /dev/null', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_embertemplatelint_handler.vader b/dot_vim/plugged/ale/test/handler/test_embertemplatelint_handler.vader new file mode 100644 index 0000000..97ca439 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_embertemplatelint_handler.vader @@ -0,0 +1,81 @@ +" Author: Adrian Zalewski +Before: + runtime ale_linters/handlebars/embertemplatelint.vim + +After: + call ale#linter#Reset() + +Execute(The ember-template-lint handler should parse lines correctly): + let input_lines = split('{ + \ "/ember-project/app/templates/application.hbs": [ + \ { + \ "moduleId": "app/templates/application", + \ "rule": "bare-strings", + \ "severity": 2, + \ "message": "Non-translated string used", + \ "line": 1, + \ "column": 10, + \ "source": " Bare String\n" + \ }, + \ { + \ "moduleId": "app/templates/application", + \ "rule": "invalid-interactive", + \ "severity": 1, + \ "message": "Interaction added to non-interactive element", + \ "line": 3, + \ "column": 6, + \ "source": "" + \ } + \ ] + \ }', '\n') + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'text': 'bare-strings: Non-translated string used', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 6, + \ 'text': 'invalid-interactive: Interaction added to non-interactive element', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines) + +Execute(The ember-template-lint handler should handle template parsing error correctly): + let input_lines = split('{ + \ "/ember-project/app/templates/application.hbs": [ + \ { + \ "fatal": true, + \ "moduleId": "app/templates/application", + \ "message": "Parse error on line 5 ...", + \ "line": 5, + \ "column": 3, + \ "source": "Error: Parse error on line 5 ...", + \ "severity": 2 + \ } + \ ] + \ }', '\n') + + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 3, + \ 'text': 'Parse error on line 5 ...', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines) + +Execute(The ember-template-lint handler should handle no lint errors/warnings): + AssertEqual + \ [], + \ ale_linters#handlebars#embertemplatelint#Handle(347, []) + AssertEqual + \ [], + \ ale_linters#handlebars#embertemplatelint#Handle(347, ['{}']) diff --git a/dot_vim/plugged/ale/test/handler/test_erblint_handler.vader b/dot_vim/plugged/ale/test/handler/test_erblint_handler.vader new file mode 100644 index 0000000..01d4c0a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_erblint_handler.vader @@ -0,0 +1,70 @@ +Before: + runtime ale_linters/eruby/erblint.vim + +After: + unlet! g:lines + call ale#linter#Reset() + +Execute(The erblint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 0, + \ 'end_col': 0, + \ 'text': 'Extra blank line detected.', + \ 'code': 'ExtraNewline', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 0, + \ 'end_col': 0, + \ 'text': 'Remove multiple trailing newline at the end of the file.', + \ 'code': 'FinalNewline', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 9, + \ 'end_col': 11, + \ 'text': 'Use 1 space after `<%=` instead of 2 spaces.', + \ 'code': 'SpaceAroundErbTag', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 9, + \ 'end_col': 11, + \ 'text': 'Use 1 space before `%>` instead of 2 spaces.', + \ 'code': 'SpaceAroundErbTag', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 6, + \ 'end_col': 10, + \ 'text': 'Extra whitespace detected at end of line.', + \ 'code': 'TrailingWhitespace', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#eruby#erblint#Handle(347, [ + \ '{"metadata":{"erb_lint_version":"0.1.1","ruby_engine":"ruby","ruby_version":"3.0.2","ruby_patchlevel":"107","ruby_platform":"arm64-darwin20"},"files":[{"path":"demo.html.erb","offenses":[{"linter":"ExtraNewline","message":"Extra blank line detected.","location":{"start_line":3,"start_column":0,"last_line":4,"last_column":0,"length":1}},{"linter":"FinalNewline","message":"Remove multiple trailing newline at the end of the file.","location":{"start_line":6,"start_column":0,"last_line":8,"last_column":0,"length":2}},{"linter":"SpaceAroundErbTag","message":"Use 1 space after `<%=` instead of 2 spaces.","location":{"start_line":4,"start_column":9,"last_line":4,"last_column":11,"length":2}},{"linter":"SpaceAroundErbTag","message":"Use 1 space before `%>` instead of 2 spaces.","location":{"start_line":4,"start_column":9,"last_line":4,"last_column":11,"length":2}},{"linter":"TrailingWhitespace","message":"Extra whitespace detected at end of line.","location":{"start_line":5,"start_column":6,"last_line":5,"last_column":10,"length":4}}]}],"summary":{"offenses":5,"inspected_files":1,"corrected":0}}' + \ ]) + +Execute(The erblint handler should handle when files are checked and no offenses are found): + AssertEqual + \ [], + \ ale_linters#eruby#erblint#Handle(347, [ + \ '{"metadata":{"erb_lint_version":"0.1.1","ruby_engine":"ruby","ruby_version":"3.0.2","ruby_patchlevel":"107","ruby_platform":"arm64-darwin20"},"files":[{"path":"demo.html.erb","offenses":[]}],"summary":{"offenses":0,"inspected_files":1,"corrected":0}}' + \ ]) + +Execute(The erblint handler should handle output without any errors): + AssertEqual + \ [], + \ ale_linters#eruby#erblint#Handle(347, ['{}']) + + AssertEqual + \ [], + \ ale_linters#eruby#erblint#Handle(347, []) diff --git a/dot_vim/plugged/ale/test/handler/test_erlang_dialyzer_handler.vader b/dot_vim/plugged/ale/test/handler/test_erlang_dialyzer_handler.vader new file mode 100644 index 0000000..afd5c59 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_erlang_dialyzer_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/erlang/dialyzer.vim + +After: + call ale#linter#Reset() + +Execute(The dialyzer handler should handle error messages.): + AssertEqual + \[ + \ { + \ 'lnum': 3, + \ 'lcol': 0, + \ 'text': 'Callback info about the provider behaviour is not available', + \ 'type': 'W' + \ } + \], + \ ale_linters#erlang#dialyzer#Handle(bufnr(''), ['erl_tidy_prv_fmt.erl:3: Callback info about the provider behaviour is not available']) + +Execute(The dialyzer handler should handle empty file.): + AssertEqual + \[], + \ ale_linters#erlang#dialyzer#Handle(bufnr(''), []) + +Execute(The dialyzer handler should handle empty lines.): + AssertEqual + \[], + \ ale_linters#erlang#dialyzer#Handle(bufnr(''), ['']) diff --git a/dot_vim/plugged/ale/test/handler/test_erlang_elvis_handler.vader b/dot_vim/plugged/ale/test/handler/test_erlang_elvis_handler.vader new file mode 100644 index 0000000..0a6d756 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_erlang_elvis_handler.vader @@ -0,0 +1,40 @@ +Before: + runtime ale_linters/erlang/elvis.vim + +After: + call ale#linter#Reset() + +Execute(Warning messages should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 11, + \ 'text': "Replace the 'if' expression on line 11 with a 'case' expression or function clauses.", + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 20, + \ 'text': 'Remove the debug call to io:format/1 on line 20.', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#erlang#elvis#Handle(bufnr(''), [ + \ "src/foo.erl:11:no_if_expression:Replace the 'if' expression on line 11 with a 'case' expression or function clauses.", + \ 'src/foo.erl:20:no_debug_call:Remove the debug call to io:format/1 on line 20.', + \ ]) + +Execute(Line length message shouldn't contain the line itself): + AssertEqual + \ [ + \ { + \ 'lnum': 24, + \ 'text': 'Line 24 is too long.', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#erlang#elvis#Handle(bufnr(''), [ + \ 'src/foo.erl:24:line_length:Line 24 is too long: io:format("Look ma, too long!"),.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_eslint_handler.vader b/dot_vim/plugged/ale/test/handler/test_eslint_handler.vader new file mode 100644 index 0000000..01dd2c8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_eslint_handler.vader @@ -0,0 +1,438 @@ +Before: + Save g:ale_javascript_eslint_suppress_eslintignore + Save g:ale_javascript_eslint_suppress_missing_config + Save g:ale_warn_about_trailing_whitespace + Save g:ale_warn_about_trailing_blank_lines + + let g:ale_javascript_eslint_suppress_eslintignore = 0 + let g:ale_javascript_eslint_suppress_missing_config = 0 + let g:ale_warn_about_trailing_whitespace = 1 + let g:ale_warn_about_trailing_blank_lines = 1 + unlet! b:ale_warn_about_trailing_whitespace + unlet! b:ale_warn_about_trailing_blank_lines + +After: + Restore + + unlet! b:ale_javascript_eslint_suppress_eslintignore + unlet! b:ale_javascript_eslint_suppress_missing_config + unlet! b:ale_warn_about_trailing_whitespace + unlet! b:ale_warn_about_trailing_blank_lines + unlet! g:config_error_lines + +Execute(The eslint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 47, + \ 'col': 14, + \ 'text': 'Missing trailing comma.', + \ 'code': 'comma-dangle', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 56, + \ 'col': 41, + \ 'text': 'Missing semicolon.', + \ 'code': 'semi', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 13, + \ 'col': 3, + \ 'text': 'Parsing error: Unexpected token', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'This line should be ignored completely', + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ 'This line should be ignored completely', + \ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token', + \ ]) + +Execute(The eslint handler should print a message about a missing configuration file): + let g:config_error_lines = [ + \ '', + \ 'Oops! Something went wrong! :(', + \ '', + \ 'ESLint couldn''t find a configuration file. To set up a configuration file for this project, please run:', + \ ' eslint --init', + \ '', + \ 'ESLint looked for configuration files in /some/path/or/other and its ancestors.', + \ '', + \ 'If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint', + \ '', + \ ] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should allow the missing config error to be suppressed): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ '', + \ 'Oops! Something went wrong! :(', + \ '', + \ 'ESLint couldn''t find a configuration file. To set up a configuration file for this project, please run:', + \ ' eslint --init', + \ '', + \ 'ESLint looked for configuration files in /some/path/or/other and its ancestors.', + \ '', + \ 'If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint', + \ '', + \ ] + + AssertEqual + \ [], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message for config parsing errors): + let g:config_error_lines = [ + \ 'Cannot read config file: /some/path/or/other/.eslintrc.js', + \ 'Error: Unexpected token <<', + \ '/some/path/or/other/.eslintrc.js:1', + \ '(function (exports, require, module, __filename, __dirname) { <<<>>>', + \ ' ^^', + \ 'SyntaxError: Unexpected token <<', + \ ' at Object.exports.runInThisContext (vm.js:76:16)', + \ ' at Module._compile (module.js:528:28)', + \ ' at Object.Module._extensions..js (module.js:565:10)', + \ ' at Module.load (module.js:473:32)', + \ ' at tryModuleLoad (module.js:432:12)', + \ ' at Function.Module._load (module.js:424:3)', + \ ' at Module.require (module.js:483:17)', + \ ' at require (internal/module.js:20:19)', + \ ' at module.exports (/usr/local/lib/node_modules/eslint/node_modules/require-uncached/index.js:14:12)', + \ ' at loadJSConfigFile (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:160:16)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress parsing errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ 'Cannot read config file: /some/path/or/other/.eslintrc.js', + \ 'Error: Unexpected token <<', + \ '/some/path/or/other/.eslintrc.js:1', + \ '(function (exports, require, module, __filename, __dirname) { <<<>>>', + \ ' ^^', + \ 'SyntaxError: Unexpected token <<', + \ ' at Object.exports.runInThisContext (vm.js:76:16)', + \ ' at Module._compile (module.js:528:28)', + \ ' at Object.Module._extensions..js (module.js:565:10)', + \ ' at Module.load (module.js:473:32)', + \ ' at tryModuleLoad (module.js:432:12)', + \ ' at Function.Module._load (module.js:424:3)', + \ ' at Module.require (module.js:483:17)', + \ ' at require (internal/module.js:20:19)', + \ ' at module.exports (/usr/local/lib/node_modules/eslint/node_modules/require-uncached/index.js:14:12)', + \ ' at loadJSConfigFile (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:160:16)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message for invalid configuration settings): + let g:config_error_lines = [ + \ '/home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ 'Error: /home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ ' at validateRuleOptions (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:115:15)', + \ ' at /usr/local/lib/node_modules/eslint/lib/config/config-validator.js:162:13', + \ ' at Array.forEach (native)', + \ ' at Object.validate (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:161:35)', + \ ' at Object.load (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:522:19)', + \ ' at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:63:33)', + \ ' at getLocalConfig (/usr/local/lib/node_modules/eslint/lib/config.js:130:29)', + \ ' at Config.getConfig (/usr/local/lib/node_modules/eslint/lib/config.js:256:22)', + \ ' at processText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:224:33)', + \ ' at CLIEngine.executeOnText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:756:26)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress invalid config errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ '/home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ 'Error: /home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ ' at validateRuleOptions (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:115:15)', + \ ' at /usr/local/lib/node_modules/eslint/lib/config/config-validator.js:162:13', + \ ' at Array.forEach (native)', + \ ' at Object.validate (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:161:35)', + \ ' at Object.load (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:522:19)', + \ ' at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:63:33)', + \ ' at getLocalConfig (/usr/local/lib/node_modules/eslint/lib/config.js:130:29)', + \ ' at Config.getConfig (/usr/local/lib/node_modules/eslint/lib/config.js:256:22)', + \ ' at processText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:224:33)', + \ ' at CLIEngine.executeOnText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:756:26)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message when import is not used in a module): + let g:config_error_lines = [ + \ 'ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ 'AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ ' at Referencer.ImportDeclaration (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:597:9)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Referencer.Visitor.visitChildren (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:101:38)', + \ ' at Referencer.Program (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:449:14)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Object.analyze (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/index.js:138:16)', + \ ' at EventEmitter.module.exports.api.verify (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/eslint.js:887:40)', + \ ' at processText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:278:31)', + \ ' at CLIEngine.executeOnText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:734:26)', + \ ' at Object.execute (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli.js:171:42) ', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress module import errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ 'ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ 'AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ ' at Referencer.ImportDeclaration (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:597:9)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Referencer.Visitor.visitChildren (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:101:38)', + \ ' at Referencer.Program (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:449:14)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Object.analyze (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/index.js:138:16)', + \ ' at EventEmitter.module.exports.api.verify (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/eslint.js:887:40)', + \ ' at processText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:278:31)', + \ ' at CLIEngine.executeOnText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:734:26)', + \ ' at Object.execute (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli.js:171:42) ', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), g:config_error_lines[:]) + + +Execute(The eslint handler should output end_col values where appropriate): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 3, + \ 'end_col': 15, + \ 'text': 'Parsing error: Unexpected token ''some string''', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 70, + \ 'col': 3, + \ 'end_col': 5, + \ 'text': '''foo'' is not defined.', + \ 'code': 'no-undef', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 71, + \ 'col': 2, + \ 'end_col': 6, + \ 'text': 'Unexpected `await` inside a loop.', + \ 'code': 'no-await-in-loop', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 72, + \ 'col': 6, + \ 'end_col': 10, + \ 'text': 'Redundant use of `await` on a return value.', + \ 'code': 'no-return-await', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 73, + \ 'col': 4, + \ 'end_col': 10, + \ 'text': 'Unexpected console statement', + \ 'code': 'no-console', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 74, + \ 'col': 4, + \ 'end_col': 11, + \ 'text': 'Unexpected ''debugger'' statement.', + \ 'code': 'no-debugger', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'app.js:4:3: Parsing error: Unexpected token ''some string'' [Error]', + \ 'app.js:70:3: ''foo'' is not defined. [Error/no-undef]', + \ 'app.js:71:2: Unexpected `await` inside a loop. [Error/no-await-in-loop]', + \ 'app.js:72:6: Redundant use of `await` on a return value. [Error/no-return-await]', + \ 'app.js:73:4: Unexpected console statement [Error/no-console]', + \ 'app.js:74:4: Unexpected ''debugger'' statement. [Error/no-debugger]', + \ ]) + +Execute(The eslint hint about using typescript-eslint-parser): + silent! noautocmd file foo.ts + + AssertEqual + \ [ + \ { + \ 'lnum': 451, + \ 'col': 2, + \ 'end_col': 2, + \ 'text': 'Parsing error (You may need configure typescript-eslint-parser): Unexpected token )', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'foo.ts:451:2: Parsing error: Unexpected token ) [Error]', + \ ]) + +Execute(eslint should warn about ignored files by default): + AssertEqual + \ [{ + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.' + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ '/path/to/some/ignored.js:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]', + \ ]) + + AssertEqual + \ [{ + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override.', + \ }], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ '/path/to/some/ignored.js:0:0: File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override. [Warning]', + \ ]) + +Execute(eslint should not warn about ignored files when explicitly disabled): + let g:ale_javascript_eslint_suppress_eslintignore = 1 + + AssertEqual + \ [], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ '/path/to/some/ignored.js:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]', + \ ]) + + AssertEqual + \ [], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ '/path/to/some/ignored.js:0:0: File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override. [Warning]', + \ ]) + +Execute(eslint should handle react errors correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 59, + \ 'col': 9, + \ 'type': 'E', + \ 'text': 'Property should be placed on the same line as the component declaration', + \ 'code': 'react/jsx-first-prop-new-line', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ '/path/editor-help.jsx:59:9: Property should be placed on the same line as the component declaration [Error/react/jsx-first-prop-new-line]', + \ ]) + +Execute(Failing to connect to eslint_d should be handled correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'Could not connect', + \ ]) + +Execute(Disabling warnings about trailing spaces should work): + silent! noautocmd file foo.ts + + AssertEqual + \ [ + \ { + \ 'lnum': 182, + \ 'col': 22, + \ 'code': 'no-trailing-spaces', + \ 'type': 'E', + \ 'text': 'Trailing spaces not allowed.', + \ }, + \ ], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'foo.js:182:22: Trailing spaces not allowed. [Error/no-trailing-spaces]', + \ ]) + + let g:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'foo.js:182:22: Trailing spaces not allowed. [Error/no-trailing-spaces]', + \ ]) + + let g:ale_warn_about_trailing_whitespace = 1 + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [], + \ ale#handlers#eslint#Handle(bufnr(''), [ + \ 'foo.js:182:22: Trailing spaces not allowed. [Error/no-trailing-spaces]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_eslint_json_handler.vader b/dot_vim/plugged/ale/test/handler/test_eslint_json_handler.vader new file mode 100644 index 0000000..6235794 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_eslint_json_handler.vader @@ -0,0 +1,376 @@ +Before: + Save g:ale_javascript_eslint_suppress_eslintignore + Save g:ale_javascript_eslint_suppress_missing_config + Save g:ale_warn_about_trailing_whitespace + Save g:ale_warn_about_trailing_blank_lines + + let g:ale_javascript_eslint_suppress_eslintignore = 0 + let g:ale_javascript_eslint_suppress_missing_config = 0 + let g:ale_warn_about_trailing_whitespace = 1 + let g:ale_warn_about_trailing_blank_lines = 1 + unlet! b:ale_warn_about_trailing_whitespace + unlet! b:ale_warn_about_trailing_blank_lines + +After: + Restore + + unlet! b:ale_javascript_eslint_suppress_eslintignore + unlet! b:ale_javascript_eslint_suppress_missing_config + unlet! b:ale_warn_about_trailing_whitespace + unlet! b:ale_warn_about_trailing_blank_lines + unlet! g:config_error_lines + +Execute(The eslint handler should parse json correctly): + call ale#test#SetFilename('foo.js') + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'col': 7, + \ 'end_col': 14, + \ 'text': '''variable'' is assigned a value but never used.', + \ 'code': 'no-unused-vars', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 15, + \ 'text': 'Missing semicolon.', + \ 'code': 'semi', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 7, + \ 'end_lnum': 7, + \ 'col': 7, + \ 'end_col': 14, + \ 'text': '''variable'' is already defined.', + \ 'code': 'no-redeclare', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.js","messages":[{"ruleId":"no-unused-vars","severity":1,"message":"''variable'' is assigned a value but never used.","line":1,"column":7,"nodeType":"Identifier","endLine":1,"endColumn":15},{"ruleId":"semi","severity":1,"message":"Missing semicolon.","line":5,"column":15,"nodeType":"ExpressionStatement","fix":{"range":[46,46],"text":";"}},{"ruleId":"no-redeclare","severity":2,"message":"''variable'' is already defined.","line":7,"column":7,"nodeType":"Identifier","endLine":7,"endColumn":15}],"errorCount":1,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":1,"source":"const variable = {\n a: 3\n};\n\nconsole.log(1)\n\nclass variable {\n}\n"}]' + \ ]) + +Execute(The eslint handler should suppress deprecation warnings): + call ale#test#SetFilename('foo.js') + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 9, + \ 'text': 'Parsing error: Unexpected token Controller', + \ 'type': 'E', + \ } + \ ], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.js","messages":[{"ruleId":null,"fatal":true,"severity":2 ,"message":"Parsing error: Unexpected token Controller","line":1,"column":9}],"errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount": 0,"source":"i:mport Controller from \"@ember/controller\";\nimport listViewControllerMixin from \"elearning/mixins/list-view-controller\";\nimport { inject as service } from \"@ember/service\";\n\nexport default Controller.extend(listViewControllerMixin(), {\n modelName: \"notification\",\n intl: service(),\n\n flatpickrLocale: computed(\"intl.locale\", function() {\n return this.intl.locale.firstObject.split(\"-\")[0];\n })\n});\n"}]', '(node:616989) [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The ''parserOptions.ecmaFeatures.experimentalObjectRestSpread'' option is deprecated. Use ''parser Options.ecmaVersion'' instead. (found in "node_modules/eslint-plugin-ember/lib/config/base.js")]' + \ ]) + +Execute(The eslint handler should print a message about a missing configuration file): + let g:config_error_lines = [ + \ '', + \ 'Oops! Something went wrong! :(', + \ '', + \ 'ESLint couldn''t find a configuration file. To set up a configuration file for this project, please run:', + \ ' eslint --init', + \ '', + \ 'ESLint looked for configuration files in /some/path/or/other and its ancestors.', + \ '', + \ 'If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint', + \ '', + \ ] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should allow the missing config error to be suppressed): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ '', + \ 'Oops! Something went wrong! :(', + \ '', + \ 'ESLint couldn''t find a configuration file. To set up a configuration file for this project, please run:', + \ ' eslint --init', + \ '', + \ 'ESLint looked for configuration files in /some/path/or/other and its ancestors.', + \ '', + \ 'If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint', + \ '', + \ ] + + AssertEqual + \ [], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message for config parsing errors): + let g:config_error_lines = [ + \ 'Cannot read config file: /some/path/or/other/.eslintrc.js', + \ 'Error: Unexpected token <<', + \ '/some/path/or/other/.eslintrc.js:1', + \ '(function (exports, require, module, __filename, __dirname) { <<<>>>', + \ ' ^^', + \ 'SyntaxError: Unexpected token <<', + \ ' at Object.exports.runInThisContext (vm.js:76:16)', + \ ' at Module._compile (module.js:528:28)', + \ ' at Object.Module._extensions..js (module.js:565:10)', + \ ' at Module.load (module.js:473:32)', + \ ' at tryModuleLoad (module.js:432:12)', + \ ' at Function.Module._load (module.js:424:3)', + \ ' at Module.require (module.js:483:17)', + \ ' at require (internal/module.js:20:19)', + \ ' at module.exports (/usr/local/lib/node_modules/eslint/node_modules/require-uncached/index.js:14:12)', + \ ' at loadJSConfigFile (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:160:16)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress parsing errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ 'Cannot read config file: /some/path/or/other/.eslintrc.js', + \ 'Error: Unexpected token <<', + \ '/some/path/or/other/.eslintrc.js:1', + \ '(function (exports, require, module, __filename, __dirname) { <<<>>>', + \ ' ^^', + \ 'SyntaxError: Unexpected token <<', + \ ' at Object.exports.runInThisContext (vm.js:76:16)', + \ ' at Module._compile (module.js:528:28)', + \ ' at Object.Module._extensions..js (module.js:565:10)', + \ ' at Module.load (module.js:473:32)', + \ ' at tryModuleLoad (module.js:432:12)', + \ ' at Function.Module._load (module.js:424:3)', + \ ' at Module.require (module.js:483:17)', + \ ' at require (internal/module.js:20:19)', + \ ' at module.exports (/usr/local/lib/node_modules/eslint/node_modules/require-uncached/index.js:14:12)', + \ ' at loadJSConfigFile (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:160:16)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message for invalid configuration settings): + let g:config_error_lines = [ + \ '/home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ 'Error: /home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ ' at validateRuleOptions (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:115:15)', + \ ' at /usr/local/lib/node_modules/eslint/lib/config/config-validator.js:162:13', + \ ' at Array.forEach (native)', + \ ' at Object.validate (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:161:35)', + \ ' at Object.load (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:522:19)', + \ ' at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:63:33)', + \ ' at getLocalConfig (/usr/local/lib/node_modules/eslint/lib/config.js:130:29)', + \ ' at Config.getConfig (/usr/local/lib/node_modules/eslint/lib/config.js:256:22)', + \ ' at processText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:224:33)', + \ ' at CLIEngine.executeOnText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:756:26)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress invalid config errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ '/home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ 'Error: /home/w0rp/git/wazoku/wazoku-spotlight/.eslintrc.js:', + \ ' Configuration for rule "indent" is invalid:', + \ ' Value "off" is the wrong type.', + \ '', + \ ' at validateRuleOptions (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:115:15)', + \ ' at /usr/local/lib/node_modules/eslint/lib/config/config-validator.js:162:13', + \ ' at Array.forEach (native)', + \ ' at Object.validate (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:161:35)', + \ ' at Object.load (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:522:19)', + \ ' at loadConfig (/usr/local/lib/node_modules/eslint/lib/config.js:63:33)', + \ ' at getLocalConfig (/usr/local/lib/node_modules/eslint/lib/config.js:130:29)', + \ ' at Config.getConfig (/usr/local/lib/node_modules/eslint/lib/config.js:256:22)', + \ ' at processText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:224:33)', + \ ' at CLIEngine.executeOnText (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:756:26)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should print a message when import is not used in a module): + let g:config_error_lines = [ + \ 'ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ 'AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ ' at Referencer.ImportDeclaration (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:597:9)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Referencer.Visitor.visitChildren (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:101:38)', + \ ' at Referencer.Program (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:449:14)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Object.analyze (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/index.js:138:16)', + \ ' at EventEmitter.module.exports.api.verify (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/eslint.js:887:40)', + \ ' at processText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:278:31)', + \ ' at CLIEngine.executeOnText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:734:26)', + \ ' at Object.execute (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli.js:171:42) ', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(Suppressing missing configs shouldn't suppress module import errors): + let b:ale_javascript_eslint_suppress_missing_config = 1 + let g:config_error_lines = [ + \ 'ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ 'AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.', + \ ' at Referencer.ImportDeclaration (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:597:9)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Referencer.Visitor.visitChildren (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:101:38)', + \ ' at Referencer.Program (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/referencer.js:449:14)', + \ ' at Referencer.Visitor.visit (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/esrecurse/esrecurse.js:122:34)', + \ ' at Object.analyze (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint-scope/lib/index.js:138:16)', + \ ' at EventEmitter.module.exports.api.verify (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/eslint.js:887:40)', + \ ' at processText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:278:31)', + \ ' at CLIEngine.executeOnText (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli-engine.js:734:26)', + \ ' at Object.execute (/home/w0rp/git/wazoku/wazoku-spotlight/spotlight/static/node_modules/eslint/lib/cli.js:171:42) ', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'eslint configuration error (type :ALEDetail for more information)', + \ 'detail': join(g:config_error_lines, "\n"), + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), g:config_error_lines[:]) + +Execute(The eslint handler should hint about using typescript-eslint-parser): + call ale#test#SetFilename('foo.ts') + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Parsing error (You may need configure typescript-eslint-parser): The keyword ''interface'' is reserved', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.ts","messages":[{"ruleId":null,"fatal":true,"severity":2,"message":"Parsing error: The keyword ''interface'' is reserved","line":2,"column":1}],"errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"\ninterface test {}\n"}]', + \ ]) + +Execute(eslint should warn about ignored files by default): + AssertEqual + \ [{ + \ 'lnum': 0, + \ 'type': 'W', + \ 'text': 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.' + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"/path/to/some/ignored/file.js","messages":[{"fatal":false,"severity":1,"message":"File ignored because of a matching ignore pattern. Use \"--no-ignore\" to override."}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0}]', + \ ]) + + AssertEqual + \ [{ + \ 'lnum': 0, + \ 'type': 'W', + \ 'text': 'File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override.', + \ }], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"/path/to/some/ignored/file.js","messages":[{"fatal":false,"severity":1,"message":"File ignored by default. Use \"--ignore-pattern ''!node_modules/*''\" to override."}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0}]', + \ ]) + +Execute(eslint should not warn about ignored files when explicitly disabled): + let g:ale_javascript_eslint_suppress_eslintignore = 1 + + AssertEqual + \ [], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"/path/to/some/ignored/file.js","messages":[{"fatal":false,"severity":1,"message":"File ignored because of a matching ignore pattern. Use \"--no-ignore\" to override."}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0}]', + \ ]) + + AssertEqual + \ [], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"/path/to/some/ignored/file.js","messages":[{"fatal":false,"severity":1,"message":"File ignored by default. Use \"--ignore-pattern ''!node_modules/*''\" to override."}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0}]', + \ ]) + +Execute(Failing to connect to eslint_d should be handled correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.', + \ }, + \ ], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ 'Could not connect', + \ ]) + +Execute(Disabling warnings about trailing spaces should work): + call ale#test#SetFilename('foo.js') + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 16, + \ 'code': 'no-trailing-spaces', + \ 'type': 'W', + \ 'text': 'Trailing spaces not allowed.', + \ }, + \ ], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.js","messages":[{"ruleId":"no-trailing-spaces","severity":1,"message":"Trailing spaces not allowed.","line":2,"column":16,"nodeType":"Program","fix":{"range":[16,17],"text":""}}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":1,"source":"\nconsole.log(1); \n"}]' + \ ]) + + let g:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.js","messages":[{"ruleId":"no-trailing-spaces","severity":1,"message":"Trailing spaces not allowed.","line":2,"column":16,"nodeType":"Program","fix":{"range":[16,17],"text":""}}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":1,"source":"\nconsole.log(1); \n"}]' + \ ]) + + let g:ale_warn_about_trailing_whitespace = 1 + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [], + \ ale#handlers#eslint#HandleJSON(bufnr(''), [ + \ '[{"filePath":"foo.js","messages":[{"ruleId":"no-trailing-spaces","severity":1,"message":"Trailing spaces not allowed.","line":2,"column":16,"nodeType":"Program","fix":{"range":[16,17],"text":""}}],"errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":1,"source":"\nconsole.log(1); \n"}]' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_fecs_handler.vader b/dot_vim/plugged/ale/test/handler/test_fecs_handler.vader new file mode 100644 index 0000000..7c216b8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_fecs_handler.vader @@ -0,0 +1,35 @@ +Before: + runtime autoload/ale/handlers/fecs.vim + +After: + call ale#linter#Reset() + +Execute(fecs should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 20, + \ 'col': 25, + \ 'text': 'Unexpected console statement.', + \ 'code': 'no-console', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 24, + \ 'col': 36, + \ 'text': 'Missing radix parameter.', + \ 'code': 'radix', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 25, + \ 'col': 6, + \ 'text': 'Missing static property value.', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#fecs#Handle(347, [ + \ 'fecs WARN → line 20, col 25: Unexpected console statement. (no-console)', + \ 'fecs ERROR → line 24, col 36: Missing radix parameter. (radix)', + \ 'fecs ERROR → line 25, col 6: Missing static property value.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_fish_handler.vader b/dot_vim/plugged/ale/test/handler/test_fish_handler.vader new file mode 100644 index 0000000..ad3a963 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_fish_handler.vader @@ -0,0 +1,61 @@ +Before: + runtime ale_linters/fish/fish.vim + +After: + call ale#linter#Reset() + +Execute(The fish handler should handle basic warnings and syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 20, + \ 'col': 23, + \ 'text': "Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.", + \ }, + \ { + \ 'lnum': 26, + \ 'col': 7, + \ 'text': "Illegal command name '(prompt_pwd)'", + \ }, + \ { + \ 'lnum': 36, + \ 'col': 1, + \ 'text': "'end' outside of a block", + \ }, + \ ], + \ ale_linters#fish#fish#Handle(1, [ + \ "fish_prompt.fish (line 20): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.", + \ 'if set -q SSH_CLIENT || set -q SSH_TTY', + \ ' ^', + \ "fish_prompt.fish (line 26): Illegal command name '(prompt_pwd)'", + \ ' (prompt_pwd) \', + \ ' ^', + \ "fish_prompt.fish (line 36): 'end' outside of a block", + \ 'end', + \ '^', + \ 'config.fish (line 45):', + \ "abbr --add p 'cd ~/Projects'", + \ '^', + \ ]) + +Execute(The fish handler should handle problems where the problem before before the line with the line number): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 23, + \ 'text': 'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 1, + \ 'text': 'wat', + \ }, + \ ], + \ ale_linters#fish#fish#Handle(bufnr(''), [ + \ 'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.', + \ '/tmp/vLz620o/258/test.fish (line 2): if set -q SSH_CLIENT || set -q SSH_TTY', + \ ' ^', + \ '/tmp/vLz620o/258/test.fish (line 5): wat', + \ ' ^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_flake8_handler.vader b/dot_vim/plugged/ale/test/handler/test_flake8_handler.vader new file mode 100644 index 0000000..1c9956f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_flake8_handler.vader @@ -0,0 +1,276 @@ +Before: + Save g:ale_warn_about_trailing_blank_lines + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_blank_lines = 1 + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/flake8.vim + +After: + Restore + + unlet! b:ale_warn_about_trailing_blank_lines + unlet! b:ale_warn_about_trailing_whitespace + + call ale#linter#Reset() + +Execute(The flake8 handler should handle basic warnings and syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'W', + \ 'text': 'some warning', + \ 'code': 'W123', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 3, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'SyntaxError: invalid syntax', + \ 'code': 'E999', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(1, [ + \ 'stdin:6:6: E111 indentation is not a multiple of four', + \ 'stdin:7:6: W123 some warning', + \ 'stdin:8:3: E999 SyntaxError: invalid syntax', + \ ]) + +Execute(The flake8 handler should set end column indexes for certain errors): + AssertEqual + \ [ + \ { + \ 'lnum': 25, + \ 'col': 1, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 3, + \ 'text': 'undefined name ''foo''', + \ 'code': 'F821', + \ }, + \ { + \ 'lnum': 28, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 9, + \ 'text': 'hello may be undefined, or defined from star imports: x', + \ 'code': 'F405', + \ }, + \ { + \ 'lnum': 104, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 12, + \ 'text': '''continue'' not properly in loop', + \ 'code': 'F999', + \ }, + \ { + \ 'lnum': 106, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 9, + \ 'text': '''break'' outside loop', + \ 'code': 'F999', + \ }, + \ { + \ 'lnum': 109, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 8, + \ 'text': 'local variable ''test'' is assigned to but never used', + \ 'code': 'F841', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(1, [ + \ 'foo.py:25:1: F821 undefined name ''foo''', + \ 'foo.py:28:5: F405 hello may be undefined, or defined from star imports: x', + \ 'foo.py:104:5: F999 ''continue'' not properly in loop', + \ 'foo.py:106:5: F999 ''break'' outside loop', + \ 'foo.py:109:5: F841 local variable ''test'' is assigned to but never used', + \ ]) + +Execute(The flake8 handler should handle stack traces): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'ImportError: No module named parser (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/bin/flake8", line 7, in ', + \ ' from flake8.main.cli import main', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/main/cli.py", line 2, in ', + \ ' from flake8.main import application', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 17, in ', + \ ' from flake8.plugins import manager as plugin_manager', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 5, in ', + \ ' import pkg_resources', + \ ' File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 35, in ', + \ ' import email.parser', + \ 'ImportError: No module named parser', + \ ], "\n"), + \ }, + \ ], + \ ale_linters#python#flake8#Handle(42, [ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/bin/flake8", line 7, in ', + \ ' from flake8.main.cli import main', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/main/cli.py", line 2, in ', + \ ' from flake8.main import application', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 17, in ', + \ ' from flake8.plugins import manager as plugin_manager', + \ ' File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 5, in ', + \ ' import pkg_resources', + \ ' File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 35, in ', + \ ' import email.parser', + \ 'ImportError: No module named parser', + \ ]) + +Execute(The flake8 handler should handle names with spaces): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(42, [ + \ 'C:\something\with spaces.py:6:6: E111 indentation is not a multiple of four', + \ ]) + +Execute(Warnings about trailing whitespace should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W291', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W293', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Disabling trailing whitespace warnings should work): + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Warnings about trailing blank lines should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W391', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'blank line at end of file', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(Disabling trailing blank line warnings should work): + let b:ale_warn_about_trailing_blank_lines = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(F401 should be a warning): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'F401', + \ 'type': 'W', + \ 'text': 'module imported but unused', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: F401 module imported but unused', + \ ]) + +Execute(E112 should be a syntax error): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'E112', + \ 'type': 'E', + \ 'text': 'expected an indented block', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: E112 expected an indented block', + \ ]) + +Execute(Compatibility with hacking which uses older style flake8): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'H306', + \ 'type': 'W', + \ 'text': 'imports not in alphabetical order (smtplib, io)', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: H306: imports not in alphabetical order (smtplib, io)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_flakehell_handler.vader b/dot_vim/plugged/ale/test/handler/test_flakehell_handler.vader new file mode 100644 index 0000000..1f77bd9 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_flakehell_handler.vader @@ -0,0 +1,276 @@ +Before: + Save g:ale_warn_about_trailing_blank_lines + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_blank_lines = 1 + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/flakehell.vim + +After: + Restore + + unlet! b:ale_warn_about_trailing_blank_lines + unlet! b:ale_warn_about_trailing_whitespace + + call ale#linter#Reset() + +Execute(The flakehell handler should handle basic warnings and syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'W', + \ 'text': 'some warning', + \ 'code': 'W123', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 3, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'SyntaxError: invalid syntax', + \ 'code': 'E999', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(1, [ + \ 'stdin:6:6: E111 indentation is not a multiple of four', + \ 'stdin:7:6: W123 some warning', + \ 'stdin:8:3: E999 SyntaxError: invalid syntax', + \ ]) + +Execute(The flakehell handler should set end column indexes for certain errors): + AssertEqual + \ [ + \ { + \ 'lnum': 25, + \ 'col': 1, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 3, + \ 'text': 'undefined name ''foo''', + \ 'code': 'F821', + \ }, + \ { + \ 'lnum': 28, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 9, + \ 'text': 'hello may be undefined, or defined from star imports: x', + \ 'code': 'F405', + \ }, + \ { + \ 'lnum': 104, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 12, + \ 'text': '''continue'' not properly in loop', + \ 'code': 'F999', + \ }, + \ { + \ 'lnum': 106, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 9, + \ 'text': '''break'' outside loop', + \ 'code': 'F999', + \ }, + \ { + \ 'lnum': 109, + \ 'col': 5, + \ 'vcol': 1, + \ 'type': 'E', + \ 'end_col': 8, + \ 'text': 'local variable ''test'' is assigned to but never used', + \ 'code': 'F841', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(1, [ + \ 'foo.py:25:1: F821 undefined name ''foo''', + \ 'foo.py:28:5: F405 hello may be undefined, or defined from star imports: x', + \ 'foo.py:104:5: F999 ''continue'' not properly in loop', + \ 'foo.py:106:5: F999 ''break'' outside loop', + \ 'foo.py:109:5: F841 local variable ''test'' is assigned to but never used', + \ ]) + +Execute(The flakehell handler should handle stack traces): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'ImportError: No module named parser (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/bin/flakehell", line 7, in ', + \ ' from flakehell.main.cli import main', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/main/cli.py", line 2, in ', + \ ' from flakehell.main import application', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/main/application.py", line 17, in ', + \ ' from flakehell.plugins import manager as plugin_manager', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/plugins/manager.py", line 5, in ', + \ ' import pkg_resources', + \ ' File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 35, in ', + \ ' import email.parser', + \ 'ImportError: No module named parser', + \ ], "\n"), + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(42, [ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/bin/flakehell", line 7, in ', + \ ' from flakehell.main.cli import main', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/main/cli.py", line 2, in ', + \ ' from flakehell.main import application', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/main/application.py", line 17, in ', + \ ' from flakehell.plugins import manager as plugin_manager', + \ ' File "/usr/local/lib/python2.7/dist-packages/flakehell/plugins/manager.py", line 5, in ', + \ ' import pkg_resources', + \ ' File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 35, in ', + \ ' import email.parser', + \ 'ImportError: No module named parser', + \ ]) + +Execute(The flakehell handler should handle names with spaces): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 6, + \ 'vcol': 1, + \ 'type': 'E', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(42, [ + \ 'C:\something\with spaces.py:6:6: E111 indentation is not a multiple of four', + \ ]) + +Execute(Warnings about trailing whitespace should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W291', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W293', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Disabling trailing whitespace warnings should work): + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Warnings about trailing blank lines should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'W391', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'blank line at end of file', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(Disabling trailing blank line warnings should work): + let b:ale_warn_about_trailing_blank_lines = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(F401 should be a warning): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'F401', + \ 'type': 'W', + \ 'text': 'module imported but unused', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: F401 module imported but unused', + \ ]) + +Execute(E112 should be a syntax error): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'E112', + \ 'type': 'E', + \ 'text': 'expected an indented block', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: E112 expected an indented block', + \ ]) + +Execute(Compatibility with hacking which uses older style flakehell): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'vcol': 1, + \ 'code': 'H306', + \ 'type': 'W', + \ 'text': 'imports not in alphabetical order (smtplib, io)', + \ }, + \ ], + \ ale_linters#python#flakehell#Handle(bufnr(''), [ + \ 'foo.py:6:1: H306: imports not in alphabetical order (smtplib, io)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_flawfinder_handler.vader b/dot_vim/plugged/ale/test/handler/test_flawfinder_handler.vader new file mode 100644 index 0000000..708bac2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_flawfinder_handler.vader @@ -0,0 +1,57 @@ +Before: + Save g:ale_c_flawfinder_error_severity + + unlet! g:ale_c_flawfinder_error_severity + unlet! b:ale_c_flawfinder_error_severity + + runtime ale_linters/c/flawfinder.vim + +After: + unlet! g:ale_c_flawfinder_error_severity + Restore + +Execute(The Flawfinder handler should ignore other lines of output): + AssertEqual + \ [], + \ ale#handlers#flawfinder#HandleFlawfinderFormat(347, [ + \ 'foo', + \ 'bar', + \ 'baz', + \ ]) + +Execute(The Flawfinder handler should work): + AssertEqual + \ [ + \ { + \ 'lnum': 31, + \ 'col': 4, + \ 'type': 'W', + \ 'text': "(buffer) strncpy: Easily used incorrectly", + \ }, + \ ], + \ ale#handlers#flawfinder#HandleFlawfinderFormat(347, [ + \ ":31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ ]) + +Execute(The Flawfinder error severity level should be configurable): + let b:ale_c_flawfinder_error_severity = 2 + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col': 4, + \ 'type': 'E', + \ 'text': "(buffer) char: Statically-sized arrays can be bad", + \ }, + \ { + \ 'lnum': 31, + \ 'col': 4, + \ 'type': 'W', + \ 'text': "(buffer) strncpy: Easily used incorrectly", + \ }, + \ ], + \ ale#handlers#flawfinder#HandleFlawfinderFormat(bufnr(''), [ + \ ":12:4: [2] (buffer) char:Statically-sized arrays can be bad", + \ ":31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_flow_handler.vader b/dot_vim/plugged/ale/test/handler/test_flow_handler.vader new file mode 100644 index 0000000..055ba02 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_flow_handler.vader @@ -0,0 +1,507 @@ +Before: + runtime ale_linters/javascript/flow.vim + +After: + unlet! g:flow_output + unlet! g:expected + unlet! g:actual + call ale#linter#Reset() + +Execute(The flow handler should throw away non-JSON lines): + AssertEqual + \ [], + \ ale_linters#javascript#flow#Handle(bufnr(''), [ + \ 'Already up-to-date.', + \ '{"flowVersion":"0.50.0","errors":[],"passed":true}', + \ ]) + AssertEqual + \ [], + \ ale_linters#javascript#flow#Handle(bufnr(''), [ + \ 'foo', + \ 'bar', + \ 'baz', + \ '{"flowVersion":"0.50.0","errors":[],"passed":true}', + \ ]) + +Execute(The flow handler should process errors correctly.): + silent! noautocmd file /home/w0rp/Downloads/graphql-js/src/language/parser.js + + let g:flow_output = { + \ "flowVersion": "0.39.0", + \ "errors": [ + \ { + \ "kind": "infer", + \ "level": "error", + \ "message": [ + \ { + \ "context": " return 1", + \ "descr": "number", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 417, + \ "column": 10, + \ "offset": 9503 + \ }, + \ "end": { + \ "line": 417, + \ "column": 10, + \ "offset": 9504 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 417, + \ "endline": 417, + \ "start": 10, + \ "end": 10 + \ }, + \ { + \ "context": v:null, + \ "descr": "This type is incompatible with the expected return type of", + \ "type": "Comment", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }, + \ { + \ "context": "function parseArguments(lexer: Lexer<*>): Array {", + \ "descr": "array type", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 416, + \ "column": 43, + \ "offset": 9472 + \ }, + \ "end": { + \ "line": 416, + \ "column": 61, + \ "offset": 9491 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 416, + \ "endline": 416, + \ "start": 43, + \ "end": 61 + \ } + \ ] + \ }, + \ { + \ "kind": "infer", + \ "level": "warning", + \ "message": [ + \ { + \ "context": " return peek(lexer, TokenKind.PAREN_L) ?", + \ "descr": "unreachable code", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 419, + \ "column": 3, + \ "offset": 9508 + \ }, + \ "end": { + \ "line": 421, + \ "column": 7, + \ "offset": 9626 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 419, + \ "endline": 421, + \ "start": 3, + \ "end": 7 + \ } + \ ] + \ } + \ ], + \ "passed": v:false + \} + + let g:actual = ale_linters#javascript#flow#Handle(bufnr(''), [json_encode(g:flow_output)]) + let g:expected = [ + \ { + \ 'lnum': 417, + \ 'type': 'E', + \ 'col': 10, + \ 'text': 'number: This type is incompatible with the expected return type of array type', + \ }, + \ { + \ 'lnum': 419, + \ 'type': 'W', + \ 'col': 3, + \ 'text': 'unreachable code:', + \ }, + \] + + AssertEqual g:expected, g:actual + +Execute(The flow handler should fetch the correct location for the currently opened file, even when it's not in the first message.): + silent! noautocmd file /Users/rav/Projects/vim-ale-flow/index.js + + let g:flow_output = { + \ "flowVersion": "0.44.0", + \ "errors": [{ + \ "operation": { + \ "context": " , document.getElementById('foo')", + \ "descr": "React element `Foo`", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 6, + \ "column": 3, + \ "offset": 92 + \ }, + \ "end": { + \ "line": 6, + \ "column": 18, + \ "offset": 108 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 6, + \ "endline": 6, + \ "start": 3, + \ "end": 18 + \ }, + \ "kind": "infer", + \ "level": "error", + \ "message": [{ + \ "context": "module.exports = function(props: Props) {", + \ "descr": "property `bar`", + \ "type": "Blame", + \ "loc": { + \ "source": "/Users/rav/Projects/vim-ale-flow/foo.js", + \ "type": "SourceFile", + \ "start": { + \ "line": 9, + \ "column": 34, + \ "offset": 121 + \ }, + \ "end": { + \ "line": 9, + \ "column": 38, + \ "offset": 126 + \ } + \ }, + \ "path": "/Users/rav/Projects/vim-ale-flow/foo.js", + \ "line": 9, + \ "endline": 9, + \ "start": 34, + \ "end": 38 + \ }, { + \ "context": v:null, + \ "descr": "Property not found in", + \ "type": "Comment", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }, { + \ "context": " , document.getElementById('foo')", + \ "descr": "props of React element `Foo`", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 6, + \ "column": 3, + \ "offset": 92 + \ }, + \ "end": { + \ "line": 6, + \ "column": 18, + \ "offset": 108 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 6, + \ "endline": 6, + \ "start": 3, + \ "end": 18 + \ }] + \ }], + \ "passed": v:false + \} + + let g:actual = ale_linters#javascript#flow#Handle(bufnr(''), [json_encode(g:flow_output)]) + let g:expected = [ + \ { + \ 'lnum': 6, + \ 'col': 3, + \ 'type': 'E', + \ 'text': 'property `bar`: Property not found in props of React element `Foo` See also: React element `Foo`', + \ } + \] + + AssertEqual g:expected, g:actual + +Execute(The flow handler should handle relative paths): + silent! noautocmd file /Users/rav/Projects/vim-ale-flow/index.js + + let g:flow_output = { + \ "flowVersion": "0.44.0", + \ "errors": [{ + \ "operation": { + \ "context": " , document.getElementById('foo')", + \ "descr": "React element `Foo`", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 6, + \ "column": 3, + \ "offset": 92 + \ }, + \ "end": { + \ "line": 6, + \ "column": 18, + \ "offset": 108 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 6, + \ "endline": 6, + \ "start": 3, + \ "end": 18 + \ }, + \ "kind": "infer", + \ "level": "error", + \ "message": [{ + \ "context": "module.exports = function(props: Props) {", + \ "descr": "property `bar`", + \ "type": "Blame", + \ "loc": { + \ "source": "vim-ale-flow/foo.js", + \ "type": "SourceFile", + \ "start": { + \ "line": 9, + \ "column": 34, + \ "offset": 121 + \ }, + \ "end": { + \ "line": 9, + \ "column": 38, + \ "offset": 126 + \ } + \ }, + \ "path": "vim-ale-flow/foo.js", + \ "line": 9, + \ "endline": 9, + \ "start": 34, + \ "end": 38 + \ }, { + \ "context": v:null, + \ "descr": "Property not found in", + \ "type": "Comment", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }, { + \ "context": " , document.getElementById('foo')", + \ "descr": "props of React element `Foo`", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 6, + \ "column": 3, + \ "offset": 92 + \ }, + \ "end": { + \ "line": 6, + \ "column": 18, + \ "offset": 108 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 6, + \ "endline": 6, + \ "start": 3, + \ "end": 18 + \ }] + \ }], + \ "passed": v:false + \} + + let g:actual = ale_linters#javascript#flow#Handle(bufnr(''), [json_encode(g:flow_output)]) + let g:expected = [ + \ { + \ 'lnum': 6, + \ 'col': 3, + \ 'type': 'E', + \ 'text': 'property `bar`: Property not found in props of React element `Foo` See also: React element `Foo`', + \ } + \] + + AssertEqual g:expected, g:actual + +Execute(The flow handler should handle extra errors): + silent! noautocmd file /Users/rav/Projects/vim-ale-flow/index.js + + let g:flow_output = { + \ "flowVersion": "0.54.0", + \ "errors": [{ + \ "extra": [{ + \ "message": [{ + \ "context": v:null, + \ "descr": "Property \`setVector\` is incompatible:", + \ "type": "Blame ", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }], + \ "children": [{ + \ "message": [{ + \ "context": "setVector = \{2\}", + \ "descr": "number ", + \ "type": "Blame ", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile ", + \ "start": { + \ "line": 90, + \ "column": 30, + \ "offset": 2296 + \ }, + \ "end": { + \ "line": 90, + \ "column": 30, + \ "offset": 2297 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 90, + \ "endline": 90, + \ "start": 30, + \ "end": 30 + \ }, { + \ "context": v:null, + \ "descr": "This type is incompatible with ", + \ "type": "Comment ", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }, { + \ "context": "setVector: VectorType => void,", + \ "descr": "function type ", + \ "type": "Blame ", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 9, + \ "column": 14, + \ "offset": 252 + \ }, + \ "end": { + \ "line": 9, + \ "column": 31, + \ "offset": 270 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 9, + \ "endline": 9, + \ "start": 14, + \ "end": 31 + \ }] + \ }] + \ }], + \ "kind": "infer", + \ "level": "error", + \ "suppressions": [], + \ "message": [{ + \ "context": " < New ", + \ "descr": "props of React element `New`", + \ "type": "Blame", + \ "loc": { + \ "source": "vim-ale-flow/foo.js", + \ "type": "SourceFile", + \ "start": { + \ "line": 89, + \ "column": 17, + \ "offset": 2262 + \ }, + \ "end": { + \ "line": 94, + \ "column": 18, + \ "offset": 2488 + \ } + \ }, + \ "path": "", + \ "line": 89, + \ "endline": 94, + \ "start": 17, + \ "end": 18 + \ }, { + \ "context": v:null, + \ "descr": "This type is incompatible with", + \ "type": "Comment", + \ "path": "", + \ "line": 0, + \ "endline": 0, + \ "start": 1, + \ "end": 0 + \ }, { + \ "context": "class New extends React.Component < NewProps,NewState > {", + \ "descr": "object type", + \ "type": "Blame", + \ "loc": { + \ "source": expand('%:p'), + \ "type": "SourceFile", + \ "start": { + \ "line": 20, + \ "column": 35, + \ "offset": 489 + \ }, + \ "end": { + \ "line": 20, + \ "column": 42, + \ "offset": 497 + \ } + \ }, + \ "path": expand('%:p'), + \ "line": 20, + \ "endline": 20, + \ "start": 35, + \ "end": 42 + \ }] + \ }], + \ "passed": v:false + \} + + let g:actual = ale_linters#javascript#flow#Handle(bufnr(''), [json_encode(g:flow_output)]) + let g:expected = [ + \ { + \ 'lnum': 20, + \ 'col': 35, + \ 'type': 'E', + \ 'text': 'props of React element `New`: This type is incompatible with object type', + \ 'detail': 'props of React element `New`: This type is incompatible with object type' + \ . "\nProperty `setVector` is incompatible: number This type is incompatible with function type ", + \ } + \] + + AssertEqual g:expected, g:actual diff --git a/dot_vim/plugged/ale/test/handler/test_foodcritic_handler.vader b/dot_vim/plugged/ale/test/handler/test_foodcritic_handler.vader new file mode 100644 index 0000000..67cb6ca --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_foodcritic_handler.vader @@ -0,0 +1,44 @@ +Before: + runtime ale_linters/chef/foodcritic.vim + +After: + call ale#linter#Reset() + +Execute(Basic warnings should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'code': 'CINK001', + \ 'type': 'W', + \ 'text': 'Missing CHANGELOG in markdown format', + \ 'filename': '/foo/bar/CHANGELOG.md', + \ }, + \ { + \ 'lnum': 1, + \ 'code': 'FC011', + \ 'type': 'W', + \ 'text': 'Missing README in markdown format', + \ 'filename': '/foo/bar/README.md', + \ }, + \ { + \ 'lnum': 1, + \ 'code': 'FC031', + \ 'type': 'W', + \ 'text': 'Cookbook without metadata.rb file', + \ 'filename': '/foo/bar/metadata.rb', + \ }, + \ { + \ 'lnum': 1, + \ 'code': 'FC071', + \ 'type': 'W', + \ 'text': 'Missing LICENSE file', + \ 'filename': '/foo/bar/LICENSE', + \ }, + \ ], + \ ale_linters#chef#foodcritic#Handle(bufnr(''), [ + \ 'CINK001: Missing CHANGELOG in markdown format: /foo/bar/CHANGELOG.md:1', + \ 'FC011: Missing README in markdown format: /foo/bar/README.md:1', + \ 'FC031: Cookbook without metadata.rb file: /foo/bar/metadata.rb:1', + \ 'FC071: Missing LICENSE file: /foo/bar/LICENSE:1', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_fortran_handler.vader b/dot_vim/plugged/ale/test/handler/test_fortran_handler.vader new file mode 100644 index 0000000..c55a4c6 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_fortran_handler.vader @@ -0,0 +1,95 @@ +Before: + runtime ale_linters/fortran/gcc.vim + +After: + call ale#linter#Reset() + +Execute(The fortran handler should parse lines from GCC 4.1.2 correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 357, + \ 'lnum': 4, + \ 'col': 0, + \ 'text': "Symbol ‘b’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': 357, + \ 'lnum': 3, + \ 'col': 0, + \ 'text': "Symbol ‘a’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#fortran#gcc#Handle(357, [ + \ " In file :4", + \ "", + \ "write(*,*) b", + \ " 1", + \ "Error: Symbol ‘b’ at (1) has no IMPLICIT type", + \ " In file :3", + \ "", + \ "write(*,*) a", + \ " 1", + \ "Error: Symbol ‘a’ at (1) has no IMPLICIT type", + \ ]) + + +Execute(The fortran handler should parse lines from GCC 4.9.3 correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 357, + \ 'lnum': 3, + \ 'col': 12, + \ 'text': "Symbol ‘a’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': 357, + \ 'lnum': 4, + \ 'col': 12, + \ 'text': "Symbol ‘b’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#fortran#gcc#Handle(357, [ + \ ":3.12:", + \ "", + \ "write(*,*) a", + \ " 1", + \ "Error: Symbol ‘a’ at (1) has no IMPLICIT type", + \ ":4.12:", + \ "", + \ "write(*,*) b", + \ " 1", + \ "Error: Symbol ‘b’ at (1) has no IMPLICIT type", + \ ]) + +Execute(The fortran handler should parse lines from GCC 6.3.1 correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 337, + \ 'lnum': 3, + \ 'col': 12, + \ 'text': "Symbol ‘a’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': 337, + \ 'lnum': 4, + \ 'col': 12, + \ 'text': "Symbol ‘b’ at (1) has no IMPLICIT type", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#fortran#gcc#Handle(337, [ + \ ":3:12:", + \ "", + \ "Error: Symbol ‘a’ at (1) has no IMPLICIT type", + \ ":4:12:", + \ "", + \ "Error: Symbol ‘b’ at (1) has no IMPLICIT type", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gawk_handler.vader b/dot_vim/plugged/ale/test/handler/test_gawk_handler.vader new file mode 100644 index 0000000..3a7b545 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gawk_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/awk/gawk.vim + +After: + call ale#linter#Reset() + +Execute(gawk syntax errors should be parsed correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 0, + \ 'text': "invalid char ''' in expression", + \ 'code': 0, + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 0, + \ 'text': 'unterminated string', + \ 'code': 0, + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 0, + \ 'text': "escape sequence `\u' treated as plain `u'", + \ 'code': 0, + \ 'type': 'W', + \ }, + \ ], + \ ale#handlers#gawk#HandleGawkFormat(347, [ + \ "gawk: something.awk:1: BEGIN { system('touch aaaaaaaaa') }", + \ "gawk: something.awk:1: ^ invalid char ''' in expression", + \ 'gawk: something.awk:5: { x = "aaaaaaaaaaa', + \ 'gawk: something.awk:5: ^ unterminated string', + \ "gawk: something.awk:10: warning: escape sequence `\u' treated as plain `u'", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gcc_handler.vader b/dot_vim/plugged/ale/test/handler/test_gcc_handler.vader new file mode 100644 index 0000000..a4231ca --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gcc_handler.vader @@ -0,0 +1,316 @@ +Execute(The GCC handler should ignore other lines of output): + AssertEqual + \ [], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'foo', + \ 'bar', + \ 'baz', + \ ]) + +Execute(GCC errors from included files should be parsed correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'filename': 'broken.h', + \ 'type': 'E', + \ 'text': 'expected identifier or ''('' before ''{'' token', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 2, + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': join([ + \ 'In file included from :3:2:', + \ 'broken.h:1:1: error: expected identifier or ''('' before ''{'' token', + \ ' {{{', + \ ' ^', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'In file included from :3:2:', + \ 'broken.h:1:1: error: expected identifier or ''('' before ''{'' token', + \ ' {{{', + \ ' ^', + \ 'compilation terminated.', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'filename': 'b.h', + \ 'type': 'E', + \ 'text': 'expected identifier or ''('' before ''{'' token', + \ }, + \ { + \ 'lnum': 5, + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': join([ + \ 'In file included from a.h:1:0,', + \ ' from :5:', + \ 'b.h:1:1: error: expected identifier or ''('' before ''{'' token', + \ ' {{{', + \ ' ^', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'In file included from a.h:1:0,', + \ ' from :5:', + \ 'b.h:1:1: error: expected identifier or ''('' before ''{'' token', + \ ' {{{', + \ ' ^', + \ 'compilation terminated.', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'filename': 'b.h', + \ 'type': 'E', + \ 'text': 'unknown type name ''bad_type''', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'filename': 'b.h', + \ 'type': 'E', + \ 'text': 'unknown type name ''other_bad_type''', + \ }, + \ { + \ 'lnum': 3, + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': join([ + \ 'In file included from a.h:1:0,', + \ ' from :3:', + \ 'b.h:1:1: error: unknown type name ‘bad_type’', + \ ' bad_type x;', + \ ' ^', + \ 'b.h:2:1: error: unknown type name ‘other_bad_type’', + \ ' other_bad_type y;', + \ ' ^', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'In file included from a.h:1:0,', + \ ' from :3:', + \ 'b.h:1:1: error: unknown type name ‘bad_type’', + \ ' bad_type x;', + \ ' ^', + \ 'b.h:2:1: error: unknown type name ‘other_bad_type’', + \ ' other_bad_type y;', + \ ' ^', + \ 'compilation terminated.', + \ ]) + +Execute(The GCC handler shouldn't complain about #pragma once for headers): + silent file! test.h + + AssertEqual + \ [], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ':1:1: warning: #pragma once in main file [enabled by default]', + \ ]) + + silent file! test.hpp + + AssertEqual + \ [], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ':1:1: warning: #pragma once in main file [enabled by default]', + \ ]) + +Execute(The GCC handler should handle syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'invalid suffix "p" on integer constant' + \ }, + \ { + \ 'lnum': 17, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'invalid suffix "n" on integer constant' + \ }, + \ { + \ 'lnum': 4, + \ 'type': 'E', + \ 'text': 'variable or field ''foo'' declared void' + \ }, + \ { + \ 'lnum': 4, + \ 'type': 'E', + \ 'text': '''cat'' was not declared in this scope' + \ }, + \ { + \ 'lnum': 12, + \ 'type': 'E', + \ 'text': 'expected '';'' before ''o''' + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ':6:12: error: invalid suffix "p" on integer constant', + \ ':17:5: error: invalid suffix "n" on integer constant', + \ ':4: error: variable or field ''foo'' declared void', + \ ':4: error: ''cat'' was not declared in this scope', + \ ':12: error: expected `;'' before ''o''', + \ ]) + +Execute(The GCC handler should handle notes with no previous message): + AssertEqual + \ [], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ':1:1: note: x', + \ ':1:1: note: x', + \ ]) + +Execute(The GCC handler should attach notes to previous messages): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'Some error', + \ 'detail': "Some error\n:1:1: note: x", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ '-:6:12: error: Some error', + \ ':1:1: note: x', + \ ]) + +Execute(The GCC handler should interpret - as being the current file): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'Some error', + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ '-:6:12: error: Some error', + \ ]) + +Execute(The GCC handler should handle fatal error messages due to missing files): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'foo.h: No such file or directory' + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ':3:12: fatal error: foo.h: No such file or directory', + \ ]) + +Execute(The GCC handler should handle errors for inlined header functions): + AssertEqual + \ [ + \ { + \ 'lnum': 50, + \ 'col': 4, + \ 'filename': '/usr/include/bits/fcntl2.h', + \ 'type': 'E', + \ 'text': 'call to ''__open_missing_mode'' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments', + \ }, + \ { + \ 'lnum': 44, + \ 'col': 5, + \ 'filename': '/usr/include/bits/fcntl2.h', + \ 'type': 'E', + \ 'text': 'call to ''__open_too_many_args'' declared with attribute error: open can be called either with 2 or 3 arguments, not more', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 10, + \ 'type': 'E', + \ 'text': 'call to ''__open_missing_mode'' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments', + \ }, + \ { + \ 'lnum': 13, + \ 'col': 11, + \ 'type': 'E', + \ 'text': 'call to ''__open_too_many_args'' declared with attribute error: open can be called either with 2 or 3 arguments, not more', + \ }, + \ { + \ 'lnum': 1, + \ 'text': 'Error found in header. See :ALEDetail', + \ 'detail': join([ + \ 'In file included from /usr/include/fcntl.h:328,', + \ ' from :1:', + \ 'In function ‘open’,', + \ ' inlined from ‘main’ at :7:10:', + \ '/usr/include/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments', + \ ' __open_missing_mode ();', + \ ' ^~~~~~~~~~~~~~~~~~~~~~', + \ 'In function ‘open’,', + \ ' inlined from ‘main’ at :13:11:', + \ '/usr/include/bits/fcntl2.h:44:5: error: call to ‘__open_too_many_args’ declared with attribute error: open can be called either with 2 or 3 arguments, not more', + \ ' __open_too_many_args ();', + \ ], "\n") + \ }, + \], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ 'In file included from /usr/include/fcntl.h:328,', + \ ' from :1:', + \ 'In function ‘open’,', + \ ' inlined from ‘main’ at :7:10:', + \ '/usr/include/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments', + \ ' __open_missing_mode ();', + \ ' ^~~~~~~~~~~~~~~~~~~~~~', + \ 'In function ‘open’,', + \ ' inlined from ‘main’ at :13:11:', + \ '/usr/include/bits/fcntl2.h:44:5: error: call to ‘__open_too_many_args’ declared with attribute error: open can be called either with 2 or 3 arguments, not more', + \ ' __open_too_many_args ();', + \ ' ^~~~~~~~~~~~~~~~~~~~~~~', + \ ]) + +Execute(The GCC handler should handle macro expansion errors in current file): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 19, + \ 'type': 'E', + \ 'text': 'error message', + \ 'detail': "error message\n:1:19: note: in expansion of macro 'TEST'", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ': error: error message', + \ ':1:19: note: in expansion of macro ‘TEST’', + \ ' 1 | std::string str = TEST;', + \ ' | ^~~~', + \ ]) + +Execute(The GCC handler should handle macro expansion errors in other files): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'type': 'E', + \ 'text': 'Error found in macro expansion. See :ALEDetail', + \ 'detail': "error message\ninc.h:1:19: note: in expansion of macro 'TEST'", + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormatWithIncludes(347, [ + \ ': error: error message', + \ 'inc.h:1:19: note: in expansion of macro ‘TEST’', + \ ' 1 | std::string str = TEST;', + \ ' | ^~~~', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_ghc_handler.vader b/dot_vim/plugged/ale/test/handler/test_ghc_handler.vader new file mode 100644 index 0000000..feaa51f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ghc_handler.vader @@ -0,0 +1,177 @@ +Execute(The ghc handler should handle hdevtools output): + call ale#test#SetFilename('foo.hs') + + AssertEqual + \ [ + \ { + \ 'lnum': 147, + \ 'type': 'W', + \ 'col': 62, + \ 'text': "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]", + \ 'detail': join([ + \ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’", + \ ' Expected type: [T.Text]', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ + \ 'foo.hs:147:62: warning:', + \ "• Couldn't match type ‘a -> T.Text’ with ‘T.Text’", + \ ' Expected type: [T.Text]', + \ ]) + +Execute(The ghc handler should handle ghc 8 output): + call ale#test#SetFilename('src/Appoint/Lib.hs') + + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'type': 'E', + \ 'col': 1, + \ 'text': 'Failed to load interface for ‘GitHub.Data’ Use -v to see a list of the files searched for.', + \ 'detail': join([ + \ ' Failed to load interface for ‘GitHub.Data’', + \ ' Use -v to see a list of the files searched for.', + \ ], "\n"), + \ }, + \ { + \ 'lnum': 7, + \ 'type': 'W', + \ 'col': 1, + \ 'text': 'Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.', + \ 'detail': join([ + \ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’', + \ ' Use -v to see a list of the files searched for.', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ + \ '', + \ ale#path#Simplify('src/Appoint/Lib.hs') . ':6:1: error:', + \ ' Failed to load interface for ‘GitHub.Data’', + \ ' Use -v to see a list of the files searched for.', + \ '', + \ ale#path#Simplify('src/Appoint/Lib.hs') . ':7:1: warning:', + \ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’', + \ ' Use -v to see a list of the files searched for.', + \ ]) + +Execute(The ghc handler should handle ghc 7 output): + call ale#test#SetFilename('src/Main.hs') + + AssertEqual + \ [ + \ { + \ 'lnum': 168, + \ 'type': 'E', + \ 'col': 1, + \ 'text': 'parse error (possibly incorrect indentation or mismatched brackets)', + \ 'detail': join([ + \ ' parse error (possibly incorrect indentation or mismatched brackets)', + \ ], "\n"), + \ }, + \ { + \ 'lnum': 84, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'Top-level binding with no type signature: myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ 'detail': join([ + \ ' Top-level binding with no type signature:', + \ ' myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ ], "\n"), + \ }, + \ { + \ 'lnum': 94, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'Some other error', + \ 'detail': join([ + \ ' Some other error', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ + \ ale#path#Simplify('src/Main.hs') . ':168:1:', + \ ' parse error (possibly incorrect indentation or mismatched brackets)', + \ ale#path#Simplify('src/Main.hs') . ':84:1:Warning:', + \ ' Top-level binding with no type signature:', + \ ' myLayout :: Choose Tall (Choose (Mirror Tall) Full) a', + \ ale#path#Simplify('src/Main.hs') . ':94:5:Error:', + \ ' Some other error', + \ ]) + +Execute(The ghc handler should handle stack 1.5.1 output): + call ale#test#SetFilename('src/Main.hs') + + AssertEqual + \ [ + \ { + \ 'lnum': 160, + \ 'col': 14, + \ 'type': 'E', + \ 'text': '• Expecting one fewer arguments to ‘Exp’ Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’ • In the type ‘Exp a’ | 160 | pattern F :: Exp a | ^^^^^', + \ 'detail': join([ + \ ' • Expecting one fewer arguments to ‘Exp’', + \ ' Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’', + \ ' • In the type ‘Exp a’', + \ ' |', + \ ' 160 | pattern F :: Exp a', + \ ' | ^^^^^', + \ ], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ + \ ' ' . ale#path#Simplify('src/Main.hs') . ':160:14: error:', + \ ' • Expecting one fewer arguments to ‘Exp’', + \ ' Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’', + \ ' • In the type ‘Exp a’', + \ ' |', + \ ' 160 | pattern F :: Exp a', + \ ' | ^^^^^', + \ ]) + +Execute(The ghc handler should handle ghc panic): + let g:detail = [ + \ '[15 of 15] Compiling SizedTypes.List', + \ 'ghc: panic! (the ''impossible'' happened)', + \ ' (GHC version 8.10.3:', + \ ' src/SizedTypes/List.hs:(46,19)-(50,0) Specified type does not refine Haskell type for `SizedTypes.List.out` (Plugged Init types new)', + \ ' The Liquid type', + \ ' .', + \ ' GHC.Types.Int -> (SizedTypes.List.List a) -> (_, (SizedTypes.List.List a))', + \ ' .', + \ ' is inconsistent with the Haskell type', + \ ' .', + \ ' forall p a ->', + \ 'p -> SizedTypes.List.List a -> (a, SizedTypes.List.List a)', + \ ' .', + \ ' defined at src/SizedTypes/List.hs:52:1-3', + \ ' .', + \ ' Specifically, the Liquid component', + \ ' .', + \ ' {VV##0 : GHC.Types.Int | VV##0 >= 0}', + \ ' .', + \ ' is inconsistent with the Haskell component', + \ ' .', + \ ' p', + \ ' .', + \ ' ', + \ ' HINT: Use the hole ''_'' instead of the mismatched component (in the Liquid specification)', + \ '', + \ 'Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug', + \ '', + \ '' + \ ] + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'ghc panic!', + \ 'detail': join(g:detail[1:-3], "\n"), + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), g:detail) + unlet g:detail diff --git a/dot_vim/plugged/ale/test/handler/test_ghc_mod_handler.vader b/dot_vim/plugged/ale/test/handler/test_ghc_mod_handler.vader new file mode 100644 index 0000000..bed5b13 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ghc_mod_handler.vader @@ -0,0 +1,37 @@ +Execute(HandleGhcFormat should handle ghc-mod problems): + call ale#test#SetFilename('check2.hs') + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ', + \ }, + \ { + \ 'lnum': 28, + \ 'col': 28, + \ 'type': 'W', + \ 'text': 'Defaulting the following constraints to type ‘Integer’ (Num a0) arising from the literal ‘3’ at check2.hs:28:28 (Eq a0) arising from a use of ‘lookup’ at check2.hs:28:21-28 • In the first argument of ‘lookup’, namely ‘3’ In the expression: lookup 3 In the second argument of ‘fmap’, namely ‘(lookup 3 $ zip [1, 2, 3] [4, 5, 6])''’' + \ }, + \ ], + \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [ + \ 'check2.hs:2:1:Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.', + \ 'check2.hs:2:1: Suggestion: Use camelCaseFound: my_variable = ...Why not: myVariable = ...', + \ 'check2.hs:6:1: Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ', + \ 'xxx.hs:6:1: Warning: Eta reduceFound: myFunc x = succ xWhy not: myFunc = succ', + \ printf("check2.hs:28:28: Warning: Defaulting the following constraints to type ‘Integer’ (Num a0) arising from the literal ‘3’ at %s/check2.hs:28:28 (Eq a0) arising from a use of ‘lookup’ at %s/check2.hs:28:21-28 • In the first argument of ‘lookup’, namely ‘3’ In the expression: lookup 3 In the second argument of ‘fmap’, namely ‘(lookup 3 $ zip [1, 2, 3] [4, 5, 6])'’", tempname(), tempname()), + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_ghdl_handler.vader b/dot_vim/plugged/ale/test/handler/test_ghdl_handler.vader new file mode 100644 index 0000000..a0f5eda --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ghdl_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime ale_linters/vhdl/ghdl.vim + +After: + call ale#linter#Reset() + +Execute(The ghdl handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 41, + \ 'col' : 5, + \ 'type': 'E', + \ 'text': "error: 'begin' is expected instead of 'if'" + \ }, + \ { + \ 'lnum': 12, + \ 'col' : 8, + \ 'type': 'E', + \ 'text': ' no declaration for "i0"' + \ }, + \ ], + \ ale_linters#vhdl#ghdl#Handle(bufnr(''), [ + \ "dff_en.vhd:41:5:error: 'begin' is expected instead of 'if'", + \ '/path/to/file.vhdl:12:8: no declaration for "i0"', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gitlablint_handler.vader b/dot_vim/plugged/ale/test/handler/test_gitlablint_handler.vader new file mode 100644 index 0000000..3b08ccb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gitlablint_handler.vader @@ -0,0 +1,35 @@ +Before: + runtime! ale_linters/yaml/gitlablint.vim + +After: + Restore + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for gitlablint): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'root config contains unknown keys: efore_script', + \ }, + \ { + \ 'lnum': 77, + \ 'col': 3, + \ 'type': 'E', + \ 'text': '(): could not find expected : while scanning a simple key', + \ }, + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'build:dev:rest job: undefined need: chck:dev', + \ }, + \ ], + \ ale_linters#yaml#gitlablint#Handle(bufnr(''), [ + \ 'GitLab CI configuration is invalid', + \ 'root config contains unknown keys: efore_script', + \ '(): could not find expected : while scanning a simple key at line 77 column 3', + \ 'build:dev:rest job: undefined need: chck:dev', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gitlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_gitlint_handler.vader new file mode 100644 index 0000000..5c53166 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gitlint_handler.vader @@ -0,0 +1,89 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/gitcommit/gitlint.vim + +After: + Restore + + unlet! b:ale_warn_about_trailing_whitespace + + call ale#linter#Reset() + +Execute(The gitlint handler should handle basic warnings and syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'Body message is missing', + \ 'code': 'B6', + \ }, + \ { + \ 'lnum': 2, + \ 'type': 'E', + \ 'text': 'Second line is not empty: "to send to upstream"', + \ 'code': 'B4', + \ }, + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'Body message is too short (19<20): "to send to upstream"', + \ 'code': 'B5', + \ }, + \ { + \ 'lnum': 8, + \ 'type': 'E', + \ 'text': 'Title exceeds max length (92>72): "some very long commit subject line where the author can''t wait to explain what he just fixed"', + \ 'code': 'T1', + \ }, + \ ], + \ ale_linters#gitcommit#gitlint#Handle(1, [ + \ '1: B6 Body message is missing', + \ '2: B4 Second line is not empty: "to send to upstream"', + \ '3: B5 Body message is too short (19<20): "to send to upstream"', + \ '8: T1 Title exceeds max length (92>72): "some very long commit subject line where the author can''t wait to explain what he just fixed"' + \ ]) + +Execute(Disabling trailing whitespace warnings should work): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'type': 'E', + \ 'text': 'Trailing whitespace', + \ 'code': 'T2', + \ }, + \ ], + \ ale_linters#gitcommit#gitlint#Handle(bufnr(''), [ + \ '8: T2 Trailing whitespace', + \]) + + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'type': 'E', + \ 'text': 'Trailing whitespace', + \ 'code': 'B2', + \ }, + \ ], + \ ale_linters#gitcommit#gitlint#Handle(bufnr(''), [ + \ '8: B2 Trailing whitespace', + \]) + + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [], + \ ale_linters#gitcommit#gitlint#Handle(bufnr(''), [ + \ '8: T2 Trailing whitespace', + \ ]) + + AssertEqual + \ [], + \ ale_linters#gitcommit#gitlint#Handle(bufnr(''), [ + \ '8: B2 Trailing whitespace', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_glslang_handler.vader b/dot_vim/plugged/ale/test/handler/test_glslang_handler.vader new file mode 100644 index 0000000..6d3a799 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_glslang_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/glsl/glslang.vim + +Execute(The glsl glslang handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 0, + \ 'type': 'E', + \ 'text': '''gl_ModelViewProjectionMatrix'' : undeclared identifier', + \ }, + \ { + \ 'lnum': 121, + \ 'col': 0, + \ 'type': 'W', + \ 'text': '''switch'' : last case/default label not followed by statements', + \ }, + \ ], + \ ale_linters#glsl#glslang#Handle(bufnr(''), [ + \ 'ERROR: 0:4: ''gl_ModelViewProjectionMatrix'' : undeclared identifier', + \ 'WARNING: 0:121: ''switch'' : last case/default label not followed by statements', + \ 'ERROR: 2 compilation errors. No code generated.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_go_generic_handler.vader b/dot_vim/plugged/ale/test/handler/test_go_generic_handler.vader new file mode 100644 index 0000000..2b17fdc --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_go_generic_handler.vader @@ -0,0 +1,38 @@ +Execute(The golang handler should return the correct filenames): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'text': 'some error', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ { + \ 'lnum': 27, + \ 'col': 5, + \ 'text': 'some error with a column', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/other.go'), + \ }, + \ { + \ 'lnum': 18, + \ 'col': 0, + \ 'text': 'random error', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/go1.14.go'), + \ }, + \ { + \ 'lnum': 36, + \ 'col': 2, + \ 'text': 'another random error', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/anothergo1.14.go'), + \ }, + \ ], + \ ale#handlers#go#Handler(bufnr(''), [ + \ 'test.go:27: some error', + \ 'other.go:27:5: some error with a column', + \ 'vet: go1.14.go:18:0: random error', + \ 'vet: anothergo1.14.go:36:2: another random error', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gobuild_handler.vader b/dot_vim/plugged/ale/test/handler/test_gobuild_handler.vader new file mode 100644 index 0000000..17608c3 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gobuild_handler.vader @@ -0,0 +1,45 @@ +Before: + runtime ale_linters/go/gobuild.vim + +After: + call ale#linter#Reset() + +Execute (The gobuild handler should handle names with spaces): + " We can't test Windows paths with the path resovling on Linux, but we can + " test the regex. + AssertEqual + \ [ + \ [ + \ 'C:\something\file with spaces.go', + \ '27', + \ '', + \ 'missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ ], + \ [ + \ 'C:\something\file with spaces.go', + \ '5', + \ '2', + \ 'expected declaration, found ''STRING'' "log"', + \ ], + \ ], + \ map(ale_linters#go#gobuild#GetMatches([ + \ 'C:\something\file with spaces.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ 'C:\something\file with spaces.go:5:2: expected declaration, found ''STRING'' "log"', + \ ]), 'v:val[1:4]') + +Execute (The gobuild handler should handle relative paths correctly): + call ale#test#SetFilename('app/test.go') + + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 0, + \ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ ], + \ ale_linters#go#gobuild#Handler(bufnr(''), [ + \ 'test.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_golangci_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_golangci_lint_handler.vader new file mode 100644 index 0000000..58815f5 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_golangci_lint_handler.vader @@ -0,0 +1,84 @@ +Before: + runtime ale_linters/go/golangci_lint.vim + +After: + call ale#linter#Reset() + +Execute (The golangci-lint handler should handle names with spaces): + " We can't test Windows paths with the path resovling on Linux, but we can + " test the regex. + AssertEqual + \ [ + \ [ + \ 'C:\something\file with spaces.go', + \ '12', + \ '3', + \ 'expected ''package'', found ''IDENT'' gibberish', + \ 'staticcheck', + \ ], + \ [ + \ 'C:\something\file with spaces.go', + \ '37', + \ '5', + \ 'expected ''package'', found ''IDENT'' gibberish', + \ 'golint', + \ ], + \ ], + \ map(ale_linters#go#golangci_lint#GetMatches([ + \ 'C:\something\file with spaces.go:12:3: expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ 'C:\something\file with spaces.go:37:5: expected ''package'', found ''IDENT'' gibberish (golint)', + \ ]), 'v:val[1:5]') + +Execute (The golangci-lint handler should handle paths correctly): + call ale#test#SetFilename('app/test.go') + + let file = ale#path#GetAbsPath(expand('%:p:h'), 'test.go') + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col': 3, + \ 'text': 'expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ { + \ 'lnum': 37, + \ 'col': 5, + \ 'text': 'expected ''package'', found ''IDENT'' gibberish (golint)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ ], + \ ale_linters#go#golangci_lint#Handler(bufnr(''), [ + \ file . ':12:3: expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ file . ':37:5: expected ''package'', found ''IDENT'' gibberish (golint)', + \ ]) + +Execute (The golangci-lint handler should handle only typecheck lines as errors): + call ale#test#SetFilename('app/main.go') + + let file = ale#path#GetAbsPath(expand('%:p:h'), 'test.go') + + AssertEqual + \ [ + \ { + \ 'lnum': 30, + \ 'col': 5, + \ 'text': 'variable ''err'' is not used (typecheck)', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ { + \ 'lnum': 505, + \ 'col': 75, + \ 'text': 'Magic number: 404, in detected (gomnd)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ } + \ ], + \ ale_linters#go#golangci_lint#Handler(bufnr(''), [ + \ file . ':30:5: variable ''err'' is not used (typecheck)', + \ file . ':505:75: Magic number: 404, in detected (gomnd)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_gometalinter_handler.vader b/dot_vim/plugged/ale/test/handler/test_gometalinter_handler.vader new file mode 100644 index 0000000..1aade8a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_gometalinter_handler.vader @@ -0,0 +1,57 @@ +Before: + runtime ale_linters/go/gometalinter.vim + +After: + call ale#linter#Reset() + +Execute (The gometalinter handler should handle names with spaces): + " We can't test Windows paths with the path resovling on Linux, but we can + " test the regex. + AssertEqual + \ [ + \ [ + \ 'C:\something\file with spaces.go', + \ '12', + \ '3', + \ 'warning', + \ 'expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ ], + \ [ + \ 'C:\something\file with spaces.go', + \ '37', + \ '5', + \ 'error', + \ 'expected ''package'', found ''IDENT'' gibberish (golint)', + \ ], + \ ], + \ map(ale_linters#go#gometalinter#GetMatches([ + \ 'C:\something\file with spaces.go:12:3:warning: expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ 'C:\something\file with spaces.go:37:5:error: expected ''package'', found ''IDENT'' gibberish (golint)', + \ ]), 'v:val[1:5]') + +Execute (The gometalinter handler should handle paths correctly): + call ale#test#SetFilename('app/test.go') + + let file = ale#path#GetAbsPath(expand('%:p:h'), 'test.go') + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col': 3, + \ 'text': 'expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ { + \ 'lnum': 37, + \ 'col': 5, + \ 'text': 'expected ''package'', found ''IDENT'' gibberish (golint)', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'), + \ }, + \ ], + \ ale_linters#go#gometalinter#Handler(bufnr(''), [ + \ file . ':12:3:warning: expected ''package'', found ''IDENT'' gibberish (staticcheck)', + \ file . ':37:5:error: expected ''package'', found ''IDENT'' gibberish (golint)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_hadolint.vader b/dot_vim/plugged/ale/test/handler/test_hadolint.vader new file mode 100644 index 0000000..f84c303 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_hadolint.vader @@ -0,0 +1,59 @@ +Before: + runtime ale_linters/dockerfile/hadolint.vim + +After: + call ale#linter#Reset() + +Execute(The hadolint handler should handle an empty string response): + AssertEqual + \ [], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), []) + +Execute(The hadolint handler should handle a normal example): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 0, + \ 'type': 'W', + \ 'code': 'DL3006', + \ 'text': "DL3006: Always tag the version of an image explicitly", + \ 'detail': "DL3006 ( https://github.com/hadolint/hadolint/wiki/DL3006 )\n\nAlways tag the version of an image explicitly", + \ }, + \ { + \ 'lnum': 4, + \ 'col': 0, + \ 'type': 'W', + \ 'code': 'DL3033', + \ 'text': "DL3033: Specify version with `yum install -y -`.", + \ 'detail': "DL3033 ( https://github.com/hadolint/hadolint/wiki/DL3033 )\n\nSpecify version with `yum install -y -`.", + \ }, + \ { + \ 'lnum': 12, + \ 'col': 0, + \ 'type': 'W', + \ 'code': 'SC2039', + \ 'text': "SC2039: In POSIX sh, brace expansion is undefined.", + \ 'detail': "SC2039 ( https://github.com/koalaman/shellcheck/wiki/SC2039 )\n\nIn POSIX sh, brace expansion is undefined.", + \ }, + \ ], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '-:1 DL3006 warning: Always tag the version of an image explicitly', + \ '-:4 DL3033 warning: Specify version with `yum install -y -`.', + \ '-:12 SC2039 warning: In POSIX sh, brace expansion is undefined.', + \ ]) + +Execute(The hadolint handler should handle parsing errors): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': "unexpected 'b' expecting '#', ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, WORKDIR, or end of input", + \ 'detail': "hadolint could not parse the file because of a syntax error.", + \ }, + \ ], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '/dev/stdin:1:1 unexpected ''b'' expecting ''#'', ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, WORKDIR, or end of input', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_haskell_stack_handler.vader b/dot_vim/plugged/ale/test/handler/test_haskell_stack_handler.vader new file mode 100644 index 0000000..07e7e69 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_haskell_stack_handler.vader @@ -0,0 +1,7 @@ +Before: + runtime ale/handlers/haskell_stack.vim + +Execute(Escape stack should correctly identify a stack exec command): + AssertEqual + \ ale#Escape('stack') . ' exec ' . ale#Escape('hlint') . ' --', + \ ale#handlers#haskell_stack#EscapeExecutable('stack', 'hlint') diff --git a/dot_vim/plugged/ale/test/handler/test_hlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_hlint_handler.vader new file mode 100644 index 0000000..915e174 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_hlint_handler.vader @@ -0,0 +1,80 @@ +Before: + runtime! ale_linters/haskell/hlint.vim + +After: + call ale#linter#Reset() + +Execute(The hlint handler should parse items correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 4, + \ 'end_lnum': 3, + \ 'end_col': 2, + \ 'text': 'Error: Do something. Found: [Char] Why not: String', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 4, + \ 'end_lnum': 7, + \ 'end_col': 2, + \ 'text': 'Warning: Do something. Found: [Char] Why not: String', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 73, + \ 'col': 25, + \ 'end_lnum': 73, + \ 'end_col': 31, + \ 'text': 'Suggestion: Use String. Found: [Char] Why not: String', + \ 'type': 'I', + \ }, + \ ], + \ ale_linters#haskell#hlint#Handle(bufnr(''), [json_encode([ + \ { + \ 'module': 'Main', + \ 'decl': 'foo', + \ 'severity': 'Error', + \ 'hint': 'Do something', + \ 'file': '-', + \ 'startLine': 1, + \ 'startColumn': 4, + \ 'endLine': 3, + \ 'endColumn': 2, + \ 'from': '[Char]', + \ 'to': 'String', + \ }, + \ { + \ 'module': 'Main', + \ 'decl': 'foo', + \ 'severity': 'Warning', + \ 'hint': 'Do something', + \ 'file': '-', + \ 'startLine': 2, + \ 'startColumn': 4, + \ 'endLine': 7, + \ 'endColumn': 2, + \ 'from': '[Char]', + \ 'to': 'String', + \ }, + \ { + \ 'module': 'Main', + \ 'decl': 'myFocusedBorderColor', + \ 'severity': 'Suggestion', + \ 'hint': 'Use String', + \ 'file': '-', + \ 'startLine': 73, + \ 'startColumn': 25, + \ 'endLine': 73, + \ 'endColumn': 31, + \ 'from': '[Char]', + \ 'to': 'String', + \ }, + \ ])]) + +Execute(The hlint handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#haskell#hlint#Handle(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_ibm_openapi_validator_handler.vader b/dot_vim/plugged/ale/test/handler/test_ibm_openapi_validator_handler.vader new file mode 100644 index 0000000..e136d5d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ibm_openapi_validator_handler.vader @@ -0,0 +1,49 @@ +Before: + runtime! ale_linters/openapi/ibm_validator.vim + +After: + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for openapi-ibm-validator): + AssertEqual + \ [ + \ { + \ 'lnum': 54, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Items with a description must have content in it.', + \ }, + \ { + \ 'lnum': 24, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'Operations must have a non-empty `operationId`.', + \ }, + \ { + \ 'lnum': 40, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'operationIds must follow case convention: lower_snake_case', + \ }, + \ ], + \ ale_linters#openapi#ibm_validator#Handle(bufnr(''), [ + \ '', + \ '[Warning] No .validaterc file found. The validator will run in default mode.', + \ 'To configure the validator, create a .validaterc file.', + \ '', + \ 'errors', + \ '', + \ ' Message : Items with a description must have content in it.', + \ ' Path : paths./settings.patch.description', + \ ' Line : 54', + \ '', + \ 'warnings', + \ '', + \ ' Message : Operations must have a non-empty `operationId`.', + \ ' Path : paths./stats.get.operationId', + \ ' Line : 24', + \ '', + \ ' Message : operationIds must follow case convention: lower_snake_case', + \ ' Path : paths./settings.get.operationId', + \ ' Line : 40' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_idris_handler.vader b/dot_vim/plugged/ale/test/handler/test_idris_handler.vader new file mode 100644 index 0000000..6a032ea --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_idris_handler.vader @@ -0,0 +1,66 @@ +Before: + Save $TMPDIR + + " Set TMPDIR so the temporary file checks work. + let $TMPDIR = '/tmp' + + runtime ale_linters/idris/idris.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The idris handler should parse messages that reference a single column): + if has('win32') + call ale#test#SetFilename($TEMP . '\foo.idr') + else + call ale#test#SetFilename('/tmp/foo.idr') + endif + + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'When checking right hand side of main with expected type IO () When checking an application of function Prelude.Monad.>>=: Type mismatch between IO () (Type of putStrLn _) and _ -> _ (Is putStrLn _ applied to too many arguments?) Specifically: Type mismatch between IO and \uv => _ -> uv' + \ } + \ ], + \ ale_linters#idris#idris#Handle(bufnr(''), [ + \ expand('%:p') . ':4:5:', + \ 'When checking right hand side of main with expected type', + \ ' IO ()', + \ '', + \ 'When checking an application of function Prelude.Monad.>>=:', + \ ' Type mismatch between', + \ ' IO () (Type of putStrLn _)', + \ ' and', + \ ' _ -> _ (Is putStrLn _ applied to too many arguments?)', + \ '', + \ ' Specifically:', + \ ' Type mismatch between', + \ ' IO', + \ ' and', + \ ' \uv => _ -> uv', + \ ]) + +Execute(The idris handler should parse messages that reference a column range): + call ale#test#SetFilename('/tmp/foo.idr') + + AssertEqual + \ [ + \ { + \ 'lnum': 11, + \ 'col': 11, + \ 'type': 'E', + \ 'text': 'When checking right hand side of Main.case block in main at /tmp/foo.idr:10:10 with expected type IO () Last statement in do block must be an expression' + \ } + \ ], + \ ale_linters#idris#idris#Handle(bufnr(''), [ + \ expand('%:p') . ':11:11-13:', + \ 'When checking right hand side of Main.case block in main at /tmp/foo.idr:10:10 with expected type', + \ ' IO ()', + \ '', + \ 'Last statement in do block must be an expression', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_inko_handler.vader b/dot_vim/plugged/ale/test/handler/test_inko_handler.vader new file mode 100644 index 0000000..6621d2d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_inko_handler.vader @@ -0,0 +1,54 @@ +Before: + runtime ale_linters/inko/inko.vim + +After: + call ale#linter#Reset() + +Execute(The inko handler should parse errors correctly): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify('/tmp/foo.inko'), + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'this is an error', + \ 'type': 'E', + \ } + \ ], + \ ale#handlers#inko#Handle(bufnr(''), [ + \ '[', + \ ' {', + \ ' "file": "/tmp/foo.inko",', + \ ' "line": 4,', + \ ' "column": 5,', + \ ' "message": "this is an error",', + \ ' "level": "error"', + \ ' }', + \ ']' + \ ]) + +Execute(The inko handler should parse warnings correctly): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify('/tmp/foo.inko'), + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'this is a warning', + \ 'type': 'W', + \ } + \ ], + \ ale#handlers#inko#Handle(bufnr(''), [ + \ '[', + \ ' {', + \ ' "file": "/tmp/foo.inko",', + \ ' "line": 4,', + \ ' "column": 5,', + \ ' "message": "this is a warning",', + \ ' "level": "warning"', + \ ' }', + \ ']' + \ ]) + +Execute(The inko handler should handle empty output): + AssertEqual [], ale#handlers#inko#Handle(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_ispc_ispc_handler.vader b/dot_vim/plugged/ale/test/handler/test_ispc_ispc_handler.vader new file mode 100644 index 0000000..619773f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ispc_ispc_handler.vader @@ -0,0 +1,90 @@ +Before: + runtime ale_linters/ispc/ispc.vim + +After: + call ale#linter#Reset() + +Execute(The ispc handler should parse input correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 0, + \ 'lnum': 33, + \ 'col': 14, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected ''int'', expecting '','' or '';''.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 36, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected ''for''.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 51, + \ 'col': 9, + \ 'type': 'E', + \ 'text': '''foobar.h'' file not found', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 79, + \ 'col': 52, + \ 'type': 'W', + \ 'text': 'Modulus operator with varying types is very inefficient.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 85, + \ 'col': 13, + \ 'type': 'W', + \ 'text': 'Undefined behavior: all program instances are writing to the same location!', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 93, + \ 'col': 19, + \ 'type': 'W', + \ 'text': 'Gather required to load value.', + \ }, + \ { + \ 'bufnr': 0, + \ 'lnum': 93, + \ 'col': 9, + \ 'type': 'W', + \ 'text': 'Scatter required to store value.', + \ }, + \ ], + \ ale_linters#ispc#ispc#Handle(0, [ + \ 'Warning: No output file or header file name specified. Program will be compiled and warnings/errors will be issued, but no output will be generated. ', + \ 'Warning: No --target specified on command-line. Using default system target "avx2-i32x8".', + \ 'mandelbrot.ispc:33:14: Error: syntax error, unexpected ''int'', expecting '','' or '';''.', + \ 'static iline int mandel(float c_re, float c_im, int count) {', + \ ' ^^^', + \ '', + \ 'mandelbrot.ispc:36:5: Error: syntax error, unexpected ''for''.', + \ ' for (i = 0; i < count; ++i) {', + \ ' ^^^', + \ '', + \ 'mandelbrot.ispc:51:9: fatal error: ''foobar.h'' file not found', + \ '#include', + \ ' ^~~~~~~~~~', + \ 'mandelbrot.ispc:79:52: Performance Warning: Modulus operator with varying types is very inefficient.', + \ ' double x = x0 + i * (dx + epsilon*(k%2)*delta);', + \ ' ^^^', + \ '', + \ 'mandelbrot.ispc:85:13: Warning: Undefined behavior: all program instances are writing to the same location!', + \ ' output[index] = (NNN) / sample_size;', + \ ' ^^^^^^^^^^^^^', + \ '', + \ 'mandelbrot.ispc:93:19: Performance Warning: Gather required to load value.', + \ ' A[i*8] *= A[i*8];', + \ ' ^^^^^^', + \ '', + \ 'mandelbrot.ispc:93:9: Performance Warning: Scatter required to store value.', + \ ' A[i*8] *= A[i*8];', + \ ' ^^^^^^', + \ '', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_javac_handler.vader b/dot_vim/plugged/ale/test/handler/test_javac_handler.vader new file mode 100644 index 0000000..3dc245a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_javac_handler.vader @@ -0,0 +1,97 @@ +Before: + runtime ale_linters/java/javac.vim + + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.java') + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The javac handler should handle cannot find symbol errors): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 1, + \ 'text': 'error: some error', + \ 'type': 'E', + \ }, + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 2, + \ 'col': 5, + \ 'text': 'error: cannot find symbol: BadName', + \ 'type': 'E', + \ }, + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 34, + \ 'col': 5, + \ 'text': 'error: cannot find symbol: BadName2', + \ 'type': 'E', + \ }, + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 37, + \ 'text': 'warning: some warning', + \ 'type': 'W', + \ }, + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 42, + \ 'col': 11, + \ 'text': 'error: cannot find symbol: bar()', + \ 'type': 'E', + \ }, + \ { + \ 'filename': ale#path#Simplify('/tmp/vLPr4Q5/33/foo.java'), + \ 'lnum': 58, + \ 'col': 19, + \ 'text': 'error: incompatible types: Bar cannot be converted to Foo', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#java#javac#Handle(bufnr(''), [ + \ '/tmp/vLPr4Q5/33/foo.java:1: error: some error', + \ '/tmp/vLPr4Q5/33/foo.java:2: error: cannot find symbol', + \ ' BadName foo() {', + \ ' ^', + \ ' symbol: class BadName', + \ ' location: class Bar', + \ '/tmp/vLPr4Q5/33/foo.java:34: error: cannot find symbol', + \ ' BadName2 foo() {', + \ ' ^', + \ ' symbol: class BadName2', + \ ' location: class Bar', + \ '/tmp/vLPr4Q5/33/foo.java:37: warning: some warning', + \ '/tmp/vLPr4Q5/33/foo.java:42: error: cannot find symbol', + \ ' this.bar();', + \ ' ^', + \ ' symbol: method bar()', + \ '/tmp/vLPr4Q5/33/foo.java:58: error: incompatible types: Bar cannot be converted to Foo', + \ ' this.setFoo(bar);', + \ ' ^', + \ '6 errors', + \ ]) + +Execute(The javac handler should resolve files from different directories): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/Foo.java'), + \ 'lnum': 1, + \ 'text': 'error: some error', + \ 'type': 'E', + \ }, + \ { + \ 'filename': ale#path#Simplify(g:dir . '/Bar.java'), + \ 'lnum': 1, + \ 'text': 'error: some error', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#java#javac#Handle(bufnr(''), [ + \ './Foo.java:1: error: some error', + \ './Bar.java:1: error: some error', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_jscs_handler.vader b/dot_vim/plugged/ale/test/handler/test_jscs_handler.vader new file mode 100644 index 0000000..5566116 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_jscs_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/javascript/jscs.vim + +After: + call ale#linter#Reset() + +Execute(jscs should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 7, + \ 'text': 'Variable declarations should use `let` or `const` not `var`', + \ 'code': 'disallowVar', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 21, + \ 'text': 'Illegal trailing whitespace', + \ 'code': 'disallowTrailingWhitespace', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 9, + \ 'text': 'Variable `hello` is not used', + \ 'code': 'disallowUnusedVariables', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Expected indentation of 1 characters', + \ }, + \ ], + \ ale_linters#javascript#jscs#Handle(347, [ + \ 'foobar.js: line 1, col 7, disallowVar: Variable declarations should use `let` or `const` not `var`', + \ 'foobar.js: line 3, col 21, disallowTrailingWhitespace: Illegal trailing whitespace', + \ 'foobar.js: line 5, col 9, disallowUnusedVariables: Variable `hello` is not used', + \ 'foobar.js: line 2, col 1, Expected indentation of 1 characters', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_ktlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_ktlint_handler.vader new file mode 100644 index 0000000..f0d634e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ktlint_handler.vader @@ -0,0 +1,21 @@ +Before: + Save g:ale_kotlin_ktlint_rulesets + + let g:ale_kotlin_ktlint_rulesets = [] + +After: + Restore + +Execute(The ktlint handler method GetRulesets should properly parse custom rulesets): + let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom/ruleset.jar', '/path/to/other/ruleset.jar'] + + AssertEqual + \ '--ruleset /path/to/custom/ruleset.jar --ruleset /path/to/other/ruleset.jar', + \ ale#handlers#ktlint#GetRulesets(bufnr('')) + +Execute(The ktlint handler method GetRulesets should return an empty string when no rulesets have been configured): + let g:ale_kotlin_ktlint_rulesets = [] + + AssertEqual + \ '', + \ ale#handlers#ktlint#GetRulesets(bufnr('')) diff --git a/dot_vim/plugged/ale/test/handler/test_lacheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_lacheck_handler.vader new file mode 100644 index 0000000..5d1b6ac --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_lacheck_handler.vader @@ -0,0 +1,34 @@ +Before: + runtime ale_linters/tex/lacheck.vim + call ale#test#SetDirectory('/testplugin/test/handler') + +After: + call ale#linter#Reset() + call ale#test#RestoreDirectory() + +Execute(The lacheck handler should parse lines correctly): + call ale#test#SetFilename('../test-files/tex/sample1.tex') + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'W', + \ 'text': 'perhaps you should insert a `~'' before "\ref"' + \ } + \ ], + \ ale_linters#tex#lacheck#Handle(bufnr(''), [ + \ "** sample1:", + \ "\"sample1.tex\", line 1: perhaps you should insert a `~' before \"\\ref\"" + \ ]) + +Execute(The lacheck handler should ignore errors from input files): + call ale#test#SetFilename('ale_test.tex') + + AssertEqual + \ [ + \ ], + \ ale_linters#tex#lacheck#Handle(255, [ + \ "** ale_input:", + \ "\"ale_input.tex\", line 1: perhaps you should insert a `~' before \"\\ref\"" + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_languagetool_handler.vader b/dot_vim/plugged/ale/test/handler/test_languagetool_handler.vader new file mode 100644 index 0000000..61d3abf --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_languagetool_handler.vader @@ -0,0 +1,62 @@ +Before: + runtime! ale_linters/text/languagetool.vim + +After: + call ale#linter#Reset() + +Execute(languagetool handler should report 3 errors): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 19, + \ 'end_col': 20, + \ 'text': 'This sentence does not start with an uppercase letter', + \ 'type': 'W', + \ 'code': 'UPPERCASE_SENTENCE_START', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 36, + \ 'end_col': 42, + \ 'text': "Did you mean 'to see'?", + \ 'type': 'W', + \ 'code': 'TOO_TO[1]', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 44, + \ 'end_col': 45, + \ 'text': "Use 'a' instead of 'an' if the following word doesn't start with a vowel sound, e.g. 'a sentence', 'a university'", + \ 'type': 'W', + \ 'code': 'EN_A_VS_AN', + \ } + \ ], + \ ale#handlers#languagetool#HandleOutput(bufnr(''), [ + \ '1.) Line 3, column 19, Rule ID: UPPERCASE_SENTENCE_START', + \ 'Message: This sentence does not start with an uppercase letter', + \ 'Suggestion: Or', + \ '...red phrases for details on potential errors. or use this text too see an few of of the probl...', + \ ' ^^ ', + \ '', + \ '2.) Line 3, column 36, Rule ID: TOO_TO[1]', + \ "Message: Did you mean 'to see'?", + \ 'Suggestion: to see', + \ '...etails on potential errors. or use this text too see an few of of the problems that LanguageTool ...', + \ ' ^^^^^^^ ', + \ '', + \ '3.) Line 3, column 44, Rule ID: EN_A_VS_AN', + \ "Message: Use 'a' instead of 'an' if the following word doesn't start with a vowel sound, e.g. 'a sentence', 'a university'", + \ 'Suggestion: a', + \ '...n potential errors. or use this text too see an few of of the problems that LanguageTool can...', + \ ' ^^ ', + \ 'Time: 2629ms for 8 sentences (3.0 sentences/sec)' + \ ]) + +Execute(languagetool handler should report no errors on empty input): + AssertEqual + \ [], + \ ale#handlers#languagetool#HandleOutput(bufnr(''), [ + \ '', + \ 'Time: 2629ms for 8 sentences (3.0 sentences/sec)' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_lessc_handler.vader b/dot_vim/plugged/ale/test/handler/test_lessc_handler.vader new file mode 100644 index 0000000..31de559 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_lessc_handler.vader @@ -0,0 +1,69 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + call ale#test#SetFilename('testfile.less') + + runtime ale_linters/less/lessc.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The lessc handler should handle errors for the current file correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Unrecognised input. Possibly missing something', + \ }, + \ ], + \ ale_linters#less#lessc#Handle(bufnr(''), [ + \ 'ParseError: Unrecognised input. Possibly missing something in - on line 2, column 1:', + \ '1 vwewww', + \ '2 ', + \]) + +Execute(The lessc handler should handle errors for other files in the same directory correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Unrecognised input. Possibly missing something', + \ 'filename': ale#path#Simplify(g:dir . '/imported.less') + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Unrecognised input. Possibly missing something', + \ 'filename': ale#path#Simplify(g:dir . '/imported.less') + \ }, + \ ], + \ ale_linters#less#lessc#Handle(bufnr(''), [ + \ 'ParseError: Unrecognised input. Possibly missing something in imported.less on line 2, column 1:', + \ '1 vwewww', + \ '2 ', + \ 'ParseError: Unrecognised input. Possibly missing something in ./imported.less on line 2, column 1:', + \ '1 vwewww', + \ '2 ', + \]) + +Execute(The lessc handler should handle errors for files in directories above correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Unrecognised input. Possibly missing something', + \ 'filename': ale#path#Simplify(g:dir . '/../imported2.less') + \ }, + \ ], + \ ale_linters#less#lessc#Handle(bufnr(''), [ + \ 'ParseError: Unrecognised input. Possibly missing something in ../imported2.less on line 2, column 1:', + \ '1 vwewww', + \ '2 ', + \]) diff --git a/dot_vim/plugged/ale/test/handler/test_llc_handler.vader b/dot_vim/plugged/ale/test/handler/test_llc_handler.vader new file mode 100644 index 0000000..bbe686f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_llc_handler.vader @@ -0,0 +1,58 @@ +Before: + runtime! ale_linters/llvm/llc.vim + +After: + call ale#linter#Reset() + +Execute(llc handler should parse errors output for STDIN): + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'col': 7, + \ 'text': "error: value doesn't match function result type 'i32'", + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 13, + \ 'text': "error: use of undefined value '@foo'", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#llvm#llc#HandleErrors(bufnr(''), [ + \ "llc: :10:7: error: value doesn't match function result type 'i32'", + \ 'ret i64 0', + \ ' ^', + \ '', + \ "llc: :10:13: error: use of undefined value '@foo'", + \ 'call void @foo(i64 %0)', + \ ' ^', + \ ]) + +Execute(llc handler should parse errors output for some file): + call ale#test#SetFilename('test.ll') + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'col': 7, + \ 'text': "error: value doesn't match function result type 'i32'", + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 13, + \ 'text': "error: use of undefined value '@foo'", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#llvm#llc#HandleErrors(bufnr(''), [ + \ "llc: /path/to/test.ll:10:7: error: value doesn't match function result type 'i32'", + \ 'ret i64 0', + \ ' ^', + \ '', + \ "llc: /path/to/test.ll:10:13: error: use of undefined value '@foo'", + \ 'call void @foo(i64 %0)', + \ ' ^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_lua_selene_handler.vader b/dot_vim/plugged/ale/test/handler/test_lua_selene_handler.vader new file mode 100644 index 0000000..e9410ae --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_lua_selene_handler.vader @@ -0,0 +1,38 @@ +Before: + runtime ale_linters/lua/selene.vim + +After: + Restore + call ale#linter#Reset() + +Execute(The selene handler for Lua should parse input correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'end_lnum': 2, + \ 'col': 1, + \ 'end_col': 3, + \ 'text': 'empty if block', + \ 'code': 'empty_if', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'col': 4, + \ 'end_col': 11, + \ 'text': 'comparing things to nan directly is not allowed', + \ 'code': 'compare_nan', + \ 'type': 'E', + \ 'detail': "comparing things to nan directly is not allowed\n\ntry: `x ~= x` instead" + \ }, + \ ], + \ ale_linters#lua#selene#Handle(0, [ + \ '{"severity":"Warning","code":"empty_if","message":"empty if block","primary_label":{"span":{"start":0,"start_line":0,"start_column":0,"end":20,"end_line":1,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}', + \ '{"severity":"Error","code":"compare_nan","message":"comparing things to nan directly is not allowed","primary_label":{"span":{"start":3,"start_line":0,"start_column":3,"end":11,"end_line":0,"end_column":11},"message":""},"notes":["try: `x ~= x` instead"],"secondary_labels":[]}', + \ 'Results:', + \ '1 errors', + \ '1 warnings', + \ '0 parse errors', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_luac_handler.vader b/dot_vim/plugged/ale/test/handler/test_luac_handler.vader new file mode 100644 index 0000000..3a2e769 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_luac_handler.vader @@ -0,0 +1,36 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/lua/luac.vim + +After: + Restore + call ale#linter#Reset() + +Execute(The luac handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'line contains trailing whitespace', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 3, + \ 'text': 'unexpected symbol near ''-''', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 5, + \ 'text': '''='' expected near '')''', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#lua#luac#Handle(347, [ + \ 'luac /file/path/here.lua:1: line contains trailing whitespace', + \ 'luac /file/path/here.lua:3: unexpected symbol near ''-''', + \ 'luac /file/path/here.lua:5: ''='' expected near '')''', + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_luacheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_luacheck_handler.vader new file mode 100644 index 0000000..7cebb01 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_luacheck_handler.vader @@ -0,0 +1,62 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/lua/luacheck.vim + +After: + Restore + call ale#linter#Reset() + +Execute(The luacheck handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 8, + \ 'text': 'line contains trailing whitespace', + \ 'code': 'W612', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'text': 'unused loop variable ''k''', + \ 'code': 'W213', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 19, + \ 'text': 'accessing undefined variable ''x''', + \ 'code': 'W113', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#lua#luacheck#Handle(347, [ + \ ' /file/path/here.lua:1:8: (W612) line contains trailing whitespace', + \ ' /file/path/here.lua:3:5: (W213) unused loop variable ''k''', + \ ' /file/path/here.lua:3:19: (W113) accessing undefined variable ''x''', + \ ]) + +Execute(The luacheck handler should respect the warn_about_trailing_whitespace option): + let g:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 43, + \ 'text': 'unused argument ''g''', + \ 'code': 'W212', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#lua#luacheck#Handle(347, [ + \ '/file/path/here.lua:15:97: (W614) trailing whitespace in a comment', + \ '/file/path/here.lua:16:60: (W612) line contains trailing whitespace', + \ '/file/path/here.lua:17:1: (W611) line contains only whitespace', + \ '/file/path/here.lua:27:57: (W613) trailing whitespace in a string', + \ '/file/path/here.lua:5:43: (W212) unused argument ''g''', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_markdownlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_markdownlint_handler.vader new file mode 100644 index 0000000..f2e6e32 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_markdownlint_handler.vader @@ -0,0 +1,91 @@ +Before: + runtime ale_linters/markdown/markdownlint.vim + +After: + call ale#linter#Reset() + +Execute(The Markdownlint handler should parse pre v0.19.0 output with single digit line correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'code': 'MD013/line-length', + \ 'text': 'Line length [Expected: 80; Actual: 114]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md: 1: MD013/line-length Line length [Expected: 80; Actual: 114]' + \ ]) + +Execute(The Markdownlint handler should parse pre v0.19.0 output with multi digit line correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 100, + \ 'code': 'MD013/line-length', + \ 'text': 'Line length [Expected: 80; Actual: 114]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md: 100: MD013/line-length Line length [Expected: 80; Actual: 114]' + \ ]) + +Execute(The Markdownlint handler should parse post v0.19.0 output with single digit line correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'code': 'MD013/line-length', + \ 'text': 'Line length [Expected: 80; Actual: 114]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md:1 MD013/line-length Line length [Expected: 80; Actual: 114]' + \ ]) + +Execute(The Markdownlint handler should parse post v0.19.0 output with multi digit line correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 100, + \ 'code': 'MD013/line-length', + \ 'text': 'Line length [Expected: 80; Actual: 114]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md:100 MD013/line-length Line length [Expected: 80; Actual: 114]' + \ ]) + + +Execute(The Markdownlint handler should parse post v0.22.0 output with column correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'col': 20, + \ 'code': 'MD013/line-length', + \ 'text': 'Line length [Expected: 80; Actual: 114]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md:10:20 MD013/line-length Line length [Expected: 80; Actual: 114]' + \ ]) + +Execute(The Markdownlint handler should parse output with multiple slashes in rule name correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'code': 'MD022/blanks-around-headings/blanks-around-headers', + \ 'text': 'Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "### something"]', + \ 'type': 'W' + \ } + \ ], + \ ale#handlers#markdownlint#Handle(0, [ + \ 'README.md:10 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "### something"]' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mcs_handler.vader b/dot_vim/plugged/ale/test/handler/test_mcs_handler.vader new file mode 100644 index 0000000..3defc32 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mcs_handler.vader @@ -0,0 +1,37 @@ +Before: + runtime ale_linters/cs/mcs.vim + +After: + call ale#linter#Reset() + +Execute(The mcs handler should handle cannot find symbol errors): + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col' : 29, + \ 'text': '; expected', + \ 'code': 'CS1001', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 101, + \ 'col': 0, + \ 'text': 'Unexpected processor directive (no #if for this #endif)', + \ 'code': 'CS1028', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 12, + \ 'text': 'some warning', + \ 'code': 'CS0123', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#cs#mcs#Handle(347, [ + \ 'Tests.cs(12,29): error CS1001: ; expected', + \ 'Tests.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)', + \ 'Tests.cs(10,12): warning CS0123: some warning', + \ 'Compilation failed: 2 error(s), 1 warnings', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mcsc_handler.vader b/dot_vim/plugged/ale/test/handler/test_mcsc_handler.vader new file mode 100644 index 0000000..c04f7d2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mcsc_handler.vader @@ -0,0 +1,88 @@ +Before: + Save g:ale_cs_mcsc_source + + unlet! g:ale_cs_mcsc_source + + call ale#test#SetDirectory('/testplugin/test/handler') + call ale#test#SetFilename('Test.cs') + + runtime ale_linters/cs/mcsc.vim + +After: + unlet! g:ale_cs_mcsc_source + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The mcs handler should work with the default of the buffer's directory): + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col' : 29, + \ 'text': '; expected', + \ 'code': 'CS1001', + \ 'type': 'E', + \ 'filename': ale#path#Simplify(g:dir . '/Test.cs'), + \ }, + \ ], + \ ale_linters#cs#mcsc#Handle(bufnr(''), [ + \ 'Test.cs(12,29): error CS1001: ; expected', + \ 'Compilation failed: 2 error(s), 1 warnings', + \ ]) + +Execute(The mcs handler should handle cannot find symbol errors): + let g:ale_cs_mcsc_source = '/home/foo/project/bar' + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'col' : 29, + \ 'text': '; expected', + \ 'code': 'CS1001', + \ 'type': 'E', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ { + \ 'lnum': 101, + \ 'col': 0, + \ 'text': 'Unexpected processor directive (no #if for this #endif)', + \ 'code': 'CS1028', + \ 'type': 'E', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ { + \ 'lnum': 10, + \ 'col': 12, + \ 'text': 'some warning', + \ 'code': 'CS0123', + \ 'type': 'W', + \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'), + \ }, + \ ], + \ ale_linters#cs#mcsc#Handle(bufnr(''), [ + \ 'Test.cs(12,29): error CS1001: ; expected', + \ 'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)', + \ 'Test.cs(10,12): warning CS0123: some warning', + \ 'Compilation failed: 2 error(s), 1 warnings', + \ ]) + +Execute(The mcsc handler should handle non file specific compiler errors without reporting overal status report as error): + let g:ale_cs_mcsc_source = '/home/foo/project/bar' + + AssertEqual + \ [ + \ { + \ 'lnum': -1, + \ 'col' : -1, + \ 'text': 'No files to compile were specified', + \ 'code': 'CS2008', + \ 'type': 'E', + \ 'filename': '', + \ }, + \ ], + \ ale_linters#cs#mcsc#Handle(bufnr(''), [ + \ 'error CS2008: No files to compile were specified', + \ 'Compilation failed: 1 error(s), 0 warnings', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mdl_handler.vader b/dot_vim/plugged/ale/test/handler/test_mdl_handler.vader new file mode 100644 index 0000000..d01b52a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mdl_handler.vader @@ -0,0 +1,25 @@ +Before: + runtime ale_linters/markdown/mdl.vim + +After: + call ale#linter#Reset() + +Execute(The mdl handler should parse output correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'code': 'MD002/first-header-h1', + \ 'text': 'First header should be a top level header', + \ 'type': 'W' + \ }, + \ { + \ 'lnum': 18, + \ 'code': 'MD033/no-inline-html', + \ 'text': 'Inline HTML', + \ 'type': 'W' + \ } + \ ], + \ ale_linters#markdown#mdl#Handle(0, [ + \ '[{"filename":"README.md","line":1,"rule":"MD002","aliases":["first-header-h1"],"description":"First header should be a top level header"},{"filename":"README.md","line":18,"rule":"MD033","aliases":["no-inline-html"],"description":"Inline HTML"}]' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mercury_mmc_handler.vader b/dot_vim/plugged/ale/test/handler/test_mercury_mmc_handler.vader new file mode 100644 index 0000000..e862f28 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mercury_mmc_handler.vader @@ -0,0 +1,58 @@ +Before: + runtime ale_linters/mercury/mmc.vim + +After: + call ale#linter#Reset() + +Execute(The mmc handler should handle syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': "Syntax error at token ',': operator precedence error." + \ } + \ ], + \ ale_linters#mercury#mmc#Handle(1, [ + \ "file_name.m:003: Syntax error at token ',': operator precedence error." + \ ]) + +Execute(The mmc handler should handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'type': 'W', + \ 'text': 'Warning: reference to uninitialized state variable !.X.' + \ }, + \ { + \ 'lnum': 12, + \ 'type': 'W', + \ 'text': 'warning: determinism declaration could be tighter.' + \ } + \ ], + \ ale_linters#mercury#mmc#Handle(1, [ + \ 'file_name.m:010: Warning: reference to uninitialized state variable !.X.', + \ "file_name.m:012: In `some_predicate':", + \ 'file_name.m:012: warning: determinism declaration could be tighter.' + \ ]) + +Execute(The mmc handler should handle semantic errors): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'type': 'E', + \ 'text': "error: undefined type `bar'/0." + \ }, + \ { + \ 'lnum': 15, + \ 'type': 'E', + \ 'text': "Error: circular equivalence type `file_name.foo'/0." + \ } + \ ], + \ ale_linters#mercury#mmc#Handle(1, [ + \ "file_name.m:007: In clause for predicate `foldit'/4:", + \ "file_name.m:007: error: undefined type `bar'/0.", + \ "file_name.m:015: Error: circular equivalence type `file_name.foo'/0." + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mix_handler.vader b/dot_vim/plugged/ale/test/handler/test_mix_handler.vader new file mode 100644 index 0000000..a5549b5 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mix_handler.vader @@ -0,0 +1,21 @@ +Before: + runtime ale_linters/elixir/mix.vim + +After: + call ale#linter#Reset() + +Execute(The mix handler should parse lines correctly): + + AssertEqual + \ [ + \ { + \ 'bufnr': 347, + \ 'lnum': 87, + \ 'col': 0, + \ 'text': 'undefined function update_in/4', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#elixir#mix#Handle(347, [ + \ '** (CompileError) apps/sim/lib/sim/server.ex:87: undefined function update_in/4' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_msgfmt_hander.vader b/dot_vim/plugged/ale/test/handler/test_msgfmt_hander.vader new file mode 100644 index 0000000..1a67dbc --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_msgfmt_hander.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/po/msgfmt.vim + +After: + call ale#linter#Reset() + +Execute(Duplicate messages should be made easier to navigate): + AssertEqual + \ [ + \ {'lnum': 14, 'col': 0, 'type': 'W', 'text': 'some other thing'}, + \ {'lnum': 1746, 'col': 0, 'type': 'W', 'text': 'duplicate of message at line 262'}, + \ {'lnum': 262, 'col': 0, 'type': 'W', 'text': 'first location of duplicate of message at line 1746'}, + \ {'lnum': 666, 'col': 0, 'type': 'W', 'text': 'duplicate message definition...'}, + \ {'lnum': 888, 'col': 0, 'type': 'W', 'text': 'some other thing'}, + \ {'lnum': 999, 'col': 0, 'type': 'W', 'text': '...this is the location of the first definition'}, + \ ], + \ ale_linters#po#msgfmt#Handle(bufnr(''), [ + \ '/tmp/v6GMUFf/16/foo.po:14: some other thing', + \ '/tmp/v6GMUFf/16/foo.po:1746: duplicate message definition...', + \ '/tmp/v6GMUFf/16/foo.po:262: ...this is the location of the first definition', + \ '/tmp/v6GMUFf/16/foo.po:666: duplicate message definition...', + \ '/tmp/v6GMUFf/16/foo.po:888: some other thing', + \ '/tmp/v6GMUFf/16/foo.po:999: ...this is the location of the first definition', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_mypy_handler.vader b/dot_vim/plugged/ale/test/handler/test_mypy_handler.vader new file mode 100644 index 0000000..039155a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_mypy_handler.vader @@ -0,0 +1,141 @@ +Before: + Save g:ale_python_mypy_ignore_invalid_syntax + Save g:ale_python_mypy_show_notes + + unlet! g:ale_python_mypy_show_notes + unlet! g:ale_python_mypy_ignore_invalid_syntax + + runtime ale_linters/python/mypy.vim + + call ale#test#SetDirectory('/testplugin/test/handler') + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The mypy handler should parse lines correctly): + call ale#test#SetFilename('__init__.py') + + let g:ale_python_mypy_show_notes = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 768, + \ 'col': 38, + \ 'filename': ale#path#Simplify(g:dir . '/baz.py'), + \ 'type': 'E', + \ 'text': 'Cannot determine type of ''SOME_SYMBOL''', + \ }, + \ { + \ 'lnum': 821, + \ 'col': 38, + \ 'filename': ale#path#Simplify(g:dir . '/baz.py'), + \ 'type': 'E', + \ 'text': 'Cannot determine type of ''SOME_SYMBOL''', + \ }, + \ { + \ 'lnum': 38, + \ 'col': 44, + \ 'filename': ale#path#Simplify(g:dir . '/other.py'), + \ 'type': 'E', + \ 'text': 'Cannot determine type of ''ANOTHER_SYMBOL''', + \ }, + \ { + \ 'lnum': 15, + \ 'col': 3, + \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'), + \ 'type': 'E', + \ 'text': 'Argument 1 to "somefunc" has incompatible type "int"; expected "str"' + \ }, + \ { + \ 'lnum': 72, + \ 'col': 1, + \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'), + \ 'type': 'W', + \ 'text': 'Some warning', + \ }, + \ ], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ 'baz.py: note: In class "SomeClass":', + \ 'baz.py:768:38: error: Cannot determine type of ''SOME_SYMBOL''', + \ 'baz.py: note: In class "AnotherClass":', + \ 'baz.py:821:38: error: Cannot determine type of ''SOME_SYMBOL''', + \ '__init__.py:92: note: In module imported here:', + \ 'other.py: note: In class "YetAnotherClass":', + \ 'other.py:38:44: error: Cannot determine type of ''ANOTHER_SYMBOL''', + \ '__init__.py: note: At top level:', + \ '__init__.py:15:3: error: Argument 1 to "somefunc" has incompatible type "int"; expected "str"', + \ 'another_module/bar.py:14: note: In module imported here,', + \ 'another_module/__init__.py:16: note: ... from here,', + \ '__init__.py:72:1: warning: Some warning', + \ ]) + +Execute(The mypy handler should show notes if enabled): + call ale#test#SetFilename('__init__.py') + + AssertEqual + \ [ + \ { + \ 'lnum': 72, + \ 'col': 1, + \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'), + \ 'type': 'I', + \ 'text': 'A note', + \ }, + \ ], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ '__init__.py:72:1: note: A note', + \ ]) + + let g:ale_python_mypy_show_notes = 0 + + AssertEqual + \ [], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ '__init__.py:72:1: note: A note', + \ ]) + +Execute(The mypy handler should handle Windows names with spaces): + " This test works on Unix, where this is seen as a single filename + silent file C:\\something\\with\ spaces.py + + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 0, + \ 'filename': ale#path#Simplify('C:\something\with spaces.py'), + \ 'type': 'E', + \ 'text': 'No library stub file for module ''django.db''', + \ }, + \ ], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ 'C:\something\with spaces.py:4: error: No library stub file for module ''django.db''', + \ ]) + +Execute(The mypy syntax errors shouldn't be ignored by default): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 0, + \ 'filename': ale#path#Simplify(g:dir . '/foo.py'), + \ 'type': 'E', + \ 'text': 'invalid syntax', + \ }, + \ ], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ 'foo.py:4: error: invalid syntax', + \ ]) + +Execute(The mypy syntax errors should be ignored when the option is on): + let g:ale_python_mypy_ignore_invalid_syntax = 1 + + AssertEqual + \ [], + \ ale_linters#python#mypy#Handle(bufnr(''), [ + \ 'foo.py:4: error: invalid syntax', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_naga_handler.vader b/dot_vim/plugged/ale/test/handler/test_naga_handler.vader new file mode 100644 index 0000000..48b8c28 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_naga_handler.vader @@ -0,0 +1,23 @@ +Before: + runtime ale_linters/wgsl/naga.vim + +After: + call ale#linter#Reset() + +Execute(Error handler should parse error message and position from input): + let example_output = [ + \ "error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['", + \ " ┌─ wgsl:5:1", + \ " │", + \ "5 │ [[group(1), binding(0)]]", + \ " │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file", + \ "Could not parse WGSL", + \ ] + let actual = ale#handlers#naga#Handle(0, example_output) + let expected = [{ + \ "text": "expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['", + \ "lnum": 5, + \ "col": 1, + \ "type": "E", + \ }] + AssertEqual actual, expected diff --git a/dot_vim/plugged/ale/test/handler/test_nagelfar_handler.vader b/dot_vim/plugged/ale/test/handler/test_nagelfar_handler.vader new file mode 100644 index 0000000..ceaee19 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_nagelfar_handler.vader @@ -0,0 +1,174 @@ +Before: + runtime ale_linters/tcl/nagelfar.vim + +After: + call ale#linter#Reset() + +Execute(The nagelfar handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'type': 'W', + \ 'text': 'Found constant "bepa" which is also a variable.' + \ }, + \ { + \ 'lnum': 7, + \ 'type': 'E', + \ 'text': 'Unknown variable "cep"' + \ }, + \ { + \ 'lnum': 7, + \ 'type': 'W', + \ 'text': 'Unknown command "se"' + \ }, + \ { + \ 'lnum': 8, + \ 'type': 'E', + \ 'text': 'Unknown variable "epa"' + \ }, + \ { + \ 'lnum': 10, + \ 'type': 'E', + \ 'text': 'Unknown variable "depa"' + \ }, + \ { + \ 'lnum': 10, + \ 'type': 'W', + \ 'text': 'Suspicious variable name "$depa"' + \ }, + \ { + \ 'lnum': 11, + \ 'type': 'W', + \ 'text': 'Suspicious variable name "$cepa"' + \ }, + \ { + \ 'lnum': 13, + \ 'type': 'E', + \ 'text': 'Wrong number of arguments (3) to "set"' + \ }, + \ { + \ 'lnum': 13, + \ 'type': 'W', + \ 'text': 'Found constant "bepa" which is also a variable.' + \ }, + \ { + \ 'lnum': 13, + \ 'type': 'W', + \ 'text': 'Found constant "cepa" which is also a variable.' + \ }, + \ { + \ 'lnum': 18, + \ 'type': 'E', + \ 'text': 'Badly formed if statement' + \ }, + \ { + \ 'lnum': 24, + \ 'type': 'E', + \ 'text': 'Unknown subcommand "gurka" to "info"' + \ }, + \ { + \ 'lnum': 31, + \ 'type': 'W', + \ 'text': 'Switch pattern starting with #. This could be a bad comment.' + \ }, + \ { + \ 'lnum': 31, + \ 'type': 'W', + \ 'text': 'Unknown command "This"' + \ }, + \ { + \ 'lnum': 31, + \ 'type': 'W', + \ 'text': 'Unknown command "bad"' + \ }, + \ { + \ 'lnum': 34, + \ 'type': 'W', + \ 'text': 'Unknown command "miffo"' + \ }, + \ { + \ 'lnum': 55, + \ 'type': 'W', + \ 'text': 'Suspicious variable name "$bepa"' + \ }, + \ { + \ 'lnum': 56, + \ 'type': 'W', + \ 'text': 'Suspicious variable name "$apa"' + \ }, + \ { + \ 'lnum': 61, + \ 'type': 'E', + \ 'text': 'Could not complete statement.' + \ }, + \ { + \ 'lnum': 67, + \ 'type': 'E', + \ 'text': 'Could not complete statement.' + \ }, + \ { + \ 'lnum': 70, + \ 'type': 'E', + \ 'text': 'Wrong number of arguments (4) to "proc"' + \ }, + \ { + \ 'lnum': 72, + \ 'type': 'E', + \ 'text': 'Wrong number of arguments (1) to "if"' + \ }, + \ { + \ 'lnum': 75, + \ 'type': 'E', + \ 'text': 'Unbalanced close brace found' + \ }, + \ { + \ 'lnum': 82, + \ 'type': 'E', + \ 'text': 'Unbalanced close brace found' + \ }, + \ { + \ 'lnum': 88, + \ 'type': 'E', + \ 'text': 'Could not complete statement.' + \ }, + \ { + \ 'lnum': 90, + \ 'type': 'E', + \ 'text': 'Wrong number of arguments (1) to "if"' + \ }, + \ { + \ 'lnum': 93, + \ 'type': 'W', + \ 'text': 'Close brace not aligned with line 90 (4 0)' + \ }, + \ ], + \ ale_linters#tcl#nagelfar#Handle(bufnr(''), [ + \ 'Line 5: W Found constant "bepa" which is also a variable.', + \ 'Line 7: E Unknown variable "cep"', + \ 'Line 7: W Unknown command "se"', + \ 'Line 8: E Unknown variable "epa"', + \ 'Line 10: E Unknown variable "depa"', + \ 'Line 10: N Suspicious variable name "$depa"', + \ 'Line 11: N Suspicious variable name "$cepa"', + \ 'Line 13: E Wrong number of arguments (3) to "set"', + \ 'Line 13: W Found constant "bepa" which is also a variable.', + \ 'Line 13: W Found constant "cepa" which is also a variable.', + \ 'Line 18: E Badly formed if statement', + \ 'Line 24: E Unknown subcommand "gurka" to "info"', + \ 'Line 31: W Switch pattern starting with #. This could be a bad comment.', + \ 'Line 31: W Unknown command "This"', + \ 'Line 31: W Unknown command "bad"', + \ 'Line 34: W Unknown command "miffo"', + \ 'Line 55: N Suspicious variable name "$bepa"', + \ 'Line 56: N Suspicious variable name "$apa"', + \ 'Line 61: E Could not complete statement.', + \ 'Line 67: E Could not complete statement.', + \ 'Line 70: E Wrong number of arguments (4) to "proc"', + \ 'Line 72: E Wrong number of arguments (1) to "if"', + \ 'Line 75: E Unbalanced close brace found', + \ 'Line 82: E Unbalanced close brace found', + \ 'Line 88: E Could not complete statement.', + \ 'Line 90: E Wrong number of arguments (1) to "if"', + \ 'Line 93: N Close brace not aligned with line 90 (4 0)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_nasm_handler.vader b/dot_vim/plugged/ale/test/handler/test_nasm_handler.vader new file mode 100644 index 0000000..9c7d965 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_nasm_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/nasm/nasm.vim + +After: + call ale#linter#Reset() + +Execute(The nasm handler should parse GCC style output from nasm correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'text': "label alone on a line without a colon might be in error", + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'text': "invalid combination of opcode and operands", + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 7, + \ 'text': "unable to open include file `bar.asm'", + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#nasm#nasm#Handle(bufnr(''), [ + \ "tmp.asm:2: warning: label alone on a line without a colon might be in error", + \ "tmp.asm:4: error: invalid combination of opcode and operands", + \ "tmp.asm:7: fatal: unable to open include file `bar.asm'" + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_nim_handler.vader b/dot_vim/plugged/ale/test/handler/test_nim_handler.vader new file mode 100644 index 0000000..b6784d8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_nim_handler.vader @@ -0,0 +1,80 @@ +Before: + runtime ale_linters/nim/nimcheck.vim + +After: + call ale#linter#Reset() + +Execute(Parsing nim errors should work): + silent file foobar.nim + + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 8, + \ 'text': 'use {.base.} for base methods; baseless methods are deprecated', + \ 'code': 'UseBase', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 12, + \ 'col': 2, + \ 'text': 'identifier expected, but found ''a.barfoo''', + \ 'type': 'E', + \ 'end_col': 9, + \ }, + \ { + \ 'lnum': 2, + \ 'col': 5, + \ 'text': '''NotUsed'' is declared but not used', + \ 'code': 'XDeclaredButNotUsed', + \ 'type': 'W', + \ 'end_col': 11, + \ }, + \ { + \ 'lnum': 12, + \ 'col': 2, + \ 'text': 'with : character', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 8, + \ 'text': 'imported and not used: ''strutils''', + \ 'code': 'UnusedImport', + \ 'type': 'W', + \ 'end_col': 15, + \ }, + \ { + \ 'lnum': 12, + \ 'col': 9, + \ 'text': 'undeclared identifier: ''total''', + \ 'type': 'E', + \ 'end_col': 13, + \ }, + \ { + \ 'lnum': 14, + \ 'col': 1, + \ 'text': '''sum'' cannot be assigned to', + \ 'type': 'E', + \ 'end_col': 3, + \ }, + \ { + \ 'lnum': 15, + \ 'col': 1, + \ 'text': 'redefinition of ''getName''; previous declaration here: /nested/folder/foobar.nim(14, 6)', + \ 'type': 'E', + \ 'end_col': 7, + \ }, + \ ], + \ ale_linters#nim#nimcheck#Handle(bufnr(''), [ + \ 'Line with wrong( format)', + \ 'foobar.nim(8, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]', + \ 'foobar.nim(12, 2) Error: identifier expected, but found ''a.barfoo''', + \ '/nested/folder/foobar.nim(2, 5) Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]', + \ 'foobar.nim(12, 2) Error: with : character', + \ 'foobar.nim(1, 8) Warning: imported and not used: ''strutils'' [UnusedImport]', + \ 'foobar.nim(12, 9) Error: undeclared identifier: ''total''', + \ 'foobar.nim(14, 1) Error: ''sum'' cannot be assigned to', + \ 'foobar.nim(15, 1) Error: redefinition of ''getName''; previous declaration here: /nested/folder/foobar.nim(14, 6)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_nix_handler.vader b/dot_vim/plugged/ale/test/handler/test_nix_handler.vader new file mode 100644 index 0000000..ee02fef --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_nix_handler.vader @@ -0,0 +1,101 @@ +Before: + runtime ale_linters/nix/nix.vim + +After: + call ale#linter#Reset() + +Execute(The nix handler should parse nix-instantiate error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 3, + \ 'type': 'E', + \ 'text': "syntax error, unexpected ']', expecting ';'", + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'type': 'E', + \ 'text': "undefined variable 'foo'", + \ }, + \ + \ ], + \ ale_linters#nix#nix#Handle(bufnr(''), [ + \ "@nix {\"line\":6,\"column\":3,\"raw_msg\":\"syntax error, unexpected ']', expecting ';'\"}", + \ "@nix {\"line\":3,\"column\":5,\"raw_msg\":\"undefined variable 'foo'\"}", + \ "@nix {\"unrelated\":\"message\"}" + \ ]) + +Execute(The nix handler should parse message from old nix-instantiate correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 23, + \ 'col': 14, + \ 'text': 'error: syntax error, unexpected IN', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 12, + \ 'text': 'error: syntax error, unexpected ''='', expecting '';''', + \ 'type': 'E', + \ }, + \ + \ ], + \ ale_linters#nix#nix#Handle(47, [ + \ 'This line should be ignored', + \ 'error: syntax error, unexpected IN, at /path/to/filename.nix:23:14', + \ 'error: syntax error, unexpected ''='', expecting '';'', at /path/to/filename.nix:3:12', + \ ]) + +Execute(The nix command should not add 'log-format' option for nix version 2.3): + AssertEqual + \ 'nix-instantiate --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.3.0'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.4): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.4.1'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.5): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.5.0pre20211206_d1aaa7e'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.6): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.6.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.7): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.7.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.8): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.8.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.9): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.9.0pre20211206_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.10): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.10.0pre20221221_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 2.20): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.20.0pre20221221_ignored'], '') + +Execute(The nix command should add 'log-format' option for nix version 3.0): + AssertEqual + \ 'nix-instantiate --log-format internal-json --parse -', + \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 3.0.0pre20211206_ignored'], '') diff --git a/dot_vim/plugged/ale/test/handler/test_openscad_handler.vader b/dot_vim/plugged/ale/test/handler/test_openscad_handler.vader new file mode 100644 index 0000000..aaecc58 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_openscad_handler.vader @@ -0,0 +1,76 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + + " Load sca2d + runtime ale_linters/openscad/sca2d.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The openscad handler should handle sca2d output): + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/awesome_project.scad'), + \ 'lnum': 7, + \ 'type': 'E', + \ 'col': 42, + \ 'text': 'Module `corcle` used but never defined.', + \ 'detail': 'E2002: Module `corcle` used but never defined.', + \ }, + \ ], + \ ale#handlers#openscad#SCA2D_callback(bufnr(''), [ + \ 'awesome_project.scad:7:42: E2002: Module `corcle` used but never defined.', + \ '', + \ 'SCA2D message summary', + \ '=====================', + \ 'Fatal errors: 0', + \ 'Errors: 1', + \ 'Warnings: 0', + \ 'Info: 0', + \ 'Depreciated 0', + \ ]) + + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/awesome_project.scad'), + \ 'lnum': 1, + \ 'type': 'E', + \ 'col': 37, + \ 'text': 'Cannot read file due to syntax error: - No terminal matches ''}'' in the current parser context', + \ 'detail': 'F0001: Cannot read file due to syntax error: - No terminal matches ''}'' in the current parser context', + \ }, + \ ], + \ ale#handlers#openscad#SCA2D_callback(bufnr(''), [ + \ 'awesome_project.scad:1:1: F0001: Cannot read file due to syntax error:', + \ ' - No terminal matches ''}'' in the current parser context, at line 1 col 37', + \ ' - ', + \ ' - translate([ 0, 0, 0 ]) { circle(10) }', + \ ' - ^', + \ ' - Expected one of: ', + \ ' - * IF', + \ ' - * LET', + \ ' - * FOR', + \ ' - * FUNC_CALL_NAME', + \ ' - * TERMINATION', + \ ' - * STAR', + \ ' - * LBRACE', + \ ' - * BANG', + \ ' - * ASSIGN', + \ ' - * PERCENT', + \ ' - * HASH', + \ ' - * INTERSECTION_FOR', + \ ' - ', + \ 'If you believe this is a bug in SCA2D please report it to us.', + \ '', + \ '', + \ 'SCA2D message summary', + \ '=====================', + \ 'Fatal errors: 1', + \ 'Errors: 0', + \ 'Warnings: 0', + \ 'Info: 0', + \ 'Depreciated 0', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_perl6_handler.vader b/dot_vim/plugged/ale/test/handler/test_perl6_handler.vader new file mode 100644 index 0000000..452a917 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_perl6_handler.vader @@ -0,0 +1,277 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + + runtime ale_linters/perl6/perl6.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The Perl6 linter should handle empty output): + call ale#test#SetFilename('bar.pl6') + + AssertEqual [], ale_linters#perl6#perl6#Handle(bufnr(''), []) + +Execute(The Perl6 linter should complain about undeclared variables): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '6', + \ 'text': 'Variable ''$tes'' is not declared. Did you mean any of these? $res $test ', + \ 'type': 'E', + \ 'col': '', + \ 'end_lnum': '', + \ 'code': 'X::Undeclared', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{ + \ "X::Undeclared" : { + \ "highexpect" : [ ], + \ "is-compile-time" : 1, + \ "modules" : [ ], + \ "column" : null, + \ "pos" : 18, + \ "symbol" : "$tes", + \ "filename" : "bar.pl6", + \ "what" : "Variable", + \ "pre" : "my $test = 0; say ", + \ "post" : "$tes", + \ "suggestions" : [ + \ "$res", + \ "$test" + \ ], + \ "line" : 6, + \ "message" : "Variable ''$tes'' is not declared. Did you mean any of these?\n $res\n $test\n" + \ } + \ }' + \ ]) + +Execute(The Perl6 linter should complain about Comp::AdHoc errors): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '3', + \ 'type': 'E', + \ 'text': 'is repr(...) trait needs a parameter', + \ 'col': '', + \ 'end_lnum': '', + \ 'code': 'X::Comp::AdHoc', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{ + \ "X::Comp::AdHoc" : { + \ "pre" : "class test is repr", + \ "message" : "is repr(...) trait needs a parameter", + \ "line" : 3, + \ "post" : " {}", + \ "is-compile-time" : true, + \ "pos" : 19, + \ "highexpect" : [ ], + \ "payload" : "is repr(...) trait needs a parameter", + \ "filename" : "bar.pl6", + \ "column" : null, + \ "modules" : [ ] + \ } + \ }' + \]) + +Execute(The Perl6 linter should be able to extract a line number from an error message): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '3', + \ 'text': 'Could not find Module::Does::not::exist at line 3 in: /usr/share/perl6/site /usr/share/perl6/vendor /usr/share/perl6 CompUnit::Repository::AbsolutePath<94023691448416> CompUnit::Repository::NQP<94023670532736> CompUnit::Repository::Perl5<94023670532776>', + \ 'col': '', + \ 'type': 'E', + \ 'end_lnum': '', + \ 'code': 'X::CompUnit::UnsatisfiedDependency', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{ + \ "X::CompUnit::UnsatisfiedDependency" : { + \ "message" : "Could not find Module::Does::not::exist at line 3 in:\n /usr/share/perl6/site\n /usr/share/perl6/vendor\n /usr/share/perl6\n CompUnit::Repository::AbsolutePath<94023691448416>\n CompUnit::Repository::NQP<94023670532736>\n CompUnit::Repository::Perl5<94023670532776>", + \ "specification" : "Module::Does::not::exist" + \ } + \ }' + \ ]) + +Execute(The Perl6 linter should be able to differentiate between warnings and errors): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '1', + \ 'col': '', + \ 'code': 'X::Syntax::Regex::Unterminated', + \ 'end_lnum': '', + \ 'type': 'E', + \ 'text': 'Regex not terminated.', + \ }, + \ { + \ 'lnum': '1', + \ 'col': '', + \ 'code': 'X::Comp::AdHoc', + \ 'end_lnum': '', + \ 'type': 'W', + \ 'text': 'Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{ + \ "X::Comp::Group" : { + \ "message" : "Regex not terminated.\nUnable to parse regex; couldn''t find final ''/''\nSpace is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)", + \ "panic" : "Unable to parse regex; couldn''t find final ''/''", + \ "sorrows" : [ + \ { + \ "X::Syntax::Regex::Unterminated" : { + \ "highexpect" : [ + \ "infix stopper" + \ ], + \ "pos" : 6, + \ "is-compile-time" : 1, + \ "modules" : [ ], + \ "post" : "", + \ "message" : "Regex not terminated.", + \ "line" : 1, + \ "filename" : "bar.pl6", + \ "column" : null, + \ "pre" : "/win 3" + \ } + \ } + \ ], + \ "worries" : [ + \ { + \ "X::Comp::AdHoc" : { + \ "filename" : "bar.pl6", + \ "line" : 1, + \ "column" : null, + \ "pre" : "/win", + \ "highexpect" : [ ], + \ "payload" : "Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)", + \ "post" : " 3", + \ "message" : "Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)", + \ "modules" : [ ], + \ "is-compile-time" : true, + \ "pos" : 4 + \ } + \ } + \ ] + \ } + \ }' + \]) + +Execute(The Perl6 linter should gracefully handle non-JSON messages): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '1', + \ 'text': 'Received output in the default Perl6 error format. See :ALEDetail for details', + \ 'type': 'W', + \ 'detail': join([ + \ 'Potential difficulties:', + \ ' Redeclaration of symbol ''$_''', + \ ' at /home/travis/perl6-error-fail/insanity-test.pl6:1', + \ ' ------> sub foo($_) {.say}; my $_ = 1; .&foo;', + \ ' Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)', + \ ' at /home/travis/perl6-error-fail/insanity-test.pl6:4', + \ ' ------> /win 3/', + \ 'Syntax OK',], "\n") + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ 'Potential difficulties:', + \ ' Redeclaration of symbol ''$_''', + \ ' at /home/travis/perl6-error-fail/insanity-test.pl6:1', + \ ' ------> sub foo($_) {.say}; my $_ = 1; .&foo;', + \ ' Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)', + \ ' at /home/travis/perl6-error-fail/insanity-test.pl6:4', + \ ' ------> /win 3/', + \ 'Syntax OK' + \ ]) + +Execute(The Perl6 linter should gracefully handle messages without a line number): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '1', + \ 'end_lnum': '', + \ 'text': 'Cannot find method ''has_compile_time_value'' on object of type NQPMu', + \ 'type': 'E', + \ 'col' : '', + \ 'code': 'X::AdHoc', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{', + \ '"X::AdHoc" : {', + \ '"message" : "Cannot find method ''has_compile_time_value'' on object of type NQPMu",', + \ '"payload" : "Cannot find method ''has_compile_time_value'' on object of type NQPMu"', + \ '}', + \ '}', + \ ]) + +Execute(The Perl6 linter should not include errors from a known separate file): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{ + \ "X::Undeclared" : { + \ "highexpect" : [ ], + \ "is-compile-time" : 1, + \ "modules" : [ ], + \ "column" : null, + \ "pos" : 18, + \ "symbol" : "$tes", + \ "filename" : "foo.pl6", + \ "what" : "Variable", + \ "pre" : "my $test = 0; say ", + \ "post" : "$tes", + \ "suggestions" : [ + \ "$res", + \ "$test" + \ ], + \ "line" : 6, + \ "message" : "Variable ''$tes'' is not declared. Did you mean any of these?\n $res\n $test\n" + \ } + \ }' + \ ]) + +Execute(The Perl6 linter should not ignore errors without a filename): + call ale#test#SetFilename('bar.pl6') + + AssertEqual + \ [ + \ { + \ 'lnum': '3', + \ 'end_lnum': '', + \ 'text': 'Cannot find method ''has_compile_time_value'' on object of type NQPMu', + \ 'type': 'E', + \ 'col' : '', + \ 'code': 'X::AdHoc', + \ } + \ ], + \ ale_linters#perl6#perl6#Handle(bufnr(''), [ + \ '{', + \ '"X::AdHoc" : {', + \ '"line" : 3,', + \ '"message" : "Cannot find method ''has_compile_time_value'' on object of type NQPMu",', + \ '"payload" : "Cannot find method ''has_compile_time_value'' on object of type NQPMu"', + \ '}', + \ '}', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_perl_handler.vader b/dot_vim/plugged/ale/test/handler/test_perl_handler.vader new file mode 100644 index 0000000..060b1ff --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_perl_handler.vader @@ -0,0 +1,109 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + + runtime ale_linters/perl/perl.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The Perl linter should handle empty output): + call ale#test#SetFilename('bar.pl') + + AssertEqual [], ale_linters#perl#perl#Handle(bufnr(''), []) + +Execute(The Perl linter should ignore errors from other files): + call ale#test#SetFilename('bar.pl') + + AssertEqual + \ [ + \ {'lnum': '2', 'type': 'E', 'text': 'Compilation failed in require'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ 'syntax error at ' . ale#path#Simplify(g:dir . '/foo.pm') . ' line 4, near "aklsdfjmy "', + \ 'Compilation failed in require at ' . ale#path#Simplify(g:dir . '/bar.pl') . ' line 2.', + \ 'BEGIN failed--compilation aborted at ' . ale#path#Simplify(g:dir . '/bar.pl') . ' line 2.', + \ ]) + +Execute(The Perl linter should complain about failing to locate modules): + AssertEqual + \ [ + \ { + \ 'lnum': '23', + \ 'type': 'E', + \ 'text': 'Can''t locate JustOneDb.pm in @INC (you may need to install the JustOneDb module) (@INC contains: /home/local/sean/work/PostgreSQL/6616/../../../../lib /home/local/sean/work/PostgreSQL/6616/lib lib /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .)', + \ }, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ 'Can''t locate JustOneDb.pm in @INC (you may need to install the JustOneDb module) (@INC contains: /home/local/sean/work/PostgreSQL/6616/../../../../lib /home/local/sean/work/PostgreSQL/6616/lib lib /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at - line 23.', + \ 'BEGIN failed--compilation aborted at - line 23.', + \ ]) + + +Execute(The Perl linter should complain about failing to locate modules): + AssertEqual + \ [ + \ {'lnum': '8', 'type': 'E', 'text': 'BEGIN failed--compilation aborted'}, + \ {'lnum': '10', 'type': 'E', 'text': 'BEGIN failed--compilation aborted'} + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ 'Unable to build `ro` accessor for slot `path` in `App::CPANFileUpdate` because the slot cannot be found. at /extlib/Method/Traits.pm line 189.', + \ 'BEGIN failed--compilation aborted at - line 8.', + \ 'Unable to build `ro` accessor for slot `path` in `App::CPANFileUpdate` because the slot cannot be found. at /extlib/Method/Traits.pm line 189.', + \ 'BEGIN failed--compilation aborted at - line 10.', + \ ]) + +Execute(The Perl linter should not report warnings as errors): + AssertEqual + \ [ + \ {'lnum': '5', 'type': 'W', 'text': '"my" variable $foo masks earlier declaration in same scope'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ '"my" variable $foo masks earlier declaration in same scope at - line 5.', + \ 't.pl syntax OK', + \ ]) + +Execute(The Perl linter does not default to reporting generic error): + AssertEqual + \ [ + \ {'lnum': '8', 'type': 'E', 'text': 'Missing right curly or square bracket'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ 'Missing right curly or square bracket at - line 8, at end of line', + \ 'syntax error at - line 8, at EOF', + \ 'Execution of t.pl aborted due to compilation errors.', + \ ]) + +" The first "error" is actually a warning, but the current implementation +" doesn't have a good way of teasing out the warnings from amongst the +" errors. If we're able to do this in future, then we'll want to switch +" the first "E" to a "W". + +Execute(The Perl linter reports errors even when mixed with warnings): + AssertEqual + \ [ + \ {'lnum': '5', 'type': 'E', 'text': '"my" variable $foo masks earlier declaration in same scope'}, + \ {'lnum': '8', 'type': 'E', 'text': 'Missing right curly or square bracket'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ '"my" variable $foo masks earlier declaration in same scope at - line 5.', + \ 'Missing right curly or square bracket at - line 8, at end of line', + \ 'syntax error at - line 8, at EOF', + \ 'Execution of t.pl aborted due to compilation errors.', + \ ]) + +Execute(The Perl linter reports errors even when an additional file location is included): + AssertEqual + \ [ + \ {'lnum': '5', 'type': 'E', 'text': '"my" variable $foo masks earlier declaration in same scope'}, + \ {'lnum': '6', 'type': 'E', 'text': '"my" variable $foo masks earlier declaration in same scope'}, + \ {'lnum': '11', 'type': 'E', 'text': 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?)'}, + \ {'lnum': '12', 'type': 'E', 'text': 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?)'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ '"my" variable $foo masks earlier declaration in same scope at - line 5.', + \ '"my" variable $foo masks earlier declaration in same scope at - line 6, at line 1.', + \ 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at - line 11.', + \ 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at - line 12, line 1.', + \ 'Execution of t.pl aborted due to compilation errors.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_perlcritic_handler.vader b/dot_vim/plugged/ale/test/handler/test_perlcritic_handler.vader new file mode 100644 index 0000000..f00b07d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_perlcritic_handler.vader @@ -0,0 +1,20 @@ +Before: + runtime ale_linters/perl/perlcritic.vim + +After: + call ale#linter#Reset() + +Execute(The Perl::Critic handler should create all issues as warnings): + AssertEqual + \ [ + \ { + \ 'lnum': '21', + \ 'col': '17', + \ 'text': 'Regular expression without "/m" flag', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#perl#perlcritic#Handle(99, [ + \ '21:17 Regular expression without "/m" flag' + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_php_handler.vader b/dot_vim/plugged/ale/test/handler/test_php_handler.vader new file mode 100644 index 0000000..6fe9b32 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_php_handler.vader @@ -0,0 +1,93 @@ +Before: + runtime ale_linters/php/php.vim + +After: + call ale#linter#Reset() + +Given (Some invalid lines of PHP): + [foo;] + class Foo { / } + $foo) + ['foo' 'bar'] + function count() {} + +Execute(The php handler should calculate column numbers): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 5, + \ 'end_col': 5, + \ 'text': "syntax error, unexpected ';', expecting ']'", + \ }, + \ { + \ 'lnum': 2, + \ 'col': 13, + \ 'end_col': 13, + \ 'text': "syntax error, unexpected '/', expecting function (T_FUNCTION) or const (T_CONST)", + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'end_col': 5, + \ 'text': "syntax error, unexpected ')'", + \ }, + \ { + \ 'lnum': 4, + \ 'col': 8, + \ 'end_col': 12, + \ 'text': "syntax error, unexpected ''bar'' (T_CONSTANT_ENCAPSED_STRING), expecting ']'", + \ }, + \ ], + \ ale_linters#php#php#Handle(347, [ + \ "This line should be ignored completely", + \ "Parse error: syntax error, unexpected ';', expecting ']' in - on line 1", + \ "Parse error: syntax error, unexpected '/', expecting function (T_FUNCTION) or const (T_CONST) in - on line 2", + \ "Parse error: syntax error, unexpected ')' in - on line 3", + \ "Parse error: syntax error, unexpected ''bar'' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in - on line 4", + \ ]) + +Execute (The php handler should ignore lines starting with 'PHP Parse error'): + AssertEqual + \ [], + \ ale_linters#php#php#Handle(347, [ + \ "PHP Parse error: syntax error, This line should be ignored completely in - on line 1", + \ ]) + +Execute (The php handler should handle lines containing 'Standard input code'): + AssertEqual + \ [ + \ { + \ 'lnum': 47, + \ 'col': 0, + \ 'text': "Invalid numeric literal", + \ }, + \ ], + \ ale_linters#php#php#Handle(347, [ + \ "Parse error: Invalid numeric literal in Standard input code on line 47", + \ ]) +Execute (The php handler should parse lines without column indication): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 0, + \ 'text': "Cannot redeclare count()", + \ }, + \ { + \ 'lnum': 21, + \ 'col': 0, + \ 'text': "syntax error, unexpected end of file", + \ }, + \ { + \ 'lnum': 47, + \ 'col': 0, + \ 'text': "Invalid numeric literal", + \ }, + \ ], + \ ale_linters#php#php#Handle(347, [ + \ "This line should be ignored completely", + \ "Fatal error: Cannot redeclare count() in - on line 5", + \ "Parse error: syntax error, unexpected end of file in - on line 21", + \ "Parse error: Invalid numeric literal in - on line 47", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_php_phan_handler.vader b/dot_vim/plugged/ale/test/handler/test_php_phan_handler.vader new file mode 100644 index 0000000..bbdae5d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_php_phan_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime ale_linters/php/phan.vim + +After: + call ale#linter#Reset() + +Execute(The php static analyzer handler should parse errors from phan): + AssertEqual + \ [ + \ { + \ 'lnum': 25, + \ 'type': 'W', + \ 'text': 'Return type of getValidator is undeclared type \Respect\Validation\Validator', + \ 'filename': 'example.php', + \ }, + \ { + \ 'lnum': 66, + \ 'type': 'W', + \ 'text': 'Call to method string from undeclared class \Respect\Validation\Validator', + \ 'filename': 'example.php', + \ }, + \ ], + \ ale_linters#php#phan#Handle(347, [ + \ "example.php:25 PhanUndeclaredTypeReturnType Return type of getValidator is undeclared type \\Respect\\Validation\\Validator", + \ "example.php:66 PhanUndeclaredClassMethod Call to method string from undeclared class \\Respect\\Validation\\Validator", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_php_phpmd_handler.vader b/dot_vim/plugged/ale/test/handler/test_php_phpmd_handler.vader new file mode 100644 index 0000000..f161d73 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_php_phpmd_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/php/phpmd.vim + +After: + call ale#linter#Reset() + +Execute(The php static analyzer handler should parse errors from phpmd): + AssertEqual + \ [ + \ { + \ 'lnum': 22, + \ 'type': 'W', + \ 'text': "Avoid unused local variables such as '$response'.", + \ }, + \ { + \ 'lnum': 14, + \ 'type': 'W', + \ 'text': "The method test uses an else expression. Else is never necessary and you can simplify the code to work without else.", + \ }, + \ ], + \ ale_linters#php#phpmd#Handle(347, [ + \ "example.php:22 Avoid unused local variables such as '$response'.", + \ "example.php:14 The method test uses an else expression. Else is never necessary and you can simplify the code to work without else.", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_phpcs_handler.vader b/dot_vim/plugged/ale/test/handler/test_phpcs_handler.vader new file mode 100644 index 0000000..26d35cb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_phpcs_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/php/phpcs.vim + +After: + call ale#linter#Reset() + +Execute(phpcs errors should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 18, + \ 'col': 3, + \ 'type': 'E', + \ 'sub_type': 'style', + \ 'text': 'Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)', + \ }, + \ { + \ 'lnum': 22, + \ 'col': 3, + \ 'type': 'E', + \ 'sub_type': 'style', + \ 'text': 'All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks)', + \ }, + \ ], + \ ale_linters#php#phpcs#Handle(bufnr(''), [ + \ '/path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)', + \ "/path/to/some-filename.php:22:3: error - All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '\"\n'.", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_phpstan_handler.vader b/dot_vim/plugged/ale/test/handler/test_phpstan_handler.vader new file mode 100644 index 0000000..58cb574 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_phpstan_handler.vader @@ -0,0 +1,51 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + + runtime ale_linters/php/phpstan.vim + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Output without errors should be parsed correctly): + call ale#test#SetFilename('phpstan-test-files/foo/test.php') + + AssertEqual + \ [], + \ ale_linters#php#phpstan#Handle(bufnr(''), [ + \ '{"totals":{"errors":0,"file_errors":0},"files":[],"errors":[]}', + \ ]) + +Execute(Output with some errors should be parsed correctly): + call ale#test#SetFilename('phpstan-test-files/foo/test.php') + + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'text': 'Call to method format() on an unknown class DateTimeImutable.', + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 16, + \ 'text': 'Sample message.', + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 192, + \ 'text': 'Invalid command testCommand.', + \ 'type': 'E' + \ } + \ ], + \ ale_linters#php#phpstan#Handle(bufnr(''), [json_encode( + \ { + \ "totals":{"errors": 0, "file_errors": 11}, + \ "files":{expand('%:p'): {"errors": 3, "messages": [ + \ {"message": "Call to method format() on an unknown class DateTimeImutable.", "line":9}, + \ {"message": "Sample message.", "line":16}, + \ {"message": "Invalid command testCommand.", "line": 192} + \ ]}} + \ }, + \)]) diff --git a/dot_vim/plugged/ale/test/handler/test_pmd_handler.vader b/dot_vim/plugged/ale/test/handler/test_pmd_handler.vader new file mode 100644 index 0000000..4f64c9c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pmd_handler.vader @@ -0,0 +1,42 @@ +Before: + runtime ale_linters/java/pmd.vim + +After: + call ale#linter#Reset() + +Execute(The pmd handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 18, + \ 'text': 'Each class should declare at least one constructor', + \ 'code': 'Code Style - AtLeastOneConstructor', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 36, + \ 'text': 'Local variable ''node'' could be declared final', + \ 'code': 'Code Style - LocalVariableCouldBeFinal', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#java#pmd#Handle(666, [ + \ '"Problem","Package","File","Priority","Line","Description","Rule set","Rule"', + \ '"1","rsb.performance.test.ros","/home/languitar/src/rsb-performance-test-api-ros/src/main/java/rsb/performance/test/ros/NodeHolder.java","3","18","Each class should declare at least one constructor","Code Style","AtLeastOneConstructor"', + \ '"2","rsb.performance.test.ros","/home/languitar/src/rsb-performance-test-api-ros/src/main/java/rsb/performance/test/ros/NodeHolder.java","1","36","Local variable ''node'' could be declared final","Code Style","LocalVariableCouldBeFinal"' + \ ]) + +Execute(The pmd handler should parse lines correctly for java files that use unnamed packages): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'text': 'Avoid unused local variables such as ''stest''.', + \ 'code': 'Best Practices - UnusedLocalVariable', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#java#pmd#Handle(666, [ + \ '"Problem","Package","File","Priority","Line","Description","Rule set","Rule"', + \ '"1","","/Users/diego/Projects/github.com/dlresende/kata-fizz-buzz/src/main/java/App.java","3","8","Avoid unused local variables such as ''stest''.","Best Practices","UnusedLocalVariable"' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pony_handler.vader b/dot_vim/plugged/ale/test/handler/test_pony_handler.vader new file mode 100644 index 0000000..25a8254 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pony_handler.vader @@ -0,0 +1,21 @@ +Execute(The pony handler should handle ponyc output): + call ale#test#SetFilename('foo.pony') + + AssertEqual + \ [ + \ { + \ 'filename': '/home/projects/Wombat.pony', + \ 'lnum': 22, + \ 'type': 'E', + \ 'col': 30, + \ 'text': 'can''t lookup private fields from outside the type', + \ }, + \ ], + \ ale#handlers#pony#HandlePonycFormat(bufnr(''), [ + \ 'Building builtin -> /usr/lib/pony/0.21.3/packages/builtin', + \ 'Building . -> /home/projects', + \ 'Error:', + \ '/home/projects/Wombat.pony:22:30: can''t lookup private fields from outside the type', + \ ' env.out.print(defaultWombat._hunger_level)', + \ ' ^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_powershell_handler.vader b/dot_vim/plugged/ale/test/handler/test_powershell_handler.vader new file mode 100644 index 0000000..77c3dc6 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_powershell_handler.vader @@ -0,0 +1,109 @@ +Before: + runtime ale_linters/powershell/powershell.vim + +After: + call ale#linter#Reset() + +Execute(The powershell handler should process syntax errors from parsing a powershell script): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 29, + \ 'type': 'E', + \ 'text': 'Missing closing ''}'' in statement block or type definition.', + \ 'code': 'ParseException', + \ }, + \ ], + \ ale_linters#powershell#powershell#Handle(bufnr(''), [ + \ "At line:8 char:29", + \ "+ Invoke-Command -ScriptBlock {", + \ "+ ~", + \ "Missing closing '}' in statement block or type definition.", + \ "At /home/harrisj/tester.ps1:5 char:5", + \ "+ [void]$ExecutionContext.InvokeCommand.NewScriptBlock($Contents);", + \ "+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", + \ "+ CategoryInfo : NotSpecified: (:) [], ParseException", + \ "+ FullyQualifiedErrorId : ParseException" + \ ]) + +Execute(The powershell handler should process multiple syntax errors from parsing a powershell script): + AssertEqual + \ [ + \ { + \ 'lnum': 11, + \ 'col': 31, + \ 'type': 'E', + \ 'text': 'The string is missing the terminator: ".', + \ 'code': 'ParseException' + \ }, + \ { + \ 'lnum': 3, + \ 'col': 16, + \ 'type': 'E', + \ 'text': 'Missing closing ''}'' in statement block or type definition.', + \ 'code': 'ParseException' + \ }, + \ ], + \ ale_linters#powershell#powershell#Handle(bufnr(''), [ + \ 'At line:11 char:31', + \ '+ write-verbose ''deleted''', + \ '+ ~', + \ 'The string is missing the terminator: ".', + \ 'At line:3 char:16', + \ '+ invoke-command {', + \ '+ ~', + \ 'Missing closing ''}'' in statement block or type definition.', + \ 'At /var/folders/qv/15ybvt050v9cgwrm7c95x4r4zc4qsg/T/vwhzIc8/1/script.ps1:1 char:150', + \ '+ ... ontents); [void]$ExecutionContext.InvokeCommand.NewScriptBlock($Con ...', + \ '+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~', + \ '+ CategoryInfo : NotSpecified: (:) [], ParseException', + \ '+ FullyQualifiedErrorId : ParseException' + \ ]) +Execute(The powershell handler should process unexecpected token that contains a newline character): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 8, + \ 'type': 'E', + \ 'text': 'The string is missing the terminator: ".', + \ 'code': 'ParseException' + \ }, + \ { + \ 'lnum': 2, + \ 'col': 8, + \ 'type': 'E', + \ 'text': 'Unexpected token ''"', + \ 'code': 'ParseException' + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Missing closing ''}'' in statement block or type definition.', + \ 'code': 'ParseException' + \ } + \ ], + \ ale_linters#powershell#powershell#Handle(bufnr(''), [ + \ 'At line:2 char:8', + \ '+ "" "', + \ '+ ~', + \ 'The string is missing the terminator: ".', + \ 'At line:2 char:8', + \ '+ "" "', + \ '+ ~', + \ 'Unexpected token ''"', + \ '', + \ ' }'' in expression or statement.', + \ '', + \ 'At line:1 char:1', + \ '+ {', + \ '+ ~', + \ 'Missing closing ''}'' in statement block or type definition.', + \ 'At C:\Users\jpharris\AppData\Local\Temp\VIAA777.tmp\script.ps1:1 char:150', + \ '+ ... ontents); [void]$ExecutionContext.InvokeCommand.NewScriptBlock($Con ...', + \ '+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~', + \ ' + CategoryInfo : NotSpecified: (:) [], ParseException', + \ ' + FullyQualifiedErrorId : ParseException' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_prospector_handler.vader b/dot_vim/plugged/ale/test/handler/test_prospector_handler.vader new file mode 100644 index 0000000..935c37d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_prospector_handler.vader @@ -0,0 +1,163 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/prospector.vim + +After: + Restore + + call ale#linter#Reset() + + silent file something_else.py + +Execute(Basic prospector errors should be handle): + AssertEqual + \ [ + \ { + \ 'lnum': 20, + \ 'col': 1, + \ 'text': 'Trailing whitespace', + \ 'code': '(pylint) trailing-whitespace', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing module docstring', + \ 'code': '(pylint) missing-docstring', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Missing function docstring', + \ 'code': '(pylint) missing-docstring', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'text': '''break'' not properly in loop', + \ 'code': '(pylint) not-in-loop', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'Unreachable code', + \ 'code': '(pylint) unreachable', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 33, + \ 'text': 'No exception type(s) specified', + \ 'code': '(pylint) bare-except', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#python#prospector#Handle(bufnr(''), [ + \ '{', + \ ' "messages": [', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "trailing-whitespace",', + \ ' "message": "Trailing whitespace",', + \ ' "location": {', + \ ' "character": 0,', + \ ' "line": 20', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "missing-docstring",', + \ ' "message": "Missing module docstring",', + \ ' "location": {', + \ ' "character": 0,', + \ ' "line": 1', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "missing-docstring",', + \ ' "message": "Missing function docstring",', + \ ' "location": {', + \ ' "character": 0,', + \ ' "line": 2', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "not-in-loop",', + \ ' "message": "''break'' not properly in loop",', + \ ' "location": {', + \ ' "character": 4,', + \ ' "line": 3', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "unreachable",', + \ ' "message": "Unreachable code",', + \ ' "location": {', + \ ' "character": 4,', + \ ' "line": 4', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "bare-except",', + \ ' "message": "No exception type(s) specified",', + \ ' "location": {', + \ ' "character": 32,', + \ ' "line": 7', + \ ' }', + \ ' }', + \ ' ]', + \ '}', + \ ]) + +Execute(Ignoring trailing whitespace messages should work): + let g:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing module docstring', + \ 'code': '(pylint) missing-docstring', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#python#prospector#Handle(bufnr(''), [ + \ '{', + \ ' "messages": [', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "trailing-whitespace",', + \ ' "message": "Trailing whitespace",', + \ ' "location": {', + \ ' "character": 0,', + \ ' "line": 4', + \ ' }', + \ ' },', + \ ' {', + \ ' "source": "pylint",', + \ ' "code": "missing-docstring",', + \ ' "message": "Missing module docstring",', + \ ' "location": {', + \ ' "character": 0,', + \ ' "line": 1', + \ ' }', + \ ' }', + \ ' ]', + \ '}', + \ ]) + +Execute(The prospector handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#python#prospector#Handle(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_psscriptanalyzer_handler.vader b/dot_vim/plugged/ale/test/handler/test_psscriptanalyzer_handler.vader new file mode 100644 index 0000000..060d594 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_psscriptanalyzer_handler.vader @@ -0,0 +1,42 @@ +Before: + runtime ale_linters/powershell/psscriptanalyzer.vim + +After: + call ale#linter#Reset() + +Execute(The psscriptanalyzer handler should handle basic information or warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'type': 'I', + \ 'text': 'The cmdlet ''Get-GithubRepo'' does not have a help comment.', + \ 'code': 'PSProvideCommentHelp', + \ }, + \ { + \ 'lnum': 9, + \ 'type': 'W', + \ 'text': '''%'' is an alias of ''ForEach-Object''. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.', + \ 'code': 'PSAvoidUsingCmdletAliases', + \ }, + \ { + \ 'lnum': 23, + \ 'type': 'E', + \ 'text': 'The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.', + \ 'code': 'PSAvoidUsingComputerNameHardcoded', + \ }, + \ ], + \ ale_linters#powershell#psscriptanalyzer#Handle(bufnr(''), [ + \ '1', + \ 'Information', + \ 'The cmdlet ''Get-GithubRepo'' does not have a help comment.', + \ 'PSProvideCommentHelp', + \ '9', + \ 'Warning', + \ '''%'' is an alias of ''ForEach-Object''. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.', + \ 'PSAvoidUsingCmdletAliases', + \ '23', + \ 'Error', + \ 'The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.', + \ 'PSAvoidUsingComputerNameHardcoded', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_puglint_handler.vader b/dot_vim/plugged/ale/test/handler/test_puglint_handler.vader new file mode 100644 index 0000000..f37518b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_puglint_handler.vader @@ -0,0 +1,45 @@ +Before: + runtime ale_linters/pug/puglint.vim + +After: + call ale#linter#Reset() + +Execute(Regular errors should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'Static attribute "class" must be written as class literal', + \ }, + \ ], + \ ale_linters#pug#puglint#Handle(0, [ + \ '/tmp/vwYwsJA/233/test.pug:1:5 Static attribute "class" must be written as class literal', + \ ]) + +Execute(syntax errors in the configuration file should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'puglint configuration error (type :ALEDetail for more information)', + \ 'detail': join( + \ [ + \ 'undefined:2', + \ ' disallowClassAttributeWithStaticValue: true', + \ ' ^', + \ 'SyntaxError: Unexpected token d in JSON at position 4', + \ ' at JSON.parse ()', + \ ], + \ "\n" + \ ), + \ }, + \ ], + \ ale_linters#pug#puglint#Handle(0, [ + \ 'undefined:2', + \ ' disallowClassAttributeWithStaticValue: true', + \ ' ^', + \ 'SyntaxError: Unexpected token d in JSON at position 4', + \ ' at JSON.parse ()', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_puppet_handler.vader b/dot_vim/plugged/ale/test/handler/test_puppet_handler.vader new file mode 100644 index 0000000..03adc9f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_puppet_handler.vader @@ -0,0 +1,77 @@ +Before: + runtime ale_linters/puppet/puppet.vim + +After: + call ale#linter#Reset() + +Execute(The puppet handler should parse lines correctly when no column is supplied): + " Line Error + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 0, + \ 'text': "Syntax error at '='; expected '}'" + \ }, + \ { + \ 'lnum': 3, + \ 'col': 0, + \ 'text': "Syntax error at '='; expected '}'" + \ }, + \ ], + \ ale_linters#puppet#puppet#Handle(255, [ + \ "Error: Could not parse for environment production: Syntax error at '='; expected '}' at /root/puppetcode/modules/pancakes/manifests/init.pp:5", + \ "Error: Could not parse for environment production: Syntax error at '='; expected '}' at C:/puppet/modules/pancakes/manifests/init.pp:3", + \ ]) + +Execute(The puppet handler should parse lines and column correctly): + " Line Error + AssertEqual + \ [ + \ { + \ 'lnum': 43, + \ 'col': 12, + \ 'text': "Syntax error at ':'" + \ }, + \ { + \ 'lnum': 54, + \ 'col': 9, + \ 'text': "Syntax error at ':'" + \ }, + \ { + \ 'lnum': 45, + \ 'col': 12, + \ 'text': "Syntax error at 'parameter1'" + \ }, + \ ], + \ ale_linters#puppet#puppet#Handle(255, [ + \ "Error: Could not parse for environment production: Syntax error at ':' at /root/puppetcode/modules/nginx/manifests/init.pp:43:12", + \ "Error: Could not parse for environment production: Syntax error at ':' at C:/puppet/modules/nginx/manifests/init.pp:54:9", + \ "Error: Could not parse for environment production: Syntax error at 'parameter1' (file: /tmp/modules/mariadb/manifests/slave.pp, line: 45, column: 12)", + \ ]) + +Execute(The puppet handler should correctly parse errors that are reported before even trying to parse for an environment): + " Line Error + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 11, + \ 'text': "Illegal attempt to assign to 'a Name'. Not an assignable reference" + \ }, + \ ], + \ ale_linters#puppet#puppet#Handle(255, [ + \ "Error: Illegal attempt to assign to 'a Name'. Not an assignable reference (file: /tmp/modules/waffles/manifests/syrup.pp, line: 5, column: 11)", + \ ]) +Execute(The puppet handler should parse lines when end of input is the location): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'text': "Syntax error at end of input" + \ }, + \ ], + \ ale_linters#puppet#puppet#Handle(255, [ + \ "Error: Could not parse for environment production: Syntax error at end of input (file: /tmp//modules/test/manifests/init.pp)", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pycodestyle_handler.vader b/dot_vim/plugged/ale/test/handler/test_pycodestyle_handler.vader new file mode 100644 index 0000000..3664455 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pycodestyle_handler.vader @@ -0,0 +1,154 @@ +Before: + Save g:ale_warn_about_trailing_blank_lines + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_blank_lines = 1 + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/pycodestyle.vim + +After: + Restore + + unlet! b:ale_warn_about_trailing_blank_lines + unlet! b:ale_warn_about_trailing_whitespace + + call ale#linter#Reset() + silent file something_else.py + +Execute(The pycodestyle handler should parse output): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 3, + \ 'type': 'E', + \ 'text': 'SyntaxError: invalid syntax', + \ 'code': 'E999', + \ }, + \ { + \ 'lnum': 69, + \ 'col': 11, + \ 'text': 'multiple imports on one line', + \ 'code': 'E401', + \ 'type': 'E', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 77, + \ 'col': 1, + \ 'text': 'expected 2 blank lines, found 1', + \ 'code': 'E302', + \ 'type': 'E', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 88, + \ 'col': 5, + \ 'text': 'expected 1 blank line, found 0', + \ 'code': 'E301', + \ 'type': 'E', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 222, + \ 'col': 34, + \ 'text': 'deprecated form of raising exception', + \ 'code': 'W602', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ { + \ 'lnum': 544, + \ 'col': 21, + \ 'text': '.has_key() is deprecated, use ''in''', + \ 'code': 'W601', + \ 'type': 'W', + \ 'sub_type': 'style', + \ }, + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'stdin:8:3: E999 SyntaxError: invalid syntax', + \ 'stdin:69:11: E401 multiple imports on one line', + \ 'stdin:77:1: E302 expected 2 blank lines, found 1', + \ 'stdin:88:5: E301 expected 1 blank line, found 0', + \ 'stdin:222:34: W602 deprecated form of raising exception', + \ 'example.py:544:21: W601 .has_key() is deprecated, use ''in''', + \ ]) + +Execute(Warnings about trailing whitespace should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'W291', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'W293', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'who cares', + \ }, + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Disabling trailing whitespace warnings should work): + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: W291 who cares', + \ 'foo.py:6:1: W293 who cares', + \ ]) + +Execute(Warnings about trailing blank lines should be reported by default): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'W391', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'blank line at end of file', + \ }, + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(Disabling trailing blank line warnings should work): + let b:ale_warn_about_trailing_blank_lines = 0 + + AssertEqual + \ [ + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: W391 blank line at end of file', + \ ]) + +Execute(E112 should be a syntax error): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'E112', + \ 'type': 'E', + \ 'text': 'expected an indented block', + \ }, + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: E112 expected an indented block', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pydocstyle_handler.vader b/dot_vim/plugged/ale/test/handler/test_pydocstyle_handler.vader new file mode 100644 index 0000000..cfb7530 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pydocstyle_handler.vader @@ -0,0 +1,116 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/pydocstyle.vim + +After: + Restore + + call ale#linter#Reset() + + silent file something_else.py + +" File sample.py +" # sample.py file +" +" def main(): +" """ +" This is a multi-line description that should produce multiple errors to be +" tested by the handler +" """ +" return Fales +" +" +" if __name__ == '__main__': +" main() +" +" The command to generate the handler input is: +" +" $ python -m pydocstyle --verbose --source --explain sample.py +" [...] +" $ + +Execute(Basic pydocstyle warnings should be handled): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing docstring in public module', + \ 'code': 'D100', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'text': '1 blank line required between summary line and description (found 0)', + \ 'code': 'D205', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'text': 'First line should end with a period (not ''e'')', + \ 'code': 'D400', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'text': 'First line should be in imperative mood; try rephrasing (found ''This'')', + \ 'code': 'D401', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#python#pydocstyle#Handle(bufnr(''), [ + \ 'Checking file ' . fnamemodify(bufname(bufnr('')), ':p') . '.', + \ './mydir/myfile.py:1 at module level:', + \ ' D100: Missing docstring in public module', + \ '', + \ ' All modules should normally have docstrings. [...] all functions and', + \ ' classes exported by a module should also have docstrings. Public', + \ ' methods (including the __init__ constructor) should also have', + \ ' docstrings.', + \ ' Note: Public (exported) definitions are either those with names listed', + \ ' in __all__ variable (if present), or those that do not start', + \ ' with a single underscore.', + \ '', + \ ' 1: # 2: 3: s 4: a 5: m 6: p 7: l ...', + \ '', + \ '', + \ 'C:\mydir\myfile.py:4 in public function `main`:', + \ ' D205: 1 blank line required between summary line and description (found 0)', + \ '', + \ ' Multi-line docstrings consist of a summary line just like a one-line', + \ ' docstring, followed by a blank line, followed by a more elaborate', + \ ' description. The summary line may be used by automatic indexing tools;', + \ ' it is important that it fits on one line and is separated from the', + \ ' rest of the docstring by a blank line.', + \ '', + \ ' 3: d 4: e 5: f 6: 7: m 8: a 9: i ...', + \ '', + \ '', + \ 'myfile.py:4 in public function `main`:', + \ ' D400: First line should end with a period (not ''e'')', + \ '', + \ ' The [first line of a] docstring is a phrase ending in a period.', + \ '', + \ ' 3: d 4: e 5: f 6: 7: m 8: a 9: i ...', + \ '', + \ '', + \ ale#Escape(fnamemodify(bufname(bufnr('')), ':t')) . ':4 in public function `main`:', + \ ' D401: First line should be in imperative mood; try rephrasing (found ''This'')', + \ '', + \ ' [Docstring] prescribes the function or method''s effect as a command:', + \ ' ("Do this", "Return that"), not as a description; e.g. don''t write', + \ ' "Returns the pathname ...".', + \ '', + \ ' 3: d 4: e 5: f 6: 7: m 8: a 9: i ...', + \ ]) + +Execute(Handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#python#pydocstyle#Handle(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_pyflakes_handler.vader b/dot_vim/plugged/ale/test/handler/test_pyflakes_handler.vader new file mode 100644 index 0000000..ab4fab4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pyflakes_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/python/pyflakes.vim + +After: + call ale#linter#Reset() + +Execute(The pyflakes handler should handle basic errors): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 0, + \ 'text': 'undefined name ''foo''', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 7, + \ 'text': 'invalid syntax', + \ }, + \ ], + \ ale_linters#python#pyflakes#Handle(bufnr(''), [ + \ 'test.py:1: undefined name ''foo''', + \ 'test.py:1:7: invalid syntax', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pylama_handler.vader b/dot_vim/plugged/ale/test/handler/test_pylama_handler.vader new file mode 100644 index 0000000..3d1151b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pylama_handler.vader @@ -0,0 +1,268 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/pylama.vim + +After: + Restore + + call ale#linter#Reset() + + silent file something_else.py + +Execute(The pylama handler should handle no messages with version older than 8.1.4): + AssertEqual [], ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], []) + +Execute(The pylama handler should handle no messages with version newer or equal than 8.1.4): + AssertEqual [], ale_linters#python#pylama#Handle(bufnr(''), [8, 2, 0], []) + +Execute(The pylama handler should handle basic warnings and syntax errors with version older than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 1, + \ 'code': 'W0611', + \ 'type': 'W', + \ 'sub_type': '', + \ 'text': '''foo'' imported but unused [pyflakes]', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 0, + \ 'code': 'E0401', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'Unable to import ''foo'' [pylint]', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 1, + \ 'code': 'E302', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'expected 2 blank lines, found 1 [pycodestyle]', + \ }, + \ { + \ 'lnum': 11, + \ 'col': 1, + \ 'code': 'D401', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'First line should be in imperative mood (''Get'', not ''Gets'') [pydocstyle]', + \ }, + \ { + \ 'lnum': 15, + \ 'col': 81, + \ 'code': 'E501', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'line too long (96 > 80 characters) [pycodestyle]', + \ }, + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'code': 'D203', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': '1 blank line required before class docstring (found 0) [pydocstyle]', + \ }, + \ { + \ 'lnum': 18, + \ 'col': 1, + \ 'code': 'D107', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Missing docstring in __init__ [pydocstyle]', + \ }, + \ { + \ 'lnum': 20, + \ 'col': 0, + \ 'code': 'C4001', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Invalid string quote ", should be '' [pylint]', + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ + \ 'No config file found, using default configuration', + \ 'index.py:8:1: W0611 ''foo'' imported but unused [pyflakes]', + \ 'index.py:8:0: E0401 Unable to import ''foo'' [pylint]', + \ 'index.py:10:1: E302 expected 2 blank lines, found 1 [pycodestyle]', + \ 'index.py:11:1: D401 First line should be in imperative mood (''Get'', not ''Gets'') [pydocstyle]', + \ 'index.py:15:81: E501 line too long (96 > 80 characters) [pycodestyle]', + \ 'index.py:16:1: D203 1 blank line required before class docstring (found 0) [pydocstyle]', + \ 'index.py:18:1: D107 Missing docstring in __init__ [pydocstyle]', + \ 'index.py:20:0: C4001 Invalid string quote ", should be '' [pylint]', + \ ]) + +Execute(The pylama handler should handle basic warnings and syntax errors with version newer than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 8, + \ 'col': 1, + \ 'code': 'W0611', + \ 'type': 'W', + \ 'sub_type': '', + \ 'text': '''foo'' imported but unused [pyflakes]', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 0, + \ 'code': 'E0401', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'Unable to import ''foo'' [pylint]', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 1, + \ 'code': 'E302', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'expected 2 blank lines, found 1 [pycodestyle]', + \ }, + \ { + \ 'lnum': 11, + \ 'col': 1, + \ 'code': 'D401', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'First line should be in imperative mood (''Get'', not ''Gets'') [pydocstyle]', + \ }, + \ { + \ 'lnum': 15, + \ 'col': 81, + \ 'code': 'E501', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'line too long (96 > 80 characters) [pycodestyle]', + \ }, + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'code': 'D203', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': '1 blank line required before class docstring (found 0) [pydocstyle]', + \ }, + \ { + \ 'lnum': 18, + \ 'col': 1, + \ 'code': 'D107', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Missing docstring in __init__ [pydocstyle]', + \ }, + \ { + \ 'lnum': 20, + \ 'col': 0, + \ 'code': 'C4001', + \ 'type': 'W', + \ 'sub_type': 'style', + \ 'text': 'Invalid string quote ", should be '' [pylint]', + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 2, 0], [ + \ '[{"source":"pyflakes","col":1,"lnum":8,"etype":"W","message":"''foo'' imported but unused","filename":"index.py","number":"W0611"},{"source":"pylint","col":0,"lnum":8,"etype":"E","message":"Unable to import ''foo''","filename":"index.py","number":"E0401"},{"source":"pycodestyle","col":1,"lnum":10,"etype":"E","message":"expected 2 blank lines, found 1","filename":"index.py","number":"E302"},{"source":"pydocstyle","col":1,"lnum":11,"etype":"D","message":"First line should be in imperative mood (''Get'', not ''Gets'')","filename":"index.py","number":"D401"},{"source":"pycodestyle","col":81,"lnum":15,"etype":"E","message":"line too long (96 > 80 characters)","filename":"index.py","number":"E501"},{"source":"pydocstyle","col":1,"lnum":16,"etype":"D","message":"1 blank line required before class docstring (found 0)","filename":"index.py","number":"D203"},{"source":"pydocstyle","col":1,"lnum":18,"etype":"D","message":"Missing docstring in __init__","filename":"index.py","number":"D107"},{"source":"pylint","col":0,"lnum":20,"etype":"C","message":"Invalid string quote \", should be ''","filename":"index.py","number":"C4001"}]', + \ ]) + +Execute(The pylama handler should handle tracebacks with parsable messages with version older than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'ParseError: Cannot parse file. (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/lib/python2.7/site-packages/pylama/core.py", line 66, in run', + \ ' path, code=code, ignore=ignore, select=select, params=lparams)', + \ ' File "/usr/local/lib/python2.7/site-packages/pylama/lint/pylama_pydocstyle.py", line 37, in run', + \ ' } for e in PyDocChecker().check_source(*check_source_args)]', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/checker.py", line 64, in check_source', + \ ' module = parse(StringIO(source), filename)', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/parser.py", line 340, in __call__', + \ ' return self.parse(*args, **kwargs)', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/parser.py", line 328, in parse', + \ ' six.raise_from(ParseError(), error)', + \ ' File "/usr/local/lib/python2.7/site-packages/six.py", line 737, in raise_from', + \ ' raise value', + \ 'ParseError: Cannot parse file.', + \ ], "\n"), + \ }, + \ { + \ 'lnum': 11, + \ 'col': 1, + \ 'code': 'E302', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'expected 2 blank lines, found 1 [pycodestyle]', + \ }, + \ { + \ 'lnum': 16, + \ 'col': 81, + \ 'code': 'E501', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'line too long (96 > 80 characters) [pycodestyle]', + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ + \ 'Traceback (most recent call last):', + \ ' File "/usr/local/lib/python2.7/site-packages/pylama/core.py", line 66, in run', + \ ' path, code=code, ignore=ignore, select=select, params=lparams)', + \ ' File "/usr/local/lib/python2.7/site-packages/pylama/lint/pylama_pydocstyle.py", line 37, in run', + \ ' } for e in PyDocChecker().check_source(*check_source_args)]', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/checker.py", line 64, in check_source', + \ ' module = parse(StringIO(source), filename)', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/parser.py", line 340, in __call__', + \ ' return self.parse(*args, **kwargs)', + \ ' File "/usr/local/lib/python2.7/site-packages/pydocstyle/parser.py", line 328, in parse', + \ ' six.raise_from(ParseError(), error)', + \ ' File "/usr/local/lib/python2.7/site-packages/six.py", line 737, in raise_from', + \ ' raise value', + \ 'ParseError: Cannot parse file.', + \ '', + \ 'index.py:11:1: E302 expected 2 blank lines, found 1 [pycodestyle]', + \ 'index.py:16:81: E501 line too long (96 > 80 characters) [pycodestyle]', + \ ]) + +" Note: This is probably a bug, since all pylama plugins produce codes, but +" should be handled for compatibility. +" Note: The pylama isort plugin is distributed in the isort package. +Execute(The pylama handler should handle messages without codes with version older than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'code': '', + \ 'type': 'W', + \ 'sub_type': '', + \ 'text': 'Incorrectly sorted imports. [isort]' + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ + \ 'index.py:0:0: Incorrectly sorted imports. [isort]', + \ ]) + +" Note: This is a pylama bug, but should be handled for compatibility. +" See https://github.com/klen/pylama/pull/146 +Execute(The pylama handler should handle message codes followed by a colon with version older than 8.1.4): + AssertEqual + \ [ + \ { + \ 'lnum': 31, + \ 'col': 1, + \ 'code': 'E800', + \ 'type': 'E', + \ 'sub_type': '', + \ 'text': 'Found commented out code: # needs_sphinx = ''1.0'' [eradicate]', + \ }, + \ ], + \ ale_linters#python#pylama#Handle(bufnr(''), [8, 0, 5], [ + \ 'index.py:31:1: E800: Found commented out code: # needs_sphinx = ''1.0'' [eradicate]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pylint_handler.vader b/dot_vim/plugged/ale/test/handler/test_pylint_handler.vader new file mode 100644 index 0000000..ce7322f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pylint_handler.vader @@ -0,0 +1,135 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime ale_linters/python/pylint.vim + +After: + Restore + + call ale#linter#Reset() + + silent file something_else.py + +Execute(Basic pylint errors should be handle): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'text': 'Trailing whitespace', + \ 'code': 'trailing-whitespace', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing module docstring', + \ 'code': 'missing-docstring', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Missing function docstring', + \ 'code': 'missing-docstring', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'text': '''break'' not properly in loop', + \ 'code': 'not-in-loop', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 5, + \ 'text': 'Unreachable code', + \ 'code': 'unreachable', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 33, + \ 'text': 'No exception type(s) specified', + \ 'code': 'bare-except', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#python#pylint#Handle(bufnr(''), [ + \ 'No config file found, using default configuration', + \ '************* Module test', + \ 'test.py:4:0: C0303 (trailing-whitespace) Trailing whitespace', + \ 'test.py:1:0: C0111 (missing-docstring) Missing module docstring', + \ 'test.py:2:0: C0111 (missing-docstring) Missing function docstring', + \ 'test.py:3:4: E0103 (not-in-loop) ''break'' not properly in loop', + \ 'test.py:4:4: W0101 (unreachable) Unreachable code', + \ 'test.py:7:32: W0702 (bare-except) No exception type(s) specified', + \ '', + \ '------------------------------------------------------------------', + \ 'Your code has been rated at 0.00/10 (previous run: 2.50/10, -2.50)', + \ ]) + +Execute(Ignoring trailing whitespace messages should work): + let g:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing module docstring', + \ 'code': 'missing-docstring', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#python#pylint#Handle(bufnr(''), [ + \ 'No config file found, using default configuration', + \ '************* Module test', + \ 'test.py:4:0: C0303 (trailing-whitespace) Trailing whitespace', + \ 'test.py:1:0: C0111 (missing-docstring) Missing module docstring', + \ '', + \ '------------------------------------------------------------------', + \ 'Your code has been rated at 0.00/10 (previous run: 2.50/10, -2.50)', + \ ]) + +Execute(The pylint handler should parse Windows filenames): + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'col': 6, + \ 'text': 'Undefined variable ''x''', + \ 'code': 'undefined-variable', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#python#pylint#Handle(bufnr(''), [ + \ '************* Module test', + \ 'D:\acm\github\vim\tools\test.py:13:5: E0602 (undefined-variable) Undefined variable ''x''', + \ '', + \ '------------------------------------------------------------------', + \ 'Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)', + \ ]) + +Execute(Use msg_id): + let g:ale_python_pylint_use_msg_id = 1 + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'col': 6, + \ 'text': 'Undefined variable ''x''', + \ 'code': 'E0602', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#python#pylint#Handle(bufnr(''), [ + \ '************* Module test', + \ 'D:\acm\github\vim\tools\test.py:13:5: E0602 (undefined-variable) Undefined variable ''x''', + \ '', + \ '------------------------------------------------------------------', + \ 'Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_pyrex_cython_handler.vader b/dot_vim/plugged/ale/test/handler/test_pyrex_cython_handler.vader new file mode 100644 index 0000000..fd0f9a8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_pyrex_cython_handler.vader @@ -0,0 +1,26 @@ +Before: + runtime ale_linters/pyrex/cython.vim + +After: + call ale#linter#Reset() + +Execute(The cython handler should handle warnings and errors): + AssertEqual + \ [ + \ { + \ 'lnum': 42, + \ 'col': 7, + \ 'text': 'some warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 777, + \ 'col': 21, + \ 'text': 'some error', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#pyrex#cython#Handle(347, [ + \ 'warning: file:42:7: some warning', + \ 'file:777:21: some error', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_qmlfmt_handler.vader b/dot_vim/plugged/ale/test/handler/test_qmlfmt_handler.vader new file mode 100644 index 0000000..fc8ef35 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_qmlfmt_handler.vader @@ -0,0 +1,19 @@ +Before: + runtime ale_linters/qml/qmlfmt.vim + +After: + call ale#linter#Reset() + +Execute(The qmlfmt handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 22, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Expected token ''}''.' + \ } + \ ], + \ ale_linters#qml#qmlfmt#Handle(1, [ + \ 'Error:22:1: Expected token ''}''.' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_qmllint_handler.vader b/dot_vim/plugged/ale/test/handler/test_qmllint_handler.vader new file mode 100644 index 0000000..fcc65eb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_qmllint_handler.vader @@ -0,0 +1,19 @@ +Before: + runtime ale_linters/qml/qmllint.vim + +After: + call ale#linter#Reset() + +Execute(The qmllint handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Expected token ''}''' + \ } + \ ], + \ ale_linters#qml#qmllint#Handle(1, [ + \ '/tmp/ab34cd56/Test.qml:2 : Expected token ''}''' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_raco_handler.vader b/dot_vim/plugged/ale/test/handler/test_raco_handler.vader new file mode 100644 index 0000000..565fd79 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_raco_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/racket/raco.vim + +After: + call ale#linter#Reset() + +Execute(The raco handler should handle errors for the current file correctly): + AssertEqual + \ [ + \ { + \ 'filename': 'foo.rkt', + \ 'lnum': 4, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'dfine: unbound identifier in modulemessage', + \ }, + \ ], + \ ale_linters#racket#raco#Handle(bufnr(''), [ + \ 'foo.rkt:4:1: dfine: unbound identifier in modulemessage', + \ ' in: dfine', + \ ' context...:', + \ ' /usr/local/Cellar/racket/6.5/share/racket/pkgs/compiler-lib/compiler/commands/expand.rkt:34:15: loop', + \ ' /usr/local/Cellar/racket/6.5/share/racket/pkgs/compiler-lib/compiler/commands/expand.rkt:10:2: show-program', + \ ' /usr/local/Cellar/racket/6.5/share/racket/pkgs/compiler-lib/compiler/commands/expand.rkt: [running body]', + \ ' /usr/local/Cellar/minimal-racket/6.6/share/racket/collects/raco/raco.rkt: [running body]', + \ ' /usr/local/Cellar/minimal-racket/6.6/share/racket/collects/raco/main.rkt: [running body]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_rails_best_practices_handler.vader b/dot_vim/plugged/ale/test/handler/test_rails_best_practices_handler.vader new file mode 100644 index 0000000..f6d69ee --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rails_best_practices_handler.vader @@ -0,0 +1,52 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/handler') + cd .. + + runtime ale_linters/ruby/rails_best_practices.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The rails_best_practices handler should parse JSON correctly): + call ale#test#SetFilename('test-files/ruby/valid_rails_app/app/models/thing.rb') + + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'text': 'use local variable', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 10, + \ 'text': 'other advice', + \ 'type': 'W', + \ } + \ ], + \ ale_linters#ruby#rails_best_practices#Handle(bufnr(''), [ + \ '[', + \ '{', + \ '"message": "use local variable",', + \ '"line_number": "5",', + \ printf('"filename": "%s"', substitute(expand('%:p'), '\\', '\\\\', 'g')), + \ '},{', + \ '"message": "other advice",', + \ '"line_number": "10",', + \ printf('"filename": "%s"', substitute(expand('%:p'), '\\', '\\\\', 'g')), + \ '}', + \ ']' + \ ]) + +Execute(The rails_best_practices handler should parse JSON correctly when there is no output from the tool): + AssertEqual + \ [], + \ ale_linters#ruby#rails_best_practices#Handle(347, [ + \ ]) + +Execute(The rails_best_practices handler should handle garbage output): + AssertEqual + \ [], + \ ale_linters#ruby#rails_best_practices#Handle(347, [ + \ 'No such command in 2.4.1 of ruby', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_redpen_handler.vader b/dot_vim/plugged/ale/test/handler/test_redpen_handler.vader new file mode 100644 index 0000000..0b030e2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_redpen_handler.vader @@ -0,0 +1,98 @@ +Before: + runtime! ale_linters/markdown/redpen.vim + +After: + call ale#linter#Reset() + +Execute(redpen handler should handle errors output): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'end_lnum': 1, + \ 'end_col': 15, + \ 'text': 'Found possibly misspelled word "plugin".', + \ 'type': 'W', + \ 'code': 'Spelling', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Found possibly misspelled word "NeoVim".', + \ 'type': 'W', + \ 'code': 'Spelling', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 35, + \ 'end_lnum': 1, + \ 'end_col': 55, + \ 'text': 'Found possibly misspelled word "コードãƒã‚§ãƒƒã‚¯".', + \ 'type': 'W', + \ 'code': 'Spelling', + \ }, + \ ], + \ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), [ + \ '[', + \ ' {', + \ ' "document": "test.md",', + \ ' "errors": [', + \ ' {', + \ ' "sentence": "ALE is a plugin for providing linting in NeoVim and Vim 8 while you edit your text files.",', + \ ' "endPosition": {', + \ ' "offset": 15,', + \ ' "lineNum": 1', + \ ' },', + \ ' "validator": "Spelling",', + \ ' "lineNum": 1,', + \ ' "sentenceStartColumnNum": 0,', + \ ' "message": "Found possibly misspelled word \"plugin\".",', + \ ' "startPosition": {', + \ ' "offset": 9,', + \ ' "lineNum": 1', + \ ' }', + \ ' },', + \ ' {', + \ ' "sentence": "ALE is a plugin for providing linting in NeoVim and Vim 8 while you edit your text files.",', + \ ' "validator": "Spelling",', + \ ' "lineNum": 1,', + \ ' "sentenceStartColumnNum": 0,', + \ ' "message": "Found possibly misspelled word \"NeoVim\"."', + \ ' },', + \ ' {', + \ ' "sentence": "ALEã¯NeoVimã¨Vim8ã§éžåŒæœŸã®ã‚³ãƒ¼ãƒ‰ãƒã‚§ãƒƒã‚¯ã‚’実ç¾ã™ã‚‹ãƒ—ラグインã§ã™ã€‚",', + \ ' "endPosition": {', + \ ' "offset": 27,', + \ ' "lineNum": 1', + \ ' },', + \ ' "validator": "Spelling",', + \ ' "lineNum": 1,', + \ ' "sentenceStartColumnNum": 0,', + \ ' "message": "Found possibly misspelled word \"コードãƒã‚§ãƒƒã‚¯\".",', + \ ' "startPosition": {', + \ ' "offset": 20,', + \ ' "lineNum": 1', + \ ' }', + \ ' }', + \ ' ]', + \ ' }', + \ ']', + \ ]) + +Execute(The redpen handler should handle an empty error list): + AssertEqual + \ [], + \ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), [ + \ '[', + \ ' {', + \ ' "document": "test.md",', + \ ' "errors": []', + \ ' }', + \ ']', + \ ]) + +Execute(The redpen handler should handle totally empty output): + AssertEqual + \ [], + \ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_reek_handler.vader b/dot_vim/plugged/ale/test/handler/test_reek_handler.vader new file mode 100644 index 0000000..db0a111 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_reek_handler.vader @@ -0,0 +1,81 @@ +Before: + runtime ale_linters/ruby/reek.vim + +After: + call ale#linter#Reset() + +Execute(The reek handler should parse JSON correctly, with only context enabled): + let g:ale_ruby_reek_show_context = 1 + let g:ale_ruby_reek_show_wiki_link = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'text': 'Context#method violates rule number one', + \ 'code': 'Rule1', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 34, + \ 'text': 'Context#method violates rule number two', + \ 'code': 'Rule2', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 56, + \ 'text': 'Context#method violates rule number two', + \ 'code': 'Rule2', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#ruby#reek#Handle(347, [ + \ '[{"context":"Context#method","lines":[12],"message":"violates rule number one","smell_type":"Rule1","source":"/home/user/file.rb","parameter":"bad parameter","wiki_link":"https://example.com/Rule1.md"},{"context":"Context#method","lines":[34, 56],"message":"violates rule number two","smell_type":"Rule2","source":"/home/user/file.rb","name":"bad code","count":2,"wiki_link":"https://example.com/Rule1.md"}]' + \ ]) + +Execute(The reek handler should parse JSON correctly, with no context or wiki links): + let g:ale_ruby_reek_show_context = 0 + let g:ale_ruby_reek_show_wiki_link = 0 + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'text': 'violates rule number one', + \ 'code': 'Rule1', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#ruby#reek#Handle(347, [ + \ '[{"context":"Context#method","lines":[12],"message":"violates rule number one","smell_type":"Rule1","source":"/home/user/file.rb","parameter":"bad parameter","wiki_link":"https://example.com/Rule1.md"}]' + \ ]) + +Execute(The reek handler should parse JSON correctly, with both context and wiki links): + let g:ale_ruby_reek_show_context = 1 + let g:ale_ruby_reek_show_wiki_link = 1 + + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'text': 'Context#method violates rule number one [https://example.com/Rule1.md]', + \ 'code': 'Rule1', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#ruby#reek#Handle(347, [ + \ '[{"context":"Context#method","lines":[12],"message":"violates rule number one","smell_type":"Rule1","source":"/home/user/file.rb","parameter":"bad parameter","wiki_link":"https://example.com/Rule1.md"}]' + \ ]) + +Execute(The reek handler should parse JSON correctly when there is no output from reek): + AssertEqual + \ [], + \ ale_linters#ruby#reek#Handle(347, [ + \ ]) + +Execute(The reek handler should handle garbage output): + AssertEqual + \ [], + \ ale_linters#ruby#reek#Handle(347, [ + \ 'No such command in 2.4.1 of ruby', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_remark_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_remark_lint_handler.vader new file mode 100644 index 0000000..0794d51 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_remark_lint_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/markdown/remark_lint.vim + +After: + call ale#linter#Reset() + +Execute(Warning and error messages should be handled correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 4, + \ 'type': 'W', + \ 'text': 'Incorrect list-item indent: add 1 space list-item-indent remark-lint', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'Incorrect list-item indent: remove 1 space list-item-indent remark-lint', + \ }, + \ { + \ 'lnum': 18, + \ 'col': 71, + \ 'end_lnum': 19, + \ 'end_col': 1, + \ 'type': 'E', + \ 'text': 'Missing new line after list item list-item-spacing remark-lint', + \ }, + \ ], + \ ale_linters#markdown#remark_lint#Handle(1, [ + \ 'foo.md', + \ ' 1:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint', + \ ' 3:5 error Incorrect list-item indent: remove 1 space list-item-indent remark-lint', + \ ' 18:71-19:1 error Missing new line after list item list-item-spacing remark-lint', + \ '', + \ 'âš  1 warnings', + \ '✘ 2 errors', + \]) diff --git a/dot_vim/plugged/ale/test/handler/test_rflint_handler.vader b/dot_vim/plugged/ale/test/handler/test_rflint_handler.vader new file mode 100644 index 0000000..f267014 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rflint_handler.vader @@ -0,0 +1,33 @@ +Before: + runtime ale_linters/robot/rflint.vim + +After: + call ale#linter#Reset() + +Execute(Warning and error messages should be handled correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 1, + \ 'filename': 'test.robot', + \ 'type': 'W', + \ 'lnum': 1, + \ 'col': 2, + \ 'text': 'RequireSuiteDocumentation', + \ 'detail': 'No suite documentation', + \ }, + \ { + \ 'bufnr': 1, + \ 'filename': 'test.robot', + \ 'type': 'E', + \ 'lnum': 3, + \ 'col': 4, + \ 'text': 'RequireTestDocumentation', + \ 'detail': 'No testcase documentation', + \ }, + \ ], + \ ale_linters#robot#rflint#Handle(1, [ + \ 'test.robot:W:1:2:RequireSuiteDocumentation:No suite documentation', + \ 'test.robot:E:3:4:RequireTestDocumentation:No testcase documentation' + \]) + diff --git a/dot_vim/plugged/ale/test/handler/test_rpmlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_rpmlint_handler.vader new file mode 100644 index 0000000..2ea9e5c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rpmlint_handler.vader @@ -0,0 +1,33 @@ +Before: + runtime ale_linters/spec/rpmlint.vim + +After: + call ale#linter#Reset() + +Execute(The rpmlint handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'bufnr': 42, + \ 'lnum': 23, + \ 'text': 'macro-in-comment %version', + \ 'type': 'W', + \ }, + \ { + \ 'bufnr': 42, + \ 'lnum': 17, + \ 'text': 'hardcoded-library-path in %_prefix/lib/%name', + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': 42, + \ 'lnum': 1, + \ 'text': 'specfile-error warning: bogus date in %changelog: Mon Oct 1 2005 - Foo', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#spec#rpmlint#Handle(42, [ + \ 'cyrus-imapd.spec:23: W: macro-in-comment %version', + \ 'cyrus-imapd.spec:17: E: hardcoded-library-path in %_prefix/lib/%name', + \ 'apcupsd.spec: E: specfile-error warning: bogus date in %changelog: Mon Oct 1 2005 - Foo', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_rstcheck_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_rstcheck_lint_handler.vader new file mode 100644 index 0000000..c65c15e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rstcheck_lint_handler.vader @@ -0,0 +1,42 @@ +Before: + runtime ale_linters/rst/rstcheck.vim + +After: + call ale#linter#Reset() + +Execute(Warning and error messages should be handled correctly): + " For some reason we can't set the directory such that the filenames are + " correct here when running the tests from the Docker image, so we have to + " just check the basenames of the files instead. + AssertEqual + \ [ + \ { + \ 'filename': 'bad_python.rst', + \ 'lnum': 7, + \ 'col': 0, + \ 'type': 'W', + \ 'text': '(python) unexpected EOF while parsing', + \ }, + \ { + \ 'filename': 'bad_cpp.rst', + \ 'lnum': 9, + \ 'col': 0, + \ 'type': 'W', + \ 'text': '(cpp) error: ''x'' was not declared in this scope', + \ }, + \ { + \ 'filename': 'bad_rst.rst', + \ 'lnum': 1, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Title overline & underline mismatch.', + \ }, + \ ], + \ map( + \ ale_linters#rst#rstcheck#Handle(1, [ + \ 'bad_python.rst:7: (ERROR/3) (python) unexpected EOF while parsing', + \ 'bad_cpp.rst:9: (ERROR/3) (cpp) error: ''x'' was not declared in this scope', + \ 'bad_rst.rst:1: (SEVERE/4) Title overline & underline mismatch.', + \ ]), + \ 'extend(v:val, {''filename'': fnamemodify(v:val.filename, '':t'')})' + \ ) diff --git a/dot_vim/plugged/ale/test/handler/test_rubocop_handler.vader b/dot_vim/plugged/ale/test/handler/test_rubocop_handler.vader new file mode 100644 index 0000000..d7868f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rubocop_handler.vader @@ -0,0 +1,76 @@ +Before: + runtime ale_linters/ruby/rubocop.vim + +After: + unlet! g:lines + call ale#linter#Reset() + +Execute(The rubocop handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 83, + \ 'col': 29, + \ 'end_col': 35, + \ 'text': 'Prefer single-quoted strings...', + \ 'code': 'Style/SomeCop', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 12, + \ 'col': 2, + \ 'end_col': 2, + \ 'text': 'Some error', + \ 'code': 'Style/SomeOtherCop', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 10, + \ 'col': 5, + \ 'end_col': 12, + \ 'text': 'Regular warning', + \ 'code': 'Style/WarningCop', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 11, + \ 'col': 1, + \ 'end_col': 1, + \ 'text': 'Another error', + \ 'code': 'Style/SpaceBeforeBlockBraces', + \ 'type': 'E', + \ }, + \ ], + \ ale#ruby#HandleRubocopOutput(347, [ + \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[{"path":"my_great_file.rb","offenses":[{"severity":"convention","message":"Prefer single-quoted strings...","cop_name":"Style/SomeCop","corrected":false,"location":{"line":83,"column":29,"length":7}},{"severity":"fatal","message":"Some error","cop_name":"Style/SomeOtherCop","corrected":false,"location":{"line":12,"column":2,"length":1}},{"severity":"warning","message":"Regular warning","cop_name":"Style/WarningCop","corrected":false,"location":{"line":10,"column":5,"length":8}},{"severity":"error","message":"Another error","cop_name":"Style/SpaceBeforeBlockBraces","corrected":false,"location":{"line":11,"column":1,"length":1}}]}],"summary":{"offense_count":4,"target_file_count":1,"inspected_file_count":1}}' + \ ]) + +Execute(The rubocop handler should handle when files are checked and no offenses are found): + AssertEqual + \ [], + \ ale#ruby#HandleRubocopOutput(347, [ + \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[{"path":"my_great_file.rb","offenses":[]}],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":1}}' + \ ]) + +Execute(The rubocop handler should handle when no files are checked): + AssertEqual + \ [], + \ ale#ruby#HandleRubocopOutput(347, [ + \ '{"metadata":{"rubocop_version":"0.47.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-linux-gnu"},"files":[],"summary":{"offense_count":0,"target_file_count":0,"inspected_file_count":0}}' + \ ]) + +Execute(The rubocop handler should handle output without any errors): + let g:lines = [ + \ '{"metadata":{"rubocop_version":"0.48.1","ruby_engine":"ruby","ruby_version":"2.4.1","ruby_patchlevel":"111","ruby_platform":"x86_64-darwin16"},"files":[]}', + \] + + AssertEqual + \ [], + \ ale#ruby#HandleRubocopOutput(347, g:lines) + \ + AssertEqual + \ [], + \ ale#ruby#HandleRubocopOutput(347, ['{}']) + AssertEqual + \ [], + \ ale#ruby#HandleRubocopOutput(347, []) diff --git a/dot_vim/plugged/ale/test/handler/test_ruby_handler.vader b/dot_vim/plugged/ale/test/handler/test_ruby_handler.vader new file mode 100644 index 0000000..824d8c5 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_ruby_handler.vader @@ -0,0 +1,38 @@ +Before: + runtime ale_linters/ruby/ruby.vim + +After: + call ale#linter#Reset() + +Execute(The ruby handler should parse lines correctly and add the column if it can): + " Point Error + " Warning + " Line Error + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 13, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected '';''' + \ }, + \ { + \ 'lnum': 9, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'warning: statement not reached' + \ }, + \ { + \ 'lnum': 12, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected end-of-input, expecting keyword_end' + \ } + \ ], + \ ale#handlers#ruby#HandleSyntaxErrors(255, [ + \ "test.rb:6: syntax error, unexpected ';'", + \ " t = ;", + \ " ^", + \ "test.rb:9: warning: statement not reached", + \ "test.rb:12: syntax error, unexpected end-of-input, expecting keyword_end", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_rust_handler.vader b/dot_vim/plugged/ale/test/handler/test_rust_handler.vader new file mode 100644 index 0000000..845df2b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_rust_handler.vader @@ -0,0 +1,483 @@ +Execute(The Rust handler should handle rustc output): + call ale#test#SetFilename('src/playpen.rs') + + AssertEqual + \ [ + \ { + \ 'lnum': 15, + \ 'end_lnum': 15, + \ 'type': 'E', + \ 'col': 5, + \ 'end_col': 7, + \ 'text': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`', + \ }, + \ { + \ 'lnum': 13, + \ 'end_lnum': 13, + \ 'type': 'E', + \ 'col': 7, + \ 'end_col': 9, + \ 'text': 'no method named `wat` found for type `std::string::String` in the current scope', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'ignore this', + \ json_encode({ + \ 'message': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`', + \ 'code': v:null, + \ 'level': 'error', + \ 'spans': [ + \ { + \ 'file_name': '', + \ 'byte_start': 418, + \ 'byte_end': 421, + \ 'line_start': 15, + \ 'line_end': 15, + \ 'column_start': 5, + \ 'column_end': 8, + \ 'is_primary': v:true, + \ 'label': v:null, + \ }, + \ ], + \ }), + \ json_encode({ + \ 'message': 'main function not found', + \ 'code': v:null, + \ 'level': 'error', + \ 'spans': [], + \ }), + \ json_encode({ + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'no method named `wat` found for type `std::string::String` in the current scope', + \ 'spans': [ + \ { + \ 'byte_end': 410, + \ 'byte_start': 407, + \ 'column_end': 10, + \ 'column_start': 7, + \ 'file_name': '', + \ 'is_primary': v:true, + \ 'label': v:null, + \ 'line_end': 13, + \ 'line_start': 13, + \ } + \ ] + \ }), + \ json_encode({ + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error', + \ 'spans': [ + \ ] + \ }), + \ ]) + +Execute(The Rust handler should handle cargo output): + call ale#test#SetFilename('src/playpen.rs') + + AssertEqual + \ [ + \ { + \ 'lnum': 15, + \ 'end_lnum': 15, + \ 'type': 'E', + \ 'col': 5, + \ 'end_col': 7, + \ 'text': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`', + \ }, + \ { + \ 'lnum': 13, + \ 'end_lnum': 13, + \ 'type': 'E', + \ 'col': 7, + \ 'end_col': 9, + \ 'text': 'no method named `wat` found for type `std::string::String` in the current scope', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'ignore this', + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'expected one of `.`, `;`, `?`, `}`, or an operator, found `for`', + \ 'spans': [ + \ { + \ 'byte_end': 11508, + \ 'byte_start': 11505, + \ 'column_end': 8, + \ 'column_start': 5, + \ 'file_name': ale#path#Simplify('src/playpen.rs'), + \ 'is_primary': v:true, + \ 'label': v:null, + \ 'line_end': 15, + \ 'line_start': 15, + \ } + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'no method named `wat` found for type `std::string::String` in the current scope', + \ 'spans': [ + \ { + \ 'byte_end': 11497, + \ 'byte_start': 11494, + \ 'column_end': 10, + \ 'column_start': 7, + \ 'file_name': ale#path#Simplify('src/playpen.rs'), + \ 'is_primary': v:true, + \ 'label': v:null, + \ 'line_end': 13, + \ 'line_start': 13, + \ } + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error', + \ 'spans': [ + \ ] + \ }, + \ }), + \ ]) + +Execute(The Rust handler should should errors from expansion spans): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'end_lnum': 4, + \ 'type': 'E', + \ 'col': 21, + \ 'end_col': 22, + \ 'text': 'mismatched types: expected bool, found integral variable', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'mismatched types', + \ 'spans': [ + \ { + \ 'byte_end': 1, + \ 'byte_start': 1, + \ 'column_end': 1, + \ 'column_start': 1, + \ 'file_name': ale#path#Simplify('src/other.rs'), + \ 'is_primary': v:true, + \ 'label': 'some other error', + \ 'line_end': 4, + \ 'line_start': 4, + \ 'expansion': { + \ 'span': { + \ 'byte_end': 54, + \ 'byte_start': 52, + \ 'column_end': 23, + \ 'column_start': 21, + \ 'file_name': ale#path#Simplify('src/playpen.rs'), + \ 'is_primary': v:true, + \ 'label': 'expected bool, found integral variable', + \ 'line_end': 4, + \ 'line_start': 4, + \ } + \ } + \ } + \ ] + \ }, + \ }), + \ ]) + +Execute(The Rust handler should show detailed errors): + call ale#test#SetFilename('src/playpen.rs') + + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'end_lnum': 4, + \ 'type': 'E', + \ 'col': 21, + \ 'end_col': 22, + \ 'text': 'mismatched types: expected bool, found integral variable', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'ignore this', + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'mismatched types', + \ 'spans': [ + \ { + \ 'byte_end': 54, + \ 'byte_start': 52, + \ 'column_end': 23, + \ 'column_start': 21, + \ 'expansion': v:null, + \ 'file_name': ale#path#Simplify('src/playpen.rs'), + \ 'is_primary': v:true, + \ 'label': 'expected bool, found integral variable', + \ 'line_end': 4, + \ 'line_start': 4, + \ } + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error(s)', + \ 'spans': [ + \ ] + \ }, + \ }), + \ ]) + +Execute(The Rust handler should show detailed clippy errors with rendered field if it's available): + call ale#test#SetFilename('src/playpen.rs') + + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'end_lnum': 4, + \ 'type': 'E', + \ 'col': 21, + \ 'end_col': 22, + \ 'text': 'mismatched types: expected bool, found integral variable', + \ 'detail': 'this is a detailed description', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'ignore this', + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'mismatched types', + \ 'rendered': 'this is a detailed description', + \ 'spans': [ + \ { + \ 'byte_end': 54, + \ 'byte_start': 52, + \ 'column_end': 23, + \ 'column_start': 21, + \ 'expansion': v:null, + \ 'file_name': ale#path#Simplify('src/playpen.rs'), + \ 'is_primary': v:true, + \ 'label': 'expected bool, found integral variable', + \ 'line_end': 4, + \ 'line_start': 4, + \ } + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error(s)', + \ 'spans': [ + \ ] + \ }, + \ }), + \ ]) + +Execute(The Rust handler should find correct files): + call ale#test#SetFilename('src/noerrors/mod.rs') + + AssertEqual + \ [], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'ignore this', + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'unresolved import `Undefined`', + \ 'spans': [ + \ { + \ 'byte_end': 103, + \ 'byte_start': 94, + \ 'column_end': 14, + \ 'column_start': 5, + \ 'file_name': 'src/haserrors/mod.rs', + \ 'is_primary': v:true, + \ 'label': 'no `Undefined` in the root', + \ 'line_end': 1, + \ 'line_start': 1, + \ } + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error', + \ 'spans': [ + \ ] + \ }, + \ }), + \ ]) + +Execute(The Rust handler should remove secondary spans if set): + call ale#test#SetFilename('src/noerrors/mod.rs') + + let g:ale_rust_ignore_secondary_spans = 0 + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'type': 'E', + \ 'end_col': 20, + \ 'col': 1, + \ 'text': 'this function takes 1 parameter but 0 were supplied: defined here', + \ }, + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'type': 'E', + \ 'end_col': 45, + \ 'col': 40, + \ 'text': 'this function takes 1 parameter but 0 were supplied: expected 1 parameter', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'fn test(x: u8) -> u8 { x } fn main() { x(); }', + \ json_encode({ + \ 'message': { + \ 'code': { + \ 'code': 'E0061', + \ 'explanation': 'Dummy explanation; not used' + \ }, + \ 'level': 'error', + \ 'message': 'this function takes 1 parameter but 0 were supplied', + \ 'spans': [ + \ { + \ 'byte_end': 20, + \ 'byte_start': 0, + \ 'column_end': 21, + \ 'column_start': 1, + \ 'file_name': 'src/noerrors/mod.rs', + \ 'is_primary': v:false, + \ 'label': 'defined here', + \ 'line_end': 1, + \ 'line_start': 1, + \ }, + \ { + \ 'byte_end': 45, + \ 'byte_start': 39, + \ 'column_end': 46, + \ 'column_start': 40, + \ 'file_name': '', + \ 'is_primary': v:true, + \ 'label': 'expected 1 parameter', + \ 'line_end': 1, + \ 'line_start': 1, + \ }, + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error', + \ 'spans': [] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'For more information about this error, try `rustc --explain E0061`.', + \ 'spans': [] + \ }, + \ }), + \ ]) + + let g:ale_rust_ignore_secondary_spans = 1 + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'end_lnum': 1, + \ 'type': 'E', + \ 'end_col': 45, + \ 'col': 40, + \ 'text': 'this function takes 1 parameter but 0 were supplied: expected 1 parameter', + \ }, + \ ], + \ ale#handlers#rust#HandleRustErrors(bufnr(''), [ + \ '', + \ 'fn test(x: u8) -> u8 { x } fn main() { x(); }', + \ json_encode({ + \ 'message': { + \ 'code': { + \ 'code': 'E0061', + \ 'explanation': 'Dummy explanation; not used' + \ }, + \ 'level': 'error', + \ 'message': 'this function takes 1 parameter but 0 were supplied', + \ 'spans': [ + \ { + \ 'byte_end': 20, + \ 'byte_start': 0, + \ 'column_end': 21, + \ 'column_start': 1, + \ 'file_name': 'src/noerrors/mod.rs', + \ 'is_primary': v:false, + \ 'label': 'defined here', + \ 'line_end': 1, + \ 'line_start': 1, + \ }, + \ { + \ 'byte_end': 45, + \ 'byte_start': 39, + \ 'column_end': 46, + \ 'column_start': 40, + \ 'file_name': '', + \ 'is_primary': v:true, + \ 'label': 'expected 1 parameter', + \ 'line_end': 1, + \ 'line_start': 1, + \ }, + \ ] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'aborting due to previous error', + \ 'spans': [] + \ }, + \ }), + \ json_encode({ + \ 'message': { + \ 'code': v:null, + \ 'level': 'error', + \ 'message': 'For more information about this error, try `rustc --explain E0061`.', + \ 'spans': [] + \ }, + \ }), + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_salt_salt_lint.vader b/dot_vim/plugged/ale/test/handler/test_salt_salt_lint.vader new file mode 100644 index 0000000..7e23478 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_salt_salt_lint.vader @@ -0,0 +1,34 @@ +Before: + runtime ale_linters/salt/salt_lint.vim + +After: + call ale#linter#Reset() + +Execute(The salt handler should parse lines correctly and show error in severity HIGH): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'code': 207, + \ 'text': 'File modes should always be encapsulated in quotation marks', + \ 'type': 'E' + \ } + \ ], + \ ale_linters#salt#salt_lint#Handle(255, [ + \ '[{"id": "207", "message": "File modes should always be encapsulated in quotation marks", "filename": "test.sls", "linenumber": 5, "line": " - mode: 0755", "severity": "HIGH"}]' + \ ]) + + +Execute(The salt handler should parse lines correctly and show error in severity not HIGH): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'code': 204, + \ 'text': 'Lines should be no longer that 160 chars', + \ 'type': 'W' + \ } + \ ], + \ ale_linters#salt#salt_lint#Handle(255, [ + \ '[{"id": "204", "message": "Lines should be no longer that 160 chars", "filename": "test2.sls", "linenumber": 27, "line": "this line is definitely longer than 160 chars, this line is definitely longer than 160 chars, this line is definitely longer than 160 chars", "severity": "VERY_LOW"}]' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_scala_handler.vader b/dot_vim/plugged/ale/test/handler/test_scala_handler.vader new file mode 100644 index 0000000..3214bdb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_scala_handler.vader @@ -0,0 +1,32 @@ +After: + call ale#linter#Reset() + +Execute(The handler should return an empty list with empty input): + AssertEqual [], ale#handlers#scala#HandleScalacLintFormat(bufnr(''), []) + +Execute(The handler should correctly parse error messages): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 8, + \ 'text': ''':'' expected but identifier found.', + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 6, + \ 'col': 2, + \ 'text': 'identifier expected but eof found.', + \ 'type': 'E' + \ } + \ ], + \ ale#handlers#scala#HandleScalacLintFormat(bufnr(''), + \ [ + \ "hi.scala:4: error: ':' expected but identifier found.", + \ " Some stupid scala code", + \ " ^", + \ "hi.scala:6: error: identifier expected but eof found.", + \ ")", + \ " ^", + \ "two errors found", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_scalastyle_handler.vader b/dot_vim/plugged/ale/test/handler/test_scalastyle_handler.vader new file mode 100644 index 0000000..32da79c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_scalastyle_handler.vader @@ -0,0 +1,53 @@ +Before: + runtime! ale_linters/scala/scalastyle.vim + +After: + call ale#linter#Reset() + +Execute(The scalastyle handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 190, + \ 'text': 'Missing or badly formed ScalaDoc: Missing @param str', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 200, + \ 'col': 34, + \ 'text': 'There should be a space before the plus (+) sign', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 200, + \ 'col': 1, + \ 'text': 'There should be a space before the plus (+) sign', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#scala#scalastyle#Handle(347, [ + \ 'Starting scalastyle', + \ 'start file /home/test/Doop.scala', + \ 'warning file=/home/test/Doop.scala message=Missing or badly formed ScalaDoc: Missing @param str line=190', + \ 'error file=/home/test/Doop.scala message=There should be a space before the plus (+) sign line=200 column=33', + \ 'error file=/home/test/Doop.scala message=There should be a space before the plus (+) sign line=200 column=0', + \ 'end file /home/test/Doop.scala', + \ 'Processed 1 file(s)', + \ 'Found 0 errors', + \ 'Found 3 warnings', + \ 'Finished in 934 ms', + \ ]) + +Execute(The scalastyle linter should complain when there is no configuration file): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': '(See :help ale-scala-scalastyle) No scalastyle configuration file was found.', + \ }, + \ ], + \ ale_linters#scala#scalastyle#Handle(347, [ + \ 'scalastyle 1.0.0', + \ 'Usage: scalastyle [options] ', + \ ' -c, --config FILE configuration file (required)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_shell_handler.vader b/dot_vim/plugged/ale/test/handler/test_shell_handler.vader new file mode 100644 index 0000000..c61cf37 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_shell_handler.vader @@ -0,0 +1,177 @@ +Before: + runtime ale_linters/sh/shell.vim + +After: + call ale#linter#Reset() + +Execute(The shell handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 13, + \ 'text': 'syntax error near unexpected token d', + \ }, + \ { + \ 'lnum': 7, + \ 'text': 'line 42: line 36:', + \ }, + \ { + \ 'lnum': 11, + \ 'text': 'Syntax error: "(" unexpected', + \ }, + \ { + \ 'lnum': 95, + \ 'text': 'parse error near `out=$(( $1 / 1024. )...', + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ { + \ 'lnum': 9, + \ 'text': '`done'' unexpected', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ 'bash: line 13: syntax error near unexpected token d', + \ 'bash: line 7: line 42: line 36:', + \ 'sh: 11: Syntax error: "(" unexpected', + \ 'qfm:95: parse error near `out=$(( $1 / 1024. )...', + \ 'qfm:22: :11: :33: :44:', + \ 'foo.sh: syntax error at line 9: `done'' unexpected', + \ ]) + +Execute(The shell handler should parse Simplified Chinese lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'text': '未预期的符å·â€œdoneâ€é™„近有语法错误', + \ }, + \ { + \ 'lnum': 90, + \ 'text': '寻找匹é…的“"â€æ—¶é‡åˆ°äº†æœªé¢„期的文件结æŸç¬¦', + \ }, + \ { + \ 'lnum': 111, + \ 'text': '语法错误: 未预期的文件结尾', + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ '/tmp/nvimWL5sOL/2/a.sh:行0: 未预期的符å·â€œdoneâ€é™„近有语法错误', + \ '/tmp/nvimWL5sOL/2/a.sh:行90: 寻找匹é…的“"â€æ—¶é‡åˆ°äº†æœªé¢„期的文件结æŸç¬¦', + \ '/tmp/nvimWL5sOL/2/a.sh:行111: 语法错误: 未预期的文件结尾', + \ '/tmp/nvimWL5sOL/2/a.sh:行22: :11: :33: :44:', + \ ]) + +Execute(The shell handler should parse Traditional Chinese lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'text': 'æœªé æœŸçš„字組「(ã€é™„近有語法錯誤', + \ }, + \ { + \ 'lnum': 90, + \ 'text': '尋找匹é…的「"ã€æ™‚é‡åˆ°äº†æœªé æœŸçš„æª”æ¡ˆçµæŸç¬¦', + \ }, + \ { + \ 'lnum': 111, + \ 'text': '語法錯誤: æœªé æœŸçš„æª”案çµå°¾', + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ '/tmp/nvimWL5sOL/2/a.sh: 列 0: æœªé æœŸçš„字組「(ã€é™„近有語法錯誤', + \ '/tmp/nvimWL5sOL/2/a.sh: 列 90: 尋找匹é…的「"ã€æ™‚é‡åˆ°äº†æœªé æœŸçš„æª”æ¡ˆçµæŸç¬¦', + \ '/tmp/nvimWL5sOL/2/a.sh: 列 111: 語法錯誤: æœªé æœŸçš„æª”案çµå°¾', + \ '/tmp/nvimWL5sOL/2/a.sh: 列 22: :11: :33: :44:', + \ ]) + +Execute(The shell handler should parse Japanese lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'text': "予期ã—ãªã„トークン `(' å‘¨è¾ºã«æ§‹æ–‡ã‚¨ãƒ©ãƒ¼ãŒã‚りã¾ã™", + \ }, + \ { + \ 'lnum': 90, + \ 'text': "予期ã—ãªã„トークン `done' å‘¨è¾ºã«æ§‹æ–‡ã‚¨ãƒ©ãƒ¼ãŒã‚りã¾ã™", + \ }, + \ { + \ 'lnum': 111, + \ 'text': "対応ã™ã‚‹ `\"' を探索中ã«äºˆæœŸã—ãªã„ファイル終了 (EOF) ã§ã™", + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ "/tmp/nvimWL5sOL/2/a.sh: 行 0: 予期ã—ãªã„トークン `(' å‘¨è¾ºã«æ§‹æ–‡ã‚¨ãƒ©ãƒ¼ãŒã‚りã¾ã™", + \ "/tmp/nvimWL5sOL/2/a.sh: 行 90: 予期ã—ãªã„トークン `done' å‘¨è¾ºã«æ§‹æ–‡ã‚¨ãƒ©ãƒ¼ãŒã‚りã¾ã™", + \ "/tmp/nvimWL5sOL/2/a.sh: 行 111: 対応ã™ã‚‹ `\"' を探索中ã«äºˆæœŸã—ãªã„ファイル終了 (EOF) ã§ã™", + \ "/tmp/nvimWL5sOL/2/a.sh: 行 22: :11: :33: :44:", + \ ]) + +Execute(The shell handler should parse Greek lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'text': 'συντακτικό σφάλμα κοντά στο μη αναμενόμενο σÏμβολο «done»', + \ }, + \ { + \ 'lnum': 90, + \ 'text': 'syntax error: μη αναμενόμενο τέλος αÏχείου', + \ }, + \ { + \ 'lnum': 111, + \ 'text': 'μη αναμενόμενο EOF κατά την αναζήτηση «"»', + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ '/tmp/nvimWL5sOL/2/a.sh: γÏαμμή 0: συντακτικό σφάλμα κοντά στο μη αναμενόμενο σÏμβολο «done»', + \ '/tmp/nvimWL5sOL/2/a.sh: γÏαμμή 90: syntax error: μη αναμενόμενο τέλος αÏχείου', + \ '/tmp/nvimWL5sOL/2/a.sh: γÏαμμή 111: μη αναμενόμενο EOF κατά την αναζήτηση «"»', + \ "/tmp/nvimWL5sOL/2/a.sh: γÏαμμή 22: :11: :33: :44:", + \ ]) + +Execute(The shell handler should parse Russian lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 0, + \ 'text': 'ÑинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° Ñ€Ñдом Ñ Ð½ÐµÐ¾Ð¶Ð¸Ð´Ð°Ð½Ð½Ñ‹Ð¼ маркером «done»', + \ }, + \ { + \ 'lnum': 90, + \ 'text': 'ÑинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: неожиданный конец файла', + \ }, + \ { + \ 'lnum': 111, + \ 'text': 'неожиданный конец файла во Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð¸Ñка «"»', + \ }, + \ { + \ 'lnum': 22, + \ 'text': ':11: :33: :44:', + \ }, + \ ], + \ ale_linters#sh#shell#Handle(347, [ + \ '/tmp/nvimWL5sOL/2/a.sh: Ñтрока 0: ÑинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° Ñ€Ñдом Ñ Ð½ÐµÐ¾Ð¶Ð¸Ð´Ð°Ð½Ð½Ñ‹Ð¼ маркером «done»', + \ '/tmp/nvimWL5sOL/2/a.sh: Ñтрока 90: ÑинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: неожиданный конец файла', + \ '/tmp/nvimWL5sOL/2/a.sh: Ñтрока 111: неожиданный конец файла во Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð¸Ñка «"»', + \ '/tmp/nvimWL5sOL/2/a.sh: Ñтрока 22: :11: :33: :44:', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_shellcheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_shellcheck_handler.vader new file mode 100644 index 0000000..33f1298 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_shellcheck_handler.vader @@ -0,0 +1,43 @@ +Before: + runtime ale_linters/shell/shellcheck.vim + +After: + call ale#linter#Reset() + +Execute(The shellcheck handler should handle basic errors or warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'In POSIX sh, ''let'' is not supported.', + \ 'code': 'SC2039', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'type': 'E', + \ 'text': 'Don''t put spaces around the = in assignments.', + \ 'code': 'SC1068', + \ }, + \ ], + \ ale#handlers#shellcheck#Handle(bufnr(''), [ + \ '-:2:1: warning: In POSIX sh, ''let'' is not supported. [SC2039]', + \ '-:2:3: error: Don''t put spaces around the = in assignments. [SC1068]', + \ ]) + +Execute(The shellcheck handler should handle notes): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 3, + \ 'type': 'I', + \ 'text': 'Double quote to prevent globbing and word splitting.', + \ 'code': 'SC2086', + \ }, + \ ], + \ ale#handlers#shellcheck#Handle(bufnr(''), [ + \ '-:3:3: note: Double quote to prevent globbing and word splitting. [SC2086]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_slim_handler.vader b/dot_vim/plugged/ale/test/handler/test_slim_handler.vader new file mode 100644 index 0000000..bfd29f3 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_slim_handler.vader @@ -0,0 +1,34 @@ +" Author: Markus Doits +Before: + runtime ale_linters/slim/slimlint.vim + +After: + call ale#linter#Reset() + +Execute(The slim handler should parse lines correctly): + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': '`div` is redundant when class attribute shortcut is present', + \ 'code': 'RedundantDiv', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'text': 'Line is too long. [136/80]', + \ 'code': 'LineLength', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'text': 'Invalid syntax', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#slim#slimlint#Handle(347, [ + \ 'inv.slim:1 [W] RedundantDiv: `div` is redundant when class attribute shortcut is present', + \ 'inv.slim:2 [W] LineLength: Line is too long. [136/80]', + \ 'inv.slim:3 [E] Invalid syntax', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_sml_handler.vader b/dot_vim/plugged/ale/test/handler/test_sml_handler.vader new file mode 100644 index 0000000..ef93cc4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_sml_handler.vader @@ -0,0 +1,119 @@ +Execute (Testing on EOF error): + AssertEqual [ + \ { + \ 'filename': 'a.sml', + \ 'lnum': 2, + \ 'col': 15, + \ 'type': 'E', + \ 'text': 'Error: syntax error found at EOF', + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]", + \ "[opening a.sml]", + \ "a.sml:2.16 Error: syntax error found at EOF", + \ '/usr/lib/smlnj/bin/sml: Fatal error -- Uncaught exception Compile with "syntax error" raised at ../compiler/Parse/main/smlfile.sml:15.24-15.46', + \]) + +Execute (Testing if the handler can handle multiple errors on the same line): + AssertEqual [ + \ { + \ 'filename': 'a.sml', + \ 'lnum': 1, + \ 'col': 5, + \ 'type': 'E', + \ 'text': "Error: can't find function arguments in clause", + \ }, + \ { + \ 'filename': 'a.sml', + \ 'lnum': 1, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'Error: unbound variable or constructor: wow', + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]", + \ "[opening test.sml]", + \ "a.sml:1.6-1.10 Error: can't find function arguments in clause", + \ "a.sml:1.13-1.16 Error: unbound variable or constructor: wow", + \ "/usr/lib/smlnj/bin/sml: Fatal error -- Uncaught exception Error with 0", + \ "raised at ../compiler/TopLevel/interact/evalloop.sml:66.19-66.27", + \]) + +Execute (Testing rarer errors): + AssertEqual [ + \ { + \ 'filename': 'a.sml', + \ 'lnum': 5, + \ 'col': 18, + \ 'type': 'E', + \ 'text': "Error: syntax error found at ID", + \ }, + \ { + \ 'filename': 'a.sml', + \ 'lnum': 7, + \ 'col': 0, + \ 'type': 'E', + \ 'text': "Error: value type in structure doesn't match signature spec", + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]", + \ "[opening test.sml]", + \ "a.sml:5.19 Error: syntax error found at ID", + \ "a.sml:7.1-9.27 Error: value type in structure doesn't match signature spec", + \ "/usr/lib/smlnj/bin/sml: Fatal error -- Uncaught exception Error with 0", + \ "raised at ../compiler/TopLevel/interact/evalloop.sml:66.19-66.27", + \]) + +Execute (Testing a warning): + AssertEqual [ + \ { + \ 'filename': 'a.sml', + \ 'lnum': 4, + \ 'col': 4, + \ 'type': 'W', + \ 'text': "Warning: match nonexhaustive", + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]", + \ "[opening a.sml]", + \ "a.sml:4.5-4.12 Warning: match nonexhaustive", + \ "0 => ...", + \ "val f = fn : int -> int", + \ "-", + \]) + +Execute (Testing stdIn): + AssertEqual [ + \ { + \ 'bufnr': 42, + \ 'lnum': 1, + \ 'col': 5, + \ 'type': 'E', + \ 'text': "Error: operator and operand don't agree [overload conflict]", + \ }, + \ { + \ 'bufnr': 42, + \ 'lnum': 2, + \ 'col': 4, + \ 'type': 'E', + \ 'text': "Error: operator and operand don't agree [overload conflict]", + \ }, + \], + \ ale#handlers#sml#Handle(42, [ + \ "Standard ML of New Jersey v110.79 [built: Sat Oct 26 12:27:04 2019]", + \ "- = stdIn:1.6-1.21 Error: operator and operand don't agree [overload conflict]", + \ " operator domain: [+ ty] * [+ ty]", + \ " operand: string * [int ty]", + \ " in expression:", + \ ' "abc" + 123', + \ "stdIn:2.5-2.20 Error: operator and operand don't agree [overload conflict]", + \ " operator domain: [+ ty] * [+ ty]", + \ " operand: [+ ty] * string", + \ " in expression:", + \ ' 890 + "xyz"', + \ "-", + \]) diff --git a/dot_vim/plugged/ale/test/handler/test_solc_handler.vader b/dot_vim/plugged/ale/test/handler/test_solc_handler.vader new file mode 100644 index 0000000..dcaa8b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_solc_handler.vader @@ -0,0 +1,34 @@ +Before: + runtime ale_linters/solidity/solc.vim + +After: + call ale#linter#Reset() + +Execute(Check solc output parsing): + AssertEqual + \ [ + \ { + \ 'lnum': 40, + \ 'col': 48, + \ 'text': 'This declaration shadows an existing declaration.', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 23, + \ 'col': 16, + \ 'text': 'Member "getSinleSignature" not found or not visible after argument-dependent lookup in type(contract OneToN).', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#solidity#solc#Handle(bufnr(''), [ + \ 'Warning: This declaration shadows an existing declaration.', + \ ' --> /path/to/file.sol:40:48:', + \ ' |', + \ '40 | function decimals() external view returns (uint8 decimals);', + \ ' | ^------------^', + \ 'Error: Member "getSinleSignature" not found or not visible after argument-dependent lookup in type(contract OneToN).', + \ ' --> /path/to/file.sol:23:16: ', + \ ' | ', + \ '23 | return OneToN.getSinleSignature(signatures, i);', + \ ' | ^----------------------^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_solhint_handler.vader b/dot_vim/plugged/ale/test/handler/test_solhint_handler.vader new file mode 100644 index 0000000..f8fffb6 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_solhint_handler.vader @@ -0,0 +1,84 @@ +Before: + runtime ale_linters/solidity/solhint.vim + +After: + call ale#linter#Reset() + +Execute(The solhint handler should parse linter error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 17, + \ 'text': 'Compiler version must be fixed', + \ 'code': 'compiler-fixed', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 8, + \ 'text': 'Use double quotes for string literals', + \ 'code': 'quotes', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 8, + \ 'text': 'Use double quotes for string literals', + \ 'code': 'quotes', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 13, + \ 'col': 3, + \ 'text': 'Expected indentation of 4 spaces but found 2', + \ 'code': 'indent', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 14, + \ 'col': 3, + \ 'text': 'Expected indentation of 4 spaces but found 2', + \ 'code': 'indent', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 47, + \ 'col': 3, + \ 'text': 'Function order is incorrect, public function can not go after internal function.', + \ 'code': 'func-order', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#solhint#Handle(bufnr(''), [ + \ 'contracts/Bounty.sol: line 1, col 17, Warning - Compiler version must be fixed (compiler-fixed)', + \ 'contracts/Bounty.sol: line 4, col 8, Error - Use double quotes for string literals (quotes)', + \ 'contracts/Bounty.sol: line 5, col 8, Error - Use double quotes for string literals (quotes)', + \ 'contracts/Bounty.sol: line 13, col 3, Error - Expected indentation of 4 spaces but found 2 (indent)', + \ 'contracts/Bounty.sol: line 14, col 3, Error - Expected indentation of 4 spaces but found 2 (indent)', + \ 'contracts/Bounty.sol: line 47, col 3, Error - Function order is incorrect, public function can not go after internal function. (func-order)', + \ ]) + + +Execute(The solhint handler should parse syntax error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 30, + \ 'col': 4, + \ 'text': "missing ';' at 'uint248'", + \ 'code': 'Parse error', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 203, + \ 'col': 4, + \ 'text': "no viable alternative at input '_loserStakeMultiplier}'", + \ 'code': 'Parse error', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#solhint#Handle(bufnr(''), [ + \ "contracts/Bounty.sol: line 30, col 4, Error - Parse error: missing ';' at 'uint248'", + \ "contracts/Bounty.sol: line 203, col 4, Error - Parse error: no viable alternative at input '_loserStakeMultiplier}'", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_spectral_handler.vader b/dot_vim/plugged/ale/test/handler/test_spectral_handler.vader new file mode 100644 index 0000000..89a3ff1 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_spectral_handler.vader @@ -0,0 +1,52 @@ +Before: + runtime ale_linters/yaml/spectral.vim + +After: + call ale#linter#Reset() + +Execute(spectral handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'code': 'oas3-api-servers', + \ 'text': 'OpenAPI `servers` must be present and non-empty array.', + \ 'type': 'W' + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'code': 'oas3-schema', + \ 'text': 'Object should have required property `paths`.', + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'code': 'openapi-tags', + \ 'text': 'OpenAPI object should have non-empty `tags` array.', + \ 'type': 'W' + \ }, + \ { + \ 'lnum': 3, + \ 'col': 6, + \ 'code': 'info-contact', + \ 'text': 'Info object should contain `contact` object.', + \ 'type': 'W' + \ }, + \ { + \ 'lnum': 3, + \ 'col': 6, + \ 'code': 'oas3-schema', + \ 'text': '`info` property should have required property `version`.', + \ 'type': 'E' + \ }, + \ ], + \ ale#handlers#spectral#HandleSpectralOutput(bufnr(''), [ + \ 'openapi.yml:1:1 warning oas3-api-servers "OpenAPI `servers` must be present and non-empty array."', + \ 'openapi.yml:1:1 error oas3-schema "Object should have required property `paths`."', + \ 'openapi.yml:1:1 warning openapi-tags "OpenAPI object should have non-empty `tags` array."', + \ 'openapi.yml:3:6 warning info-contact "Info object should contain `contact` object."', + \ 'openapi.yml:3:6 error oas3-schema "`info` property should have required property `version`."', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_sql_sqlfluff_handler.vader b/dot_vim/plugged/ale/test/handler/test_sql_sqlfluff_handler.vader new file mode 100644 index 0000000..f1f684b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_sql_sqlfluff_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/sql/sqlfluff.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The sqlfluff handler should handle basic warnings): + AssertEqual + \ [ + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 1, + \ 'col': 8, + \ 'type': 'W', + \ 'code': 'L010', + \ 'text': 'Keywords must be consistently upper case.', + \ }, + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 13, + \ 'col': 2, + \ 'type': 'W', + \ 'code': 'L003', + \ 'text': 'Expected 1 indentation, found 0 [compared to line 12]', + \ }, + \ { + \ 'filename': 'schema.sql', + \ 'lnum': 16, + \ 'col': 1, + \ 'type': 'W', + \ 'code': 'L009', + \ 'text': 'Files must end with a single trailing newline.', + \ }, + \ ], + \ ale_linters#sql#sqlfluff#Handle(1, [ + \ '[{"filepath": "schema.sql", "violations": [{"line_no": 1, "line_pos": 8, "code": "L010", "description": "Keywords must be consistently upper case."}, {"line_no": 13, "line_pos": 2, "code": "L003", "description": "Expected 1 indentation, found 0 [compared to line 12]"}, {"line_no": 16, "line_pos": 1, "code": "L009", "description": "Files must end with a single trailing newline."}]}]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_sqlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_sqlint_handler.vader new file mode 100644 index 0000000..5567ca4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_sqlint_handler.vader @@ -0,0 +1,34 @@ +Before: + runtime! ale_linters/sql/sqlint.vim + +After: + call ale#linter#Reset() + +Execute(The sqlint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 1, + \ 'text': 'syntax error at or near "WIBBLE"', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 47, + \ 'col': 11, + \ 'text': 'unterminated quoted string at or near "''', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 50, + \ 'col': 12, + \ 'text': 'some warning at end of input', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#sql#sqlint#Handle(347, [ + \ 'This line should be ignored completely', + \ 'stdin:3:1:ERROR syntax error at or near "WIBBLE"', + \ 'stdin:47:11:ERROR unterminated quoted string at or near "''', + \ 'stdin:50:12:WARNING some warning at end of input', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_sqllint_handler.vader b/dot_vim/plugged/ale/test/handler/test_sqllint_handler.vader new file mode 100644 index 0000000..2f2283c --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_sqllint_handler.vader @@ -0,0 +1,23 @@ +Before: + " Load the file which defines the linter. + runtime ale_linters/sql/sqllint.vim + +After: + " Unload all linters again. + call ale#linter#Reset() + +Execute (The output should be correct): + + " Test that the right loclist items are parsed from the handler. + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 0, + \ 'type': '', + \ 'text': 'stdin:1 [ER_NO_DB_ERROR] No database selected' + \ }, + \ ], + \ ale_linters#sql#sqllint#Handle(bufnr(''), [ + \ 'stdin:1 [ER_NO_DB_ERROR] No database selected' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_standard_handler.vader b/dot_vim/plugged/ale/test/handler/test_standard_handler.vader new file mode 100644 index 0000000..31e3a36 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_standard_handler.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_javascript_eslint_suppress_eslintignore + + let g:ale_javascript_eslint_suppress_eslintignore = 0 + +After: + Restore + +Execute(The standard handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 47, + \ 'col': 14, + \ 'text': 'Expected indentation of 2 spaces but found 4.', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 56, + \ 'col': 41, + \ 'text': 'Strings must use singlequote.', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 13, + \ 'col': 3, + \ 'text': 'Parsing error: Unexpected token', + \ 'type': 'E', + \ }, + \ ], + \ ale#handlers#eslint#Handle(347, [ + \ 'This line should be ignored completely', + \ '/path/to/some-filename.js:47:14: Expected indentation of 2 spaces but found 4.', + \ '/path/to/some-filename.js:56:41: Strings must use singlequote.', + \ 'This line should be ignored completely', + \ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_starknet_handler.vader b/dot_vim/plugged/ale/test/handler/test_starknet_handler.vader new file mode 100644 index 0000000..767cb21 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_starknet_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/cairo/starknet.vim + +After: + call ale#linter#Reset() + +Execute(The starknet handler should handle error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col': 6, + \ 'text': 'Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#cairo#starknet#Handle(bufnr(''), [ + \ 'contract.cairo:3:6: Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:', + \ 'from starkware.cairo.commo.cairo_builtins import HashBuiltin', + \ ' ^**********************************^', + \ ]) + + AssertEqual + \ [ + \ { + \ 'lnum': 21, + \ 'col': 2, + \ 'text': 'Unsupported decorator: "vie".', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#cairo#starknet#Handle(bufnr(''), [ + \ 'contract.cairo:21:2: Unsupported decorator: "vie".', + \ '@vie', + \ ' ^*^', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_statix_handler.vader b/dot_vim/plugged/ale/test/handler/test_statix_handler.vader new file mode 100644 index 0000000..f2a105e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_statix_handler.vader @@ -0,0 +1,16 @@ +Execute(The statix handler should handle statix output): + call ale#test#SetFilename('flake.nix') + + AssertEqual + \ [ + \ { + \ 'lnum': 46, + \ 'type': 'W', + \ 'col': 13, + \ 'code': '3', + \ 'text': 'This assignment is better written with `inherit`' + \ }, + \ ], + \ ale#handlers#statix#Handle(bufnr(''), + \ '>46:13:W:3:This assignment is better written with `inherit`' + \) diff --git a/dot_vim/plugged/ale/test/handler/test_stylelint_handler.vader b/dot_vim/plugged/ale/test/handler/test_stylelint_handler.vader new file mode 100644 index 0000000..5cb3460 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_stylelint_handler.vader @@ -0,0 +1,43 @@ +After: + unlet! g:error_lines + +Execute (stylelint errors should be handled correctly): + " Stylelint includes trailing spaces for output. This needs to be taken into + " account for parsing errors. + AssertEqual + \ [ + \ { + \ 'lnum': 108, + \ 'col': 10, + \ 'type': 'E', + \ 'text': 'Unexpected leading zero', + \ 'code': 'number-leading-zero', + \ }, + \ { + \ 'lnum': 116, + \ 'col': 20, + \ 'type': 'E', + \ 'text': 'Expected a trailing semicolon', + \ 'code': 'declaration-block-trailing-semicolon', + \ }, + \ ], + \ ale#handlers#css#HandleStyleLintFormat(42, [ + \ 'src/main.css', + \ ' 108:10 ✖ Unexpected leading zero number-leading-zero ', + \ ' 116:20 ✖ Expected a trailing semicolon declaration-block-trailing-semicolon', + \ ]) + +Execute (stylelint should complain when no configuration file is used): + let g:error_lines = [ + \ 'Error: No configuration provided for /home/w0rp/.vim/bundle/ale/test.stylus', + \ ' at module.exports (/home/w0rp/.vim/bundle/ale/node_modules/stylelint/lib/utils/configurationError.js:8:27)', + \ ' at stylelint._fullExplorer.load.then.then.config (/home/w0rp/.vim/bundle/ale/node_modules/stylelint/lib/getConfigForFile.js:39:13)', + \] + + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'stylelint exception thrown (type :ALEDetail for more information)', + \ 'detail': join(g:error_lines, "\n"), + \ }], + \ ale#handlers#css#HandleStyleLintFormat(347, g:error_lines[:]) diff --git a/dot_vim/plugged/ale/test/handler/test_swaglint_handler.vader b/dot_vim/plugged/ale/test/handler/test_swaglint_handler.vader new file mode 100644 index 0000000..7ab1043 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_swaglint_handler.vader @@ -0,0 +1,68 @@ +Before: + runtime ale_linters/yaml/swaglint.vim + +After: + call ale#linter#Reset() + +Execute(The swaglint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'Missing required property: info', + \ 'code': 'sway_object_missing_required_property', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 9, + \ 'text': 'Not a valid response definition', + \ 'code': 'sway_one_of_missing', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 11, + \ 'text': 'Missing required property: description', + \ 'code': 'sway_object_missing_required_property', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 11, + \ 'text': 'Missing required property: $ref', + \ 'code': 'sway_object_missing_required_property', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'text': 'Expected type string but found type integer', + \ 'code': 'sway_invalid_type', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'text': 'No enum match for: 2', + \ 'code': 'sway_enum_mismatch', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 14, + \ 'col': 3, + \ 'text': 'Definition is not used: #/definitions/Foo', + \ 'code': 'sway_unused_definition', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#yaml#swaglint#Handle(347, [ + \ 'swagger.yaml: error @ 1:1 - Missing required property: info (sway_object_missing_required_property)', + \ 'swagger.yaml: error @ 6:9 - Not a valid response definition (sway_one_of_missing)', + \ 'swagger.yaml: error @ 7:11 - Missing required property: description (sway_object_missing_required_property)', + \ 'swagger.yaml: error @ 7:11 - Missing required property: $ref (sway_object_missing_required_property)', + \ 'swagger.yaml: error @ 1:10 - Expected type string but found type integer (sway_invalid_type)', + \ 'swagger.yaml: error @ 1:10 - No enum match for: 2 (sway_enum_mismatch)', + \ 'swagger.yaml: warning @ 14:3 - Definition is not used: #/definitions/Foo (sway_unused_definition)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_swiftlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_swiftlint_handler.vader new file mode 100644 index 0000000..725ff97 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_swiftlint_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/swift/swiftlint.vim + +After: + call ale#linter#Reset() + +Execute(The swiftint handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 7, + \ 'text': 'Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used.', + \ 'code': 'operator_usage_whitespace', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 11, + \ 'text': 'Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used.', + \ 'code': 'operator_usage_whitespace', + \ 'type': 'W', + \ }, + \ + \ ], + \ ale_linters#swift#swiftlint#Handle(bufnr(''), [ + \ 'This line should be ignored', + \ ':1:7: warning: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace)', + \ ':1:11: warning: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_swipl_handler.vader b/dot_vim/plugged/ale/test/handler/test_swipl_handler.vader new file mode 100644 index 0000000..81b8b9e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_swipl_handler.vader @@ -0,0 +1,155 @@ +Before: + runtime ale_linters/prolog/swipl.vim + +After: + call ale#linter#Reset() + +Execute (The swipl handler should handle oneline warning / error): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 1, + \ 'text': 'Syntax error: Operator expected', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'ERROR: /path/to/test.pl:5:1: Syntax error: Operator expected', + \ ]) + +Execute (The swipl handler should handle a warning / error of two lines): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'col': 0, + \ 'text': 'Singleton variables: [M]', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'Warning: /path/to/test.pl:9:', + \ ' Singleton variables: [M]', + \ ]) + +Execute (The swipl handler should handle a warning / error of two lines in the new format): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'col': 0, + \ 'text': 'Singleton variables: [M]', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'Warning: /path/to/test.pl:9:', + \ 'Warning: Singleton variables: [M]', + \ ]) + +Execute (The swipl handler should join three or more lines with '. '): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'col': 0, + \ 'text': 'Clauses of fib/2 are not together in the source-file. Earlier definition at /path/to/test.pl:7. Current predicate: f/0. Use :- discontiguous fib/2. to suppress this message', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'Warning: /path/to/test.pl:10:', + \ ' Clauses of fib/2 are not together in the source-file', + \ ' Earlier definition at /path/to/test.pl:7', + \ ' Current predicate: f/0', + \ ' Use :- discontiguous fib/2. to suppress this message', + \ ]) + +Execute (The swipl handler should ignore warnings / errors 'No permission to call sandboxed ...'): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'ERROR: /path/to/test.pl:11:', + \ ' No permission to call sandboxed `''$set_predicate_attribute''(_G3416:_G3417,_G3413,_G3414)''', + \ ' Reachable from:', + \ ' system:''$set_pattr''(A,B,C,D)', + \ ' system:''$set_pattr''(vimscript:A,B,C)', + \ ' vimscript: (multifile A)', + \ 'ERROR: /path/to/test.pl:12:', + \ ' No permission to call sandboxed `''$set_predicate_attribute''(_G205:_G206,_G202,_G203)''', + \ ' Reachable from:', + \ ' system:''$set_pattr''(A,B,C,D)', + \ ' system:''$set_pattr''(vimscript:A,B,C)', + \ ' vimscript: (multifile A)', + \ 'ERROR: /path/to/test.pl:13:', + \ ' No permission to call sandboxed `''$set_predicate_attribute''(_G1808:_G1809,_G1805,_G1806)''', + \ ' Reachable from:', + \ ' system:''$set_pattr''(A,B,C,D)', + \ ' system:''$set_pattr''(vimscript:A,B,C)', + \ ' vimscript: (multifile A)', + \ ]) + +Execute (The swipl handler should join three or more lines with '. ' on latest swipl): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 10, + \ 'col': 0, + \ 'text': 'Clauses of fib/2 are not together in the source-file. Earlier definition at /path/to/test.pl:7. Current predicate: f/0. Use :- discontiguous fib/2. to suppress this message', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'Warning: /path/to/test.pl:10:', + \ 'Warning: Clauses of fib/2 are not together in the source-file', + \ 'Warning: Earlier definition at /path/to/test.pl:7', + \ 'Warning: Current predicate: f/0', + \ 'Warning: Use :- discontiguous fib/2. to suppress this message', + \ ]) + +Execute (The swipl handler should ignore warnings / errors 'No permission to call sandboxed with latest swpl...'): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'ERROR: /path/to/test.pl:11:', + \ 'ERROR: No permission to call sandboxed `''$set_predicate_attribute''(_G3416:_G3417,_G3413,_G3414)''', + \ 'ERROR: Reachable from:', + \ 'ERROR: system:''$set_pattr''(A,B,C,D)', + \ 'ERROR: system:''$set_pattr''(vimscript:A,B,C)', + \ 'ERROR: vimscript: (multifile A)', + \ 'ERROR: /path/to/test.pl:12:', + \ 'ERROR: No permission to call sandboxed `''$set_predicate_attribute''(_G205:_G206,_G202,_G203)''', + \ 'ERROR: Reachable from:', + \ 'ERROR: system:''$set_pattr''(A,B,C,D)', + \ 'ERROR: system:''$set_pattr''(vimscript:A,B,C)', + \ 'ERROR: vimscript: (multifile A)', + \ 'ERROR: /path/to/test.pl:13:', + \ 'ERROR: No permission to call sandboxed `''$set_predicate_attribute''(_G1808:_G1809,_G1805,_G1806)''', + \ 'ERROR: Reachable from:', + \ 'ERROR: system:''$set_pattr''(A,B,C,D)', + \ 'ERROR: system:''$set_pattr''(vimscript:A,B,C)', + \ 'ERROR: vimscript: (multifile A)', + \ ]) + +Execute (The swipl handler should handle a warning / error with no line number): + call ale#test#SetFilename('test.pl') + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 0, + \ 'text': 'Exported procedure module_name:pred/0 is not defined', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#prolog#swipl#Handle(bufnr(''), [ + \ 'ERROR: Exported procedure module_name:pred/0 is not defined', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_syntaxerl_handler.vader b/dot_vim/plugged/ale/test/handler/test_syntaxerl_handler.vader new file mode 100644 index 0000000..95f2bfe --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_syntaxerl_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/erlang/syntaxerl.vim + +After: + call ale#linter#Reset() + +Execute (Handle SyntaxErl output): + AssertEqual + \ [ + \ { + \ 'lnum': 42, + \ 'text': "syntax error before: ','", + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 42, + \ 'text': 'function foo/0 is unused', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#erlang#syntaxerl#Handle(bufnr(''), [ + \ "/tmp/v2wDixk/1/module.erl:42: syntax error before: ','", + \ '/tmp/v2wDixk/2/module.erl:42: warning: function foo/0 is unused', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_systemd_analyze_handler.vader b/dot_vim/plugged/ale/test/handler/test_systemd_analyze_handler.vader new file mode 100644 index 0000000..c7d668e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_systemd_analyze_handler.vader @@ -0,0 +1,19 @@ +Before: + runtime ale_linters/systemd/systemd_analyze.vim + +After: + call ale#linter#Reset() + +Execute(The systemd-analyze handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'Unknown key name ''Wat'' in section ''Service'', ignoring.', + \ }, + \ ], + \ ale_linters#systemd#systemd_analyze#Handle(bufnr(''), [ + \ '/home/user/.config/systemd/user/foo.service:9: Unknown key name ''Wat'' in section ''Service'', ignoring.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_terraform_handler.vader b/dot_vim/plugged/ale/test/handler/test_terraform_handler.vader new file mode 100644 index 0000000..4be89cb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_terraform_handler.vader @@ -0,0 +1,138 @@ +Before: + " Load the file which defines the linter. + runtime ale_linters/terraform/terraform.vim + call ale#test#SetDirectory('/testplugin/test/test-files/terraform') + call ale#test#SetFilename('providers.tf') + +After: + " Unload all linters again. + call ale#linter#Reset() + call ale#test#RestoreDirectory() + +Execute(The output should be correct): + AssertEqual + \ [ + \ { + \ 'lnum': 17, + \ 'col': 13, + \ 'filename': ale#path#Simplify(g:dir . '/providers.tf'), + \ 'type': 'W', + \ 'text': 'Terraform 0.13 and earlier allowed provider version', + \ }, + \ { + \ 'lnum': 0, + \ 'col': 0, + \ 'filename': ale#path#Simplify(g:dir . '/providers.tf'), + \ 'type': 'E', + \ 'text': 'Plugin reinitialization required. Please run "terraform"', + \ } + \ ], + \ ale_linters#terraform#terraform#Handle(bufnr(''), [ + \ '{', + \ '"valid": false,', + \ '"error_count": 1,', + \ '"warning_count": 1,', + \ '"diagnostics": [', + \ ' {', + \ ' "severity": "warning",', + \ ' "summary": "Version constraints inside provider configuration blocks are deprecated",', + \ ' "detail": "Terraform 0.13 and earlier allowed provider version",', + \ ' "range": {', + \ ' "filename": "providers.tf",', + \ ' "start": {', + \ ' "line": 17,', + \ ' "column": 13,', + \ ' "byte": 669', + \ ' },', + \ ' "end": {', + \ ' "line": 17,', + \ ' "column": 24,', + \ ' "byte": 680', + \ ' }', + \ ' }', + \ ' },', + \ ' {', + \ ' "severity": "error",', + \ ' "summary": "Could not load plugin",', + \ ' "detail": "Plugin reinitialization required. Please run \"terraform\""', + \ ' }', + \ ' ]', + \ '}', + \ ]) + +Execute(Should use summary if detail not available): + AssertEqual + \ [ + \ { + \ 'lnum': 91, + \ 'col': 41, + \ 'filename': ale#path#Simplify(g:dir . '/main.tf'), + \ 'type': 'E', + \ 'text': 'storage_os_disk: required field is not set', + \ } + \ ], + \ ale_linters#terraform#terraform#Handle(bufnr(''), [ + \ '{', + \ ' "valid": false,', + \ ' "error_count": 1,', + \ ' "warning_count": 0,', + \ ' "diagnostics": [', + \ ' {', + \ ' "severity": "error",', + \ ' "summary": "storage_os_disk: required field is not set",', + \ ' "range": {', + \ ' "filename": "main.tf",', + \ ' "start": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' },', + \ ' "end": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' }', + \ ' }', + \ ' }', + \ ' ]', + \ '}' + \ ]) + +Execute(Should use summary if detail available but empty): + AssertEqual + \ [ + \ { + \ 'lnum': 91, + \ 'col': 41, + \ 'filename': ale#path#Simplify(g:dir . '/main.tf'), + \ 'type': 'E', + \ 'text': 'storage_os_disk: required field is not set', + \ } + \ ], + \ ale_linters#terraform#terraform#Handle(bufnr(''), [ + \ '{', + \ ' "valid": false,', + \ ' "error_count": 1,', + \ ' "warning_count": 0,', + \ ' "diagnostics": [', + \ ' {', + \ ' "severity": "error",', + \ ' "summary": "storage_os_disk: required field is not set",', + \ ' "detail": "",', + \ ' "range": {', + \ ' "filename": "main.tf",', + \ ' "start": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' },', + \ ' "end": {', + \ ' "line": 91,', + \ ' "column": 41,', + \ ' "byte": 2381', + \ ' }', + \ ' }', + \ ' }', + \ ' ]', + \ '}' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_textlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_textlint_handler.vader new file mode 100644 index 0000000..c00d54d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_textlint_handler.vader @@ -0,0 +1,41 @@ +Before: + runtime! ale_linters/markdown/textlint.vim + +After: + call ale#linter#Reset() + +Execute(textlint handler should handle errors output): + AssertEqual + \ [ + \ { + \ 'lnum': 16, + \ 'col': 50, + \ 'text': 'Found possibly misspelled word "NeoVim".', + \ 'type': 'W', + \ 'code': 'preset-japanese/no-doubled-joshi', + \ }, + \ ], + \ ale#handlers#textlint#HandleTextlintOutput(bufnr(''), [ + \ '[', + \ ' {', + \ ' "filePath": "test.md",', + \ ' "messages": [', + \ ' {', + \ ' "type": "lint",', + \ ' "ruleId": "preset-japanese/no-doubled-joshi",', + \ ' "index": 1332,', + \ ' "line": 16,', + \ ' "column": 50,', + \ ' "severity": 2,', + \ ' "message": "Found possibly misspelled word \"NeoVim\"."', + \ ' }', + \ ' ]', + \ ' }', + \ ']', + \ ]) + +Execute(textlint handler should no error output): + AssertEqual + \ [], + \ ale#handlers#textlint#HandleTextlintOutput(bufnr(''), [ + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_tflint_handler.vader b/dot_vim/plugged/ale/test/handler/test_tflint_handler.vader new file mode 100644 index 0000000..6b8173a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_tflint_handler.vader @@ -0,0 +1,99 @@ +Before: + runtime! ale_linters/terraform/tflint.vim + +After: + call ale#linter#Reset() + +Execute(The tflint handler should parse items correctly for pre 0.11): + AssertEqual + \ [ + \ { + \ 'lnum': 12, + \ 'text': 'be warned, traveller', + \ 'code': 'aws_db_instance_readable_password', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 9, + \ 'text': 'error message', + \ 'code': 'aws_elasticache_cluster_invalid_type', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 5, + \ 'text': 'just so ya know', + \ 'code': 'aws_instance_not_specified_iam_profile', + \ 'type': 'I', + \ }, + \ ], + \ ale_linters#terraform#tflint#Handle(123, [ + \ '[ { "detector": "aws_db_instance_readable_password", "type": "WARNING", "message": "be warned, traveller", "line": 12, "file": "github.com/wata727/example-module/aws_db_instance.tf", "link": "https://github.com/wata727/tflint/blob/master/docs/aws_db_instance_readable_password.md" }, { "detector": "aws_elasticache_cluster_invalid_type", "type": "ERROR", "message": "error message", "line": 9, "file": "github.com/wata727/example-module/aws_elasticache_cluster.tf", "link": "https://github.com/wata727/tflint/blob/master/docs/aws_elasticache_cluster_invalid_type.md" }, { "detector": "aws_instance_not_specified_iam_profile", "type": "NOTICE", "message": "just so ya know", "line": 5, "file": "github.com/wata727/example-module/aws_instance.tf", "link": "https://github.com/wata727/tflint/blob/master/docs/aws_instance_not_specified_iam_profile.md" } ]' + \ ]) + +Execute(The tflint handler should parse items correctly): + AssertEqual + \ [ + \ { + \ 'filename': 'github.com/wata727/example-module/aws_instance.tf', + \ 'lnum': 1, + \ 'col': 30, + \ 'end_lnum': 2, + \ 'end_col': 1, + \ 'text': 'A block definition must have block content delimited by "{" and "}", starting on the same line as the block header.', + \ 'code': 'Invalid block definition', + \ 'type': 'E', + \ }, + \ { + \ 'filename': 'github.com/wata727/example-module/aws_instance.tf', + \ 'lnum': 2, + \ 'col': 3, + \ 'end_lnum': 2, + \ 'end_col': 6, + \ 'text': 'An argument named "ami" is not expected here.', + \ 'code': 'Unsupported argument', + \ 'type': 'E', + \ }, + \ { + \ 'filename': 'github.com/wata727/example-module/aws_instance.tf', + \ 'lnum': 3, + \ 'col': 3, + \ 'end_lnum': 1, + \ 'end_col': 6, + \ 'text': 'An argument named "instance_type" is not expected here.', + \ 'code': 'Unsupported argument', + \ 'type': 'E', + \ }, + \ { + \ 'filename': 'github.com/wata727/example-module/aws_db_instance.tf', + \ 'lnum': 12, + \ 'col': 11, + \ 'end_lnum': 12, + \ 'end_col': 21, + \ 'text': 'be warned, traveller', + \ 'code': 'aws_db_instance_readable_password', + \ 'type': 'W', + \ }, + \ { + \ 'filename': 'github.com/wata727/example-module/aws_elasticache_cluster.tf', + \ 'lnum': 9, + \ 'col': 29, + \ 'end_lnum': 9, + \ 'end_col': 29, + \ 'text': 'error message', + \ 'code': 'aws_elasticache_cluster_invalid_type', + \ 'type': 'E', + \ }, + \ { + \ 'filename': 'github.com/wata727/example-module/aws_instance.tf', + \ 'lnum': 5, + \ 'col': 15, + \ 'end_lnum': 5, + \ 'end_col': 25, + \ 'text': 'just so ya know', + \ 'code': 'aws_instance_not_specified_iam_profile', + \ 'type': 'I', + \ }, + \ ], + \ ale_linters#terraform#tflint#Handle(123, [ + \ '{"issues":[{"rule":{"name":"aws_db_instance_readable_password","severity":"WARNING","link":"https://github.com/wata727/tflint/blob/master/docs/aws_db_instance_readable_password.md"},"message":"be warned, traveller","range":{"filename":"github.com/wata727/example-module/aws_db_instance.tf","start":{"line":12,"column":11},"end":{"line":12,"column":21},"callers":[]}},{"rule":{"name":"aws_elasticache_cluster_invalid_type","severity":"ERROR","link":"https://github.com/wata727/tflint/blob/master/docs/aws_elasticache_cluster_invalid_type.md"},"message":"error message","range":{"filename":"github.com/wata727/example-module/aws_elasticache_cluster.tf","start":{"line":9,"column":29},"end":{"line":9,"column":29},"callers":[]}},{"rule":{"name":"aws_instance_not_specified_iam_profile","severity":"NOTICE","link":"https://github.com/wata727/tflint/blob/master/docs/aws_instance_not_specified_iam_profile.md"},"message":"just so ya know","range":{"filename":"github.com/wata727/example-module/aws_instance.tf","start":{"line":5,"column":15},"end":{"line":5,"column":25},"callers":[]}}],"errors":[{"message":"github.com/wata727/example-module/aws_instance.tf:1,30-2,1: Invalid block definition; A block definition must have block content delimited by \"{\" and \"}\", starting on the same line as the block header."},{"message":"github.com/wata727/example-module/aws_instance.tf:2,3-6: Unsupported argument; An argument named \"ami\" is not expected here."},{"message":"github.com/wata727/example-module/aws_instance.tf:3,3-16: Unsupported argument; An argument named \"instance_type\" is not expected here."}]}' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_tfsec_handler.vader b/dot_vim/plugged/ale/test/handler/test_tfsec_handler.vader new file mode 100644 index 0000000..f656698 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_tfsec_handler.vader @@ -0,0 +1,52 @@ +Before: + runtime ale_linters/terraform/tfsec.vim + +After: + call ale#linter#Reset() + +Execute(The tfsec handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#terraform#tfsec#Handle(bufnr(''), ['{"results": null}']) + +Execute(The tfsec handler should parse results correctly): + AssertEqual + \ [ + \ { + \ 'filename': '/test/main.tf', + \ 'lnum': 10, + \ 'end_lnum': 12, + \ 'text': "IAM policy document uses sensitive action 'iam:PassRole' on wildcarded resource '*'", + \ 'code': 'aws-iam-no-policy-wildcards', + \ 'type': 'W', + \ }, + \], + \ ale_linters#terraform#tfsec#Handle(bufnr(''), json_encode( + \ { + \ "results": [ + \ { + \ "rule_id": "AVD-AWS-0057", + \ "long_id": "aws-iam-no-policy-wildcards", + \ "rule_description": "IAM policy should avoid use of wildcards and instead apply the principle of least privilege", + \ "rule_provider": "aws", + \ "rule_service": "iam", + \ "impact": "Overly permissive policies may grant access to sensitive resources", + \ "resolution": "Specify the exact permissions required, and to which resources they should apply instead of using wildcards.", + \ "links": [ + \ "https://aquasecurity.github.io/tfsec/v1.28.0/checks/aws/iam/no-policy-wildcards/", + \ "https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document" + \ ], + \ "description": "IAM policy document uses sensitive action 'iam:PassRole' on wildcarded resource '*'", + \ "severity": "HIGH", + \ "warning": v:false, + \ "status": 0, + \ "resource": "data.aws_iam_policy_document.default", + \ "location": { + \ "filename": "/test/main.tf", + \ "start_line": 10, + \ "end_line": 12 + \ } + \ } + \ ] + \ } + \)) diff --git a/dot_vim/plugged/ale/test/handler/test_thrift_handler.vader b/dot_vim/plugged/ale/test/handler/test_thrift_handler.vader new file mode 100644 index 0000000..9bdb937 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_thrift_handler.vader @@ -0,0 +1,63 @@ +Before: + runtime ale_linters/thrift/thrift.vim + +After: + call ale#linter#Reset() + +Execute(The thrift handler should handle basic warnings and errors): + AssertEqual + \ [ + \ { + \ 'lnum': 17, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'The "byte" type is a compatibility alias for "i8". Use i8" to emphasize the signedness of this type.', + \ }, + \ { + \ 'lnum': 20, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'Could not find include file include.thrift', + \ }, + \ { + \ 'lnum': 83, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Enum FOO is already defined!', + \ }, + \ ], + \ ale_linters#thrift#thrift#Handle(1, [ + \ '[WARNING:/path/filename.thrift:17] The "byte" type is a compatibility alias for "i8". Use i8" to emphasize the signedness of this type.', + \ '[WARNING:/path/filename.thrift:20] Could not find include file include.thrift', + \ '[FAILURE:/path/filename.thrift:83] Enum FOO is already defined!', + \ ]) + +Execute(The thrift handler should handle multiline errors): + AssertEqual + \ [ + \ { + \ 'lnum': 75, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'This integer is too big: "11111111114213213453243"', + \ }, + \ { + \ 'lnum': 76, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Implicit field keys are deprecated and not allowed with -strict', + \ }, + \ { + \ 'lnum': 77, + \ 'col': 0, + \ 'type': 'E', + \ 'text': "Unknown error (last token was ';')", + \ }, + \ ], + \ ale_linters#thrift#thrift#Handle(1, [ + \ "[ERROR:/path/filename.thrift:75] (last token was '11111111114213213453243')", + \ 'This integer is too big: "11111111114213213453243"', + \ "[ERROR:/path/filename.thrift:76] (last token was ';')", + \ 'Implicit field keys are deprecated and not allowed with -strict', + \ "[ERROR:/path/filename.thrift:77] (last token was ';')", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_thriftcheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_thriftcheck_handler.vader new file mode 100644 index 0000000..e80e505 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_thriftcheck_handler.vader @@ -0,0 +1,28 @@ +Before: + runtime ale_linters/thrift/thriftcheck.vim + +After: + call ale#linter#Reset() + +Execute(The thriftcheck handler should handle basic warnings and errors): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': '"py" namespace must match "^idl\\."', + \ 'code': 'namespace.pattern', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'type': 'W', + \ 'text': '64-bit integer constant -2147483649 may not work in all languages', + \ 'code': 'int.64bit', + \ }, + \ ], + \ ale_linters#thrift#thriftcheck#Handle(1, [ + \ 'file.thrift:1:1: error: "py" namespace must match "^idl\\." (namespace.pattern)', + \ 'file.thrift:3:5: warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_tlint_handler.vader b/dot_vim/plugged/ale/test/handler/test_tlint_handler.vader new file mode 100644 index 0000000..e146346 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_tlint_handler.vader @@ -0,0 +1,34 @@ +Before: + runtime ale_linters/php/tlint.vim + +After: + call ale#linter#Reset() + +Execute(The tlint handler should calculate line numbers): + AssertEqual + \ [ + \ { + \ 'lnum': '5', + \ 'col': 0, + \ 'sub_type': + \ 'style', + \ 'type': 'W', + \ 'text': ['! There should be no unused imports.', 'There should be no unused imports.', '', '', '', '', '', '', '', ''] + \ }, + \ { + \ 'lnum': '15', + \ 'col': 0, + \ 'sub_type': + \ 'style', + \ 'type': 'W', + \ 'text': ['! There should be no method visibility in test methods.', 'There should be no method visibility in test methods.', '', '', '', '', '', '', '', ''] + \ }, + \ ], + \ ale_linters#php#tlint#Handle(347, [ + \ "Lints for /Users/jose/Code/Tighten/tester/tests/Unit/ExampleTest.php", + \ "============", + \ "! There should be no unused imports.", + \ "5 : `use Illuminate\Foundation\Testing\RefreshDatabase;`", + \ "! There should be no method visibility in test methods.", + \ "15 : ` public function testBasicTest()`", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_tslint_handler.vader b/dot_vim/plugged/ale/test/handler/test_tslint_handler.vader new file mode 100644 index 0000000..3653e77 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_tslint_handler.vader @@ -0,0 +1,315 @@ +Before: + Save g:ale_typescript_tslint_ignore_empty_files + + unlet! g:ale_typescript_tslint_ignore_empty_files + unlet! b:ale_typescript_tslint_ignore_empty_files + + runtime ale_linters/typescript/tslint.vim + + call ale#test#SetDirectory('/testplugin/test/handler') + +After: + Restore + + unlet! b:ale_typescript_tslint_ignore_empty_files + unlet! b:relative_to_root + unlet! b:tempname_suffix + unlet! b:relative_tempname + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(The tslint handler should parse lines correctly): + call ale#test#SetFilename('app/test.ts') + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 15, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'), + \ 'end_lnum': 1, + \ 'type': 'E', + \ 'end_col': 15, + \ 'text': 'Missing semicolon', + \ 'code': 'semicolon', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 8, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'), + \ 'end_lnum': 3, + \ 'type': 'W', + \ 'end_col': 12, + \ 'text': 'Something else', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 8, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/something-else.ts'), + \ 'end_lnum': 3, + \ 'type': 'W', + \ 'end_col': 12, + \ 'text': 'Something else', + \ 'code': 'something', + \ }, + \ { + \ 'lnum': 31, + \ 'col': 9, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'), + \ 'end_lnum': 31, + \ 'type': 'E', + \ 'end_col': 20, + \ 'text': 'Calls to console.log are not allowed.', + \ 'code': 'no-console', + \ }, + \ ] , + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([ + \ { + \ 'endPosition': { + \ 'character': 14, + \ 'line': 0, + \ 'position': 1000 + \ }, + \ 'failure': 'Missing semicolon', + \ 'fix': { + \ 'innerLength': 0, + \ 'innerStart': 14, + \ 'innerText': ';' + \ }, + \ 'name': 'test.ts', + \ 'ruleName': 'semicolon', + \ 'ruleSeverity': 'ERROR', + \ 'startPosition': { + \ 'character': 14, + \ 'line': 0, + \ 'position': 1000 + \ } + \ }, + \ { + \ 'endPosition': { + \ 'character': 11, + \ 'line': 2, + \ 'position': 1000 + \ }, + \ 'failure': 'Something else', + \ 'fix': { + \ 'innerLength': 0, + \ 'innerStart': 14, + \ 'innerText': ';' + \ }, + \ 'name': 'test.ts', + \ 'ruleSeverity': 'WARNING', + \ 'startPosition': { + \ 'character': 7, + \ 'line': 1, + \ 'position': 1000 + \ } + \ }, + \ { + \ 'endPosition': { + \ 'character': 11, + \ 'line': 2, + \ 'position': 22 + \ }, + \ 'failure': 'Something else', + \ 'fix': { + \ 'innerLength': 0, + \ 'innerStart': 14, + \ 'innerText': ';' + \ }, + \ 'name': 'something-else.ts', + \ 'ruleName': 'something', + \ 'ruleSeverity': 'WARNING', + \ 'startPosition': { + \ 'character': 7, + \ 'line': 1, + \ 'position': 14 + \ } + \ }, + \ { + \ "endPosition": { + \ "character": 19, + \ "line": 30, + \ "position": 14590 + \ }, + \ "failure": "Calls to console.log are not allowed.", + \ 'name': 'test.ts', + \ "ruleName": "no-console", + \ "startPosition": { + \ "character": 8, + \ "line": 30, + \ "position": 14579 + \ } + \ }, + \])]) + +Execute(The tslint handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#typescript#tslint#Handle(bufnr(''), []) + +Execute(The tslint handler report errors for empty files by default): + call ale#test#SetFilename('app/test.ts') + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'), + \ 'end_lnum': 2, + \ 'type': 'E', + \ 'end_col': 1, + \ 'text': 'Consecutive blank lines are forbidden', + \ 'code': 'no-consecutive-blank-lines', + \ }, + \ ], + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([{ + \ 'endPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ }, + \ 'failure': 'Consecutive blank lines are forbidden', + \ 'fix': [{ + \ 'innerStart': 0, + \ 'innerLength': 1, + \ 'innerText': '' + \ }], + \ 'name': 'test.ts', + \ 'ruleName': 'no-consecutive-blank-lines', + \ 'ruleSeverity': 'ERROR', + \ 'startPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ } + \ }])]) + +Execute(The tslint handler should not report errors for empty files when the ignore option is on): + let b:ale_typescript_tslint_ignore_empty_files = 1 + call ale#test#SetFilename('app/test.ts') + + AssertEqual + \ [ + \ ], + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([{ + \ 'endPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ }, + \ 'failure': 'Consecutive blank lines are forbidden', + \ 'fix': [{ + \ 'innerStart': 0, + \ 'innerLength': 1, + \ 'innerText': '' + \ }], + \ 'name': 'test.ts', + \ 'ruleName': 'no-consecutive-blank-lines', + \ 'ruleSeverity': 'ERROR', + \ 'startPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ } + \ }])]) + +Given typescript(A file with extra blank lines): + const x = 3 + + + const y = 4 + +Execute(The tslint handler should report errors when the ignore option is on, but the file is not empty): + let b:ale_typescript_tslint_ignore_empty_files = 1 + call ale#test#SetFilename('app/test.ts') + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'), + \ 'end_lnum': 2, + \ 'type': 'E', + \ 'end_col': 1, + \ 'text': 'Consecutive blank lines are forbidden', + \ 'code': 'no-consecutive-blank-lines', + \ }, + \ ], + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([{ + \ 'endPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ }, + \ 'failure': 'Consecutive blank lines are forbidden', + \ 'fix': [{ + \ 'innerStart': 0, + \ 'innerLength': 1, + \ 'innerText': '' + \ }], + \ 'name': 'test.ts', + \ 'ruleName': 'no-consecutive-blank-lines', + \ 'ruleSeverity': 'ERROR', + \ 'startPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ } + \ }])]) + +Execute(The tslint handler should not report no-implicit-dependencies errors): + call ale#test#SetFilename('app/test.ts') + + AssertEqual + \ [ + \ ], + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([{ + \ 'endPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ }, + \ 'failure': 'this is ignored', + \ 'name': 'test.ts', + \ 'ruleName': 'no-implicit-dependencies', + \ 'ruleSeverity': 'ERROR', + \ 'startPosition': { + \ 'character': 0, + \ 'line': 1, + \ 'position': 1 + \ }, + \ }])]) + +Execute(The tslint handler should set filename keys for temporary files): + " The temporary filename below is hacked into being a relative path so we can + " test that we resolve the temporary filename first. + let b:relative_to_root = substitute(expand('%:p'), '\v[^/\\]*([/\\])[^/\\]*', '../', 'g') + let b:tempname_suffix = substitute(tempname(), '^\v([A-Z]:)?[/\\]', '', '') + let b:relative_tempname = substitute(b:relative_to_root . b:tempname_suffix, '\\', '/', 'g') + + AssertEqual + \ [ + \ {'lnum': 47, 'col': 1, 'code': 'curly', 'end_lnum': 47, 'type': 'E', 'end_col': 26, 'text': 'if statements must be braced'}, + \ ], + \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([ + \ { + \ 'endPosition': { + \ 'character':25, + \ 'line':46, + \ 'position':1383, + \ }, + \ 'failure': 'if statements must be braced', + \ 'name': b:relative_tempname, + \ 'ruleName': 'curly', + \ 'ruleSeverity':'ERROR', + \ 'startPosition': { + \ 'character':0, + \ 'line':46, + \ 'position':1358, + \ } + \ }, + \ ])]) diff --git a/dot_vim/plugged/ale/test/handler/test_typecheck_handler.vader b/dot_vim/plugged/ale/test/handler/test_typecheck_handler.vader new file mode 100644 index 0000000..fda55d6 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_typecheck_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/typescript/typecheck.vim + +After: + call ale#linter#Reset() + +Execute(The typecheck handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 16, + \ 'col': 7, + \ 'text': "Type 'A' is not assignable to type 'B'", + \ }, + \ { + \ 'lnum': 7, + \ 'col': 41, + \ 'text': "Property 'a' does not exist on type 'A'", + \ }, + \ ], + \ ale_linters#typescript#typecheck#Handle(347, [ + \ "somets.ts[16, 7]: Type 'A' is not assignable to type 'B'", + \ "somets.ts[7, 41]: Property 'a' does not exist on type 'A'", + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_unimport_handler.vader b/dot_vim/plugged/ale/test/handler/test_unimport_handler.vader new file mode 100644 index 0000000..5acdcbb --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_unimport_handler.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/python/unimport.vim + +After: + call ale#linter#Reset() + +Execute(The unimport handler should handle import warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 9, + \ 'type': 'W', + \ 'text': 'unused: urllib.parse', + \ }, + \ ], + \ ale_linters#python#unimport#Handle(1, [ + \ 'urllib.parse at path/to/file.py:9', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_v_handler.vader b/dot_vim/plugged/ale/test/handler/test_v_handler.vader new file mode 100644 index 0000000..4d6e3d9 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_v_handler.vader @@ -0,0 +1,54 @@ +Before: + runtime ale_linters/v/v.vim + +After: + call ale#linter#Reset() + +Execute (The v handler should correctly parse error messages): + AssertEqual + \ [{ + \ 'lnum': 4, + \ 'col': 3, + \ 'filename': ale#path#GetAbsPath(expand('%:p:h'), 'const ants.v'), + \ 'type': 'W', + \ 'end_col': 14, + \ 'text': 'const names cannot contain uppercase letters, use snake_case instead' + \ }, + \ { + \ 'lnum': 4, + \ 'col': 8, + \ 'filename': ale#path#GetAbsPath(expand('%:p:h'), 'main.v'), + \ 'type': 'W', + \ 'end_col': 10, + \ 'text': 'module "os" is imported but never used' + \ }, + \ { + \ 'lnum': 20, + \ 'col': 10, + \ 'filename': ale#path#GetAbsPath(expand('%:p:h'), 'main.v'), + \ 'type': 'E', + \ 'end_col': 18, + \ 'text': 'undefined ident: `win_widt`' + \ }], + \ ale_linters#v#v#Handler('', [ + \ './const ants.v:4:3: warning: const names cannot contain uppercase letters, use snake_case instead', + \ ' 2 |', + \ ' 3 | const (', + \ ' 4 | BUTTON_TEXT = "OK"', + \ ' | ~~~~~~~~~~~', + \ ' 5 | )', + \ './main.v:4:8: warning: module "os" is imported but never used', + \ ' 2 |', + \ ' 3 | import ui', + \ ' 4 | import os', + \ ' | ~~', + \ ' 5 |', + \ ' 6 | const (', + \ './main.v:20:10: error: undefined ident: `win_widt`', + \ ' 18 | mut app := &App{}', + \ ' 19 | app.window = ui.window({', + \ ' 20 | width: win_widt', + \ ' | ~~~~~~~~', + \ ' 21 | height: win_height', + \ ' 22 | title: "Counter"', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_vala_lint_handler.vader b/dot_vim/plugged/ale/test/handler/test_vala_lint_handler.vader new file mode 100644 index 0000000..b8a4fbf --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vala_lint_handler.vader @@ -0,0 +1,54 @@ +Before: + runtime ale_linters/vala/vala_lint.vim + +After: + call ale#linter#Reset() + +Execute(The Vala-Lint handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 18, + \ 'col': 18, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 64, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 73, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#vala#vala_lint#Handle(bufnr(''), [ + \ 'Application.vala', + \ ' 18.18 error Expected space before paren space-before-paren', + \ ' 64.37 warn Expected space before paren space-before-paren', + \ ' 73.37 error Expected space before paren space-before-paren', + \ ]) + +Execute(The Vala-Lint handler should ignore unknown error types): + AssertEqual + \ [ + \ { + \ 'lnum': 73, + \ 'col': 37, + \ 'text': 'Expected space before paren', + \ 'code': 'space-before-paren', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#vala#vala_lint#Handle(bufnr(''), [ + \ 'Application.vala', + \ ' 18.18 test Expected space before paren space-before-paren', + \ ' 73.37 error Expected space before paren space-before-paren', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_vale_handler.vader b/dot_vim/plugged/ale/test/handler/test_vale_handler.vader new file mode 100644 index 0000000..37badb4 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vale_handler.vader @@ -0,0 +1,88 @@ +Execute(The vale handler should handle broken JSON): + AssertEqual + \ [], + \ ale#handlers#vale#Handle(bufnr(''), ["{asdf"]) + +Execute(The vale handler should handle am empty string response): + AssertEqual + \ [], + \ ale#handlers#vale#Handle(bufnr(''), []) + +Execute(The vale handler should handle an empty result): + AssertEqual + \ [], + \ ale#handlers#vale#Handle(bufnr(''), ["{}"]) + +Execute(The vale handler should handle a normal example): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 195, + \ 'end_col': 201, + \ 'type': 'W', + \ 'text': "Consider removing 'usually'", + \ 'code': 'vale.Hedging', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 1, + \ 'end_col': 27, + \ 'type': 'E', + \ 'text': "'Documentation' is repeated!", + \ 'code': 'vale.Repetition', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 1, + \ 'end_col': 27, + \ 'type': 'I', + \ 'text': "'Documentation' is repeated!", + \ 'code': 'vale.Repetition', + \ }, + \ ], + \ ale#handlers#vale#Handle(bufnr(''), [ + \ '{', + \ ' "/home/languitar/src/autosuspend/README.md": [', + \ ' {', + \ ' "Check": "vale.Hedging",', + \ ' "Description": "",', + \ ' "Line": 5,', + \ ' "Link": "",', + \ " \"Message\": \"Consider removing 'usually'\",", + \ ' "Severity": "warning",', + \ ' "Span": [', + \ ' 195,', + \ ' 201', + \ ' ],', + \ ' "Hide": false', + \ ' },', + \ ' {', + \ ' "Check": "vale.Repetition",', + \ ' "Description": "",', + \ ' "Line": 7,', + \ ' "Link": "",', + \ " \"Message\": \"'Documentation' is repeated!\",", + \ ' "Severity": "error",', + \ ' "Span": [', + \ ' 1,', + \ ' 27', + \ ' ],', + \ ' "Hide": false', + \ ' },', + \ ' {', + \ ' "Check": "vale.Repetition",', + \ ' "Description": "",', + \ ' "Line": 7,', + \ ' "Link": "",', + \ " \"Message\": \"'Documentation' is repeated!\",", + \ ' "Severity": "suggestion",', + \ ' "Span": [', + \ ' 1,', + \ ' 27', + \ ' ],', + \ ' "Hide": false', + \ ' }', + \ ' ]', + \ '}', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_vcom_handler.vader b/dot_vim/plugged/ale/test/handler/test_vcom_handler.vader new file mode 100644 index 0000000..943b525 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vcom_handler.vader @@ -0,0 +1,36 @@ +Before: + runtime ale_linters/vhdl/vcom.vim + +After: + call ale#linter#Reset() + +Execute(The vcom handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 218, + \ 'type': 'W', + \ 'text': '(vcom-1236) Shared variables must be of a protected type.' + \ }, + \ { + \ 'lnum': 73, + \ 'type': 'E', + \ 'text': '(vcom-1136) Unknown identifier "aresetn".' + \ }, + \ { + \ 'lnum': 73, + \ 'type': 'E', + \ 'text': 'Bad resolution function (STD_LOGIC) for type (error).' + \ }, + \ { + \ 'lnum': 73, + \ 'type': 'E', + \ 'text': 'near ":": (vcom-1576) expecting ";" or ")".' + \ }, + \ ], + \ ale_linters#vhdl#vcom#Handle(bufnr(''), [ + \ '** Warning: ../path/to/file.vhd(218): (vcom-1236) Shared variables must be of a protected type.', + \ '** Error: tb_file.vhd(73): (vcom-1136) Unknown identifier "aresetn".', + \ '** Error: tb_file.vhd(73): Bad resolution function (STD_LOGIC) for type (error).', + \ '** Error: tb_file.vhd(73): near ":": (vcom-1576) expecting ";" or ")".', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_verilator_handler.vader b/dot_vim/plugged/ale/test/handler/test_verilator_handler.vader new file mode 100644 index 0000000..59ec136 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_verilator_handler.vader @@ -0,0 +1,52 @@ +Before: + runtime ale_linters/verilog/verilator.vim + +After: + call ale#linter#Reset() + + +Execute (The verilator handler should parse legacy messages with only line numbers): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected IDENTIFIER', + \ 'filename': 'foo.v' + \ }, + \ { + \ 'lnum': 10, + \ 'type': 'W', + \ 'text': 'Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).', + \ 'filename': 'bar.v' + \ }, + \ ], + \ ale_linters#verilog#verilator#Handle(bufnr(''), [ + \ '%Error: foo.v:3: syntax error, unexpected IDENTIFIER', + \ '%Warning-BLKSEQ: bar.v:10: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).', + \ ]) + + +Execute (The verilator handler should parse new format messages with line and column numbers): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col' : 1, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected endmodule, expecting ;', + \ 'filename': 'bar.v' + \ }, + \ { + \ 'lnum': 4, + \ 'col' : 6, + \ 'type': 'W', + \ 'text': 'Signal is not used: r', + \ 'filename': 'foo.v' + \ }, + \ ], + \ ale_linters#verilog#verilator#Handle(bufnr(''), [ + \ '%Error: bar.v:3:1: syntax error, unexpected endmodule, expecting ;', + \ '%Warning-UNUSED: foo.v:4:6: Signal is not used: r', + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_vint_handler.vader b/dot_vim/plugged/ale/test/handler/test_vint_handler.vader new file mode 100644 index 0000000..c542b4e --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vint_handler.vader @@ -0,0 +1,65 @@ +Before: + runtime ale_linters/vim/vint.vim + +After: + call ale#linter#Reset() + +Execute(The vint handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'filename': 'gcc.vim', + \ 'text': 'Use scriptencoding when multibyte char exists (see :help :script encoding)', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 17, + \ 'filename': 'gcc.vim', + \ 'end_col': 18, + \ 'text': 'Use robust operators ''==#'' or ''==?'' instead of ''=='' (see Google VimScript Style Guide (Matching))', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 8, + \ 'filename': 'gcc.vim', + \ 'end_col': 15, + \ 'text': 'Make the scope explicit like ''l:filename'' (see Anti-pattern of vimrc (Scope of identifier))', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 7, + \ 'col': 8, + \ 'filename': 'gcc.vim', + \ 'end_col': 15, + \ 'text': 'Undefined variable: filename (see :help E738)', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 8, + \ 'col': 11, + \ 'filename': 'gcc.vim', + \ 'end_col': 16, + \ 'text': 'E128: Function name must start with a capital or contain a colon: foobar (see ynkdir/vim-vimlparser)', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 9, + \ 'col': 12, + \ 'filename': 'gcc.vim', + \ 'end_col': 13, + \ 'text': 'Use robust operators ''=~#'' or ''=~?'' instead of ''=~'' (see Google VimScript Style Guide (Matching))', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#vim#vint#Handle(bufnr(''), [ + \ 'gcc.vim:1:1: warning: Use scriptencoding when multibyte char exists (see :help :script encoding)', + \ 'gcc.vim:3:17: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))', + \ 'gcc.vim:3:8: style_problem: Make the scope explicit like `l:filename` (see Anti-pattern of vimrc (Scope of identifier))', + \ 'gcc.vim:7:8: warning: Undefined variable: filename (see :help E738)', + \ 'gcc.vim:8:11: error: E128: Function name must start with a capital or contain a colon: foobar (see ynkdir/vim-vimlparser)', + \ 'gcc.vim:9:12: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_vlog_handler.vader b/dot_vim/plugged/ale/test/handler/test_vlog_handler.vader new file mode 100644 index 0000000..7262f63 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vlog_handler.vader @@ -0,0 +1,47 @@ +Before: + runtime ale_linters/verilog/vlog.vim + +After: + call ale#linter#Reset() + +Execute(The vlog handler should parse old-style lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'type': 'W', + \ 'text': '(vlog-2623) Undefined variable: C.', + \ 'filename': 'add.v' + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': '(vlog-13294) Identifier must be declared with a port mode: C.', + \ 'filename': 'file.v' + \ }, + \ ], + \ ale_linters#verilog#vlog#Handle(bufnr(''), [ + \ '** Warning: add.v(7): (vlog-2623) Undefined variable: C.', + \ '** Error: file.v(1): (vlog-13294) Identifier must be declared with a port mode: C.', + \ ]) + +Execute(The vlog handler should parse new-style lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 7, + \ 'type': 'W', + \ 'text': '(vlog-2623) Undefined variable: C.', + \ 'filename': 'add.v' + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': '(vlog-13294) Identifier must be declared with a port mode: C.', + \ 'filename': 'file.v' + \ }, + \ ], + \ ale_linters#verilog#vlog#Handle(bufnr(''), [ + \ '** Warning: (vlog-2623) add.v(7): Undefined variable: C.', + \ '** Error: (vlog-13294) file.v(1): Identifier must be declared with a port mode: C.', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_vulture_handler.vader b/dot_vim/plugged/ale/test/handler/test_vulture_handler.vader new file mode 100644 index 0000000..b28055d --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_vulture_handler.vader @@ -0,0 +1,92 @@ +Before: + runtime ale_linters/python/vulture.vim + + call ale#test#SetDirectory('/testplugin/test/handler') + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + silent file something_else.py + +Execute(Basic vulture check with relative path in result should be handled): + call ale#test#SetFilename('something_else.py') + AssertEqual + \ [ + \ { + \ 'lnum': 34, + \ 'text': 'unused variable ''foo'' (60% confidence)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(g:dir . '/something_else.py'), + \ }, + \ ], + \ ale_linters#python#vulture#Handle(bufnr(''), [ + \ './something_else.py:34: unused variable ''foo'' (60% confidence)', + \ ]) + +Execute(Basic vulture check with absolute path in result should be handled): + call ale#test#SetFilename('something_else.py') + AssertEqual + \ [ + \ { + \ 'lnum': 34, + \ 'text': 'unused variable ''foo'' (60% confidence)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(g:dir . '/something_else.py'), + \ }, + \ ], + \ ale_linters#python#vulture#Handle(bufnr(''), [ + \ ale#path#Simplify(g:dir . '/something_else.py') . ':34: unused variable ''foo'' (60% confidence)', + \ ]) + +Execute(Vulture check for two files should be handled): + call ale#test#SetFilename('something_else.py') + AssertEqual + \ [ + \ { + \ 'lnum': 34, + \ 'text': 'unused variable ''foo'' (60% confidence)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(g:dir . '/something_else.py'), + \ }, + \ { + \ 'lnum': 12, + \ 'text': 'unused variable ''bar'' (60% confidence)', + \ 'type': 'W', + \ 'filename': ale#path#Simplify(g:dir . '/second_one.py'), + \ }, + \ ], + \ ale_linters#python#vulture#Handle(bufnr(''), [ + \ './something_else.py:34: unused variable ''foo'' (60% confidence)', + \ './second_one.py:12: unused variable ''bar'' (60% confidence)', + \ ]) + + +Execute(Vulture exception should be handled): + call ale#test#SetFilename('something_else.py') + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'text': 'BaddestException: Everything gone wrong (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "/usr/lib/python3.6/site-packages/vulture/__init__.py", line 13, in ', + \ ' from .core import stuff', + \ 'BaddestException: Everything gone wrong', + \ ], "\n"), + \ } + \ ], + \ ale_linters#python#vulture#Handle(bufnr(''), [ + \ 'Traceback (most recent call last):', + \ ' File "/usr/lib/python3.6/site-packages/vulture/__init__.py", line 13, in ', + \ ' from .core import stuff', + \ 'BaddestException: Everything gone wrong', + \ ]) + +Execute(The vulture handler should handle empty output): + AssertEqual + \ [], + \ ale_linters#python#vulture#Handle(bufnr(''), []) diff --git a/dot_vim/plugged/ale/test/handler/test_write_good_handler.vader b/dot_vim/plugged/ale/test/handler/test_write_good_handler.vader new file mode 100644 index 0000000..8bf4b22 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_write_good_handler.vader @@ -0,0 +1,37 @@ +Execute(The write-good handler should handle the example from the write-good README): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'end_col': 2, + \ 'type': 'W', + \ 'text': '"So" adds no meaning', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 12, + \ 'end_col': 21, + \ 'type': 'W', + \ 'text': '"was stolen" may be passive voice', + \ }, + \ { + \ 'lnum': 6, + \ 'col': 2, + \ 'end_col': 2, + \ 'type': 'W', + \ 'text': '"foo bar" bla', + \ }, + \ ], + \ ale#handlers#writegood#Handle(bufnr(''), [ + \ 'In /tmp/vBYivbZ/6/test.md', + \ '=============', + \ 'So the cat was stolen.', + \ '^^', + \ '"So" adds no meaning on line 1 at column 0', + \ '-------------', + \ 'So the cat was stolen.', + \ ' ^^^^^^^^^^', + \ '"was stolen" may be passive voice on line 1 at column 11', + \ '"foo bar" bla on line 6 at column 1', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_xmllint_handler.vader b/dot_vim/plugged/ale/test/handler/test_xmllint_handler.vader new file mode 100644 index 0000000..a17d74a --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_xmllint_handler.vader @@ -0,0 +1,30 @@ +Before: + runtime ale_linters/xml/xmllint.vim + +After: + call ale#linter#Reset() + +Execute(The xmllint handler should parse error messages correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 22, + \ 'type': 'W', + \ 'text': 'warning: Unsupported version ''dummy''' + \ }, + \ { + \ 'lnum': 34, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'parser error : Start tag expected, ''<'' not found' + \ } + \ ], + \ ale_linters#xml#xmllint#Handle(1, [ + \ 'path/to/file.xml:1: warning: Unsupported version ''dummy''', + \ '', + \ ' ^', + \ '-:34: parser error : Start tag expected, ''<'' not found', + \ 'blahblah>', + \ '^' + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_xvhdl_handler.vader b/dot_vim/plugged/ale/test/handler/test_xvhdl_handler.vader new file mode 100644 index 0000000..b90539b --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_xvhdl_handler.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/vhdl/xvhdl.vim + +After: + call ale#linter#Reset() + +Execute(The xvhdl handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 17, + \ 'type': 'E', + \ 'text': '[VRFC 10-91] aresetn is not declared ' + \ }, + \ { + \ 'lnum': 128, + \ 'type': 'E', + \ 'text': '[VRFC 10-91] m_axis_tx_tdata is not declared ' + \ }, + \ ], + \ ale_linters#vhdl#xvhdl#Handle(bufnr(''), [ + \ 'ERROR: [VRFC 10-91] aresetn is not declared [/path/to/file.vhd:17]', + \ 'ERROR: [VRFC 10-91] m_axis_tx_tdata is not declared [/home/user/tx_data.vhd:128]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_xvlog_handler.vader b/dot_vim/plugged/ale/test/handler/test_xvlog_handler.vader new file mode 100644 index 0000000..2e1f83f --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_xvlog_handler.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/verilog/xvlog.vim + +After: + call ale#linter#Reset() + +Execute(The xvlog handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'type': 'E', + \ 'text': '[VRFC 10-1412] syntax error near output ' + \ }, + \ ], + \ ale_linters#verilog#xvlog#Handle(bufnr(''), [ + \ 'ERROR: [VRFC 10-1412] syntax error near output [/path/to/file.v:5]', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_yamllint_handler.vader b/dot_vim/plugged/ale/test/handler/test_yamllint_handler.vader new file mode 100644 index 0000000..dd51119 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_yamllint_handler.vader @@ -0,0 +1,59 @@ +Before: + Save g:ale_warn_about_trailing_whitespace + + let g:ale_warn_about_trailing_whitespace = 1 + + runtime! ale/handlers/yamllint.vim + +After: + Restore + + unlet! b:ale_warn_about_trailing_whitespace + + call ale#linter#Reset() + +Execute(Problems should be parsed correctly for yamllint): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'missing document start "---"', + \ 'code': 'document-start', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'syntax error: expected the node content, but found ''''', + \ }, + \ ], + \ ale#handlers#yamllint#Handle(bufnr(''), [ + \ 'something.yaml:1:1: [warning] missing document start "---" (document-start)', + \ 'something.yml:2:1: [error] syntax error: expected the node content, but found ''''', + \ ]) + +Execute(The yamllint handler should respect ale_warn_about_trailing_whitespace): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'col': 18, + \ 'type': 'E', + \ 'text': 'trailing spaces', + \ 'code': 'trailing-spaces', + \ }, + \ ], + \ ale#handlers#yamllint#Handle(bufnr(''), [ + \ 'something.yml:5:18: [error] trailing spaces (trailing-spaces)', + \ ]) + + let b:ale_warn_about_trailing_whitespace = 0 + + AssertEqual + \ [ + \ ], + \ ale#handlers#yamllint#Handle(bufnr(''), [ + \ 'something.yml:5:18: [error] trailing spaces (trailing-spaces)', + \ ]) diff --git a/dot_vim/plugged/ale/test/handler/test_yosys_handler.vader b/dot_vim/plugged/ale/test/handler/test_yosys_handler.vader new file mode 100644 index 0000000..a55d0b5 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_yosys_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/verilog/yosys.vim + +After: + call ale#linter#Reset() + +Execute(The yosys handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected TOK_ID', + \ 'filename': 'file.v' + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'internal error', + \ }, + \ ], + \ ale_linters#verilog#yosys#Handle(bufnr(''), [ + \ '1. Executing Verilog-2005 frontend: file.v', + \ 'ERROR: internal error', + \ 'file.v:3: ERROR: syntax error, unexpected TOK_ID', + \ ]) + diff --git a/dot_vim/plugged/ale/test/handler/test_zeek_handler.vader b/dot_vim/plugged/ale/test/handler/test_zeek_handler.vader new file mode 100644 index 0000000..07a80d8 --- /dev/null +++ b/dot_vim/plugged/ale/test/handler/test_zeek_handler.vader @@ -0,0 +1,17 @@ +Before: + runtime ale_linters/zeek/zeek.vim + +After: + call ale#linter#Reset() + +Execute(The zeek handler should parse input correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'text': 'unknown identifier bar, at or near "bar"' + \ }, + \ ], + \ ale_linters#zeek#zeek#HandleErrors(bufnr(''), [ + \ 'error in /tmp/foo.zeek, line 2: unknown identifier bar, at or near "bar"' + \ ]) diff --git a/dot_vim/plugged/ale/test/jsonnet_files/testfile.jsonnet b/dot_vim/plugged/ale/test/jsonnet_files/testfile.jsonnet new file mode 100644 index 0000000..fc8fb78 --- /dev/null +++ b/dot_vim/plugged/ale/test/jsonnet_files/testfile.jsonnet @@ -0,0 +1 @@ +{ foo: bar } diff --git a/dot_vim/plugged/ale/test/linter/executable_test_bitbake.vader b/dot_vim/plugged/ale/test/linter/executable_test_bitbake.vader new file mode 100644 index 0000000..ba502aa --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/executable_test_bitbake.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('bitbake', 'oelint_adv') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'oelint-adv', ale#Escape('oelint-adv') . ' --quiet %s' + +Execute(The executable should be configurable): + let b:ale_bitbake_oelint_adv_executable = 'xyz' + + AssertLinter 'xyz', ale#Escape('xyz') . ' --quiet %s' diff --git a/dot_vim/plugged/ale/test/linter/test_ada_gcc.vader b/dot_vim/plugged/ale/test/linter/test_ada_gcc.vader new file mode 100644 index 0000000..906b31a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ada_gcc.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('ada', 'gcc') + call ale#test#SetFilename('dummy.adb') + + function! GetOutputDir(command) abort + let l:split_command = split(a:command) + let l:index = index(l:split_command, '-o') + return l:split_command[l:index + 1] + endfunction + + let b:out_file = GetOutputDir(ale_linters#ada#gcc#GetCommand(bufnr(''))) + +After: + delfunction GetOutputDir + + unlet! b:out_file + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'gcc', + \ ale#Escape('gcc') . ' -x ada -c -gnatc' + \ . ' -o ' . b:out_file + \ . ' -I %s:h' + \ . ' -gnatwa -gnatq %t' + + let b:ale_ada_gcc_executable = 'foo' + + AssertLinter 'foo', + \ ale#Escape('foo') . ' -x ada -c -gnatc' + \ . ' -o ' . b:out_file + \ . ' -I %s:h' + \ . ' -gnatwa -gnatq %t' + +Execute(The options should be configurable): + let g:ale_ada_gcc_options = '--foo --bar' + + AssertLinter 'gcc', + \ ale#Escape('gcc') . ' -x ada -c -gnatc' + \ . ' -o ' . b:out_file + \ . ' -I %s:h' + \ . ' --foo --bar %t' diff --git a/dot_vim/plugged/ale/test/linter/test_adals.vader b/dot_vim/plugged/ale/test/linter/test_adals.vader new file mode 100644 index 0000000..5a04594 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_adals.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpLinterTest('ada', 'adals') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Sets adals executable): + let g:ale_ada_adals_executable = '/path/to /Ada' + AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') + +Execute(Sets adals encoding): + let b:ale_ada_adals_encoding = 'iso-8859-1' + AssertLSPConfig {'ada.defaultCharset': 'iso-8859-1', 'ada.projectFile': 'default.gpr'} + +Execute(Sets adals project): + let g:ale_ada_adals_project = 'myproject.gpr' + AssertLSPConfig {'ada.defaultCharset': 'utf-8', 'ada.projectFile': 'myproject.gpr'} diff --git a/dot_vim/plugged/ale/test/linter/test_alex.vader b/dot_vim/plugged/ale/test/linter/test_alex.vader new file mode 100644 index 0000000..08a0ee1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_alex.vader @@ -0,0 +1,34 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'alex') + call ale#test#SetFilename('test_file.tex') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The global executable should be used when the local one cannot be found): + AssertLinter 'alex', + \ ale#Escape('alex') . ' --stdin --text', + +Execute(Should use the node_modules/.bin executable, if available): + call ale#test#SetFilename('../test-files/alex/node-modules/test_file.tex') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex')) + \ . ' --stdin --text', + +Execute(Should use the node_modules/alex executable, if available): + call ale#test#SetFilename('../test-files/alex/node-modules-2/test_file.tex') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'), + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js')) + \ . ' --stdin --text', + +Execute(Should let users configure a global executable and override local paths): + call ale#test#SetFilename('../test-files/write-good/node-modules-2/test_file.tex') + + let g:ale_alex_executable = '/path/to/custom/alex' + let g:ale_alex_use_global = 1 + + AssertLinter '/path/to/custom/alex', + \ ale#Escape('/path/to/custom/alex') . ' --stdin --text' diff --git a/dot_vim/plugged/ale/test/linter/test_ameba.vader b/dot_vim/plugged/ale/test/linter/test_ameba.vader new file mode 100644 index 0000000..7746b44 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ameba.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('crystal', 'ameba') + call ale#test#SetFilename('dummy.cr') + + let g:ale_crystal_ameba_executable = 'bin/ameba' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to bin/ameba): + AssertLinter 'bin/ameba', ale#Escape('bin/ameba') + \ . ' --format json ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/dummy.cr')) + +Execute(Should be able to set a custom executable): + let g:ale_crystal_ameba_executable = 'ameba' + + AssertLinter 'ameba' , ale#Escape('ameba') + \ . ' --format json ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/dummy.cr')) diff --git a/dot_vim/plugged/ale/test/linter/test_angular.vader b/dot_vim/plugged/ale/test/linter/test_angular.vader new file mode 100644 index 0000000..2e407a0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_angular.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpLinterTest('html', 'angular') + let g:paths = {} + +After: + call ale#assert#TearDownLinterTest() + unlet g:paths + +Execute(The Angular LSP connection shouldn't be created outside of Angular projects): + AssertLSPLanguage 'html' + AssertLSPConfig {} + AssertLSPProject '' + AssertLinterNotExecuted + +Execute(The default command for Angular should be correct): + call ale#test#SetFilename('../test-files/angular/test.html') + let g:paths = { + \ 'ngserver': ale#test#GetFilename('../test-files/angular/node_modules/@angular/language-server/bin/ngserver'), + \ 'service': ale#test#GetFilename('../test-files/angular/node_modules/@angular/language-service'), + \ 'typescript': ale#test#GetFilename('../test-files/angular/node_modules/typescript'), + \} + + AssertLSPLanguage 'html' + AssertLSPProject ale#test#GetFilename('../test-files/angular') + AssertLinter 'node', ale#Escape('node') . ' ' . ale#Escape(g:paths.ngserver) + \ . ' --ngProbeLocations ' . ale#Escape(g:paths.service) + \ . ' --tsProbeLocations ' . ale#Escape(g:paths.typescript) + \ . ' --stdio' diff --git a/dot_vim/plugged/ale/test/linter/test_ansible_language_server.vader b/dot_vim/plugged/ale/test/linter/test_ansible_language_server.vader new file mode 100644 index 0000000..3766972 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ansible_language_server.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('ansible', 'ansible_language_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The ansible language server command callback should return default string): + AssertLinter 'ansible-language-server', ale#Escape('ansible-language-server') . ' --stdio' + +Execute(The ansible language server executable should be configurable): + let g:ale_ansible_language_server_executable = '~/.local/bin/als' + + AssertLinter '~/.local/bin/als' , ale#Escape('~/.local/bin/als') . ' --stdio' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_ansible_language_server_config = {'ansible-language-server': {'ansible': {'completion': {'provideRedirectModules': v:false}}}} + AssertLSPConfig {'ansible-language-server': {'ansible': {'completion': {'provideRedirectModules': v:false}}}} diff --git a/dot_vim/plugged/ale/test/linter/test_ansible_lint.vader b/dot_vim/plugged/ale/test/linter/test_ansible_lint.vader new file mode 100644 index 0000000..3191fa7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ansible_lint.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('ansible', 'ansible_lint') + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(The ansible_lint version <5.0.0 command callback should return default string): + GivenCommandOutput ['v4.1.2'] + AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -p %t' + +Execute(The ansible_lint version >=5.0.0 command callback should return default string): + GivenCommandOutput ['v5.1.2'] + AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor --parseable-severity -x yaml %s' + +Execute(The ansible_lint version >=6.0.0 command callback should return default string): + GivenCommandOutput ['v6.0.2'] + AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -f json -x yaml %s' + +Execute(The ansible_lint executable should be configurable): + let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint' + GivenCommandOutput ['v4.1.2'] + AssertLinter '~/.local/bin/ansible-lint', + \ ale#Escape('~/.local/bin/ansible-lint') . ' --nocolor -p %t' diff --git a/dot_vim/plugged/ale/test/linter/test_asciidoc_textlint.vader b/dot_vim/plugged/ale/test/linter/test_asciidoc_textlint.vader new file mode 100644 index 0000000..a79a0ae --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_asciidoc_textlint.vader @@ -0,0 +1,65 @@ +" Author: januswel, w0rp + +Before: + " This is just one language for the linter. + call ale#assert#SetUpLinterTest('asciidoc', 'textlint') + + " The configuration is shared between many languages. + Save g:ale_textlint_executable + Save g:ale_textlint_use_global + Save g:ale_textlint_options + + let g:ale_textlint_executable = 'textlint' + let g:ale_textlint_use_global = 0 + let g:ale_textlint_options = '' + + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + +After: + unlet! b:command_tail + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s' + +Execute(The executable should be configurable): + let b:ale_textlint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -f json --stdin --stdin-filename %s' + +Execute(The options should be configurable): + let b:ale_textlint_options = '--something' + + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' --something -f json --stdin --stdin-filename %s' + +Execute(The local executable from .bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint')) + \ . ' -f json --stdin --stdin-filename %s' + +Execute(The local executable from textlint/bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt') + + if has('win32') + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + else + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + endif diff --git a/dot_vim/plugged/ale/test/linter/test_asm_gcc.vader b/dot_vim/plugged/ale/test/linter/test_asm_gcc.vader new file mode 100644 index 0000000..5976b5f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_asm_gcc.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('asm', 'gcc') + call ale#test#SetFilename('test.cpp') + let b:command_tail = ' -x assembler' + \ . ' -o ' . (has('win32') ? 'nul': '/dev/null') + \ . '-iquote %s:h' + \ . ' -Wall -' + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + + let b:ale_asm_gcc_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_avra_avra.vader b/dot_vim/plugged/ale/test/linter/test_avra_avra.vader new file mode 100644 index 0000000..04722d6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_avra_avra.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('avra', 'avra') + + let b:command_tail = ' %t -o ' . g:ale#util#nul_file + let b:command_tail_opt = ' %t --max_errors 20 -o ' . g:ale#util#nul_file + +After: + unlet! b:command_tail + unlet! b:command_tail_opt + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'avra', ale#Escape('avra') . b:command_tail, + + let b:ale_avra_avra_executable = '~/avra' + + AssertLinter '~/avra', ale#Escape('~/avra') . b:command_tail + +Execute(The options should be configurable): + let b:ale_avra_avra_options = '--max_errors 20' + + AssertLinter 'avra', ale#Escape('avra') + \ . ' %t --max_errors 20 -o ' . g:ale#util#nul_file + +Execute(The options should be used in command): + let b:ale_avra_avra_options = '--max_errors 20' + + AssertLinter 'avra', ale#Escape('avra') . b:command_tail_opt diff --git a/dot_vim/plugged/ale/test/linter/test_bandit.vader b/dot_vim/plugged/ale/test/linter/test_bandit.vader new file mode 100644 index 0000000..e9488c0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_bandit.vader @@ -0,0 +1,90 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'bandit') + let b:bandit_flags = ' --format custom ' + \ . '--msg-template "{line}:{test_id}:{severity}:{msg}" ' + +After: + call ale#assert#TearDownLinterTest() + unlet! b:bandit_flags + +Execute(The bandit command callback should return default string): + AssertLinter 'bandit', + \ ale#Escape('bandit') + \ . b:bandit_flags + \ . ' -' + +Execute(The bandit command callback should allow options): + let g:ale_python_bandit_options = '--configfile bandit.yaml' + + AssertLinter 'bandit', + \ ale#Escape('bandit') + \ . b:bandit_flags + \ . ' --configfile bandit.yaml -' + +Execute(The bandit executable should be configurable): + let g:ale_python_bandit_executable = '~/.local/bin/bandit' + + AssertLinter '~/.local/bin/bandit', + \ ale#Escape('~/.local/bin/bandit') + \ . b:bandit_flags + \ . ' -' + +Execute(Setting executable to 'pipenv' appends 'run bandit'): + let g:ale_python_bandit_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') + \ . ' run bandit' + \ . b:bandit_flags + \ . ' -' + +Execute(Pipenv is detected when python_bandit_auto_pipenv is set): + let g:ale_python_bandit_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') + \ . ' run bandit' + \ . b:bandit_flags + \ . ' -' + +Execute(Setting executable to 'poetry' appends 'run bandit'): + let g:ale_python_bandit_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') + \ . ' run bandit' + \ . b:bandit_flags + \ . ' -' + +Execute(Poetry is detected when python_bandit_auto_poetry is set): + let g:ale_python_bandit_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') + \ . ' run bandit' + \ . b:bandit_flags + \ . ' -' + +Execute(The bandit command callback should add .bandit by default): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_bandit/namespace/foo/bar.py') + + let b:config_path = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_bandit/.bandit' + \) + + AssertLinter 'bandit', + \ ale#Escape('bandit') + \ . ' --ini ' . ale#Escape(b:config_path) + \ . b:bandit_flags + \ . ' -' + +Execute(The bandit command callback should support not using .bandit): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_bandit/subdir/foo/bar.py') + let g:ale_python_bandit_use_config = 0 + + AssertLinter 'bandit', + \ ale#Escape('bandit') + \ . b:bandit_flags + \ . ' -' diff --git a/dot_vim/plugged/ale/test/linter/test_bashate.vader b/dot_vim/plugged/ale/test/linter/test_bashate.vader new file mode 100644 index 0000000..714cf69 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_bashate.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('sh', 'bashate') + call ale#test#SetFilename('test.sh') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default bashate command should be correct): + AssertLinter 'bashate', ale#Escape('bashate') . ' %t' + +Execute(The bashate command should accept options): + let b:ale_sh_bashate_options = '-i E310 --max-line-length 100' + + AssertLinter 'bashate', + \ ale#Escape('bashate') . ' -i E310 --max-line-length 100 %t' diff --git a/dot_vim/plugged/ale/test/linter/test_bib_bibclean.vader b/dot_vim/plugged/ale/test/linter/test_bib_bibclean.vader new file mode 100644 index 0000000..fa6f7d3 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_bib_bibclean.vader @@ -0,0 +1,24 @@ +Before: + call ale#assert#SetUpLinterTest('bib', 'bibclean') + + let g:ale_ruby_rubocop_executable = 'bibclean' + let g:ale_ruby_rubocop_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to bibclean): + AssertLinter 'bibclean', ale#Escape('bibclean') + \ . ' -file-position ' + +Execute(Should be able to set a custom executable): + let g:ale_bib_bibclean_executable = 'bin/bibclean' + + AssertLinter 'bin/bibclean' , ale#Escape('bin/bibclean') + \ . ' -file-position ' + +Execute(Should not include custom options): + let g:ale_bib_bibclean_options = '-no-prettryprint' + + AssertLinter 'bibclean' , ale#Escape('bibclean') + \ . ' -file-position ' diff --git a/dot_vim/plugged/ale/test/linter/test_bicep_bicep.vader b/dot_vim/plugged/ale/test/linter/test_bicep_bicep.vader new file mode 100644 index 0000000..a4057a7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_bicep_bicep.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('bicep', 'bicep') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + if has('win32') + AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile NUL %s' + else + AssertLinter 'bicep', ale#Escape('bicep') . ' build --outfile /dev/null %s' + endif + +Execute(The executable should be configurable): + let g:ale_bicep_bicep_executable = 'foobar' + + if has('win32') + AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile NUL %s' + else + AssertLinter 'foobar', ale#Escape('foobar') . ' build --outfile /dev/null %s' + endif diff --git a/dot_vim/plugged/ale/test/linter/test_bingo.vader b/dot_vim/plugged/ale/test/linter/test_bingo.vader new file mode 100644 index 0000000..d832841 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_bingo.vader @@ -0,0 +1,74 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'bingo') + +After: + Restore + + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + + unlet! b:ale_completion_enabled + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'bingo', ale#Escape('bingo') . ' --mode stdio' + +Execute(should configure bingo callback executable): + let b:ale_go_bingo_executable = 'boo' + let b:ale_go_bingo_options = '' + + AssertLinter 'boo', ale#Escape('boo') + +Execute(should set bingo options): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + " let b:ale_completion_enabled = 1 + let b:ale_go_bingo_options = '' + + AssertLinter 'bingo', + \ ale#Escape('bingo') . '' + + let b:ale_go_bingo_options = '--mode stdio --trace' + + AssertLinter 'bingo', + \ ale#Escape('bingo') . ' --mode stdio --trace' + +Execute(should support Go environment variables): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + let b:ale_go_go111module = 'on' + + AssertLinter 'bingo', + \ ale#Env('GO111MODULE', 'on') . ale#Escape('bingo') . ' --mode stdio' + + +Execute(Should return directory for 'go.mod' if found in parent directory): + call ale#test#SetFilename('../test-files/go/test.go') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/go') + +Execute(Should return nearest directory with '.git' if found in parent directory): + call ale#test#SetFilename('test.go') + call mkdir(g:dir . '/.git') + + AssertLSPProject g:dir + +Execute(Should ignore 'go.mod' and return '.git' dir if modules off): + call ale#test#SetFilename('../test-files/go/test.go') + + let b:ale_go_go111module = 'off' + let b:parent_dir = ale#path#Simplify(g:dir . '/..') + let b:git_dir = b:parent_dir . '/.git' + + if !isdirectory(b:git_dir) + call mkdir(b:git_dir) + endif + + AssertLSPProject b:parent_dir + + call delete(b:git_dir, 'd') + unlet! b:parent_dir + unlet! b:git_dir diff --git a/dot_vim/plugged/ale/test/linter/test_brakeman.vader b/dot_vim/plugged/ale/test/linter/test_brakeman.vader new file mode 100644 index 0000000..d3bf192 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_brakeman.vader @@ -0,0 +1,37 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'brakeman') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The brakeman command callback should detect absence of a valid Rails app): + call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/test.rb') + + AssertLinter 'brakeman', '' + +Execute(The brakeman command callback should find a valid Rails app root): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/db/test.rb') + + AssertLinter 'brakeman', ale#Escape('brakeman') + \ . ' -f json -q -p ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/valid_rails_app')) + +Execute(The brakeman command callback should include configured options): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/db/test.rb') + + let g:ale_ruby_brakeman_options = '--combobulate' + + AssertLinter 'brakeman', ale#Escape('brakeman') + \ . ' -f json -q --combobulate -p ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/valid_rails_app')) + +Execute(Setting bundle appends 'exec brakeman'): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/db/test.rb') + + let g:ale_ruby_brakeman_executable = 'bundle' + let g:ale_ruby_brakeman_options = '--combobulate' + + AssertLinter 'bundle', ale#Escape('bundle') + \ . ' exec brakeman' + \ . ' -f json -q --combobulate -p ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/valid_rails_app')) diff --git a/dot_vim/plugged/ale/test/linter/test_buf_lint.vader b/dot_vim/plugged/ale/test/linter/test_buf_lint.vader new file mode 100644 index 0000000..2f065ad --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_buf_lint.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('proto', 'buf_lint') + call ale#test#SetFilename('test.proto') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'buf', + \ ale#Escape('buf') + \ . ' lint' + \ . ' %s#include_package_files=true' + +Execute(The callback should include any additional config): + let b:ale_proto_buf_lint_executable = '/tmp/buf' + let b:ale_proto_buf_lint_config = '/tmp/buf.yaml' + + AssertLinter '/tmp/buf', + \ ale#Escape('/tmp/buf') + \ . ' lint' + \ . ' --config=' . ale#Escape('/tmp/buf.yaml') + \ . ' %s#include_package_files=true' + +Execute(The callback should include additional options): + let b:ale_proto_buf_lint_executable = '/tmp/buf' + let b:ale_proto_buf_lint_options = '--disable-symlinks' + + AssertLinter '/tmp/buf', + \ ale#Escape('/tmp/buf') + \ . ' lint' + \ . ' --disable-symlinks' + \ . ' %s#include_package_files=true' diff --git a/dot_vim/plugged/ale/test/linter/test_c_cc.vader b/dot_vim/plugged/ale/test/linter/test_c_cc.vader new file mode 100644 index 0000000..ce4bd16 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_cc.vader @@ -0,0 +1,94 @@ +Before: + Save g:ale_c_parse_makefile + Save g:ale_history_enabled + + let g:ale_c_parse_makefile = 0 + let g:ale_history_enabled = 0 + + let g:get_cflags_return_value = '' + let g:executable_map = {} + + runtime autoload/ale/c.vim + runtime autoload/ale/engine.vim + + function! ale#engine#IsExecutable(buffer, executable) abort + return has_key(g:executable_map, a:executable) + endfunction + + function! ale#c#GetCFlags(buffer, output) abort + return g:get_cflags_return_value + endfunction + + call ale#assert#SetUpLinterTest('c', 'cc') + + let b:command_tail = ' -S -x c' + \ . ' -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -std=c11 -Wall -' + +After: + unlet! g:get_cflags_return_value + unlet! g:executable_map + unlet! b:command_tail + + runtime autoload/ale/c.vim + runtime autoload/ale/engine.vim + + call ale#assert#TearDownLinterTest() + +Execute(clang should be used instead of gcc, if available): + let g:executable_map = {'clang': 1} + + AssertLinter 'clang', [ale#Escape('clang') . b:command_tail] + +Execute(The executable should be configurable): + AssertLinter 'gcc', [ale#Escape('gcc') . b:command_tail] + + let b:ale_c_cc_executable = 'foobar' + + AssertLinter 'foobar', [ale#Escape('foobar') . b:command_tail] + +Execute(The -std flag should be replaced by parsed C flags): + let b:command_tail = substitute(b:command_tail, 'c11', 'c99 ', '') + let g:get_cflags_return_value = '-std=c99' + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(gcc should not use -x c-header with header files by default): + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should use -x c-header with header files by default): + let g:executable_map = {'clang': 1} + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail + +Execute(gcc should use -x c-header with header files if configured to do so): + let b:ale_c_cc_use_header_lang_flag = 1 + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should not use -x c-header with header files if configured to do so): + let g:executable_map = {'clang': 1} + let b:ale_c_cc_use_header_lang_flag = 0 + + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/test.h') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail + +Execute(The header file extensions should be configurable): + let g:executable_map = {'clang': 1} + let b:command_tail = substitute(b:command_tail, '-x c', '-x c-header', '') + + call ale#assert#SetUpLinterTest('c', 'cc') + let b:ale_c_cc_header_exts = ['json'] + call ale#test#SetFilename('../test-files/c/json_project/build/compile_commands.json') + + AssertLinter 'clang', ale#Escape('clang') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_c_ccls.vader b/dot_vim/plugged/ale/test/linter/test_c_ccls.vader new file mode 100644 index 0000000..a4f575c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_ccls.vader @@ -0,0 +1,69 @@ +" Author: Ye Jingchen , Ben Falconer +" Description: A language server for C + +Before: + call ale#assert#SetUpLinterTest('c', 'ccls') + + Save b:ale_c_build_dir_names + Save b:ale_c_ccls_executable + Save b:ale_c_ccls_init_options + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls-root/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_c_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_c_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } + +Execute(The compile command database should be detected correctly): + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.c') + + AssertLSPOptions {} + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.c') + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') } + + call ale#test#SetFilename('../test-files/ccls/with_build_dir/dummy.c') + let b:ale_c_build_dir_names = ['unusual_build_dir_name'] + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_build_dir/unusual_build_dir_name') } diff --git a/dot_vim/plugged/ale/test/linter/test_c_clang_tidy.vader b/dot_vim/plugged/ale/test/linter/test_c_clang_tidy.vader new file mode 100644 index 0000000..c443355 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_clang_tidy.vader @@ -0,0 +1,77 @@ +Before: + Save g:ale_c_parse_makefile + let g:ale_c_parse_makefile = 0 + + call ale#assert#SetUpLinterTest('c', 'clangtidy') + call ale#test#SetFilename('test.c') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The clangtidy command default should be correct): + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' %s' + +Execute(You should be able to remove the -checks option for clang-tidy): + let b:ale_c_clangtidy_checks = [] + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' %s' + +Execute(You should be able to set other checks for clang-tidy): + let b:ale_c_clangtidy_checks = ['-*', 'clang-analyzer-*'] + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('-*,clang-analyzer-*') . ' %s' + +Execute(You should be able to manually set compiler flags for clang-tidy): + let b:ale_c_clangtidy_checks = ['*'] + let b:ale_c_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' -checks=' . ale#Escape('*') . ' %s -- -Wall' + +Execute(You should be able to manually set flags for clang-tidy): + let b:ale_c_clangtidy_extra_options = '-config=' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' ' . ale#Escape('-config=') . ' %s' + +Execute(The build directory should be configurable): + let b:ale_c_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The build directory setting should override the options): + let b:ale_c_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + let b:ale_c_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The build directory should be used for header files): + call ale#test#SetFilename('test.h') + + let b:ale_c_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + let b:ale_c_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The executable should be configurable): + let b:ale_c_clangtidy_checks = ['*'] + let b:ale_c_clangtidy_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -checks=' . ale#Escape('*') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_c_clangd.vader b/dot_vim/plugged/ale/test/linter/test_c_clangd.vader new file mode 100644 index 0000000..b7a4e02 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_clangd.vader @@ -0,0 +1,47 @@ +Before: + call ale#assert#SetUpLinterTest('c', 'clangd') + + Save b:ale_c_clangd_options + Save b:ale_c_build_dir + Save b:ale_c_build_dir_names + Save b:ale_c_parse_compile_commands + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'c' + +Execute(The default executable should be correct): + AssertLinter 'clangd', ale#Escape('clangd') + +Execute(The project root should be detected correctly): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/clangd/with_compile_commands/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/clangd/with_compile_commands') + +Execute(The executable should be configurable): + let g:ale_c_clangd_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The options should be configurable): + let b:ale_c_clangd_options = '-compile-commands-dir=foo' + + AssertLinter 'clangd', ale#Escape('clangd') . ' ' . b:ale_c_clangd_options + +Execute(The compile command database should be detected correctly): + call ale#test#SetFilename('../test-files/clangd/with_build_dir/dummy_src/dummy.c') + + let b:ale_c_clangd_options = '' + let b:ale_c_build_dir = '' + let b:ale_c_build_dir_names = ['unusual_build_dir_name'] + let b:ale_c_parse_compile_commands = 1 + + AssertLinter 'clangd', ale#Escape('clangd') + \ . ' -compile-commands-dir=' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/clangd/with_build_dir/unusual_build_dir_name')) diff --git a/dot_vim/plugged/ale/test/linter/test_c_cppcheck.vader b/dot_vim/plugged/ale/test/linter/test_c_cppcheck.vader new file mode 100644 index 0000000..0cc3a5d --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_cppcheck.vader @@ -0,0 +1,63 @@ +Before: + call ale#assert#SetUpLinterTest('c', 'cppcheck') + let b:command_tail = ' -q --language=c --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') . ' --enable=style -I' . ale#Escape(ale#path#Simplify(g:dir)) .' %t' + +After: + unlet! b:rel_file_path + unlet! b:command_tail + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'cppcheck', ale#Escape('cppcheck') . b:command_tail + + let b:ale_c_cppcheck_executable = 'foobar' + + AssertLinterCwd '' + AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail + +Execute(cppcheck for C should detect compile_commands.json files): + let b:rel_file_path = '../test-files/cppcheck/one/foo.c' + call ale#test#SetFilename(b:rel_file_path) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/one') + AssertLinter 'cppcheck', ale#Escape('cppcheck') + \ . ' -q --language=c' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --project=' . ale#Escape('compile_commands.json') + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) + \ . ' --enable=style %t' + +Execute(cppcheck for C should detect compile_commands.json files in build directories): + let b:rel_file_path = '../test-files/cppcheck/with_build_dir/foo.c' + call ale#test#SetFilename(b:rel_file_path) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/with_build_dir') + AssertLinter 'cppcheck', ale#Escape('cppcheck') + \ . ' -q --language=c' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json')) + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) + \ . ' --enable=style %t' + +Execute(cppcheck for C should include file dir if compile_commands.json file is not found): + call ale#test#SetFilename('../test-files/cppcheck/foo.c') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --enable=style' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck')) + \ . ' %t' + +Execute(cppcheck for C header should include file dir and not use compile_commands.json): + call ale#test#SetFilename('../test-files/cppcheck/one/foo.h') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck/one')) + \ . ' --suppress=unusedStructMember' + \ . ' --enable=style' + \ . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_c_cquery.vader b/dot_vim/plugged/ale/test/linter/test_c_cquery.vader new file mode 100644 index 0000000..bca0dbb --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_cquery.vader @@ -0,0 +1,37 @@ +Before: + call ale#assert#SetUpLinterTest('c', 'cquery') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/cquery/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/cquery') + +Execute(The project root should be detected correctly using .cquery file): + call ale#test#SetFilename(tempname() . '/dummy.c') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/cquery/with_cquery/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/cquery/with_cquery') + +Execute(The executable should be configurable): + AssertLinter 'cquery', ale#Escape('cquery') + + let b:ale_c_cquery_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The cache directory should be configurable): + AssertLSPOptions {'cacheDirectory': expand('$HOME/.cache/cquery')} + + let b:ale_c_cquery_cache_directory = '/foo/bar' + + AssertLSPOptions {'cacheDirectory': '/foo/bar'} diff --git a/dot_vim/plugged/ale/test/linter/test_c_flawfinder.vader b/dot_vim/plugged/ale/test/linter/test_c_flawfinder.vader new file mode 100644 index 0000000..6ef2a40 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_flawfinder.vader @@ -0,0 +1,24 @@ +Before: + call ale#assert#SetUpLinterTest('c', 'flawfinder') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The flawfinder command should be correct): + AssertLinter 'flawfinder', ale#Escape('flawfinder') . ' -CDQS --minlevel=1 %t' + +Execute(The minlevel of flawfinder should be configurable): + let b:ale_c_flawfinder_minlevel = 8 + + AssertLinter 'flawfinder', ale#Escape('flawfinder') . ' -CDQS --minlevel=8 %t' + +Execute(Additional flawfinder options should be configurable): + let b:ale_c_flawfinder_options = '--foobar' + + AssertLinter 'flawfinder', + \ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t' + +Execute(The flawfinder executable should be configurable): + let b:ale_c_flawfinder_executable = 'foo/bar' + + AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t' diff --git a/dot_vim/plugged/ale/test/linter/test_c_import_paths.vader b/dot_vim/plugged/ale/test/linter/test_c_import_paths.vader new file mode 100644 index 0000000..19e3991 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_c_import_paths.vader @@ -0,0 +1,162 @@ +Before: + " Make sure the c.vim file is loaded first. + call ale#c#FindProjectRoot(bufnr('')) + + Save g:ale_c_parse_compile_commands + Save g:ale_c_parse_makefile + Save g:__ale_c_project_filenames + + let g:original_project_filenames = g:__ale_c_project_filenames + let g:executable_map = {} + + " Remove the .git/HEAD dir for C import paths for these tests. + " The tests run inside of a git repo. + let g:__ale_c_project_filenames = filter( + \ copy(g:__ale_c_project_filenames), + \ 'v:val isnot# ''.git/HEAD''' + \) + + let g:ale_c_parse_compile_commands = 0 + let g:ale_c_parse_makefile = 0 + + runtime autoload/ale/engine.vim + + function! ale#engine#IsExecutable(buffer, executable) abort + return has_key(g:executable_map, a:executable) + endfunction + +After: + Restore + + unlet! g:original_project_filenames + unlet! g:executable_map + + runtime autoload/ale/engine.vim + + call ale#assert#TearDownLinterTest() + +Execute(The C cc linter should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('c', 'cc') + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.c') + let g:ale_c_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/makefile_project/include')) + \ . ' -' + +Execute(The C cc linter should include 'include' directories for projects with a configure file): + call ale#assert#SetUpLinterTest('c', 'cc') + call ale#test#SetFilename('../test-files/c/configure_project/subdir/file.c') + let g:ale_c_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/configure_project/include')) + \ . ' -' + +Execute(The C cc linter should include root directories for projects with .h files in them): + call ale#assert#SetUpLinterTest('c', 'cc') + call ale#test#SetFilename('../test-files/c/h_file_project/subdir/file.c') + let g:ale_c_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/h_file_project')) + \ . ' -' + +Execute(The C cc linter should include root directories for projects with .hpp files in them): + call ale#assert#SetUpLinterTest('c', 'cc') + call ale#test#SetFilename('../test-files/c/hpp_file_project/subdir/file.c') + let g:ale_c_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/hpp_file_project')) + \ . ' -' + +Execute(The C ClangTidy handler should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('c', 'clangtidy') + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.cpp') + let g:ale_c_clangtidy_options = '' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' %s ' + \ . '-- -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/makefile_project/include')) + +Execute(The C++ cc linter should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('cpp', 'cc') + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.cpp') + let g:ale_cpp_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c++ -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/makefile_project/include')) + \ . ' -' + +Execute(The C++ cc linter should include 'include' directories for projects with a configure file): + call ale#assert#SetUpLinterTest('cpp', 'cc') + call ale#test#SetFilename('../test-files/c/configure_project/subdir/file.cpp') + let g:ale_cpp_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c++ -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/configure_project/include')) + \ . ' -' + +Execute(The C++ cc linter should include root directories for projects with .h files in them): + call ale#assert#SetUpLinterTest('cpp', 'cc') + call ale#test#SetFilename('../test-files/c/h_file_project/subdir/file.cpp') + let g:ale_cpp_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c++ -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/h_file_project')) + \ . ' -' + +Execute(The C++ cc linter should include root directories for projects with .hpp files in them): + call ale#assert#SetUpLinterTest('cpp', 'cc') + call ale#test#SetFilename('../test-files/c/hpp_file_project/subdir/file.cpp') + let g:ale_cpp_cc_options = '' + + AssertLinter 'gcc', + \ ale#Escape('gcc') + \ . ' -S -x c++ -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/hpp_file_project')) + \ . ' -' + +Execute(The C++ ClangTidy handler should include json folders for projects with suitable build directory in them): + call ale#assert#SetUpLinterTest('cpp', 'clangtidy') + call ale#test#SetFilename('../test-files/c/json_project/subdir/file.cpp') + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' %s ' + \ . '-p ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/json_project/build')) + +Execute(The C++ ClangTidy handler should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('cpp', 'clangtidy') + call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.cpp') + let g:ale_cpp_clangtidy_options = '' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' %s ' + \ . '-- -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/c/makefile_project/include')) + diff --git a/dot_vim/plugged/ale/test/linter/test_cargo.vader b/dot_vim/plugged/ale/test/linter/test_cargo.vader new file mode 100644 index 0000000..25dd025 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cargo.vader @@ -0,0 +1,222 @@ +Before: + call ale#assert#SetUpLinterTest('rust', 'cargo') + call ale#test#SetFilename('../test-files/cargo/test.rs') + + let g:cd = 'cd ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cargo')) . ' && ' + let g:suffix = ' --frozen --message-format=json -q' + let g:ale_rust_cargo_avoid_whole_workspace = 0 + + " Test with version 0.22.0 by default. + GivenCommandOutput ['cargo 0.22.0 (3423351a5 2017-10-06)'] + +After: + call ale#assert#TearDownLinterTest() + + unlet! g:cd + unlet! g:suffix + +Execute(The linter should not be executed when there's no Cargo.toml file): + call ale#test#SetFilename('../foo.rs') + AssertLinterNotExecuted + +Execute(The linter should be executed when there is a Cargo.toml file): + GivenCommandOutput [] + AssertLinter 'cargo', 'cargo build --frozen --message-format=json -q' + +Execute(`cargo check` should be used when the version is new enough): + GivenCommandOutput ['cargo 0.17.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check' . g:suffix, + \] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo check' . g:suffix] + +Execute(`cargo build` should be used when cargo is too old): + GivenCommandOutput ['cargo 0.16.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo build' . g:suffix, + \] + + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo build' . g:suffix] + +Execute(`cargo build` should be used when g:ale_rust_cargo_use_check is set to 0): + let g:ale_rust_cargo_use_check = 0 + + GivenCommandOutput ['cargo 0.24.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo build' . g:suffix, + \] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo build' . g:suffix] + +Execute(`cargo check` should be used when the version is new enough): + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check' . g:suffix, + \] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo check' . g:suffix] + +Execute(--all-targets should be used when g:ale_rust_cargo_check_all_targets is set to 1): + let g:ale_rust_cargo_check_all_targets = 1 + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --all-targets' . g:suffix] + " We should cache the version check + AssertLinter 'cargo', ['cargo check --all-targets' . g:suffix] + +Execute(--tests should be used when g:ale_rust_cargo_check_tests is set to 1): + let g:ale_rust_cargo_check_tests = 1 + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --tests' . g:suffix] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo check --tests' . g:suffix] + +Execute(--examples should be used when g:ale_rust_cargo_check_examples is set to 1): + let g:ale_rust_cargo_check_examples = 1 + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --examples' . g:suffix] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'cargo', ['cargo check --examples' . g:suffix] + +Execute(--no-default-features should be used when g:ale_rust_cargo_default_feature_behavior is none): + let b:ale_rust_cargo_default_feature_behavior = 'none' + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --frozen --message-format=json -q --no-default-features'] + +Execute(g:ale_rust_cargo_include_features added when g:ale_rust_cargo_default_feature_behavior is none): + let b:ale_rust_cargo_default_feature_behavior = 'none' + let b:ale_rust_cargo_include_features = 'foo bar' + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --frozen --message-format=json -q --no-default-features --features ' . ale#Escape('foo bar')] + +Execute(g:ale_rust_cargo_include_features added and escaped): + let b:ale_rust_cargo_default_feature_behavior = 'default' + let b:ale_rust_cargo_include_features = "foo bar baz" + + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --frozen --message-format=json -q --features ' . ale#Escape('foo bar baz')] + +Execute(--all-features should be used when g:ale_rust_cargo_default_feature_behavior is all): + let b:ale_rust_cargo_default_feature_behavior = 'all' + " When all features are enabled we should ignore extra features to add + " since it won't do anything + let b:ale_rust_cargo_include_features = 'foo bar' + + GivenCommandOutput ['cargo 0.22.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --frozen --message-format=json -q --all-features'] + +Execute(Cargo should run from the crate directory when set to avoid the workspace): + let g:ale_rust_cargo_avoid_whole_workspace = 1 + call ale#test#SetFilename('../test-files/cargo/workspace_paths/subpath/test.rs') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cargo/workspace_paths/subpath') + call ale#semver#ResetVersionCache() + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check --frozen --message-format=json -q', + \] + +Execute(Cargo should not run from the crate directory when not set to avoid the workspace): + let g:ale_rust_cargo_avoid_whole_workspace = 0 + call ale#test#SetFilename('../test-files/cargo/workspace_paths/subpath/test.rs') + + AssertLinterCwd '' + call ale#semver#ResetVersionCache() + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check --frozen --message-format=json -q', + \] + +Execute(When ale_rust_cargo_use_clippy is set, cargo-clippy is used as linter): + let b:ale_rust_cargo_use_clippy = 1 + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo clippy --frozen --message-format=json -q', + \] + +Execute(When ale_rust_cargo_clippy_options is set, cargo-clippy appends it to commandline): + let b:ale_rust_cargo_use_clippy = 1 + let b:ale_rust_cargo_clippy_options = '-- -D warnings' + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo clippy --frozen --message-format=json -q -- -D warnings', + \] + +Execute(Clippy options work without prepending --): + let b:ale_rust_cargo_use_clippy = 1 + let b:ale_rust_cargo_clippy_options = '-D warnings' + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo clippy --frozen --message-format=json -q -- -D warnings', + \] + +Execute(Build supports all cargo flags): + let g:ale_rust_cargo_use_check = 0 + let g:ale_rust_cargo_check_all_targets = 1 + let g:ale_rust_cargo_check_tests = 1 + let g:ale_rust_cargo_check_examples = 1 + let b:ale_rust_cargo_default_feature_behavior = 'all' + let b:ale_rust_cargo_target_dir = 'target/ale' + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo build --all-targets --examples --tests --target-dir ' . ale#Escape('target/ale') . ' --frozen --message-format=json -q --all-features', + \] + +Execute(Clippy supports all cargo flags): + let b:ale_rust_cargo_use_clippy = 1 + let g:ale_rust_cargo_check_all_targets = 1 + let g:ale_rust_cargo_check_tests = 1 + let g:ale_rust_cargo_check_examples = 1 + let b:ale_rust_cargo_default_feature_behavior = 'all' + let b:ale_rust_cargo_clippy_options = '-D warnings' + let b:ale_rust_cargo_target_dir = 'target/ale' + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo clippy --all-targets --examples --tests --target-dir ' . ale#Escape('target/ale') . ' --frozen --message-format=json -q --all-features -- -D warnings', + \] + +Execute(cargo-check does not refer ale_rust_cargo_clippy_options): + let b:ale_rust_cargo_use_clippy = 0 + let b:ale_rust_cargo_use_check = 1 + let b:ale_rust_cargo_clippy_options = '-- -D warnings' + + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check --frozen --message-format=json -q', + \] + +Execute(`cargo --target-dir` should be used when the version is new enough and it is set): + let b:ale_rust_cargo_target_dir = 'target/ale' + + GivenCommandOutput ['cargo 0.17.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo check --target-dir ' . ale#Escape('target/ale') . g:suffix, + \] + +Execute(`cargo --target-dir` should not be used when the version is not new enough and it is set): + let b:ale_rust_cargo_target_dir = 'target/ale' + + GivenCommandOutput ['cargo 0.16.0 (3423351a5 2017-10-06)'] + AssertLinter 'cargo', [ + \ ale#Escape('cargo') . ' --version', + \ 'cargo build' . g:suffix, + \] diff --git a/dot_vim/plugged/ale/test/linter/test_checkmake.vader b/dot_vim/plugged/ale/test/linter/test_checkmake.vader new file mode 100644 index 0000000..ec8a4b8 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_checkmake.vader @@ -0,0 +1,39 @@ +Before: + Save g:ale_make_checkmake_config + + let g:ale_make_checkmake_config = '' + + call ale#assert#SetUpLinterTest('make', 'checkmake') + + " NOTE: the format string must be manually matched that set in the plugin + let b:format = '"{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"' + +After: + Restore + + unlet! b:command_tail + unlet! b:ale_make_checkmake_config + + call ale#assert#TearDownLinterTest() + +Execute(checkmake should run with default format option): + let b:command_tail = ' --format=' . b:format . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail + +Execute(checkmake command should take the config option if it is non-empty): + let g:ale_make_checkmake_config = '/path to/checkmake.ini' + let b:command_tail = ' --format=' . b:format + \ . ' --config="' . g:ale_make_checkmake_config . '"' + \ . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail + +Execute(the local buffer config option takes precedence over global option): + let g:ale_make_checkmake_config = '/path/to/checkmake.ini' + let b:ale_make_checkmake_config = '/another/checkmake.ini' + let b:command_tail = ' --format=' . b:format + \ . ' --config="' . b:ale_make_checkmake_config . '"' + \ . ' %s' + + AssertLinter 'checkmake', 'checkmake' . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_checkov.vader b/dot_vim/plugged/ale/test/linter/test_checkov.vader new file mode 100644 index 0000000..f93d34f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_checkov.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'checkov') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be direct): + AssertLinter 'checkov', + \ ale#Escape('checkov') . ' -f %t -o json --quiet ' + +Execute(It should be possible to override the default command): + let b:ale_terraform_checkov_executable = '/bin/other/checkov' + AssertLinter '/bin/other/checkov', + \ ale#Escape('/bin/other/checkov') . ' -f %t -o json --quiet ' diff --git a/dot_vim/plugged/ale/test/linter/test_checkstyle.vader b/dot_vim/plugged/ale/test/linter/test_checkstyle.vader new file mode 100644 index 0000000..8197e6b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_checkstyle.vader @@ -0,0 +1,72 @@ +Before: + call ale#assert#SetUpLinterTest('java', 'checkstyle') + call ale#test#SetFilename('dummy.java') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The checkstyle callback should return the correct default value): + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' -c ' . ale#Escape('/google_checks.xml') + \ . ' %s' + +Execute(The checkstyle executable should be configurable): + let b:ale_java_checkstyle_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' -c ' . ale#Escape('/google_checks.xml') + \ . ' %s' + +Execute(Custom options should be supported): + let b:ale_java_checkstyle_options = '--foobar -cp -classpath /path/to/checkstyle-8.7-all.jar' + + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' --foobar -cp -classpath /path/to/checkstyle-8.7-all.jar' + \ . ' -c ' . ale#Escape('/google_checks.xml') + \ . ' %s' + +Execute(configuration files set in _config should be supported): + let b:ale_java_checkstyle_config = ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml') + + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml')) + \ . ' %s' + +Execute(configuration files set in _options should be preferred over _config): + let b:ale_java_checkstyle_config = '/foo.xml' + let b:ale_java_checkstyle_options = '-c /bar.xml' + + AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -c /bar.xml %s' + + let b:ale_java_checkstyle_options = '-x -c /bar.xml' + + AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -x -c /bar.xml %s' + +Execute(google_checks.xml should be used by default): + call ale#test#SetFilename('../test-files/checkstyle/test.java') + + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' -c ' . ale#Escape('/google_checks.xml') + \ . ' %s' + +Execute(Other relative paths should be supported): + let b:ale_java_checkstyle_config = '../test-files/checkstyle/other_config.xml' + + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml')) + \ . ' %s' + + call ale#test#SetFilename('../test-files/checkstyle/test.java') + + let b:ale_java_checkstyle_config = 'other_config.xml' + + AssertLinter 'checkstyle', + \ ale#Escape('checkstyle') + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/checkstyle/other_config.xml')) + \ . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_circleci.vader b/dot_vim/plugged/ale/test/linter/test_circleci.vader new file mode 100644 index 0000000..000a77e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_circleci.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'circleci') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The linter should not run for every YAML file): + AssertLinterNotExecuted + +Execute(The linter should for YAML files in a .circleci directory): + call ale#test#SetFilename('../test-files/.circleci/config.yml') + + AssertLinter 'circleci', 'circleci --skip-update-check config validate - < %s' diff --git a/dot_vim/plugged/ale/test/linter/test_clang_tidy.vader b/dot_vim/plugged/ale/test/linter/test_clang_tidy.vader new file mode 100644 index 0000000..eb1220b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_clang_tidy.vader @@ -0,0 +1,84 @@ +Before: + Save g:ale_c_parse_makefile + let g:ale_c_parse_makefile = 0 + + call ale#assert#SetUpLinterTest('cpp', 'clangtidy') + call ale#test#SetFilename('test.cpp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The clangtidy command default should be correct): + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' %s' + +Execute(You should be able to remove the -checks option for clang-tidy): + let b:ale_cpp_clangtidy_checks = [] + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' %s' + +Execute(You should be able to set other checks for clang-tidy): + let b:ale_cpp_clangtidy_checks = ['-*', 'clang-analyzer-*'] + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('-*,clang-analyzer-*') . ' %s' + +Execute(You should be able to manually set compiler flags for clang-tidy): + let b:ale_cpp_clangtidy_checks = ['*'] + let b:ale_cpp_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' -checks=' . ale#Escape('*') . ' %s -- -Wall' + +Execute(You should be able to manually set flags for clang-tidy): + let b:ale_cpp_clangtidy_extra_options = '-config=' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') . ' ' . ale#Escape('-config=') . ' %s' + +Execute(The build directory should be configurable): + let b:ale_cpp_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The build directory setting should override the options): + let b:ale_cpp_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + let b:ale_cpp_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The build directory should be used for header files): + call ale#test#SetFilename('test.h') + + let b:ale_cpp_clangtidy_checks = ['*'] + let b:ale_c_build_dir = '/foo/bar' + let b:ale_cpp_clangtidy_options = '-Wall' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + + call ale#test#SetFilename('test.hpp') + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' -checks=' . ale#Escape('*') . ' %s' + \ . ' -p ' . ale#Escape('/foo/bar') + +Execute(The executable should be configurable): + let b:ale_cpp_clangtidy_checks = ['*'] + let b:ale_cpp_clangtidy_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -checks=' . ale#Escape('*') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_clj_kondo.vader b/dot_vim/plugged/ale/test/linter/test_clj_kondo.vader new file mode 100644 index 0000000..e62211c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_clj_kondo.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('clojure', 'clj_kondo') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'clj-kondo', 'clj-kondo' + \ . ' --cache --lint - --filename %s' + +Execute(Extra options should be supported): + let g:ale_clojure_clj_kondo_options = '--config ./clj-kondo/config.edn' + + AssertLinter 'clj-kondo', 'clj-kondo' + \ . ' --config ./clj-kondo/config.edn --lint - --filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_cmake_cmake_lint.vader b/dot_vim/plugged/ale/test/linter/test_cmake_cmake_lint.vader new file mode 100644 index 0000000..6cf0914 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cmake_cmake_lint.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cmake', 'cmake_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'cmake-lint', ale#Escape('cmake-lint') . ' %t' + +Execute(The executable should be configurable): + let g:ale_cmake_cmake_lint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_cookstyle.vader b/dot_vim/plugged/ale/test/linter/test_cookstyle.vader new file mode 100644 index 0000000..ad7391c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cookstyle.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('chef', 'cookstyle') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'cookstyle', ale#Escape('cookstyle') . ' --force-exclusion --format json --stdin %s' + +Execute(The executable path should be configurable): + let b:ale_chef_cookstyle_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --force-exclusion --format json --stdin %s' + +Execute(The linter options should be configurable): + let b:ale_chef_cookstyle_options = '--parallel' + + AssertLinter 'cookstyle', ale#Escape('cookstyle') . ' --parallel --force-exclusion --format json --stdin %s' + diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_cc.vader b/dot_vim/plugged/ale/test/linter/test_cpp_cc.vader new file mode 100644 index 0000000..e6794c0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_cc.vader @@ -0,0 +1,94 @@ +Before: + Save g:ale_c_parse_makefile + Save g:ale_history_enabled + + let g:ale_c_parse_makefile = 0 + let g:ale_history_enabled = 0 + + let g:get_cflags_return_value = '' + let g:executable_map = {} + + runtime autoload/ale/c.vim + runtime autoload/ale/engine.vim + + function! ale#engine#IsExecutable(buffer, executable) abort + return has_key(g:executable_map, a:executable) + endfunction + + function! ale#c#GetCFlags(buffer, output) abort + return g:get_cflags_return_value + endfunction + + call ale#assert#SetUpLinterTest('cpp', 'cc') + + let b:command_tail = ' -S -x c++' + \ . ' -o ' . (has('win32') ? 'nul': '/dev/null') + \ . ' -iquote %s:h' + \ . ' -std=c++14 -Wall -' + +After: + unlet! g:get_cflags_return_value + unlet! g:executable_map + unlet! b:command_tail + + runtime autoload/ale/c.vim + runtime autoload/ale/engine.vim + + call ale#assert#TearDownLinterTest() + +Execute(clang++ should be used instead of gcc, if available): + let g:executable_map = {'clang++': 1} + + AssertLinter 'clang++', [ale#Escape('clang++') . b:command_tail] + +Execute(The executable should be configurable): + AssertLinter 'gcc', [ale#Escape('gcc') . b:command_tail] + + let b:ale_cpp_cc_executable = 'foobar' + + AssertLinter 'foobar', [ale#Escape('foobar') . b:command_tail] + +Execute(The -std flag should be replaced by parsed C flags): + let b:command_tail = substitute(b:command_tail, 'c++14', 'c++11 ', '') + let g:get_cflags_return_value = '-std=c++11' + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(gcc should not use -x c++-header with header files by default): + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang++ should use -x c++-header with header files by default): + let g:executable_map = {'clang++': 1} + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail + +Execute(gcc should use -x c-header with header files if configured to do so): + let b:ale_cpp_cc_use_header_lang_flag = 1 + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'gcc', ale#Escape('gcc') . b:command_tail + +Execute(clang should not use -x c-header with header files if configured to do so): + let g:executable_map = {'clang++': 1} + let b:ale_cpp_cc_use_header_lang_flag = 0 + + call ale#test#SetFilename('../test-files/c/hpp_file_project/test.hpp') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail + +Execute(The header file extensions should be configurable): + let g:executable_map = {'clang++': 1} + let b:command_tail = substitute(b:command_tail, '-x c++', '-x c++-header', '') + + call ale#assert#SetUpLinterTest('cpp', 'cc') + let b:ale_cpp_cc_header_exts = ['json'] + call ale#test#SetFilename('../test-files/c/json_project/build/compile_commands.json') + + AssertLinter 'clang++', ale#Escape('clang++') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_ccls.vader b/dot_vim/plugged/ale/test/linter/test_cpp_ccls.vader new file mode 100644 index 0000000..12aa30e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_ccls.vader @@ -0,0 +1,69 @@ +" Author: Ye Jingchen , Ben Falconer +" Description: A language server for C++ + +Before: + call ale#assert#SetUpLinterTest('cpp', 'ccls') + + Save b:ale_c_build_dir_names + Save b:ale_cpp_ccls_executable + Save b:ale_cpp_ccls_init_options + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + call ale#test#SetFilename(tempname() . '/dummy.cpp') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + call ale#test#SetFilename(tempname() . '/dummy.cpp') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + call ale#test#SetFilename(tempname() . '/dummy.cpp') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls-root/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_cpp_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_cpp_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } + +Execute(The compile command database should be detected correctly): + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.c') + + AssertLSPOptions {} + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.c') + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') } + + call ale#test#SetFilename('../test-files/ccls/with_build_dir/dummy.c') + let b:ale_c_build_dir_names = ['unusual_build_dir_name'] + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_build_dir/unusual_build_dir_name') } diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_clangcheck.vader b/dot_vim/plugged/ale/test/linter/test_cpp_clangcheck.vader new file mode 100644 index 0000000..188141d --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_clangcheck.vader @@ -0,0 +1,35 @@ +Before: + call ale#assert#SetUpLinterTest('cpp', 'clangcheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'clang-check', + \ ale#Escape('clang-check') + \ . ' -analyze %s --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics' + + let b:ale_cpp_clangcheck_executable = 'foobar' + + " The extra arguments in the command are used to prevent .plist files from + " being generated. + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' -analyze %s --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics' + +Execute(The options should be configurable): + let b:ale_cpp_clangcheck_options = '--something' + + AssertLinter 'clang-check', + \ ale#Escape('clang-check') + \ . ' -analyze %s' + \ . ' --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics' + \ . ' --something' + +Execute(The build directory should be used when set): + let b:ale_cpp_clangcheck_options = '--something' + let b:ale_c_build_dir = '/foo/bar' + + AssertLinter 'clang-check', + \ ale#Escape('clang-check') + \ . ' -analyze %s --something -p ' . ale#Escape('/foo/bar') diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_clazy.vader b/dot_vim/plugged/ale/test/linter/test_cpp_clazy.vader new file mode 100644 index 0000000..e5a81b8 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_clazy.vader @@ -0,0 +1,56 @@ +Before: + call ale#assert#SetUpLinterTest('cpp', 'clazy') + call ale#test#SetFilename('test.cpp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The clazy command default should be correct): + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') . ' -checks=' . ale#Escape('level1') . ' %s' + +Execute(You should be able to remove the -checks option for clazy-standalone): + let b:ale_cpp_clazy_checks = [] + + AssertLinter 'clazy-standalone', ale#Escape('clazy-standalone') . ' %s' + +Execute(You should be able to set other checks for clazy-standalone): + let b:ale_cpp_clazy_checks = ['level2', 'level3'] + + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') + \ . ' -checks=' . ale#Escape('level2,level3') . ' %s' + +Execute(You should be able to manually set compiler flags for clazy-standalone): + let b:ale_cpp_clazy_options = '-qt4-compat' + + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') . ' -checks=' . ale#Escape('level1') . ' -qt4-compat' . ' %s' + \ +Execute(The build directory should be configurable): + let b:ale_c_build_dir = '/foo/bar' + + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') + \ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s' + +Execute(The build directory should be used for header files): + call ale#test#SetFilename('test.h') + + let b:ale_c_build_dir = '/foo/bar' + + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') + \ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s' + + call ale#test#SetFilename('test.hpp') + + AssertLinter 'clazy-standalone', + \ ale#Escape('clazy-standalone') + \ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s' + +Execute(The executable should be configurable): + let b:ale_cpp_clazy_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -checks=' . ale#Escape('level1') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_cppcheck.vader b/dot_vim/plugged/ale/test/linter/test_cpp_cppcheck.vader new file mode 100644 index 0000000..880bcb4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_cppcheck.vader @@ -0,0 +1,83 @@ +Before: + call ale#assert#SetUpLinterTest('cpp', 'cppcheck') + let b:command_tail = ' -q --language=c++ --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') . ' --enable=style -I' . ale#Escape(ale#path#Simplify(g:dir)) .' %t' + +After: + " Remove a test file we might open for some tests. + if &buftype != 'nofile' + set nomodified + set buftype=nofile + endif + + unlet! b:rel_file_path + unlet! b:command_tail + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'cppcheck', ale#Escape('cppcheck') . b:command_tail + + let b:ale_cpp_cppcheck_executable = 'foobar' + + AssertLinterCwd '' + AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail + +Execute(cppcheck for C++ should detect compile_commands.json files): + let b:rel_file_path = '../test-files/cppcheck/one/foo.cpp' + call ale#test#SetFilename(b:rel_file_path) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/one') + AssertLinter 'cppcheck', ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --project=' . ale#Escape('compile_commands.json') + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) + \ . ' --enable=style %t' + +Execute(cppcheck for C++ should detect compile_commands.json files in build directories): + let b:rel_file_path = '../test-files/cppcheck/with_build_dir/foo.cpp' + call ale#test#SetFilename(b:rel_file_path) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/with_build_dir') + AssertLinter 'cppcheck', ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json')) + \ . ' --file-filter=' . ale#Escape(ale#test#GetFilename(b:rel_file_path)) + \ . ' --enable=style %t' + +Execute(cppcheck for C++ should include file dir if compile_commands.json file is not found): + call ale#test#SetFilename('../test-files/cppcheck/foo.cpp') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --enable=style' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck')) + \ . ' %t' + +Execute(cppcheck for C++ header should include file dir and not use compile_commands.json): + call ale#test#SetFilename('../test-files/cppcheck/one/foo.hpp') + + AssertLinter 'cppcheck', + \ ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck/one')) + \ . ' --suppress=unusedStructMember' + \ . ' --enable=style' + \ . ' %t' + +Execute(cppcheck for C++ should ignore compile_commands.json file if buffer is modified): + call ale#test#SetFilename('../test-files/cppcheck/one/foo.cpp') + + set buftype= + set modified + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/cppcheck/one') + AssertLinter 'cppcheck', ale#Escape('cppcheck') + \ . ' -q --language=c++' + \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') + \ . ' --enable=style' + \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cppcheck/one')) + \ . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_cquery.vader b/dot_vim/plugged/ale/test/linter/test_cpp_cquery.vader new file mode 100644 index 0000000..f638e40 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_cquery.vader @@ -0,0 +1,40 @@ +" Author: Ben Falconer +" Description: A language server for C++ + +Before: + call ale#assert#SetUpLinterTest('cpp', 'cquery') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + call ale#test#SetFilename(tempname() . '/dummy.cpp') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/cquery/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/cquery') + +Execute(The project root should be detected correctly using .cquery file): + call ale#test#SetFilename(tempname() . '/dummy.cpp') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/cquery/with_cquery/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/cquery/with_cquery') + +Execute(The executable should be configurable): + AssertLinter 'cquery', ale#Escape('cquery') + + let b:ale_cpp_cquery_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The cache directory should be configurable): + AssertLSPOptions {'cacheDirectory': expand('$HOME/.cache/cquery')} + + let b:ale_cpp_cquery_cache_directory = '/foo/bar' + + AssertLSPOptions {'cacheDirectory': '/foo/bar'} diff --git a/dot_vim/plugged/ale/test/linter/test_cpp_flawfinder.vader b/dot_vim/plugged/ale/test/linter/test_cpp_flawfinder.vader new file mode 100644 index 0000000..6936953 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpp_flawfinder.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('cpp', 'flawfinder') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The flawfinder command should be correct): + AssertLinter 'flawfinder', + \ ale#Escape('flawfinder') . ' -CDQS --minlevel=1 %t' + +Execute(The minlevel of flawfinder should be configurable): + let b:ale_cpp_flawfinder_minlevel = 8 + + AssertLinter 'flawfinder', + \ ale#Escape('flawfinder') . ' -CDQS --minlevel=8 %t' + +Execute(Additional flawfinder options should be configurable): + let b:ale_cpp_flawfinder_options = ' --foobar' + + AssertLinter 'flawfinder', + \ ale#Escape('flawfinder') . ' -CDQS --foobar --minlevel=1 %t' + +Execute(The flawfinder executable should be configurable): + let b:ale_cpp_flawfinder_executable = 'foo/bar' + + AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' -CDQS --minlevel=1 %t' diff --git a/dot_vim/plugged/ale/test/linter/test_cpplint.vader b/dot_vim/plugged/ale/test/linter/test_cpplint.vader new file mode 100644 index 0000000..d5fd457 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cpplint.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpLinterTest('cpp', 'cpplint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'cpplint', ale#Escape('cpplint') . ' %s' + + let b:ale_cpp_cpplint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %s' + +Execute(The options should be configurable): + let b:ale_cpp_cpplint_options = '--something' + + AssertLinter 'cpplint', ale#Escape('cpplint') . ' --something %s' diff --git a/dot_vim/plugged/ale/test/linter/test_cs_csc.vader b/dot_vim/plugged/ale/test/linter/test_cs_csc.vader new file mode 100644 index 0000000..c01de7f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cs_csc.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('cs', 'csc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The csc linter should return the correct default command): + AssertLinterCwd expand('%:p:h') + AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + +Execute(The options should be be used in the command): + let g:ale_cs_csc_options = '' + + AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + +Execute(The source path should be be used in the command): + let g:ale_cs_csc_source = '../foo/bar' + + AssertLinterCwd '../foo/bar' + AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + +Execute(The list of search paths for assemblies should be be used in the command if not empty): + let g:ale_cs_csc_assembly_path = ['/usr/lib/mono', '../foo/bar'] + + AssertLinter 'csc', 'csc /unsafe' + \ . ' /lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar') + \ . ' /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + + let g:ale_cs_csc_assembly_path = [] + + AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + +Execute(The list of assemblies should be be used in the command if not empty): + let g:ale_cs_csc_assemblies = ['foo.dll', 'bar.dll'] + + AssertLinter 'csc', 'csc /unsafe' + \ . ' /r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll') + \ . ' /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') + + let g:ale_cs_csc_assemblies = [] + + AssertLinter 'csc', 'csc /unsafe /out:TEMP /t:module /recurse:' . ale#Escape('*.cs') diff --git a/dot_vim/plugged/ale/test/linter/test_cs_mcs.vader b/dot_vim/plugged/ale/test/linter/test_cs_mcs.vader new file mode 100644 index 0000000..dbebd10 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cs_mcs.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cs', 'mcs') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'mcs', 'mcs -unsafe --parse %t' + +Execute(The options should be be used in the command): + let b:ale_cs_mcs_options = '-pkg:dotnet' + + AssertLinter 'mcs', 'mcs -unsafe --parse -pkg:dotnet %t' diff --git a/dot_vim/plugged/ale/test/linter/test_cs_mcsc.vader b/dot_vim/plugged/ale/test/linter/test_cs_mcsc.vader new file mode 100644 index 0000000..8634a5f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cs_mcsc.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('cs', 'mcsc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The mcsc linter should return the correct default command): + AssertLinterCwd expand('%:p:h') + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + +Execute(The options should be be used in the command): + let g:ale_cs_mcsc_options = '-pkg:dotnet' + + AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + +Execute(The source path should be be used in the command): + let g:ale_cs_mcsc_source = '../foo/bar' + + AssertLinterCwd '../foo/bar' + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + +Execute(The list of search paths for assemblies should be be used in the command if not empty): + let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar'] + + AssertLinter 'mcs', 'mcs -unsafe' + \ . ' -lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar') + \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + + let g:ale_cs_mcsc_assembly_path = [] + + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + +Execute(The list of assemblies should be be used in the command if not empty): + let g:ale_cs_mcsc_assemblies = ['foo.dll', 'bar.dll'] + + AssertLinter 'mcs', 'mcs -unsafe' + \ . ' -r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll') + \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + + let g:ale_cs_mcsc_assemblies = [] + + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') diff --git a/dot_vim/plugged/ale/test/linter/test_cspell.vader b/dot_vim/plugged/ale/test/linter/test_cspell.vader new file mode 100644 index 0000000..0302edc --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cspell.vader @@ -0,0 +1,71 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'cspell') + + " We have to manually do our own variable reset because SetUpLinterTest calls + " ale#assert#ResetVariables, which specifically only resets variables that + " begin with ale__, per https://github.com/dense-analysis/ale/blob/76c2293e68a6cad3b192062743d25b8daa082205/autoload/ale/assert.vim#L256 + " + " Took a lot of debugging and reading both junegunn/vader.vim and most ALE + " files to find this behavior + + Save g:ale_cspell_executable + Save g:ale_cspell_use_global + Save g:ale_cspell_options + + unlet! g:ale_cspell_executable + unlet! g:ale_cspell_use_global + unlet! g:ale_cspell_options + + let g:ale_cspell_executable = 'cspell' + let g:ale_cspell_use_global = 0 + let g:ale_cspell_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The global executable should be used when the local one cannot be found): + AssertLinter + \ 'cspell', + \ ale#Escape('cspell') + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should use the node_modules/.bin executable if available): + call ale#test#SetFilename('../test-files/cspell/node-modules/test.tex') + + AssertLinter + \ ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell'), + \ ale#Escape(ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell')) + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should use the node_modules/cspell executable if available): + call ale#test#SetFilename('../test-files/cspell/node-modules-2/test.tex') + + AssertLinter + \ ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules-2/node_modules/cspell/bin.js'), + \ (has('win32') ? 'node.exe ': '') + \ . ale#Escape(ale#path#Simplify(g:dir + \ . '/../test-files/cspell/node-modules-2/node_modules/cspell/bin.js')) + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Should let users configure a global executable and override local paths): + let g:ale_cspell_executable = '/path/to/custom/cspell' + let g:ale_cspell_use_global = 1 + + AssertLinter + \ '/path/to/custom/cspell', + \ ale#Escape('/path/to/custom/cspell') + \ . ' lint --no-color --no-progress --no-summary -- stdin' + +Execute(Additional cspell options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + + let g:ale_cspell_options = '--foobar' + + AssertLinter + \ 'cspell', + \ ale#Escape('cspell') + \ . ' lint --no-color --no-progress --no-summary --foobar -- stdin' + diff --git a/dot_vim/plugged/ale/test/linter/test_cucumber.vader b/dot_vim/plugged/ale/test/linter/test_cucumber.vader new file mode 100644 index 0000000..6a7851e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cucumber.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('cucumber', 'cucumber') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should require the nearest features dir, if one is found): + call ale#test#SetFilename('../test-files/cucumber/features/cuke.feature') + + AssertLinter 'cucumber', + \ 'cucumber --dry-run --quiet --strict --format=json ' + \ . '-r ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/cucumber/features/')) . ' %t' + +Execute(Should require nothing if no features dir is found): + call ale#test#SetFilename('something/without/a/features/dir') + + AssertLinter 'cucumber', + \ 'cucumber --dry-run --quiet --strict --format=json %t' diff --git a/dot_vim/plugged/ale/test/linter/test_cuda_nvcc.vader b/dot_vim/plugged/ale/test/linter/test_cuda_nvcc.vader new file mode 100644 index 0000000..4578d05 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cuda_nvcc.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('cuda', 'nvcc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'nvcc', + \ ale#Escape('nvcc') . ' -cuda -std=c++11 %s -o ' . g:ale#util#nul_file + + let b:ale_cuda_nvcc_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -cuda -std=c++11 %s -o ' . g:ale#util#nul_file + +Execute(The options should be configurable): + let g:ale_cuda_nvcc_options = '--foobar' + + AssertLinter 'nvcc', + \ ale#Escape('nvcc') . ' -cuda --foobar %s -o ' . g:ale#util#nul_file diff --git a/dot_vim/plugged/ale/test/linter/test_cypher_cypher_lint.vader b/dot_vim/plugged/ale/test/linter/test_cypher_cypher_lint.vader new file mode 100644 index 0000000..6b64dc1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_cypher_cypher_lint.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('cypher', 'cypher_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command and executable should be correct): + AssertLinter 'cypher-lint', 'cypher-lint' diff --git a/dot_vim/plugged/ale/test/linter/test_d_dls.vader b/dot_vim/plugged/ale/test/linter/test_d_dls.vader new file mode 100644 index 0000000..156ebf6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_d_dls.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('d', 'dls') + + Save &filetype + let &filetype = 'd' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'd' + +Execute(The default executable should be correct): + AssertLinter 'dls', 'dls' + +Execute(The executable should be configurable): + let g:ale_d_dls_executable = 'foobar' + + AssertLinter 'foobar', 'foobar' diff --git a/dot_vim/plugged/ale/test/linter/test_dart_analysis_server.vader b/dot_vim/plugged/ale/test/linter/test_dart_analysis_server.vader new file mode 100644 index 0000000..1754109 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dart_analysis_server.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('dart', 'analysis_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'dart', ale#Escape('dart') + \ . ' ./snapshots/analysis_server.dart.snapshot --lsp' + +Execute(The executable should be configurable): + let g:ale_dart_analysis_server_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + \ . ' ./snapshots/analysis_server.dart.snapshot --lsp' diff --git a/dot_vim/plugged/ale/test/linter/test_dart_language_server.vader b/dot_vim/plugged/ale/test/linter/test_dart_language_server.vader new file mode 100644 index 0000000..5567f27 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dart_language_server.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('dart', 'language_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'dart_language_server', ale#Escape('dart_language_server') diff --git a/dot_vim/plugged/ale/test/linter/test_desktop_file_validate.vader b/dot_vim/plugged/ale/test/linter/test_desktop_file_validate.vader new file mode 100644 index 0000000..4a49057 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_desktop_file_validate.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('desktop', 'desktop_file_validate') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'desktop-file-validate', + \ ale#Escape('desktop-file-validate') . ' %t' + +Execute(Extra options should work): + let b:ale_desktop_desktop_file_validate_options = '--warn-kde' + + AssertLinter 'desktop-file-validate', + \ ale#Escape('desktop-file-validate') . ' --warn-kde %t' diff --git a/dot_vim/plugged/ale/test/linter/test_dialyxir.vader b/dot_vim/plugged/ale/test/linter/test_dialyxir.vader new file mode 100644 index 0000000..250ffef --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dialyxir.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('elixir', 'dialyxir') + call ale#test#SetFilename('../test-files/elixir/mix_project/lib/app.ex') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Builds dialyxir command with a normal project): + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/mix_project') + AssertLinter 'mix', 'mix help dialyzer && mix dialyzer' + +Execute(Builds dialyxir command with an umbrella project): + call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/mix_project/lib/app.ex') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project') + AssertLinter 'mix', 'mix help dialyzer && mix dialyzer' diff --git a/dot_vim/plugged/ale/test/linter/test_dmd_commandline.vader b/dot_vim/plugged/ale/test/linter/test_dmd_commandline.vader new file mode 100644 index 0000000..609fc07 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dmd_commandline.vader @@ -0,0 +1,96 @@ +Before: + runtime ale_linters/d/dmd.vim + +After: + call ale#linter#Reset() + +Execute(DMD command line should be correct with imports): + AssertEqual + \ 'dmd ' . + \ '-I' . ale#Escape('source') . ' ' . + \ '-I' . ale#Escape('/prefix/include/d') . ' ' . + \ '-I' . ale#Escape('/home/user/.dub/packages/pkg-0.0.1/pkg/src') . ' ' . + \ ' ' . + \ ' ' . + \ ' ' . + \ '-o- -wi -vcolumns -c %t', + \ ale_linters#d#dmd#DMDCommand(bufnr(''), [ + \ 'source', + \ '/prefix/include/d', + \ '/home/user/.dub/packages/pkg-0.0.1/pkg/src', + \ '', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], {}) + +Execute(DMD command line should be correct with imports and version): + AssertEqual + \ 'dmd ' . + \ '-I' . ale#Escape('source') . ' ' . + \ '-I' . ale#Escape('/prefix/include/d') . ' ' . + \ '-I' . ale#Escape('/home/user/.dub/packages/pkg-0.0.1/pkg/src') . ' ' . + \ ' ' . + \ '-version=' . ale#Escape('SOME_VERSION') . ' ' . + \ ' ' . + \ '-o- -wi -vcolumns -c %t', + \ ale_linters#d#dmd#DMDCommand(bufnr(''), [ + \ 'source', + \ '/prefix/include/d', + \ '/home/user/.dub/packages/pkg-0.0.1/pkg/src', + \ '', + \ '', + \ '', + \ 'SOME_VERSION', + \ '', + \ '', + \ ], {}) + +Execute(DMD command line should be correct): + AssertEqual + \ 'dmd ' . + \ '-I' . ale#Escape('source') . ' ' . + \ '-I' . ale#Escape('/prefix/include/d') . ' ' . + \ '-I' . ale#Escape('/home/user/.dub/packages/pkg-0.0.1/pkg/src') . ' ' . + \ '-J' . ale#Escape('views') . ' ' . + \ '-version=' . ale#Escape('SOME_VERSION') . ' ' . + \ '-version=' . ale#Escape('SOME_OTHER_VERSION') . ' ' . + \ '-debug=' . ale#Escape('SomeFeature') . ' ' . + \ '-o- -wi -vcolumns -c %t', + \ ale_linters#d#dmd#DMDCommand(bufnr(''), [ + \ 'source', + \ '/prefix/include/d', + \ '/home/user/.dub/packages/pkg-0.0.1/pkg/src', + \ '', + \ 'views', + \ '', + \ 'SOME_VERSION', + \ 'SOME_OTHER_VERSION', + \ '', + \ 'SomeFeature', + \ ], {}) + +Execute(DMD command line should be correct with CR): + " on windows, the function is called with carriage return + AssertEqual + \ 'dmd ' . + \ '-I' . ale#Escape('source') . ' ' . + \ '-I' . ale#Escape('C:\prefix\include\d') . ' ' . + \ '-I' . ale#Escape('C:\Users\user\AppData\Local\Dub\packages\pkg-0.0.1\pkg\src') . ' ' . + \ ' ' . + \ ' ' . + \ ' ' . + \ '-o- -wi -vcolumns -c %t', + \ ale_linters#d#dmd#DMDCommand(bufnr(''), [ + \ "source\r", + \ "C:\\prefix\\include\\d\r", + \ "C:\\Users\\user\\AppData\\Local\\Dub\\packages\\pkg-0.0.1\\pkg\\src\r", + \ "\r", + \ "\r", + \ "\r", + \ "\r", + \ "\r", + \ "\r", + \ ], {}) diff --git a/dot_vim/plugged/ale/test/linter/test_dockerfile_lint.vader b/dot_vim/plugged/ale/test/linter/test_dockerfile_lint.vader new file mode 100644 index 0000000..abc32e0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dockerfile_lint.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('dockerfile', 'dockerfile_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'dockerfile_lint', ale#Escape('dockerfile_lint') . ' -p -j -f %t' + +Execute(The executable should be configurable): + let b:ale_dockerfile_dockerfile_lint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -p -j -f %t' + +Execute(The options should be configurable): + let b:ale_dockerfile_dockerfile_lint_options = '-r additional.yaml' + + AssertLinter 'dockerfile_lint', ale#Escape('dockerfile_lint') . ' -r additional.yaml -p -j -f %t' + diff --git a/dot_vim/plugged/ale/test/linter/test_dogma.vader b/dot_vim/plugged/ale/test/linter/test_dogma.vader new file mode 100644 index 0000000..c8b599a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_dogma.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('elixir', 'dogma') + call ale#test#SetFilename('../test-files/elixir/mix_project/lib/app.ex') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Builds dogma command with a normal project): + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/mix_project') + AssertLinter 'mix', 'mix help dogma && mix dogma %s --format=flycheck' + +Execute(Builds dogma command with an umbrella project): + call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/mix_project/lib/app.ex') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project') + AssertLinter 'mix', 'mix help dogma && mix dogma %s --format=flycheck' diff --git a/dot_vim/plugged/ale/test/linter/test_eclipselsp.vader b/dot_vim/plugged/ale/test/linter/test_eclipselsp.vader new file mode 100644 index 0000000..6bbc405 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_eclipselsp.vader @@ -0,0 +1,111 @@ +Before: + call ale#assert#SetUpLinterTest('java', 'eclipselsp') + call ale#test#SetFilename('dummy.java') + + let b:ale_java_eclipselsp_path = '/home/user/eclipse.dst.ls' + + let b:cfg = ale#path#Simplify(g:dir . '/../config_linux') + + if has('win32') + let b:cfg = ale#path#Simplify(g:dir . '/../config_win') + elseif has('macunix') + let b:cfg = ale#path#Simplify(g:dir . '/../config_mac') + endif + +After: + unlet! b:ale_java_eclipselsp_path + unlet! b:cfg + + call ale#assert#TearDownLinterTest() + +Execute(VersionCheck should return correct version): + + " OpenJDK Java 1.8 + AssertEqual [1, 8, 0], ale_linters#java#eclipselsp#VersionCheck([ + \ 'openjdk version "1.8.0_191"', + \ 'OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.04.1-b12)', + \ 'OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)' + \]) + + " OpenJDK Java 10 + AssertEqual [10, 0, 2], ale_linters#java#eclipselsp#VersionCheck([ + \ 'openjdk version "10.0.2" 2018-07-17', + \ 'OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)', + \ 'OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)' + \]) + + " Oracle Java 1.8 + AssertEqual [1, 8, 0], ale_linters#java#eclipselsp#VersionCheck([ + \ 'java version "1.8.0_161"', + \ 'Java(TM) SE Runtime Environment (build 1.8.0_161-b12)', + \ 'Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)' + \]) + + " Oracle Java 10 + AssertEqual [10, 0, 1], ale_linters#java#eclipselsp#VersionCheck([ + \ 'java version "10.0.1" 2018-04-17', + \ 'Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)', + \ 'Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)' + \]) + + AssertEqual [], ale_linters#java#eclipselsp#VersionCheck(['x']) + + AssertEqual [], ale_linters#java#eclipselsp#VersionCheck([]) + +Execute(The eclipselsp callback should return the correct default value): + let cmd = [ ale#Escape('java'), + \ '', + \ '-Declipse.application=org.eclipse.jdt.ls.core.id1', + \ '-Dosgi.bundles.defaultStartLevel=4', + \ '-Declipse.product=org.eclipse.jdt.ls.core.product', + \ '-Dlog.level=ALL', + \ '-noverify', + \ '-Xmx1G', + \ '-jar', + \ ale#Escape(''), + \ '-configuration', + \ ale#Escape(b:cfg), + \ '-data', + \ ale#Escape(ale#path#Simplify('')) + \] + AssertLinter 'java', join(cmd, ' ') + +Execute(The eclipselsp callback should allow custom executable): + let b:ale_java_eclipselsp_executable='/bin/foobar' + let cmd = [ ale#Escape('/bin/foobar'), + \ '', + \ '-Declipse.application=org.eclipse.jdt.ls.core.id1', + \ '-Dosgi.bundles.defaultStartLevel=4', + \ '-Declipse.product=org.eclipse.jdt.ls.core.product', + \ '-Dlog.level=ALL', + \ '-noverify', + \ '-Xmx1G', + \ '-jar', + \ ale#Escape(''), + \ '-configuration', + \ ale#Escape(b:cfg), + \ '-data', + \ ale#Escape(ale#path#Simplify('')) + \] + AssertLinter '/bin/foobar', join(cmd, ' ') + +Execute(The eclipselsp callback should allow custom configuration path and javaagent): + let b:ale_java_eclipselsp_config_path = '/home/config' + let b:ale_java_eclipselsp_javaagent = '/home/lombok.jar /home/lombok2.jar' + let cmd = [ ale#Escape('java'), + \ ale#Escape('-javaagent:/home/lombok.jar'), + \ ale#Escape('-javaagent:/home/lombok2.jar'), + \ '-Declipse.application=org.eclipse.jdt.ls.core.id1', + \ '-Dosgi.bundles.defaultStartLevel=4', + \ '-Declipse.product=org.eclipse.jdt.ls.core.product', + \ '-Dlog.level=ALL', + \ '-noverify', + \ '-Xmx1G', + \ '-jar', + \ ale#Escape(''), + \ '-configuration', + \ ale#Escape(ale#path#Simplify('/home/config')), + \ '-data', + \ ale#Escape(ale#path#Simplify('')) + \] + AssertLinter 'java', join(cmd, ' ') diff --git a/dot_vim/plugged/ale/test/linter/test_elixir_credo.vader b/dot_vim/plugged/ale/test/linter/test_elixir_credo.vader new file mode 100644 index 0000000..9c639c5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_elixir_credo.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('elixir', 'credo') + call ale#test#SetFilename('../test-files/elixir/mix_project/lib/app.ex') + + +After: + unlet! g:ale_elixir_credo_strict + + call ale#assert#TearDownLinterTest() + +Execute(Builds credo command with normal project): + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/mix_project') + AssertLinter 'mix', + \ 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with umbrella project): + call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/mix_project/lib/app.ex') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project') + AssertLinter 'mix', + \ 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with --strict mode when set to 1): + let g:ale_elixir_credo_strict = 1 + + AssertLinter 'mix', + \ 'mix help credo && mix credo --strict --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with suggest mode by default): + AssertLinter 'mix', + \ 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with suggest mode when set to 0): + let g:ale_elixir_credo_strict = 0 + + AssertLinter 'mix', + \ 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with a custom config file): + let g:ale_elixir_credo_config_file = '/home/user/custom_credo.exs' + + AssertLinter 'mix', + \ 'mix help credo && mix credo suggest --config-file /home/user/custom_credo.exs --format=flycheck --read-from-stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_elixir_ls.vader b/dot_vim/plugged/ale/test/linter/test_elixir_ls.vader new file mode 100644 index 0000000..84e805b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_elixir_ls.vader @@ -0,0 +1,34 @@ +Before: + call ale#assert#SetUpLinterTest('elixir', 'elixir_ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + if has('win32') + AssertLinter 'elixir-ls\language_server.bat', 'elixir-ls\language_server.bat' + else + AssertLinter 'elixir-ls/language_server.sh', 'elixir-ls/language_server.sh' + endif + +Execute(should configure elixir-ls release location): + let b:ale_elixir_elixir_ls_release = 'boo' + + if has('win32') + AssertLinter 'boo\language_server.bat', 'boo\language_server.bat' + else + AssertLinter 'boo/language_server.sh', 'boo/language_server.sh' + endif + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/app1/lib/app.ex') + + AssertLSPLanguage 'elixir' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project') + +Execute(should accept configuration settings): + AssertLSPConfig {} + let b:ale_elixir_elixir_ls_config = {'elixirLS': {'dialyzerEnabled': v:false}} + AssertLSPConfig {'elixirLS': {'dialyzerEnabled': v:false}} diff --git a/dot_vim/plugged/ale/test/linter/test_elixir_mix.vader b/dot_vim/plugged/ale/test/linter/test_elixir_mix.vader new file mode 100644 index 0000000..a04bee5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_elixir_mix.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('elixir', 'mix') + call ale#test#SetFilename('../test-files/elixir/mix_project/lib/app.ex') + let g:env_prefix = ale#Env('MIX_BUILD_PATH', 'TEMP_DIR') + +After: + unlet! g:env_prefix + + call ale#assert#TearDownLinterTest() + +Execute(The default mix command should be correct): + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/mix_project') + AssertLinter 'mix', g:env_prefix . 'mix compile %s' + +Execute(Build mix commands with an umbrella root): + call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/mix_project/lib/app.ex') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project') + AssertLinter 'mix', g:env_prefix . 'mix compile %s' diff --git a/dot_vim/plugged/ale/test/linter/test_elm_ls.vader b/dot_vim/plugged/ale/test/linter/test_elm_ls.vader new file mode 100644 index 0000000..98b01c9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_elm_ls.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('elm', 'elm_ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + AssertLinter 'elm-language-server', ale#Escape('elm-language-server') . ' --stdio' + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/elm/newapp') + +Execute(Should let users configure a global executable and override local paths): + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + let g:ale_elm_ls_executable = '/path/to/custom/elm-language-server' + let g:ale_elm_ls_use_global = 1 + + AssertLinter '/path/to/custom/elm-language-server', + \ ale#Escape('/path/to/custom/elm-language-server') . ' --stdio' + +Execute(The language should be correct): + AssertLSPLanguage 'elm' diff --git a/dot_vim/plugged/ale/test/linter/test_elm_make.vader b/dot_vim/plugged/ale/test/linter/test_elm_make.vader new file mode 100644 index 0000000..90e0c92 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_elm_make.vader @@ -0,0 +1,63 @@ +Before: + call ale#assert#SetUpLinterTest('elm', 'make') + +After: + unlet! g:executable + + call ale#assert#TearDownLinterTest() + +Execute(should get valid executable with default params): + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp') + AssertLinter g:executable, + \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t' + +Execute(should get elm-test executable for test code with elm >= 0.19): + call ale#test#SetFilename('../test-files/elm/newapp/tests/TestSuite.elm') + + let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm-test') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp') + AssertLinter g:executable, + \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null --compiler ' + \ . ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm') . ' %t' + +Execute(should fallback to elm executable with elm >= 0.19): + call ale#test#SetFilename('../test-files/elm/newapp-notests/tests/TestMain.elm') + + let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp-notests/node_modules/.bin/elm') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp-notests') + AssertLinter g:executable, + \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t' + +Execute(should get plain elm executable for test code with elm < 0.19): + call ale#test#SetFilename('../test-files/elm/oldapp/tests/TestSuite.elm') + + let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/oldapp/node_modules/.bin/elm') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/oldapp') + AssertLinter g:executable, + \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t' + +Execute(should get valid executable with 'use_global' params): + let g:ale_elm_make_use_global = 1 + + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp') + AssertLinter 'elm', + \ ale#Escape('elm') . ' make --report=json --output=/dev/null %t' + +Execute(should get valid executable with 'use_global' and 'executable' params): + let g:ale_elm_make_executable = 'other-elm' + let g:ale_elm_make_use_global = 1 + + call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp') + AssertLinter 'other-elm', + \ ale#Escape('other-elm') . ' make --report=json --output=/dev/null %t' diff --git a/dot_vim/plugged/ale/test/linter/test_embertemplatelint.vader b/dot_vim/plugged/ale/test/linter/test_embertemplatelint.vader new file mode 100644 index 0000000..7cba83e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_embertemplatelint.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('handlebars', 'embertemplatelint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Runs the right command for ember-template-lint >= 4.x): + GivenCommandOutput ['4.0.0'] + + AssertLinter 'ember-template-lint', + \ ale#Escape('ember-template-lint') . ' --format=json --filename %s' + +Execute(Runs the right command for ember-template-lint >= 1.6, < 4.x): + GivenCommandOutput ['1.6.0'] + + AssertLinter 'ember-template-lint', + \ ale#Escape('ember-template-lint') . ' --json --filename %s' + +Execute(Runs the right command for ember-template-lint < 1.6): + GivenCommandOutput ['1.5.0'] + + AssertLinter 'ember-template-lint', + \ ale#Escape('ember-template-lint') . ' --json %t' diff --git a/dot_vim/plugged/ale/test/linter/test_erb.vader b/dot_vim/plugged/ale/test/linter/test_erb.vader new file mode 100644 index 0000000..c64c7ba --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erb.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('eruby', 'erb') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should not contain any filter code by default): + call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/file.rb') + + AssertLinter 'erb', 'erb -P -T - -x %t | ruby -c' + +Execute(Executable should filter invalid eRuby when inside a Rails project): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/views/my_great_view.html.erb') + + AssertLinter 'erb', + \ 'ruby -r erb -e ' . ale#Escape('puts ERB.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c' diff --git a/dot_vim/plugged/ale/test/linter/test_erblint.vader b/dot_vim/plugged/ale/test/linter/test_erblint.vader new file mode 100644 index 0000000..147b596 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erblint.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('eruby', 'erblint') + call ale#test#SetFilename('dummy.html.erb') + + let g:ale_eruby_erblint_executable = 'erblint' + let g:ale_eruby_erblint_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to erblint): + AssertLinter 'erblint', ale#Escape('erblint') + \ . ' --format json --stdin %s' + +Execute(Should be able to set a custom executable): + let g:ale_eruby_erblint_executable = 'bin/erblint' + + AssertLinter 'bin/erblint' , ale#Escape('bin/erblint') + \ . ' --format json --stdin %s' + +Execute(Setting bundle appends 'exec erblint'): + let g:ale_eruby_erblint_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec erblint' + \ . ' --format json --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_erlang_dialyzer.vader b/dot_vim/plugged/ale/test/linter/test_erlang_dialyzer.vader new file mode 100644 index 0000000..5e818d7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erlang_dialyzer.vader @@ -0,0 +1,45 @@ +Before: + call ale#assert#SetUpLinterTest('erlang', 'dialyzer') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct.): + AssertLinter 'dialyzer', + \ ale#Escape('dialyzer') + \ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt')) + \ . ' -Wunmatched_returns' + \ . ' -Werror_handling' + \ . ' -Wrace_conditions' + \ . ' -Wunderspecs' + \ . ' %s' + +Execute(The command should accept configured executable.): + let b:ale_erlang_dialyzer_executable = '/usr/bin/dialyzer' + AssertLinter '/usr/bin/dialyzer', + \ ale#Escape('/usr/bin/dialyzer') + \ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt')) + \ . ' -Wunmatched_returns' + \ . ' -Werror_handling' + \ . ' -Wrace_conditions' + \ . ' -Wunderspecs' + \ . ' %s' + +Execute(The command should accept configured options.): + let b:ale_erlang_dialyzer_options = '-r ' . expand('$HOME') + AssertLinter 'dialyzer', + \ ale#Escape('dialyzer') + \ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt')) + \ . ' -r ' . expand('$HOME') + \ . ' %s' + +Execute(The command should accept configured PLT file.): + let b:ale_erlang_dialyzer_plt_file = 'custom-plt' + AssertLinter 'dialyzer', + \ ale#Escape('dialyzer') + \ . ' -n --plt ' . ale#Escape(expand('custom-plt')) + \ . ' -Wunmatched_returns' + \ . ' -Werror_handling' + \ . ' -Wrace_conditions' + \ . ' -Wunderspecs' + \ . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_erlang_elvis.vader b/dot_vim/plugged/ale/test/linter/test_erlang_elvis.vader new file mode 100644 index 0000000..4aab49d --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erlang_elvis.vader @@ -0,0 +1,16 @@ +Before: + let b:file = fnamemodify(bufname(''), ':.') + call ale#assert#SetUpLinterTest('erlang', 'elvis') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Default command should be correct): + AssertLinter 'elvis', + \ ale#Escape('elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file) + +Execute(Executable should be configurable): + let b:ale_erlang_elvis_executable = '/path/to/elvis' + + AssertLinter '/path/to/elvis', + \ ale#Escape('/path/to/elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file) diff --git a/dot_vim/plugged/ale/test/linter/test_erlang_erlang_ls.vader b/dot_vim/plugged/ale/test/linter/test_erlang_erlang_ls.vader new file mode 100644 index 0000000..3870b5c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erlang_erlang_ls.vader @@ -0,0 +1,48 @@ +Before: + let b:files = '../test-files/erlang' + call ale#assert#SetUpLinterTest('erlang', 'erlang_ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('info') + +Execute(Executable should be configurable): + let b:ale_erlang_erlang_ls_executable = '/path/to/erlang_ls' + + AssertLinter '/path/to/erlang_ls', + \ ale#Escape('/path/to/erlang_ls') . ' --log-level=' . ale#Escape('info') + +Execute(Log level should be configurable): + let b:ale_erlang_erlang_ls_log_level = 'debug' + + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('debug') + +Execute(Log directory should be configurable): + let b:ale_erlang_erlang_ls_log_dir = '/path/to/logs' + + AssertLinter 'erlang_ls', + \ ale#Escape('erlang_ls') + \ . ' --log-dir=' . ale#Escape('/path/to/logs') + \ . ' --log-level=' . ale#Escape('info') + +Execute(Project root should be detected using erlang_ls.config): + call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/src/app.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config') + + call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/_build/default/lib/dep/src/dep.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config') + +Execute(Root of Rebar3 project should be detected): + call ale#test#SetFilename(b:files . '/app/src/app.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app') + + call ale#test#SetFilename(b:files . '/app/_build/default/lib/dep/src/dep.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/app') + +Execute(Root of kerl managed Erlang/OTP installation should be detected): + call ale#test#SetFilename(b:files . '/kerl_otp_root/lib/stdlib-4.1.1/array.erl') + AssertLSPProject ale#test#GetFilename(b:files . '/kerl_otp_root') diff --git a/dot_vim/plugged/ale/test/linter/test_erlang_erlc.vader b/dot_vim/plugged/ale/test/linter/test_erlang_erlc.vader new file mode 100644 index 0000000..0651b51 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erlang_erlc.vader @@ -0,0 +1,62 @@ +Before: + call ale#assert#SetUpLinterTest('erlang', 'erlc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct.): + let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr('')) + let g:regex = 'erlc.\+-o.\+%t' + let g:matched = match(g:cmd, g:regex) + + " match returns -1 if not found + AssertNotEqual + \ g:matched, + \ -1, + \ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']' + +Execute(The command should accept configured executable.): + let b:ale_erlang_erlc_executable = '/usr/bin/erlc' + let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr('')) + let g:regex = '/usr/bin/erlc.\+-o.\+%t' + let g:matched = match(g:cmd, g:regex) + + " match returns -1 if not found + AssertNotEqual + \ g:matched, + \ -1, + \ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']' + +Execute(The command should accept configured options.): + let b:ale_erlang_erlc_options = '-I include' + let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr('')) + let g:regex = 'erlc.\+-o.\+-I include.\+%t' + let g:matched = match(g:cmd, g:regex) + + " match returns -1 if not found + AssertNotEqual + \ g:matched, + \ -1, + \ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']' + +Execute(Linter should recognize OTP23 format.): + let g:lines = ["t.erl:6: only association operators '=>' are allowed in map construction"] + let g:output_text = ale_linters#erlang#erlc#Handle(bufnr(''), g:lines)[0].text + + let g:expected = "only association operators '=>' are allowed in map construction" + AssertEqual + \ g:output_text, + \ g:expected, + \ 'Command error: expected [' . g:output_text . '] to match [' . g:expected . ']' + +Execute(Linter should recognize OTP24 format.): + let g:lines = ["t.erl:6:16: only association operators '=>' are allowed in map construction", + \ "% 6| #{ a => A, b := B }.", + \ "% | ^"] + let g:output_text = ale_linters#erlang#erlc#Handle(bufnr(''), g:lines)[0].text + + let g:expected = "only association operators '=>' are allowed in map construction" + AssertEqual + \ g:output_text, + \ g:expected, + \ 'Command error: expected [' . g:output_text . '] to match [' . g:expected . ']' diff --git a/dot_vim/plugged/ale/test/linter/test_erlang_syntaxerl.vader b/dot_vim/plugged/ale/test/linter/test_erlang_syntaxerl.vader new file mode 100644 index 0000000..e7cc26e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erlang_syntaxerl.vader @@ -0,0 +1,45 @@ +Before: + call ale#assert#SetUpLinterTest('erlang', 'syntaxerl') + +After: + call ale#assert#TearDownLinterTest() + +Execute (The default commands should be correct): + AssertLinter 'syntaxerl', [ + \ ale#Escape('syntaxerl') . ' -h', + \ ale#Escape('syntaxerl') . ' %t', + \] + +Execute (The executable should be configurable): + let b:ale_erlang_syntaxerl_executable = 'foobar' + + AssertLinter 'foobar', [ + \ ale#Escape('foobar') . ' -h', + \ ale#Escape('foobar') . ' %t', + \] + +Execute (The -b option should be used when available): + GivenCommandOutput [ + \ 'Syntax checker for Erlang (0.14.0)', + \ 'Usage: syntaxerl [-d | --debug] ', + \ ' syntaxerl <-h | --help>', + \ ' -d, --debug Enable debug output', + \ ' -h, --help Show this message', + \] + AssertLinter 'syntaxerl', [ + \ ale#Escape('syntaxerl') . ' -h', + \ ale#Escape('syntaxerl') . ' %t', + \] + + GivenCommandOutput [ + \ 'Syntax checker for Erlang (0.14.0)', + \ 'Usage: syntaxerl [-b | --base ] [-d | --debug] ', + \ ' syntaxerl <-h | --help>', + \ ' -b, --base Set original filename', + \ ' -d, --debug Enable debug output', + \ ' -h, --help Show this message', + \] + AssertLinter 'syntaxerl', [ + \ ale#Escape('syntaxerl') . ' -h', + \ ale#Escape('syntaxerl') . ' -b %s %t', + \] diff --git a/dot_vim/plugged/ale/test/linter/test_erubi.vader b/dot_vim/plugged/ale/test/linter/test_erubi.vader new file mode 100644 index 0000000..cd4a0b6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erubi.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('eruby', 'erubi') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should not contain any filter code by default): + call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/file.rb') + + AssertLinter 'ruby', [ + \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'), + \ 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read).src') . '< %t | ruby -c', + \] + +Execute(Executable should filter invalid eRuby when inside a Rails project): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/views/my_great_view.html.erb') + + AssertLinter 'ruby', [ + \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'), + \ 'ruby -r erubi/capture_end -e ' . ale#Escape('puts Erubi::CaptureEndEngine.new($stdin.read.gsub(%{<%=},%{<%}), nil, %{-}).src') . '< %t | ruby -c', + \] + +Execute(Command should be blank if the first command in the chain returns output): + GivenCommandOutput [ + \ "/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- erubi/capture_end (LoadError)", + \ " from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'", + \] + + AssertLinter 'ruby', [ + \ 'ruby -r erubi/capture_end -e ' . ale#Escape('""'), + \ '', + \] diff --git a/dot_vim/plugged/ale/test/linter/test_erubis.vader b/dot_vim/plugged/ale/test/linter/test_erubis.vader new file mode 100644 index 0000000..cfca54a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_erubis.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('eruby', 'erubis') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should not contain any filter code by default): + call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/file.rb') + + AssertLinter 'erubis', 'erubis -x %t | ruby -c' + +Execute(Executable should filter invalid eRuby when inside a Rails project): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/views/my_great_view.html.erb') + + AssertLinter 'erubis', + \ 'ruby -r erubis -e ' . ale#Escape('puts Erubis::Eruby.new($stdin.read.gsub(%{<%=},%{<%})).src') . '< %t | ruby -c' diff --git a/dot_vim/plugged/ale/test/linter/test_eslint.vader b/dot_vim/plugged/ale/test/linter/test_eslint.vader new file mode 100644 index 0000000..4dde563 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_eslint.vader @@ -0,0 +1,85 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'eslint') + runtime autoload/ale/handlers/eslint.vim + + let b:args = ' -f json --stdin --stdin-filename %s' + +After: + unlet! b:args + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinterCwd '' + AssertLinter 'eslint', ale#Escape('eslint') . b:args + +Execute(create-react-app directories should be detected correctly): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app') + AssertLinter b:executable, + \ (has('win32') ? ale#Escape('node.exe') . ' ' : '') + \ . ale#Escape(b:executable) . b:args + +Execute(use-global should override create-react-app detection): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + let g:ale_javascript_eslint_use_global = 1 + let g:ale_javascript_eslint_executable = 'eslint_d' + + let b:executable = 'eslint_d' + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app') + AssertLinter b:executable, ale#Escape(b:executable) . b:args + +Execute(other app directories should be detected correctly): + call ale#test#SetFilename('../test-files/eslint/other-app/subdir/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/node_modules/.bin/eslint') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint') + AssertLinter b:executable, ale#Escape(b:executable) . b:args + +Execute(use-global should override other app directories): + call ale#test#SetFilename('../test-files/eslint/other-app/subdir/testfile.js') + + let g:ale_javascript_eslint_use_global = 1 + let g:ale_javascript_eslint_executable = 'eslint_d' + + let b:executable = 'eslint_d' + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint') + AssertLinter b:executable, ale#Escape(b:executable) . b:args + +Execute(eslint_d should be detected correctly): + call ale#test#SetFilename('../test-files/eslint/app-with-eslint-d/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d') + AssertLinter b:executable, ale#Escape(b:executable) . b:args + +Execute(eslint.js executables should be run with node on Windows): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app') + AssertLinter b:executable, + \ (has('win32') ? ale#Escape('node.exe') . ' ' : '') + \ . ale#Escape(b:executable) . b:args + +Execute(eslint.js should be run from a containing project with node_modules): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-package-json/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app') + AssertLinter b:executable, + \ (has('win32') ? ale#Escape('node.exe') . ' ' : '') + \ . ale#Escape(b:executable) . b:args + +Execute(eslint.js should be run from a containing project with .yarn/sdks): + call ale#test#SetFilename('../test-files/eslint/yarn2-app/subdir/testfile.js') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/yarn2-app/.yarn/sdks/eslint/bin/eslint.js') + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/yarn2-app') + AssertLinter b:executable, + \ (has('win32') ? ale#Escape('node.exe') . ' ' : '') + \ . ale#Escape(b:executable) . b:args diff --git a/dot_vim/plugged/ale/test/linter/test_fecs.vader b/dot_vim/plugged/ale/test/linter/test_fecs.vader new file mode 100644 index 0000000..4287d32 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_fecs.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'fecs') + runtime autoload/ale/handlers/fecs.vim + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'fecs', ale#Escape('fecs') . ' check --colors=false --rule=true %t' diff --git a/dot_vim/plugged/ale/test/linter/test_flake8.vader b/dot_vim/plugged/ale/test/linter/test_flake8.vader new file mode 100644 index 0000000..53b40b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_flake8.vader @@ -0,0 +1,219 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'flake8') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + + GivenCommandOutput ['3.0.0'] + +After: + unlet! b:executable + unlet! b:bin_dir + call ale#assert#TearDownLinterTest() + +Execute(The flake8 callbacks should return the correct default values): + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + + " The version check should be cached. + GivenCommandOutput [] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + + " Try with older versions. + call ale#semver#ResetVersionCache() + GivenCommandOutput ['2.9.9'] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --format=default -', + \] + +Execute(The option for disabling changing directories should work): + let g:ale_python_flake8_change_directory = 'off' + + AssertLinterCwd ['', ''] + call ale#semver#ResetVersionCache() + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + + let g:ale_python_flake8_change_directory = 0 + + AssertLinterCwd [''] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + + " Invalid options should be considered the same as turning the setting off. + let g:ale_python_flake8_change_directory = 'xxx' + + AssertLinterCwd [''] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + +Execute(The option for changing directory to project root should work): + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + call ale#semver#ResetVersionCache() + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + +Execute(The option for changing directory to file dir should work): + let g:ale_python_flake8_change_directory = 'file' + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + + let g:ale_python_flake8_change_directory = 1 + + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -', + \] + +Execute(The flake8 command callback should let you set options): + let g:ale_python_flake8_options = '--some-option' + + GivenCommandOutput ['3.0.4'] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --some-option' + \ . ' --format=default --stdin-display-name %s -', + \] + + call ale#semver#ResetVersionCache() + GivenCommandOutput ['2.9.9'] + AssertLinter 'flake8', [ + \ ale#Escape('flake8') . ' --version', + \ ale#Escape('flake8') . ' --some-option --format=default -', + \] + +Execute(You should be able to set a custom executable and it should be escaped): + call ale#test#SetFilename('../test-files/dummy') + + let g:ale_python_flake8_executable = 'executable with spaces' + + AssertLinterCwd ['%s:h', '%s:h'] + call ale#semver#ResetVersionCache() + AssertLinter 'executable with spaces', [ + \ ale#Escape('executable with spaces') . ' --version', + \ ale#Escape('executable with spaces') + \ . ' --format=default' + \ . ' --stdin-display-name %s -', + \] + +Execute(The flake8 callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/flake8' + \) + + AssertLinter b:executable, [ + \ ale#Escape(b:executable) . ' --version', + \ ale#Escape(b:executable) + \ . ' --format=default' + \ . ' --stdin-display-name %s -', + \] + +Execute(The FindProjectRoot should detect the project root directory for namespace package via Manifest.in): + call ale#test#SetFilename('../test-files/python/namespace_package_manifest/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_manifest'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via setup.cf): + call ale#test#SetFilename('../test-files/python/namespace_package_setup/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_setup'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via pytest.ini): + call ale#test#SetFilename('../test-files/python/namespace_package_pytest/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_pytest'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via tox.ini): + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_tox'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for non-namespace package): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir'), + \ ale#python#FindProjectRoot(bufnr('')) + +" Some users currently run flake8 this way, so we should support it. +Execute(Using `python -m flake8` should be supported for running flake8): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let g:ale_python_flake8_executable = 'python' + let g:ale_python_flake8_options = '-m flake8 --some-option' + + GivenCommandOutput ['2.9.9'] + AssertLinter 'python', [ + \ ale#Escape('python') . ' -m flake8 --version', + \ ale#Escape('python') + \ . ' -m flake8 --some-option --format=default -' + \] + + call ale#semver#ResetVersionCache() + + " Leading spaces shouldn't matter + let g:ale_python_flake8_options = ' -m flake8 --some-option' + + GivenCommandOutput ['2.9.9'] + AssertLinter 'python', [ + \ ale#Escape('python') . ' -m flake8 --version', + \ ale#Escape('python') + \ . ' -m flake8 --some-option --format=default -' + \] + +Execute(Setting executable to 'pipenv' should append 'run flake8'): + let g:ale_python_flake8_executable = 'path/to/pipenv' + + " FIXME: pipenv should check the version with flake8. + GivenCommandOutput [] + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run flake8 --format=default -' + +Execute(Pipenv is detected when python_flake8_auto_pipenv is set): + let g:ale_python_flake8_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run flake8 --format=default --stdin-display-name %s -' + +Execute(Setting executable to 'poetry' should append 'run flake8'): + let g:ale_python_flake8_executable = 'path/to/poetry' + + " FIXME: poetry should check the version with flake8. + GivenCommandOutput [] + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run flake8 --format=default -' + +Execute(poetry is detected when python_flake8_auto_poetry is set): + let g:ale_python_flake8_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run flake8 --format=default --stdin-display-name %s -' diff --git a/dot_vim/plugged/ale/test/linter/test_flakehell.vader b/dot_vim/plugged/ale/test/linter/test_flakehell.vader new file mode 100644 index 0000000..9831440 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_flakehell.vader @@ -0,0 +1,203 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'flakehell') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + + GivenCommandOutput ['0.8.0'] + +After: + unlet! b:executable + unlet! b:bin_dir + call ale#assert#TearDownLinterTest() + +Execute(The flakehell callbacks should return the correct default values): + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' --version', + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + + " The version check should be cached. + GivenCommandOutput [] + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + +Execute(The option for disabling changing directories should work): + let g:ale_python_flakehell_change_directory = 'off' + + AssertLinterCwd ['', ''] + call ale#semver#ResetVersionCache() + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' --version', + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + + let g:ale_python_flakehell_change_directory = 0 + + AssertLinterCwd [''] + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + + " Invalid options should be considered the same as turning the setting off. + let g:ale_python_flakehell_change_directory = 'xxx' + + AssertLinterCwd [''] + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + +Execute(The option for changing directory to project root should work): + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + call ale#semver#ResetVersionCache() + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' --version', + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + +Execute(The option for changing directory to file dir should work): + let g:ale_python_flakehell_change_directory = 'file' + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' --version', + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + + let g:ale_python_flakehell_change_directory = 1 + + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' lint --format=default --stdin-display-name %s -', + \] + +Execute(The flakehell command callback should let you set options): + let g:ale_python_flakehell_options = '--some-option' + + GivenCommandOutput ['0.8.0'] + AssertLinter 'flakehell', [ + \ ale#Escape('flakehell') . ' --version', + \ ale#Escape('flakehell') . ' lint --some-option' + \ . ' --format=default --stdin-display-name %s -', + \] + +Execute(You should be able to set a custom executable and it should be escaped): + let g:ale_python_flakehell_executable = 'executable with spaces' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinterCwd ['%s:h', '%s:h'] + call ale#semver#ResetVersionCache() + AssertLinter 'executable with spaces', [ + \ ale#Escape('executable with spaces') . ' --version', + \ ale#Escape('executable with spaces') + \ . ' lint' + \ . ' --format=default' + \ . ' --stdin-display-name %s -', + \] + +Execute(The flakehell callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/flakehell' + \) + + AssertLinter b:executable, [ + \ ale#Escape(b:executable) . ' --version', + \ ale#Escape(b:executable) + \ . ' lint' + \ . ' --format=default' + \ . ' --stdin-display-name %s -', + \] + +Execute(The FindProjectRoot should detect the project root directory for namespace package via Manifest.in): + call ale#test#SetFilename('../test-files/python/namespace_package_manifest/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_manifest'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via setup.cf): + call ale#test#SetFilename('../test-files/python/namespace_package_setup/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_setup'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via pytest.ini): + call ale#test#SetFilename('../test-files/python/namespace_package_pytest/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_pytest'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for namespace package via tox.ini): + call ale#test#SetFilename('../test-files/python/namespace_package_tox/namespace/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/namespace_package_tox'), + \ ale#python#FindProjectRoot(bufnr('')) + +Execute(The FindProjectRoot should detect the project root directory for non-namespace package): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir'), + \ ale#python#FindProjectRoot(bufnr('')) + +" Some users currently run flakehell this way, so we should support it. +Execute(Using `python -m flakehell` should be supported for running flakehell): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let g:ale_python_flakehell_executable = 'python' + let g:ale_python_flakehell_options = '--some-option' + + AssertLinter 'python', [ + \ ale#Escape('python') . ' -m flakehell --version', + \ ale#Escape('python') + \ . ' -m flakehell lint --some-option --format=default --stdin-display-name %s -' + \] + + call ale#semver#ResetVersionCache() + + " Leading spaces shouldn't matter + let g:ale_python_flakehell_options = ' --some-option' + + AssertLinter 'python', [ + \ ale#Escape('python') . ' -m flakehell --version', + \ ale#Escape('python') + \ . ' -m flakehell lint --some-option --format=default --stdin-display-name %s -' + \] + +Execute(Setting executable to 'pipenv' should append 'run flakehell'): + let g:ale_python_flakehell_executable = 'path/to/pipenv' + + " FIXME: pipenv should check the version with flakehell. + GivenCommandOutput [] + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run flakehell lint --format=default -' + +Execute(Pipenv is detected when python_flakehell_auto_pipenv is set): + let g:ale_python_flakehell_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run flakehell lint --format=default --stdin-display-name %s -' + +Execute(Setting executable to 'poetry' should append 'run flakehell'): + let g:ale_python_flakehell_executable = 'path/to/poetry' + + " FIXME: poetry should check the version with flakehell. + GivenCommandOutput [] + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run flakehell lint --format=default -' + +Execute(poetry is detected when python_flakehell_auto_poetry is set): + let g:ale_python_flakehell_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run flakehell lint --format=default --stdin-display-name %s -' diff --git a/dot_vim/plugged/ale/test/linter/test_flow.vader b/dot_vim/plugged/ale/test/linter/test_flow.vader new file mode 100644 index 0000000..8488a2e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_flow.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'flow') + +After: + call ale#assert#TearDownLinterTest() + +Execute(flow should return a command to run if a .flowconfig file exists): + call ale#test#SetFilename('../test-files/flow/a/sub/dummy') + + AssertLinter 'flow', + \ ale#Escape('flow') + \ . ' check-contents --respect-pragma --json --from ale %s < %t' + \ . (!has('win32') ? '; echo' : '') + +Execute(flow should not use the respect pragma argument if the option is off): + call ale#test#SetFilename('../test-files/flow/a/sub/dummy') + + let b:ale_javascript_flow_use_respect_pragma = 0 + + AssertLinter 'flow', + \ ale#Escape('flow') + \ . ' check-contents --json --from ale %s < %t' + \ . (!has('win32') ? '; echo' : '') + +Execute(flow should should not use --respect-pragma for old versions): + call ale#test#SetFilename('../test-files/flow/a/sub/dummy') + + GivenCommandOutput [ + \ 'Warning: `flow --version` is deprecated in favor of `flow version`', + \ 'Flow, a static type checker for JavaScript, version 0.27.0', + \] + AssertLinter 'flow', [ + \ ale#Escape('flow') . ' --version', + \ ale#Escape('flow') + \ . ' check-contents --json --from ale %s < %t' + \ . (!has('win32') ? '; echo' : ''), + \] + +Execute(flow should not return a command to run if no .flowconfig file exists): + call ale#test#SetFilename('../test-files/flow/b/sub/dummy') + + AssertLinterNotExecuted diff --git a/dot_vim/plugged/ale/test/linter/test_foodcritic.vader b/dot_vim/plugged/ale/test/linter/test_foodcritic.vader new file mode 100644 index 0000000..c5564cb --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_foodcritic.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('chef', 'foodcritic') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'foodcritic', ale#Escape('foodcritic') . ' %s' + +Execute(Extra options should be included with escapeed tildes (~)): + let b:ale_chef_foodcritic_options = '-t ~F011' + + AssertLinter 'foodcritic', ale#Escape('foodcritic') . ' -t \~F011 %s' + +Execute(The executable should be configurable): + let b:ale_chef_foodcritic_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_fortran_fortls.vader b/dot_vim/plugged/ale/test/linter/test_fortran_fortls.vader new file mode 100644 index 0000000..581f94b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_fortran_fortls.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('fortran', 'language_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'fortls', ale#Escape('fortls') + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/fortls-project/test.F90') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/fortls-project') + +Execute(The language should be correct): + AssertLSPLanguage 'fortran' diff --git a/dot_vim/plugged/ale/test/linter/test_fsc.vader b/dot_vim/plugged/ale/test/linter/test_fsc.vader new file mode 100644 index 0000000..278e7c1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_fsc.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('scala', 'fsc') + +After: + call ale#assert#TearDownLinterTest() + +Given scala(An empty Scala file): +Execute(The default executable and command should be correct): + AssertLinter 'fsc', ale#Escape('fsc') . ' -Ystop-after:parser %t' + +Given scala.sbt(An empty SBT file): +Execute(fsc should not be run for sbt files): + AssertLinterNotExecuted diff --git a/dot_vim/plugged/ale/test/linter/test_fusionlint.vader b/dot_vim/plugged/ale/test/linter/test_fusionlint.vader new file mode 100644 index 0000000..1c63b81 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_fusionlint.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('fuse', 'fusionlint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The fuse fusionlint command callback should return the correct default string): + AssertLinter 'fusion-lint', ale#Escape('fusion-lint') . ' --filename %s -i' + +Execute(The fuse fusionlint command callback should let you set options): + let g:ale_fuse_fusionlint_options = '--example-option argument' + + AssertLinter 'fusion-lint', + \ ale#Escape('fusion-lint') . ' --example-option argument --filename %s -i' + +Execute(The fusionlint executable should be configurable): + let g:ale_fuse_fusionlint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --filename %s -i' diff --git a/dot_vim/plugged/ale/test/linter/test_gawk.vader b/dot_vim/plugged/ale/test/linter/test_gawk.vader new file mode 100644 index 0000000..f436429 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gawk.vader @@ -0,0 +1,25 @@ +Before: + call ale#assert#SetUpLinterTest('awk', 'gawk') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'gawk', + \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') + \ . ' --lint -f %t /dev/null' + +Execute(The executable should be configurable): + let b:ale_awk_gawk_executable = '/other/gawk' + + AssertLinter '/other/gawk', + \ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') + \ . ' --lint -f %t /dev/null' + +Execute(The options should be configurable): + let b:ale_awk_gawk_executable = 'gawk' + let b:ale_awk_gawk_options = '--lint=no-ext' + + AssertLinter 'gawk', + \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }') + \ . ' --lint --lint=no-ext -f %t /dev/null' diff --git a/dot_vim/plugged/ale/test/linter/test_gfortran.vader b/dot_vim/plugged/ale/test/linter/test_gfortran.vader new file mode 100644 index 0000000..3e6ef95 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gfortran.vader @@ -0,0 +1,24 @@ +Before: + call ale#assert#SetUpLinterTest('fortran', 'gcc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The fortran gcc command callback should return the correct default string): + AssertLinter 'gcc', ale#Escape('gcc') . ' -S -x f95 -fsyntax-only -ffree-form -Wall -' + +Execute(The fortran gcc command callback should let you set options): + let g:ale_fortran_gcc_options = '-Wotherthings' + + AssertLinter 'gcc', ale#Escape('gcc') . ' -S -x f95 -fsyntax-only -ffree-form -Wotherthings -' + +Execute(The fortran gcc command callback should let you use -ffixed-form): + let g:ale_fortran_gcc_use_free_form = 0 + + AssertLinter 'gcc', ale#Escape('gcc') . ' -S -x f95 -fsyntax-only -ffixed-form -Wall -' + +Execute(The fortran executable should be configurable): + let g:ale_fortran_gcc_executable = 'gfortran' + + AssertLinter 'gfortran', + \ ale#Escape('gfortran') . ' -S -x f95 -fsyntax-only -ffree-form -Wall -' diff --git a/dot_vim/plugged/ale/test/linter/test_ghdl.vader b/dot_vim/plugged/ale/test/linter/test_ghdl.vader new file mode 100644 index 0000000..f254e11 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ghdl.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('vhdl', 'ghdl') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'ghdl', ale#Escape('ghdl') . ' -s --std=08 %t' + + let b:ale_vhdl_ghdl_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -s --std=08 %t' + +Execute(The options should be configurable): + let b:ale_vhdl_ghdl_options = '--something' + + AssertLinter 'ghdl', ale#Escape('ghdl') . ' -s --something %t' diff --git a/dot_vim/plugged/ale/test/linter/test_gitlint.vader b/dot_vim/plugged/ale/test/linter/test_gitlint.vader new file mode 100644 index 0000000..4df675f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gitlint.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('gitcommit', 'gitlint') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The gitlint callbacks should return the correct default values): + AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint' + +Execute(The gitlint executable should be configurable, and escaped properly): + let g:ale_gitcommit_gitlint_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', + \ ale#Escape('executable with spaces') . ' lint' + +Execute(The gitlint command callback should let you set options): + let g:ale_gitcommit_gitlint_options = '--some-option' + + AssertLinter 'gitlint', ale#Escape('gitlint') . ' --some-option lint' + +Execute(The gitlint callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/COMMIT_EDITMSG') + + AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint' + +Execute(The gitlint callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/COMMIT_EDITMSG') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/gitlint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' lint' + +Execute(You should able able to use the global gitlint instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/COMMIT_EDITMSG') + let g:ale_gitcommit_gitlint_use_global = 1 + + AssertLinter 'gitlint', ale#Escape('gitlint') . ' lint' diff --git a/dot_vim/plugged/ale/test/linter/test_glslang.vader b/dot_vim/plugged/ale/test/linter/test_glslang.vader new file mode 100644 index 0000000..980406a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_glslang.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('glsl', 'glslang') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'glslangValidator', ale#Escape('glslangValidator') . ' -C %t' + +Execute(The executable should be configurable): + let b:ale_glsl_glslang_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -C %t' + +Execute(Options should work): + let g:ale_glsl_glslang_options = '--test' + + AssertLinter 'glslangValidator', + \ ale#Escape('glslangValidator') . ' --test -C %t' diff --git a/dot_vim/plugged/ale/test/linter/test_glslls.vader b/dot_vim/plugged/ale/test/linter/test_glslls.vader new file mode 100644 index 0000000..133c2a2 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_glslls.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('glsl', 'glslls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'glslls', ale#Escape('glslls') . ' --stdin' + +Execute(Executable should be configurable): + let b:ale_glsl_glslls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin' + +Execute(Setting logfile should work): + let b:ale_glsl_glslls_logfile = '/tmp/test.log' + + AssertLinter 'glslls', + \ ale#Escape('glslls') . ' --verbose -l /tmp/test.log --stdin' diff --git a/dot_vim/plugged/ale/test/linter/test_gobuild.vader b/dot_vim/plugged/ale/test/linter/test_gobuild.vader new file mode 100644 index 0000000..bac4d74 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gobuild.vader @@ -0,0 +1,33 @@ +Before: + Save g:ale_go_go_executable + + call ale#assert#SetUpLinterTest('go', 'gobuild') + + GivenCommandOutput ['/foo/bar', '/foo/baz'] + +After: + Restore + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'go', 'go test -c -o /dev/null ./' + +Execute(Go environment variables should be supported): + let b:ale_go_go111module = 'on' + + AssertLinter 'go', ale#Env('GO111MODULE', 'on') . 'go test -c -o /dev/null ./' + + unlet! b:ale_go_go111module + +Execute(Extra options should be supported): + let g:ale_go_gobuild_options = '--foo-bar' + + AssertLinter 'go', 'go test --foo-bar -c -o /dev/null ./' + + let g:ale_go_gobuild_options = '' + +Execute(The executable should be configurable): + let g:ale_go_go_executable = 'foobar' + + AssertLinter 'foobar', 'foobar test -c -o /dev/null ./' diff --git a/dot_vim/plugged/ale/test/linter/test_gofmt.vader b/dot_vim/plugged/ale/test/linter/test_gofmt.vader new file mode 100644 index 0000000..b056a65 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gofmt.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_go_go111module + Save b:ale_go_go111module + + let b:ale_go_go111module = '' + + call ale#assert#SetUpLinterTest('go', 'gofmt') + call ale#test#SetFilename('../test-files/go/testfile2.go') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default gofmt command should be correct): + AssertLinter 'gofmt', + \ ale#Escape('gofmt') . ' -e %t' + +Execute(The gofmt command should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'gofmt', + \ ale#Env('GO111MODULE', 'on') + \ . ale#Escape('gofmt') . ' -e %t' diff --git a/dot_vim/plugged/ale/test/linter/test_golangci_lint.vader b/dot_vim/plugged/ale/test/linter/test_golangci_lint.vader new file mode 100644 index 0000000..ee754bb --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_golangci_lint.vader @@ -0,0 +1,50 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'golangci_lint') + call ale#test#SetFilename('test.go') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The golangci-lint defaults should be correct): + AssertLinterCwd '%s:h', + AssertLinter 'golangci-lint', + \ ale#Escape('golangci-lint') + \ . ' run ' . ale#Escape(expand('%' . ':t')) + \ . ' --enable-all' + +Execute(The golangci-lint callback should use a configured executable): + let b:ale_go_golangci_lint_executable = 'something else' + + AssertLinter 'something else', + \ ale#Escape('something else') + \ . ' run ' . ale#Escape(expand('%' . ':t')) + \ . ' --enable-all' + +Execute(The golangci-lint callback should use configured options): + let b:ale_go_golangci_lint_options = '--foobar' + + AssertLinter 'golangci-lint', + \ ale#Escape('golangci-lint') + \ . ' run ' . ale#Escape(expand('%' . ':t')) + \ . ' --foobar' + +Execute(The golangci-lint callback should support environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'golangci-lint', + \ ale#Env('GO111MODULE', 'on') + \ . ale#Escape('golangci-lint') + \ . ' run ' . ale#Escape(expand('%' . ':t')) + \ . ' --enable-all' + +Execute(The golangci-lint `lint_package` option should use the correct command): + let b:ale_go_golangci_lint_package = 1 + + AssertLinter 'golangci-lint', + \ ale#Escape('golangci-lint') . ' run --enable-all' diff --git a/dot_vim/plugged/ale/test/linter/test_golangserver.vader b/dot_vim/plugged/ale/test/linter/test_golangserver.vader new file mode 100644 index 0000000..b31d8dc --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_golangserver.vader @@ -0,0 +1,76 @@ +Before: + Save $GOPATH + Save g:ale_completion_enabled + Save g:ale_go_go111module + + let g:ale_completion_enabled = 0 + let g:sep = has('win32') ? ';' : ':' + + call ale#assert#SetUpLinterTest('go', 'langserver') + let $GOPATH = ale#path#Simplify(g:dir . '/../test-files/go/go1') + \ . g:sep + \ . ale#path#Simplify(g:dir . '/../test-files/go/go2') + +After: + Restore + + unlet! b:ale_completion_enabled + unlet! b:ale_go_go111module + unlet! g:sep + + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'go-langserver', ale#Escape('go-langserver') + +Execute(should configure go-langserver callback executable): + let b:ale_go_langserver_executable = 'boo' + + AssertLinter 'boo', ale#Escape('boo') + +Execute(should set go-langserver options): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + let b:ale_completion_enabled = 1 + let b:ale_go_langserver_options = '' + + AssertLinter 'go-langserver', + \ ale#Escape('go-langserver') . ' -gocodecompletion' + + let b:ale_go_langserver_options = '-trace' + + AssertLinter 'go-langserver', + \ ale#Escape('go-langserver') . ' -gocodecompletion -trace' + +Execute(should ignore go-langserver -gocodecompletion option): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + + let b:ale_go_langserver_options = '-trace -gocodecompletion' + let b:ale_completion_enabled = 1 + + AssertLinter 'go-langserver', + \ ale#Escape('go-langserver') . ' -gocodecompletion -trace' + + let b:ale_completion_enabled = 0 + + AssertLinter 'go-langserver', ale#Escape('go-langserver') . ' -trace' + +Execute(should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'go-langserver', + \ ale#Env('GO111MODULE', 'on') . ale#Escape('go-langserver') + +Execute(should set go-langserver for go app1): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + + AssertLSPLanguage 'go' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/go/go1') + +Execute(should set go-langserver for go app2): + call ale#test#SetFilename('../test-files/go/go2/prj1/file.go') + + AssertLSPLanguage 'go' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/go/go2') diff --git a/dot_vim/plugged/ale/test/linter/test_golint.vader b/dot_vim/plugged/ale/test/linter/test_golint.vader new file mode 100644 index 0000000..6491670 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_golint.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'golint') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default golint command should be correct): + AssertLinter 'golint', ale#Escape('golint') . ' %t' + +Execute(The golint executable should be configurable): + let b:ale_go_golint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' + +Execute(The golint options should be configurable): + let b:ale_go_golint_options = '--foo' + + AssertLinter 'golint', ale#Escape('golint') . ' --foo %t' + +Execute(The golint command should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'golint', + \ ale#Env('GO111MODULE', 'on') . ale#Escape('golint') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_gometalinter.vader b/dot_vim/plugged/ale/test/linter/test_gometalinter.vader new file mode 100644 index 0000000..5ff744f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gometalinter.vader @@ -0,0 +1,49 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'gometalinter') + call ale#test#SetFilename('test.go') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The gometalinter defaults should be correct): + AssertLinterCwd '%s:h', + AssertLinter 'gometalinter', + \ ale#Escape('gometalinter') + \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%' . ':t'))) + \ . ' .' + +Execute(The gometalinter callback should use a configured executable): + let b:ale_go_gometalinter_executable = 'something else' + + AssertLinter 'something else', + \ ale#Escape('something else') + \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%' . ':t'))) + \ . ' .' + +Execute(The gometalinter callback should use configured options): + let b:ale_go_gometalinter_options = '--foobar' + + AssertLinter 'gometalinter', + \ ale#Escape('gometalinter') + \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%' . ':t'))) + \ . ' --foobar' . ' .' + +Execute(The gometalinter should use configured environment variables): + let b:ale_go_go111module = 'off' + + AssertLinter 'gometalinter', + \ ale#Env('GO111MODULE', 'off') + \ . ale#Escape('gometalinter') + \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%' . ':t'))) + \ . ' .' + +Execute(The gometalinter `lint_package` option should use the correct command): + let b:ale_go_gometalinter_lint_package = 1 + + AssertLinter 'gometalinter', ale#Escape('gometalinter') . ' .' diff --git a/dot_vim/plugged/ale/test/linter/test_gopls.vader b/dot_vim/plugged/ale/test/linter/test_gopls.vader new file mode 100644 index 0000000..1c91fa1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gopls.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_go_go111module + Save $GOPATH + + let $GOPATH = '/non/existent/directory' + + call ale#assert#SetUpLinterTest('go', 'gopls') + +After: + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + + unlet! b:ale_go_go111module + unlet! b:ale_go_go111module + unlet! b:ale_completion_enabled + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'gopls', ale#Escape('gopls') . ' --mode stdio' + +Execute(The executable should be configurable): + let b:ale_go_gopls_executable = 'boo' + + AssertLinter 'boo', ale#Escape('boo') . ' --mode stdio' + +Execute(gopls should be found in GOPATH): + " This is a directory with a fake executable + let $GOPATH = ale#test#GetFilename('../test-files/go/gopath') + + AssertLinter + \ ale#test#GetFilename('../test-files/go/gopath/bin/gopls'), + \ ale#Escape(ale#test#GetFilename('../test-files/go/gopath/bin/gopls')) + \ . ' --mode stdio' + +Execute(Global settings should be preferre for gopls if use_global = 1): + " This is a directory with a fake executable + let $GOPATH = ale#test#GetFilename('../test-files/go/gopath') + let b:ale_go_gopls_executable = 'boo' + let b:ale_go_gopls_use_global = 1 + + AssertLinter 'boo', ale#Escape('boo') . ' --mode stdio' + +Execute(Settings options should work): + call ale#test#SetFilename('../test-files/go/go1/prj1/file.go') + " let b:ale_completion_enabled = 1 + let b:ale_go_gopls_options = '' + + AssertLinter 'gopls', + \ ale#Escape('gopls') . '' + + let b:ale_go_gopls_options = '--mode stdio --trace' + + AssertLinter 'gopls', + \ ale#Escape('gopls') . ' --mode stdio --trace' + + let b:ale_go_gopls_init_options = {'ui.diagnostic.analyses': {'composites': v:false}} + AssertLSPOptions {'ui.diagnostic.analyses': {'composites': v:false}} + +Execute(Go environment variables should be passed on): + let b:ale_go_go111module = 'off' + + AssertLinter 'gopls', + \ ale#Env('GO111MODULE', 'off') . ale#Escape('gopls') . ' --mode stdio' + +Execute(Project directories should be detected based on 'go.mod' being present): + call ale#test#SetFilename('../test-files/go/test.go') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/go') + +Execute(Project directories with .git should be detected): + call ale#test#SetFilename('test.go') + + if !isdirectory(g:dir . '/.git') + call mkdir(g:dir . '/.git') + endif + + AssertLSPProject g:dir + +Execute('go.mod' should be ignored if modules are off): + call ale#test#SetFilename('../test-files/go/test.go') + + let b:ale_go_go111module = 'off' + let b:parent_dir = ale#path#Simplify(g:dir . '/..') + let b:git_dir = b:parent_dir . '/.git' + + if !isdirectory(b:git_dir) + call mkdir(b:git_dir) + endif + + AssertLSPProject b:parent_dir + + call delete(b:git_dir, 'd') + unlet! b:parent_dir + unlet! b:git_dir diff --git a/dot_vim/plugged/ale/test/linter/test_gosimple.vader b/dot_vim/plugged/ale/test/linter/test_gosimple.vader new file mode 100644 index 0000000..960f8ee --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gosimple.vader @@ -0,0 +1,19 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'gosimple') + call ale#test#SetFilename('../test-files/go/testfile2.go') + +After: + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default gosimple command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'gosimple', 'gosimple .' + +Execute(The gosimple command should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'gosimple', ale#Env('GO111MODULE', 'on') . 'gosimple .' diff --git a/dot_vim/plugged/ale/test/linter/test_gotype.vader b/dot_vim/plugged/ale/test/linter/test_gotype.vader new file mode 100644 index 0000000..22829a1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_gotype.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'gotype') + call ale#test#SetFilename('../test-files/go/testfile2.go') + +After: + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default gotype command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'gotype', 'gotype -e .' + +Execute(The gotype callback should ignore test files): + call ale#test#SetFilename('bla_test.go') + + AssertLinterNotExecuted + +Execute(The gotype callback should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'gotype', ale#Env('GO111MODULE', 'on') . 'gotype -e .' diff --git a/dot_vim/plugged/ale/test/linter/test_govet.vader b/dot_vim/plugged/ale/test/linter/test_govet.vader new file mode 100644 index 0000000..12ec168 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_govet.vader @@ -0,0 +1,32 @@ +Before: + Save g:ale_go_go_executable + Save g:ale_go_govet_options + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'govet') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'go', 'go vet .' + +Execute(Extra options should be supported): + let g:ale_go_govet_options = '--foo-bar' + + AssertLinterCwd '%s:h' + AssertLinter 'go', 'go vet --foo-bar .' + +Execute(The executable should be configurable): + let g:ale_go_go_executable = 'foobar' + + AssertLinter 'foobar', 'foobar vet .' + +Execute(Go environment variables should be supported): + let b:ale_go_go111module = 'on' + + AssertLinter 'go', ale#Env('GO111MODULE', 'on') . 'go vet .' diff --git a/dot_vim/plugged/ale/test/linter/test_graphql_gqlint.vader b/dot_vim/plugged/ale/test/linter/test_graphql_gqlint.vader new file mode 100644 index 0000000..22c05a6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_graphql_gqlint.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('graphql', 'gqlint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The linter should run from the directory of the file in the buffer): + AssertLinterCwd '%s:h' + AssertLinter 'gqlint', 'gqlint --reporter=simple %t' diff --git a/dot_vim/plugged/ale/test/linter/test_haml_hamllint.vader b/dot_vim/plugged/ale/test/linter/test_haml_hamllint.vader new file mode 100644 index 0000000..1f5e2fa --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haml_hamllint.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('haml', 'hamllint') + + let g:default_command = 'haml-lint %t' + +After: + unlet! b:conf + unlet! b:conf_hamllint + unlet! b:conf_rubocop + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'haml-lint', 'haml-lint %t' + +Execute(The command should have the .rubocop.yml prepended as an env var if one exists): + call ale#test#SetFilename('../test-files/hamllint/rubocop-yml/subdir/file.haml') + let b:conf = ale#path#Simplify(g:dir . '/../test-files/hamllint/rubocop-yml/.rubocop.yml') + + AssertLinter 'haml-lint', + \ ale#Env('HAML_LINT_RUBOCOP_CONF', b:conf) . 'haml-lint %t' + +Execute(The command should have the nearest .haml-lint.yml set as --config if it exists): + call ale#test#SetFilename('../test-files/hamllint/haml-lint-yml/subdir/file.haml') + let b:conf = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-yml/.haml-lint.yml') + + AssertLinter 'haml-lint', + \ 'haml-lint --config ' . ale#Escape(b:conf) . ' %t', + +Execute(The command should include a .rubocop.yml and a .haml-lint if both are found): + call ale#test#SetFilename('../test-files/hamllint/haml-lint-and-rubocop/subdir/file.haml') + let b:conf_hamllint = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-and-rubocop/.haml-lint.yml') + let b:conf_rubocop = ale#path#Simplify(g:dir . '/../test-files/hamllint/haml-lint-and-rubocop/.rubocop.yml') + + AssertLinter 'haml-lint', + \ ale#Env('HAML_LINT_RUBOCOP_CONF', b:conf_rubocop) + \ . 'haml-lint --config ' . ale#Escape(b:conf_hamllint) . ' %t' + +Execute(The executable can be overridden): + let b:ale_haml_hamllint_executable = 'bin/haml-lint' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'bin/haml-lint', 'bin/haml-lint %t' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_cabal_ghc.vader b/dot_vim/plugged/ale/test/linter/test_haskell_cabal_ghc.vader new file mode 100644 index 0000000..b4976b3 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_cabal_ghc.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'cabal_ghc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The options should be used in the command): + AssertLinterCwd '%s:h' + AssertLinter 'cabal', 'cabal exec -- ghc -fno-code -v0 %t' + + let b:ale_haskell_cabal_ghc_options = 'foobar' + + AssertLinter 'cabal', 'cabal exec -- ghc foobar %t' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_ghc.vader b/dot_vim/plugged/ale/test/linter/test_haskell_ghc.vader new file mode 100644 index 0000000..2f33477 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_ghc.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'ghc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The options should be used in the command): + AssertLinter 'ghc', 'ghc -fno-code -v0 %t' + + let b:ale_haskell_ghc_options = 'foobar' + + AssertLinter 'ghc', 'ghc foobar %t' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_ghc_mod.vader b/dot_vim/plugged/ale/test/linter/test_haskell_ghc_mod.vader new file mode 100644 index 0000000..c1cc859 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_ghc_mod.vader @@ -0,0 +1,10 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'ghc_mod') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Default should use ghc-mod): + AssertLinter + \ 'ghc-mod', + \ ale#Escape('ghc-mod') . ' --map-file %s=%t check %s' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_hdevtools.vader b/dot_vim/plugged/ale/test/linter/test_haskell_hdevtools.vader new file mode 100644 index 0000000..0ef2f0e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_hdevtools.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'hdevtools') + + let b:command_tail = ' check -g -Wall -p %s %t' + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'hdevtools', ale#Escape('hdevtools') . b:command_tail + + let b:ale_haskell_hdevtools_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_hie.vader b/dot_vim/plugged/ale/test/linter/test_haskell_hie.vader new file mode 100644 index 0000000..3cababa --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_hie.vader @@ -0,0 +1,27 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'hie') + + Save &filetype + let &filetype = 'haskell' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'haskell' + +Execute(The default executable should be correct): + AssertLinter 'hie', + \ ale#Escape('hie') . ' --lsp' + +Execute(The project root should be detected correctly): + AssertLSPProject g:dir + + call ale#test#SetFilename('../test-files/hie_paths/file.hs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/hie_paths') + +Execute(The executable should be configurable): + let g:ale_haskell_hie_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --lsp' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_hlint.vader b/dot_vim/plugged/ale/test/linter/test_haskell_hlint.vader new file mode 100644 index 0000000..6d227c9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_hlint.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'hlint') + + let b:base_opts = '--color=never --json -' + +After: + unlet! b:base_opts + call ale#assert#TearDownLinterTest() + +Execute(executable should be configurable): + AssertLinter 'hlint', ale#Escape('hlint') . ' ' . b:base_opts + let b:ale_haskell_hlint_executable = 'myHlint' + AssertLinter 'myHlint', ale#Escape('myHlint') . ' ' . b:base_opts + +Execute(should accept options): + let b:ale_haskell_hlint_options= '-h myhlintfile.yaml' + AssertLinter 'hlint', ale#Escape('hlint') . ' -h myhlintfile.yaml ' . b:base_opts diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_hls.vader b/dot_vim/plugged/ale/test/linter/test_haskell_hls.vader new file mode 100644 index 0000000..4452d53 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_hls.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'hls') + + Save &filetype + let &filetype = 'haskell' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'haskell' + +Execute(The default executable should be correct): + AssertLinter 'haskell-language-server-wrapper', + \ ale#Escape('haskell-language-server-wrapper') . ' --lsp' + +Execute(The project root should be detected correctly): + AssertLSPProject g:dir + + call ale#test#SetFilename('hls_paths/file.hs') + + AssertLSPProject ale#path#Simplify(g:dir . '/hls_paths') + +Execute(The executable should be configurable): + let g:ale_haskell_hls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --lsp' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}} + AssertLSPConfig {'haskell': {'maxCompletions': 250}} diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_stack_build.vader b/dot_vim/plugged/ale/test/linter/test_haskell_stack_build.vader new file mode 100644 index 0000000..8b5b097 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_stack_build.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'stack_build') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The linter should not be executed when there's no stack.yaml file): + AssertLinterNotExecuted + +Execute(The linter should be executed when there is a stack.yaml file): + call ale#test#SetFilename('../test-files/stack/test.hs') + + AssertLinter 'stack', 'stack build --fast' diff --git a/dot_vim/plugged/ale/test/linter/test_haskell_stack_ghc.vader b/dot_vim/plugged/ale/test/linter/test_haskell_stack_ghc.vader new file mode 100644 index 0000000..04bd23f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_haskell_stack_ghc.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('haskell', 'stack_ghc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The linter should not be executed when there's no stack.yaml file): + AssertLinterNotExecuted + +Execute(The linter should be executed when there is a stack.yaml file): + call ale#test#SetFilename('../test-files/stack/test.hs') + + AssertLinterCwd '%s:h' + AssertLinter 'stack', 'stack ghc -- -fno-code -v0 %t' + + let b:ale_haskell_stack_ghc_options = 'foobar' + + AssertLinter 'stack', 'stack ghc -- foobar %t' diff --git a/dot_vim/plugged/ale/test/linter/test_hdl_checker_options.vader b/dot_vim/plugged/ale/test/linter/test_hdl_checker_options.vader new file mode 100644 index 0000000..6e7eef4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_hdl_checker_options.vader @@ -0,0 +1,86 @@ +Before: + call ale#assert#SetUpLinterTest('vhdl', 'hdl_checker') + + Save g:ale_hdl_checker_executable + Save g:ale_hdl_checker_config_file + Save g:ale_hdl_checker_options + + let g:default_config_file = has('unix') ? '.hdl_checker.config' : '_hdl_checker.config' + + runtime autoload/ale/handlers/hdl_checker.vim + +After: + Restore + + call ale#assert#TearDownLinterTest() + + unlet! g:default_config_file + unlet! g:call_count + + runtime autoload/ale/handlers/hdl_checker.vim + +Execute(Get default initialization dict): + AssertEqual + \ {'project_file': g:default_config_file}, + \ ale#handlers#hdl_checker#GetInitOptions(bufnr('')) + +Execute(Get custom initialization dict): + let g:ale_hdl_checker_config_file = 'some_file_name' + + AssertEqual + \ {'project_file': 'some_file_name'}, + \ ale#handlers#hdl_checker#GetInitOptions(bufnr('')) + +Execute(Get the checker command without extra user parameters): + AssertEqual + \ ale#Escape('hdl_checker') . ' --lsp', + \ ale#handlers#hdl_checker#GetCommand(bufnr('')) + +Execute(Get the checker command with user configured parameters): + let g:ale_hdl_checker_options = '--log-level DEBUG' + + AssertEqual + \ ale#Escape('hdl_checker') . ' --lsp --log-level DEBUG', + \ ale#handlers#hdl_checker#GetCommand(bufnr('')) + +Execute(Customize executable): + let g:ale_hdl_checker_executable = '/some/other/path' + AssertEqual + \ ale#Escape('/some/other/path') . ' --lsp', + \ ale#handlers#hdl_checker#GetCommand(bufnr('')) + +Execute(Get project root based on .git): + call ale#test#SetFilename('../test-files/hdl_server/with_git/files/foo.vhd') + " Create .git file + silent! call mkdir(g:dir . '/../test-files/hdl_server/with_git/.git') + AssertNotEqual '', glob(g:dir . '/../test-files/hdl_server/with_git/.git') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/hdl_server/with_git'), + \ ale#handlers#hdl_checker#GetProjectRoot(bufnr('')) + +Execute(Get project root based on config file): + call ale#test#SetFilename('../test-files/hdl_server/with_config_file/foo.vhd') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/hdl_server/with_config_file'), + \ ale#handlers#hdl_checker#GetProjectRoot(bufnr('')) + +Execute(Return no project root if neither .git or config file are found): + let g:call_count = 0 + + " Mock this command to avoid the test to find ale's own .git folder + function! ale#handlers#hdl_checker#IsDotGit(path) abort + let g:call_count += 1 + return 0 + endfunction + + call ale#test#SetFilename('../test-files/hdl_server/foo.vhd') + + AssertEqual + \ '', + \ ale#handlers#hdl_checker#GetProjectRoot(bufnr('')) + + AssertEqual g:call_count, 1 + + unlet! g:call_count diff --git a/dot_vim/plugged/ale/test/linter/test_html_stylelint.vader b/dot_vim/plugged/ale/test/linter/test_html_stylelint.vader new file mode 100644 index 0000000..c5ac1b9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_html_stylelint.vader @@ -0,0 +1,60 @@ +Before: + Save g:ale_html_stylelint_executable + Save g:ale_html_stylelint_use_global + Save g:ale_html_stylelint_options + + unlet! b:executable + + unlet! g:ale_html_stylelint_executable + unlet! g:ale_html_stylelint_use_global + unlet! g:ale_html_stylelint_options + + call ale#test#SetDirectory('/testplugin/test/linter') + call ale#test#SetFilename('testfile.html') + + runtime ale_linters/html/stylelint.vim + +After: + Restore + + unlet! b:executable + unlet! b:ale_html_stylelint_executable + unlet! b:ale_html_stylelint_use_global + unlet! b:ale_html_stylelint_options + + call ale#test#SetFilename('test.txt') + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(node_modules directories should be discovered): + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.html') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/stylelint/node_modules/.bin/stylelint' + \) + + AssertEqual b:executable, ale_linters#html#stylelint#GetExecutable(bufnr('')) + AssertEqual + \ ale#Escape(b:executable) . ' --stdin-filename %s', + \ ale_linters#html#stylelint#GetCommand(bufnr('')) + +Execute(The global override should work): + let b:ale_html_stylelint_executable = 'foobar' + let b:ale_html_stylelint_use_global = 1 + + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.html') + + AssertEqual 'foobar', ale_linters#html#stylelint#GetExecutable(bufnr('')) + AssertEqual + \ ale#Escape('foobar') . ' --stdin-filename %s', + \ ale_linters#html#stylelint#GetCommand(bufnr('')) + +Execute(Extra options should be configurable): + let b:ale_html_stylelint_options = '--whatever' + + AssertEqual 'stylelint', ale_linters#html#stylelint#GetExecutable(bufnr('')) + AssertEqual + \ ale#Escape('stylelint') . ' --whatever --stdin-filename %s', + \ ale_linters#html#stylelint#GetCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/linter/test_htmlhint.vader b/dot_vim/plugged/ale/test/linter/test_htmlhint.vader new file mode 100644 index 0000000..4475c1a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_htmlhint.vader @@ -0,0 +1,51 @@ +Before: + call ale#assert#SetUpLinterTest('html', 'htmlhint') + call ale#test#SetFilename('../test-files/htmlhint/test.html') + + let g:node_executable = ale#path#Simplify( + \ g:dir . '/../test-files/htmlhint/node_modules/.bin/htmlhint' + \) + let g:config_path = ale#path#Simplify( + \ g:dir . '/../test-files/htmlhint/with_config/.htmlhintrc' + \) + +After: + unlet! g:node_executable + unlet! g:config_path + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter g:node_executable, + \ ale#Escape(g:node_executable) . ' --format=unix %t' + +Execute(The global executable should be used if the option is set): + let g:ale_html_htmlhint_executable = 'foo' + let g:ale_html_htmlhint_use_global = 1 + + AssertLinter 'foo', ale#Escape('foo') . ' --format=unix %t', + +" This is so old configurations which might include this still work. +Execute(--format=unix should be removed from the options if added): + let g:ale_html_htmlhint_options = '--format=unix' + + AssertLinter g:node_executable, + \ ale#Escape(g:node_executable) . ' --format=unix %t' + +Execute(The configuration file should be automatically detected): + call ale#test#SetFilename('../test-files/htmlhint/with_config/test.html') + + AssertLinter g:node_executable, + \ ale#Escape(g:node_executable) + \ . ' --config ' . ale#Escape(g:config_path) + \ . ' --format=unix %t' + +" This is so old configurations which might include the config will work. +Execute(The configuration file should be configurable through the options variable): + call ale#test#SetFilename('../test-files/htmlhint/with_config/test.html') + let g:ale_html_htmlhint_options = '--config=/foo/bar/.htmlhintrc' + + AssertLinter g:node_executable, + \ ale#Escape(g:node_executable) + \ . ' --config=/foo/bar/.htmlhintrc' + \ . ' --format=unix %t' diff --git a/dot_vim/plugged/ale/test/linter/test_ibm_openapi_validator.vader b/dot_vim/plugged/ale/test/linter/test_ibm_openapi_validator.vader new file mode 100644 index 0000000..3484cc0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ibm_openapi_validator.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('openapi', 'ibm_validator') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The yaml ibm-openapi-validator command callback should return the correct default string): + AssertLinter 'lint-openapi', ale#Escape('lint-openapi') . ' %t' + +Execute(The yaml ibm-openapi-validator command callback should be configurable): + let g:ale_openapi_ibm_validator_executable = '~/.local/bin/lint-openapi' + let g:ale_openapi_ibm_validator_options = '-c ~/.config' + + AssertLinter '~/.local/bin/lint-openapi', ale#Escape('~/.local/bin/lint-openapi') + \ . ' -c ~/.config %t' diff --git a/dot_vim/plugged/ale/test/linter/test_idris.vader b/dot_vim/plugged/ale/test/linter/test_idris.vader new file mode 100644 index 0000000..ce7cd27 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_idris.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('idris', 'idris') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be used in the command): + AssertLinter 'idris', + \ ale#Escape('idris') . ' --total --warnpartial --warnreach --warnipkg --check %s' + + let b:ale_idris_idris_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --total --warnpartial --warnreach --warnipkg --check %s' + +Execute(The options should be configurable): + let b:ale_idris_idris_options = '--something' + + AssertLinter 'idris', ale#Escape('idris') . ' --something --check %s' diff --git a/dot_vim/plugged/ale/test/linter/test_ink_ls.vader b/dot_vim/plugged/ale/test/linter/test_ink_ls.vader new file mode 100644 index 0000000..a832a25 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ink_ls.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('ink', 'ls') + set ft=ink + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'ink-language-server', ale#Escape('ink-language-server') . ' --stdio' + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/ink/story/main.ink') + + AssertLSPLanguage 'ink' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ink/story') + +Execute(should accept configuration settings): + AssertLSPConfig {} + let b:ale_ink_ls_initialization_options = {'ink': {'runThroughMono': v:true}} + AssertLSPOptions {'ink': {'runThroughMono': v:true}} diff --git a/dot_vim/plugged/ale/test/linter/test_inko_inko.vader b/dot_vim/plugged/ale/test/linter/test_inko_inko.vader new file mode 100644 index 0000000..c08cbed --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_inko_inko.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('inko', 'inko') + call ale#test#SetFilename('../test-files/inko/test.inko') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'inko', ale#Escape('inko') . ' build --check --format=json %s' + +Execute(The inko callback should include tests/ for test paths): + call ale#engine#Cleanup(bufnr('')) + noautocmd e! ../test-files/inko/tests/test/test_foo.inko + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'inko', + \ ale#Escape('inko') + \ . ' build --check --format=json --include ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/inko/tests/')) + \ . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_ispc_ispc.vader b/dot_vim/plugged/ale/test/linter/test_ispc_ispc.vader new file mode 100644 index 0000000..f1aeb2f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ispc_ispc.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('ispc', 'ispc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'ispc', + \ ale#Escape('ispc') . ' --nowrap %s' + + let b:ale_ispc_ispc_executable = 'foo' + + AssertLinter 'foo', + \ ale#Escape('foo') . ' --nowrap %s' + +Execute(The options should be configurable): + let g:ale_ispc_ispc_options = '--foo' + + AssertLinter 'ispc', + \ ale#Escape('ispc') . ' --nowrap --foo' . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_iverilog.vader b/dot_vim/plugged/ale/test/linter/test_iverilog.vader new file mode 100644 index 0000000..d7a29f0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_iverilog.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('verilog', 'iverilog') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default iverilog command should be correct): + AssertLinter 'iverilog', 'iverilog -t null -Wall %t' + +Execute(iverilog options should be configurable): + " Additional args for the linter + let g:ale_verilog_iverilog_options = '-y.' + + AssertLinter 'iverilog', 'iverilog -t null -Wall -y. %t' diff --git a/dot_vim/plugged/ale/test/linter/test_javac.vader b/dot_vim/plugged/ale/test/linter/test_javac.vader new file mode 100644 index 0000000..85a76e6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_javac.vader @@ -0,0 +1,326 @@ +Before: + call ale#assert#SetUpLinterTest('java', 'javac') + call ale#test#SetFilename('dummy.java') + + let g:cp_sep = has('unix') ? ':' : ';' + let g:prefix = ale#Escape('javac') . ' -Xlint' + + function! GetCommand(previous_output) abort + let l:command = ale_linters#java#javac#GetCommand( + \ bufnr(''), + \ a:previous_output + \) + + let l:split_command = split(l:command) + let l:index = index(l:split_command, '-d') + + let l:split_command[l:index + 1] = 'TEMP' + + return join(l:split_command) + endfunction + +After: + unlet! g:cp_sep + unlet! g:prefix + + delfunction GetCommand + + call ale#assert#TearDownLinterTest() + +Execute(The javac callback should return the correct default value): + AssertLinterCwd '%s:h' + AssertLinter 'javac', g:prefix . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should use string type g:ale_java_javac_classpath correctly): + let g:ale_java_javac_classpath = 'foo.jar' + + AssertLinter 'javac', + \ g:prefix + \ . ' -cp ' . ale#Escape('foo.jar') + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should use list type g:ale_java_javac_classpath correctly): + let g:ale_java_javac_classpath = ['foo.jar'] + + AssertLinter 'javac', + \ g:prefix + \ . ' -cp ' . ale#Escape('foo.jar') + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The executable should be configurable): + let g:ale_java_javac_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -Xlint' + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should include discovered classpaths): + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ g:prefix + \ . ' -cp ' + \ . ale#Escape(join(['/foo/bar.jar', '/xyz/abc.jar'], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + +Execute(The javac callback should combine discovered classpaths and manual ones): + let g:ale_java_javac_classpath = 'configured.jar' + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ g:prefix + \ . ' -cp ' + \ . ale#Escape(join( + \ [ + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \ 'configured.jar', + \ ], + \ g:cp_sep + \ )) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_classpath = 'configured.jar' . g:cp_sep . 'configured2.jar' + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ g:prefix + \ . ' -cp ' + \ . ale#Escape(join( + \ [ + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \ 'configured.jar', + \ 'configured2.jar', + \ ], + \ g:cp_sep + \ )) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_classpath = ['configured.jar'] + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ g:prefix + \ . ' -cp ' + \ . ale#Escape(join( + \ [ + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \ 'configured.jar', + \ ], + \ g:cp_sep + \ )) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_classpath = ['configured.jar', 'configured2.jar'] + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ g:prefix + \ . ' -cp ' + \ . ale#Escape(join( + \ [ + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \ 'configured.jar', + \ 'configured2.jar', + \ ], + \ g:cp_sep + \ )) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + +Execute(The javac callback should use string type g:ale_java_javac_sourcepath correctly): + let g:ale_java_javac_sourcepath = '../test-files/java/with_main/build/gen/main' + + AssertLinter 'javac', + \ g:prefix + \ . ' -sourcepath ' . ale#Escape( + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/') + \ ) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should use list type g:ale_java_javac_sourcepath correctly): + let g:ale_java_javac_sourcepath = ['../test-files/java/with_main/build/gen/main'] + + AssertLinter 'javac', + \ g:prefix + \ . ' -sourcepath ' . ale#Escape( + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/') + \ ) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback shouldn't add -sourcepath when g:ale_java_javac_sourcepath variable path doesn't exist): + let g:ale_java_javac_sourcepath = '../test-files/java/with_main/build/gen3/main' + + AssertLinter 'javac', + \ g:prefix + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should combine discovered sourcepath and manual ones): + call ale#engine#Cleanup(bufnr('')) + call ale#test#SetFilename('../test-files/java/with_main/src/main/java/com/something/dummy.java') + call ale#engine#InitBufferInfo(bufnr('')) + + let g:ale_java_javac_sourcepath = '../test-files/java/with_main/build/gen/main' + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [], {}) + + AssertEqual + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/'), + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_sourcepath = '../test-files/java/with_main/build/gen/main' + \ . g:cp_sep . '../test-files/java/with_main/build/gen2/main' + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [], {}) + + AssertEqual + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen2/main/') + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_sourcepath = ['../test-files/java/with_main/build/gen/main'] + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [], {}) + + AssertEqual + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/') + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + + let g:ale_java_javac_sourcepath = [ + \ '../test-files/java/with_main/build/gen/main', + \ '../test-files/java/with_main/build/gen2/main' + \ ] + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [], {}) + + AssertEqual + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen/main/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/build/gen2/main/') + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + +Execute(The javac callback should detect source directories): + call ale#engine#Cleanup(bufnr('')) + noautocmd e! ../test-files/java/with_main/src/main/java/com/something/dummy + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'javac', + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape( + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/') + \ ) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should combine detected source directories and classpaths): + call ale#engine#Cleanup(bufnr('')) + call ale#test#SetFilename('../test-files/java/with_main/src/main/java/com/something/dummy.java') + call ale#engine#InitBufferInfo(bufnr('')) + + let b:command = ale_linters#java#javac#GetCommand(bufnr(''), [ + \ '[DEBUG] Ignore this.', + \ '[INFO] Something we should ignore.', + \ '/foo/bar.jar', + \ '/xyz/abc.jar', + \], {}) + + AssertEqual + \ ale#Escape('javac') . ' -Xlint' + \ . ' -cp ' . ale#Escape(join(['/foo/bar.jar', '/xyz/abc.jar'], g:cp_sep)) + \ . ' -sourcepath ' . ale#Escape( + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/') + \ ) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t', + \ substitute(b:command, '%e', '\=ale#Escape(''javac'')', 'g') + +Execute(The javac callback should use g:ale_java_javac_options correctly): + let g:ale_java_javac_options = '--anything --else' + + AssertLinter 'javac', + \ g:prefix . ' -d ' . ale#Escape('TEMP_DIR') . ' --anything --else %t' + +Execute(The javac callback should include src/test/java for test paths): + call ale#engine#Cleanup(bufnr('')) + " The test path is only included for test files. + " Regular Java files shouldn't import from tests. + noautocmd e! ../test-files/java/with_main/src/test/java/com/something/dummy + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'javac', + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_main/src/test/java/'), + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should include src/main/jaxb when available): + call ale#engine#Cleanup(bufnr('')) + noautocmd e! ../test-files/java/with_jaxb/src/main/java/com/something/dummy + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'javac', + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/with_jaxb/src/main/java/'), + \ ale#path#Simplify(g:dir . '/../test-files/java/with_jaxb/src/main/jaxb/'), + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should add -sourcepath even if src/java/main doesn't exist): + call ale#engine#Cleanup(bufnr('')) + call ale#test#SetFilename('../test-files/java/no_main/src/test/java/com/something/dummy.java') + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'javac', + \ ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/../test-files/java/no_main/src/test/java/'), + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_javalsp.vader b/dot_vim/plugged/ale/test/linter/test_javalsp.vader new file mode 100644 index 0000000..122f409 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_javalsp.vader @@ -0,0 +1,80 @@ + +Before: + call ale#assert#SetUpLinterTest('java', 'javalsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The javalsp callback should return the correct default value): + AssertLinter '', ale#Escape('') + +Execute(The javalsp java executable should be configurable): + let b:ale_java_javalsp_executable = '/bin/foobar' + + AssertLinter '/bin/foobar', ale#Escape('/bin/foobar') + +Execute(The javalsp callback should return backward compatible value): + let b:ale_java_javalsp_executable = '/bin/java' + let cmd = [ + \ ale#Escape('/bin/java'), + \ '--add-exports jdk.compiler/com.sun.tools.javac.api=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.code=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.main=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.model=javacs', + \ '--add-exports jdk.compiler/com.sun.tools.javac.util=javacs', + \ '--add-opens jdk.compiler/com.sun.tools.javac.api=javacs', + \ '-m javacs/org.javacs.Main', + \] + AssertLinter '/bin/java', join(cmd, ' ') + +Execute(The javalsp should have default config): + AssertEqual + \ { + \ 'java': { + \ 'classPath': [], + \ 'externalDependencies': [] + \ } + \ }, + \ ale_linters#java#javalsp#Config(bufnr('')) + +Execute(The javalsp should have default config if user sets empty hash): + let b:ale_java_javalsp_config = {} + + AssertEqual + \ { + \ 'java': { + \ 'classPath': [], + \ 'externalDependencies': [] + \ } + \ }, + \ ale_linters#java#javalsp#Config(bufnr('')) + +Execute(The javalsp should have add missing config): + let b:ale_java_javalsp_config = { 'java': { 'classPath': ['aaa.jar'] } } + + AssertEqual + \ { + \ 'java': { + \ 'classPath': ['aaa.jar'], + \ 'externalDependencies': [] + \ } + \ }, + \ ale_linters#java#javalsp#Config(bufnr('')) + + let b:ale_java_javalsp_config = + \ { + \ 'java': { + \ 'externalDependencies': ['unit-test:2.0.0'] + \ } + \ } + + AssertEqual + \ { + \ 'java': { + \ 'classPath': [], + \ 'externalDependencies': ['unit-test:2.0.0'] + \ } + \ }, + \ ale_linters#java#javalsp#Config(bufnr('')) diff --git a/dot_vim/plugged/ale/test/linter/test_javascript_deno_lsp.vader b/dot_vim/plugged/ale/test/linter/test_javascript_deno_lsp.vader new file mode 100644 index 0000000..965ce60 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_javascript_deno_lsp.vader @@ -0,0 +1,79 @@ +Before: + let g:ale_deno_importMap = 'import_map.json' + let g:ale_deno_unstable = 0 + let g:ale_deno_executable = 'deno' + let g:ale_deno_lsp_project_root = '' + + runtime autoload/ale/handlers/deno.vim + call ale#assert#SetUpLinterTest('javascript', 'deno') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should set deno lsp for JavaScript projects using stable Deno API): + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': '' + \} + +Execute(Should set deno lsp using unstable Deno API if enabled by user): + let g:ale_deno_unstable = 1 + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true, + \ 'importMap': '' + \} + +Execute(Should set the default importMap filepath): + call ale#test#SetFilename('../test-files/javascript_deno/main.js') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/javascript_deno/import_map.json') + \} + +Execute(Should set the importMap filepath from user defined importMap): + let g:ale_deno_importMap = 'custom_import_map.json' + call ale#test#SetFilename('../test-files/javascript_deno/main.js') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/javascript_deno/custom_import_map.json') + \} + +Execute(Should set the importMap filepath from user defined importMap with unstable API): + let g:ale_deno_importMap = 'custom_import_map.json' + let g:ale_deno_unstable = 1 + call ale#test#SetFilename('../test-files/javascript_deno/main.js') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/javascript_deno/custom_import_map.json') + \} + +Execute(Should find project root containing tsconfig.json): + call ale#test#SetFilename('../test-files/javascript_deno/main.js') + + AssertLSPLanguage 'javascript' + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/javascript_deno') + +Execute(Should use user-specified project root): + let g:ale_deno_lsp_project_root = '/' + + call ale#test#SetFilename('../test-files/javascript_deno/main.js') + + AssertLSPLanguage 'javascript' + AssertLSPProject '/' + +Execute(Check Deno LSP command): + AssertLinter 'deno', ale#Escape('deno') . ' lsp' diff --git a/dot_vim/plugged/ale/test/linter/test_javascript_tsserver.vader b/dot_vim/plugged/ale/test/linter/test_javascript_tsserver.vader new file mode 100644 index 0000000..1c29c8f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_javascript_tsserver.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'tsserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'tsserver', ale#Escape('tsserver') + +Execute(should resolve correct path when nested 1): + call ale#test#SetFilename('../test-files/tsserver/src/level-1/level-2/file3.ts') + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/tsserver/src/level-1') + +Execute(should resolve correct path when nested 2): + call ale#test#SetFilename('../test-files/tsserver/src/file1.ts') + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/tsserver') diff --git a/dot_vim/plugged/ale/test/linter/test_jq.vader b/dot_vim/plugged/ale/test/linter/test_jq.vader new file mode 100644 index 0000000..20c3db5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_jq.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('json', 'jq') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'jq', ale#Escape('jq') diff --git a/dot_vim/plugged/ale/test/linter/test_jscs.vader b/dot_vim/plugged/ale/test/linter/test_jscs.vader new file mode 100644 index 0000000..7cdf546 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_jscs.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'jscs') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should return the correct default values): + AssertLinter 'jscs', + \ ale#Escape('jscs') . ' --reporter inline --no-colors -' + +Execute(Should allow using a custom executable): + let g:ale_javascript_jscs_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --reporter inline --no-colors -' diff --git a/dot_vim/plugged/ale/test/linter/test_jshint.vader b/dot_vim/plugged/ale/test/linter/test_jshint.vader new file mode 100644 index 0000000..517c957 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_jshint.vader @@ -0,0 +1,17 @@ +Before: + Save g:ale_jshint_config_loc + + unlet! g:ale_jshint_config_loc + + call ale#assert#SetUpLinterTest('javascript', 'jshint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'jshint', ale#Escape('jshint') . ' --reporter unix --extract auto --filename %s -' + +Execute(Setting a config location should add the config parameter): + let g:ale_jshint_config_loc = '/some/file' + + AssertLinter 'jshint', ale#Escape('jshint') . ' --reporter unix --extract auto --config ' . ale#Escape('/some/file') . ' --filename %s -' diff --git a/dot_vim/plugged/ale/test/linter/test_jsonnet_lint.vader b/dot_vim/plugged/ale/test/linter/test_jsonnet_lint.vader new file mode 100644 index 0000000..529ae00 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_jsonnet_lint.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('jsonnet', 'jsonnet_lint') + call ale#test#SetFilename('../jsonnet_files/testfile.jsonnet') + +After: + Restore + + call ale#assert#TearDownLinterTest() + +Execute(The default jsonnet-lint command should be correct): + AssertLinter 'jsonnet-lint', + \ ale#Escape('jsonnet-lint') . ' %t' + +Execute(jsonnet-lint command and options should be customizable): + let g:ale_jsonnet_jsonnet_lint_executable = 'jsonnet' + let g:ale_jsonnet_jsonnet_lint_options = 'fmt' + + AssertLinter 'jsonnet', + \ ale#Escape('jsonnet') . ' fmt %t' diff --git a/dot_vim/plugged/ale/test/linter/test_jsonnetfmt.vader b/dot_vim/plugged/ale/test/linter/test_jsonnetfmt.vader new file mode 100644 index 0000000..d070cd9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_jsonnetfmt.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('jsonnet', 'jsonnetfmt') + call ale#test#SetFilename('../jsonnet_files/testfile.jsonnet') + +After: + Restore + + call ale#assert#TearDownLinterTest() + +Execute(The default jsonnetfmt command should be correct): + AssertLinter 'jsonnetfmt', + \ ale#Escape('jsonnetfmt') . ' %t' + +Execute(jsonnetfmt command and options should be customizable): + let g:ale_jsonnet_jsonnetfmt_executable = 'jsonnet' + let g:ale_jsonnet_jsonnetfmt_options = 'fmt' + + AssertLinter 'jsonnet', + \ ale#Escape('jsonnet') . ' fmt %t' diff --git a/dot_vim/plugged/ale/test/linter/test_julia_languageserver.vader b/dot_vim/plugged/ale/test/linter/test_julia_languageserver.vader new file mode 100644 index 0000000..d75665a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_julia_languageserver.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_julia_executable + + call ale#assert#SetUpLinterTest('julia', 'languageserver') + +After: + Restore + + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'julia', + \ ale#Escape('julia') . + \' --project=@. --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') + +Execute(The executable should be configurable): + let g:ale_julia_executable = 'julia-new' + + AssertLinter 'julia-new', + \ ale#Escape('julia-new') . + \' --project=@. --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/julia/test.jl') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/julia') diff --git a/dot_vim/plugged/ale/test/linter/test_kotlin_languageserver.vader b/dot_vim/plugged/ale/test/linter/test_kotlin_languageserver.vader new file mode 100644 index 0000000..97b867a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_kotlin_languageserver.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('kotlin', 'languageserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'kotlin-language-server', ale#Escape('kotlin-language-server') + +Execute(Gradle project roots with build.gradle should be detected correctly): + call ale#test#SetFilename('../test-files/gradle/build-gradle-project/src/main/kotlin/dummy.kt') + + AssertLSPProject ale#test#GetFilename('../test-files/gradle/build-gradle-project') + +Execute(Maven project roots with pom.xml should be detected correctly): + call ale#test#SetFilename('../test-files/maven/maven-kotlin-project/src/main/kotlin/dummy.kt') + + AssertLSPProject ale#test#GetFilename('../test-files/maven/maven-kotlin-project') + +Execute(No root should be detected if configuration files can't be found): + call ale#test#SetFilename('../test-files/gradle/non-gradle-project/src/main/kotlin/dummy.kt') + + AssertLSPProject '' diff --git a/dot_vim/plugged/ale/test/linter/test_kotlinc.vader b/dot_vim/plugged/ale/test/linter/test_kotlinc.vader new file mode 100644 index 0000000..fe94bff --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_kotlinc.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('kotlin', 'kotlinc') + call ale#test#SetFilename('test.kt') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'kotlinc', 'kotlinc ' . ale#Escape(expand('%:p')) diff --git a/dot_vim/plugged/ale/test/linter/test_languagetool.vader b/dot_vim/plugged/ale/test/linter/test_languagetool.vader new file mode 100644 index 0000000..ff6b206 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_languagetool.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('text', 'languagetool') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'languagetool', ale#Escape('languagetool') + \ . ' --autoDetect %s' + +Execute(Should be able to set a custom executable): + let g:ale_languagetool_executable = 'foobar' + + AssertLinter 'foobar' , ale#Escape('foobar') + \ . ' --autoDetect %s' + +Execute(Should be able to include custom languagetool options): + let g:ale_languagetool_options = '--language en' + + " is now 'foobar' based on above global + AssertLinter 'foobar', ale#Escape('foobar') + \ . ' --language en %s' diff --git a/dot_vim/plugged/ale/test/linter/test_less_stylelint.vader b/dot_vim/plugged/ale/test/linter/test_less_stylelint.vader new file mode 100644 index 0000000..c27af79 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_less_stylelint.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('less', 'stylelint') + unlet! b:executable + +After: + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(node_modules directories should be discovered): + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.less') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/stylelint/node_modules/.bin/stylelint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --stdin-filename %s' + +Execute(The global override should work): + let b:ale_less_stylelint_executable = 'foobar' + let b:ale_less_stylelint_use_global = 1 + + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.less') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin-filename %s' + +Execute(Extra options should be configurable): + let b:ale_less_stylelint_options = '--whatever' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'stylelint', + \ ale#Escape('stylelint') . ' --whatever --stdin-filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_lessc.vader b/dot_vim/plugged/ale/test/linter/test_lessc.vader new file mode 100644 index 0000000..b7d664c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_lessc.vader @@ -0,0 +1,46 @@ +Before: + call ale#assert#SetUpLinterTest('less', 'lessc') + call ale#test#SetFilename('testfile.less') + + unlet! b:executable + +After: + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(node_modules directories should be discovered): + call ale#test#SetFilename('../test-files/lessc/nested/testfile.less') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/lessc/node_modules/.bin/lessc' + \) + + AssertLinter b:executable, ale#Escape(b:executable) + \ . ' --no-color --lint' + \ . ' --include-path=' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/lessc/nested')) + \ . ' -' + +Execute(The global override should work): + let b:ale_less_lessc_executable = 'foobar' + let b:ale_less_lessc_use_global = 1 + + call ale#test#SetFilename('../test-files/lessc/nested/testfile.less') + + AssertLinter 'foobar', ale#Escape('foobar') + \ . ' --no-color --lint' + \ . ' --include-path=' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/lessc/nested')) + \ . ' -' + +Execute(Extra options should be configurable): + let b:ale_less_lessc_options = '--whatever' + + AssertLinter 'lessc', ale#Escape('lessc') + \ . ' --no-color --lint' + \ . ' --include-path=' + \ . ale#Escape(ale#path#Simplify(g:dir)) + \ . ' --whatever' + \ . ' -' diff --git a/dot_vim/plugged/ale/test/linter/test_lintr.vader b/dot_vim/plugged/ale/test/linter/test_lintr.vader new file mode 100644 index 0000000..8f6fb88 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_lintr.vader @@ -0,0 +1,34 @@ +Before: + call ale#assert#SetUpLinterTest('r', 'lintr') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default lintr command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'Rscript', + \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' + \ . ale#Escape('suppressPackageStartupMessages(library(lintr));' + \ . 'lint(cache = FALSE, commandArgs(TRUE), ' + \ . 'with_defaults())') + \ . ' %t' + +Execute(The lintr options should be configurable): + let b:ale_r_lintr_options = 'with_defaults(object_usage_linter = NULL)' + + AssertLinter 'Rscript', + \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' + \ . ale#Escape('suppressPackageStartupMessages(library(lintr));' + \ . 'lint(cache = FALSE, commandArgs(TRUE), ' + \ . 'with_defaults(object_usage_linter = NULL))') + \ . ' %t' + +Execute(If the lint_package flag is set, lintr::lint_package should be called): + let b:ale_r_lintr_lint_package = 1 + + AssertLinter 'Rscript', + \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' + \ . ale#Escape('suppressPackageStartupMessages(library(lintr));' + \ . 'lint_package(cache = FALSE, ' + \ . 'linters = with_defaults())') + \ . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_llc.vader b/dot_vim/plugged/ale/test/linter/test_llc.vader new file mode 100644 index 0000000..a0caaa4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_llc.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('llvm', 'llc') + + function! AssertHasPrefix(str, prefix) abort + let msg = printf("'%s' is expected to be prefixed with '%s'", a:str, a:prefix) + AssertEqual stridx(a:str, a:prefix), 0, msg + endfunction + +After: + delfunction AssertHasPrefix + + call ale#assert#TearDownLinterTest() + +Execute(The llc command should be customizable): + AssertLinter 'llc', + \ ale#Escape('llc') . ' -filetype=null -o=' . g:ale#util#nul_file + + let g:ale_llvm_llc_executable = 'llc-5.0' + + AssertLinter 'llc-5.0', + \ ale#Escape('llc-5.0') . ' -filetype=null -o=' . g:ale#util#nul_file diff --git a/dot_vim/plugged/ale/test/linter/test_lua_selene.vader b/dot_vim/plugged/ale/test/linter/test_lua_selene.vader new file mode 100644 index 0000000..7387bac --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_lua_selene.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('lua', 'selene') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The lua selene command callback should return the correct default string): + AssertLinter 'selene', ale#Escape('selene') . ' --display-style=json -' + +Execute(The lua selene command callback should let you set options): + let g:ale_lua_selene_options = '--num-threads 2' + + AssertLinter 'selene', + \ ale#Escape('selene') . ' --num-threads 2 --display-style=json -' + +Execute(The selene executable should be configurable): + let g:ale_lua_selene_executable = 'selene.sh' + + AssertLinter 'selene.sh', ale#Escape('selene.sh') . ' --display-style=json -' diff --git a/dot_vim/plugged/ale/test/linter/test_luac.vader b/dot_vim/plugged/ale/test/linter/test_luac.vader new file mode 100644 index 0000000..55f39cb --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_luac.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('lua', 'luac') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'luac', ale#Escape('luac') . ' -p -' + +Execute(The luac executable should be configurable): + let g:ale_lua_luac_executable = 'luac.sh' + + AssertLinter 'luac.sh', ale#Escape('luac.sh') . ' -p -' diff --git a/dot_vim/plugged/ale/test/linter/test_luacheck.vader b/dot_vim/plugged/ale/test/linter/test_luacheck.vader new file mode 100644 index 0000000..f0ef221 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_luacheck.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('lua', 'luacheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The lua luacheck command callback should return the correct default string): + AssertLinter 'luacheck', + \ ale#Escape('luacheck') . ' --formatter plain --codes --filename %s -' + +Execute(The lua luacheck command callback should let you set options): + let g:ale_lua_luacheck_options = '--config filename' + + AssertLinter 'luacheck', + \ ale#Escape('luacheck') + \ . ' --config filename' + \ . ' --formatter plain --codes --filename %s -' + +Execute(The luacheck executable should be configurable): + let g:ale_lua_luacheck_executable = 'luacheck.sh' + + AssertLinter 'luacheck.sh', + \ ale#Escape('luacheck.sh') . ' --formatter plain --codes --filename %s -' diff --git a/dot_vim/plugged/ale/test/linter/test_markdown_markdownlint.vader b/dot_vim/plugged/ale/test/linter/test_markdown_markdownlint.vader new file mode 100644 index 0000000..b938ac4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_markdown_markdownlint.vader @@ -0,0 +1,18 @@ +Before: + call ale#assert#SetUpLinterTest('markdown', 'markdownlint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'markdownlint', ale#Escape('markdownlint') . ' %s' + +Execute(The executable should be configurable): + let g:ale_markdown_markdownlint_executable = 'foo bar' + + AssertLinter 'foo bar', ale#Escape('foo bar') . ' %s' + +Execute(The options should be configurable): + let g:ale_markdown_markdownlint_options = '--config ~/custom/.markdownlintrc' + + AssertLinter 'markdownlint', ale#Escape('markdownlint') . ' --config ~/custom/.markdownlintrc %s' diff --git a/dot_vim/plugged/ale/test/linter/test_markdown_mdl.vader b/dot_vim/plugged/ale/test/linter/test_markdown_mdl.vader new file mode 100644 index 0000000..1ce4db1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_markdown_mdl.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('markdown', 'mdl') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'mdl', ale#Escape('mdl') . ' -j' + +Execute(The executable and options should be configurable): + let g:ale_markdown_mdl_executable = 'foo bar' + let g:ale_markdown_mdl_options = '--wat' + + AssertLinter 'foo bar', ale#Escape('foo bar') . ' -j --wat' + +Execute(Setting bundle appends 'exec mdl'): + let g:ale_markdown_mdl_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') . ' exec mdl -j' diff --git a/dot_vim/plugged/ale/test/linter/test_markdown_vale.vader b/dot_vim/plugged/ale/test/linter/test_markdown_vale.vader new file mode 100644 index 0000000..5300805 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_markdown_vale.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('markdown', 'vale') + call ale#test#SetFilename('dummy.md') + + let g:ale_markdown_vale_executable = 'vale' + let g:ale_markdown_vale_input_file = '%t' + let g:ale_markdown_vale_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to vale): + AssertLinter 'vale', ale#Escape('vale') + \ . ' --output=JSON %t' + +Execute(Should be able to set a custom executable): + let g:ale_markdown_vale_executable = 'bin/vale' + + AssertLinter 'bin/vale' , ale#Escape('bin/vale') + \ . ' --output=JSON %t' + +Execute(Should be able to set custom options): + let g:ale_markdown_vale_options = '--foo --bar' + + AssertLinter 'vale', ale#Escape('vale') + \ . ' --output=JSON --foo --bar %t' + +Execute(Should be able to set a custom input file): + let g:ale_markdown_vale_input_file = '%s' + + AssertLinter 'vale', ale#Escape('vale') + \ . ' --output=JSON %s' diff --git a/dot_vim/plugged/ale/test/linter/test_mercury_mmc.vader b/dot_vim/plugged/ale/test/linter/test_mercury_mmc.vader new file mode 100644 index 0000000..5ab5e74 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_mercury_mmc.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('mercury', 'mmc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'mmc', + \ ale#Escape('mmc') . ' --errorcheck-only --make --output-compile-error-lines 100 %s:t:r' + +Execute(The executable should be configurable): + let b:ale_mercury_mmc_executable = 'foo' + + AssertLinter 'foo', + \ ale#Escape('foo') . ' --errorcheck-only --make --output-compile-error-lines 100 %s:t:r' + +Execute(The options should be configurable): + let b:ale_mercury_mmc_options = '--bar' + + AssertLinter 'mmc', + \ ale#Escape('mmc') . ' --errorcheck-only --bar %s:t:r' diff --git a/dot_vim/plugged/ale/test/linter/test_mypy.vader b/dot_vim/plugged/ale/test/linter/test_mypy.vader new file mode 100644 index 0000000..bac59d9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_mypy.vader @@ -0,0 +1,106 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'mypy') + call ale#test#SetFilename('test.py') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The mypy callbacks should return the correct default values): + AssertLinterCwd g:dir + AssertLinter 'mypy', + \ ale#Escape('mypy') + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(The mypy executable should be configurable, and escaped properly): + let g:ale_python_mypy_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', + \ ale#Escape('executable with spaces') + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(The mypy command callback should let you set options): + let g:ale_python_mypy_options = '--some-option' + + AssertLinter 'mypy', + \ ale#Escape('mypy') + \ . ' --some-option' + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(The mypy command should switch directories to the detected project root): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'mypy', + \ ale#Escape('mypy') + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(The mypy callbacks should detect virtualenv directories and switch to the project root): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/mypy') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, + \ ale#Escape(b:executable) + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(The mypy callbacks should cd to directory containing mypy.ini if found): + call ale#test#SetFilename('../test-files/python/with_mypy_ini_and_pytest_ini/tests/testsubfolder/my_tests.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_mypy_ini_and_pytest_ini') + AssertLinter 'mypy', + \ ale#Escape('mypy') + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(You should able able to use the global mypy instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_mypy_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'mypy', + \ ale#Escape('mypy') + \ . ' --show-column-numbers' + \ . ' --shadow-file %s %t %s' + +Execute(Setting executable to 'pipenv' appends 'run mypy'): + let g:ale_python_mypy_executable = 'path/to/pipenv' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run mypy' + \ . ' --show-column-numbers --shadow-file %s %t %s' + +Execute(Pipenv is detected when python_mypy_auto_pipenv is set): + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + let g:ale_python_mypy_auto_pipenv = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run mypy --show-column-numbers --shadow-file %s %t %s' + +Execute(Setting executable to 'poetry' appends 'run mypy'): + let g:ale_python_mypy_executable = 'path/to/poetry' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run mypy' + \ . ' --show-column-numbers --shadow-file %s %t %s' + +Execute(Poetry is detected when python_mypy_auto_poetry is set): + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + let g:ale_python_mypy_auto_poetry = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run mypy --show-column-numbers --shadow-file %s %t %s' diff --git a/dot_vim/plugged/ale/test/linter/test_naga.vader b/dot_vim/plugged/ale/test/linter/test_naga.vader new file mode 100644 index 0000000..bf91604 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_naga.vader @@ -0,0 +1,10 @@ +Before: + call ale#assert#SetUpLinterTest('wgsl', 'naga') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The naga command should be customizable): + let g:ale_wgsl_naga_executable = '/path/to/naga' + AssertLinter '/path/to/naga', + \ ale#Escape('/path/to/naga') . ' --stdin-file-path %s' diff --git a/dot_vim/plugged/ale/test/linter/test_nagelfar.vader b/dot_vim/plugged/ale/test/linter/test_nagelfar.vader new file mode 100644 index 0000000..94bb1d5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_nagelfar.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('tcl', 'nagelfar') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'nagelfar.tcl', ale#Escape('nagelfar.tcl') . ' %s' + + let b:ale_tcl_nagelfar_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %s' + +Execute(The options should be configurable): + let b:ale_tcl_nagelfar_options = '--something' + + AssertLinter 'nagelfar.tcl', ale#Escape('nagelfar.tcl') . ' --something %s' diff --git a/dot_vim/plugged/ale/test/linter/test_nasm_nasm.vader b/dot_vim/plugged/ale/test/linter/test_nasm_nasm.vader new file mode 100644 index 0000000..2bfe2b0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_nasm_nasm.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('nasm', 'nasm') + + let b:command_tail = + \ ' -X gnu -I %s:h' . (has('win32') ? '\' : '/') . ' %s -o ' . (has('win32') ? 'NUL' : '/dev/null') + let b:command_tail_opt = + \ ' -X gnu -I %s:h' . (has('win32') ? '\' : '/') . ' -w+orphan-labels %s -o ' . (has('win32') ? 'NUL' : '/dev/null') + +After: + unlet! b:command_tail + unlet! b:command_tail_opt + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'nasm', ale#Escape('nasm') . b:command_tail, + + let b:ale_nasm_nasm_executable = '~/nasm' + + AssertLinter '~/nasm', ale#Escape('~/nasm') . b:command_tail + +Execute(The options should be configurable): + let b:ale_nasm_nasm_options = '-w-macro-params' + + AssertLinter 'nasm', ale#Escape('nasm') + \ . ' -X gnu -I %s:h' . (has('win32') ? '\' : '/') + \ . ' -w-macro-params %s -o ' . (has('win32') ? 'NUL' : '/dev/null') + +Execute(The options should be used in command): + let b:ale_nasm_nasm_options = '-w+orphan-labels' + + AssertLinter 'nasm', ale#Escape('nasm') . b:command_tail_opt diff --git a/dot_vim/plugged/ale/test/linter/test_nimlsp.vader b/dot_vim/plugged/ale/test/linter/test_nimlsp.vader new file mode 100644 index 0000000..c109dee --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_nimlsp.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('nim', 'nimlsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(It does not set nim sources by default): + AssertLinter 'nimlsp', ale#Escape('nimlsp') + +Execute(Sets nimlsp and escapes sources from g:ale_nim_nimlsp_nim_sources): + let g:ale_nim_nimlsp_nim_sources = '/path/to /Nim' + AssertLinter 'nimlsp', ale#Escape('nimlsp') . ' ' . ale#Escape('/path/to /Nim') diff --git a/dot_vim/plugged/ale/test/linter/test_nix_statix.vader b/dot_vim/plugged/ale/test/linter/test_nix_statix.vader new file mode 100644 index 0000000..8ee4c02 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_nix_statix.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('nix', 'statix') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The statix command should be correct): + AssertLinter 'statix', ale#Escape('statix') . ' check -o errfmt --stdin' + +Execute(Additional statix options should be configurable): + let g:ale_nix_statix_check_options = '--foobar' + + AssertLinter 'statix', + \ ale#Escape('statix') . ' check -o errfmt --stdin --foobar' + +Execute(The statix command should be configurable): + let g:ale_nix_statix_check_executable = 'foo/bar' + + AssertLinter 'foo/bar', ale#Escape('foo/bar') . ' check -o errfmt --stdin' diff --git a/dot_vim/plugged/ale/test/linter/test_objc_ccls.vader b/dot_vim/plugged/ale/test/linter/test_objc_ccls.vader new file mode 100644 index 0000000..58d824c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_objc_ccls.vader @@ -0,0 +1,66 @@ +Before: + call ale#assert#SetUpLinterTest('objc', 'ccls') + + Save b:ale_c_build_dir_names + Save b:ale_objc_ccls_executable + Save b:ale_objc_ccls_init_options + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + call ale#test#SetFilename(tempname() . '/dummy.m') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + call ale#test#SetFilename(tempname() . '/dummy.m') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + call ale#test#SetFilename(tempname() . '/dummy.m') + + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ccls/with_ccls-root/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_objc_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_objc_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } + +Execute(The compile command database should be detected correctly): + call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.c') + + AssertLSPOptions {} + + call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.c') + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') } + + call ale#test#SetFilename('../test-files/ccls/with_build_dir/dummy.c') + let b:ale_c_build_dir_names = ['unusual_build_dir_name'] + + AssertLSPOptions { 'compilationDatabaseDirectory': + \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_build_dir/unusual_build_dir_name') } diff --git a/dot_vim/plugged/ale/test/linter/test_ocaml_ocamllsp.vader b/dot_vim/plugged/ale/test/linter/test_ocaml_ocamllsp.vader new file mode 100644 index 0000000..4f33af1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ocaml_ocamllsp.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('ocaml', 'ocamllsp') + + Save &filetype + let &filetype = 'ocaml' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'ocaml' + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ocamllsp') + +Execute(The executable should be run using opam exec by default): + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLinter 'ocamllsp', 'opam config exec -- ocamllsp' + +Execute(The executable should be run directly if use_opam flag is disabled): + let g:ale_ocaml_ocamllsp_use_opam = 0 + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLinter 'ocamllsp', 'ocamllsp' diff --git a/dot_vim/plugged/ale/test/linter/test_ocaml_ols.vader b/dot_vim/plugged/ale/test/linter/test_ocaml_ols.vader new file mode 100644 index 0000000..ddab995 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ocaml_ols.vader @@ -0,0 +1,41 @@ +Before: + call ale#assert#SetUpLinterTest('ocaml', 'ols') + + Save &filetype + let &filetype = 'ocaml' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'ocaml' + +Execute(The default executable should be correct): + AssertLinter 'ocaml-language-server', + \ ale#Escape('ocaml-language-server') . ' --stdio' + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ols/file.ml') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ols') + +Execute(The local executable should be used when available): + call ale#test#SetFilename('../test-files/ols/file.ml') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio' + +Execute(The global executable should always be used when use_global is set): + let g:ale_ocaml_ols_use_global = 1 + call ale#test#SetFilename('../test-files/ols/file.ml') + + AssertLinter 'ocaml-language-server', + \ ale#Escape('ocaml-language-server') . ' --stdio' + +Execute(The executable should be configurable): + let g:ale_ocaml_ols_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/dot_vim/plugged/ale/test/linter/test_ocamlinterface_ocamllsp.vader b/dot_vim/plugged/ale/test/linter/test_ocamlinterface_ocamllsp.vader new file mode 100644 index 0000000..aa0b210 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ocamlinterface_ocamllsp.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('ocamlinterface', 'ocamllsp') + + Save &filetype + let &filetype = 'ocamlinterface' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'ocaml.interface' + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ocamllsp') + +Execute(The executable should be run using opam exec by default): + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLinter 'ocamllsp', 'opam config exec -- ocamllsp' + +Execute(The executable should be run directly if use_opam flag is disabled): + let g:ale_ocaml_ocamllsp_use_opam = 0 + call ale#test#SetFilename('../test-files/ocamllsp/file.ml') + + AssertLinter 'ocamllsp', 'ocamllsp' diff --git a/dot_vim/plugged/ale/test/linter/test_openscad_sca2d.vader b/dot_vim/plugged/ale/test/linter/test_openscad_sca2d.vader new file mode 100644 index 0000000..c2409f5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_openscad_sca2d.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('openscad', 'sca2d') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The options should be used in the command): + AssertLinter 'sca2d', ale#Escape('sca2d') . ' %s' + + let b:ale_openscad_sca2d_options = '--foobar' + + AssertLinter 'sca2d', ale#Escape('sca2d') . ' --foobar %s' diff --git a/dot_vim/plugged/ale/test/linter/test_perl.vader b/dot_vim/plugged/ale/test/linter/test_perl.vader new file mode 100644 index 0000000..3c4b661 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_perl.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('perl', 'perl') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default Perl command callback should be correct): + AssertLinter 'perl', ale#Escape('perl') . ' -c -Mwarnings -Ilib %t' + +Execute(Overriding the executable and command should work): + let b:ale_perl_perl_executable = 'foobar' + let b:ale_perl_perl_options = '-w' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -w %t' diff --git a/dot_vim/plugged/ale/test/linter/test_perl6.vader b/dot_vim/plugged/ale/test/linter/test_perl6.vader new file mode 100644 index 0000000..d3ec6e1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_perl6.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('perl6', 'perl6') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default Perl6 command callback should be correct): + AssertLinter 'perl6', 'perl6' . ' -c -Ilib %t' + +Execute(Overriding the executable and command should work): + let b:ale_perl6_perl6_executable = 'foobar' + let b:ale_perl6_perl6_options = '-w' + + AssertLinter 'foobar', 'foobar' . ' -w %t' diff --git a/dot_vim/plugged/ale/test/linter/test_perlcritic.vader b/dot_vim/plugged/ale/test/linter/test_perlcritic.vader new file mode 100644 index 0000000..0f1e285 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_perlcritic.vader @@ -0,0 +1,36 @@ +Before: + call ale#assert#SetUpLinterTest('perl', 'perlcritic') + call ale#test#SetFilename('test.pl') + let g:ale_perl_perlcritic_profile = '' + +After: + unlet! b:readme_path + call ale#assert#TearDownLinterTest() + +Execute(The command should be correct with g:ale_perl_perlcritic_showrules off): + let b:ale_perl_perlcritic_showrules = 0 + + AssertLinter 'perlcritic', ale#Escape('perlcritic') + \ . ' --verbose ' . ale#Escape('%l:%c %m\n') . ' --nocolor' + +Execute(The command should be correct with g:ale_perl_perlcritic_showrules on): + let b:ale_perl_perlcritic_showrules = 1 + + AssertLinter 'perlcritic', ale#Escape('perlcritic') + \ . ' --verbose ' . ale#Escape('%l:%c %m [%p]\n') . ' --nocolor' + +Execute(The command search for the profile file when set): + let b:ale_perl_perlcritic_profile = 'README.md' + + let b:readme_path = ale#path#Simplify(expand('%:p:h:h:h') . '/README.md') + + AssertLinter 'perlcritic', ale#Escape('perlcritic') + \ . ' --verbose ' . ale#Escape('%l:%c %m\n') . ' --nocolor' + \ . ' --profile ' . ale#Escape(b:readme_path) + +Execute(Extra options should be set appropriately): + let b:ale_perl_perlcritic_options = 'beep boop' + + AssertLinter 'perlcritic', ale#Escape('perlcritic') + \ . ' --verbose ' . ale#Escape('%l:%c %m\n') . ' --nocolor' + \ . ' beep boop' diff --git a/dot_vim/plugged/ale/test/linter/test_php.vader b/dot_vim/plugged/ale/test/linter/test_php.vader new file mode 100644 index 0000000..670d719 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_php.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'php') + let b:command_tail = ' -l -d error_reporting=E_ALL -d display_errors=1' + \ . ' -d log_errors=0 --' + +After: + unlet! b:command_tail + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'php', ale#Escape('php') . b:command_tail + + let b:ale_php_php_executable = '/path/to/php' + + AssertLinter '/path/to/php', ale#Escape('/path/to/php') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_php_intelephense.vader b/dot_vim/plugged/ale/test/linter/test_php_intelephense.vader new file mode 100644 index 0000000..d6e2469 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_php_intelephense.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'intelephense') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'intelephense', + \ ale#Escape('intelephense') . ' --stdio' + +Execute(The project path should be correct for .git directories): + call ale#test#SetFilename('../test-files/php/with-git/test.php') + silent! call mkdir('../test-files/php/with-git/.git', 'p') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-git') + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') + +Execute(The project cache should be saved in a temp dir): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + let g:ale_php_intelephense_config = { 'storagePath': '/tmp/intelephense' } + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/dot_vim/plugged/ale/test/linter/test_php_langserver.vader b/dot_vim/plugged/ale/test/linter/test_php_langserver.vader new file mode 100644 index 0000000..2874171 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_php_langserver.vader @@ -0,0 +1,32 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'langserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'php-language-server.php', + \ 'php ' . ale#Escape('php-language-server.php') + +Execute(Vendor executables should be detected): + call ale#test#SetFilename('../test-files/php/test.php') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/php/vendor/bin/php-language-server.php'), + \ 'php ' . ale#Escape(ale#path#Simplify( + \ g:dir + \ . '/../test-files/php/vendor/bin/php-language-server.php' + \ )) + +Execute(The project path should be correct for .git directories): + call ale#test#SetFilename('../test-files/php/with-git/test.php') + silent! call mkdir('../test-files/php/with-git/.git') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-git') + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/dot_vim/plugged/ale/test/linter/test_phpactor.vader b/dot_vim/plugged/ale/test/linter/test_phpactor.vader new file mode 100644 index 0000000..8968bba --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_phpactor.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'phpactor') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'phpactor', + \ ale#Escape('phpactor') . ' language-server' + +Execute(The project path should be correct for .git directories): + call ale#test#SetFilename('../test-files/php/with-git/test.php') + silent! call mkdir('../test-files/php/with-git/.git') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-git') + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/dot_vim/plugged/ale/test/linter/test_phpcs.vader b/dot_vim/plugged/ale/test/linter/test_phpcs.vader new file mode 100644 index 0000000..afb88e3 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_phpcs.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'phpcs') + +After: + unlet! g:executable + + call ale#assert#TearDownLinterTest() + +Execute(The local phpcs executable should be used): + call ale#test#SetFilename('../test-files/phpcs/project-with-phpcs/foo/test.php') + + let g:executable = ale#path#Simplify(g:dir . '/../test-files/phpcs/project-with-phpcs/vendor/bin/phpcs') + + AssertLinterCwd '%s:h' + AssertLinter g:executable, ale#Escape(g:executable) + \ . ' -s --report=emacs --stdin-path=%s' + +Execute(use_global should override local executable detection): + let g:ale_php_phpcs_use_global = 1 + + call ale#test#SetFilename('../test-files/phpcs/project-with-phpcs/foo/test.php') + + AssertLinter 'phpcs', ale#Escape('phpcs') + \ . ' -s --report=emacs --stdin-path=%s' + +Execute(Projects without local executables should use the global one): + call ale#test#SetFilename('../test-files/phpcs/project-without-phpcs/foo/test.php') + + AssertLinter 'phpcs', ale#Escape('phpcs') + \ . ' -s --report=emacs --stdin-path=%s' + +Execute(User provided options should be used): + let g:ale_php_phpcs_options = '--my-user-provided-option my-value' + + AssertLinter 'phpcs', ale#Escape('phpcs') + \ . ' -s --report=emacs --stdin-path=%s --my-user-provided-option my-value' + +Execute(The _standard option should be used): + let g:ale_php_phpcs_standard = 'foobar' + + AssertLinter 'phpcs', ale#Escape('phpcs') + \ . ' -s --report=emacs --stdin-path=%s --standard=' . ale#Escape('foobar') diff --git a/dot_vim/plugged/ale/test/linter/test_phpmd.vader b/dot_vim/plugged/ale/test/linter/test_phpmd.vader new file mode 100644 index 0000000..6492282 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_phpmd.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'phpmd') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Custom executables should be used for the executable and command): + let g:ale_php_phpmd_executable = 'phpmd_test' + + AssertLinter 'phpmd_test', + \ ale#Escape('phpmd_test') + \ . ' %s text cleancode,codesize,controversial,design,naming,unusedcode --ignore-violations-on-exit %t' diff --git a/dot_vim/plugged/ale/test/linter/test_phpstan.vader b/dot_vim/plugged/ale/test/linter/test_phpstan.vader new file mode 100644 index 0000000..dbeb1bd --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_phpstan.vader @@ -0,0 +1,121 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'phpstan') + + let g:old_dir = g:dir + + " Create a temporary directory and work within it, otherwise these tests + " cannot be run in parallel. + let g:dir = tempname() + call mkdir(g:dir, '', 0750) + silent! execute 'cd ' . fnameescape(g:dir) + silent! noautocmd execute 'file ' . fnameescape(ale#path#Simplify(g:dir . '/test.php')) + + call delete('./phpstan.neon') + + GivenCommandOutput ['0.10.2'] + +After: + silent! execute 'cd ' . fnameescape(g:old_dir) + call delete(g:dir, 'rf') + let g:dir = g:old_dir + unlet! g:old_dir + call ale#assert#TearDownLinterTest() + +Execute(The local phpstan executable should be used): + call mkdir('vendor/bin', 'p', 0750) + call writefile([''], 'vendor/bin/phpstan') + call ale#test#SetFilename('phpstan-test-files/foo/test.php') + + let g:executable = ale#path#Simplify(g:dir . '/vendor/bin/phpstan') + + AssertLinter g:executable, + \ ale#Escape(g:executable) . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('4') . ' %s' + +Execute(use_global should override local executable detection): + let g:ale_php_phpstan_use_global = 1 + + call mkdir('vendor/bin', 'p', 0750) + call writefile([''], 'vendor/bin/phpstan') + call ale#test#SetFilename('phpstan-test-files/foo/test.php') + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('4') . ' %s' + +Execute(Custom executables should be used for the executable and command): + let g:ale_php_phpstan_executable = 'phpstan_test' + + AssertLinter 'phpstan_test', + \ ale#Escape('phpstan_test') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('4') . ' %s' + +Execute(project with level set to 3): + call ale#test#SetFilename('phpstan-test-files/foo/test.php') + let g:ale_php_phpstan_level = 3 + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('3') . ' %s' + +Execute(Custom phpstan configuration file): + let g:ale_php_phpstan_configuration = 'phpstan_config' + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -c ' . ale#Escape('phpstan_config') . ' -l ' . ale#Escape('4') . ' %s' + +Execute(Choose the right format for error format param): + GivenCommandOutput ['0.10.3'] + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --error-format json -l ' . ale#Escape('4') . ' %s' + \ ] + +Execute(Configuration file exists in current directory): + call writefile(['parameters:', ' level: 7'], './phpstan.neon') + let g:ale_php_phpstan_level = '' + let g:ale_php_phpstan_configuration = '' + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json %s' + \ ] + +Execute(Configuration dist file exists in current directory): + call writefile(['parameters:', ' level: 7'], './phpstan.neon.dist') + let g:ale_php_phpstan_level = '' + let g:ale_php_phpstan_configuration = '' + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json %s' + \ ] + +Execute(Configuration file exists in current directory, but force phpstan level): + call writefile(['parameters:', ' level: 7'], './phpstan.neon') + let g:ale_php_phpstan_configuration = '' + let g:ale_php_phpstan_level = '7' + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('7') . ' %s' + \ ] + +Execute(Configuration file exists in current directory, but force phpstan configuration): + call writefile(['parameters:', ' level: 7'], './phpstan.neon') + let g:ale_php_phpstan_level = '' + let g:ale_php_phpstan_configuration = 'phpstan.custom.neon' + + AssertLinter 'phpstan', [ + \ ale#Escape('phpstan') . ' --version', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -c ' . ale#Escape('phpstan.custom.neon') . ' %s' + \ ] + +Execute(Autoload parameter is added to the command): + let g:ale_php_phpstan_autoload = 'autoload.php' + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -a ' . ale#Escape('autoload.php') . ' -l ' . ale#Escape('4') . ' %s' + +Execute(Memory limit parameter is added to the command): + let g:ale_php_phpstan_memory_limit = '500M' + + AssertLinter 'phpstan', + \ ale#Escape('phpstan') . ' analyze --no-progress --errorFormat json -l ' . ale#Escape('4') . ' --memory-limit ' . ale#Escape('500M') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_pony_ponyc.vader b/dot_vim/plugged/ale/test/linter/test_pony_ponyc.vader new file mode 100644 index 0000000..3a3b32e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pony_ponyc.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('pony', 'ponyc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The options should be used in the command): + AssertLinter 'ponyc', ale#Escape('ponyc') . ' --pass paint' + + let b:ale_pony_ponyc_options = 'foobar' + + AssertLinter 'ponyc', ale#Escape('ponyc') . ' foobar' diff --git a/dot_vim/plugged/ale/test/linter/test_prospector.vader b/dot_vim/plugged/ale/test/linter/test_prospector.vader new file mode 100644 index 0000000..82e1596 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_prospector.vader @@ -0,0 +1,35 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'prospector') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Setting executable to 'pipenv' appends 'run prospector'): + let g:ale_python_prospector_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run prospector' + \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s' + +Execute(Pipenv is detected when python_prospector_auto_pipenv is set): + let g:ale_python_prospector_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run prospector' + \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s' + +Execute(Setting executable to 'poetry' appends 'run prospector'): + let g:ale_python_prospector_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run prospector' + \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s' + +Execute(Poetry is detected when python_prospector_auto_poetry is set): + let g:ale_python_prospector_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run prospector' + \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s' diff --git a/dot_vim/plugged/ale/test/linter/test_proto.vader b/dot_vim/plugged/ale/test/linter/test_proto.vader new file mode 100644 index 0000000..726588c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_proto.vader @@ -0,0 +1,16 @@ +Before: + call ale#assert#SetUpLinterTest('proto', 'protoc_gen_lint') + call ale#test#SetFilename('test.proto') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'protoc', + \ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --lint_out=. ' . '%s' + +Execute(The callback should include any additional options): + let b:ale_proto_protoc_gen_lint_options = '--some-option' + + AssertLinter 'protoc', + \ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --some-option --lint_out=. ' . '%s' diff --git a/dot_vim/plugged/ale/test/linter/test_protolint.vader b/dot_vim/plugged/ale/test/linter/test_protolint.vader new file mode 100644 index 0000000..4463b62 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_protolint.vader @@ -0,0 +1,24 @@ +Before: + call ale#assert#SetUpLinterTest('proto', 'protolint') + call ale#test#SetFilename('test.proto') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'protolint', + \ ale#Escape('protolint') + \ . ' lint' + \ . ' -reporter=unix' + \ . ' %s' + +Execute(The callback should include any additional options): + let b:ale_proto_protolint_executable = '/tmp/protolint' + let b:ale_proto_protolint_config = '/tmp/protolint.yaml' + + AssertLinter '/tmp/protolint', + \ ale#Escape('/tmp/protolint') + \ . ' lint' + \ . ' -config_path=' . ale#Escape('/tmp/protolint.yaml') + \ . ' -reporter=unix' + \ . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_psalm.vader b/dot_vim/plugged/ale/test/linter/test_psalm.vader new file mode 100644 index 0000000..94e718d --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_psalm.vader @@ -0,0 +1,44 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'psalm') + +After: + unlet! g:i + unlet! g:matched + + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'psalm', + \ ale#Escape('psalm') . ' --language-server' + +Execute(Vendor executables should be detected): + call ale#test#SetFilename('../test-files/psalm/test.php') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/psalm/vendor/bin/psalm'), + \ ale#Escape(ale#path#Simplify( + \ g:dir + \ . '/../test-files/psalm/vendor/bin/psalm' + \ )) . ' --language-server' + + let g:ale_php_psalm_use_global = 1 + + AssertLinter 'psalm', + \ ale#Escape('psalm') . ' --language-server' + +Execute(User provided options should be used): + let g:ale_php_psalm_options = '--my-user-provided-option my-value' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'psalm', + \ ale#Escape('psalm') + \ . ' --language-server --my-user-provided-option my-value' + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('../test-files/php/with-composer/test.php') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer') diff --git a/dot_vim/plugged/ale/test/linter/test_puglint.vader b/dot_vim/plugged/ale/test/linter/test_puglint.vader new file mode 100644 index 0000000..8a44540 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_puglint.vader @@ -0,0 +1,48 @@ +Before: + call ale#assert#SetUpLinterTest('pug', 'puglint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(puglint should detect local executables and package.json): + call ale#test#SetFilename('../test-files/puglint/test.pug') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/package.json')) + \ . ' -r inline %t' + +Execute(puglint should use global executables if configured): + let g:ale_pug_puglint_use_global = 1 + + call ale#test#SetFilename('../test-files/puglint/test.pug') + + AssertLinter 'pug-lint', + \ ale#Escape('pug-lint') + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/package.json')) + \ . ' -r inline %t' + +Execute(puglint should detect .pug-lintrc): + call ale#test#SetFilename('../test-files/puglint/puglint_rc_dir/subdir/test.pug') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_dir/.pug-lintrc')) + \ . ' -r inline %t' + +Execute(puglint should detect .pug-lintrc.js): + call ale#test#SetFilename('../test-files/puglint/puglint_rc_js_dir/subdir/test.pug') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_js_dir/.pug-lintrc.js')) + \ . ' -r inline %t' + +Execute(puglint should detect .pug-lintrc.json): + call ale#test#SetFilename('../test-files/puglint/puglint_rc_json_dir/subdir/test.pug') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint')) + \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_json_dir/.pug-lintrc.json')) + \ . ' -r inline %t' diff --git a/dot_vim/plugged/ale/test/linter/test_purescript_ls.vader b/dot_vim/plugged/ale/test/linter/test_purescript_ls.vader new file mode 100644 index 0000000..3ef9707 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_purescript_ls.vader @@ -0,0 +1,31 @@ +Before: + call ale#assert#SetUpLinterTest('purescript', 'ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'purescript-language-server', ale#Escape('purescript-language-server') . ' --stdio' + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/purescript/spago/Foo.purs') + + AssertLSPLanguage 'purescript' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/purescript/spago') + +Execute(should set correct project for bower): + call ale#test#SetFilename('../test-files/purescript/bower/Foo.purs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/purescript/bower') + +Execute(should set correct project for psc-package): + call ale#test#SetFilename('../test-files/purescript/psc-package/Foo.purs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/purescript/psc-package') + +Execute(should accept configuration settings): + AssertLSPConfig {} + let b:ale_purescript_ls_config = {'purescript': {'addSpagoSources': v:true}} + AssertLSPConfig {'purescript': {'addSpagoSources': v:true}} diff --git a/dot_vim/plugged/ale/test/linter/test_pycodestyle.vader b/dot_vim/plugged/ale/test/linter/test_pycodestyle.vader new file mode 100644 index 0000000..fac53d9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pycodestyle.vader @@ -0,0 +1,46 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pycodestyle') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The pycodestyle command callback should return default string): + AssertLinter 'pycodestyle', ale#Escape('pycodestyle') . ' -' + +Execute(The pycodestyle command callback should allow options): + let g:ale_python_pycodestyle_options = '--exclude=test*.py' + + AssertLinter 'pycodestyle', + \ ale#Escape('pycodestyle') . ' --exclude=test*.py -' + +Execute(The pycodestyle executable should be configurable): + let g:ale_python_pycodestyle_executable = '~/.local/bin/pycodestyle' + + AssertLinter '~/.local/bin/pycodestyle', + \ ale#Escape('~/.local/bin/pycodestyle') . ' -' + +Execute(Setting executable to 'pipenv' appends 'run pycodestyle'): + let g:ale_python_pycodestyle_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pycodestyle -' + +Execute(Pipenv is detected when python_pycodestyle_auto_pipenv is set): + let g:ale_python_pycodestyle_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pycodestyle -' + +Execute(Setting executable to 'poetry' appends 'run pycodestyle'): + let g:ale_python_pycodestyle_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pycodestyle -' + +Execute(Poetry is detected when python_pycodestyle_auto_poetry is set): + let g:ale_python_pycodestyle_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pycodestyle -' diff --git a/dot_vim/plugged/ale/test/linter/test_pydocstyle.vader b/dot_vim/plugged/ale/test/linter/test_pydocstyle.vader new file mode 100644 index 0000000..fc7fbbf --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pydocstyle.vader @@ -0,0 +1,45 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pydocstyle') + call ale#test#SetFilename('example/test.py') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The pydocstyle command callback should return default string): + AssertLinterCwd '%s:h' + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' %s' + +Execute(The pydocstyle command callback should allow options): + let g:ale_python_pydocstyle_options = '--verbose' + + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' --verbose %s' + +Execute(The pydocstyle executable should be configurable): + let g:ale_python_pydocstyle_executable = '~/.local/bin/pydocstyle' + + AssertLinter '~/.local/bin/pydocstyle', + \ ale#Escape('~/.local/bin/pydocstyle') . ' %s' + +Execute(Setting executable to 'pipenv' appends 'run pydocstyle'): + let g:ale_python_pydocstyle_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pydocstyle %s' + +Execute(Pipenv is detected when python_pydocstyle_auto_pipenv is set): + let g:ale_python_pydocstyle_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pydocstyle %s' + +Execute(Setting executable to 'poetry' appends 'run pydocstyle'): + let g:ale_python_pydocstyle_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pydocstyle %s' + +Execute(Poetry is detected when python_pydocstyle_auto_poetry is set): + let g:ale_python_pydocstyle_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', ale#Escape('poetry') . ' run pydocstyle %s' diff --git a/dot_vim/plugged/ale/test/linter/test_pyflakes.vader b/dot_vim/plugged/ale/test/linter/test_pyflakes.vader new file mode 100644 index 0000000..61aee56 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pyflakes.vader @@ -0,0 +1,60 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pyflakes') + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(The pyflakes command callback should return default string): + AssertLinter 'pyflakes', ale#Escape('pyflakes') . ' %t' + +Execute(The pyflakes executable should be configurable): + let g:ale_python_pyflakes_executable = '~/.local/bin/pyflakes' + + AssertLinter '~/.local/bin/pyflakes', + \ ale#Escape('~/.local/bin/pyflakes') . ' %t' + +Execute(The pyflakes executable should be run from the virtualenv path): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pyflakes' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' %t' + +Execute(You should be able to override the pyflakes virtualenv lookup): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let g:ale_python_pyflakes_use_global = 1 + + AssertLinter 'pyflakes', ale#Escape('pyflakes') . ' %t' + +Execute(Setting executable to 'pipenv' appends 'run pyflakes'): + let g:ale_python_pyflakes_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pyflakes %t', + +Execute(Pipenv is detected when python_pyflakes_auto_pipenv is set): + let g:ale_python_pyflakes_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pyflakes %t' + +Execute(Setting executable to 'poetry' appends 'run pyflakes'): + let g:ale_python_pyflakes_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pyflakes %t', + +Execute(Poetry is detected when python_pyflakes_auto_poetry is set): + let g:ale_python_pyflakes_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pyflakes %t' diff --git a/dot_vim/plugged/ale/test/linter/test_pylama.vader b/dot_vim/plugged/ale/test/linter/test_pylama.vader new file mode 100644 index 0000000..3c6a6ef --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pylama.vader @@ -0,0 +1,88 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pylama') + call ale#test#SetFilename('test.py') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + let b:command_tail = ' %s' + +After: + unlet! b:bin_dir + unlet! b:executable + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The default pylama command should be correct): + AssertLinterCwd ale#path#Simplify(g:dir) + AssertLinter 'pylama', ale#Escape('pylama') . b:command_tail + +Execute(The option for disabling changing directories should work): + let g:ale_python_pylama_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'pylama', ale#Escape('pylama') . b:command_tail + +Execute(The pylama executable should be configurable, and escaped properly): + let g:ale_python_pylama_executable = 'executable with spaces' + + AssertLinterCwd ale#path#Simplify(g:dir) + AssertLinter 'executable with spaces', + \ ale#Escape('executable with spaces') . b:command_tail + +Execute(The pylama command callback should let you set options): + let g:ale_python_pylama_options = '--some-option' + + AssertLinterCwd ale#path#Simplify(g:dir) + AssertLinter 'pylama', ale#Escape('pylama') . ' --some-option' . b:command_tail + +Execute(The pylama command callback should switch directories to the detected project root): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'pylama', ale#Escape('pylama') . b:command_tail + +Execute(The pylama command callback shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'pylama', ale#Escape('pylama') . b:command_tail + +Execute(The pylama command callback should detect virtualenv directories and switch to the project root): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pylama' + \) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . b:command_tail + +Execute(You should able able to use the global pylama instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_pylama_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'pylama', ale#Escape('pylama') . b:command_tail + +Execute(Setting executable to 'pipenv' appends 'run pylama'): + let g:ale_python_pylama_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pylama' . b:command_tail + +Execute(Pipenv is detected when python_pylama_auto_pipenv is set): + let g:ale_python_pylama_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pylama' . b:command_tail + +Execute(Setting executable to 'poetry' appends 'run pylama'): + let g:ale_python_pylama_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pylama' . b:command_tail + +Execute(poetry is detected when python_pylama_auto_poetry is set): + let g:ale_python_pylama_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', ale#Escape('poetry') . ' run pylama' . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_pylint.vader b/dot_vim/plugged/ale/test/linter/test_pylint.vader new file mode 100644 index 0000000..d15161e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pylint.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_python_auto_pipenv + + let g:ale_python_auto_pipenv = 0 + + call ale#assert#SetUpLinterTest('python', 'pylint') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + let b:command_tail = ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' + + GivenCommandOutput ['pylint 2.3.0'] + +After: + unlet! b:bin_dir + unlet! b:executable + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The pylint callbacks should return the correct default values): + AssertLinterCwd expand('%:p:h') + AssertLinter 'pylint', ale#Escape('pylint') . b:command_tail + +Execute(Pylint should run with the --from-stdin in new enough versions): + GivenCommandOutput ['pylint 2.4.0'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pylint', ale#Escape('pylint') . b:command_tail[:-3] . '--from-stdin %s' + +Execute(The option for disabling changing directories should work): + let g:ale_python_pylint_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'pylint', ale#Escape('pylint') . b:command_tail + +Execute(The pylint executable should be configurable, and escaped properly): + let g:ale_python_pylint_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . b:command_tail + +Execute(The pylint command callback should let you set options): + let g:ale_python_pylint_options = '--some-option' + + AssertLinter 'pylint', ale#Escape('pylint') . ' --some-option' . b:command_tail + +Execute(The pylint callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'pylint', ale#Escape('pylint') . b:command_tail + +Execute(The pylint callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pylint' + \) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . b:command_tail + +Execute(You should able able to use the global pylint instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_pylint_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'pylint', ale#Escape('pylint') . b:command_tail + +Execute(Setting executable to 'pipenv' appends 'run pylint'): + let g:ale_python_pylint_executable = 'path/to/pipenv' + let g:ale_python_pylint_use_global = 1 + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run pylint' + \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' + +Execute(Pipenv is detected when python_pylint_auto_pipenv is set): + let g:ale_python_pylint_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pylint' + \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' + +Execute(Setting executable to 'poetry' appends 'run pylint'): + let g:ale_python_pylint_executable = 'path/to/poetry' + let g:ale_python_pylint_use_global = 1 + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run pylint' + \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' + +Execute(poetry is detected when python_pylint_auto_poetry is set): + let g:ale_python_pylint_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run pylint' + \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' diff --git a/dot_vim/plugged/ale/test/linter/test_pylsp.vader b/dot_vim/plugged/ale/test/linter/test_pylsp.vader new file mode 100644 index 0000000..34cc30c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pylsp.vader @@ -0,0 +1,78 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pylsp') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The pylsp command callback should return default string): + call ale#test#SetFilename('./foo.py') + + AssertLinter 'pylsp', ale#Escape('pylsp') + +Execute(The pylsp executable should be configurable): + let g:ale_python_pylsp_executable = '~/.local/bin/pylsp' + + AssertLinter '~/.local/bin/pylsp' , ale#Escape('~/.local/bin/pylsp') + +Execute(The pylsp command callback should let you set options): + let g:ale_python_pylsp_options = '--some-option' + + AssertLinter 'pylsp', ale#Escape('pylsp') . ' --some-option' + +Execute(The cwd and project root should be detected correctly): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + AssertLSPProject ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + +Execute(The pylsp executable should be run from the virtualenv path): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pylsp' + \) + + AssertEqual ale#Escape(b:executable), + \ ale_linters#python#pylsp#GetCommand(bufnr('')) + +Execute(You should be able to override the pylsp virtualenv lookup): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let g:ale_python_pylsp_use_global = 1 + + AssertLinter 'pylsp', ale#Escape('pylsp') + +Execute(Setting executable to 'pipenv' appends 'run pylsp'): + let g:ale_python_pylsp_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run pylsp' + +Execute(Pipenv is detected when python_pylsp_auto_pipenv is set): + let g:ale_python_pylsp_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pylsp' + +Execute(Setting executable to 'poetry' appends 'run pylsp'): + let g:ale_python_pylsp_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run pylsp' + +Execute(poetry is detected when python_pylsp_auto_poetry is set): + let g:ale_python_pylsp_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pylsp' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_python_pylsp_config = {'pylsp': {'plugins': {'preload': {'enabled': v:false}}}} + AssertLSPConfig {'pylsp': {'plugins': {'preload': {'enabled': v:false}}}} diff --git a/dot_vim/plugged/ale/test/linter/test_pyre.vader b/dot_vim/plugged/ale/test/linter/test_pyre.vader new file mode 100644 index 0000000..053ef12 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pyre.vader @@ -0,0 +1,69 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pyre') + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(The pyre command callback should return default string): + call ale#test#SetFilename('./foo.py') + + AssertLinter 'pyre', ale#Escape('pyre') . ' persistent' + +Execute(The pyre executable should be configurable): + let g:ale_python_pyre_executable = '~/.local/bin/pyre' + + AssertLinter '~/.local/bin/pyre', + \ ale#Escape('~/.local/bin/pyre') . ' persistent' + +Execute(The pyre executable should be run from the virtualenv path): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pyre' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' persistent' + +Execute(You should be able to override the pyre virtualenv lookup): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let g:ale_python_pyre_use_global = 1 + + AssertLinter 'pyre', ale#Escape('pyre') . ' persistent' + +Execute(Setting executable to 'pipenv' appends 'run pyre'): + let g:ale_python_pyre_executable = 'path/to/pipenv' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pyre persistent' + +Execute(Pipenv is detected when python_pyre_auto_pipenv is set): + let g:ale_python_pyre_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pyre persistent' + +Execute(Setting executable to 'poetry' appends 'run pyre'): + let g:ale_python_pyre_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pyre persistent' + +Execute(Poetry is detected when python_pyre_auto_poetry is set): + let g:ale_python_pyre_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pyre persistent' + +Execute(The FindProjectRoot should detect the project root directory for namespace package via .pyre_configuration.local): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/pyre_configuration_dir/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/pyre_configuration_dir'), + \ ale#python#FindProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/linter/test_pyrex_cython.vader b/dot_vim/plugged/ale/test/linter/test_pyrex_cython.vader new file mode 100644 index 0000000..af86366 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pyrex_cython.vader @@ -0,0 +1,30 @@ +Before: + call ale#assert#SetUpLinterTest('pyrex', 'cython') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default cython command should be correct): + AssertLinter 'cython', ale#Escape('cython') + \ . ' --working %s:h' + \ . ' --include-dir %s:h' + \ . ' --warning-extra' + \ . ' --output-file ' . g:ale#util#nul_file . ' %t' + +Execute(The cython executable should be configurable): + let b:ale_pyrex_cython_executable = 'cython_foobar' + + AssertLinter 'cython_foobar', ale#Escape('cython_foobar') + \ . ' --working %s:h' + \ . ' --include-dir %s:h' + \ . ' --warning-extra' + \ . ' --output-file ' . g:ale#util#nul_file . ' %t' + +Execute(Additional cython options should be configurable): + let b:ale_pyrex_cython_options = '--foobar' + + AssertLinter 'cython', ale#Escape('cython') + \ . ' --working %s:h' + \ . ' --include-dir %s:h' + \ . ' --foobar' + \ . ' --output-file ' . g:ale#util#nul_file . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_pyright.vader b/dot_vim/plugged/ale/test/linter/test_pyright.vader new file mode 100644 index 0000000..14e8c14 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_pyright.vader @@ -0,0 +1,124 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pyright') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The command callback should return the correct default string): + call ale#test#SetFilename('./foo.py') + + AssertLinter + \ 'pyright-langserver', + \ ale#Escape('pyright-langserver') . ' --stdio' + +Execute(The executable should be configurable): + let g:ale_python_pyright_executable = '/bin/foo-bar' + + AssertLinter + \ '/bin/foo-bar', + \ ale#Escape('/bin/foo-bar') . ' --stdio' + +Execute(The default configuration should be mostly empty): + " The default configuration needs to have at least one key in it, + " or the server won't start up properly. + AssertLSPConfig {'python': {}} + + let b:ale_python_pyright_config = {} + + AssertLSPConfig {'python': {}} + +Execute(The cwd and project root should be detected correctly): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + AssertLSPProject ale#test#GetFilename('../test-files/python/with_virtualenv/subdir') + +Execute(virtualenv paths should be set in configuration by default): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + AssertLSPConfig { + \ 'python': { + \ 'pythonPath': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/python'), + \ 'venvPath': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env'), + \ }, + \} + +Execute(The pythonPath should be set based on whatever the override for the venvPath is set to): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " This overrides the default detection of the path. + let b:ale_python_pyright_config = { + \ 'python': { + \ 'venvPath': '/foo/bar', + \ }, + \} + + AssertLSPConfig { + \ 'python': { + \ 'pythonPath': ale#path#Simplify('/foo/bar/' . b:bin_dir . '/python'), + \ 'venvPath': '/foo/bar', + \ }, + \} + +Execute(You should be able to override pythonPath when venvPath is detected): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " This overrides the default detection of the path. + let b:ale_python_pyright_config = { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ }, + \} + + AssertLSPConfig { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ 'venvPath': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env'), + \ }, + \} + +Execute(You should be able to override both pythonPath and venvPath): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + " This overrides the default detection of the path. + let b:ale_python_pyright_config = { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ 'venvPath': '/other/dir', + \ }, + \} + + AssertLSPConfig { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ 'venvPath': '/other/dir', + \ }, + \} + +Execute(You should be able to define other settings): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:ale_python_pyright_config = { + \ 'python': { + \ 'analysis': {'logLevel': 'warning'}, + \ }, + \ 'pyright': { + \ 'disableLanguageServices': v:true, + \ }, + \} + + AssertLSPConfig { + \ 'python': { + \ 'analysis': {'logLevel': 'warning'}, + \ 'pythonPath': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/python'), + \ 'venvPath': ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env'), + \ }, + \ 'pyright': { + \ 'disableLanguageServices': v:true, + \ }, + \} diff --git a/dot_vim/plugged/ale/test/linter/test_qmlfmt.vader b/dot_vim/plugged/ale/test/linter/test_qmlfmt.vader new file mode 100644 index 0000000..53502f4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_qmlfmt.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('qml', 'qmlfmt') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The qml qmlfmt command callback should return the correct default string): + AssertLinter 'qmlfmt', ale#Escape('qmlfmt') . ' -e', + +Execute(The qmlfmt executable should be configurable): + let g:ale_qml_qmlfmt_executable = '~/.local/bin/qmlfmt' + + AssertLinter '~/.local/bin/qmlfmt', ale#Escape('~/.local/bin/qmlfmt') . ' -e' diff --git a/dot_vim/plugged/ale/test/linter/test_r_languageserver.vader b/dot_vim/plugged/ale/test/linter/test_r_languageserver.vader new file mode 100644 index 0000000..1a6fe85 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_r_languageserver.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('r', 'languageserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'Rscript', 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' . ale#Escape('languageserver::run()') + +Execute(The project root should be detected correctly): + AssertLSPProject '.' + + call ale#test#SetFilename('../test-files/r/dummy/test.R') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/r') + +Execute(Should accept configuration settings): + AssertLSPConfig {} + + let b:ale_r_languageserver_config = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} + + AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} diff --git a/dot_vim/plugged/ale/test/linter/test_racket_langserver.vader b/dot_vim/plugged/ale/test/linter/test_racket_langserver.vader new file mode 100644 index 0000000..021eb56 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_racket_langserver.vader @@ -0,0 +1,45 @@ +" Author: D. Ben Knoble +" Description: Tests for racket-langserver lsp linter. +Before: + call ale#assert#SetUpLinterTest('racket', 'langserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(command callback should return default string): + AssertLinter 'racket', ale#Escape('racket').' -l racket-langserver' + +Execute(should set racket-langserver for deep module 3): + call ale#test#SetFilename('../test-files/racket/many-inits/a/b/c/foo.rkt') + AssertLSPLanguage 'racket' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits') + +Execute(should set racket-langserver for deep module 2): + call ale#test#SetFilename('../test-files/racket/many-inits/a/b/foo.rkt') + AssertLSPLanguage 'racket' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits') + +Execute(should set racket-langserver for deep module 1): + call ale#test#SetFilename('../test-files/racket/many-inits/a/foo.rkt') + AssertLSPLanguage 'racket' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits') + +Execute(should set racket-langserver for top-level module): + call ale#test#SetFilename('../test-files/racket/many-inits/foo.rkt') + AssertLSPLanguage 'racket' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits') + +Execute(should set racket-langserver for non-package module or script): + call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt') + AssertLSPLanguage 'racket' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/racket/simple-script') diff --git a/dot_vim/plugged/ale/test/linter/test_racket_raco.vader b/dot_vim/plugged/ale/test/linter/test_racket_raco.vader new file mode 100644 index 0000000..fb83ffa --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_racket_raco.vader @@ -0,0 +1,10 @@ +Before: + call ale#assert#SetUpLinterTest('racket', 'raco') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command and executable should be correct): + AssertLinter 'raco', 'raco expand %s' + + diff --git a/dot_vim/plugged/ale/test/linter/test_rails_best_practices.vader b/dot_vim/plugged/ale/test/linter/test_rails_best_practices.vader new file mode 100644 index 0000000..6a6f7a5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rails_best_practices.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'rails_best_practices') + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/db/test.rb') + + let b:args = '--silent -f json' + \ . ' --output-file ' . (has('win32') ? '%t' : '/dev/stdout') + let b:app_path = ale#path#Simplify(g:dir . '/../test-files/ruby/valid_rails_app') + let b:suffix = has('win32') ? '; type %t' : '' + +After: + unlet! b:args + unlet! b:app_path + unlet! b:suffix + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to rails_best_practices): + AssertLinter 'rails_best_practices', ale#Escape('rails_best_practices') + \ . ' ' . b:args + \ . ' ' . ale#Escape(b:app_path) + \ . b:suffix + +Execute(Should be able to set a custom executable): + let g:ale_ruby_rails_best_practices_executable = 'bin/rails_best_practices' + + AssertLinter 'bin/rails_best_practices', ale#Escape('bin/rails_best_practices') + \ . ' ' . b:args + \ . ' ' . ale#Escape(b:app_path) + \ . b:suffix + +Execute(Setting bundle appends 'exec rails_best_practices'): + let g:ale_ruby_rails_best_practices_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec rails_best_practices' + \ . ' ' . b:args + \ . ' ' . ale#Escape(b:app_path) + \ . b:suffix + +Execute(Command callback should be empty when not in a valid Rails app): + call ale#test#SetFilename('../test-files/ruby/not_a_rails_app/test.rb') + + AssertLinter 'rails_best_practices', '' diff --git a/dot_vim/plugged/ale/test/linter/test_reason_ls.vader b/dot_vim/plugged/ale/test/linter/test_reason_ls.vader new file mode 100644 index 0000000..57ea730 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_reason_ls.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('reason', 'ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The linter should not be run by default): + AssertLinterNotExecuted + +Execute(The executable should be configurable): + let b:ale_reason_ls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(There should be no default project root): + AssertLSPProject '' + +Execute(The project root should be detected using bsconfig.json): + call ale#test#SetFilename('../test-files/reasonml/test.ml') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/reasonml') diff --git a/dot_vim/plugged/ale/test/linter/test_reason_ols.vader b/dot_vim/plugged/ale/test/linter/test_reason_ols.vader new file mode 100644 index 0000000..aab1285 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_reason_ols.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('reason', 'ols') + + Save &filetype + let &filetype = 'reason' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'reason' + +Execute(The default executable should be correct): + AssertLinter 'ocaml-language-server', + \ ale#Escape('ocaml-language-server') . ' --stdio' + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/ols/file.re') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ols') + +Execute(The local executable should be used when available): + call ale#test#SetFilename('../test-files/ols/file.re') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ols/node_modules/.bin/ocaml-language-server')) . ' --stdio' + +Execute(The global executable should always be used when use_global is set): + let g:ale_reason_ols_use_global = 1 + call ale#test#SetFilename('../test-files/ols/file.re') + + AssertLinter 'ocaml-language-server', + \ ale#Escape('ocaml-language-server') . ' --stdio' + +Execute(The executable should be configurable): + let g:ale_reason_ols_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/dot_vim/plugged/ale/test/linter/test_reek.vader b/dot_vim/plugged/ale/test/linter/test_reek.vader new file mode 100644 index 0000000..798c331 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_reek.vader @@ -0,0 +1,49 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'reek') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The reek callbacks should return the correct default values): + GivenCommandOutput ['reek 5.0.0'] + AssertLinter 'reek', [ + \ ale#Escape('reek') . ' --version', + \ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s', + \] + + " Try with older versions. + call ale#semver#ResetVersionCache() + + GivenCommandOutput ['reek 4.8.2'] + AssertLinter 'reek', [ + \ ale#Escape('reek') . ' --version', + \ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion', + \] + +Execute(Setting bundle appends 'exec reek'): + let g:ale_ruby_reek_executable = 'bundle' + + GivenCommandOutput ['reek 5.0.0'] + AssertLinter 'bundle', ale#Escape('bundle') + \ . ' exec reek' + \ . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s', + + " Try with older versions. + call ale#semver#ResetVersionCache() + + GivenCommandOutput ['reek 4.8.2'] + AssertLinter 'bundle', ale#Escape('bundle') + \ . ' exec reek' + \ . ' -f json --no-progress --no-color --force-exclusion' + +Execute(The reek version check should be cached): + GivenCommandOutput ['reek 5.0.0'] + AssertLinter 'reek', [ + \ ale#Escape('reek') . ' --version', + \ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s', + \] + + GivenCommandOutput [] + AssertLinter 'reek', [ + \ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s', + \] diff --git a/dot_vim/plugged/ale/test/linter/test_refurb.vader b/dot_vim/plugged/ale/test/linter/test_refurb.vader new file mode 100644 index 0000000..a1f066e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_refurb.vader @@ -0,0 +1,85 @@ +Before: + Save g:ale_python_auto_pipenv + Save g:ale_python_auto_poetry + + let g:ale_python_auto_pipenv = 0 + let g:ale_python_auto_poetry = 0 + + call ale#assert#SetUpLinterTest('python', 'refurb') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The refurb callbacks should return the correct default values): + AssertLinterCwd expand('%:p:h') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The option for disabling changing directories should work): + let g:ale_python_refurb_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The refurb executable should be configurable, and escaped properly): + let g:ale_python_refurb_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . ' %s' + +Execute(The refurb command callback should let you set options): + let g:ale_python_refurb_options = '--some-flag' + AssertLinter 'refurb', ale#Escape('refurb') . ' --some-flag %s' + + let g:ale_python_refurb_options = '--some-option value' + AssertLinter 'refurb', ale#Escape('refurb') . ' --some-option value %s' + +Execute(The refurb callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(The refurb callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/refurb' + \) + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . ' %s' + +Execute(You should able able to use the global refurb instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_refurb_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'refurb', ale#Escape('refurb') . ' %s' + +Execute(Setting executable to 'pipenv' appends 'run refurb'): + let g:ale_python_refurb_executable = 'path/to/pipenv' + let g:ale_python_refurb_use_global = 1 + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run refurb %s' + +Execute(Pipenv is detected when python_refurb_auto_pipenv is set): + let g:ale_python_refurb_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run refurb %s' + +Execute(Setting executable to 'poetry' appends 'run refurb'): + let g:ale_python_refurb_executable = 'path/to/poetry' + let g:ale_python_refurb_use_global = 1 + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run refurb %s' + +Execute(poetry is detected when python_refurb_auto_poetry is set): + let g:ale_python_refurb_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run refurb %s' diff --git a/dot_vim/plugged/ale/test/linter/test_rego_opacheck.vader b/dot_vim/plugged/ale/test/linter/test_rego_opacheck.vader new file mode 100644 index 0000000..3b67228 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rego_opacheck.vader @@ -0,0 +1,16 @@ + +" Based upon :help ale-development +Before: + call ale#assert#SetUpLinterTest('rego', 'opacheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'opa', + \ ale#Escape('opa') . ' check %s --format json ' + +Execute(The default command should be overridden): + let b:ale_rego_opacheck_executable = '/bin/other/opa' + AssertLinter '/bin/other/opa', + \ ale#Escape('/bin/other/opa') . ' check %s --format json ' diff --git a/dot_vim/plugged/ale/test/linter/test_remark_lint.vader b/dot_vim/plugged/ale/test/linter/test_remark_lint.vader new file mode 100644 index 0000000..7f69008 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_remark_lint.vader @@ -0,0 +1,37 @@ +Before: + " This is just one language for the linter. + call ale#assert#SetUpLinterTest('markdown', 'remark_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'remark', + \ ale#Escape('remark') . ' --no-stdout --no-color' + +Execute(The executable should be configurable): + let b:ale_markdown_remark_lint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --no-stdout --no-color' + +Execute(The options should be configurable): + let b:ale_markdown_remark_lint_options = '--something' + + AssertLinter 'remark', + \ ale#Escape('remark') . ' --something --no-stdout --no-color' + +Execute(The local executable from .bin should be used if available): + call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark')) + \ . ' --no-stdout --no-color' + +Execute(The global executable should be used if the option is set): + let b:ale_markdown_remark_lint_use_global = 1 + call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md') + + AssertLinter 'remark', ale#Escape('remark') + \ . ' --no-stdout --no-color' diff --git a/dot_vim/plugged/ale/test/linter/test_revive.vader b/dot_vim/plugged/ale/test/linter/test_revive.vader new file mode 100644 index 0000000..172294f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_revive.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_go_go111module + + call ale#assert#SetUpLinterTest('go', 'revive') + +After: + Restore + + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The default revive command should be correct): + AssertLinter 'revive', ale#Escape('revive') . ' %t' + +Execute(The revive executable should be configurable): + let b:ale_go_revive_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' + +Execute(The revive options should be configurable): + let b:ale_go_revive_options = '--foo' + + AssertLinter 'revive', ale#Escape('revive') . ' --foo %t' + +Execute(The revive command should support Go environment variables): + let b:ale_go_go111module = 'on' + + AssertLinter 'revive', + \ ale#Env('GO111MODULE', 'on') . ale#Escape('revive') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_rflint.vader b/dot_vim/plugged/ale/test/linter/test_rflint.vader new file mode 100644 index 0000000..0ee97b3 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rflint.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('robot', 'rflint') + let b:rflint_format = ' --format' + \ . ' "{filename}:{severity}:{linenumber}:{char}:{rulename}:{message}" %s' + +After: + call ale#assert#TearDownLinterTest() + unlet! b:rflint_format + +Execute(The rflint command callback should return default string): + AssertLinter 'rflint', + \ 'rflint' + \ . b:rflint_format + +Execute(The rflint executable should be configurable): + let g:ale_robot_rflint_executable = '~/.local/bin/rflint' + + AssertLinter '~/.local/bin/rflint', + \ '~/.local/bin/rflint' + \ . b:rflint_format diff --git a/dot_vim/plugged/ale/test/linter/test_rnix.vader b/dot_vim/plugged/ale/test/linter/test_rnix.vader new file mode 100644 index 0000000..8970ee9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rnix.vader @@ -0,0 +1,12 @@ +" Author: jD91mZM2 +" Description: Tests for rnix-lsp language client +Before: + call ale#assert#SetUpLinterTest('nix', 'rnix_lsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should start rnix-lsp): + AssertLSPLanguage 'nix' + AssertLSPOptions {} + AssertLSPProject ale#path#Simplify('.') diff --git a/dot_vim/plugged/ale/test/linter/test_rst_textlint.vader b/dot_vim/plugged/ale/test/linter/test_rst_textlint.vader new file mode 100644 index 0000000..b2d9963 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rst_textlint.vader @@ -0,0 +1,65 @@ +" Author: januswel, w0rp + +Before: + " This is just one language for the linter. + call ale#assert#SetUpLinterTest('rst', 'textlint') + + " The configuration is shared between many languages. + Save g:ale_textlint_executable + Save g:ale_textlint_use_global + Save g:ale_textlint_options + + let g:ale_textlint_executable = 'textlint' + let g:ale_textlint_use_global = 0 + let g:ale_textlint_options = '' + + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + +After: + unlet! b:command_tail + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s' + +Execute(The executable should be configurable): + let b:ale_textlint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -f json --stdin --stdin-filename %s' + +Execute(The options should be configurable): + let b:ale_textlint_options = '--something' + + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' --something -f json --stdin --stdin-filename %s' + +Execute(The local executable from .bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint')) + \ . ' -f json --stdin --stdin-filename %s' + +Execute(The local executable from textlint/bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt') + + if has('win32') + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + else + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + endif diff --git a/dot_vim/plugged/ale/test/linter/test_rubocop.vader b/dot_vim/plugged/ale/test/linter/test_rubocop.vader new file mode 100644 index 0000000..e7cc32e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rubocop.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'rubocop') + call ale#test#SetFilename('dummy.rb') + + let g:ale_ruby_rubocop_executable = 'rubocop' + let g:ale_ruby_rubocop_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to rubocop): + AssertLinter 'rubocop', ale#Escape('rubocop') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Should be able to set a custom executable): + let g:ale_ruby_rubocop_executable = 'bin/rubocop' + + AssertLinter 'bin/rubocop' , ale#Escape('bin/rubocop') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Setting bundle appends 'exec rubocop'): + let g:ale_ruby_rubocop_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec rubocop' + \ . ' --format json --force-exclusion --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_ruby.vader b/dot_vim/plugged/ale/test/linter/test_ruby.vader new file mode 100644 index 0000000..d957079 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ruby.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'ruby') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'ruby', ale#Escape('ruby') . ' -w -c %t' + +Execute(The executable should be configurable): + let g:ale_ruby_ruby_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -w -c %t' diff --git a/dot_vim/plugged/ale/test/linter/test_ruby_debride.vader b/dot_vim/plugged/ale/test/linter/test_ruby_debride.vader new file mode 100644 index 0000000..f762843 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ruby_debride.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'debride') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'debride', ale#Escape('debride') . ' %s' diff --git a/dot_vim/plugged/ale/test/linter/test_ruby_solargraph.vader b/dot_vim/plugged/ale/test/linter/test_ruby_solargraph.vader new file mode 100644 index 0000000..1ae67f5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ruby_solargraph.vader @@ -0,0 +1,43 @@ +" Author: Horacio Sanson +" Description: Tests for solargraph lsp linter. +Before: + call ale#assert#SetUpLinterTest('ruby', 'solargraph') + +After: + call ale#assert#TearDownLinterTest() + +Execute(command callback should return default string): + AssertLinter 'solargraph', ale#Escape('solargraph') . ' stdio' + +Execute(command callback executable can be overridden): + let g:ale_ruby_solargraph_executable = 'foobar' + AssertLinter 'foobar', ale#Escape('foobar') . ' stdio' + +Execute(should set solargraph for rails app): + call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb') + AssertLSPLanguage 'ruby' + AssertLSPOptions {} + AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_rails_app') + +Execute(should set solargraph for ruby app1): + call ale#test#SetFilename('../test-files/ruby/valid_ruby_app1/lib/file.rb') + AssertLSPLanguage 'ruby' + AssertLSPOptions {} + AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app1') + +Execute(should set solargraph for ruby app2): + call ale#test#SetFilename('../test-files/ruby/valid_ruby_app2/lib/file.rb') + AssertLSPLanguage 'ruby' + AssertLSPOptions {} + AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app2') + +Execute(should set solargraph for ruby app3): + call ale#test#SetFilename('../test-files/ruby/valid_ruby_app3/lib/file.rb') + AssertLSPLanguage 'ruby' + AssertLSPOptions {} + AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app3') + +Execute(should accept initialization options): + AssertLSPOptions {} + let b:ale_ruby_solargraph_options = { 'diagnostics': 'true' } + AssertLSPOptions { 'diagnostics': 'true' } diff --git a/dot_vim/plugged/ale/test/linter/test_ruff.vader b/dot_vim/plugged/ale/test/linter/test_ruff.vader new file mode 100644 index 0000000..818253d --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ruff.vader @@ -0,0 +1,105 @@ +Before: + Save g:ale_python_auto_pipenv + + let g:ale_python_auto_pipenv = 0 + + call ale#assert#SetUpLinterTest('python', 'ruff') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + let b:command_tail = ' --format text -' + + GivenCommandOutput ['ruff 0.0.83'] + +After: + unlet! b:bin_dir + unlet! b:executable + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The ruff callbacks should return the correct default values): + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(ruff should run with the file path of buffer in old versions): + " version `0.0.69` supports liniting input from stdin + GivenCommandOutput ['ruff 0.0.68'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . ' %s' + +Execute(ruff should run with the stdin in new enough versions): + GivenCommandOutput ['ruff 0.0.83'] + + AssertLinterCwd expand('%:p:h') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . ' -' + " AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail[:-3] . '--format text -' + +Execute(The option for disabling changing directories should work): + let g:ale_python_ruff_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(The ruff executable should be configurable, and escaped properly): + let g:ale_python_ruff_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . b:command_tail + +Execute(The ruff command callback should let you set options): + let g:ale_python_ruff_options = '--some-flag' + AssertLinter 'ruff', ale#Escape('ruff') . ' --some-flag' . b:command_tail + + let g:ale_python_ruff_options = '--some-option value' + AssertLinter 'ruff', ale#Escape('ruff') . ' --some-option value' . b:command_tail + +Execute(The ruff callbacks shouldn't detect virtualenv directories where they don't exist): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(The ruff callbacks should detect virtualenv directories): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/ruff' + \) + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . b:command_tail + +Execute(You should able able to use the global ruff instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_ruff_use_global = 1 + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter 'ruff', ale#Escape('ruff') . b:command_tail + +Execute(Setting executable to 'pipenv' appends 'run ruff'): + let g:ale_python_ruff_executable = 'path/to/pipenv' + let g:ale_python_ruff_use_global = 1 + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run ruff' + \ . ' --format text -' + +Execute(Pipenv is detected when python_ruff_auto_pipenv is set): + let g:ale_python_ruff_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run ruff' + \ . ' --format text -' + +Execute(Setting executable to 'poetry' appends 'run ruff'): + let g:ale_python_ruff_executable = 'path/to/poetry' + let g:ale_python_ruff_use_global = 1 + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run ruff' + \ . ' --format text -' + +Execute(poetry is detected when python_ruff_auto_poetry is set): + let g:ale_python_ruff_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd expand('%:p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run ruff' + \ . ' --format text -' diff --git a/dot_vim/plugged/ale/test/linter/test_rust_analyzer.vader b/dot_vim/plugged/ale/test/linter/test_rust_analyzer.vader new file mode 100644 index 0000000..1dd2c78 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rust_analyzer.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpLinterTest('rust', 'analyzer') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'rust-analyzer', ale#Escape('rust-analyzer') + +Execute(The project root should be detected correctly in cargo projects): + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo') + +Execute(The project root should be detected correctly in non-cargo projects): + call ale#test#SetFilename('../test-files/rust/rust-project/testfile.rs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/rust-project') + +Execute(The project root should be empty when no project files can be detected): + call ale#test#SetFilename('../test-files/dummy') + + AssertLSPProject '' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_rust_analyzer_config = {'diagnostics': {'disabled': ['unresolved-import']}} + AssertLSPOptions {'diagnostics': {'disabled': ['unresolved-import']}} diff --git a/dot_vim/plugged/ale/test/linter/test_rust_rls.vader b/dot_vim/plugged/ale/test/linter/test_rust_rls.vader new file mode 100644 index 0000000..d481e85 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rust_rls.vader @@ -0,0 +1,33 @@ +Before: + call ale#assert#SetUpLinterTest('rust', 'rls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'rls', ale#Escape('rls') + +Execute(The toolchain should be configurable): + let g:ale_rust_rls_toolchain = 'stable' + + AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable') + +Execute(The toolchain should be omitted if not given): + let g:ale_rust_rls_toolchain = '' + + AssertLinter 'rls', ale#Escape('rls') + +Execute(The project root should be detected correctly for cargo projects): + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo') + +Execute(The project root should be empty when no project files can be detected): + call ale#test#SetFilename('../test-files/dummy') + + AssertLSPProject '' + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_rust_rls_config = {'rust': {'clippy_preference': 'on'}} + AssertLSPConfig {'rust': {'clippy_preference': 'on'}} diff --git a/dot_vim/plugged/ale/test/linter/test_rustc.vader b/dot_vim/plugged/ale/test/linter/test_rustc.vader new file mode 100644 index 0000000..92d9fa1 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_rustc.vader @@ -0,0 +1,25 @@ +Before: + call ale#assert#SetUpLinterTest('rust', 'rustc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'rustc', 'rustc --error-format=json --emit=mir -o /dev/null -' + +Execute(The options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + + let b:ale_rust_rustc_options = '--foo' + + AssertLinter 'rustc', 'rustc --error-format=json --foo -' + +Execute(Some default paths should be included when the project is a Cargo project): + call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs') + + AssertLinter 'rustc', 'rustc --error-format=json --emit=mir -o /dev/null' + \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/rust/cargo/target/debug/deps')) + \ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, '../test-files/rust/cargo/target/release/deps')) + \ . ' -' diff --git a/dot_vim/plugged/ale/test/linter/test_ruumba.vader b/dot_vim/plugged/ale/test/linter/test_ruumba.vader new file mode 100644 index 0000000..9fa4890 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_ruumba.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('eruby', 'ruumba') + call ale#test#SetFilename('dummy.html.erb') + + let g:ale_eruby_ruumba_executable = 'ruumba' + let g:ale_eruby_ruumba_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to ruumba): + AssertLinter 'ruumba', ale#Escape('ruumba') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Should be able to set a custom executable): + let g:ale_eruby_ruumba_executable = 'bin/ruumba' + + AssertLinter 'bin/ruumba' , ale#Escape('bin/ruumba') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Setting bundle appends 'exec ruumba'): + let g:ale_eruby_ruumba_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec ruumba' + \ . ' --format json --force-exclusion --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_sass_sasslint.vader b/dot_vim/plugged/ale/test/linter/test_sass_sasslint.vader new file mode 100644 index 0000000..87f0c8a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_sass_sasslint.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('sass', 'sasslint') + call ale#test#SetFilename('test.sass') + unlet! b:executable + +After: + call ale#assert#TearDownLinterTest() + +Execute(should default to source, bin/sass-lint.js): + call ale#test#SetFilename('../test-files/sasslint/with-source/test.sass') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/sasslint/with-source/node_modules/sass-lint/bin/sass-lint.js' + \) + + AssertLinter b:executable, + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(b:executable) + \ . ' -v -q -f compact %t' + +Execute(should fallback to bin, .bin/sass-lint): + call ale#test#SetFilename('../test-files/sasslint/with-bin/test.sass') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/sasslint/with-bin/node_modules/.bin/sass-lint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' -v -q -f compact %t' + +Execute(should fallback to global bin): + AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' -v -q -f compact %t' + +Execute(The global executable should be configurable): + let b:ale_sass_sasslint_executable = 'foo' + + AssertLinter 'foo', ale#Escape('foo') . ' -v -q -f compact %t' + +Execute(The options should be configurable): + let b:ale_sass_sasslint_options = '--bar' + + AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' --bar -v -q -f compact %t' diff --git a/dot_vim/plugged/ale/test/linter/test_scala_metals.vader b/dot_vim/plugged/ale/test/linter/test_scala_metals.vader new file mode 100644 index 0000000..b14e3e0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scala_metals.vader @@ -0,0 +1,21 @@ +" Author: Jeffrey Lau https://github.com/zoonfafer +" Description: Tests for the Scala Metals linter +Before: + call ale#assert#SetUpLinterTest('scala', 'metals') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set metals for sbt project with build.sbt): + call ale#test#SetFilename('../test-files/scala/valid_sbt_project/Main.scala') + AssertLSPLanguage 'scala' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/scala/valid_sbt_project') + +Execute(should not set metals for sbt project without build.sbt): + call ale#test#SetFilename('../test-files/scala/invalid_sbt_project/Main.scala') + AssertLSPLanguage 'scala' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject '' diff --git a/dot_vim/plugged/ale/test/linter/test_scala_sbtserver.vader b/dot_vim/plugged/ale/test/linter/test_scala_sbtserver.vader new file mode 100644 index 0000000..118e090 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scala_sbtserver.vader @@ -0,0 +1,23 @@ +" Author: ophirr33 +" Description: Tests for the sbt Server lsp linter +Before: + call ale#assert#SetUpLinterTest('scala', 'sbtserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set sbtserver for sbt project with build.sbt): + call ale#test#SetFilename('../test-files/scala/valid_sbt_project/Main.scala') + AssertLSPLanguage 'scala' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#test#GetFilename('../test-files/scala/valid_sbt_project') + AssertLSPAddress '127.0.0.1:4273' + +Execute(should not set sbtserver for sbt project without build.sbt): + call ale#test#SetFilename('../test-files/scala/invalid_sbt_project/Main.scala') + AssertLSPLanguage 'scala' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject '' + AssertLSPAddress '127.0.0.1:4273' diff --git a/dot_vim/plugged/ale/test/linter/test_scalac.vader b/dot_vim/plugged/ale/test/linter/test_scalac.vader new file mode 100644 index 0000000..ea5ae10 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scalac.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('scala', 'scalac') + +After: + call ale#assert#TearDownLinterTest() + +Given scala(An empty Scala file): +Execute(The default executable and command should be correct): + AssertLinter 'scalac', ale#Escape('scalac') . ' -Ystop-after:parser %t' + +Given scala.sbt(An empty SBT file): +Execute(scalac should not be run for sbt files): + AssertLinterNotExecuted diff --git a/dot_vim/plugged/ale/test/linter/test_scalastyle.vader b/dot_vim/plugged/ale/test/linter/test_scalastyle.vader new file mode 100644 index 0000000..3c28f7a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scalastyle.vader @@ -0,0 +1,34 @@ +Before: + call ale#assert#SetUpLinterTest('scala', 'scalastyle') + +After: + unlet! g:ale_scalastyle_config_loc + call ale#linter#Reset() + +Execute(Should return the correct default command): + AssertLinter 'scalastyle', 'scalastyle %t' + +Execute(Should allow using a custom config file): + let b:ale_scala_scalastyle_config = '/dooper/config.xml' + + AssertLinter 'scalastyle', 'scalastyle' + \ . ' --config ' . ale#Escape('/dooper/config.xml') + \ . ' %t' + +Execute(Should support a legacy option for the scalastyle config): + unlet! g:ale_scala_scalastyle_config + let g:ale_scalastyle_config_loc = '/dooper/config.xml' + + call ale#linter#Reset() + runtime ale_linters/scala/scalastyle.vim + + AssertLinter 'scalastyle', 'scalastyle' + \ . ' --config ' . ale#Escape('/dooper/config.xml') + \ . ' %t' + +Execute(Should allow using custom options): + let b:ale_scala_scalastyle_options = '--warnings false --quiet true' + + AssertLinter 'scalastyle', 'scalastyle' + \ . ' --warnings false --quiet true' + \ . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_scss_sasslint.vader b/dot_vim/plugged/ale/test/linter/test_scss_sasslint.vader new file mode 100644 index 0000000..839761c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scss_sasslint.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('scss', 'sasslint') + call ale#test#SetFilename('test.scss') + unlet! b:executable + +After: + call ale#assert#TearDownLinterTest() + +Execute(should default to source, bin/sass-lint.js): + call ale#test#SetFilename('../test-files/sasslint/with-source/test.scss') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/sasslint/with-source/node_modules/sass-lint/bin/sass-lint.js' + \) + + AssertLinter b:executable, + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(b:executable) + \ . ' -v -q -f compact %t' + +Execute(should fallback to bin, .bin/sass-lint): + call ale#test#SetFilename('../test-files/sasslint/with-bin/test.scss') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/sasslint/with-bin/node_modules/.bin/sass-lint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' -v -q -f compact %t' + +Execute(should fallback to global bin): + AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' -v -q -f compact %t' + +Execute(The global executable should be configurable): + let b:ale_scss_sasslint_executable = 'foo' + + AssertLinter 'foo', ale#Escape('foo') . ' -v -q -f compact %t' + +Execute(The options should be configurable): + let b:ale_scss_sasslint_options = '--bar' + + AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' --bar -v -q -f compact %t' diff --git a/dot_vim/plugged/ale/test/linter/test_scss_stylelint.vader b/dot_vim/plugged/ale/test/linter/test_scss_stylelint.vader new file mode 100644 index 0000000..bf45ccd --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_scss_stylelint.vader @@ -0,0 +1,33 @@ +Before: + call ale#assert#SetUpLinterTest('scss', 'stylelint') + unlet! b:executable + +After: + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(node_modules directories should be discovered): + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.scss') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/stylelint/node_modules/.bin/stylelint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --stdin-filename %s' + +Execute(The global override should work): + let b:ale_scss_stylelint_executable = 'foobar' + let b:ale_scss_stylelint_use_global = 1 + + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.scss') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin-filename %s' + +Execute(Extra options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + + let b:ale_scss_stylelint_options = '--configFile ''/absolute/path/to/file''' + + AssertLinter 'stylelint', + \ ale#Escape('stylelint') . ' --configFile ''/absolute/path/to/file'' --stdin-filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_shellcheck.vader b/dot_vim/plugged/ale/test/linter/test_shellcheck.vader new file mode 100644 index 0000000..4099575 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_shellcheck.vader @@ -0,0 +1,106 @@ +Before: + call ale#assert#SetUpLinterTest('sh', 'shellcheck') + call ale#test#SetFilename('test.sh') + + let b:suffix = ' -f gcc -' + +After: + unlet! b:is_bash + unlet! b:suffix + call ale#assert#TearDownLinterTest() + +Execute(The default shellcheck command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'shellcheck', ale#Escape('shellcheck') . b:suffix + +Execute(The option disabling changing directories should work): + let g:ale_sh_shellcheck_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'shellcheck', ale#Escape('shellcheck') . b:suffix + +Execute(The shellcheck command should accept options): + let b:ale_sh_shellcheck_options = '--foobar' + + AssertLinter 'shellcheck', ale#Escape('shellcheck') . ' --foobar' . b:suffix + +Execute(The shellcheck command should accept options and exclusions): + let b:ale_sh_shellcheck_options = '--foobar' + let b:ale_sh_shellcheck_exclusions = 'foo,bar' + + AssertLinter 'shellcheck', + \ ale#Escape('shellcheck') . ' --foobar -e foo,bar' . b:suffix + +Execute(The shellcheck command should include the dialect): + let b:is_bash = 1 + + AssertLinter 'shellcheck', ale#Escape('shellcheck') . ' -s bash' . b:suffix + +Execute(The shellcheck command should use ale_sh_shellcheck_dialect): + let b:ale_sh_shellcheck_dialect = 'ksh93' + + AssertLinter 'shellcheck', ale#Escape('shellcheck') . ' -s ksh93' . b:suffix + +Execute(The shellcheck command should allow unspecified dialect): + let b:ale_sh_shellcheck_dialect = '' + + AssertLinter 'shellcheck', ale#Escape('shellcheck') . b:suffix + +Execute(The shellcheck command should include the dialect before options and exclusions): + let b:is_bash = 1 + let b:ale_sh_shellcheck_options = '--foobar' + let b:ale_sh_shellcheck_exclusions = 'foo,bar' + + AssertLinter 'shellcheck', ale#Escape('shellcheck') + \ . ' -s bash --foobar -e foo,bar' + \ . b:suffix + +Execute(The -x option should be added when the version is new enough): + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . ' --version', + \ ale#Escape('shellcheck') . b:suffix, + \] + + GivenCommandOutput [ + \ 'ShellCheck - shell script analysis tool', + \ 'version: 0.4.4', + \ 'license: GNU General Public License, version 3', + \ 'website: http://www.shellcheck.net', + \] + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . ' --version', + \ ale#Escape('shellcheck') . ' -x' . b:suffix, + \] + + " We should cache the version check + GivenCommandOutput [] + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . ' -x' . b:suffix, + \] + +Execute(The -x option should not be added when the version is too old): + GivenCommandOutput [ + \ 'ShellCheck - shell script analysis tool', + \ 'version: 0.3.9', + \ 'license: GNU General Public License, version 3', + \ 'website: http://www.shellcheck.net', + \] + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . ' --version', + \ ale#Escape('shellcheck') . b:suffix, + \] + +Execute(The version check shouldn't be run again for old versions): + GivenCommandOutput [ + \ 'ShellCheck - shell script analysis tool', + \ 'version: 0.3.9', + \ 'license: GNU General Public License, version 3', + \ 'website: http://www.shellcheck.net', + \] + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . ' --version', + \ ale#Escape('shellcheck') . b:suffix, + \] + AssertLinter 'shellcheck', [ + \ ale#Escape('shellcheck') . b:suffix, + \] diff --git a/dot_vim/plugged/ale/test/linter/test_slimlint.vader b/dot_vim/plugged/ale/test/linter/test_slimlint.vader new file mode 100644 index 0000000..33df9ac --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_slimlint.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('slim', 'slimlint') + let g:default_command = 'slim-lint %t' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'slim-lint', 'slim-lint %t' + +Execute(The command should have the .rubocop.yml prepended as an env var if one exists): + call ale#test#SetFilename('../test-files/slimlint/subdir/file.slim') + + AssertLinter 'slim-lint', + \ ale#Env( + \ 'SLIM_LINT_RUBOCOP_CONF', + \ ale#path#Simplify(g:dir . '/../test-files/slimlint/.rubocop.yml') + \ ) + \ . 'slim-lint %t' diff --git a/dot_vim/plugged/ale/test/linter/test_solc.vader b/dot_vim/plugged/ale/test/linter/test_solc.vader new file mode 100644 index 0000000..23521f6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_solc.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('solidity', 'solc') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'solc', 'solc %s' + +Execute(The options should be configurable): + let g:ale_solidity_solc_options = '--foobar' + + AssertLinter 'solc', 'solc --foobar %s' diff --git a/dot_vim/plugged/ale/test/linter/test_solc_commit.vader b/dot_vim/plugged/ale/test/linter/test_solc_commit.vader new file mode 100644 index 0000000..e25c47e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_solc_commit.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('solidity', 'solc') + let g:ale_solidity_solc_executable = 'solc-v0.8.4+commit.c7e474f2' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable command should be configurable): + AssertLinter 'solc-v0.8.4+commit.c7e474f2', 'solc-v0.8.4+commit.c7e474f2 %s' + +Execute(The options should be configurable): + let g:ale_solidity_solc_options = '--foobar' + + AssertLinter 'solc-v0.8.4+commit.c7e474f2', 'solc-v0.8.4+commit.c7e474f2 --foobar %s' diff --git a/dot_vim/plugged/ale/test/linter/test_solhint.vader b/dot_vim/plugged/ale/test/linter/test_solhint.vader new file mode 100644 index 0000000..fc5afa9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_solhint.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpLinterTest('solidity', 'solhint') + runtime autoload/ale/handlers/solhint.vim + + let b:args = ' --formatter compact %s' + +After: + unlet! b:args + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinterCwd '' + AssertLinter 'solhint', ale#Escape('solhint') . b:args + +Execute(The options should be configurable): + let g:ale_solidity_solhint_options = '--foobar' + + AssertLinter 'solhint', ale#Escape('solhint') . ' --foobar' . b:args + + +Execute(solhint should be run from a containing project with solhint executable): + call ale#test#SetFilename('../test-files/solhint/Contract.sol') + + let b:executable = ale#path#Simplify(g:dir . '/../test-files/solhint/node_modules/.bin/solhint') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/solhint') + AssertLinter b:executable, ale#Escape(b:executable) . b:args diff --git a/dot_vim/plugged/ale/test/linter/test_sorbet.vader b/dot_vim/plugged/ale/test/linter/test_sorbet.vader new file mode 100644 index 0000000..fe75863 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_sorbet.vader @@ -0,0 +1,34 @@ + +Before: + call ale#assert#SetUpLinterTest('ruby', 'sorbet') + call ale#test#SetFilename('dummy.rb') + + let g:ale_ruby_sorbet_executable = 'srb' + let g:ale_ruby_sorbet_options = '' + let g:ale_ruby_sorbet_enable_watchman = 0 + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to srb): + AssertLinter 'srb', ale#Escape('srb') + \ . ' tc --lsp --disable-watchman' + +Execute(Able to enable watchman): + let g:ale_ruby_sorbet_enable_watchman = 1 + + AssertLinter 'srb', ale#Escape('srb') + \ . ' tc --lsp' + +Execute(Should be able to set a custom executable): + let g:ale_ruby_sorbet_executable = 'bin/srb' + + AssertLinter 'bin/srb' , ale#Escape('bin/srb') + \ . ' tc --lsp --disable-watchman' + +Execute(Setting bundle appends 'exec srb tc'): + let g:ale_ruby_sorbet_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec srb' + \ . ' tc --lsp --disable-watchman' diff --git a/dot_vim/plugged/ale/test/linter/test_spectral.vader b/dot_vim/plugged/ale/test/linter/test_spectral.vader new file mode 100644 index 0000000..cfcf098 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_spectral.vader @@ -0,0 +1,31 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'spectral') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The yaml spectral command callback should return the correct default string): + AssertLinter 'spectral', ale#Escape('spectral') . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should be configurable): + let g:ale_yaml_spectral_executable = '~/.local/bin/spectral' + + AssertLinter '~/.local/bin/spectral', + \ ale#Escape('~/.local/bin/spectral') + \ . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should allow a global installation to be used): + let g:ale_yaml_spectral_executable = '/usr/local/bin/spectral' + let g:ale_yaml_spectral_use_global = 1 + + AssertLinter '/usr/local/bin/spectral', + \ ale#Escape('/usr/local/bin/spectral') + \ . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should allow a local installation to be used): + call ale#test#SetFilename('../test-files/spectral/openapi.yaml') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/spectral/node_modules/.bin/spectral'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/spectral/node_modules/.bin/spectral')) + \ . ' lint --ignore-unknown-format -q -f text %t' diff --git a/dot_vim/plugged/ale/test/linter/test_sql_sqlfluff.vader b/dot_vim/plugged/ale/test/linter/test_sql_sqlfluff.vader new file mode 100644 index 0000000..9b47401 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_sql_sqlfluff.vader @@ -0,0 +1,25 @@ +Before: + call ale#assert#SetUpLinterTest('sql', 'sqlfluff') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'sqlfluff', + \ ale#Escape('sqlfluff') + \ . ' lint --dialect ansi --format json %t' + +Execute(The executable should be configurable): + let g:ale_sql_sqlfluff_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' lint --dialect ansi --format json %t' + +Execute(Overriding options should work): + let g:ale_sql_sqlfluff_executable = 'foobar' + let g:ale_sql_sqlfluff_options = '--whatever' + + AssertLinter 'foobar', + \ ale#Escape('foobar') + \ . ' lint --dialect ansi --format json --whatever %t' diff --git a/dot_vim/plugged/ale/test/linter/test_sqllint.vader b/dot_vim/plugged/ale/test/linter/test_sqllint.vader new file mode 100644 index 0000000..eea9b4e --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_sqllint.vader @@ -0,0 +1,12 @@ +Before: + " Load the linter and set up a series of commands, reset linter variables, + " clear caches, etc. + " + " Vader's 'Save' command will be called here for linter variables. + call ale#assert#SetUpLinterTest('sql', 'sqllint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'sql-lint', ['sql-lint'] diff --git a/dot_vim/plugged/ale/test/linter/test_standard.vader b/dot_vim/plugged/ale/test/linter/test_standard.vader new file mode 100644 index 0000000..4722cd4 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_standard.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'standard') + call ale#test#SetFilename('testfile.js') + unlet! b:executable + +After: + call ale#assert#TearDownLinterTest() + +Execute(bin/cmd.js paths should be preferred): + call ale#test#SetFilename('../test-files/standard/with-cmd/testfile.js') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/standard/with-cmd/node_modules/standard/bin/cmd.js' + \) + + AssertLinter b:executable, + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(b:executable) + \ . ' --stdin %s' + +Execute(.bin directories should be used too): + call ale#test#SetFilename('../test-files/standard/with-bin/testfile.js') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/standard/with-bin/node_modules/.bin/standard' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --stdin %s' + +Execute(The global executable should be used otherwise): + AssertLinter 'standard', ale#Escape('standard') . ' --stdin %s' + +Execute(The global executable should be configurable): + let b:ale_javascript_standard_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin %s' + +Execute(The options should be configurable): + let b:ale_javascript_standard_options = '--wat' + + AssertLinter 'standard', ale#Escape('standard') . ' --wat --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_standardrb.vader b/dot_vim/plugged/ale/test/linter/test_standardrb.vader new file mode 100644 index 0000000..108dd87 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_standardrb.vader @@ -0,0 +1,26 @@ +Before: + call ale#assert#SetUpLinterTest('ruby', 'standardrb') + call ale#test#SetFilename('dummy.rb') + + let g:ale_ruby_standardrb_executable = 'standardrb' + let g:ale_ruby_standardrb_options = '' + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to standardrb): + AssertLinter 'standardrb', ale#Escape('standardrb') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Should be able to set a custom executable): + let g:ale_ruby_standardrb_executable = 'bin/standardrb' + + AssertLinter 'bin/standardrb' , ale#Escape('bin/standardrb') + \ . ' --format json --force-exclusion --stdin %s' + +Execute(Setting bundle appends 'exec standardrb'): + let g:ale_ruby_standardrb_executable = 'path to/bundle' + + AssertLinter 'path to/bundle', ale#Escape('path to/bundle') + \ . ' exec standardrb' + \ . ' --format json --force-exclusion --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_standardts.vader b/dot_vim/plugged/ale/test/linter/test_standardts.vader new file mode 100644 index 0000000..33ca8b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_standardts.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'standard') + call ale#test#SetFilename('testfile.js') + unlet! b:executable + +After: + call ale#assert#TearDownLinterTest() + +Execute(bin/cmd.js paths should be preferred): + call ale#test#SetFilename('../test-files/standard/with-cmd/testfile.js') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/standard/with-cmd/node_modules/standard/bin/cmd.js' + \) + + AssertLinter b:executable, + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(b:executable) + \ . ' --stdin %s' + +Execute(.bin directories should be used too): + call ale#test#SetFilename('../test-files/standard/with-bin/testfile.js') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/standard/with-bin/node_modules/.bin/standard' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --stdin %s' + +Execute(The global executable should be used otherwise): + AssertLinter 'standard', ale#Escape('standard') . ' --stdin %s' + +Execute(The global executable should be configurable): + let b:ale_typescript_standard_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin %s' + +Execute(The options should be configurable): + let b:ale_typescript_standard_options = '--wat' + + AssertLinter 'standard', ale#Escape('standard') . ' --wat --stdin %s' diff --git a/dot_vim/plugged/ale/test/linter/test_starknet.vader b/dot_vim/plugged/ale/test/linter/test_starknet.vader new file mode 100644 index 0000000..368ab70 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_starknet.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cairo', 'starknet') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'starknet-compile', 'starknet-compile %s' + +Execute(Extra options should be supported): + let g:ale_cairo_starknet_options = '--config' + + AssertLinter 'starknet-compile', 'starknet-compile --config %s' diff --git a/dot_vim/plugged/ale/test/linter/test_staticcheck.vader b/dot_vim/plugged/ale/test/linter/test_staticcheck.vader new file mode 100644 index 0000000..94f24a5 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_staticcheck.vader @@ -0,0 +1,49 @@ +Before: + Save g:ale_go_go111module + Save $GOPATH + + let $GOPATH = '/non/existent/directory' + + call ale#assert#SetUpLinterTest('go', 'staticcheck') + call ale#test#SetFilename('test.go') + +After: + unlet! b:ale_go_go111module + + call ale#assert#TearDownLinterTest() + +Execute(The staticcheck callback should return the right defaults): + AssertLinterCwd '%s:h' + AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' .' + +Execute(staticcheck should be found in GOPATH): + " This is a directory with a fake executable + let $GOPATH = ale#test#GetFilename('../test-files/go/gopath') + + AssertLinter + \ ale#test#GetFilename('../test-files/go/gopath/bin/staticcheck'), + \ ale#Escape(ale#test#GetFilename('../test-files/go/gopath/bin/staticcheck')) + \ . ' .' + +Execute(The staticcheck callback should use configured options): + let b:ale_go_staticcheck_options = '-test' + + AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' -test .' + +Execute(Unset the staticcheck `lint_package` option should use the correct command): + let b:ale_go_staticcheck_lint_package = 0 + + AssertLinterCwd '%s:h' + AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' %s:t' + +Execute(The staticcheck callback should use the `GO111MODULE` option if set): + let b:ale_go_go111module = 'off' + + AssertLinter 'staticcheck', + \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' .' + + " Test with lint_package option set + let b:ale_go_staticcheck_lint_package = 0 + + AssertLinter 'staticcheck', + \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' %s:t' diff --git a/dot_vim/plugged/ale/test/linter/test_sugarss_stylelint.vader b/dot_vim/plugged/ale/test/linter/test_sugarss_stylelint.vader new file mode 100644 index 0000000..c6000a9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_sugarss_stylelint.vader @@ -0,0 +1,33 @@ +Before: + call ale#assert#SetUpLinterTest('sugarss', 'stylelint') + unlet! b:executable + +After: + unlet! b:executable + call ale#assert#TearDownLinterTest() + +Execute(node_modules directories should be discovered): + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.sss') + + let b:executable = ale#path#Simplify( + \ g:dir + \ . '/../test-files/stylelint/node_modules/.bin/stylelint' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --syntax=sugarss --stdin-filename %s' + +Execute(The global override should work): + let b:ale_sugarss_stylelint_executable = 'foobar' + let b:ale_sugarss_stylelint_use_global = 1 + + call ale#test#SetFilename('../test-files/stylelint/nested/testfile.sss') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --syntax=sugarss --stdin-filename %s' + +Execute(Extra options should be configurable): + call ale#test#SetFilename('../test-files/dummy') + + let b:ale_sugarss_stylelint_options = '--configFile ''/absolute/path/to/file''' + + AssertLinter 'stylelint', + \ ale#Escape('stylelint') . ' --configFile ''/absolute/path/to/file'' --syntax=sugarss --stdin-filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_svelteserver.vader b/dot_vim/plugged/ale/test/linter/test_svelteserver.vader new file mode 100644 index 0000000..c09f168 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_svelteserver.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('svelte', 'svelteserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'svelteserver', ale#Escape('svelteserver') . ' --stdio' diff --git a/dot_vim/plugged/ale/test/linter/test_swaglint.vader b/dot_vim/plugged/ale/test/linter/test_swaglint.vader new file mode 100644 index 0000000..98f0c59 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_swaglint.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'swaglint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The yaml swaglint command callback should return the correct default string): + AssertLinter 'swaglint', ale#Escape('swaglint') . ' -r compact --stdin' + +Execute(The yaml swaglint command callback should be configurable): + let g:ale_yaml_swaglint_executable = '~/.local/bin/swaglint' + + AssertLinter '~/.local/bin/swaglint', + \ ale#Escape('~/.local/bin/swaglint') . ' -r compact --stdin' + +Execute(The yaml swaglint command callback should allow a global installation to be used): + let g:ale_yaml_swaglint_executable = '/usr/local/bin/swaglint' + let g:ale_yaml_swaglint_use_global = 1 + + AssertLinter '/usr/local/bin/swaglint', + \ ale#Escape('/usr/local/bin/swaglint') . ' -r compact --stdin' + +Execute(The yaml swaglint command callback should allow a local installation to be used): + call ale#test#SetFilename('../test-files/swaglint/docs/swagger.yaml') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/swaglint/node_modules/.bin/swaglint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/swaglint/node_modules/.bin/swaglint')) + \ . ' -r compact --stdin' diff --git a/dot_vim/plugged/ale/test/linter/test_swift_appleswiftformat.vader b/dot_vim/plugged/ale/test/linter/test_swift_appleswiftformat.vader new file mode 100644 index 0000000..3dbae8f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_swift_appleswiftformat.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('swift', 'appleswiftformat') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should use default command when use_swiftpm is not set): + call ale#test#SetFilename('../test-files/swift/non-swift-package-project/src/folder/dummy.swift') + + let g:ale_swift_appleswiftformat_executable = 'swift-format' + let g:ale_swift_appleswiftformat_use_swiftpm = 0 + + AssertLinter 'swift-format', ale#Escape('swift-format') . ' lint %t' + +Execute(Should use default command and available configuration when use_swiftpm is not set): + call ale#test#SetDirectory('/testplugin/test/test-files/swift/swift-package-project-with-config') + call ale#test#SetFilename('src/folder/dummy.swift') + + let g:ale_swift_appleswiftformat_executable = 'swift-format' + let g:ale_swift_appleswiftformat_use_swiftpm = 0 + + AssertLinter 'swift-format', + \ ale#Escape('swift-format') . ' lint %t ' . '--configuration ' + \ . glob(g:dir . '/.swift-format') + + call ale#test#RestoreDirectory() + +Execute(Should use swift run when use_swiftpm is set to 1): + call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift') + + let g:ale_swift_appleswiftformat_use_swiftpm = 1 + + AssertLinter 'swift', ale#Escape('swift') . ' run swift-format lint %t' + +Execute(Should use the provided global executable): + call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift') + + let g:ale_swift_appleswiftformat_executable = '/path/to/custom/swift-format' + let g:ale_swift_appleswiftformat_use_swiftpm = 0 + + AssertLinter '/path/to/custom/swift-format', + \ ale#Escape('/path/to/custom/swift-format') . ' lint %t' diff --git a/dot_vim/plugged/ale/test/linter/test_swift_sourcekitlsp.vader b/dot_vim/plugged/ale/test/linter/test_swift_sourcekitlsp.vader new file mode 100644 index 0000000..1040d59 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_swift_sourcekitlsp.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('swift', 'sourcekitlsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift') + + AssertLinter 'sourcekit-lsp', ale#Escape('sourcekit-lsp') + +Execute(Should let users configure a global executable and override local paths): + call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift') + + let g:ale_sourcekit_lsp_executable = '/path/to/custom/sourcekitlsp' + + AssertLinter '/path/to/custom/sourcekitlsp', + \ ale#Escape('/path/to/custom/sourcekitlsp') + +Execute(The language should be correct): + AssertLSPLanguage 'swift' diff --git a/dot_vim/plugged/ale/test/linter/test_swiftlint.vader b/dot_vim/plugged/ale/test/linter/test_swiftlint.vader new file mode 100644 index 0000000..d2442b0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_swiftlint.vader @@ -0,0 +1,43 @@ +Before: + call ale#assert#SetUpLinterTest('swift', 'swiftlint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Global installation should be the default executable): + call ale#test#SetFilename('../test-files/swiftlint/global/testfile.swift') + + AssertEqual + \ 'swiftlint', + \ ale_linters#swift#swiftlint#GetExecutable(bufnr('')) + +Execute(React Native apps using CocoaPods should take precedence over the default executable): + call ale#test#SetFilename('../test-files/swiftlint/react-native/testfile.swift') + + AssertEqual + \ tolower(ale#test#GetFilename('../test-files/swiftlint/react-native/ios/Pods/SwiftLint/swiftlint')), + \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr(''))) + +Execute(CocoaPods installation should take precedence over the default executable): + call ale#test#SetFilename('../test-files/swiftlint/cocoapods/testfile.swift') + + AssertEqual + \ tolower(ale#test#GetFilename('../test-files/swiftlint/cocoapods/Pods/SwiftLint/swiftlint')), + \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr(''))) + +Execute(Top level CocoaPods installation should take precedence over React Native installation): + call ale#test#SetFilename('../test-files/swiftlint/cocoapods-and-react-native/testfile.swift') + + AssertEqual + \ tolower(ale#test#GetFilename('../test-files/swiftlint/cocoapods-and-react-native/Pods/SwiftLint/swiftlint')), + \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr(''))) + +Execute(use-global should override other versions): + let g:ale_swift_swiftlint_use_global = 1 + let g:ale_swift_swiftlint_executable = 'swiftlint_d' + + call ale#test#SetFilename('../test-files/swiftlint/cocoapods-and-react-native/testfile.swift') + + AssertEqual + \ 'swiftlint_d', + \ ale_linters#swift#swiftlint#GetExecutable(bufnr('')) diff --git a/dot_vim/plugged/ale/test/linter/test_systemd_analyze.vader b/dot_vim/plugged/ale/test/linter/test_systemd_analyze.vader new file mode 100644 index 0000000..d97c87b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_systemd_analyze.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('systemd', 'systemd_analyze') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'systemd-analyze', + \ 'SYSTEMD_LOG_COLOR=0 ' . ale#Escape('systemd-analyze') . ' --user verify %s' diff --git a/dot_vim/plugged/ale/test/linter/test_terraform_ls.vader b/dot_vim/plugged/ale/test/linter/test_terraform_ls.vader new file mode 100644 index 0000000..983bc10 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_terraform_ls.vader @@ -0,0 +1,42 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'terraform_ls') + +After: + unlet! b:ale_terraform_terraform_executable + unlet! b:ale_terraform_ls_executable + unlet! b:ale_terraform_ls_options + + call ale#assert#TearDownLinterTest() + +Execute(Should send correct LSP language): + AssertLSPLanguage 'terraform' + +Execute(Should load default executable): + AssertLinter 'terraform-ls', + \ ale#Escape('terraform-ls') . ' serve' + +Execute(Should configure custom executable): + let b:ale_terraform_ls_executable = 'foo' + AssertLinter 'foo', + \ ale#Escape('foo') . ' serve' + +Execute(Should ignore non-absolute custom terraform executable): + let b:ale_terraform_terraform_executable = 'terraform' + AssertLinter 'terraform-ls', + \ ale#Escape('terraform-ls') . ' serve' + +Execute(Should set absolute custom terraform executable): + let b:ale_terraform_terraform_executable = '/bin/terraform' + AssertLinter 'terraform-ls', + \ ale#Escape('terraform-ls') . ' serve -tf-exec /bin/terraform' + +Execute(Should set custom options): + let b:ale_terraform_ls_options = '--bar' + + AssertLinter 'terraform-ls', + \ ale#Escape('terraform-ls') . ' serve --bar' + +Execute(Should return nearest directory with .terraform if found in parent directory): + call ale#test#SetFilename('../test-files/terraform/main.tf') + + AssertLSPProject ale#test#GetFilename('../test-files/terraform') diff --git a/dot_vim/plugged/ale/test/linter/test_terraform_lsp.vader b/dot_vim/plugged/ale/test/linter/test_terraform_lsp.vader new file mode 100644 index 0000000..27f27ff --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_terraform_lsp.vader @@ -0,0 +1,29 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'terraform_lsp') + +After: + unlet! b:ale_terraform_langserver_executable + unlet! b:ale_terraform_langserver_options + + call ale#assert#TearDownLinterTest() + +Execute(Should send correct LSP language): + AssertLSPLanguage 'terraform' + +Execute(Should load default executable): + AssertLinter 'terraform-lsp', ale#Escape('terraform-lsp') + +Execute(Should configure custom executable): + let b:ale_terraform_langserver_executable = 'foo' + AssertLinter 'foo', ale#Escape('foo') + +Execute(Should set custom options): + let b:ale_terraform_langserver_options = '--bar' + + AssertLinter 'terraform-lsp', + \ ale#Escape('terraform-lsp') . ' --bar' + +Execute(Should return nearest directory with .terraform if found in parent directory): + call ale#test#SetFilename('../test-files/terraform/main.tf') + + AssertLSPProject ale#test#GetFilename('../test-files/terraform') diff --git a/dot_vim/plugged/ale/test/linter/test_terraform_terraform.vader b/dot_vim/plugged/ale/test/linter/test_terraform_terraform.vader new file mode 100644 index 0000000..697ffcd --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_terraform_terraform.vader @@ -0,0 +1,15 @@ +" Based upon :help ale-development +Before: + call ale#assert#SetUpLinterTest('terraform', 'terraform') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'terraform', + \ ale#Escape('terraform') . ' validate -no-color -json ' + +Execute(The default command should be overridden): + let b:ale_terraform_terraform_executable = '/bin/other/terraform' + AssertLinter '/bin/other/terraform', + \ ale#Escape('/bin/other/terraform') . ' validate -no-color -json ' diff --git a/dot_vim/plugged/ale/test/linter/test_terraform_tflint.vader b/dot_vim/plugged/ale/test/linter/test_terraform_tflint.vader new file mode 100644 index 0000000..b1963a7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_terraform_tflint.vader @@ -0,0 +1,28 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'tflint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'tflint', ale#Escape('tflint') . ' -f json' + +Execute(The default executable should be configurable): + let b:ale_terraform_tflint_executable = 'asdf' + + AssertLinter 'asdf', ale#Escape('asdf') . ' -f json' + +Execute(Overriding options should work): + let g:ale_terraform_tflint_executable = 'fnord' + let g:ale_terraform_tflint_options = '--whatever' + + AssertLinter 'fnord', ale#Escape('fnord') . ' --whatever -f json' + +Execute(Configuration files should be found): + call ale#test#SetFilename('../test-files/tflint/foo/bar.tf') + + AssertLinter 'tflint', + \ ale#Escape('tflint') + \ . ' --config ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tflint/foo/.tflint.hcl')) + \ . ' -f json' diff --git a/dot_vim/plugged/ale/test/linter/test_terraform_tfsec.vader b/dot_vim/plugged/ale/test/linter/test_terraform_tfsec.vader new file mode 100644 index 0000000..c3a7eae --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_terraform_tfsec.vader @@ -0,0 +1,38 @@ +Before: + call ale#assert#SetUpLinterTest('terraform', 'tfsec') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'tfsec', ale#Escape('tfsec') . ' --format json' + +Execute(The default executable should be configurable): + let b:ale_terraform_tfsec_executable = '/usr/bin/tfsec' + + AssertLinter '/usr/bin/tfsec', ale#Escape('/usr/bin/tfsec') . ' --format json' + +Execute(Overriding options should work): + let g:ale_terraform_tfsec_executable = '/usr/local/bin/tfsec' + let g:ale_terraform_tfsec_options = '--minimum-severity MEDIUM' + + AssertLinter '/usr/local/bin/tfsec', + \ ale#Escape('/usr/local/bin/tfsec') . ' --minimum-severity MEDIUM --format json' + +Execute(Configuration yml file should be found): + call ale#test#SetFilename('../test-files/tfsec/yml/main.tf') + + AssertLinter 'tfsec', + \ ale#Escape('tfsec') + \ . ' --config-file ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tfsec/yml/.tfsec/config.yml')) + \ . ' --format json' + +Execute(Configuration json file should be found): + call ale#test#SetFilename('../test-files/tfsec/json/main.tf') + + AssertLinter 'tfsec', + \ ale#Escape('tfsec') + \ . ' --config-file ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tfsec/json/.tfsec/config.json')) + \ . ' --format json' diff --git a/dot_vim/plugged/ale/test/linter/test_tex_lacheck.vader b/dot_vim/plugged/ale/test/linter/test_tex_lacheck.vader new file mode 100644 index 0000000..b404cc7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_tex_lacheck.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'lacheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Executable should default to lacheck): + AssertLinter 'lacheck', ale#Escape('lacheck') . ' %t' + +Execute(Should be able to set a custom executable): + let g:ale_tex_lacheck_executable = 'bin/foo' + + AssertLinter 'bin/foo' , ale#Escape('bin/foo') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_tex_textlint.vader b/dot_vim/plugged/ale/test/linter/test_tex_textlint.vader new file mode 100644 index 0000000..f99e0fd --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_tex_textlint.vader @@ -0,0 +1,65 @@ +" Author: januswel, w0rp + +Before: + " This is just one language for the linter. + call ale#assert#SetUpLinterTest('tex', 'textlint') + + " The configuration is shared between many languages. + Save g:ale_textlint_executable + Save g:ale_textlint_use_global + Save g:ale_textlint_options + + let g:ale_textlint_executable = 'textlint' + let g:ale_textlint_use_global = 0 + let g:ale_textlint_options = '' + + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + +After: + unlet! b:command_tail + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s' + +Execute(The executable should be configurable): + let b:ale_textlint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -f json --stdin --stdin-filename %s' + +Execute(The options should be configurable): + let b:ale_textlint_options = '--something' + + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' --something -f json --stdin --stdin-filename %s' + +Execute(The local executable from .bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint')) + \ . ' -f json --stdin --stdin-filename %s' + +Execute(The local executable from textlint/bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt') + + if has('win32') + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + else + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + endif diff --git a/dot_vim/plugged/ale/test/linter/test_texlab.vader b/dot_vim/plugged/ale/test/linter/test_texlab.vader new file mode 100644 index 0000000..b60b208 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_texlab.vader @@ -0,0 +1,35 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'texlab') + + Save &filetype + let &filetype = 'tex' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'tex' + +Execute(The default executable path should be correct): + AssertLinter 'texlab', ale#Escape('texlab') + +Execute(The project root should be detected correctly): + call ale#test#SetFilename('../test-files/tex/sample1.tex') + silent! call mkdir('../test-files/tex/.git') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/tex') + +Execute(The executable should be configurable): + let b:ale_tex_texlab_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The options should be configurable): + let b:ale_tex_texlab_options = '-v' + + AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options + +Execute(Should accept configuration settings): + AssertLSPConfig {} + let b:ale_tex_texlab_config = {'build':{'onSave':v:true}} + AssertLSPConfig {'build':{'onSave':v:true}} diff --git a/dot_vim/plugged/ale/test/linter/test_textlint.vader b/dot_vim/plugged/ale/test/linter/test_textlint.vader new file mode 100644 index 0000000..6ec42b2 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_textlint.vader @@ -0,0 +1,65 @@ +" Author: januswel, w0rp + +Before: + " This is just one language for the linter. + call ale#assert#SetUpLinterTest('markdown', 'textlint') + + " The configuration is shared between many languages. + Save g:ale_textlint_executable + Save g:ale_textlint_use_global + Save g:ale_textlint_options + + let g:ale_textlint_executable = 'textlint' + let g:ale_textlint_use_global = 0 + let g:ale_textlint_options = '' + + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + +After: + unlet! b:command_tail + unlet! b:ale_textlint_executable + unlet! b:ale_textlint_use_global + unlet! b:ale_textlint_options + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s' + +Execute(The executable should be configurable): + let b:ale_textlint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' -f json --stdin --stdin-filename %s' + +Execute(The options should be configurable): + let b:ale_textlint_options = '--something' + + AssertLinter 'textlint', + \ ale#Escape('textlint') . ' --something -f json --stdin --stdin-filename %s' + +Execute(The local executable from .bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint')) + \ . ' -f json --stdin --stdin-filename %s' + +Execute(The local executable from textlint/bin should be used if available): + call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt') + + if has('win32') + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + else + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js')) + \ . ' -f json --stdin --stdin-filename %s' + endif diff --git a/dot_vim/plugged/ale/test/linter/test_thrift.vader b/dot_vim/plugged/ale/test/linter/test_thrift.vader new file mode 100644 index 0000000..cbada81 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_thrift.vader @@ -0,0 +1,53 @@ +Before: + call ale#assert#SetUpLinterTest('thrift', 'thrift') + let b:suffix = ' -out ' . ale#Escape('TEMP_DIR') . ' %t' + + function! GetCommand(buffer) abort + call ale#engine#InitBufferInfo(a:buffer) + let l:command = ale_linters#thrift#thrift#GetCommand(a:buffer) + call ale#engine#Cleanup(a:buffer) + + let l:split_command = split(l:command) + let l:index = index(l:split_command, '-out') + + if l:index >= 0 + let l:split_command[l:index + 1] = 'TEMP' + endif + + return join(l:split_command) + endfunction + +After: + unlet! b:suffix + delfunction GetCommand + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'thrift', ale#Escape('thrift') . ' --gen cpp -I . -strict' . b:suffix + +Execute(The executable should be configurable): + let b:ale_thrift_thrift_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --gen cpp -I . -strict' . b:suffix + +Execute(The list of generators should be configurable): + let b:ale_thrift_thrift_generators = ['java', 'py:dynamic'] + + AssertLinter 'thrift', ale#Escape('thrift') + \ . ' --gen java --gen py:dynamic -I . -strict' . b:suffix + + let b:ale_thrift_thrift_generators = [] + + AssertLinter 'thrift', ale#Escape('thrift') . ' --gen cpp -I . -strict' . b:suffix + +Execute(The list of include paths should be configurable): + let b:ale_thrift_thrift_includes = ['included/path'] + + AssertLinter 'thrift', ale#Escape('thrift') + \ . ' --gen cpp -I included/path -strict' . b:suffix + +Execute(The string of compiler options should be configurable): + let b:ale_thrift_thrift_options = '-strict --allow-64bit-consts' + + AssertLinter 'thrift', ale#Escape('thrift') + \ . ' --gen cpp -I . -strict --allow-64bit-consts' . b:suffix diff --git a/dot_vim/plugged/ale/test/linter/test_thriftcheck.vader b/dot_vim/plugged/ale/test/linter/test_thriftcheck.vader new file mode 100644 index 0000000..0da3bd6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_thriftcheck.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('thrift', 'thriftcheck') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'thriftcheck', ale#Escape('thriftcheck') + \ . ' --stdin-filename %s %t' + +Execute(The executable should be configurable): + let b:ale_thrift_thriftcheck_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + \ . ' --stdin-filename %s %t' + +Execute(The string of options should be configurable): + let b:ale_thrift_thriftcheck_options = '--errors-only' + + AssertLinter 'thriftcheck', ale#Escape('thriftcheck') + \ . ' --errors-only --stdin-filename %s %t' diff --git a/dot_vim/plugged/ale/test/linter/test_tslint.vader b/dot_vim/plugged/ale/test/linter/test_tslint.vader new file mode 100644 index 0000000..1b291d9 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_tslint.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'tslint') + call ale#test#SetFilename('test.ts') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default tslint command should be correct): + AssertLinterCwd '%s:h' + AssertLinter 'tslint', ale#Escape('tslint') . ' --format json %t' + +Execute(The rules directory option should be included if set): + let b:ale_typescript_tslint_rules_dir = '/foo/bar' + + AssertLinter 'tslint', + \ ale#Escape('tslint') . ' --format json' + \ . ' -r ' . ale#Escape('/foo/bar') + \ . ' %t' + +Execute(The executable should be configurable and escaped): + let b:ale_typescript_tslint_executable = 'foo bar' + + AssertLinter 'foo bar', ale#Escape('foo bar') . ' --format json %t' diff --git a/dot_vim/plugged/ale/test/linter/test_typescript_deno_lsp.vader b/dot_vim/plugged/ale/test/linter/test_typescript_deno_lsp.vader new file mode 100644 index 0000000..944f6a0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_typescript_deno_lsp.vader @@ -0,0 +1,79 @@ +Before: + let g:ale_deno_importMap = 'import_map.json' + let g:ale_deno_unstable = 0 + let g:ale_deno_executable = 'deno' + let g:ale_deno_lsp_project_root = '' + + runtime autoload/ale/handlers/deno.vim + call ale#assert#SetUpLinterTest('typescript', 'deno') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should set deno lsp for TypeScript projects using stable Deno API): + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': '' + \} + +Execute(Should set deno lsp using unstable Deno API if enabled by user): + let g:ale_deno_unstable = 1 + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true, + \ 'importMap': '' + \} + +Execute(Should set the default importMap filepath): + call ale#test#SetFilename('../test-files/typescript/test.ts') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/import_map.json') + \} + +Execute(Should set the importMap filepath from user defined importMap): + let g:ale_deno_importMap = 'custom_import_map.json' + call ale#test#SetFilename('../test-files/typescript/test.ts') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/custom_import_map.json') + \} + +Execute(Should set the importMap filepath from user defined importMap with unstable API): + let g:ale_deno_importMap = 'custom_import_map.json' + let g:ale_deno_unstable = 1 + call ale#test#SetFilename('../test-files/typescript/test.ts') + + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true, + \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/custom_import_map.json') + \} + +Execute(Should find project root containing tsconfig.json): + call ale#test#SetFilename('../test-files/typescript/test.ts') + + AssertLSPLanguage 'typescript' + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/typescript') + +Execute(Should use user-specified project root): + let g:ale_deno_lsp_project_root = '/' + + call ale#test#SetFilename('../test-files/typescript/test.ts') + + AssertLSPLanguage 'typescript' + AssertLSPProject '/' + +Execute(Check Deno LSP command): + AssertLinter 'deno', ale#Escape('deno') . ' lsp' diff --git a/dot_vim/plugged/ale/test/linter/test_typescript_tsserver.vader b/dot_vim/plugged/ale/test/linter/test_typescript_tsserver.vader new file mode 100644 index 0000000..719ac18 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_typescript_tsserver.vader @@ -0,0 +1,8 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'tsserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'tsserver', ale#Escape('tsserver') diff --git a/dot_vim/plugged/ale/test/linter/test_unimport.vader b/dot_vim/plugged/ale/test/linter/test_unimport.vader new file mode 100644 index 0000000..a5607ce --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_unimport.vader @@ -0,0 +1,71 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'unimport') + call ale#test#SetFilename('test.py') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:executable + unlet! b:bin_dir + + call ale#assert#TearDownLinterTest() + +Execute(The unimport callbacks should return the correct default values): + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(The unimport executable should be configurable, and escaped properly): + let b:ale_python_unimport_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --check %t' + +Execute(The unimport command callback should let you set options): + let b:ale_python_unimport_options = '--gitignore' + + AssertLinter 'unimport', ale#Escape('unimport') . ' --gitignore --check %t' + +Execute(The unimport command should switch directories to the detected project root): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(The unimport callbacks should detect virtualenv directories and switch to the project root): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/unimport' + \) + + AssertLinter b:executable, ale#Escape(b:executable) . ' --check %t' + +Execute(You should able able to use the global unimport instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_unimport_use_global = 1 + + AssertLinter 'unimport', ale#Escape('unimport') . ' --check %t' + +Execute(Setting executable to 'pipenv' appends 'run unimport'): + let g:ale_python_unimport_executable = 'path/to/pipenv' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run unimport --check %t' + +Execute(Pipenv is detected when python_unimport_auto_pipenv is set): + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + let g:ale_python_unimport_auto_pipenv = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run unimport --check %t' + +Execute(Setting executable to 'poetry' appends 'run unimport'): + let g:ale_python_unimport_executable = 'path/to/poetry' + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run unimport --check %t' + +Execute(Poetry is detected when python_unimport_auto_poetry is set): + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + let g:ale_python_unimport_auto_poetry = 1 + + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'poetry', ale#Escape('poetry') . ' run unimport --check %t' diff --git a/dot_vim/plugged/ale/test/linter/test_v_command_callback.vader b/dot_vim/plugged/ale/test/linter/test_v_command_callback.vader new file mode 100644 index 0000000..17f24ad --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_v_command_callback.vader @@ -0,0 +1,25 @@ +Before: + Save g:ale_v_v_executable + + call ale#assert#SetUpLinterTest('v', 'v') + + GivenCommandOutput ['/foo/bar', '/foo/baz'] + +After: + Restore + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'v', 'v . -o /tmp/vim-ale-v' + +Execute(Extra options should be supported): + let g:ale_v_v_options = '--foo-bar' + + AssertLinter 'v', 'v --foo-bar . -o /tmp/vim-ale-v' + + let g:ale_v_vbuild_options = '' + +Execute(The executable should be configurable): + let g:ale_v_v_executable = 'foobar' + + AssertLinter 'foobar', 'foobar . -o /tmp/vim-ale-v' diff --git a/dot_vim/plugged/ale/test/linter/test_vcom.vader b/dot_vim/plugged/ale/test/linter/test_vcom.vader new file mode 100644 index 0000000..77218f7 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_vcom.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('vhdl', 'vcom') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'vcom', ale#Escape('vcom') . ' -2008 -quiet -lint %t' + + let b:ale_vhdl_vcom_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -2008 -quiet -lint %t' + +Execute(The options should be configurable): + let b:ale_vhdl_vcom_options = '--something' + + AssertLinter 'vcom', ale#Escape('vcom') . ' --something %t' diff --git a/dot_vim/plugged/ale/test/linter/test_verilator.vader b/dot_vim/plugged/ale/test/linter/test_verilator.vader new file mode 100644 index 0000000..b65f345 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_verilator.vader @@ -0,0 +1,14 @@ +Before: + call ale#assert#SetUpLinterTest('verilog', 'verilator') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default verilator command should be correct): + AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h %t' + +Execute(verilator options should be configurable): + " Additional args for the linter + let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"' + + AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -sv --default-language "1800-2012" %t' diff --git a/dot_vim/plugged/ale/test/linter/test_vim_vimls.vader b/dot_vim/plugged/ale/test/linter/test_vim_vimls.vader new file mode 100644 index 0000000..eb9239a --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_vim_vimls.vader @@ -0,0 +1,77 @@ +" Author: Jeffrey Lau https://github.com/zoonfafer +" Description: Tests for the Vim vimls linter + +Before: + call ale#assert#SetUpLinterTest('vim', 'vimls') + +After: + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'vim-language-server', ale#Escape('vim-language-server') . ' --stdio' + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/vim/path_with_autoload/test.vim') + AssertLSPLanguage 'vim' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/vim/path_with_autoload') + +Execute(should set correct project for .git/): + let b:parent_dir = ale#path#Simplify(g:dir . '/..') + let b:git_dir = b:parent_dir . '/.git' + + call ale#test#SetFilename('../test-files/vim/test.vim') + + if !isdirectory(b:git_dir) + call mkdir(b:git_dir) + endif + + AssertLSPProject ale#path#Simplify(b:parent_dir) + + call delete(b:git_dir, 'd') + unlet! b:git_dir + +Execute(should set correct project for plugin/): + call ale#test#SetFilename('../test-files/vim/path_with_plugin/test.vim') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/vim/path_with_plugin') + +Execute(should accept configuration settings): + AssertLSPConfig {} + + let b:ale_vim_vimls_config = {'vim': {'foobar': v:true}} + AssertLSPConfig {'vim': {'foobar': v:true}} + +Execute(should set correct project for .vimrc): + call ale#test#SetFilename('../test-files/vim/path_with_vimrc/.vimrc') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/vim/path_with_vimrc') + +Execute(should set correct project for init.vim): + call ale#test#SetFilename('../test-files/vim/path_with_initvim/init.vim') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/vim/path_with_initvim') + +Execute(should use the local executable when available): + call ale#test#SetFilename('../test-files/vim/file.vim') + + AssertLinter ale#path#Simplify(g:dir . '/../test-files/vim/node_modules/.bin/vim-language-server'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/vim/node_modules/.bin/vim-language-server')) . ' --stdio' + +Execute(should let the global executable to be used): + let g:ale_vim_vimls_use_global = 1 + call ale#test#SetFilename('../test-files/vim/file.vim') + + AssertLinter 'vim-language-server', + \ ale#Escape('vim-language-server') . ' --stdio' + +Execute(should allow the executable to be configured): + let g:ale_vim_vimls_executable = 'foobar' + call ale#test#SetFilename('../test-files/dummy') + + AssertLinter 'foobar', ale#Escape('foobar') . ' --stdio' diff --git a/dot_vim/plugged/ale/test/linter/test_vint.vader b/dot_vim/plugged/ale/test/linter/test_vint.vader new file mode 100644 index 0000000..4a224d0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_vint.vader @@ -0,0 +1,34 @@ +Before: + call ale#assert#SetUpLinterTest('vim', 'vint') + let b:common_flags = (has('nvim') ? ' --enable-neovim' : '') + \ . ' -f "{file_path}:{line_number}:{column_number}: {severity}: {policy_name} - {description} (see {reference})"' + +After: + unlet! b:common_flags + + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'vint', [ + \ ale#Escape('vint') .' --version', + \ ale#Escape('vint') .' -s --no-color' . b:common_flags . ' %t', + \] + +Execute(The executable should be configurable): + let g:ale_vim_vint_executable = 'foobar' + + AssertLinter 'foobar', [ + \ ale#Escape('foobar') .' --version', + \ ale#Escape('foobar') .' -s --no-color' . b:common_flags . ' %t', + \] + +Execute(The --no-color flag should not be used for older Vint versions): + GivenCommandOutput ['v0.3.5'] + + AssertLinter 'vint', ale#Escape('vint') .' -s' . b:common_flags . ' %t' + +Execute(--stdin-display-name should be used in newer versions): + GivenCommandOutput ['v0.4.0'] + + AssertLinter 'vint', ale#Escape('vint') .' -s --no-color' . b:common_flags + \ . ' --stdin-display-name %s -' diff --git a/dot_vim/plugged/ale/test/linter/test_vlog.vader b/dot_vim/plugged/ale/test/linter/test_vlog.vader new file mode 100644 index 0000000..a07944f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_vlog.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('verilog', 'vlog') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'vlog', ale#Escape('vlog') . ' -quiet -lint %t' + + let b:ale_verilog_vlog_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' -quiet -lint %t' + +Execute(The options should be configurable): + let b:ale_verilog_vlog_options = '--something' + + AssertLinter 'vlog', ale#Escape('vlog') . ' --something %t' diff --git a/dot_vim/plugged/ale/test/linter/test_volar.vader b/dot_vim/plugged/ale/test/linter/test_volar.vader new file mode 100644 index 0000000..bef094b --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_volar.vader @@ -0,0 +1,27 @@ +Before: + call ale#assert#SetUpLinterTest('vue', 'volar') + + let g:tsserver_path = '' + let g:actual_path = '' + let g:init_opts = {} + +After: + call ale#assert#TearDownLinterTest() + + unlet g:tsserver_path + unlet g:actual_path + unlet g:init_opts + +Execute(Assert Volar LSP for Vue Project): + call ale#test#SetFilename('../test-files/volar/src/App.vue') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/volar') + +Execute(Assert proper tsserverlibrary for Volar LSP): + call ale#test#SetFilename('../test-files/volar/src/App.vue') + + let g:init_opts = ale_linters#vue#volar#GetInitializationOptions(bufnr('')) + let g:tsserver_path = init_opts.typescript.serverPath + let g:actual_path = ale#path#Simplify(g:dir . '/../test-files/volar/node_modules/typescript/lib/tsserverlibrary.js') + + AssertEqual g:tsserver_path, g:actual_path diff --git a/dot_vim/plugged/ale/test/linter/test_vulture.vader b/dot_vim/plugged/ale/test/linter/test_vulture.vader new file mode 100644 index 0000000..78655bd --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_vulture.vader @@ -0,0 +1,62 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'vulture') + call ale#test#SetFilename('test.py') + + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + +After: + unlet! b:bin_dir + unlet! b:executable + + call ale#assert#TearDownLinterTest() + +Execute(The vulture command callback should lint file directory by default): + AssertLinterCwd expand('#' . bufnr('') . ':p:h') + AssertLinter 'vulture', ale#Escape('vulture') . ' .' + +Execute(The vulture command callback should lint project root, when present): + call ale#test#SetFilename('../test-files/python/no_virtualenv/subdir/foo/bar.py') + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/no_virtualenv/subdir') + AssertLinter 'vulture', ale#Escape('vulture') . ' .' + +Execute(The option for disabling change directory works and only lints file): + let g:ale_python_vulture_change_directory = 0 + + AssertLinterCwd '' + AssertLinter 'vulture', ale#Escape('vulture') . ' %s' + +Execute(The vulture executable should be configurable, and escaped properly): + let g:ale_python_vulture_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . ' .' + +Execute(The vulture command callback should let you set options): + let g:ale_python_vulture_options = '--some-option' + + AssertLinter 'vulture', ale#Escape('vulture') . ' --some-option .' + +Execute(The vulture command callback should detect virtualenv directories and switch to the project root): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + + let b:executable = ale#path#Simplify( + \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/vulture' + \) + + AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/subdir') + AssertLinter b:executable, ale#Escape(b:executable) . ' .' + +Execute(You should able able to use the global vulture instead): + call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py') + let g:ale_python_vulture_use_global = 1 + + AssertLinter 'vulture', ale#Escape('vulture') . ' .' + +Execute(Setting executable to 'pipenv' appends 'run vulture'): + let g:ale_python_vulture_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', ale#Escape('path/to/pipenv') . ' run vulture' . ' .' +Execute(Setting executable to 'poetry' appends 'run vulture'): + let g:ale_python_vulture_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', ale#Escape('path/to/poetry') . ' run vulture' . ' .' diff --git a/dot_vim/plugged/ale/test/linter/test_write_good.vader b/dot_vim/plugged/ale/test/linter/test_write_good.vader new file mode 100644 index 0000000..8958dd6 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_write_good.vader @@ -0,0 +1,55 @@ +Before: + " This is just one example of a language using the linter. + call ale#assert#SetUpLinterTest('markdown', 'writegood') + + " The options are shared between many languages. + Save g:ale_writegood_options + Save g:ale_writegood_executable + Save g:ale_writegood_use_global + + unlet! g:ale_writegood_options + unlet! g:ale_writegood_executable + unlet! g:ale_writegood_use_global + + call ale#test#SetFilename('testfile.txt') + call ale#handlers#writegood#ResetOptions() + +After: + call ale#assert#TearDownLinterTest() + +Execute(The global executable should be used when the local one cannot be found): + AssertLinter + \ 'write-good', + \ ale#Escape('write-good') . ' %t', + +Execute(The options should be used in the command): + let g:ale_writegood_options = '--foo --bar' + + AssertLinter + \ 'write-good', + \ ale#Escape('write-good') . ' --foo --bar %t', + +Execute(Should use the node_modules/.bin executable, if available): + call ale#test#SetFilename('../test-files/write-good/node-modules/test.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules/node_modules/.bin/write-good'), + \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules/node_modules/.bin/write-good')) + \ . ' %t', + +Execute(Should use the node_modules/write-good executable, if available): + call ale#test#SetFilename('../test-files/write-good/node-modules-2/test.txt') + + AssertLinter + \ ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules-2/node_modules/write-good/bin/write-good.js'), + \ (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules-2/node_modules/write-good/bin/write-good.js')) + \ . ' %t', + +Execute(Should let users configure a global executable and override local paths): + call ale#test#SetFilename('../test-files/write-good/node-modules-2/test.txt') + + let g:ale_writegood_executable = 'foo-bar' + let g:ale_writegood_use_global = 1 + + AssertLinter 'foo-bar', ale#Escape('foo-bar') . ' %t' diff --git a/dot_vim/plugged/ale/test/linter/test_xmllint.vader b/dot_vim/plugged/ale/test/linter/test_xmllint.vader new file mode 100644 index 0000000..5a2377c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_xmllint.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('xml', 'xmllint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The xml xmllint command callback should return the correct default string): + AssertLinter 'xmllint', ale#Escape('xmllint') . ' --noout -' + +Execute(The xml xmllint command callback should let you set options): + let g:ale_xml_xmllint_options = '--xinclude --postvalid' + + AssertLinter 'xmllint', + \ ale#Escape('xmllint') . ' --xinclude --postvalid --noout -' + +Execute(The xmllint executable should be configurable): + let g:ale_xml_xmllint_executable = '~/.local/bin/xmllint' + + AssertLinter '~/.local/bin/xmllint', + \ ale#Escape('~/.local/bin/xmllint') . ' --noout -' diff --git a/dot_vim/plugged/ale/test/linter/test_xo.vader b/dot_vim/plugged/ale/test/linter/test_xo.vader new file mode 100644 index 0000000..1aa4c3f --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_xo.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('javascript', 'xo') + call ale#test#SetFilename('testfile.jsx') + unlet! b:executable + + set filetype=javascriptreact + runtime autoload/ale/handlers/xo.vim + +After: + call ale#assert#TearDownLinterTest() + +Execute(The XO executable should be called): + AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO executable should be configurable): + let b:ale_javascript_xo_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO options should be configurable): + let b:ale_javascript_xo_options = '--wat' + + AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_xots.vader b/dot_vim/plugged/ale/test/linter/test_xots.vader new file mode 100644 index 0000000..cc38ff0 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_xots.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'xo') + call ale#test#SetFilename('testfile.tsx') + unlet! b:executable + + set filetype=typescriptreact + runtime autoload/ale/handlers/xo.vim + +After: + call ale#assert#TearDownLinterTest() + +Execute(The XO executable should be called): + AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO executable should be configurable): + let b:ale_typescript_xo_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO options should be configurable): + let b:ale_typescript_xo_options = '--wat' + + AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s' diff --git a/dot_vim/plugged/ale/test/linter/test_xvhdl.vader b/dot_vim/plugged/ale/test/linter/test_xvhdl.vader new file mode 100644 index 0000000..86f9a32 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_xvhdl.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('vhdl', 'xvhdl') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'xvhdl', ale#Escape('xvhdl') . ' --2008 %t' + + let b:ale_vhdl_xvhdl_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --2008 %t' + +Execute(The options should be configurable): + let b:ale_vhdl_xvhdl_options = '--something' + + AssertLinter 'xvhdl', ale#Escape('xvhdl') . ' --something %t' diff --git a/dot_vim/plugged/ale/test/linter/test_xvlog.vader b/dot_vim/plugged/ale/test/linter/test_xvlog.vader new file mode 100644 index 0000000..564ac97 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_xvlog.vader @@ -0,0 +1,19 @@ +Before: + call ale#assert#SetUpLinterTest('verilog', 'xvlog') + +After: + unlet! b:command_tail + + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'xvlog', ale#Escape('xvlog') . ' %t' + + let b:ale_verilog_xvlog_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' + +Execute(The options should be configurable): + let b:ale_verilog_xvlog_options = '--something' + + AssertLinter 'xvlog', ale#Escape('xvlog') . ' --something %t' diff --git a/dot_vim/plugged/ale/test/linter/test_yaml_ls.vader b/dot_vim/plugged/ale/test/linter/test_yaml_ls.vader new file mode 100644 index 0000000..449ce8c --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_yaml_ls.vader @@ -0,0 +1,21 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'ls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(should set correct defaults): + AssertLinter 'yaml-language-server', ale#Escape('yaml-language-server') . ' --stdio' + +Execute(should set correct LSP values): + call ale#test#SetFilename('../test-files/yaml/test.yaml') + + AssertLSPLanguage 'yaml' + AssertLSPOptions {} + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/yaml') + +Execute(should accept configuration settings): + AssertLSPConfig {} + let b:ale_yaml_ls_config = {'yaml': {'hover': v:false, 'completion': v:true}} + AssertLSPConfig {'yaml': {'hover': v:false, 'completion': v:true}} diff --git a/dot_vim/plugged/ale/test/linter/test_yang_lsp.vader b/dot_vim/plugged/ale/test/linter/test_yang_lsp.vader new file mode 100644 index 0000000..5be7501 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_yang_lsp.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('yang', 'yang_lsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The executable should be configurable): + AssertLinter 'yang-language-server', ale#Escape('yang-language-server') + + let b:ale_yang_lsp_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') diff --git a/dot_vim/plugged/ale/test/linter/test_zeek.vader b/dot_vim/plugged/ale/test/linter/test_zeek.vader new file mode 100644 index 0000000..af58a41 --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_zeek.vader @@ -0,0 +1,17 @@ +Before: + call ale#assert#SetUpLinterTest('zeek', 'zeek') + + let b:command_tail = ' --parse-only %s' + +After: + call ale#assert#TearDownLinterTest() + + unlet! b:command_tail + +Execute(The default command should be correct): + AssertLinter 'zeek', ale#Escape('zeek') . b:command_tail + +Execute(The zeek executable should be configurable, and escaped properly): + let g:ale_zeek_zeek_executable = 'executable with spaces' + + AssertLinter 'executable with spaces', ale#Escape('executable with spaces') . b:command_tail diff --git a/dot_vim/plugged/ale/test/linter/test_zig_zls.vader b/dot_vim/plugged/ale/test/linter/test_zig_zls.vader new file mode 100644 index 0000000..6d814be --- /dev/null +++ b/dot_vim/plugged/ale/test/linter/test_zig_zls.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('zig', 'zls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'zls', ale#Escape('zls') + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('../test-files/zig/main.zig') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/zig') diff --git a/dot_vim/plugged/ale/test/lsp/test_closing_documents.vader b/dot_vim/plugged/ale/test/lsp/test_closing_documents.vader new file mode 100644 index 0000000..b9f2f82 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_closing_documents.vader @@ -0,0 +1,176 @@ +Before: + runtime autoload/ale/lsp.vim + + let g:message_list = [] + + function! MarkAllConnectionsInitialized() abort + for l:conn in values(ale#lsp#GetConnections()) + let l:conn.initialized = 1 + endfor + endfunction + + function! MarkDocumentOpened() abort + for l:conn in values(ale#lsp#GetConnections()) + let l:conn.open_documents[bufnr('')] = 1 + endfor + endfunction + + function! ale#lsp#Send(conn_id, message) abort + let l:connections = ale#lsp#GetConnections() + + if !l:connections[a:conn_id].initialized + throw 'LSP server not initialized yet!' + endif + + call add(g:message_list, [a:conn_id] + a:message) + endfunction + + call ale#lsp#ResetConnections() + +After: + unlet! g:message_list + delfunction MarkAllConnectionsInitialized + delfunction MarkDocumentOpened + + call ale#lsp#ResetConnections() + + runtime autoload/ale/lsp.vim + +Execute(No errors should be thrown if the connection is not initialized): + call ale#lsp#Register('command', '/foo', {}) + call MarkDocumentOpened() + + call ale#engine#Cleanup(bufnr('')) + AssertEqual [], g:message_list + +Execute(No messages should be sent if the document wasn't opened): + call ale#lsp#Register('command', '/foo', {}) + call MarkAllConnectionsInitialized() + + call ale#engine#Cleanup(bufnr('')) + AssertEqual [], g:message_list + +Execute(A message should be sent if the document was opened): + call ale#lsp#Register('command', '/foo', {}) + call MarkAllConnectionsInitialized() + + call ale#lsp#OpenDocument('command:/foo', bufnr(''), 'lang') + call ale#engine#Cleanup(bufnr('')) + " We should only send the message once. + call ale#engine#Cleanup(bufnr('')) + + AssertEqual + \ [ + \ ['command:/foo', 1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ 'languageId': 'lang', + \ 'text': "\n", + \ }, + \ }], + \ ['command:/foo', 1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ], + \ g:message_list + +Execute(A message should be sent if the document was opened for tsserver): + call ale#lsp#Register('command', '/foo', {}) + call ale#lsp#MarkConnectionAsTsserver('command:/foo') + + call ale#lsp#OpenDocument('command:/foo', bufnr(''), 'lang') + call ale#engine#Cleanup(bufnr('')) + " We should only send the message once. + call ale#engine#Cleanup(bufnr('')) + + AssertEqual + \ [ + \ ['command:/foo', 1, 'ts@open', {'file': expand('%:p')}], + \ ['command:/foo', 1, 'ts@close', {'file': expand('%:p')}], + \ ], + \ g:message_list + +Execute(Re-opening and closing the documents should work): + call ale#lsp#Register('command', '/foo', {}) + call MarkAllConnectionsInitialized() + + call ale#lsp#OpenDocument('command:/foo', bufnr(''), 'lang') + call ale#engine#Cleanup(bufnr('')) + call ale#lsp#OpenDocument('command:/foo', bufnr(''), 'lang') + call ale#engine#Cleanup(bufnr('')) + + AssertEqual + \ [ + \ ['command:/foo', 1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 2, + \ 'languageId': 'lang', + \ 'text': "\n", + \ }, + \ }], + \ ['command:/foo', 1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ['command:/foo', 1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ 'languageId': 'lang', + \ 'text': "\n", + \ }, + \ }], + \ ['command:/foo', 1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ], + \ g:message_list + +Execute(Messages for closing documents should be sent to each server): + call ale#lsp#Register('command', '/foo', {}) + call ale#lsp#Register('command', '/bar', {}) + call MarkAllConnectionsInitialized() + + call ale#lsp#OpenDocument('command:/foo', bufnr(''), 'lang') + call ale#lsp#OpenDocument('command:/bar', bufnr(''), 'lang') + call ale#engine#Cleanup(bufnr('')) + " We should only send the message once. + call ale#engine#Cleanup(bufnr('')) + + AssertEqual + \ [ + \ ['command:/foo', 1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 2, + \ 'languageId': 'lang', + \ 'text': "\n", + \ }, + \ }], + \ ['command:/bar', 1, 'textDocument/didOpen', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ 'languageId': 'lang', + \ 'text': "\n", + \ }, + \ }], + \ ['command:/bar', 1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ['command:/foo', 1, 'textDocument/didClose', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ], + \ g:message_list diff --git a/dot_vim/plugged/ale/test/lsp/test_did_save_event.vader b/dot_vim/plugged/ale/test/lsp/test_did_save_event.vader new file mode 100644 index 0000000..fc73c4d --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_did_save_event.vader @@ -0,0 +1,147 @@ +Before: + Save g:ale_lint_on_save + Save g:ale_enabled + Save g:ale_linters + Save g:ale_run_synchronously + Save g:ale_disable_lsp + + call ale#test#SetDirectory('/testplugin/test/completion') + call ale#test#SetFilename('dummy.txt') + + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + + let g:ale_disable_lsp = 0 + unlet! b:ale_disable_lsp + let g:ale_lint_on_save = 1 + let b:ale_enabled = 1 + let g:ale_lsp_next_message_id = 1 + let g:ale_run_synchronously = 1 + let g:conn_id = v:null + let g:message_list = [] + + function! LanguageCallback() abort + return 'foobar' + endfunction + + function! ProjectRootCallback() abort + return expand('.') + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'dummy_linter', + \ 'lsp': 'stdio', + \ 'command': 'cat - > /dev/null', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'language': function('LanguageCallback'), + \ 'project_root': function('ProjectRootCallback'), + \ }) + let g:ale_linters = {'foobar': ['dummy_linter']} + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + call a:Callback(a:linter, l:details) + + return 1 + endfunction + + " Replace the Send function for LSP, so we can monitor calls to it. + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + endfunction + +After: + Restore + + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + unlet! b:ale_enabled + unlet! b:ale_linters + unlet! g:message_list + unlet! b:ale_save_event_fired + + delfunction LanguageCallback + delfunction ProjectRootCallback + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + " Stop any timers we left behind. + " This stops the tests from failing randomly. + call ale#completion#StopTimer() + + runtime autoload/ale/completion.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + +Given foobar (Some imaginary filetype): + + +Execute(Server should be notified on save): + call ale#events#SaveEvent(bufnr('')) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], + \ }], + \ ], + \ g:message_list + +Execute(Server should be notified on save with didSave is supported by server): + + " Replace has capability function to simulate didSave server capability + function! ale#lsp#HasCapability(conn_id, capability) abort + if a:capability == 'did_save' + return 1 + endif + return 0 + endfunction + + call ale#events#SaveEvent(bufnr('')) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], + \ }], + \ [1, 'textDocument/didSave', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ }, + \ }], + \ ], + \ g:message_list + +Execute(Server should be notified on change): + call ale#events#FileChangedEvent(bufnr('')) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}], + \ }], + \ ], + \ g:message_list diff --git a/dot_vim/plugged/ale/test/lsp/test_engine_lsp_response_handling.vader b/dot_vim/plugged/ale/test/lsp/test_engine_lsp_response_handling.vader new file mode 100644 index 0000000..50ceef4 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_engine_lsp_response_handling.vader @@ -0,0 +1,428 @@ +Before: + Save g:ale_set_lists_synchronously + Save g:ale_buffer_info + Save g:ale_lsp_error_messages + Save g:ale_set_loclist + Save g:ale_set_signs + Save g:ale_set_quickfix + Save g:ale_set_highlights + Save g:ale_echo_cursor + Save g:ale_disable_lsp + Save g:ale_history_enabled + Save g:ale_history_log_output + + let g:ale_disable_lsp = 0 + let g:ale_set_lists_synchronously = 1 + let g:ale_buffer_info = {} + let g:ale_set_loclist = 1 + " Disable features we don't need for these tests. + let g:ale_set_signs = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + let g:ale_history_enabled = 1 + let g:ale_history_log_output = 1 + + unlet! g:ale_lsp_error_messages + unlet! b:ale_linters + unlet! b:ale_disable_lsp + + call ale#linter#Reset() + call ale#test#SetDirectory('/testplugin/test') + call setloclist(0, []) + +After: + Restore + + unlet! b:ale_linters + + call setloclist(0, []) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + call ale#lsp_linter#ClearLSPData() + +Given foobar(An empty file): +Execute(tsserver syntax error responses should be handled correctly): + runtime ale_linters/typescript/tsserver.vim + + if has('win32') + call ale#test#SetFilename('filename,[]^$.ts') + else + call ale#test#SetFilename('filename*?,{}[]^$.ts') + endif + + call ale#engine#InitBufferInfo(bufnr('')) + + if has('win32') + AssertEqual 'filename,[]^$.ts', expand('%:p:t') + else + AssertEqual 'filename*?,{}[]^$.ts', expand('%:p:t') + endif + + " When we get syntax errors and no semantic errors, we should keep the + " syntax errors. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': ''','' expected.', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 14, + \ 'vcol': 0, + \ 'nr': 1005, + \ 'type': 'E', + \ 'text': '1005: '','' expected.', + \ 'valid': 1, + \ 'pattern': '', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + " After we get empty syntax errors, we should clear them. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + " Syntax errors on the project root should not populate the LocList. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': g:dir, + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': ''','' expected.', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(tsserver semantic error responses should be handled correctly): + runtime ale_linters/typescript/tsserver.vim + + if has('win32') + call ale#test#SetFilename('filename,[]^$.ts') + else + call ale#test#SetFilename('filename*?,{}[]^$.ts') + endif + + call ale#engine#InitBufferInfo(bufnr('')) + + if has('win32') + AssertEqual 'filename,[]^$.ts', expand('%:p:t') + else + AssertEqual 'filename*?,{}[]^$.ts', expand('%:p:t') + endif + + " When we get syntax errors and no semantic errors, we should keep the + " syntax errors. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ ], + \ }, + \}) + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': 'Some semantic error', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 14, + \ 'vcol': 0, + \ 'nr': 1005, + \ 'type': 'E', + \ 'text': '1005: Some semantic error', + \ 'valid': 1, + \ 'pattern': '', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + " After we get empty syntax errors, we should clear them. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': expand('%:p'), + \ 'diagnostics':[ + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + " Semantic errors on the project root should not populate the LocList. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': g:dir, + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': 'Some semantic error', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(tsserver errors should mark tsserver no longer active): + let b:ale_linters = ['tsserver'] + runtime ale_linters/typescript/tsserver.vim + call ale#test#SetFilename('filename.ts') + call ale#engine#InitBufferInfo(bufnr('')) + + let g:ale_buffer_info[bufnr('')].active_linter_list = ale#linter#Get('typescript') + Assert !empty(g:ale_buffer_info[bufnr('')].active_linter_list) + + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': g:dir . '/filename.ts', + \ 'diagnostics':[], + \ }, + \}) + + AssertEqual [], g:ale_buffer_info[bufnr('')].active_linter_list + +Execute(LSP diagnostics responses should be handled correctly): + let b:ale_linters = ['eclipselsp'] + runtime ale_linters/java/eclipselsp.vim + + if has('win32') + call ale#test#SetFilename('filename,[]^$.ts') + else + call ale#test#SetFilename('filename*?,{}[]^$.java') + endif + + call ale#engine#InitBufferInfo(bufnr('')) + call ale#lsp_linter#SetLSPLinterMap({'1': 'eclipselsp'}) + + if has('win32') + AssertEqual 'filename,[]^$.ts', expand('%:p:t') + else + AssertEqual 'filename*?,{}[]^$.java', expand('%:p:t') + endif + + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'jsonrpc':'2.0', + \ 'method':'textDocument/publishDiagnostics', + \ 'params': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'diagnostics': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 0, + \ 'character':0 + \ }, + \ 'end': { + \ 'line': 0, + \ 'character':0 + \ } + \ }, + \ 'severity': 2, + \ 'code': "", + \ 'source': 'Java', + \ 'message': 'Missing JRE 1-8' + \ } + \ ] + \ } + \}) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'pattern': '', + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': -1, + \ 'type': 'W', + \ 'text': 'Missing JRE 1-8' + \ } + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(LSP diagnostics responses on project root should not populate loclist): + let b:ale_linters = ['eclipselsp'] + runtime ale_linters/java/eclipselsp.vim + call ale#test#SetFilename('filename.java') + call ale#engine#InitBufferInfo(bufnr('')) + call ale#lsp_linter#SetLSPLinterMap({'1': 'eclipselsp'}) + + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'jsonrpc':'2.0', + \ 'method':'textDocument/publishDiagnostics', + \ 'params': { + \ 'uri':'file://' . g:dir, + \ 'diagnostics': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 0, + \ 'character':0 + \ }, + \ 'end': { + \ 'line': 0, + \ 'character':0 + \ } + \ }, + \ 'severity': 2, + \ 'code': "", + \ 'source': 'Java', + \ 'message': 'Missing JRE 1-8' + \ } + \ ] + \ } + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(LSP errors should mark linters no longer active): + let b:ale_linters = ['pylsp'] + runtime ale_linters/python/pylsp.vim + call ale#test#SetFilename('filename.py') + call ale#engine#InitBufferInfo(bufnr('')) + call ale#lsp_linter#SetLSPLinterMap({1: 'pylsp'}) + + let g:ale_buffer_info[bufnr('')].active_linter_list = ale#linter#Get('python') + Assert !empty(g:ale_buffer_info[bufnr('')].active_linter_list) + + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'method': 'textDocument/publishDiagnostics', + \ 'params': { + \ 'uri': ale#path#ToFileURI(g:dir . '/filename.py'), + \ 'diagnostics': [], + \ }, + \}) + + AssertEqual [], g:ale_buffer_info[bufnr('')].active_linter_list + +Execute(LSP errors should be logged in the history): + call ale#lsp_linter#SetLSPLinterMap({'347': 'foobar'}) + call ale#lsp_linter#HandleLSPResponse(347, { + \ 'jsonrpc': '2.0', + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': { + \ 'traceback': ['123', '456'], + \ }, + \ }, + \}) + + AssertEqual + \ {'foobar': ["xyz\n123\n456"]}, + \ get(g:, 'ale_lsp_error_messages', {}) diff --git a/dot_vim/plugged/ale/test/lsp/test_handling_window_requests.vader b/dot_vim/plugged/ale/test/lsp/test_handling_window_requests.vader new file mode 100644 index 0000000..551d597 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_handling_window_requests.vader @@ -0,0 +1,94 @@ +Before: + let g:expr_list = [] + let g:linter_name = 'some_linter' + let g:format = '%severity%:%linter%: %s' + " Get the default value to restore it + let g:default_severity = g:ale_lsp_show_message_severity + let g:ale_lsp_show_message_severity = 'information' + + function! ale#util#ShowMessage(expr) abort + call add(g:expr_list, a:expr) + endfunction + +After: + unlet! g:expr_list + unlet! g:linter_name + unlet! g:format + let g:ale_lsp_show_message_severity = g:default_severity + unlet! g:default_severity + +Execute(ale#lsp_window#HandleShowMessage() should only show errors when severity is set to "error"): + let g:ale_lsp_show_message_severity = 'error' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual ['Error:some_linter: an error'], g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should only show errors and warnings when severity is set to "warning"): + let g:ale_lsp_show_message_severity = 'warning' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual ['Error:some_linter: an error', 'Warning:some_linter: a warning'], g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should only show errors, warnings and infos when severity is set to "information"): + let g:ale_lsp_show_message_severity = 'information' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual [ + \ 'Error:some_linter: an error', + \ 'Warning:some_linter: a warning', + \ 'Info:some_linter: an info'], + \ g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should only show errors, warnings and infos when severity is set to "info"): + let g:ale_lsp_show_message_severity = 'info' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual [ + \ 'Error:some_linter: an error', + \ 'Warning:some_linter: a warning', + \ 'Info:some_linter: an info'], + \ g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should show all messages is severity is set to "log"): + let g:ale_lsp_show_message_severity = 'log' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual [ + \ 'Error:some_linter: an error', + \ 'Warning:some_linter: a warning', + \ 'Info:some_linter: an info', + \ 'Log:some_linter: a log'], + \ g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should not show anything if severity is configured as disabled): + let g:ale_lsp_show_message_severity = 'disabled' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual [], g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should use "warning" when severity is set to an invalid value): + let g:ale_lsp_show_message_severity = 'foo' + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':1,'message':'an error'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':2,'message':'a warning'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':'an info'}) + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':4,'message':'a log'}) + AssertEqual [ + \ 'Error:some_linter: an error', + \ 'Warning:some_linter: a warning'], + \ g:expr_list + +Execute(ale#lsp_window#HandleShowMessage() should escape quotes on messages): + call ale#lsp_window#HandleShowMessage(g:linter_name, g:format, {'type':3,'message':"this is an 'info'"}) + AssertEqual ['Info:some_linter: this is an ''info'''], g:expr_list diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_client_messages.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_client_messages.vader new file mode 100644 index 0000000..4d897b5 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_client_messages.vader @@ -0,0 +1,389 @@ +Before: + let g:ale_lsp_next_version_id = 1 + + call ale#test#SetDirectory('/testplugin/test/lsp') + call ale#test#SetFilename('foo/bar.ts') + +After: + call ale#test#RestoreDirectory() + +Execute(ale#lsp#message#Initialize() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'initialize', + \ { + \ 'processId': getpid(), + \ 'rootPath': '/foo/bar', + \ 'capabilities': {}, + \ 'initializationOptions': {'foo': 'bar'}, + \ 'rootUri': 'file:///foo/bar', + \ } + \ ], + \ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'}, {}) + +Execute(ale#lsp#message#Initialized() should return correct messages): + AssertEqual [1, 'initialized', {}], ale#lsp#message#Initialized() + +Execute(ale#lsp#message#Shutdown() should return correct messages): + AssertEqual [0, 'shutdown'], ale#lsp#message#Shutdown() + +Execute(ale#lsp#message#Exit() should return correct messages): + AssertEqual [1, 'exit'], ale#lsp#message#Exit(), + +Given typescript(A TypeScript file with 3 lines): + foo() + bar() + baz() + +Execute(ale#lsp#message#DidOpen() should return correct messages): + let g:ale_lsp_next_version_id = 12 + AssertEqual + \ [ + \ 1, + \ 'textDocument/didOpen', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ 'languageId': 'typescript', + \ 'version': 12, + \ 'text': "foo()\nbar()\nbaz()\n", + \ }, + \ } + \ ], + \ ale#lsp#message#DidOpen(bufnr(''), 'typescript') + +Execute(ale#lsp#message#DidChange() should return correct messages): + let g:ale_lsp_next_version_id = 34 + + AssertEqual + \ [ + \ 1, + \ 'textDocument/didChange', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ 'version': 34, + \ }, + \ 'contentChanges': [{'text': "foo()\nbar()\nbaz()\n"}], + \ } + \ ], + \ ale#lsp#message#DidChange(bufnr('')) + " The version numbers should increment. + AssertEqual + \ 35, + \ ale#lsp#message#DidChange(bufnr(''))[2].textDocument.version + AssertEqual + \ 36, + \ ale#lsp#message#DidChange(bufnr(''))[2].textDocument.version + +Execute(ale#lsp#message#DidSave() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'textDocument/didSave', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ } + \ ], + \ ale#lsp#message#DidSave(bufnr(''), v:false) + +Execute(ale#lsp#message#DidSave() should return correct message with includeText capability): + AssertEqual + \ [ + \ 1, + \ 'textDocument/didSave', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ 'version': 1, + \ }, + \ 'text': ale#util#GetBufferContents(bufnr('')), + \ } + \ ], + \ ale#lsp#message#DidSave(bufnr(''), v:true) + +Execute(ale#lsp#message#DidClose() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'textDocument/didClose', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ } + \ ], + \ ale#lsp#message#DidClose(bufnr('')) + +Execute(ale#lsp#message#Completion() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/completion', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Completion(bufnr(''), 12, 34, '') + +Execute(ale#lsp#message#Completion() should return correct messages with a trigger charaacter): + AssertEqual + \ [ + \ 0, + \ 'textDocument/completion', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ 'context': {'triggerKind': 2, 'triggerCharacter': '.'}, + \ } + \ ], + \ ale#lsp#message#Completion(bufnr(''), 12, 34, '.') + \ +Execute(ale#lsp#message#Definition() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/definition', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Definition(bufnr(''), 12, 34) + +Execute(ale#lsp#message#TypeDefinition() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/typeDefinition', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#TypeDefinition(bufnr(''), 12, 34) + +Execute(ale#lsp#message#Implementation() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/implementation', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Implementation(bufnr(''), 12, 34) + +Execute(ale#lsp#message#References() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/references', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ 'context': {'includeDeclaration': v:false}, + \ } + \ ], + \ ale#lsp#message#References(bufnr(''), 12, 34) + +Execute(ale#lsp#message#Symbol() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'workspace/symbol', + \ { + \ 'query': 'foobar', + \ } + \ ], + \ ale#lsp#message#Symbol('foobar') + +Execute(ale#lsp#message#Hover() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/hover', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Hover(bufnr(''), 12, 34) + +Execute(ale#lsp#message#DidChangeConfiguration() should return correct messages): + let g:ale_lsp_configuration = { + \ 'foo': 'bar' + \ } + AssertEqual + \ [ + \ 1, + \ 'workspace/didChangeConfiguration', + \ { + \ 'settings': { + \ 'foo': 'bar', + \ } + \ } + \ ], + \ ale#lsp#message#DidChangeConfiguration(bufnr(''), g:ale_lsp_configuration) + +Execute(ale#lsp#tsserver_message#Open() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'ts@open', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ } + \ ], + \ ale#lsp#tsserver_message#Open(bufnr('')) + +Execute(ale#lsp#tsserver_message#Close() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'ts@close', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ } + \ ], + \ ale#lsp#tsserver_message#Close(bufnr('')) + +Execute(ale#lsp#tsserver_message#Change() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'ts@change', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 1, + \ 'offset': 1, + \ 'endLine': 1073741824, + \ 'endOffset': 1, + \ 'insertString': "foo()\nbar()\nbaz()\n", + \ } + \ ], + \ ale#lsp#tsserver_message#Change(bufnr('')) + +Execute(ale#lsp#tsserver_message#Geterr() should return correct messages): + AssertEqual + \ [ + \ 1, + \ 'ts@geterr', + \ { + \ 'files': [ale#path#Simplify(g:dir . '/foo/bar.ts')], + \ } + \ ], + \ ale#lsp#tsserver_message#Geterr(bufnr('')) + +Execute(ale#lsp#tsserver_message#Completions() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@completions', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ 'prefix': 'abc', + \ 'includeExternalModuleExports': 1, + \ } + \ ], + \ ale#lsp#tsserver_message#Completions(bufnr(''), 347, 12, 'abc', 1) + +Execute(ale#lsp#tsserver_message#CompletionEntryDetails() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@completionEntryDetails', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ 'entryNames': ['foo', 'bar'], + \ } + \ ], + \ ale#lsp#tsserver_message#CompletionEntryDetails(bufnr(''), 347, 12, ['foo', 'bar']) + +Execute(ale#lsp#tsserver_message#Definition() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@definition', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#Definition(bufnr(''), 347, 12) + +Execute(ale#lsp#tsserver_message#TypeDefinition() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@typeDefinition', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#TypeDefinition(bufnr(''), 347, 12) + +Execute(ale#lsp#tsserver_message#Implementation() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@implementation', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#Implementation(bufnr(''), 347, 12) + +Execute(ale#lsp#tsserver_message#References() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@references', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#References(bufnr(''), 347, 12) + +Execute(ale#lsp#tsserver_message#Quickinfo() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'ts@quickinfo', + \ { + \ 'file': ale#path#Simplify(g:dir . '/foo/bar.ts'), + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#Quickinfo(bufnr(''), 347, 12) diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_command_formatting.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_command_formatting.vader new file mode 100644 index 0000000..e99e1da --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_command_formatting.vader @@ -0,0 +1,44 @@ +Before: + Save g:ale_command_wrapper + + runtime autoload/ale/lsp.vim + + let g:ale_command_wrapper = '' + + let g:args = [] + + " Mock the StartProgram function so we can just capture the arguments. + function! ale#lsp#StartProgram(...) abort + let g:args = a:000[1:] + endfunction + +After: + Restore + + unlet! g:args + + runtime autoload/ale/lsp.vim + +Execute(Command formatting should be applied correctly for LSP linters): + call ale#lsp_linter#StartLSP( + \ bufnr(''), + \ { + \ 'name': 'linter', + \ 'language': {-> 'x'}, + \ 'project_root': {-> '/foo/bar'}, + \ 'lsp': 'stdio', + \ 'executable': has('win32') ? 'cmd': 'true', + \ 'command': '%e --foo', + \ }, + \ {-> 0} + \) + + if has('win32') + AssertEqual + \ ['cmd', 'cmd /s/c "cmd --foo"'], + \ g:args + else + AssertEqual + \ ['true', [&shell, '-c', '''true'' --foo']], + \ g:args + endif diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_connections.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_connections.vader new file mode 100644 index 0000000..1c2fcea --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_connections.vader @@ -0,0 +1,227 @@ +Before: + let g:ale_lsp_next_message_id = 1 + +After: + if exists('b:conn') && has_key(b:conn, 'id') + call ale#lsp#RemoveConnectionWithID(b:conn.id) + endif + + unlet! b:data + unlet! b:conn + +Execute(GetNextMessageID() should increment appropriately): + " We should get the initial ID, and increment a bit. + AssertEqual 1, ale#lsp#GetNextMessageID() + AssertEqual 2, ale#lsp#GetNextMessageID() + AssertEqual 3, ale#lsp#GetNextMessageID() + + " Set the maximum ID. + let g:ale_lsp_next_message_id = 9223372036854775807 + + " When we hit the maximum ID, the next ID afterwards should be 1. + AssertEqual 9223372036854775807, ale#lsp#GetNextMessageID() + AssertEqual 1, ale#lsp#GetNextMessageID() + +Execute(ale#lsp#CreateMessageData() should create an appropriate message): + " NeoVim outputs JSON with spaces, so the output is a little different. + if has('nvim') + " 79 is the size in bytes for UTF-8, not the number of characters. + AssertEqual + \ [ + \ 1, + \ "Content-Length: 79\r\n\r\n" + \ . '{"method": "someMethod", "jsonrpc": "2.0", "id": 1, "params": {"foo": "barÜ"}}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}]) + " Check again to ensure that we use the next ID. + AssertEqual + \ [ + \ 2, + \ "Content-Length: 79\r\n\r\n" + \ . '{"method": "someMethod", "jsonrpc": "2.0", "id": 2, "params": {"foo": "barÜ"}}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}]) + else + AssertEqual + \ [ + \ 1, + \ "Content-Length: 71\r\n\r\n" + \ . '{"method":"someMethod","jsonrpc":"2.0","id":1,"params":{"foo":"barÜ"}}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}]) + AssertEqual + \ [ + \ 2, + \ "Content-Length: 71\r\n\r\n" + \ . '{"method":"someMethod","jsonrpc":"2.0","id":2,"params":{"foo":"barÜ"}}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someMethod', {'foo': 'barÜ'}]) + endif + +Execute(ale#lsp#CreateMessageData() should create messages without params): + if has('nvim') + AssertEqual + \ [ + \ 1, + \ "Content-Length: 56\r\n\r\n" + \ . '{"method": "someOtherMethod", "jsonrpc": "2.0", "id": 1}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someOtherMethod']) + else + AssertEqual + \ [ + \ 1, + \ "Content-Length: 51\r\n\r\n" + \ . '{"method":"someOtherMethod","jsonrpc":"2.0","id":1}', + \ ], + \ ale#lsp#CreateMessageData([0, 'someOtherMethod']) + endif + +Execute(ale#lsp#CreateMessageData() should create notifications): + if has('nvim') + AssertEqual + \ [ + \ 0, + \ "Content-Length: 48\r\n\r\n" + \ . '{"method": "someNotification", "jsonrpc": "2.0"}', + \ ], + \ ale#lsp#CreateMessageData([1, 'someNotification']) + AssertEqual + \ [ + \ 0, + \ "Content-Length: 74\r\n\r\n" + \ . '{"method": "someNotification", "jsonrpc": "2.0", "params": {"foo": "bar"}}', + \ ], + \ ale#lsp#CreateMessageData([1, 'someNotification', {'foo': 'bar'}]) + else + AssertEqual + \ [ + \ 0, + \ "Content-Length: 45\r\n\r\n" + \ . '{"method":"someNotification","jsonrpc":"2.0"}', + \ ], + \ ale#lsp#CreateMessageData([1, 'someNotification']) + AssertEqual + \ [ + \ 0, + \ "Content-Length: 68\r\n\r\n" + \ . '{"method":"someNotification","jsonrpc":"2.0","params":{"foo":"bar"}}', + \ ], + \ ale#lsp#CreateMessageData([1, 'someNotification', {'foo': 'bar'}]) + endif + +Execute(ale#lsp#CreateMessageData() should create tsserver notification messages): + if has('nvim') + AssertEqual + \ [ + \ 0, + \ '{"seq": null, "type": "request", "command": "someNotification"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([1, 'ts@someNotification']) + AssertEqual + \ [ + \ 0, + \ '{"seq": null, "arguments": {"foo": "bar"}, "type": "request", "command": "someNotification"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([1, 'ts@someNotification', {'foo': 'bar'}]) + else + AssertEqual + \ [ + \ 0, + \ '{"seq":null,"type":"request","command":"someNotification"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([1, 'ts@someNotification']) + AssertEqual + \ [ + \ 0, + \ '{"seq":null,"arguments":{"foo":"bar"},"type":"request","command":"someNotification"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([1, 'ts@someNotification', {'foo': 'bar'}]) + endif + +Execute(ale#lsp#CreateMessageData() should create tsserver messages expecting responses): + if has('nvim') + AssertEqual + \ [ + \ 1, + \ '{"seq": 1, "type": "request", "command": "someMessage"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([0, 'ts@someMessage']) + AssertEqual + \ [ + \ 2, + \ '{"seq": 2, "arguments": {"foo": "bar"}, "type": "request", "command": "someMessage"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([0, 'ts@someMessage', {'foo': 'bar'}]) + else + AssertEqual + \ [ + \ 1, + \ '{"seq":1,"type":"request","command":"someMessage"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([0, 'ts@someMessage']) + AssertEqual + \ [ + \ 2, + \ '{"seq":2,"arguments":{"foo":"bar"},"type":"request","command":"someMessage"}' + \ . "\n", + \ ], + \ ale#lsp#CreateMessageData([0, 'ts@someMessage', {'foo': 'bar'}]) + endif + +Execute(ale#lsp#ReadMessageData() should read single whole messages): + AssertEqual + \ ['', [{'id': 2, 'jsonrpc': '2.0', 'result': {'foo': 'barÜ'}}]], + \ ale#lsp#ReadMessageData( + \ "Content-Length: 49\r\n\r\n" + \ . '{"id":2,"jsonrpc":"2.0","result":{"foo":"barÜ"}}' + \ ) + +Execute(ale#lsp#ReadMessageData() should ignore other headers): + AssertEqual + \ ['', [{'id': 2, 'jsonrpc': '2.0', 'result': {'foo': 'barÜ'}}]], + \ ale#lsp#ReadMessageData( + \ "First-Header: 49\r\n" + \ . "Content-Length: 49\r\n" + \ . "Other-Header: 49\r\n" + \ . "\r\n" + \ . '{"id":2,"jsonrpc":"2.0","result":{"foo":"barÜ"}}' + \ ) + +Execute(ale#lsp#ReadMessageData() should handle partial messages): + let b:data = "Content-Length: 49\r\n\r\n" . '{"id":2,"jsonrpc":"2.0","result":' + + AssertEqual [b:data, []], ale#lsp#ReadMessageData(b:data) + +Execute(ale#lsp#ReadMessageData() should handle multiple messages): + AssertEqual + \ ['', [ + \ {'id': 2, 'jsonrpc': '2.0', 'result': {'foo': 'barÜ'}}, + \ {'id': 2, 'jsonrpc': '2.0', 'result': {'foo123': 'barÜ'}}, + \ ]], + \ ale#lsp#ReadMessageData( + \ "Content-Length: 49\r\n\r\n" + \ . '{"id":2,"jsonrpc":"2.0","result":{"foo":"barÜ"}}' + \ . "Content-Length: 52\r\n\r\n" + \ . '{"id":2,"jsonrpc":"2.0","result":{"foo123":"barÜ"}}' + \ ) + +Execute(ale#lsp#ReadMessageData() should handle a message with part of a second message): + let b:data = "Content-Length: 52\r\n\r\n" . '{"id":2,"jsonrpc":"2.' + + AssertEqual + \ [b:data, [ + \ {'id': 2, 'jsonrpc': '2.0', 'result': {'foo': 'barÜ'}}, + \ ]], + \ ale#lsp#ReadMessageData( + \ "Content-Length: 49\r\n\r\n" + \ . '{"id":2,"jsonrpc":"2.0","result":{"foo":"barÜ"}}' + \ . b:data + \ ) diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_custom_request.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_custom_request.vader new file mode 100644 index 0000000..c8767e5 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_custom_request.vader @@ -0,0 +1,158 @@ +Before: + runtime autoload/ale/linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + + let g:address = 'ccls_address' + let g:conn_id = -1 + let g:executable = 'ccls' + let g:executable_or_address = '' + let g:linter_name = 'ccls' + let g:magic_number = 42 + let g:no_result = 0 + let g:message_list = [] + let g:message_id = 1 + let g:method = '$ccls/call' + let g:parameters = {} + let g:project_root = '/project/root' + let g:response = '' + let g:return_value = -1 + + let g:linter_list = [{ + \ 'output_stream': 'stdout', + \ 'lint_file': 0, + \ 'language': 'cpp', + \ 'name': g:linter_name, + \ 'project_root': {b -> g:project_root}, + \ 'aliases': [], + \ 'read_buffer': 1, + \ 'command': '%e' + \ }] + + let g:callback_result = g:no_result + + " Encode dictionary to jsonrpc + function! Encode(obj) abort + let l:body = json_encode(a:obj) + return 'Content-Length: ' . strlen(l:body) . "\r\n\r\n" . l:body + endfunction + + " Replace the StartLSP function to mock an LSP linter + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register(g:executable_or_address, g:project_root, {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + call ale#lsp#HandleMessage(g:conn_id, Encode({'method': 'initialize'})) + + let l:details = { + \ 'command': g:executable, + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': g:project_root, + \} + + call ale#lsp_linter#OnInit(a:linter, l:details, a:Callback) + endfunction + + " Dummy callback + function! Callback(response) abort + let g:callback_result = a:response.result.value + endfunction + + " Replace the GetAll function to mock an LSP linter + function! ale#linter#GetAll(filetype) abort + return g:linter_list + endfunction + + " Replace the Send function to mock an LSP linter + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + return g:message_id + endfunction + + " Code for a test case + function! TestCase(is_notification) abort + " Test sending a custom request + let g:return_value = ale#lsp_linter#SendRequest( + \ bufnr('%'), + \ g:linter_name, + \ [a:is_notification, g:method, g:parameters], + \ function('Callback')) + + Assert index(g:message_list, [a:is_notification, g:method, g:parameters]) >= 0 + + " Mock an incoming response to the request + let g:response = Encode({ + \ 'id': g:message_id, + \ 'jsonrpc': '2.0', + \ 'result': {'value': g:magic_number} + \ }) + call ale#lsp#HandleMessage(g:conn_id, g:response) + + AssertEqual + \ a:is_notification ? g:no_result : g:magic_number, + \ g:callback_result + endfunction + +After: + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + unlet! g:callback_result + unlet! g:conn_id + unlet! g:executable + unlet! g:is_notification + unlet! g:linter_name + unlet! g:magic_number + unlet! g:message_list + unlet! g:message_id + unlet! g:method + unlet! g:no_result + unlet! g:parameters + unlet! g:project_root + unlet! g:response + unlet! g:return_value + + delfunction Encode + delfunction Callback + delfunction TestCase + + runtime autoload/ale/linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + +Given cpp(Empty cpp file): +Execute(Test custom request to server identified by executable): + let g:executable_or_address = g:executable + let g:linter_list[0].executable = {b -> g:executable} + let g:linter_list[0].lsp = 'stdio' + let g:is_notification = 0 + + call TestCase(g:is_notification) + +Given cpp(Empty cpp file): +Execute(Test custom notification to server identified by executable): + let g:executable_or_address = g:executable + let g:linter_list[0].executable = {b -> g:executable} + let g:linter_list[0].lsp = 'stdio' + let g:is_notification = 1 + + call TestCase(g:is_notification) + +Given cpp(Empty cpp file): +Execute(Test custom request to server identified by address): + let g:executable_or_address = g:address + let g:linter_list[0].address = {b -> g:address} + let g:linter_list[0].lsp = 'socket' + let g:is_notification = 0 + + call TestCase(g:is_notification) + +Given cpp(Empty cpp file): +Execute(Test custom notification to server identified by address): + let g:executable_or_address = g:address + let g:linter_list[0].address = {b -> g:address} + let g:linter_list[0].lsp = 'socket' + let g:is_notification = 1 + + call TestCase(g:is_notification) diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_error_parsing.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_error_parsing.vader new file mode 100644 index 0000000..44169c8 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_error_parsing.vader @@ -0,0 +1,74 @@ +Execute(Invalid responses should be handled): + AssertEqual '', ale#lsp#response#GetErrorMessage({}) + AssertEqual '', ale#lsp#response#GetErrorMessage({'error': 0}) + AssertEqual '', ale#lsp#response#GetErrorMessage({'error': {}}) + AssertEqual '', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': 0, + \ 'message': 'x', + \ }, + \}) + AssertEqual '', ale#lsp#response#GetErrorMessage({'error': {'code': -32602}}) + AssertEqual '', ale#lsp#response#GetErrorMessage({'error': {'code': -32603}}) + +Execute(Messages without tracebacks should be handled): + AssertEqual 'xyz', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ }, + \}) + AssertEqual 'abc', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32603, + \ 'message': 'abc', + \ }, + \}) + +Execute(Invalid traceback data should be tolerated): + AssertEqual 'xyz', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': { + \ }, + \ }, + \}) + AssertEqual 'xyz', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': { + \ 'traceback': 0, + \ }, + \ }, + \}) + AssertEqual 'xyz', ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': { + \ 'traceback': [], + \ }, + \ }, + \}) + +Execute(Messages with tracebacks should be handled): + AssertEqual "xyz\n123\n456", ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': { + \ 'traceback': ['123', '456'], + \ }, + \ }, + \}) + +Execute(Messages with string data should be handled): + AssertEqual "xyz\nUncaught Exception", ale#lsp#response#GetErrorMessage({ + \ 'error': { + \ 'code': -32602, + \ 'message': 'xyz', + \ 'data': 'Uncaught Exception', + \ }, + \}) diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_root_detection.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_root_detection.vader new file mode 100644 index 0000000..291300f --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_root_detection.vader @@ -0,0 +1,90 @@ +Before: + Save g:ale_lsp_root + Save g:ale_root + Save b:ale_lsp_root + Save b:ale_root + + unlet! g:ale_lsp_root + let g:ale_root = {} + + call ale#assert#SetUpLinterTest('c', 'clangd') + + function! Hook1(buffer) + return 'abc123' + endfunction + +After: + Restore + + delfunction Hook1 + + call ale#assert#TearDownLinterTest() + +Execute(The buffer-specific variable can be a string): + let b:ale_root = '/some/path' + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The buffer-specific variable can be a dictionary): + let b:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The buffer-specific variable can have funcrefs): + let b:ale_root = {'clangd': function('Hook1'), 'golangserver': '/path'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject 'abc123' + +Execute(The buffer-specific variable can be the old ale_lsp_root setting): + let b:ale_lsp_root = '/some/path' + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The global variable can be a dictionary): + let g:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The global variable can have funcrefs): + let g:ale_root = {'clangd': function('Hook1'), 'golangserver': '/path'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject 'abc123' + +Execute(The buffer-specific variable overrides the global variable): + let b:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'} + let g:ale_root = {'clangd': '/not/this/path', 'golangserver': '/elsewhere'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The global variable is queried if the buffer-specific has no value): + let b:ale_root = {'golangserver': '/other/path'} + let g:ale_root = {'clangd': '/some/path', 'golangserver': '/elsewhere'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(The global variable can be the old ale_lsp_root setting): + let g:ale_root = {} + let g:ale_lsp_root = {'clangd': '/some/path', 'golangserver': '/other/path'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(A non-empty ale_root setting should replace the old ale_lsp_root): + let g:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'} + let g:ale_lsp_root = {'clangd': '/xxx', 'golangserver': '/xxx'} + call ale#test#SetFilename('other-file.c') + + AssertLSPProject '/some/path' + +Execute(No path should be returned by default): + call ale#test#SetFilename(tempname() . '/other-file.c') + + AssertLSPProject '' diff --git a/dot_vim/plugged/ale/test/lsp/test_lsp_startup.vader b/dot_vim/plugged/ale/test/lsp/test_lsp_startup.vader new file mode 100644 index 0000000..7417dbc --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_lsp_startup.vader @@ -0,0 +1,492 @@ +Before: + Save g:ale_run_synchronously + + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + unlet! g:ale_run_synchronously_emulate_commands + + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/engine.vim + runtime autoload/ale/job.vim + runtime autoload/ale/socket.vim + + let g:job_map = {} + let g:emulate_job_failure = 0 + let g:next_job_id = 1 + let g:lsp_started = 0 + + let g:socket_map = {} + let g:emulate_socket_failure = 0 + let g:next_channel_id = 0 + + let g:message_buffer = '' + let g:calls = [] + + function! ale#engine#IsExecutable(buffer, executable) abort + return !empty(a:executable) + endfunction + + function! ale#job#HasOpenChannel(job_id) abort + return has_key(g:job_map, a:job_id) + endfunction + + function! ale#job#Stop(job_id) abort + if has_key(g:job_map, a:job_id) + call remove(g:job_map, a:job_id) + endif + endfunction + + function! ale#job#Start(command, options) abort + if g:emulate_job_failure + return 0 + endif + + let l:job_id = g:next_job_id + let g:next_job_id += 1 + let g:job_map[l:job_id] = [a:command, a:options] + + return l:job_id + endfunction + + function! ale#job#SendRaw(job_id, data) abort + let g:message_buffer .= a:data + endfunction + + function! ale#socket#IsOpen(channel_id) abort + return has_key(g:socket_map, a:channel_id) + endfunction + + function! ale#socket#Close(channel_id) abort + if has_key(g:socket_map, a:channel_id) + call remove(g:socket_map, a:channel_id) + endif + endfunction + + function! ale#socket#Open(address, options) abort + if g:emulate_socket_failure + return -1 + endif + + let l:channel_id = g:next_channel_id + let g:next_channel_id += 1 + let g:socket_map[l:channel_id] = [a:address, a:options] + + return l:channel_id + endfunction + + function! ale#socket#Send(channel_id, data) abort + let g:message_buffer .= a:data + endfunction + + function! PopMessages() abort + let l:message_list = [] + + for l:line in split(g:message_buffer, '\(\r\|\n\|Content-Length\)\+') + if l:line[:0] is '{' + let l:data = json_decode(l:line) + + call add(l:message_list, l:data) + endif + endfor + + let g:message_buffer = '' + + return l:message_list + endfunction + + function! SendMessage(message) abort + let l:conn_id = keys(ale#lsp#GetConnections())[0] + let l:body = json_encode(a:message) + let l:data = 'Content-Length: ' . strlen(l:body) . "\r\n\r\n" . l:body + + call ale#lsp#HandleMessage(l:conn_id, l:data) + endfunction + + function! Start(buffer) abort + let l:linter = values(ale#linter#GetLintersLoaded())[0][0] + + return ale#lsp_linter#StartLSP( + \ a:buffer, + \ l:linter, + \ {linter, details -> add(g:calls, [linter.name, details])}, + \) + endfunction + + function! AssertInitSuccess(linter_name, conn_prefix, language, root, command, buffer) abort + let l:messages = PopMessages() + + if a:linter_name is# 'tsserver' + AssertEqual + \ [ + \ { + \ 'seq': v:null, + \ 'arguments': { + \ 'file': expand('#' . a:buffer . ':p'), + \ }, + \ 'type': 'request', + \ 'command': 'open', + \ }, + \ ], + \ l:messages + else + AssertEqual + \ [ + \ { + \ 'method': 'initialize', + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'params': { + \ 'initializationOptions': {}, + \ 'rootUri': ale#path#ToFileURI(a:root), + \ 'rootPath': a:root, + \ 'processId': getpid(), + \ 'capabilities': { + \ 'workspace': { + \ 'applyEdit': v:false, + \ 'didChangeConfiguration': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'symbol': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'workspaceFolders': v:false, + \ 'configuration': v:false, + \ }, + \ 'textDocument': { + \ 'synchronization': { + \ 'dynamicRegistration': v:false, + \ 'willSave': v:false, + \ 'willSaveWaitUntil': v:false, + \ 'didSave': v:true, + \ }, + \ 'completion': { + \ 'dynamicRegistration': v:false, + \ 'completionItem': { + \ 'snippetSupport': v:false, + \ 'commitCharactersSupport': v:false, + \ 'documentationFormat': ['plaintext'], + \ 'deprecatedSupport': v:false, + \ 'preselectSupport': v:false, + \ }, + \ 'contextSupport': v:false, + \ }, + \ 'hover': { + \ 'dynamicRegistration': v:false, + \ 'contentFormat': ['plaintext'], + \ }, + \ 'references': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'documentSymbol': { + \ 'dynamicRegistration': v:false, + \ 'hierarchicalDocumentSymbolSupport': v:false, + \ }, + \ 'definition': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, + \ 'typeDefinition': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'implementation': { + \ 'dynamicRegistration': v:false, + \ 'linkSupport': v:false, + \ }, + \ 'publishDiagnostics': { + \ 'relatedInformation': v:true, + \ }, + \ 'codeAction': { + \ 'dynamicRegistration': v:false, + \ 'codeActionLiteralSupport': { + \ 'codeActionKind': { + \ 'valueSet': [] + \ } + \ } + \ }, + \ 'rename': { + \ 'dynamicRegistration': v:false, + \ }, + \ }, + \ }, + \ }, + \ }, + \ ], + \ l:messages + + call SendMessage({ + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': { + \ 'capabilities': { + \ 'renameProvider': v:true, + \ 'executeCommandProvider': { + \ 'commands': [], + \ }, + \ 'hoverProvider': v:true, + \ 'documentSymbolProvider': v:true, + \ 'documentRangeFormattingProvider': v:true, + \ 'codeLensProvider': { + \ 'resolveProvider': v:false + \ }, + \ 'referencesProvider': v:true, + \ 'textDocumentSync': 2, + \ 'documentFormattingProvider': v:true, + \ 'codeActionProvider': v:true, + \ 'signatureHelpProvider': { + \ 'triggerCharacters': ['(', ','], + \ }, + \ 'completionProvider': { + \ 'triggerCharacters': ['.'], + \ 'resolveProvider': v:false + \ }, + \ 'definitionProvider': v:true, + \ 'experimental': {}, + \ 'documentHighlightProvider': v:true, + \ 'workspaceSymbolProvider': v:true, + \ }, + \ }, + \}) + + let l:messages = PopMessages() + + AssertEqual + \ [ + \ { + \ 'method': 'initialized', + \ 'jsonrpc': '2.0', + \ 'params': {}, + \ }, + \ { + \ 'method': 'textDocument/didOpen', + \ 'jsonrpc': '2.0', + \ 'params': { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('#' . a:buffer . ':p')), + \ 'version': ale#lsp#message#GetNextVersionID() - 1, + \ 'languageId': a:language, + \ 'text': "\n", + \ }, + \ }, + \ }, + \ ], + \ l:messages + endif + + AssertEqual + \ [ + \ [ + \ a:linter_name, + \ { + \ 'connection_id': a:conn_prefix . ':' . a:root, + \ 'project_root': a:root, + \ 'buffer': a:buffer, + \ 'command': !empty(a:command) ? ale#job#PrepareCommand(a:buffer, a:command) : '', + \ }, + \ ], + \ ], + \ g:calls + endfunction + + function! AssertInitFailure() abort + let l:messages = PopMessages() + + AssertEqual [], l:messages + AssertEqual [], g:calls + endfunction + + call ale#linter#Reset() + +After: + Restore + + call ale#linter#Reset() + call ale#lsp#ResetConnections() + + unlet! g:ale_run_synchronously_callbacks + unlet! g:job_map + unlet! g:emulate_job_failure + unlet! g:next_job_id + unlet! g:lsp_started + + unlet! g:socket_map + unlet! g:emulate_socket_failure + unlet! g:next_channel_id + + unlet! g:message_buffer + unlet! g:calls + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + + delfunction PopMessages + delfunction Start + delfunction AssertInitSuccess + delfunction AssertInitFailure + + runtime autoload/ale/engine.vim + runtime autoload/ale/job.vim + runtime autoload/ale/socket.vim + +Execute(tsserver should be started correctly): + runtime ale_linters/typescript/tsserver.vim + + Assert Start(bufnr('')) + call AssertInitSuccess('tsserver', 'tsserver', '', '', ale#Escape('tsserver'), bufnr('')) + +Execute(tsserver failures should be handled appropriately): + runtime ale_linters/typescript/tsserver.vim + + let g:emulate_job_failure = 1 + + Assert !Start(bufnr('')) + call AssertInitFailure() + +Execute(LSP jobs should start correctly): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'stdio', + \ 'executable': 'foo', + \ 'command': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + Assert Start(bufnr('')) + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', 'foo', bufnr('')) + +Execute(LSP job failures should be handled): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'stdio', + \ 'executable': 'foo', + \ 'command': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + let g:emulate_job_failure = 1 + + Assert !Start(bufnr('')) + call AssertInitFailure() + +Execute(LSP TCP connections should start correctly): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + Assert Start(bufnr('')) + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', '', bufnr('')) + +Execute(LSP TCP connection failures should be handled): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + let g:emulate_socket_failure = 1 + + Assert !Start(bufnr('')) + call AssertInitFailure() + +Execute(Deferred executables should be handled correctly): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'stdio', + \ 'executable': {b -> ale#command#Run(b, 'echo', {-> 'foo'})}, + \ 'command': '%e -c', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + Assert Start(bufnr('')) + call ale#test#FlushJobs() + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', ale#Escape('foo') . ' -c', bufnr('')) + +Execute(Deferred commands should be handled correctly): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'stdio', + \ 'executable': 'foo', + \ 'command': {b -> ale#command#Run(b, 'echo', {-> '%e -c'})}, + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + Assert Start(bufnr('')) + call ale#test#FlushJobs() + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', ale#Escape('foo') . ' -c', bufnr('')) + +Execute(Deferred addresses should be handled correctly): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': {b -> ale#command#Run(b, 'echo', {-> 'localhost:1234'})}, + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + Assert Start(bufnr('')) + call ale#test#FlushJobs() + call AssertInitSuccess('foo', 'localhost:1234', 'foobar', '/foo/bar', '', bufnr('')) + +Execute(Servers that have crashed should be restarted): + call ale#lsp#Register('foo', '/foo/bar', {}) + call extend(ale#lsp#GetConnections()['foo:/foo/bar'], {'initialized': 1}) + + " Starting the program again should reset initialized to `0`. + call ale#lsp#StartProgram('foo:/foo/bar', 'foobar', 'foobar --start') + + AssertEqual 0, ale#lsp#GetConnections()['foo:/foo/bar']['initialized'] + AssertEqual ['initialize'], map(PopMessages(), 'v:val[''method'']') + +Execute(Current LSP buffer should receive ALELSPStarted): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + augroup VaderTest + autocmd! + autocmd User ALELSPStarted let g:lsp_started = 1 + augroup END + + Assert Start(bufnr('')) + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', '', bufnr('')) + AssertEqual g:lsp_started, 1 + +Execute(Target LSP buffer should receive ALELSPStarted): + call ale#linter#Define('foobar', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'foo', + \ 'project_root': '/foo/bar', + \ 'initialization_options': {}, + \}) + + augroup VaderTest + autocmd! + autocmd User ALELSPStarted let g:lsp_started = 1 + augroup END + + let buffer = bufnr('') + + enew! + Assert Start(buffer) + call AssertInitSuccess('foo', 'foo', 'foobar', '/foo/bar', '', buffer) + execute 'buffer' . buffer + + AssertEqual g:lsp_started, 1 diff --git a/dot_vim/plugged/ale/test/lsp/test_other_initialize_message_handling.vader b/dot_vim/plugged/ale/test/lsp/test_other_initialize_message_handling.vader new file mode 100644 index 0000000..6711c74 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_other_initialize_message_handling.vader @@ -0,0 +1,216 @@ +Before: + runtime autoload/ale/lsp.vim + + let g:message_list = [] + let b:conn = { + \ 'id': 1, + \ 'is_tsserver': 0, + \ 'data': '', + \ 'root': '/foo/bar', + \ 'open_documents': {}, + \ 'initialized': 0, + \ 'init_request_id': 0, + \ 'init_options': {}, + \ 'config': {}, + \ 'callback_list': [], + \ 'message_queue': [], + \ 'init_queue': [], + \ 'capabilities': { + \ 'hover': 0, + \ 'rename': 0, + \ 'references': 0, + \ 'completion': 0, + \ 'completion_trigger_characters': [], + \ 'definition': 0, + \ 'symbol_search': 0, + \ 'code_actions': 0, + \ }, + \} + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + +After: + unlet! b:conn + unlet! g:message_list + + runtime autoload/ale/lsp.vim + +Execute(Messages with no method and capabilities should initialize projects): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'result': {'capabilities': {}}, + \}) + + AssertEqual 1, b:conn.initialized + AssertEqual [[1, 'initialized', {}]], g:message_list + +Execute(Other messages should not initialize projects): + call ale#lsp#HandleInitResponse(b:conn, {'method': 'lolwat'}) + + AssertEqual 0, b:conn.initialized + AssertEqual [], g:message_list + + call ale#lsp#HandleInitResponse(b:conn, {'result': {'x': {}}}) + + AssertEqual 0, b:conn.initialized + AssertEqual [], g:message_list + +Execute(Capabilities should bet set up correctly): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': { + \ 'capabilities': { + \ 'renameProvider': v:true, + \ 'executeCommandProvider': { + \ 'commands': [], + \ }, + \ 'hoverProvider': v:true, + \ 'documentSymbolProvider': v:true, + \ 'documentRangeFormattingProvider': v:true, + \ 'codeLensProvider': { + \ 'resolveProvider': v:false + \ }, + \ 'referencesProvider': v:true, + \ 'textDocumentSync': 2, + \ 'documentFormattingProvider': v:true, + \ 'codeActionProvider': v:true, + \ 'signatureHelpProvider': { + \ 'triggerCharacters': ['(', ','], + \ }, + \ 'completionProvider': { + \ 'triggerCharacters': ['.'], + \ 'resolveProvider': v:false + \ }, + \ 'definitionProvider': v:true, + \ 'experimental': {}, + \ 'documentHighlightProvider': v:true, + \ 'workspaceSymbolProvider': v:true + \ }, + \ }, + \}) + + AssertEqual 1, b:conn.initialized + AssertEqual + \ { + \ 'completion_trigger_characters': ['.'], + \ 'completion': 1, + \ 'references': 1, + \ 'hover': 1, + \ 'definition': 1, + \ 'symbol_search': 1, + \ 'rename': 1, + \ 'code_actions': 1, + \ }, + \ b:conn.capabilities + AssertEqual [[1, 'initialized', {}]], g:message_list + +Execute(Disabled capabilities should be recognised correctly): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': { + \ 'capabilities': { + \ 'renameProvider': v:false, + \ 'executeCommandProvider': { + \ 'commands': [], + \ }, + \ 'hoverProvider': v:false, + \ 'documentSymbolProvider': v:true, + \ 'documentRangeFormattingProvider': v:true, + \ 'codeLensProvider': { + \ 'resolveProvider': v:false + \ }, + \ 'referencesProvider': v:false, + \ 'textDocumentSync': 2, + \ 'documentFormattingProvider': v:true, + \ 'codeActionProvider': v:false, + \ 'signatureHelpProvider': { + \ 'triggerCharacters': ['(', ','], + \ }, + \ 'definitionProvider': v:false, + \ 'experimental': {}, + \ 'documentHighlightProvider': v:true, + \ }, + \ }, + \}) + + AssertEqual 1, b:conn.initialized + AssertEqual + \ { + \ 'completion_trigger_characters': [], + \ 'completion': 0, + \ 'references': 0, + \ 'hover': 0, + \ 'definition': 0, + \ 'symbol_search': 0, + \ 'rename': 0, + \ 'code_actions': 0, + \ }, + \ b:conn.capabilities + AssertEqual [[1, 'initialized', {}]], g:message_list + +Execute(Capabilities should be enabled when send as Dictionaries): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': { + \ 'capabilities': { + \ 'renameProvider': {}, + \ 'executeCommandProvider': { + \ 'commands': [], + \ }, + \ 'hoverProvider': {}, + \ 'documentSymbolProvider': v:true, + \ 'documentRangeFormattingProvider': v:true, + \ 'codeLensProvider': { + \ 'resolveProvider': v:false + \ }, + \ 'completionProvider': { + \ 'triggerCharacters': ['.'], + \ 'resolveProvider': v:false + \ }, + \ 'referencesProvider': {}, + \ 'textDocumentSync': 2, + \ 'documentFormattingProvider': v:true, + \ 'codeActionProvider': v:true, + \ 'signatureHelpProvider': { + \ 'triggerCharacters': ['(', ','], + \ }, + \ 'definitionProvider': {}, + \ 'typeDefinitionProvider': {}, + \ 'implementationProvider': {}, + \ 'experimental': {}, + \ 'documentHighlightProvider': v:true, + \ 'workspaceSymbolProvider': {} + \ }, + \ }, + \}) + + AssertEqual 1, b:conn.initialized + AssertEqual + \ { + \ 'completion_trigger_characters': ['.'], + \ 'completion': 1, + \ 'references': 1, + \ 'hover': 1, + \ 'definition': 1, + \ 'typeDefinition': 1, + \ 'implementation': 1, + \ 'symbol_search': 1, + \ 'rename': 1, + \ 'code_actions': 1, + \ }, + \ b:conn.capabilities + AssertEqual [[1, 'initialized', {}]], g:message_list + +Execute(Results that are not dictionaries should be handled correctly): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': v:null, + \}) + AssertEqual [], g:message_list diff --git a/dot_vim/plugged/ale/test/lsp/test_read_lsp_diagnostics.vader b/dot_vim/plugged/ale/test/lsp/test_read_lsp_diagnostics.vader new file mode 100644 index 0000000..61ffc73 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_read_lsp_diagnostics.vader @@ -0,0 +1,257 @@ +Before: + function Range(start_line, start_char, end_line, end_char) abort + return { + \ 'start': {'line': a:start_line, 'character': a:start_char}, + \ 'end': {'line': a:end_line, 'character': a:end_char}, + \} + endfunction + +After: + delfunction Range + +Execute(ale#lsp#response#ReadDiagnostics() should handle errors): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 3, + \ 'col': 11, + \ 'end_lnum': 5, + \ 'end_col': 15, + \ 'code': 'some-error', + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'severity': 1, + \ 'range': Range(2, 10, 4, 15), + \ 'code': 'some-error', + \ 'message': 'Something went wrong!', + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should handle warnings): + AssertEqual [ + \ { + \ 'type': 'W', + \ 'text': 'Something went wrong!', + \ 'lnum': 2, + \ 'col': 4, + \ 'end_lnum': 2, + \ 'end_col': 3, + \ 'code': 'some-warning', + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'severity': 2, + \ 'range': Range(1, 3, 1, 3), + \ 'code': 'some-warning', + \ 'message': 'Something went wrong!', + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should treat messages with missing severity as errors): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 3, + \ 'col': 11, + \ 'end_lnum': 5, + \ 'end_col': 15, + \ 'code': 'some-error', + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(2, 10, 4, 15), + \ 'code': 'some-error', + \ 'message': 'Something went wrong!', + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should handle messages without codes): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 3, + \ 'col': 11, + \ 'end_lnum': 5, + \ 'end_col': 15, + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(2, 10, 4, 15), + \ 'message': 'Something went wrong!', + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should include sources in detail): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'detail': '[tslint] Something went wrong!', + \ 'lnum': 10, + \ 'col': 15, + \ 'end_lnum': 12, + \ 'end_col': 22, + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(9, 14, 11, 22), + \ 'message': 'Something went wrong!', + \ 'source': 'tslint', + \ } + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should keep detail with line breaks but replace with spaces in text): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'cannot borrow `cap` as mutable more than once at a time mutable borrow starts here in previous iteration of loop', + \ 'detail': "[rustc] cannot borrow `cap` as mutable\r\nmore than once at a time\n\nmutable borrow starts here\rin previous iteration of loop", + \ 'lnum': 10, + \ 'col': 15, + \ 'end_lnum': 12, + \ 'end_col': 22, + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(9, 14, 11, 22), + \ 'message': "cannot borrow `cap` as mutable\r\nmore than once at a time\n\nmutable borrow starts here\rin previous iteration of loop", + \ 'source': 'rustc', + \ } + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should consider -1 to be a meaningless code): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 3, + \ 'col': 11, + \ 'end_lnum': 5, + \ 'end_col': 15, + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(2, 10, 4, 15), + \ 'message': 'Something went wrong!', + \ 'code': -1, + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should handle multiple messages): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 1, + \ 'col': 3, + \ 'end_lnum': 1, + \ 'end_col': 2, + \ }, + \ { + \ 'type': 'W', + \ 'text': 'A warning', + \ 'lnum': 2, + \ 'col': 5, + \ 'end_lnum': 2, + \ 'end_col': 4, + \ }, + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(0, 2, 0, 2), + \ 'message': 'Something went wrong!', + \ }, + \ { + \ 'severity': 2, + \ 'range': Range(1, 4, 1, 4), + \ 'message': 'A warning', + \ }, + \ ]}}) + +Execute(ale#lsp#response#ReadDiagnostics() should use relatedInformation for detail): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'lnum': 1, + \ 'col': 3, + \ 'end_lnum': 1, + \ 'end_col': 2, + \ 'detail': "Something went wrong!\n/tmp/someotherfile.txt:43:80:\n\tmight be this" + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(0, 2, 0, 2), + \ 'message': 'Something went wrong!', + \ 'relatedInformation': [{ + \ 'message': 'might be this', + \ 'location': { + \ 'uri': 'file:///tmp/someotherfile.txt', + \ 'range': { + \ 'start': { 'line': 42, 'character': 79 }, + \ 'end': { 'line': 142, 'character': 179}, + \ } + \ } + \ }] + \ } + \ ]}}) + +Execute(ale#lsp#response#ReadTSServerDiagnostics() should handle tsserver responses): + AssertEqual + \ [ + \ { + \ 'type': 'E', + \ 'nr': 2365, + \ 'code': '2365', + \ 'text': 'Operator ''''+'''' cannot be applied to types ''''3'''' and ''''{}''''.', + \ 'lnum': 1, + \ 'col': 11, + \ 'end_lnum': 1, + \ 'end_col': 16, + \ }, + \ ], + \ ale#lsp#response#ReadTSServerDiagnostics({"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/bar/foo.ts","diagnostics":[{"start":{"line":1,"offset":11},"end":{"line":1,"offset":17},"text":"Operator ''+'' cannot be applied to types ''3'' and ''{}''.","code":2365}]}}) + +Execute(ale#lsp#response#ReadTSServerDiagnostics() should handle warnings from tsserver): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 3, + \ 'nr': 2515, + \ 'code': '2515', + \ 'end_lnum': 27, + \ 'type': 'W', + \ 'end_col': 13, + \ 'text': 'Calls to ''console.log'' are not allowed. (no-console)', + \ } + \ ], + \ ale#lsp#response#ReadTSServerDiagnostics({"seq":0,"type":"event","event":"semanticDiag","body":{"file":"","diagnostics":[{"start":{"line":27,"offset":3},"end":{"line":27,"offset":14},"text":"Calls to 'console.log' are not allowed. (no-console)","code":2515,"category":"warning","source":"tslint"}]}}) + +Execute(ale#lsp#response#ReadTSServerDiagnostics() should handle suggestions from tsserver): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'col': 3, + \ 'nr': 2515, + \ 'code': '2515', + \ 'end_lnum': 27, + \ 'type': 'I', + \ 'end_col': 13, + \ 'text': 'Some info', + \ } + \ ], + \ ale#lsp#response#ReadTSServerDiagnostics({"seq":0,"type":"event","event":"semanticDiag","body":{"file":"","diagnostics":[{"start":{"line":27,"offset":3},"end":{"line":27,"offset":14},"text":"Some info","code":2515,"category":"suggestion","source":"tslint"}]}}) diff --git a/dot_vim/plugged/ale/test/lsp/test_reset_lsp.vader b/dot_vim/plugged/ale/test/lsp/test_reset_lsp.vader new file mode 100644 index 0000000..310b3d6 --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_reset_lsp.vader @@ -0,0 +1,98 @@ +Before: + Save g:ale_enabled + Save g:ale_set_signs + Save g:ale_set_quickfix + Save g:ale_set_loclist + Save g:ale_set_highlights + Save g:ale_echo_cursor + + let g:ale_enabled = 0 + let g:ale_set_signs = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + function EmptyString() abort + return '' + endfunction + + call ale#engine#InitBufferInfo(bufnr('')) + " Call this function first, so we can be sure the module is loaded before we + " check if it exists. + call ale#lsp_linter#ClearLSPData() + + call ale#linter#Define('testft', { + \ 'name': 'lsplinter', + \ 'lsp': 'tsserver', + \ 'executable': function('EmptyString'), + \ 'command': function('EmptyString'), + \ 'project_root': function('EmptyString'), + \ 'language': function('EmptyString'), + \}) + + call ale#linter#Define('testft', { + \ 'name': 'otherlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd': 'true', + \ 'command': 'true', + \ 'read_buffer': 0, + \}) + +After: + Restore + + unlet! b:ale_save_event_fired + + delfunction EmptyString + call ale#linter#Reset() + +Given testft(Some file with an imaginary filetype): +Execute(ALEStopAllLSPs should clear the loclist): + let g:ale_buffer_info[bufnr('')].loclist = [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'bufnr': bufnr(''), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'lsplinter', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'bufnr': bufnr(''), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'otherlinter', + \ }, + \] + let g:ale_buffer_info[bufnr('')].active_linter_list = [ + \ {'name': 'lsplinter'}, + \ {'name': 'otherlinter'}, + \] + + ALEStopAllLSPs + + " The loclist should be updated. + AssertEqual g:ale_buffer_info[bufnr('')].loclist, [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'bufnr': bufnr(''), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'otherlinter', + \ }, + \] + + " The LSP linter should be removed from the active linter list. + AssertEqual + \ ['otherlinter'], + \ map(copy(g:ale_buffer_info[bufnr('')].active_linter_list), 'v:val.name') diff --git a/dot_vim/plugged/ale/test/lsp/test_update_config.vader b/dot_vim/plugged/ale/test/lsp/test_update_config.vader new file mode 100644 index 0000000..698477e --- /dev/null +++ b/dot_vim/plugged/ale/test/lsp/test_update_config.vader @@ -0,0 +1,21 @@ +Before: + runtime autoload/ale/lsp.vim + + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + + " Stub out this function, so we test updating configs. + function! ale#lsp#Send(conn_id, message) abort + endfunction + +After: + Restore + + unlet! g:conn_id + + runtime autoload/ale/lsp.vim + +Execute(Only send updates when the configuration dictionary changes): + AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {}) + AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1}) + AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1}) + AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {}) diff --git a/dot_vim/plugged/ale/test/python/test_deoplete_source.py b/dot_vim/plugged/ale/test/python/test_deoplete_source.py new file mode 100644 index 0000000..74a42dc --- /dev/null +++ b/dot_vim/plugged/ale/test/python/test_deoplete_source.py @@ -0,0 +1,121 @@ +import unittest +import imp + +ale_module = imp.load_source( + 'deoplete.sources.ale', + '/testplugin/rplugin/python3/deoplete/sources/ale.py', +) + + +class VimMock(object): + def __init__(self, call_list, call_results, commands): + self.__call_list = call_list + self.__call_results = call_results + + self.__commands = commands + + def call(self, function, *args): + self.__call_list.append((function, args)) + + return self.__call_results.get(function, 0) + + def command(self, command): + self.__commands.append(command) + + +class DeopleteSourceTest(unittest.TestCase): + def setUp(self): + super(DeopleteSourceTest, self).setUp() + + self.call_list = [] + self.call_results = {'ale#completion#CanProvideCompletions': 1} + self.commands = [] + self.source = ale_module.Source('vim') + self.source.vim = VimMock( + self.call_list, self.call_results, self.commands) + + def test_attributes(self): + """ + Check all of the attributes we set. + """ + attributes = dict( + (key, getattr(self.source, key)) + for key in + dir(self.source) + if not key.startswith('__') + and key != 'vim' + and not hasattr(getattr(self.source, key), '__self__') + ) + + self.assertEqual(attributes, { + 'input_patterns': { + '_': r'\.\w*$', + 'rust': r'(\.|::)\w*$', + 'typescript': r'(\.|\'|")\w*$', + 'cpp': r'(\.|::|->)\w*$', + 'c': r'(\.|->)\w*$', + }, + 'is_bytepos': True, + 'is_volatile': True, + 'mark': '[L]', + 'min_pattern_length': 1, + 'name': 'ale', + 'rank': 1000, + }) + + def test_complete_position(self): + self.call_results['ale#completion#GetCompletionPositionForDeoplete'] = 2 + context = {'input': 'foo'} + + self.assertEqual(self.source.get_complete_position(context), 2) + self.assertEqual(self.call_list, [ + ('ale#completion#GetCompletionPositionForDeoplete', ('foo',)), + ]) + + def test_request_completion_results(self): + context = {'event': 'TextChangedI', 'is_refresh': True} + + self.assertEqual(self.source.gather_candidates(context), []) + self.assertEqual(self.call_list, [ + ('ale#completion#CanProvideCompletions', ()), + ]) + self.assertEqual(self.commands, [ + "call ale#completion#GetCompletions('ale-callback', " + \ + "{'callback': {completions -> deoplete#auto_complete() }})" + ]) + + def test_request_completion_results_from_buffer_without_providers(self): + self.call_results['ale#completion#CanProvideCompletions'] = 0 + context = {'event': 'TextChangedI', 'is_refresh': True} + + self.assertIsNone(self.source.gather_candidates(context), []) + self.assertEqual(self.call_list, [ + ('ale#completion#CanProvideCompletions', ()), + ]) + + def test_async_event(self): + context = {'event': 'Async', 'is_refresh': True} + self.call_results['ale#completion#GetCompletionResult'] = [ + { + 'word': 'foobar', + 'kind': 'v', + 'icase': 1, + 'menu': '', + 'info': '', + }, + ] + + self.assertEqual(self.source.gather_candidates(context), [ + { + 'word': 'foobar', + 'kind': 'v', + 'icase': 1, + 'menu': '', + 'info': '', + }, + ]) + + self.assertEqual(self.call_list, [ + ('ale#completion#CanProvideCompletions', ()), + ('ale#completion#GetCompletionResult', ()), + ]) diff --git a/dot_vim/plugged/ale/test/script/dumb_named_pipe_server.py b/dot_vim/plugged/ale/test/script/dumb_named_pipe_server.py new file mode 100644 index 0000000..a77e538 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/dumb_named_pipe_server.py @@ -0,0 +1,42 @@ +""" +This Python script creates a named pipe server that does nothing but send its input +back to the client that connects to it. Only one argument must be given, the path +of a named pipe to bind to. +""" +import os +import socket +import sys + + +def main(): + if len(sys.argv) < 2: + sys.exit('You must specify a filepath') + + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + if os.path.exists(sys.argv[1]): + os.remove(sys.argv[1]) + sock.bind(sys.argv[1]) + sock.listen(0) + + pid = os.fork() + + if pid: + print(pid) + sys.exit() + + while True: + connection = sock.accept()[0] + connection.settimeout(5) + + while True: + try: + connection.send(connection.recv(1024)) + except socket.timeout: + break + + connection.close() + + +if __name__ == "__main__": + main() diff --git a/dot_vim/plugged/ale/test/script/dumb_tcp_client.py b/dot_vim/plugged/ale/test/script/dumb_tcp_client.py new file mode 100644 index 0000000..3a728b0 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/dumb_tcp_client.py @@ -0,0 +1,33 @@ +""" +This is just a script for testing that the dumb TCP server actually works +correctly, for verifying that problems with tests are in Vim. Pass the +same port number given to the test server to check that it's working. +""" +import socket +import sys + + +def main(): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + result = sock.connect_ex(('127.0.0.1', int(sys.argv[1]))) + + if result: + sock.close() + sys.exit("Couldn't connect to the socket!") + + data_sent = 'x' * 1024 + + sock.send(data_sent) + data_received = sock.recv(1024) + + if data_sent != data_received: + sock.close() + sys.exit("Data sent didn't match data received.") + + sock.close() + + print("Everything was just fine.") + + +if __name__ == "__main__": + main() diff --git a/dot_vim/plugged/ale/test/script/dumb_tcp_server.py b/dot_vim/plugged/ale/test/script/dumb_tcp_server.py new file mode 100644 index 0000000..c15db65 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/dumb_tcp_server.py @@ -0,0 +1,40 @@ +""" +This Python script creates a TCP server that does nothing but send its input +back to the client that connects to it. Only one argument must be given, a port +to bind to. +""" +import os +import socket +import sys + + +def main(): + if len(sys.argv) < 2 or not sys.argv[1].isdigit(): + sys.exit('You must specify a port number') + + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + sock.bind(('127.0.0.1', int(sys.argv[1]))) + sock.listen(0) + + pid = os.fork() + + if pid: + print(pid) + sys.exit() + + while True: + connection = sock.accept()[0] + connection.settimeout(5) + + while True: + try: + connection.send(connection.recv(1024)) + except socket.timeout: + break + + connection.close() + + +if __name__ == "__main__": + main() diff --git a/dot_vim/plugged/ale/test/script/executable_block-padding-checker b/dot_vim/plugged/ale/test/script/executable_block-padding-checker new file mode 100644 index 0000000..2feab6d --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_block-padding-checker @@ -0,0 +1,145 @@ +#!/usr/bin/env python +""" +This script checks for missing or forbidden blank lines before or after +particular Vim commands. This script ensures that VimL scripts are padded +correctly, so they are easier to read. +""" + +import sys +import re + +INDENTATION_RE = re.compile(r'^ *') +COMMENT_LINE_RE = re.compile(r'^ *"') +COMMAND_RE = re.compile(r'^ *([a-zA-Z\\]+)') +OPERATOR_END_RE = re.compile(r'(&&|\|\||\+|-|\*\| /)$') + +START_BLOCKS = set(['if', 'for', 'while', 'try', 'function']) +END_BLOCKS = set(['endif', 'endfor', 'endwhile', 'endtry', 'endfunction']) +MIDDLE_BLOCKS = set(['else', 'elseif', 'catch', 'finally']) +TERMINATORS = set(['return', 'throw']) + +WHITESPACE_BEFORE_SET = START_BLOCKS | TERMINATORS +WHITESPACE_FORBIDDEN_BEFORE_SET = END_BLOCKS | MIDDLE_BLOCKS +WHITESPACE_AFTER_SET = END_BLOCKS +WHITESPACE_FORBIDDEN_AFTER_SET = START_BLOCKS | MIDDLE_BLOCKS +SAME_INDENTATION_SET = set(['\\']) + + +def remove_comment_lines(line_iter): + for line_number, line in enumerate(line_iter, 1): + if not COMMENT_LINE_RE.match(line): + yield (line_number, line) + + +def check_lines(line_iter): + previous_indentation_level = None + previous_command = None + previous_line_blank = False + + for line_number, line in remove_comment_lines(line_iter): + if len(line) == 0: + # Check for commands where we shouldn't have blank lines after + # them, like `else` or the start of blocks like `function`. + if ( + previous_command is not None + and previous_command in WHITESPACE_FORBIDDEN_AFTER_SET + ): + yield ( + line_number, + 'Blank line forbidden after `%s`' % (previous_command,) + ) + + previous_line_blank = True + previous_command = None + else: + indentation_level = INDENTATION_RE.match(line).end() + command_match = COMMAND_RE.match(line) + + if command_match: + command = command_match.group(1) + + if ( + command in SAME_INDENTATION_SET + and previous_indentation_level is not None + and indentation_level != previous_indentation_level + ): + yield ( + line_number, + 'Line continuation should match previous indentation' + ) + + if ( + previous_indentation_level is not None + and indentation_level != previous_indentation_level + and abs(indentation_level - previous_indentation_level) != 4 # noqa + ): + yield ( + line_number, + 'Indentation should be 4 spaces' + ) + + # Check for commands requiring blank lines before them, if they + # aren't at the start of a block. + if ( + command in WHITESPACE_BEFORE_SET + and previous_indentation_level is not None + and indentation_level == previous_indentation_level + and previous_line_blank is False + ): + yield ( + line_number, + 'Blank line required before `%s`' % (command,) + ) + + # Check for commands where we shouldn't have blank lines before + # them, like `else` or the end of blocks like `endfunction`. + if ( + command in WHITESPACE_FORBIDDEN_BEFORE_SET + and previous_line_blank is True + ): + yield ( + line_number - 1, + 'Blank line forbidden before `%s`' % (command,) + ) + + # Check for commands requiring blank lines after them, if they + # aren't at the end of a block. + if ( + previous_command is not None + and previous_command in WHITESPACE_AFTER_SET + and previous_indentation_level is not None + and indentation_level == previous_indentation_level + and previous_line_blank is False + ): + yield ( + line_number - 1, + 'Blank line required after `%s`' % (command,) + ) + + previous_command = command + previous_line_blank = False + previous_indentation_level = indentation_level + + if OPERATOR_END_RE.search(line): + yield ( + line_number, + 'Put operators at the start of lines instead' + ) + + +def main(): + status = 0 + + for filename in sys.argv[1:]: + with open(filename) as vim_file: + line_iter = (line.rstrip() for line in vim_file) + + for line_number, message in check_lines(line_iter): + print('%s:%d %s' % (filename, line_number, message)) + status = 1 + + sys.exit(status) + + +if __name__ == "__main__": + main() diff --git a/dot_vim/plugged/ale/test/script/executable_check-duplicate-tags b/dot_vim/plugged/ale/test/script/executable_check-duplicate-tags new file mode 100644 index 0000000..ec1de78 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_check-duplicate-tags @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +grep --exclude=tags -roh '\*.*\*$' doc | sort | uniq -d diff --git a/dot_vim/plugged/ale/test/script/executable_check-supported-tools-tables b/dot_vim/plugged/ale/test/script/executable_check-supported-tools-tables new file mode 100644 index 0000000..d238e77 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_check-supported-tools-tables @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +set -e +set -u + +# This script compares the table of supported tools in both supported-tools.md +# (for GitHub) and doc/ale-supported-languages-and-tools.txt (for vim), so we +# can complain if they don't match up. + +doc_file="$(mktemp -t doc.XXXXXXXX)" +doc_sorted_file="$(mktemp -t doc-sorted.XXXXXXXX)" +readme_file="$(mktemp -t readme.XXXXXXXX)" + +while read -r; do + if [[ "$REPLY" =~ ^! ]]; then + language="${REPLY/!/}" + else + echo "$language - $REPLY" + fi +done < <( + grep '^\*\|^ *\*' doc/ale-supported-languages-and-tools.txt \ + | sed -e '1,2d' \ + | sed 's/^\* */!/' \ + | sed -E 's/^ *\* *|!!|\^|\(.*\)|`//g' \ + | sed 's/ *$//' +) > "$doc_file" + +while read -r; do + if [[ "$REPLY" =~ ^! ]]; then + language="${REPLY/!/}" + else + echo "$language - $REPLY" + fi +done < <( + grep '^\*\|^ *\*' supported-tools.md \ + | sed 's/^\* */!/' \ + | sed -E 's/^ *\* *|:floppy_disk:|:warning:|\(.*\)|\[|\].*|-n flag//g' \ + | sed 's/ *$//' +) > "$readme_file" + +exit_code=0 + +# Sort the tools ignoring case, and complain when things are out of order. +LC_ALL=en_US.UTF-8 sort -f -k1,2 "$doc_file" -o "$doc_sorted_file" + +diff -U0 "$doc_sorted_file" "$doc_file" || exit_code=$? + +if ((exit_code)); then + echo + echo "The supported tools list isn't sorted properly" + echo +fi + +diff -U0 "$readme_file" "$doc_file" || exit_code=$? + +rm "$doc_file" +rm "$doc_sorted_file" +rm "$readme_file" + +exit "$exit_code" diff --git a/dot_vim/plugged/ale/test/script/executable_check-tag-alignment b/dot_vim/plugged/ale/test/script/executable_check-tag-alignment new file mode 100644 index 0000000..d41db16 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_check-tag-alignment @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +exit_code=0 + +# Documentation tags need to be aligned to the right margin, so look for +# tags which aren't at the right margin. +grep ' \*[^*]\+\*$' doc/ -r \ + | awk '{ sep = index($0, ":"); if (length(substr($0, sep + 1 )) < 79) { print } }' \ + | grep . && exit_code=1 + +exit $exit_code diff --git a/dot_vim/plugged/ale/test/script/executable_check-tag-references b/dot_vim/plugged/ale/test/script/executable_check-tag-references new file mode 100644 index 0000000..45e741f --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_check-tag-references @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e + +exit_code=0 +tag_regex='[gb]\?:\?\(ale\|ALE\)[a-zA-Z_\-]\+' + +tags="$(mktemp -t tags.XXXXXXXX)" +refs="$(mktemp -t refs.XXXXXXXX)" +# Grep for tags and references, and complain if we find a reference without +# a tag for the reference. Only our tags will be included. +grep --exclude=tags -roh "\\*$tag_regex\\*" doc | sed 's/*//g' | sort -u > "$tags" +grep --exclude=tags -roh "|$tag_regex|" doc | sed 's/|//g' | sort -u > "$refs" + +exit_code=0 + +if ! [[ $(comm -23 $refs $tags | wc -l) -eq 0 ]]; then + exit_code=1 +fi + +rm "$tags" +rm "$refs" diff --git a/dot_vim/plugged/ale/test/script/executable_check-toc b/dot_vim/plugged/ale/test/script/executable_check-toc new file mode 100644 index 0000000..f3f8a9e --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_check-toc @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +set -e +set -u + +# This script checks that the table of contents for the supported tools is +# sorted, and that the table matches the files. + +toc_section_start_line="$( + grep -m1 -n '^7\..*\*ale-other-integration-options\*' doc/ale.txt \ + | sed 's/\([0-9]*\).*/\1/' \ +)" +toc_start_offset="$( \ + tail -n +"$toc_section_start_line" doc/ale.txt \ + | grep -m1 -n '^ .*\.\.\.' \ + | sed 's/\([0-9]*\).*/\1/' \ +)" +# shellcheck disable=SC2003 +toc_start_line="$(expr "$toc_section_start_line" + "$toc_start_offset" - 1)" +toc_section_size="$( \ + tail -n +"$toc_start_line" doc/ale.txt \ + | grep -m1 -n '^===*$' \ + | sed 's/\([0-9]*\).*/\1/' \ +)" +# shellcheck disable=SC2003 +toc_end_line="$(expr "$toc_start_line" + "$toc_section_size" - 4)" + +toc_file="$(mktemp -t table-of-contents.XXXXXXXX)" +heading_file="$(mktemp -t headings.XXXXXXXX)" +tagged_toc_file="$(mktemp -t ale.txt.XXXXXXXX)" +sorted_toc_file="$(mktemp -t sorted-ale.txt.XXXXXXXX)" + +sed -n "$toc_start_line,$toc_end_line"p doc/ale.txt \ + | sed 's/^ \( *[^.][^.]*\)\.\.*|\(..*\)|/\1, \2/' \ + > "$toc_file" + +# Get all of the doc files in a natural sorted order. +doc_files="$(/usr/bin/env ls -1v doc | grep '^ale-' | sed 's/^/doc\//' | paste -sd ' ' -)" + +# shellcheck disable=SC2086 +grep -h '\*ale-.*-options\|^[a-z].*\*ale-.*\*$' $doc_files \ + | sed 's/^/ /' \ + | sed 's/ALE Shell Integration/ALE sh Integration/' \ + | sed 's/ALE BibTeX Integration/ALE bib Integration/' \ + | sed 's/ ALE \(.*\) Integration/\1/' \ + | sed 's/ *\*\(..*\)\*$/, \1/' \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's/objective-c/objc/' \ + | sed 's/c++/cpp/' \ + > "$heading_file" + +exit_code=0 +in_section=0 +section_index=0 + +# Prefix numbers to table of contents entries so that sections aren't mixed up +# with sub-sections when they are sorted. +while read -r; do + if [[ "$REPLY" =~ ^\ ]]; then + if ! ((in_section)); then + let section_index='section_index + 1' + in_section=1 + fi + else + if ((in_section)); then + let section_index='section_index + 1' + in_section=0 + fi + fi + + echo "$section_index $REPLY" >> "$tagged_toc_file" +done < "$toc_file" + +# Sort the sections and sub-sections and remove the tags. +sort -sn "$tagged_toc_file" | sed 's/[0-9][0-9]* //' > "$sorted_toc_file" + +echo 'Check for bad ToC sorting:' +echo +diff -U2 "$sorted_toc_file" "$toc_file" || exit_code=$? + +echo 'Check for mismatched ToC and headings:' +echo +diff -U3 "$toc_file" "$heading_file" || exit_code=$? + +rm "$toc_file" +rm "$heading_file" +rm "$tagged_toc_file" +rm "$sorted_toc_file" + +exit "$exit_code" diff --git a/dot_vim/plugged/ale/test/script/executable_custom-checks b/dot_vim/plugged/ale/test/script/executable_custom-checks new file mode 100644 index 0000000..83afb28 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_custom-checks @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +set -e +set -u + +exit_code=0 +docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE") + +echo '========================================' +echo 'Running custom linting rules' +echo '========================================' +echo 'Custom warnings/errors follow:' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/custom-linting-rules . || exit_code=$? +set +o pipefail +echo + +echo '========================================' +echo 'Checking for duplicate tags' +echo '========================================' +echo 'Duplicate tags follow:' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/check-duplicate-tags . || exit_code=$? +set +o pipefail +echo + +echo '========================================' +echo 'Checking for invalid tag references' +echo '========================================' +echo 'Invalid tag references tags follow:' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/check-tag-references || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'diff supported-tools.md and doc/ale-supported-languages-and-tools.txt tables' +echo '========================================' +echo 'Differences follow:' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/check-supported-tools-tables || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Look for badly aligned doc tags' +echo '========================================' +echo 'Badly aligned tags follow:' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/check-tag-alignment || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Look for table of contents issues' +echo '========================================' +echo + +set -o pipefail +docker run "${docker_flags[@]}" test/script/check-toc || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Check Python code' +echo '========================================' +echo + +docker run --rm -v "$PWD:/testplugin" "$DOCKER_RUN_IMAGE" \ + python -W ignore -m unittest discover /testplugin/test/python \ + || exit_code=$? +echo + +exit $exit_code diff --git a/dot_vim/plugged/ale/test/script/executable_custom-linting-rules b/dot_vim/plugged/ale/test/script/executable_custom-linting-rules new file mode 100644 index 0000000..486a0db --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_custom-linting-rules @@ -0,0 +1,166 @@ +#!/usr/bin/env bash + +set -e +set -u + +# This Bash script implements custom sanity checks for scripts beyond what +# Vint covers, which are easy to check with regex. + +# A flag for automatically fixing some errors. +FIX_ERRORS=0 +RETURN_CODE=0 + +function print_help() { + echo "Usage: test/script/custom-linting-rules [--fix] [DIRECTORY]" 1>&2 + echo 1>&2 + echo " -h, --help Print this help text" 1>&2 + echo " --fix Automatically fix some errors" 1>&2 + exit 1 +} + +while [ $# -ne 0 ]; do + case $1 in + -h) ;& --help) + print_help + ;; + --fix) + FIX_ERRORS=1 + shift + ;; + --) + shift + break + ;; + -?*) + echo "Invalid argument: $1" 1>&2 + exit 1 + ;; + *) + break + ;; + esac +done + +if [ $# -eq 0 ] || [ -z "$1" ]; then + print_help +fi + +shopt -s globstar + +directories=("$@") + +check_errors() { + regex="$1" + message="$2" + include_arg='' + exclude_arg='' + + if [ $# -gt 2 ]; then + include_arg="--include $3" + fi + + if [ $# -gt 3 ]; then + shift + shift + shift + + while (( "$#" )); do + exclude_arg="$exclude_arg --exclude $1" + shift + done + fi + + for directory in "${directories[@]}"; do + # shellcheck disable=SC2086 + while read -r; do + line=$(cut -d ":" -f2 <<< "$REPLY") + + if ((line > 1)); then + line=$((line - 1)) + file=$(cut -d ":" -f1 <<< "$REPLY") + + if sed -n "${line},${line}p" $file | grep -q '^ *" *no-custom-checks$'; then + continue + fi + fi + + RETURN_CODE=1 + echo "$REPLY $message" + done < <(grep -H -n "$regex" $include_arg $exclude_arg "$directory"/**/*.vim \ + | grep -v 'no-custom-checks' \ + | grep -o '^[^:]\+:[0-9]\+' \ + | sed 's:^\./::') + done +} + +if (( FIX_ERRORS )); then + for directory in "${directories[@]}"; do + sed -i "s/^\(function.*)\) *$/\1 abort/" "$directory"/**/*.vim + sed -i "s/shellescape(/ale#Escape(/" "$directory"/**/*.vim + sed -i 's/==#/is#/g' "$directory"/**/*.vim + sed -i 's/==?/is?/g' "$directory"/**/*.vim + sed -i 's/!=#/isnot#/g' "$directory"/**/*.vim + sed -i 's/!=?/isnot?/g' "$directory"/**/*.vim + # Improving type checks. + sed -i $'s/\\(==.\\?\\|is\\) type([\'"]\+)/is v:t_string/g' "$directory"/**/*.vim + sed -i 's/\(==.\?\|is\) type([0-9]\+)/is v:t_number/g' "$directory"/**/*.vim + sed -i 's/\(==.\?\|is\) type(\[\])/is v:t_list/g' "$directory"/**/*.vim + sed -i 's/\(==.\?\|is\) type({})/is v:t_dict/g' "$directory"/**/*.vim + sed -i 's/\(==.\?\|is\) type(function([^)]\+))/is v:t_func/g' "$directory"/**/*.vim + sed -i $'s/\\(!=.\\?\\|isnot\\) type([\'"]\+)/isnot v:t_string/g' "$directory"/**/*.vim + sed -i 's/\(!=.\?\|isnot\) type([0-9]\+)/isnot v:t_number/g' "$directory"/**/*.vim + sed -i 's/\(!=.\?\|isnot\) type(\[\])/isnot v:t_list/g' "$directory"/**/*.vim + sed -i 's/\(!=.\?\|isnot\) type({})/isnot v:t_dict/g' "$directory"/**/*.vim + sed -i 's/\(!=.\?\|isnot\) type(function([^)]\+))/isnot v:t_func/g' "$directory"/**/*.vim + done +fi + +# The arguments are: regex, explanation, [filename_filter], [list, of, exclusions] +check_errors \ + '^function.*) *$' \ + 'Function without abort keyword (See :help except-compat)' +check_errors '^function[^!]' 'function without !' +check_errors ' \+$' 'Trailing whitespace' +check_errors '^ * end\?i\? *$' 'Write endif, not en, end, or endi' +check_errors '^ [^ ]' 'Use four spaces, not two spaces' +check_errors $'\t' 'Use four spaces, not tabs' +# This check should prevent people from using a particular inconsistent name. +check_errors 'let g:ale_\w\+_\w\+_args =' 'Name your option g:ale___options instead' +check_errors 'shellescape(' 'Use ale#Escape instead of shellescape' +check_errors 'simplify(' 'Use ale#path#Simplify instead of simplify' +check_errors 'tempname(' 'Use ale#util#Tempname instead of tempname' +check_errors 'getcurpos(' "Use getpos('.') instead of getcurpos() if you don't need curswant, to avoid a bug that changes curswant" +check_errors "expand(['\"]%" "Use expand('#' . a:buffer . '...') instead. You might get a filename for the wrong buffer." +check_errors 'getcwd()' "Do not use getcwd(), as it could run from the wrong buffer. Use expand('#' . a:buffer . ':p:h') instead." +check_errors '==#' "Use 'is#' instead of '==#'. 0 ==# 'foobar' is true" +check_errors '==?' "Use 'is?' instead of '==?'. 0 ==? 'foobar' is true" +check_errors '!=#' "Use 'isnot#' instead of '!=#'. 0 !=# 'foobar' is false" +check_errors '!=?' "Use 'isnot?' instead of '!=?'. 0 !=? 'foobar' is false" +check_errors '^ *:\?echo' "Stray echo line. Ignore with \" no-custom-checks if needed" +check_errors '^ *:\?redir' 'User execute() instead of redir' +# Exclusions for grandfathered-in exceptions +exclusions="clojure/clj_kondo.vim elixir/elixir_ls.vim go/golangci_lint.vim swift/swiftformat.vim" +# shellcheck disable=SC2086 +check_errors $'name.:.*\'[a-z_]*[^a-z_0-9][a-z_0-9]*\',$' 'Use snake_case names for linters' '*/ale_linters/*' $exclusions +# Checks for improving type checks. +check_errors $'\\(==.\\?\\|is\\) type([\'"]\+)' "Use 'is v:t_string' instead" +check_errors '\(==.\?\|is\) type([0-9]\+)' "Use 'is v:t_number' instead" +check_errors '\(==.\?\|is\) type(\[\])' "Use 'is v:t_list' instead" +check_errors '\(==.\?\|is\) type({})' "Use 'is v:t_dict' instead" +check_errors '\(==.\?\|is\) type(function([^)]\+))' "Use 'is v:t_func' instead" +check_errors $'\\(!=.\\?\\|isnot\\) type([\'"]\+)' "Use 'isnot v:t_string' instead" +check_errors '\(!=.\?\|isnot\) type([0-9]\+)' "Use 'isnot v:t_number' instead" +check_errors '\(!=.\?\|isnot\) type(\[\])' "Use 'isnot v:t_list' instead" +check_errors '\(!=.\?\|isnot\) type({})' "Use 'isnot v:t_dict' instead" +check_errors '\(!=.\?\|isnot\) type(function([^)]\+))' "Use 'isnot v:t_func' instead" + +# Run a Python script to find lines that require padding around them. For +# users without Python installed, we'll skip these checks. GitHub Actions will +# run the script. +if command -v python > /dev/null; then + if ! test/script/block-padding-checker "$directory"/**/*.vim; then + RETURN_CODE=1 + fi +fi + +exit $RETURN_CODE diff --git a/dot_vim/plugged/ale/test/script/executable_run-vader-tests b/dot_vim/plugged/ale/test/script/executable_run-vader-tests new file mode 100644 index 0000000..15a4a91 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_run-vader-tests @@ -0,0 +1,167 @@ +#!/usr/bin/env bash + +set -e +set -u + +docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE") +red='\033[0;31m' +green='\033[0;32m' +nc='\033[0m' +verbose=0 +quiet=0 + +while [ $# -ne 0 ]; do + case $1 in + -v) + verbose=1 + shift + ;; + -q) + quiet=1 + shift + ;; + --) + shift + break + ;; + -?*) + echo "Invalid argument: $1" 1>&2 + exit 1 + ;; + *) + break + ;; + esac +done + +vim="$1" +tests="$2" + +echo "$vim" + +case $vim in + neovim-v0.2*) + headless='' + ;; + # Neovim 0.6+ requires headless argument to load Vader tests. + neovim*) + headless='--headless' + ;; + *) + headless='' + ;; +esac + +# This file will be used to track if tests ran or not. +# We can't use a variable, because we need to set a value in a sub-shell. +run_file="$(mktemp -t tests_ran.XXXXXXXX)" + +function filter-vader-output() { + local hit_first_vader_line=0 + # When verbose mode is off, suppress output until Vader starts. + local start_output="$verbose" + local filtered_data='' + + while read -r; do + # Search for the first Vader output line. + # We can try starting tests again if they don't start. + if ((!hit_first_vader_line)); then + if [[ "$REPLY" = *'Starting Vader:'* ]]; then + hit_first_vader_line=1 + fi + fi + + if ((!start_output)); then + if ((hit_first_vader_line)); then + start_output=1 + else + continue + fi + fi + + if ((quiet)); then + if [[ "$REPLY" = *'Starting Vader:'* ]]; then + filtered_data="$REPLY" + elif [[ "$REPLY" = *'Success/Total'* ]]; then + success="$(echo -n "$REPLY" | grep -o '[0-9]\+/' | head -n1 | cut -d/ -f1)" + total="$(echo -n "$REPLY" | grep -o '/[0-9]\+' | head -n1 | cut -d/ -f2)" + + if [ "$success" -lt "$total" ]; then + echo "$filtered_data" + echo "$REPLY" + fi + + filtered_data='' + else + filtered_data="$filtered_data"$'\n'"$REPLY" + fi + else + echo "$REPLY" + fi + done + + # Note that we managed to get the Vader tests started if we did. + if ((hit_first_vader_line)); then + echo 1 > "$run_file" + fi +} + +function color-vader-output() { + while read -r; do + if [[ "$REPLY" = *'[EXECUTE] (X)'* ]]; then + echo -en "$red" + elif [[ "$REPLY" = *'[EXECUTE]'* ]] || [[ "$REPLY" = *'[ GIVEN]'* ]]; then + echo -en "$nc" + fi + + if [[ "$REPLY" = *'Success/Total'* ]]; then + success="$(echo -n "$REPLY" | grep -o '[0-9]\+/' | head -n1 | cut -d/ -f1)" + total="$(echo -n "$REPLY" | grep -o '/[0-9]\+' | head -n1 | cut -d/ -f2)" + + if [ "$success" -lt "$total" ]; then + echo -en "$red" + else + echo -en "$green" + fi + + echo "$REPLY" + echo -en "$nc" + else + echo "$REPLY" + fi + done + + echo -en "$nc" +} + +echo +echo '========================================' +echo "Running tests for $vim" +echo '========================================' +echo + +tries=0 + +while [ "$tries" -lt 5 ]; do + tries=$((tries + 1)) + + exit_code=0 + set -o pipefail + docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${docker_flags[@]}" \ + "/vim-build/bin/$vim" -u test/vimrc ${headless} \ + "+Vader! $tests" 2>&1 | filter-vader-output | color-vader-output || exit_code=$? + set +o pipefail + + if [ -s "$run_file" ]; then + break + fi +done + +if [ "$tries" -gt 1 ]; then + echo + echo "Tried to run tests $tries times" +fi + +rm "$run_file" + +exit "$exit_code" diff --git a/dot_vim/plugged/ale/test/script/executable_run-vint b/dot_vim/plugged/ale/test/script/executable_run-vint new file mode 100644 index 0000000..ce42ad4 --- /dev/null +++ b/dot_vim/plugged/ale/test/script/executable_run-vint @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -e +set -u + +exit_code=0 +docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE") + +echo '========================================' +echo 'Running Vint to lint our code' +echo '========================================' +echo 'Vint warnings/errors follow:' +echo + +set -o pipefail +docker run -a stdout "${docker_flags[@]}" vint -s . || exit_code=$? +set +o pipefail +echo + +exit $exit_code diff --git a/dot_vim/plugged/ale/test/sign/test_linting_sets_signs.vader b/dot_vim/plugged/ale/test/sign/test_linting_sets_signs.vader new file mode 100644 index 0000000..1624449 --- /dev/null +++ b/dot_vim/plugged/ale/test/sign/test_linting_sets_signs.vader @@ -0,0 +1,76 @@ +Given foobar (Some imaginary filetype): + var y = 3+3; + var y = 3 + +Before: + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + Save g:ale_command_wrapper + + let g:ale_command_wrapper = '' + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + let g:ale_set_signs = 1 + " Disable features we don't need for these tests. + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + call ale#sign#Clear() + + function! TestCallback(buffer, output) + return [ + \ {'lnum': 1, 'text': 'foo', 'type': 'W'}, + \ {'lnum': 2, 'text': 'foo', 'type': 'E'}, + \] + endfunction + + function! CollectSigns() + redir => l:output + if has('nvim-0.4.2') || has('patch-8.1.614') + silent exec 'sign place group=ale' + else + silent exec 'sign place' + endif + redir END + + let l:actual_sign_list = [] + + for l:line in split(l:output, "\n") + let l:match = matchlist(l:line, ale#sign#ParsePattern()) + + if len(l:match) > 0 + call add(l:actual_sign_list, [l:match[1], l:match[3]]) + endif + endfor + + return l:actual_sign_list + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \}) + +After: + delfunction TestCallback + delfunction CollectSigns + + unlet! g:ale_run_synchronously_callbacks + call ale#sign#Clear() + call ale#linter#Reset() + +Execute(The signs should be updated after linting is done): + ALELint + call ale#test#FlushJobs() + + AssertEqual [['1', 'ALEWarningSign'], ['2', 'ALEErrorSign']], CollectSigns() diff --git a/dot_vim/plugged/ale/test/sign/test_sign_column_highlighting.vader b/dot_vim/plugged/ale/test/sign/test_sign_column_highlighting.vader new file mode 100644 index 0000000..7ea5eb0 --- /dev/null +++ b/dot_vim/plugged/ale/test/sign/test_sign_column_highlighting.vader @@ -0,0 +1,68 @@ +Before: + Save g:ale_change_sign_column_color + Save &verbose + + function! ParseHighlight(name) abort + redir => l:output + silent execute 'highlight ' . a:name + redir end + + return substitute(join(split(l:output)[2:]), ' Last set.*', '', '') + endfunction + + function! SetHighlight(name, syntax) abort + let l:match = matchlist(a:syntax, '\vlinks to (.+)$') + + if !empty(l:match) + execute 'highlight link ' . a:name . ' ' . l:match[1] + else + execute 'highlight ' . a:name . ' ' a:syntax + endif + endfunction + + let g:sign_highlight = ParseHighlight('SignColumn') + +After: + Restore + + delfunction ParseHighlight + call SetHighlight('SignColumn', g:sign_highlight) + delfunction SetHighlight + unlet! g:sign_highlight + + call ale#sign#Clear() + +Execute(The SignColumn highlight shouldn't be changed if the option is off): + let g:ale_change_sign_column_color = 0 + let b:sign_highlight = ParseHighlight('SignColumn') + + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'W', 'text': 'x'}, + \]) + AssertEqual b:sign_highlight, ParseHighlight('SignColumn') + + call ale#sign#SetSigns(bufnr(''), []) + AssertEqual b:sign_highlight, ParseHighlight('SignColumn') + +Execute(The SignColumn highlight should be set and reset): + let g:ale_change_sign_column_color = 1 + + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'W', 'text': 'x'}, + \]) + AssertEqual 'links to ALESignColumnWithErrors', ParseHighlight('SignColumn') + + call ale#sign#SetSigns(bufnr(''), []) + AssertEqual 'links to ALESignColumnWithoutErrors', ParseHighlight('SignColumn') + +Execute(The SignColumn should be correctly parsed when verbose=1): + set verbose=1 + highlight SignColumn ctermfg=246 ctermbg=7 guifg=#839496 guibg=Grey + + call ale#sign#SetUpDefaultColumnWithoutErrorsHighlight() + + AssertEqual + \ has('nvim') + \ ? 'ctermfg=246 ctermbg=7 guifg=#839496 guibg=Grey' + \ : 'term=standout ctermfg=246 ctermbg=7 guifg=#839496 guibg=Grey', + \ ParseHighlight('ALESignColumnWithoutErrors') diff --git a/dot_vim/plugged/ale/test/sign/test_sign_limits.vader b/dot_vim/plugged/ale/test/sign/test_sign_limits.vader new file mode 100644 index 0000000..d7a4e2f --- /dev/null +++ b/dot_vim/plugged/ale/test/sign/test_sign_limits.vader @@ -0,0 +1,57 @@ +Before: + Save g:ale_max_signs + + let g:ale_max_signs = -1 + + function! SetNProblems(sign_count) + let l:loclist = [] + let l:range = range(1, a:sign_count) + call setline(1, l:range) + + for l:index in l:range + call add(l:loclist, { + \ 'bufnr': bufnr(''), + \ 'lnum': l:index, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'a', + \}) + endfor + + call ale#sign#SetSigns(bufnr(''), l:loclist) + + return sort(map(ale#sign#FindCurrentSigns(bufnr(''))[1], 'v:val[0]'), 'n') + endfunction + +After: + Restore + + unlet! b:ale_max_signs + + delfunction SetNProblems + + call ale#sign#Clear() + +Execute(There should be no limit on signs with negative numbers): + AssertEqual range(1, 42), SetNProblems(42) + +Execute(0 signs should be set when the max is 0): + let g:ale_max_signs = 0 + + AssertEqual [], SetNProblems(42) + +Execute(1 signs should be set when the max is 1): + let g:ale_max_signs = 1 + + AssertEqual [1], SetNProblems(42) + +Execute(10 signs should be set when the max is 10): + let g:ale_max_signs = 10 + + " We'll check that we set signs for the first 10 items, not other lines. + AssertEqual range(1, 10), SetNProblems(42) + +Execute(5 signs should be set when the max is 5 for the buffer): + let b:ale_max_signs = 5 + + AssertEqual range(1, 5), SetNProblems(42) diff --git a/dot_vim/plugged/ale/test/sign/test_sign_parsing.vader b/dot_vim/plugged/ale/test/sign/test_sign_parsing.vader new file mode 100644 index 0000000..c0967f4 --- /dev/null +++ b/dot_vim/plugged/ale/test/sign/test_sign_parsing.vader @@ -0,0 +1,88 @@ +Execute (Parsing English signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[9, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([ + \ 'Signs for app.js:', + \ ' line=9 id=1000001 group=ale name=ALEWarningSign', + \ ]) + else + AssertEqual + \ [0, [[9, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([ + \ 'Signs for app.js:', + \ ' line=9 id=1000001 name=ALEWarningSign', + \ ]) + endif + +Execute (Parsing Russian signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[1, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([' Ñтрока=1 id=1000001 группа=ale имÑ=ALEErrorSign']) + else + AssertEqual + \ [0, [[1, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([' Ñтрока=1 id=1000001 имÑ=ALEErrorSign']) + endif + +Execute (Parsing Japanese signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[1, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' 行=1 識別å­=1000001 グループ=ale åå‰=ALEWarningSign']) + else + AssertEqual + \ [0, [[1, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' 行=1 識別å­=1000001 åå‰=ALEWarningSign']) + endif + +Execute (Parsing Spanish signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[12, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' línea=12 id=1000001 grupo=ale nombre=ALEWarningSign']) + else + AssertEqual + \ [0, [[12, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' línea=12 id=1000001 nombre=ALEWarningSign']) + endif + +Execute (Parsing Italian signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[1, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' riga=1 id=1000001, gruppo=ale nome=ALEWarningSign']) + else + AssertEqual + \ [0, [[1, 1000001, 'ALEWarningSign']]], + \ ale#sign#ParseSigns([' riga=1 id=1000001, nome=ALEWarningSign']) + endif + +Execute (Parsing German signs should work): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [0, [[235, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([' Zeile=235 id=1000001 Gruppe=ale Name=ALEErrorSign']) + else + AssertEqual + \ [0, [[235, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([' Zeile=235 id=1000001 Name=ALEErrorSign']) + endif + +Execute (The sign parser should indicate if the dummy sign is set): + if has('nvim-0.4.2') || has('patch-8.1.614') + AssertEqual + \ [1, [[1, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([ + \ ' Ñтрока=1 id=1000001 group=ale имÑ=ALEErrorSign', + \ ' line=1 id=1000000 group=ale name=ALEDummySign', + \ ]) + else + AssertEqual + \ [1, [[1, 1000001, 'ALEErrorSign']]], + \ ale#sign#ParseSigns([ + \ ' Ñтрока=1 id=1000001 имÑ=ALEErrorSign', + \ ' line=1 id=1000000 name=ALEDummySign', + \ ]) + endif diff --git a/dot_vim/plugged/ale/test/sign/test_sign_placement.vader b/dot_vim/plugged/ale/test/sign/test_sign_placement.vader new file mode 100644 index 0000000..7b80d83 --- /dev/null +++ b/dot_vim/plugged/ale/test/sign/test_sign_placement.vader @@ -0,0 +1,315 @@ +Before: + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + Save g:ale_command_wrapper + + let g:ale_command_wrapper = '' + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + let g:ale_set_signs = 1 + " Disable features we don't need for these tests. + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + call ale#linter#Reset() + call ale#sign#Clear() + + function! GenerateResults(buffer, output) + return [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'foo', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'bar', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'baz', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'use this one', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 2, + \ 'type': 'W', + \ 'text': 'ignore this one', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'ignore this one', + \ }, + \ { + \ 'lnum': 5, + \ 'col': 2, + \ 'type': 'E', + \ 'text': 'use this one', + \ }, + \] + endfunction + + function! ParseSigns() + redir => l:output + if has('nvim-0.4.2') || has('patch-8.1.614') + silent sign place group=ale + else + silent sign place + endif + redir END + + return map( + \ split(l:output, '\n')[2:], + \ 'matchlist(v:val, ''' . ale#sign#ParsePattern() . ''')[1:3]', + \) + endfunction + + call ale#linter#Define('testft', { + \ 'name': 'x', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': 'true', + \ 'callback': 'GenerateResults', + \}) + +After: + Restore + + unlet! g:ale_run_synchronously_callbacks + unlet! g:loclist + delfunction GenerateResults + delfunction ParseSigns + call ale#linter#Reset() + call ale#sign#Clear() + +Execute(ale#sign#GetSignName should return the right sign names): + AssertEqual 'ALEErrorSign', ale#sign#GetSignName([{'type': 'E'}]) + AssertEqual 'ALEStyleErrorSign', ale#sign#GetSignName([{'type': 'E', 'sub_type': 'style'}]) + AssertEqual 'ALEWarningSign', ale#sign#GetSignName([{'type': 'W'}]) + AssertEqual 'ALEStyleWarningSign', ale#sign#GetSignName([{'type': 'W', 'sub_type': 'style'}]) + AssertEqual 'ALEInfoSign', ale#sign#GetSignName([{'type': 'I'}]) + AssertEqual 'ALEErrorSign', ale#sign#GetSignName([ + \ {'type': 'E'}, + \ {'type': 'W'}, + \ {'type': 'I'}, + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \]) + AssertEqual 'ALEWarningSign', ale#sign#GetSignName([ + \ {'type': 'W'}, + \ {'type': 'I'}, + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \]) + AssertEqual 'ALEInfoSign', ale#sign#GetSignName([ + \ {'type': 'I'}, + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \]) + AssertEqual 'ALEStyleErrorSign', ale#sign#GetSignName([ + \ {'type': 'E', 'sub_type': 'style'}, + \ {'type': 'W', 'sub_type': 'style'}, + \]) + AssertEqual 'ALEStyleWarningSign', ale#sign#GetSignName([ + \ {'type': 'W', 'sub_type': 'style'}, + \]) + +Given testft(A file with warnings/errors): + foo + bar + baz + fourth line + fifth line + +Execute(The current signs should be set for running a job): + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ [ + \ ['1', '1000001', 'ALEErrorSign'], + \ ['2', '1000002', 'ALEWarningSign'], + \ ['3', '1000003', 'ALEErrorSign'], + \ ['4', '1000004', 'ALEErrorSign'], + \ ['5', '1000005', 'ALEErrorSign'], + \ ], + \ ParseSigns() + +Execute(Loclist items with sign_id values should be kept): + if has('nvim-0.4.2') || has('patch-8.1.614') + exec 'sign place 1000347 group=ale line=3 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000348 group=ale line=15 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000349 group=ale line=16 name=ALEWarningSign buffer=' . bufnr('') + else + exec 'sign place 1000347 line=3 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000348 line=15 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000349 line=16 name=ALEWarningSign buffer=' . bufnr('') + endif + + let g:loclist = [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'a', 'sign_id': 1000348}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'W', 'text': 'b', 'sign_id': 1000349}, + \ {'bufnr': bufnr(''), 'lnum': 3, 'col': 1, 'type': 'E', 'text': 'c', 'sign_id': 1000347}, + \ {'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'type': 'W', 'text': 'd'}, + \ {'bufnr': bufnr(''), 'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e'}, + \ {'bufnr': bufnr(''), 'lnum': 16, 'col': 2, 'type': 'E', 'text': 'f'}, + \] + + call ale#sign#SetSigns(bufnr(''), g:loclist) + + " Sign IDs from before should be kept, and new signs should use + " IDs that haven't been used yet. + AssertEqual + \ [ + \ {'bufnr': bufnr(''), 'lnum': 3, 'col': 1, 'type': 'E', 'text': 'c', 'sign_id': 1000347}, + \ {'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'type': 'W', 'text': 'd', 'sign_id': 1000350}, + \ {'bufnr': bufnr(''), 'lnum': 15, 'col': 1, 'type': 'E', 'text': 'a', 'sign_id': 1000348}, + \ {'bufnr': bufnr(''), 'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e', 'sign_id': 1000348}, + \ {'bufnr': bufnr(''), 'lnum': 16, 'col': 1, 'type': 'W', 'text': 'b', 'sign_id': 1000351}, + \ {'bufnr': bufnr(''), 'lnum': 16, 'col': 2, 'type': 'E', 'text': 'f', 'sign_id': 1000351}, + \ ], + \ g:loclist + + " Items should be grouped again. We should see error signs, where there + " were warnings before, and errors where there were errors and where we + " now have new warnings. + AssertEqual + \ [ + \ ['15', '1000348', 'ALEErrorSign'], + \ ['16', '1000351', 'ALEErrorSign'], + \ ['3', '1000347', 'ALEErrorSign'], + \ ['4', '1000350', 'ALEWarningSign'], + \ ], + \ sort(ParseSigns()) + +Execute(Items for other buffers should be ignored): + let g:loclist = [ + \ {'bufnr': bufnr('') - 1, 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'a'}, + \ {'bufnr': bufnr('') - 1, 'lnum': 2, 'col': 1, 'type': 'E', 'text': 'a', 'sign_id': 1000347}, + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'a'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'W', 'text': 'b'}, + \ {'bufnr': bufnr(''), 'lnum': 3, 'col': 1, 'type': 'E', 'text': 'c'}, + \ {'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'type': 'W', 'text': 'd'}, + \ {'bufnr': bufnr(''), 'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e'}, + \ {'bufnr': bufnr(''), 'lnum': 16, 'col': 2, 'type': 'E', 'text': 'f'}, + \ {'bufnr': bufnr('') + 1, 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'a'}, + \] + + call ale#sign#SetSigns(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ ['1', '1000001', 'ALEErrorSign'], + \ ['15', '1000005', 'ALEWarningSign'], + \ ['16', '1000006', 'ALEErrorSign'], + \ ['2', '1000002', 'ALEWarningSign'], + \ ['3', '1000003', 'ALEErrorSign'], + \ ['4', '1000004', 'ALEWarningSign'], + \ ], + \ sort(ParseSigns()) + +Execute(Signs should be downgraded correctly): + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'W', 'text': 'x'}, + \]) + + AssertEqual + \ [ + \ ['1', '1000001', 'ALEErrorSign'], + \ ['2', '1000002', 'ALEWarningSign'], + \ ], + \ sort(ParseSigns()) + + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'W', 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'I', 'text': 'x'}, + \]) + + AssertEqual + \ [ + \ ['1', '1000003', 'ALEWarningSign'], + \ ['2', '1000004', 'ALEInfoSign'], + \ ], + \ sort(ParseSigns()) + +Execute(Signs should be upgraded correctly): + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'W', 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'I', 'text': 'x'}, + \]) + + AssertEqual + \ [ + \ ['1', '1000001', 'ALEWarningSign'], + \ ['2', '1000002', 'ALEInfoSign'], + \ ], + \ sort(ParseSigns()) + + call ale#sign#SetSigns(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 1, 'col': 1, 'type': 'E', 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1, 'type': 'W', 'text': 'x'}, + \]) + + AssertEqual + \ [ + \ ['1', '1000003', 'ALEErrorSign'], + \ ['2', '1000004', 'ALEWarningSign'], + \ ], + \ sort(ParseSigns()) + +Execute(It should be possible to clear signs with empty lists): + let g:loclist = [ + \ {'bufnr': bufnr(''), 'lnum': 16, 'col': 2, 'type': 'E', 'text': 'f'}, + \] + + call ale#sign#SetSigns(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ ['16', '1000001', 'ALEErrorSign'], + \ ], + \ sort(ParseSigns()) + + call ale#sign#SetSigns(bufnr(''), []) + + AssertEqual [], ParseSigns() + +Execute(No exceptions should be thrown when setting signs for invalid buffers): + call ale#sign#SetSigns(123456789, [{'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e'}]) + +Execute(Signs should be removed when lines have multiple sign IDs on them): + " We can fail to remove signs if there are multiple signs on one line, + " say after deleting lines in Vim, etc. + if has('nvim-0.4.2') || has('patch-8.1.614') + exec 'sign place 1000347 group=ale line=3 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000348 group=ale line=3 name=ALEWarningSign buffer=' . bufnr('') + exec 'sign place 1000349 group=ale line=10 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000350 group=ale line=10 name=ALEWarningSign buffer=' . bufnr('') + else + exec 'sign place 1000347 line=3 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000348 line=3 name=ALEWarningSign buffer=' . bufnr('') + exec 'sign place 1000349 line=10 name=ALEErrorSign buffer=' . bufnr('') + exec 'sign place 1000350 line=10 name=ALEWarningSign buffer=' . bufnr('') + endif + + call ale#sign#SetSigns(bufnr(''), []) + AssertEqual [], ParseSigns() diff --git a/dot_vim/plugged/ale/test/smoke_test.vader b/dot_vim/plugged/ale/test/smoke_test.vader new file mode 100644 index 0000000..49634c3 --- /dev/null +++ b/dot_vim/plugged/ale/test/smoke_test.vader @@ -0,0 +1,141 @@ +Before: + Save g:ale_enabled + Save g:ale_set_lists_synchronously + Save g:ale_buffer_info + Save &shell + + let g:ale_enabled = 1 + let g:ale_buffer_info = {} + let g:ale_set_lists_synchronously = 1 + + function! TestCallback(buffer, output) + " Windows adds extra spaces to the text from echo. + return [{ + \ 'lnum': 2, + \ 'col': 3, + \ 'text': substitute(a:output[0], ' *$', '', ''), + \}] + endfunction + function! TestCallback2(buffer, output) + return [{ + \ 'lnum': 3, + \ 'col': 4, + \ 'text': substitute(a:output[0], ' *$', '', ''), + \}] + endfunction + + " Running the command in another subshell seems to help here. + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \}) + +After: + Restore + + unlet! g:i + unlet! g:results + unlet! g:expected_results + + delfunction TestCallback + delfunction TestCallback2 + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(Linters should run with the default options): + AssertEqual 'foobar', &filetype + + let g:expected_results = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }] + + " Try the test a few times over in NeoVim 0.3 or Windows or Vim 8.2, + " where tests fail randomly. + for g:i in range(has('nvim-0.3') || has('win32') || has('patch-8.2.2401') ? 5 : 1) + call ale#Queue(0, '') + call ale#test#WaitForJobs(2000) + + let g:results = ale#test#GetLoclistWithoutNewerKeys() + + if g:results == g:expected_results + break + endif + endfor + + AssertEqual g:expected_results, g:results + +Execute(Linters should run in PowerShell too): + if has('win32') + set shell=powershell + + AssertEqual 'foobar', &filetype + + " Replace the callback to handle two lines. + function! TestCallback(buffer, output) + " Windows adds extra spaces to the text from echo. + return [ + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': substitute(a:output[0], ' *$', '', ''), + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': substitute(a:output[1], ' *$', '', ''), + \ }, + \] + endfunction + + " Recreate the command string to use &&, which PowerShell does not support. + call ale#linter#Reset() + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': 'cmd', + \ 'command': 'echo foo && echo bar', + \}) + + call ale#Queue(0, '') + call ale#test#WaitForJobs(4000) + + AssertEqual [ + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }, + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }, + \], ale#test#GetLoclistWithoutNewerKeys() + endif diff --git a/dot_vim/plugged/ale/test/test-files/ada/empty_testfile.adb b/dot_vim/plugged/ale/test/test-files/ada/empty_testfile.adb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/alex/node-modules-2/node_modules/alex/empty_cli.js b/dot_vim/plugged/ale/test/test-files/alex/node-modules-2/node_modules/alex/empty_cli.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/alex/node-modules/node_modules/dot_bin/empty_alex b/dot_vim/plugged/ale/test/test-files/alex/node-modules/node_modules/dot_bin/empty_alex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/angular/node_modules/@angular/language-server/bin/empty_ngserver b/dot_vim/plugged/ale/test/test-files/angular/node_modules/@angular/language-server/bin/empty_ngserver new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/angular/node_modules/@angular/language-service/empty_dummy b/dot_vim/plugged/ale/test/test-files/angular/node_modules/@angular/language-service/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ant/ant-project/empty_build.xml b/dot_vim/plugged/ale/test/test-files/ant/ant-project/empty_build.xml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ant/bin/empty_executable_ant b/dot_vim/plugged/ale/test/test-files/ant/bin/empty_executable_ant new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ant/bin/empty_executable_ant.exe b/dot_vim/plugged/ale/test/test-files/ant/bin/empty_executable_ant.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/bazel/empty_BUILD b/dot_vim/plugged/ale/test/test-files/bazel/empty_BUILD new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/bazel/empty_WORKSPACE b/dot_vim/plugged/ale/test/test-files/bazel/empty_WORKSPACE new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/bazel/empty_defs.bzl b/dot_vim/plugged/ale/test/test-files/bazel/empty_defs.bzl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/bib/empty_dummy.bib b/dot_vim/plugged/ale/test/test-files/bib/empty_dummy.bib new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/build_compile_commands_project/build/empty_bad_folder_to_test_priority b/dot_vim/plugged/ale/test/test-files/c/build_compile_commands_project/build/empty_bad_folder_to_test_priority new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/build_compile_commands_project/build/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/c/build_compile_commands_project/build/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/configure_project/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/configure_project/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/configure_project/empty_configure b/dot_vim/plugged/ale/test/test-files/c/configure_project/empty_configure new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/configure_project/include/empty_test.h b/dot_vim/plugged/ale/test/test-files/c/configure_project/include/empty_test.h new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/configure_project/subdir/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/configure_project/subdir/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/empty_dummy.c b/dot_vim/plugged/ale/test/test-files/c/empty_dummy.c new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/git_and_nested_makefiles/include/empty_test.h b/dot_vim/plugged/ale/test/test-files/c/git_and_nested_makefiles/include/empty_test.h new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/git_and_nested_makefiles/src/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/git_and_nested_makefiles/src/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/gnumakefile_project/empty_GNUmakefile b/dot_vim/plugged/ale/test/test-files/c/gnumakefile_project/empty_GNUmakefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/gnumakefile_project/empty_file.c b/dot_vim/plugged/ale/test/test-files/c/gnumakefile_project/empty_file.c new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/h_file_project/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/h_file_project/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/h_file_project/empty_test.h b/dot_vim/plugged/ale/test/test-files/c/h_file_project/empty_test.h new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/h_file_project/subdir/empty_dummy b/dot_vim/plugged/ale/test/test-files/c/h_file_project/subdir/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/empty_test.hpp b/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/empty_test.hpp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/subdir/empty_dummy b/dot_vim/plugged/ale/test/test-files/c/hpp_file_project/subdir/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/json_project/build/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/c/json_project/build/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/json_project/include/empty_test.h b/dot_vim/plugged/ale/test/test-files/c/json_project/include/empty_test.h new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/json_project/subdir/empty_dummy b/dot_vim/plugged/ale/test/test-files/c/json_project/subdir/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/args b/dot_vim/plugged/ale/test/test-files/c/makefile_project/args new file mode 100644 index 0000000..ccaf82a --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/c/makefile_project/args @@ -0,0 +1,3 @@ +foolib.a +-DARGS1 +@subdir/args diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/empty_Makefile b/dot_vim/plugged/ale/test/test-files/c/makefile_project/empty_Makefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/empty__astylerc b/dot_vim/plugged/ale/test/test-files/c/makefile_project/empty__astylerc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/include/empty_test.h b/dot_vim/plugged/ale/test/test-files/c/makefile_project/include/empty_test.h new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/args b/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/args new file mode 100644 index 0000000..3fe9c3f --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/args @@ -0,0 +1 @@ +-DARGS2 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/empty_dummy b/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/empty_file.c b/dot_vim/plugged/ale/test/test-files/c/makefile_project/subdir/empty_file.c new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cargo/empty_Cargo.toml b/dot_vim/plugged/ale/test/test-files/cargo/empty_Cargo.toml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cargo/workspace_paths/empty_Cargo.toml b/dot_vim/plugged/ale/test/test-files/cargo/workspace_paths/empty_Cargo.toml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cargo/workspace_paths/subpath/empty_Cargo.toml b/dot_vim/plugged/ale/test/test-files/cargo/workspace_paths/subpath/empty_Cargo.toml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ccls/with_build_dir/unusual_build_dir_name/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/ccls/with_build_dir/unusual_build_dir_name/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ccls/with_ccls-root/empty_dot_ccls-root b/dot_vim/plugged/ale/test/test-files/ccls/with_ccls-root/empty_dot_ccls-root new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ccls/with_ccls/empty_dot_ccls b/dot_vim/plugged/ale/test/test-files/ccls/with_ccls/empty_dot_ccls new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ccls/with_compile_commands_json/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/ccls/with_compile_commands_json/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/checkstyle/empty_other_config.xml b/dot_vim/plugged/ale/test/test-files/checkstyle/empty_other_config.xml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/clangd/with_build_dir/unusual_build_dir_name/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/clangd/with_build_dir/unusual_build_dir_name/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/clangd/with_compile_commands/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/clangd/with_compile_commands/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/clangformat/with_clangformat/empty_dot_clang-format b/dot_vim/plugged/ale/test/test-files/clangformat/with_clangformat/empty_dot_clang-format new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cpp/empty_dot_astylerc b/dot_vim/plugged/ale/test/test-files/cpp/empty_dot_astylerc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cpp/empty_dummy.cpp b/dot_vim/plugged/ale/test/test-files/cpp/empty_dummy.cpp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cppcheck/one/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/cppcheck/one/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cppcheck/one/two/three/empty_file.c b/dot_vim/plugged/ale/test/test-files/cppcheck/one/two/three/empty_file.c new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cppcheck/one/two/three/empty_file.cpp b/dot_vim/plugged/ale/test/test-files/cppcheck/one/two/three/empty_file.cpp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cppcheck/with_build_dir/build/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/cppcheck/with_build_dir/build/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cquery/build/empty_compile_commands.json b/dot_vim/plugged/ale/test/test-files/cquery/build/empty_compile_commands.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cquery/with_cquery/empty_dot_cquery b/dot_vim/plugged/ale/test/test-files/cquery/with_cquery/empty_dot_cquery new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cspell/node-modules-2/node_modules/cspell/empty_executable_bin.js b/dot_vim/plugged/ale/test/test-files/cspell/node-modules-2/node_modules/cspell/empty_executable_bin.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cspell/node-modules/node_modules/dot_bin/empty_executable_cspell b/dot_vim/plugged/ale/test/test-files/cspell/node-modules/node_modules/dot_bin/empty_executable_cspell new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/csslint/other-app/empty_testfile.css b/dot_vim/plugged/ale/test/test-files/csslint/other-app/empty_testfile.css new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/csslint/some-app/empty_dot_csslintrc b/dot_vim/plugged/ale/test/test-files/csslint/some-app/empty_dot_csslintrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/csslint/some-app/subdir/empty_testfile.css b/dot_vim/plugged/ale/test/test-files/csslint/some-app/subdir/empty_testfile.css new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cucumber/features/empty_cuke.feature b/dot_vim/plugged/ale/test/test-files/cucumber/features/empty_cuke.feature new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/cucumber/features/step_definitions/empty_base_steps.rb b/dot_vim/plugged/ale/test/test-files/cucumber/features/step_definitions/empty_base_steps.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/d/empty_test.d b/dot_vim/plugged/ale/test/test-files/d/empty_test.d new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/dart/empty_dot_packages b/dot_vim/plugged/ale/test/test-files/dart/empty_dot_packages new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/dart/empty_testfile.dart b/dot_vim/plugged/ale/test/test-files/dart/empty_testfile.dart new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/dot_circleci/empty_config.yml b/dot_vim/plugged/ale/test/test-files/dot_circleci/empty_config.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/dot_gitignore b/dot_vim/plugged/ale/test/test-files/dot_gitignore new file mode 100644 index 0000000..7d6563e --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/dot_gitignore @@ -0,0 +1,2 @@ +# Don't ignore hidden files for this directory +!.* diff --git a/dot_vim/plugged/ale/test/test-files/dprint/empty_blank.ts b/dot_vim/plugged/ale/test/test-files/dprint/empty_blank.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/dprint/empty_dprint.json b/dot_vim/plugged/ale/test/test-files/dprint/empty_dprint.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/empty_testfile.ex b/dot_vim/plugged/ale/test/test-files/elixir/empty_testfile.ex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/mix_project/lib/empty_app.ex b/dot_vim/plugged/ale/test/test-files/elixir/mix_project/lib/empty_app.ex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/mix_project/mix.exs b/dot_vim/plugged/ale/test/test-files/elixir/mix_project/mix.exs new file mode 100644 index 0000000..419685a --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/elixir/mix_project/mix.exs @@ -0,0 +1,3 @@ +defmodule Test.MixProject do + # fake mix project file +end diff --git a/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app1/empty_mix.exs b/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app1/empty_mix.exs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app1/lib/empty_app.ex b/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app1/lib/empty_app.ex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app2/empty_mix.exs b/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app2/empty_mix.exs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app2/lib/empty_app.ex b/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/apps/app2/lib/empty_app.ex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/empty_mix.exs b/dot_vim/plugged/ale/test/test-files/elixir/umbrella_project/empty_mix.exs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/empty_elm.json b/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/empty_elm.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/node_modules/dot_bin/empty_elm b/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/node_modules/dot_bin/empty_elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/tests/empty_TestMain.elm b/dot_vim/plugged/ale/test/test-files/elm/newapp-notests/tests/empty_TestMain.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp/empty_elm.json b/dot_vim/plugged/ale/test/test-files/elm/newapp/empty_elm.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp/node_modules/dot_bin/empty_elm b/dot_vim/plugged/ale/test/test-files/elm/newapp/node_modules/dot_bin/empty_elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp/node_modules/dot_bin/empty_elm-test b/dot_vim/plugged/ale/test/test-files/elm/newapp/node_modules/dot_bin/empty_elm-test new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp/src/empty_Main.elm b/dot_vim/plugged/ale/test/test-files/elm/newapp/src/empty_Main.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/newapp/tests/empty_TestSuite.elm b/dot_vim/plugged/ale/test/test-files/elm/newapp/tests/empty_TestSuite.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/node_modules/dot_bin/empty_elm-format b/dot_vim/plugged/ale/test/test-files/elm/node_modules/dot_bin/empty_elm-format new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/oldapp/empty_elm-package.json b/dot_vim/plugged/ale/test/test-files/elm/oldapp/empty_elm-package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/oldapp/node_modules/dot_bin/empty_elm b/dot_vim/plugged/ale/test/test-files/elm/oldapp/node_modules/dot_bin/empty_elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/oldapp/node_modules/dot_bin/empty_elm-test b/dot_vim/plugged/ale/test/test-files/elm/oldapp/node_modules/dot_bin/empty_elm-test new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/oldapp/src/empty_Main.elm b/dot_vim/plugged/ale/test/test-files/elm/oldapp/src/empty_Main.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/oldapp/tests/empty_TestSuite.elm b/dot_vim/plugged/ale/test/test-files/elm/oldapp/tests/empty_TestSuite.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/elm/src/subdir/empty_testfile.elm b/dot_vim/plugged/ale/test/test-files/elm/src/subdir/empty_testfile.elm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app/_build/default/lib/dep/empty_rebar.lock b/dot_vim/plugged/ale/test/test-files/erlang/app/_build/default/lib/dep/empty_rebar.lock new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app/_build/default/lib/dep/src/empty_dep.erl b/dot_vim/plugged/ale/test/test-files/erlang/app/_build/default/lib/dep/src/empty_dep.erl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app/empty_rebar.lock b/dot_vim/plugged/ale/test/test-files/erlang/app/empty_rebar.lock new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app/src/empty_app.erl b/dot_vim/plugged/ale/test/test-files/erlang/app/src/empty_app.erl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/empty_erlang_ls.config b/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/empty_erlang_ls.config new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/src/empty_dep.erl b/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/_build/default/lib/dep/src/empty_dep.erl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/empty_erlang_ls.config b/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/empty_erlang_ls.config new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/src/empty_app.erl b/dot_vim/plugged/ale/test/test-files/erlang/app_with_erlang_ls_config/src/empty_app.erl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/kerl_otp_root/empty_dot_kerl_config b/dot_vim/plugged/ale/test/test-files/erlang/kerl_otp_root/empty_dot_kerl_config new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/erlang/kerl_otp_root/lib/stdlib-4.1.1/src/empty_array.erl b/dot_vim/plugged/ale/test/test-files/erlang/kerl_otp_root/lib/stdlib-4.1.1/src/empty_array.erl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eruby/empty_dummy.html.erb b/dot_vim/plugged/ale/test/test-files/eruby/empty_dummy.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/app-with-eslint-d/node_modules/dot_bin/empty_eslint_d b/dot_vim/plugged/ale/test/test-files/eslint/app-with-eslint-d/node_modules/dot_bin/empty_eslint_d new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/empty_package.json b/dot_vim/plugged/ale/test/test-files/eslint/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/node_modules/dot_bin/empty_eslint b/dot_vim/plugged/ale/test/test-files/eslint/node_modules/dot_bin/empty_eslint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/other-app/subdir/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/eslint/other-app/subdir/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/empty_dot_eslintrc.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/empty_dot_eslintrc.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/eslint/bin/empty_eslint.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/eslint/bin/empty_eslint.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/standard/bin/empty_cmd.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/standard/bin/empty_cmd.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/stylelint/bin/empty_stylelint.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/stylelint/bin/empty_stylelint.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/xo/empty_cli.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/node_modules/xo/empty_cli.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-config/empty_dot_eslintrc b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-config/empty_dot_eslintrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-package-json/empty_package.json b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-package-json/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-package-json/node_modules/empty_dot_gitkeep b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir-with-package-json/node_modules/empty_dot_gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.css b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.css new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.ts b/dot_vim/plugged/ale/test/test-files/eslint/react-app/subdir/empty_testfile.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/yarn2-app/dot_yarn/sdks/eslint/bin/empty_eslint.js b/dot_vim/plugged/ale/test/test-files/eslint/yarn2-app/dot_yarn/sdks/eslint/bin/empty_eslint.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/eslint/yarn2-app/subdir/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/eslint/yarn2-app/subdir/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/fecs/empty_executable_fecs b/dot_vim/plugged/ale/test/test-files/fecs/empty_executable_fecs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/fecs/empty_executable_fecs.exe b/dot_vim/plugged/ale/test/test-files/fecs/empty_executable_fecs.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/fish/empty_testfile.fish b/dot_vim/plugged/ale/test/test-files/fish/empty_testfile.fish new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/flow/a/empty_dot_flowconfig b/dot_vim/plugged/ale/test/test-files/flow/a/empty_dot_flowconfig new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/flow/a/sub/empty_dummy b/dot_vim/plugged/ale/test/test-files/flow/a/sub/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/flow/b/sub/empty_dummy b/dot_vim/plugged/ale/test/test-files/flow/b/sub/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/fortls-project/dot_fortls b/dot_vim/plugged/ale/test/test-files/fortls-project/dot_fortls new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/fortls-project/dot_fortls @@ -0,0 +1,2 @@ +{ +} diff --git a/dot_vim/plugged/ale/test/test-files/go/empty_testfile.go b/dot_vim/plugged/ale/test/test-files/go/empty_testfile.go new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/go/empty_testfile2.go b/dot_vim/plugged/ale/test/test-files/go/empty_testfile2.go new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/go/go1/prj1/empty_file.go b/dot_vim/plugged/ale/test/test-files/go/go1/prj1/empty_file.go new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/go/go2/prj2/empty_file.go b/dot_vim/plugged/ale/test/test-files/go/go2/prj2/empty_file.go new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/go/gopath/bin/empty_gopls b/dot_vim/plugged/ale/test/test-files/go/gopath/bin/empty_gopls new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/go/gopath/bin/empty_staticcheck b/dot_vim/plugged/ale/test/test-files/go/gopath/bin/empty_staticcheck new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/build-gradle-project/empty_build.gradle b/dot_vim/plugged/ale/test/test-files/gradle/build-gradle-project/empty_build.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/build-gradle-project/src/main/kotlin/empty_dummy.kt b/dot_vim/plugged/ale/test/test-files/gradle/build-gradle-project/src/main/kotlin/empty_dummy.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/empty_executable_gradle b/dot_vim/plugged/ale/test/test-files/gradle/empty_executable_gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/non-gradle-project/src/main/kotlin/empty_dummy.kt b/dot_vim/plugged/ale/test/test-files/gradle/non-gradle-project/src/main/kotlin/empty_dummy.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/settings-gradle-project/empty_settings.gradle b/dot_vim/plugged/ale/test/test-files/gradle/settings-gradle-project/empty_settings.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/settings-gradle-project/src/main/kotlin/empty_dummy.kt b/dot_vim/plugged/ale/test/test-files/gradle/settings-gradle-project/src/main/kotlin/empty_dummy.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/empty_build.gradle b/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/empty_build.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/empty_settings.gradle b/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/empty_settings.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/src/main/kotlin/empty_dummy.kt b/dot_vim/plugged/ale/test/test-files/gradle/unwrapped-project/src/main/kotlin/empty_dummy.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_build.gradle b/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_build.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_gradlew b/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_gradlew new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_settings.gradle b/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/empty_settings.gradle new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/src/main/kotlin/empty_dummy.kt b/dot_vim/plugged/ale/test/test-files/gradle/wrapped-project/src/main/kotlin/empty_dummy.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/empty_dot_haml-lint.yml b/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/empty_dot_haml-lint.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/empty_dot_rubocop.yml b/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/empty_dot_rubocop.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/subdir/empty_file.haml b/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-and-rubocop/subdir/empty_file.haml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-yml/empty_dot_haml-lint.yml b/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-yml/empty_dot_haml-lint.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-yml/subdir/empty_file.haml b/dot_vim/plugged/ale/test/test-files/hamllint/haml-lint-yml/subdir/empty_file.haml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/rubocop-yml/empty_dot_rubocop.yml b/dot_vim/plugged/ale/test/test-files/hamllint/rubocop-yml/empty_dot_rubocop.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hamllint/rubocop-yml/subdir/empty_file.haml b/dot_vim/plugged/ale/test/test-files/hamllint/rubocop-yml/subdir/empty_file.haml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hdl_server/empty_foo.vhd b/dot_vim/plugged/ale/test/test-files/hdl_server/empty_foo.vhd new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty__hdl_checker.config b/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty__hdl_checker.config new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty_dot_hdl_checker.config b/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty_dot_hdl_checker.config new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty_foo.vhd b/dot_vim/plugged/ale/test/test-files/hdl_server/with_config_file/empty_foo.vhd new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/hie_paths/empty_file.hs b/dot_vim/plugged/ale/test/test-files/hie_paths/empty_file.hs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/html_beautify/empty_executable_html-beautify b/dot_vim/plugged/ale/test/test-files/html_beautify/empty_executable_html-beautify new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/html_beautify/empty_test.html b/dot_vim/plugged/ale/test/test-files/html_beautify/empty_test.html new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/htmlhint/node_modules/dot_bin/empty_executable_htmlhint b/dot_vim/plugged/ale/test/test-files/htmlhint/node_modules/dot_bin/empty_executable_htmlhint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/htmlhint/with_config/empty_dot_htmlhintrc b/dot_vim/plugged/ale/test/test-files/htmlhint/with_config/empty_dot_htmlhintrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ink/story/empty_main.ink b/dot_vim/plugged/ale/test/test-files/ink/story/empty_main.ink new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/inko/empty_test.inko b/dot_vim/plugged/ale/test/test-files/inko/empty_test.inko new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/inko/tests/test/empty_test_foo.inko b/dot_vim/plugged/ale/test/test-files/inko/tests/test/empty_test_foo.inko new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/no_main/src/test/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/no_main/src/test/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_jaxb/src/main/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_jaxb/src/main/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_jaxb/src/main/jaxb/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_jaxb/src/main/jaxb/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_main/build/gen/main/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_main/build/gen/main/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_main/build/gen2/main/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_main/build/gen2/main/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_main/src/main/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_main/src/main/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/java/with_main/src/test/java/com/something/empty_dummy b/dot_vim/plugged/ale/test/test-files/java/with_main/src/test/java/com/something/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/javascript/empty_test.js b/dot_vim/plugged/ale/test/test-files/javascript/empty_test.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/javascript_deno/custom_import_map.json b/dot_vim/plugged/ale/test/test-files/javascript_deno/custom_import_map.json new file mode 100644 index 0000000..9f5a19a --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/javascript_deno/custom_import_map.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/dot_vim/plugged/ale/test/test-files/javascript_deno/import_map.json b/dot_vim/plugged/ale/test/test-files/javascript_deno/import_map.json new file mode 100644 index 0000000..9f5a19a --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/javascript_deno/import_map.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/dot_vim/plugged/ale/test/test-files/javascript_deno/main.js b/dot_vim/plugged/ale/test/test-files/javascript_deno/main.js new file mode 100644 index 0000000..accefce --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/javascript_deno/main.js @@ -0,0 +1 @@ +console.log("Hello World"); diff --git a/dot_vim/plugged/ale/test/test-files/javascript_deno/tsconfig.json b/dot_vim/plugged/ale/test/test-files/javascript_deno/tsconfig.json new file mode 100644 index 0000000..152b034 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/javascript_deno/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "allowJs": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "isolatedModules": true, + "jsx": "react", + "lib": ["deno.window"], + "module": "esnext", + "strict": true, + "target": "esnext", + "useDefineForClassFields": true + }, + "includes": ["main.js"] +} diff --git a/dot_vim/plugged/ale/test/test-files/json/testfile.json b/dot_vim/plugged/ale/test/test-files/json/testfile.json new file mode 100644 index 0000000..fe317eb --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/json/testfile.json @@ -0,0 +1 @@ +{"answer":42} diff --git a/dot_vim/plugged/ale/test/test-files/jsonlint/app-without-jsonlint/src/empty_app.json b/dot_vim/plugged/ale/test/test-files/jsonlint/app-without-jsonlint/src/empty_app.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/jsonlint/app/node_modules/dot_bin/empty_jsonlint b/dot_vim/plugged/ale/test/test-files/jsonlint/app/node_modules/dot_bin/empty_jsonlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/jsonlint/app/src/empty_app.json b/dot_vim/plugged/ale/test/test-files/jsonlint/app/src/empty_app.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/jsonlint/node_modules/jsonlint/lib/empty_cli.js b/dot_vim/plugged/ale/test/test-files/jsonlint/node_modules/jsonlint/lib/empty_cli.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/julia/empty_REQUIRE b/dot_vim/plugged/ale/test/test-files/julia/empty_REQUIRE new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/julia/empty_test.jl b/dot_vim/plugged/ale/test/test-files/julia/empty_test.jl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/kotlin/empty_testfile.kt b/dot_vim/plugged/ale/test/test-files/kotlin/empty_testfile.kt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/lessc/node_modules/dot_bin/empty_executable_lessc b/dot_vim/plugged/ale/test/test-files/lessc/node_modules/dot_bin/empty_executable_lessc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/long-line/setup.cfg b/dot_vim/plugged/ale/test/test-files/long-line/setup.cfg new file mode 100644 index 0000000..43d7a3a --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/long-line/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 90 diff --git a/dot_vim/plugged/ale/test/test-files/lua/empty_testfile.lua b/dot_vim/plugged/ale/test/test-files/lua/empty_testfile.lua new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/markdown/empty_testfile.md b/dot_vim/plugged/ale/test/test-files/markdown/empty_testfile.md new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/empty_executable_mvn b/dot_vim/plugged/ale/test/test-files/maven/empty_executable_mvn new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/empty_executable_mvnw b/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/empty_executable_mvnw new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/empty_executable_mvnw.cmd b/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/empty_executable_mvnw.cmd new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/src/main/java/empty_dummy1.java b/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module1/src/main/java/empty_dummy1.java new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module2/src/main/java/empty_dummy2.java b/dot_vim/plugged/ale/test/test-files/maven/maven-java-project/module2/src/main/java/empty_dummy2.java new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/maven/non-maven-project/src/main/java/empty_dummy.java b/dot_vim/plugged/ale/test/test-files/maven/non-maven-project/src/main/java/empty_dummy.java new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/nim/with-git/src/empty_source.nim b/dot_vim/plugged/ale/test/test-files/nim/with-git/src/empty_source.nim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ocaml/empty_testfile.ml b/dot_vim/plugged/ale/test/test-files/ocaml/empty_testfile.ml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ocamllsp/empty_dune-project b/dot_vim/plugged/ale/test/test-files/ocamllsp/empty_dune-project new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ols/empty_dot_merlin b/dot_vim/plugged/ale/test/test-files/ols/empty_dot_merlin new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ols/node_modules/dot_bin/empty_ocaml-language-server b/dot_vim/plugged/ale/test/test-files/ols/node_modules/dot_bin/empty_ocaml-language-server new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/pascal/empty_test.pas b/dot_vim/plugged/ale/test/test-files/pascal/empty_test.pas new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-php-cs-fixer/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-with-php-cs-fixer/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-php-cs-fixer/vendor/bin/empty_php-cs-fixer b/dot_vim/plugged/ale/test/test-files/php/project-with-php-cs-fixer/vendor/bin/empty_php-cs-fixer new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-phpcbf/foo/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-with-phpcbf/foo/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-phpcbf/vendor/bin/empty_phpcbf b/dot_vim/plugged/ale/test/test-files/php/project-with-phpcbf/vendor/bin/empty_phpcbf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-pint/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-with-pint/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-with-pint/vendor/bin/empty_pint b/dot_vim/plugged/ale/test/test-files/php/project-with-pint/vendor/bin/empty_pint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-without-php-cs-fixer/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-without-php-cs-fixer/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-without-phpcbf/foo/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-without-phpcbf/foo/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/project-without-pint/empty_test.php b/dot_vim/plugged/ale/test/test-files/php/project-without-pint/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/vendor/bin/empty_executable_php-language-server.php b/dot_vim/plugged/ale/test/test-files/php/vendor/bin/empty_executable_php-language-server.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/with-composer/empty_composer.json b/dot_vim/plugged/ale/test/test-files/php/with-composer/empty_composer.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/with-composer/vendor/bin/empty_executable_php-language-server.php b/dot_vim/plugged/ale/test/test-files/php/with-composer/vendor/bin/empty_executable_php-language-server.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/php/with-git/vendor/bin/empty_executable_php-language-server.php b/dot_vim/plugged/ale/test/test-files/php/with-git/vendor/bin/empty_executable_php-language-server.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/phpcs/project-with-phpcs/foo/empty_test.php b/dot_vim/plugged/ale/test/test-files/phpcs/project-with-phpcs/foo/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/phpcs/project-with-phpcs/vendor/bin/empty_phpcs b/dot_vim/plugged/ale/test/test-files/phpcs/project-with-phpcs/vendor/bin/empty_phpcs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/phpcs/project-without-phpcs/foo/empty_test.php b/dot_vim/plugged/ale/test/test-files/phpcs/project-without-phpcs/foo/empty_test.php new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.css b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.css new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.json b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.scss b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.scss new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.ts b/dot_vim/plugged/ale/test/test-files/prettier/empty_testfile.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/with_config/empty_dot_prettierrc b/dot_vim/plugged/ale/test/test-files/prettier/with_config/empty_dot_prettierrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/with_config/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/prettier/with_config/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/with_prettierignore/empty_dot_prettierignore b/dot_vim/plugged/ale/test/test-files/prettier/with_prettierignore/empty_dot_prettierignore new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/prettier/with_prettierignore/src/empty_testfile.js b/dot_vim/plugged/ale/test/test-files/prettier/with_prettierignore/src/empty_testfile.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/proto/empty_testfile.proto b/dot_vim/plugged/ale/test/test-files/proto/empty_testfile.proto new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/psalm/vendor/bin/empty_executable_psalm b/dot_vim/plugged/ale/test/test-files/psalm/vendor/bin/empty_executable_psalm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puglint/empty_package.json b/dot_vim/plugged/ale/test/test-files/puglint/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puglint/node_modules/dot_bin/empty_pug-lint b/dot_vim/plugged/ale/test/test-files/puglint/node_modules/dot_bin/empty_pug-lint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_dir/empty_dot_pug-lintrc b/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_dir/empty_dot_pug-lintrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_js_dir/empty_dot_pug-lintrc.js b/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_js_dir/empty_dot_pug-lintrc.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_json_dir/empty_dot_pug-lintrc.json b/dot_vim/plugged/ale/test/test-files/puglint/puglint_rc_json_dir/empty_dot_pug-lintrc.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/empty_dummy.pp b/dot_vim/plugged/ale/test/test-files/puppet/empty_dummy.pp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/empty_metadata.json b/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/empty_metadata.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/lib/puppet/types/empty_exampletype.rb b/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/lib/puppet/types/empty_exampletype.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/template/empty_template.epp b/dot_vim/plugged/ale/test/test-files/puppet/new-style-module/template/empty_template.epp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/old-style-module/manifests/empty_init.pp b/dot_vim/plugged/ale/test/test-files/puppet/old-style-module/manifests/empty_init.pp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/puppet/old-style-module/templates/empty_template.epp b/dot_vim/plugged/ale/test/test-files/puppet/old-style-module/templates/empty_template.epp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/bower/empty_Foo.purs b/dot_vim/plugged/ale/test/test-files/purescript/bower/empty_Foo.purs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/bower/empty_bower.json b/dot_vim/plugged/ale/test/test-files/purescript/bower/empty_bower.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/psc-package/empty_Foo.purs b/dot_vim/plugged/ale/test/test-files/purescript/psc-package/empty_Foo.purs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/psc-package/empty_psc-package.json b/dot_vim/plugged/ale/test/test-files/purescript/psc-package/empty_psc-package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/spago/empty_Foo.purs b/dot_vim/plugged/ale/test/test-files/purescript/spago/empty_Foo.purs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/purescript/spago/empty_spago.dhall b/dot_vim/plugged/ale/test/test-files/purescript/spago/empty_spago.dhall new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/MANIFEST.in b/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/MANIFEST.in new file mode 100644 index 0000000..4617b0e --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include *.ini *.cfg *.txt +include requirements/*.txt diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/namespace/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/namespace/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/namespace/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_manifest/namespace/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/namespace/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/namespace/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/namespace/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/namespace/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/pytest.ini b/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/pytest.ini new file mode 100644 index 0000000..1433c6c --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/python/namespace_package_pytest/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +DJANGO_SETTINGS_MODULE=foo.settings diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/namespace/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/namespace/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/namespace/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/namespace/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/setup.cfg b/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/setup.cfg new file mode 100644 index 0000000..791f075 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/python/namespace_package_setup/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 119 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/namespace/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/namespace/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/namespace/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/namespace/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/tox.ini b/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/tox.ini new file mode 100644 index 0000000..edd8788 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/python/namespace_package_tox/tox.ini @@ -0,0 +1,3 @@ +[tox] +envlist = + py352 diff --git a/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty_COMMIT_EDITMSG b/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty_COMMIT_EDITMSG new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/no_virtualenv/subdir/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/pipenv/empty_Pipfile.lock b/dot_vim/plugged/ale/test/test-files/python/pipenv/empty_Pipfile.lock new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/poetry/empty_poetry.lock b/dot_vim/plugged/ale/test/test-files/python/poetry/empty_poetry.lock new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/empty_dot_pyre_configuration.local b/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/empty_dot_pyre_configuration.local new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/pyre_configuration_dir/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/python-package-project/empty_dot_flake8 b/dot_vim/plugged/ale/test/test-files/python/python-package-project/empty_dot_flake8 new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/python-package-project/package-name/empty_module.py b/dot_vim/plugged/ale/test/test-files/python/python-package-project/package-name/empty_module.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_bandit/empty_dot_bandit b/dot_vim/plugged/ale/test/test-files/python/with_bandit/empty_dot_bandit new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_bandit/namespace/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/with_bandit/namespace/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_bandit/namespace/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/with_bandit/namespace/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/empty_mypy.ini b/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/empty_mypy.ini new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/tests/empty_pytest.ini b/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/tests/empty_pytest.ini new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/tests/testsubfolder/empty_my_tests.py b/dot_vim/plugged/ale/test/test-files/python/with_mypy_ini_and_pytest_ini/tests/testsubfolder/empty_my_tests.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/dir_with_yapf_config/empty_dot_style.yapf b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/dir_with_yapf_config/empty_dot_style.yapf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_activate b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_activate new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autoflake.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autoflake.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autoimport.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autoimport.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autopep8.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_autopep8.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_black.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_black.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_flake8.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_flake8.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_flakehell.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_flakehell.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_gitlint.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_gitlint.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_isort.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_isort.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_mypy.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_mypy.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pyflakes.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pyflakes.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylama.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylama.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylint.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylint.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylsp.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pylsp.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pyre.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_pyre.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_refurb.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_refurb.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_reorder-python-imports.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_reorder-python-imports.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_ruff.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_ruff.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_tidy-imports.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_tidy-imports.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_unimport.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_unimport.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_vulture.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_vulture.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_yapf.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_executable_yapf.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_yamlfix.exe b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/Scripts/empty_yamlfix.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_activate b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_activate new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autoflake b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autoflake new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autoimport b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autoimport new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autopep8 b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_autopep8 new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_black b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_black new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_flake8 b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_flake8 new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_flakehell b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_flakehell new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_gitlint b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_gitlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_isort b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_isort new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_mypy b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_mypy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pyflakes b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pyflakes new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylama b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylama new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylint b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylsp b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pylsp new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pyre b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_pyre new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_refurb b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_refurb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_reorder-python-imports b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_reorder-python-imports new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_ruff b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_ruff new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_tidy-imports b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_tidy-imports new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_unimport b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_unimport new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_vulture b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_vulture new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_yamlfix b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_yamlfix new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_yapf b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/env/bin/empty_executable_yapf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_COMMIT_EDITMSG b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_COMMIT_EDITMSG new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty___init__.py b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty___init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_bar.py b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_bar.py new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_bar.pyi b/dot_vim/plugged/ale/test/test-files/python/with_virtualenv/subdir/foo/empty_bar.pyi new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/r/empty_dot_Rprofile b/dot_vim/plugged/ale/test/test-files/r/empty_dot_Rprofile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/foo.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/foo.rkt new file mode 100644 index 0000000..622f3ee --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/foo.rkt @@ -0,0 +1,3 @@ +#lang racket/base + +(displayln "foo") diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/init.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/init.rkt new file mode 100644 index 0000000..e0c94f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/c/init.rkt @@ -0,0 +1 @@ +#lang info diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/foo.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/foo.rkt new file mode 100644 index 0000000..622f3ee --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/foo.rkt @@ -0,0 +1,3 @@ +#lang racket/base + +(displayln "foo") diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/init.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/init.rkt new file mode 100644 index 0000000..e0c94f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/b/init.rkt @@ -0,0 +1 @@ +#lang info diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/foo.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/foo.rkt new file mode 100644 index 0000000..622f3ee --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/foo.rkt @@ -0,0 +1,3 @@ +#lang racket/base + +(displayln "foo") diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/init.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/init.rkt new file mode 100644 index 0000000..e0c94f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/a/init.rkt @@ -0,0 +1 @@ +#lang info diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/foo.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/foo.rkt new file mode 100644 index 0000000..622f3ee --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/foo.rkt @@ -0,0 +1,3 @@ +#lang racket/base + +(displayln "foo") diff --git a/dot_vim/plugged/ale/test/test-files/racket/many-inits/init.rkt b/dot_vim/plugged/ale/test/test-files/racket/many-inits/init.rkt new file mode 100644 index 0000000..e0c94f2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/many-inits/init.rkt @@ -0,0 +1 @@ +#lang info diff --git a/dot_vim/plugged/ale/test/test-files/racket/simple-script/foo.rkt b/dot_vim/plugged/ale/test/test-files/racket/simple-script/foo.rkt new file mode 100644 index 0000000..622f3ee --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/racket/simple-script/foo.rkt @@ -0,0 +1,3 @@ +#lang racket/base + +(displayln "foo") diff --git a/dot_vim/plugged/ale/test/test-files/reasonml/empty_bsconfig.json b/dot_vim/plugged/ale/test/test-files/reasonml/empty_bsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/reasonml/empty_testfile.re b/dot_vim/plugged/ale/test/test-files/reasonml/empty_testfile.re new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/remark_lint/with_bin_path/node_modules/dot_bin/empty_executable_remark b/dot_vim/plugged/ale/test/test-files/remark_lint/with_bin_path/node_modules/dot_bin/empty_executable_remark new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/empty_dummy.rb b/dot_vim/plugged/ale/test/test-files/ruby/empty_dummy.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/not_a_rails_app/empty_file.rb b/dot_vim/plugged/ale/test/test-files/ruby/not_a_rails_app/empty_file.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/empty_dummy.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/empty_dummy.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/models/empty_thing.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/models/empty_thing.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/views/empty_my_great_view.html.erb b/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/app/views/empty_my_great_view.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/config/empty_dummy.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/config/empty_dummy.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/db/empty_dummy.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_rails_app/db/empty_dummy.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app1/empty_Rakefile b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app1/empty_Rakefile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app1/lib/empty_file.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app1/lib/empty_file.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app2/empty_Gemfile b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app2/empty_Gemfile new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app2/lib/empty_file.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app2/lib/empty_file.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app3/empty_dot_solargraph.yml b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app3/empty_dot_solargraph.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app3/lib/empty_file.rb b/dot_vim/plugged/ale/test/test-files/ruby/valid_ruby_app3/lib/empty_file.rb new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/with_config/empty_dot_rubocop.yml b/dot_vim/plugged/ale/test/test-files/ruby/with_config/empty_dot_rubocop.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/ruby/with_config/empty_dot_standard.yml b/dot_vim/plugged/ale/test/test-files/ruby/with_config/empty_dot_standard.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/rust/cargo/empty_Cargo.toml b/dot_vim/plugged/ale/test/test-files/rust/cargo/empty_Cargo.toml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/rust/cargo/empty_testfile.rs b/dot_vim/plugged/ale/test/test-files/rust/cargo/empty_testfile.rs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/rust/rust-project/empty_rust-project.json b/dot_vim/plugged/ale/test/test-files/rust/rust-project/empty_rust-project.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/rust/rust-project/empty_testfile.rs b/dot_vim/plugged/ale/test/test-files/rust/rust-project/empty_testfile.rs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/sasslint/with-bin/node_modules/dot_bin/empty_executable_sass-lint b/dot_vim/plugged/ale/test/test-files/sasslint/with-bin/node_modules/dot_bin/empty_executable_sass-lint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/sasslint/with-source/node_modules/sass-lint/bin/empty_executable_sass-lint.js b/dot_vim/plugged/ale/test/test-files/sasslint/with-source/node_modules/sass-lint/bin/empty_executable_sass-lint.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/scala/empty_dummy.scala b/dot_vim/plugged/ale/test/test-files/scala/empty_dummy.scala new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/scala/invalid_sbt_project/empty_Main.scala b/dot_vim/plugged/ale/test/test-files/scala/invalid_sbt_project/empty_Main.scala new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/scala/valid_sbt_project/empty_Main.scala b/dot_vim/plugged/ale/test/test-files/scala/valid_sbt_project/empty_Main.scala new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/scala/valid_sbt_project/empty_build.sbt b/dot_vim/plugged/ale/test/test-files/scala/valid_sbt_project/empty_build.sbt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/slimlint/empty_dot_rubocop.yml b/dot_vim/plugged/ale/test/test-files/slimlint/empty_dot_rubocop.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/slimlint/subdir/empty_file.slim b/dot_vim/plugged/ale/test/test-files/slimlint/subdir/empty_file.slim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/smlnj/cm/empty_foo.sml b/dot_vim/plugged/ale/test/test-files/smlnj/cm/empty_foo.sml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/smlnj/cm/empty_sources.cm b/dot_vim/plugged/ale/test/test-files/smlnj/cm/empty_sources.cm new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/smlnj/cm/path/to/empty_bar.sml b/dot_vim/plugged/ale/test/test-files/smlnj/cm/path/to/empty_bar.sml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/smlnj/file/empty_qux.sml b/dot_vim/plugged/ale/test/test-files/smlnj/file/empty_qux.sml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/solhint/empty_Contract.sol b/dot_vim/plugged/ale/test/test-files/solhint/empty_Contract.sol new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/solhint/empty_package.json b/dot_vim/plugged/ale/test/test-files/solhint/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/solhint/node_modules/dot_bin/empty_solhint b/dot_vim/plugged/ale/test/test-files/solhint/node_modules/dot_bin/empty_solhint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/solhint/node_modules/solhint/empty_index.js b/dot_vim/plugged/ale/test/test-files/solhint/node_modules/solhint/empty_index.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/spectral/empty_openapi.yaml b/dot_vim/plugged/ale/test/test-files/spectral/empty_openapi.yaml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/spectral/node_modules/dot_bin/empty_spectral b/dot_vim/plugged/ale/test/test-files/spectral/node_modules/dot_bin/empty_spectral new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/stack/empty_stack.yaml b/dot_vim/plugged/ale/test/test-files/stack/empty_stack.yaml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/standard/with-bin/node_modules/dot_bin/empty_executable_standard b/dot_vim/plugged/ale/test/test-files/standard/with-bin/node_modules/dot_bin/empty_executable_standard new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/standard/with-cmd/node_modules/standard/bin/empty_executable_cmd.js b/dot_vim/plugged/ale/test/test-files/standard/with-cmd/node_modules/standard/bin/empty_executable_cmd.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/stylelint/node_modules/dot_bin/empty_executable_stylelint b/dot_vim/plugged/ale/test/test-files/stylelint/node_modules/dot_bin/empty_executable_stylelint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swaglint/docs/empty_swagger.yaml b/dot_vim/plugged/ale/test/test-files/swaglint/docs/empty_swagger.yaml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swaglint/node_modules/dot_bin/empty_swaglint b/dot_vim/plugged/ale/test/test-files/swaglint/node_modules/dot_bin/empty_swaglint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/empty_dummy.swift b/dot_vim/plugged/ale/test/test-files/swift/empty_dummy.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/non-swift-package-project/src/folder/empty_dummy.swift b/dot_vim/plugged/ale/test/test-files/swift/non-swift-package-project/src/folder/empty_dummy.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/dot_swift-format b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/dot_swift-format new file mode 100644 index 0000000..19fb8b9 --- /dev/null +++ b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/dot_swift-format @@ -0,0 +1,10 @@ +{ + "version": 1, + "lineLength": 100, + "indentation": { + "spaces": 4 + }, + "respectsExistingLineBreaks": true, + "lineBreakBeforeControlFlowKeywords": true, + "lineBreakBeforeEachArgument": true +} diff --git a/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/empty_Package.swift b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/empty_Package.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/src/folder/empty_dummy.swift b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project-with-config/src/folder/empty_dummy.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/swift-package-project/empty_Package.swift b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project/empty_Package.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swift/swift-package-project/src/folder/empty_dummy.swift b/dot_vim/plugged/ale/test/test-files/swift/swift-package-project/src/folder/empty_dummy.swift new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods-and-react-native/Pods/SwiftLint/empty_swiftlint b/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods-and-react-native/Pods/SwiftLint/empty_swiftlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods-and-react-native/ios/Pods/SwiftLint/empty_swiftlint b/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods-and-react-native/ios/Pods/SwiftLint/empty_swiftlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods/Pods/SwiftLint/empty_swiftlint b/dot_vim/plugged/ale/test/test-files/swiftlint/cocoapods/Pods/SwiftLint/empty_swiftlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/swiftlint/react-native/ios/Pods/SwiftLint/empty_swiftlint b/dot_vim/plugged/ale/test/test-files/swiftlint/react-native/ios/Pods/SwiftLint/empty_swiftlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/terraform/dot_terraform/empty_dummy b/dot_vim/plugged/ale/test/test-files/terraform/dot_terraform/empty_dummy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/terraform/empty_main.tf b/dot_vim/plugged/ale/test/test-files/terraform/empty_main.tf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tex/empty_sample1.tex b/dot_vim/plugged/ale/test/test-files/tex/empty_sample1.tex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tex/empty_sample2.tex b/dot_vim/plugged/ale/test/test-files/tex/empty_sample2.tex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tex/empty_testfile.tex b/dot_vim/plugged/ale/test/test-files/tex/empty_testfile.tex new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/textlint/with_bin_path/node_modules/dot_bin/empty_executable_textlint b/dot_vim/plugged/ale/test/test-files/textlint/with_bin_path/node_modules/dot_bin/empty_executable_textlint new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/empty_executable_textlint.js b/dot_vim/plugged/ale/test/test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/empty_executable_textlint.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tflint/foo/empty_bar.tf b/dot_vim/plugged/ale/test/test-files/tflint/foo/empty_bar.tf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tflint/foo/empty_dot_tflint.hcl b/dot_vim/plugged/ale/test/test-files/tflint/foo/empty_dot_tflint.hcl new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tfsec/json/dot_tfsec/empty_config.json b/dot_vim/plugged/ale/test/test-files/tfsec/json/dot_tfsec/empty_config.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tfsec/json/empty_main.tf b/dot_vim/plugged/ale/test/test-files/tfsec/json/empty_main.tf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tfsec/yml/dot_tfsec/empty_config.yml b/dot_vim/plugged/ale/test/test-files/tfsec/yml/dot_tfsec/empty_config.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tfsec/yml/empty_main.tf b/dot_vim/plugged/ale/test/test-files/tfsec/yml/empty_main.tf new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tidy/empty_dot_tidyrc b/dot_vim/plugged/ale/test/test-files/tidy/empty_dot_tidyrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tidy/empty_executable_tidy b/dot_vim/plugged/ale/test/test-files/tidy/empty_executable_tidy new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tidy/empty_executable_tidy.exe b/dot_vim/plugged/ale/test/test-files/tidy/empty_executable_tidy.exe new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tidy/empty_test.html b/dot_vim/plugged/ale/test/test-files/tidy/empty_test.html new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/top/ale-special-directory-name-dont-use-this-please/empty_empty-file b/dot_vim/plugged/ale/test/test-files/top/ale-special-directory-name-dont-use-this-please/empty_empty-file new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/top/empty_example.ini b/dot_vim/plugged/ale/test/test-files/top/empty_example.ini new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/top/middle/bottom/empty_dummy.txt b/dot_vim/plugged/ale/test/test-files/top/middle/bottom/empty_dummy.txt new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tsserver/empty_tsconfig.json b/dot_vim/plugged/ale/test/test-files/tsserver/empty_tsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tsserver/src/empty_file1.ts b/dot_vim/plugged/ale/test/test-files/tsserver/src/empty_file1.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/empty_file2.ts b/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/empty_file2.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/empty_tsconfig.json b/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/empty_tsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/level-2/empty_file3.ts b/dot_vim/plugged/ale/test/test-files/tsserver/src/level-1/level-2/empty_file3.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/typescript/empty_custom_import_map.json b/dot_vim/plugged/ale/test/test-files/typescript/empty_custom_import_map.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/typescript/empty_import_map.json b/dot_vim/plugged/ale/test/test-files/typescript/empty_import_map.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/typescript/empty_test.ts b/dot_vim/plugged/ale/test/test-files/typescript/empty_test.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/typescript/empty_tsconfig.json b/dot_vim/plugged/ale/test/test-files/typescript/empty_tsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/invalid_vim_project/empty_test.vim b/dot_vim/plugged/ale/test/test-files/vim/invalid_vim_project/empty_test.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/node_modules/dot_bin/empty_vim-language-server b/dot_vim/plugged/ale/test/test-files/vim/node_modules/dot_bin/empty_vim-language-server new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_autoload/autoload/empty_test.vim b/dot_vim/plugged/ale/test/test-files/vim/path_with_autoload/autoload/empty_test.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_autoload/empty_test.vim b/dot_vim/plugged/ale/test/test-files/vim/path_with_autoload/empty_test.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_initvim/empty_init.vim b/dot_vim/plugged/ale/test/test-files/vim/path_with_initvim/empty_init.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_plugin/empty_test.vim b/dot_vim/plugged/ale/test/test-files/vim/path_with_plugin/empty_test.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_plugin/plugin/empty_test.vim b/dot_vim/plugged/ale/test/test-files/vim/path_with_plugin/plugin/empty_test.vim new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/vim/path_with_vimrc/empty_dot_vimrc b/dot_vim/plugged/ale/test/test-files/vim/path_with_vimrc/empty_dot_vimrc new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/volar/empty_package.json b/dot_vim/plugged/ale/test/test-files/volar/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/volar/node_modules/dot_bin/empty_executable_vue-language-server b/dot_vim/plugged/ale/test/test-files/volar/node_modules/dot_bin/empty_executable_vue-language-server new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/volar/node_modules/typescript/lib/empty_tsserverlibrary.js b/dot_vim/plugged/ale/test/test-files/volar/node_modules/typescript/lib/empty_tsserverlibrary.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/volar/src/empty_App.vue b/dot_vim/plugged/ale/test/test-files/volar/src/empty_App.vue new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/write-good/node-modules-2/node_modules/write-good/bin/empty_write-good.js b/dot_vim/plugged/ale/test/test-files/write-good/node-modules-2/node_modules/write-good/bin/empty_write-good.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/write-good/node-modules/node_modules/dot_bin/empty_write-good b/dot_vim/plugged/ale/test/test-files/write-good/node-modules/node_modules/dot_bin/empty_write-good new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/xo/monorepo/empty_package.json b/dot_vim/plugged/ale/test/test-files/xo/monorepo/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/xo/monorepo/node_modules/xo/empty_cli.js b/dot_vim/plugged/ale/test/test-files/xo/monorepo/node_modules/xo/empty_cli.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_index.js b/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_index.js new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_index.ts b/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_index.ts new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_package.json b/dot_vim/plugged/ale/test/test-files/xo/monorepo/packages/a/empty_package.json new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/yaml/empty_test.yaml b/dot_vim/plugged/ale/test/test-files/yaml/empty_test.yaml new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test-files/zig/empty_build.zig b/dot_vim/plugged/ale/test/test-files/zig/empty_build.zig new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/ale/test/test_ale_has.vader b/dot_vim/plugged/ale/test/test_ale_has.vader new file mode 100644 index 0000000..a4abe21 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_has.vader @@ -0,0 +1,14 @@ +Execute(Checks for versions below the current version should succeed): + AssertEqual 1, ale#Has('ale-3.3.0') + AssertEqual 1, ale#Has('ale-3.2.0') + AssertEqual 1, ale#Has('ale-3.1.0') + AssertEqual 1, ale#Has('ale-3.0.0') + AssertEqual 1, ale#Has('ale-2.7.0') + AssertEqual 1, ale#Has('ale-2.6.0') + AssertEqual 1, ale#Has('ale-2.5.0') + AssertEqual 1, ale#Has('ale-2.4.0') + AssertEqual 1, ale#Has('ALE-2.2.1') + AssertEqual 1, ale#Has('ALE-1.0.0') + +Execute(Checks for newer versions should fail): + AssertEqual 0, ale#Has('ALE-20.0.0') diff --git a/dot_vim/plugged/ale/test/test_ale_info.vader b/dot_vim/plugged/ale/test/test_ale_info.vader new file mode 100644 index 0000000..ded65a1 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_info.vader @@ -0,0 +1,777 @@ +Before: + Save g:ale_buffer_info + Save g:ale_cache_executable_check_failures + Save g:ale_change_sign_column_color + Save g:ale_command_wrapper + Save g:ale_completion_delay + Save g:ale_completion_enabled + Save g:ale_completion_max_suggestions + Save g:ale_disable_lsp + Save g:ale_echo_cursor + Save g:ale_echo_msg_error_str + Save g:ale_echo_msg_format + Save g:ale_echo_msg_info_str + Save g:ale_echo_msg_warning_str + Save g:ale_fix_on_save + Save g:ale_fixers + Save g:ale_history_enabled + Save g:ale_history_log_output + Save g:ale_keep_list_window_open + Save g:ale_lint_delay + Save g:ale_lint_on_enter + Save g:ale_lint_on_filetype_changed + Save g:ale_lint_on_insert_leave + Save g:ale_lint_on_save + Save g:ale_lint_on_text_changed + Save g:ale_linters + Save g:ale_linters_explicit + Save g:ale_linters_ignore + Save g:ale_list_vertical + Save g:ale_list_window_size + Save g:ale_loclist_msg_format + Save g:ale_lsp_error_messages + Save g:ale_max_buffer_history_size + Save g:ale_max_signs + Save g:ale_maximum_file_size + Save g:ale_open_list + Save g:ale_pattern_options + Save g:ale_pattern_options_enabled + Save g:ale_root + Save g:ale_set_balloons + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + Save g:ale_sign_column_always + Save g:ale_sign_error + Save g:ale_sign_info + Save g:ale_sign_offset + Save g:ale_sign_style_error + Save g:ale_sign_style_warning + Save g:ale_sign_warning + Save g:ale_sign_highlight_linenrs + Save g:ale_statusline_format + Save g:ale_type_map + Save g:ale_use_global_executables + Save g:ale_virtualtext_cursor + Save g:ale_warn_about_trailing_blank_lines + Save g:ale_warn_about_trailing_whitespace + + unlet! b:ale_history + + let g:ale_buffer_info = {} + let g:ale_cache_executable_check_failures = 0 + let g:ale_change_sign_column_color = 0 + let g:ale_command_wrapper = '' + let g:ale_completion_delay = 100 + let g:ale_completion_enabled = 0 + let g:ale_completion_max_suggestions = 50 + let g:ale_disable_lsp = 0 + let g:ale_echo_cursor = 1 + let g:ale_echo_msg_error_str = 'Error' + let g:ale_echo_msg_format = '%code: %%s' + let g:ale_echo_msg_info_str = 'Info' + let g:ale_echo_msg_warning_str = 'Warning' + let g:ale_fix_on_save = 0 + let g:ale_history_enabled = 1 + let g:ale_history_log_output = 1 + let g:ale_keep_list_window_open = 0 + let g:ale_lint_delay = 200 + let g:ale_lint_on_enter = 1 + let g:ale_lint_on_filetype_changed = 1 + let g:ale_lint_on_insert_leave = 1 + let g:ale_lint_on_save = 1 + let g:ale_lint_on_text_changed = 'normal' + let g:ale_linters_explicit = 0 + let g:ale_linters_ignore = {'python': ['pyright']} + let g:ale_list_vertical = 0 + let g:ale_list_window_size = 10 + let g:ale_loclist_msg_format = '%code: %%s' + let g:ale_lsp_error_messages = {} + let g:ale_max_buffer_history_size = 20 + let g:ale_max_signs = -1 + let g:ale_maximum_file_size = 0 + let g:ale_open_list = 0 + let g:ale_pattern_options = {} + let g:ale_pattern_options_enabled = 0 + let g:ale_root = {} + let g:ale_set_balloons = 0 + let g:ale_set_highlights = 1 + let g:ale_set_loclist = 1 + let g:ale_set_quickfix = 0 + let g:ale_set_signs = 1 + let g:ale_sign_column_always = 0 + let g:ale_sign_error = '>>' + let g:ale_sign_info = '--' + let g:ale_sign_offset = 1000000 + let g:ale_sign_style_error = '>>' + let g:ale_sign_style_warning = '--' + let g:ale_sign_warning = '--' + let g:ale_sign_highlight_linenrs = 0 + let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK'] + let g:ale_type_map = {} + let g:ale_use_global_executables = v:null + let g:ale_virtualtext_cursor = 'disabled' + let g:ale_warn_about_trailing_blank_lines = 1 + let g:ale_warn_about_trailing_whitespace = 1 + + let g:testlinter1 = {'name': 'testlinter1', 'executable': 'testlinter1', 'command': 'testlinter1', 'callback': 'testCB1', 'output_stream': 'stdout'} + let g:testlinter2 = {'name': 'testlinter2', 'executable': 'testlinter2', 'command': 'testlinter2', 'callback': 'testCB2', 'output_stream': 'stdout'} + + call ale#engine#ResetExecutableCache() + call ale#linter#Reset() + call ale#linter#PreventLoading('testft') + let g:ale_linters = {} + let g:ale_fixers = {} + let g:ale_linter_aliases = {} + let g:ale_buffer_info = {} + let g:fixer_lines = [ + \ ' Suggested Fixers: ', + \ ' ''foo'' - Fix things the foo way', + \] + let g:variables_lines = [ + \ ' Linter Variables:', + \ '', + \] + let g:globals_lines = [ + \ ' Global Variables:', + \ '', + \ 'let g:ale_cache_executable_check_failures = 0', + \ 'let g:ale_change_sign_column_color = 0', + \ 'let g:ale_command_wrapper = ''''', + \ 'let g:ale_completion_delay = 100', + \ 'let g:ale_completion_enabled = 0', + \ 'let g:ale_completion_max_suggestions = 50', + \ 'let g:ale_disable_lsp = 0', + \ 'let g:ale_echo_cursor = 1', + \ 'let g:ale_echo_msg_error_str = ''Error''', + \ 'let g:ale_echo_msg_format = ''%code: %%s''', + \ 'let g:ale_echo_msg_info_str = ''Info''', + \ 'let g:ale_echo_msg_warning_str = ''Warning''', + \ 'let g:ale_enabled = 1', + \ 'let g:ale_fix_on_save = 0', + \ 'let g:ale_fixers = {}', + \ 'let g:ale_history_enabled = 1', + \ 'let g:ale_history_log_output = 1', + \ 'let g:ale_keep_list_window_open = 0', + \ 'let g:ale_lint_delay = 200', + \ 'let g:ale_lint_on_enter = 1', + \ 'let g:ale_lint_on_filetype_changed = 1', + \ 'let g:ale_lint_on_insert_leave = 1', + \ 'let g:ale_lint_on_save = 1', + \ 'let g:ale_lint_on_text_changed = ''normal''', + \ 'let g:ale_linter_aliases = {}', + \ 'let g:ale_linters = {}', + \ 'let g:ale_linters_explicit = 0', + \ 'let g:ale_linters_ignore = {''python'': [''pyright'']}', + \ 'let g:ale_list_vertical = 0', + \ 'let g:ale_list_window_size = 10', + \ 'let g:ale_loclist_msg_format = ''%code: %%s''', + \ 'let g:ale_max_buffer_history_size = 20', + \ 'let g:ale_max_signs = -1', + \ 'let g:ale_maximum_file_size = 0', + \ 'let g:ale_open_list = 0', + \ 'let g:ale_pattern_options = {}', + \ 'let g:ale_pattern_options_enabled = 0', + \ 'let g:ale_root = {}', + \ 'let g:ale_set_balloons = 0', + \ 'let g:ale_set_highlights = 1', + \ 'let g:ale_set_loclist = 1', + \ 'let g:ale_set_quickfix = 0', + \ 'let g:ale_set_signs = 1', + \ 'let g:ale_sign_column_always = 0', + \ 'let g:ale_sign_error = ''>>''', + \ 'let g:ale_sign_info = ''--''', + \ 'let g:ale_sign_offset = 1000000', + \ 'let g:ale_sign_style_error = ''>>''', + \ 'let g:ale_sign_style_warning = ''--''', + \ 'let g:ale_sign_warning = ''--''', + \ 'let g:ale_sign_highlight_linenrs = 0', + \ 'let g:ale_statusline_format = [''%d error(s)'', ''%d warning(s)'', ''OK'']', + \ 'let g:ale_type_map = {}', + \ 'let g:ale_use_global_executables = v:null', + \ 'let g:ale_virtualtext_cursor = ''disabled''', + \ 'let g:ale_warn_about_trailing_blank_lines = 1', + \ 'let g:ale_warn_about_trailing_whitespace = 1', + \] + let g:command_header = [ + \ ' Command History:', + \] + + function CheckInfo(expected_list) abort + let l:output = '' + + redir => l:output + noautocmd silent ALEInfo + redir END + + AssertEqual a:expected_list, split(l:output, "\n") + endfunction + + call ale#test#SetDirectory('/testplugin/test') + + call ale#fix#registry#Clear() + call ale#fix#registry#Add('foo', 'x', [], 'Fix things the foo way') + +After: + Restore + + if exists('g:info_test_file') && filereadable(g:info_test_file) + call delete(g:info_test_file) + endif + + unlet! g:testlinter1 + unlet! g:testlinter2 + unlet! b:ale_history + unlet! b:ale_linters + unlet! g:output + unlet! g:fixer_lines + unlet! g:variables_lines + unlet! g:globals_string + unlet! g:command_header + unlet! g:ale_testft_testlinter1_foo + unlet! g:ale_testft_testlinter1_bar + unlet! g:ale_testft2_testlinter2_foo + unlet! b:ale_testft2_testlinter2_foo + unlet! g:ale_testft2_testlinter2_bar + unlet! g:info_test_file + unlet! g:ale_testft_build_dir_names + unlet! g:ale_testft_testlinter2_option + delfunction CheckInfo + + call ale#test#RestoreDirectory() + call ale#fix#registry#ResetToDefaults() + +Given nolintersft (Empty buffer with no linters): +Execute (ALEInfo with no linters should return the right output): + call CheckInfo( + \ [ + \ ' Current Filetype: nolintersft', + \ 'Available Linters: []', + \ ' Enabled Linters: []', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given (Empty buffer with no filetype): +Execute (ALEInfo should return buffer-local global ALE settings): + let b:ale_linters = {'x': ['y']} + + call insert( + \ g:globals_lines, + \ 'let b:ale_linters = {''x'': [''y'']}', + \ index(g:globals_lines, 'let g:ale_linters = {}') + 1 + \) + + call CheckInfo( + \ [ + \ ' Current Filetype: ', + \ 'Available Linters: []', + \ ' Enabled Linters: []', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given (Empty buffer with no filetype): +Execute (ALEInfo with no filetype should return the right output): + call CheckInfo( + \ [ + \ ' Current Filetype: ', + \ 'Available Linters: []', + \ ' Enabled Linters: []', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft (Empty buffer): +Execute (ALEInfo with a single linter should return the right output): + call ale#linter#Define('testft', g:testlinter1) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft (Empty buffer): +Execute (ALEInfo with two linters should return the right output): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft (Empty buffer): +Execute (ALEInfo should calculate enabled linters correctly): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter2']} + + let g:globals_lines[index(g:globals_lines, 'let g:ale_linters = {}')] + \ = 'let g:ale_linters = {''testft'': [''testlinter2'']}' + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft (Empty buffer): +Execute (ALEInfo should only return linters for current filetype): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo with compound filetypes should return linters for both of them): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo should return appropriately named global variables): + let g:ale_testft_testlinter1_foo = 'abc' + let g:ale_testft_testlinter1_bar = ['abc'] + let g:ale_testft2_testlinter2_foo = 123 + let g:ale_testft2_testlinter2_bar = {'x': 'y'} + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + [ + \ ' Linter Variables:', + \ '', + \ 'let g:ale_testft2_testlinter2_bar = {''x'': ''y''}', + \ 'let g:ale_testft2_testlinter2_foo = 123', + \ 'let g:ale_testft_testlinter1_bar = [''abc'']', + \ 'let g:ale_testft_testlinter1_foo = ''abc''', + \ ] + \ + g:globals_lines + \ + g:command_header + \) + +Execute (ALEInfoToFile should write to a file correctly): + let g:ale_testft_testlinter1_foo = 'abc' + let g:ale_testft_testlinter1_bar = ['abc'] + let g:ale_testft2_testlinter2_foo = 123 + let g:ale_testft2_testlinter2_bar = {'x': 'y'} + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + let g:info_test_file = tempname() + execute 'ALEInfoToFile ' . fnameescape(g:info_test_file) + + AssertEqual + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + [ + \ ' Linter Variables:', + \ '', + \ 'let g:ale_testft2_testlinter2_bar = {''x'': ''y''}', + \ 'let g:ale_testft2_testlinter2_foo = 123', + \ 'let g:ale_testft_testlinter1_bar = [''abc'']', + \ 'let g:ale_testft_testlinter1_foo = ''abc''', + \ ] + \ + g:globals_lines + \ + g:command_header, + \ readfile(g:info_test_file) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo should buffer-local linter variables): + let g:ale_testft2_testlinter2_foo = 123 + let b:ale_testft2_testlinter2_foo = 456 + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + [ + \ ' Linter Variables:', + \ '', + \ 'let g:ale_testft2_testlinter2_foo = 123', + \ 'let b:ale_testft2_testlinter2_foo = 456', + \ ] + \ + g:globals_lines + \ + g:command_header + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo should output linter aliases): + let g:testlinter1.aliases = ['testftalias1', 'testftalias2'] + let g:testlinter2.aliases = ['testftalias3', 'testftalias4'] + + let g:ale_testft2_testlinter2_foo = 123 + let b:ale_testft2_testlinter2_foo = 456 + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Linter Aliases:', + \ '''testlinter1'' -> [''testftalias1'', ''testftalias2'']', + \ '''testlinter2'' -> [''testftalias3'', ''testftalias4'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + [ + \ ' Linter Variables:', + \ '', + \ 'let g:ale_testft2_testlinter2_foo = 123', + \ 'let b:ale_testft2_testlinter2_foo = 456', + \ ] + \ + g:globals_lines + \ + g:command_header + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo should return command history): + let b:ale_history = [ + \ {'status': 'started', 'job_id': 347, 'command': 'first command'}, + \ {'status': 'started', 'job_id': 347, 'command': ['/bin/bash', '\c', 'last command']}, + \] + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \ + [ + \ '', + \ '(started) ''first command''', + \ '(started) [''/bin/bash'', ''\c'', ''last command'']', + \ ] + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo command history should print exit codes correctly): + let b:ale_history = [ + \ {'status': 'finished', 'exit_code': 0, 'job_id': 347, 'command': 'first command'}, + \ {'status': 'finished', 'exit_code': 1, 'job_id': 347, 'command': ['/bin/bash', '\c', 'last command']}, + \] + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \ + [ + \ '', + \ '(finished - exit code 0) ''first command''', + \ '(finished - exit code 1) [''/bin/bash'', ''\c'', ''last command'']', + \ ] + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo command history should print command output if logging is on): + let g:ale_history_log_output = 1 + + let b:ale_history = [ + \ { + \ 'status': 'finished', + \ 'exit_code': 0, + \ 'job_id': 347, + \ 'command': 'first command', + \ 'output': ['some', 'first command output'], + \ }, + \ { + \ 'status': 'finished', + \ 'exit_code': 1, + \ 'job_id': 347, + \ 'command': ['/bin/bash', '\c', 'last command'], + \ 'output': ['different second command output'], + \ }, + \ { + \ 'status': 'finished', + \ 'exit_code': 0, + \ 'job_id': 347, + \ 'command': 'command with no output', + \ 'output': [], + \ }, + \] + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \ + [ + \ '', + \ '(finished - exit code 0) ''first command''', + \ '', + \ '<<>>', + \ 'some', + \ 'first command output', + \ '<<>>', + \ '', + \ '(finished - exit code 1) [''/bin/bash'', ''\c'', ''last command'']', + \ '', + \ '<<>>', + \ 'different second command output', + \ '<<>>', + \ '', + \ '(finished - exit code 0) ''command with no output''', + \ '', + \ '<<>>', + \ ] + \) + +Execute (ALEInfo should include executable checks in the history): + call ale#linter#Define('testft', g:testlinter1) + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \ + [ + \ '', + \ '(executable check - success) ' . (has('win32') ? 'cmd' : 'echo'), + \ '(executable check - failure) TheresNoWayThisIsExecutable', + \ '(executable check - failure) TheresNoWayThisIsExecutable', + \ ] + \) + +Execute (The option for caching failing executable checks should work): + let g:ale_cache_executable_check_failures = 1 + let g:globals_lines[2] = 'let g:ale_cache_executable_check_failures = 1' + + call ale#linter#Define('testft', g:testlinter1) + + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \ + [ + \ '', + \ '(executable check - success) ' . (has('win32') ? 'cmd' : 'echo'), + \ '(executable check - failure) TheresNoWayThisIsExecutable', + \ ] + \) + +Given testft (Empty buffer): +Execute (LSP errors for a linter should be outputted): + let g:ale_lsp_error_messages = {'testlinter1': ['foo', 'bar']} + call ale#linter#Define('testft', g:testlinter1) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + [ + \ ' LSP Error Messages:', + \ '', + \ '(Errors for testlinter1)', + \ 'foo', + \ 'bar', + \ ] + \ + g:command_header + \) + +Given testft (Empty buffer): +Execute (LSP errors for other linters shouldn't appear): + let g:ale_lsp_error_messages = {'testlinter2': ['foo']} + call ale#linter#Define('testft', g:testlinter1) + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft.testft2 (Empty buffer with two filetypes): +Execute (ALEInfo should include linter global options): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + " eg: like g:c_build_dir_names + let g:ale_testft_build_dir_names = ['build', 'bin'] + + call add(g:variables_lines, 'let g:ale_testft_build_dir_names = [''build'', ''bin'']') + + call CheckInfo( + \ [ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + +Given testft (Empty buffer with two filetypes): +Execute (ALEInfo should include linter global options for enabled linters): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + + let g:ale_linters = {'testft': ['testlinter1']} + + " should not appear, since not enabled + let g:ale_testft_testlinter2_option = 'test' + + let g:globals_lines[index(g:globals_lines, 'let g:ale_linters = {}')] + \ = 'let g:ale_linters = {''testft'': [''testlinter1'']}' + + call CheckInfo( + \ [ + \ ' Current Filetype: testft', + \ 'Available Linters: [''testlinter1'', ''testlinter2'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Ignored Linters: []', + \ ] + \ + g:fixer_lines + \ + g:variables_lines + \ + g:globals_lines + \ + g:command_header + \) + + diff --git a/dot_vim/plugged/ale/test/test_ale_info_to_clipboard.vader b/dot_vim/plugged/ale/test/test_ale_info_to_clipboard.vader new file mode 100644 index 0000000..2014a31 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_info_to_clipboard.vader @@ -0,0 +1,15 @@ +After: + unlet! g:output + +Execute(ALEInfoToClipboard should that clipboard support is required): + " When run in the Docker image, there's no clipboard support, so this test + " will actually run. + if !has('clipboard') + let g:output = '' + + redir => g:output + :ALEInfoToClipboard + redir END + + AssertEqual 'clipboard not available. Try :ALEInfoToFile instead.', join(split(g:output)) + endif diff --git a/dot_vim/plugged/ale/test/test_ale_lint_command.vader b/dot_vim/plugged/ale/test/test_ale_lint_command.vader new file mode 100644 index 0000000..800c082 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_lint_command.vader @@ -0,0 +1,77 @@ +Before: + Save g:ale_buffer_info + Save g:ale_enabled + + let g:ale_buffer_info = {} + let g:ale_enabled = 1 + + let g:expected_loclist = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}] + + function! ToggleTestCallback(buffer, output) + return [{ + \ 'bufnr': a:buffer, + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': join(split(a:output[0])), + \ 'type': 'E', + \ 'nr': -1, + \}] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'ToggleTestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo foo bar', + \}) + +After: + Restore + + unlet! g:expected_loclist + unlet! b:i + + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + + let g:ale_buffer_info = {} + + delfunction ToggleTestCallback + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALELint should run the linters): + AssertEqual 'foobar', &filetype + + " Try to run the linter a few times, as it fails randomly in NeoVim. + for b:i in range(5) + ALELint + call ale#test#WaitForJobs(2000) + + if !has('nvim') + " Sleep so the delayed list function can run. + " This breaks the tests in NeoVim for some reason. + sleep 1ms + endif + + if ale#test#GetLoclistWithoutNewerKeys() == g:expected_loclist + break + endif + endfor + + " Check the loclist + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_ale_lint_stop_command.vader b/dot_vim/plugged/ale/test/test_ale_lint_stop_command.vader new file mode 100644 index 0000000..c50db5a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_lint_stop_command.vader @@ -0,0 +1,27 @@ +Before: + Save g:ale_buffer_info + + let g:ale_buffer_info = {} + + call ale#linter#PreventLoading('testft') + call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'callback': {-> []}, + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': 'sleep 9001', + \}) + +After: + Restore + + call ale#linter#Reset() + +Given testft (An empty file): +Execute(ALELintStop should stop ALE from linting): + ALELint + + Assert ale#engine#IsCheckingBuffer(bufnr('')), 'ALE did not start checking the buffer' + + ALELintStop + + Assert !ale#engine#IsCheckingBuffer(bufnr('')), 'ALELintStop didn''t work' diff --git a/dot_vim/plugged/ale/test/test_ale_populate_command.vader b/dot_vim/plugged/ale/test/test_ale_populate_command.vader new file mode 100644 index 0000000..14789c7 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_populate_command.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_buffer_info + Save g:ale_enabled + Save g:ale_set_quickfix + Save g:ale_set_loclist + Save g:ale_open_list + + let g:ale_buffer_info = {} + let g:ale_enabled = 1 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_open_list = 1 + + let g:expected_loclist = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}] + + function! ToggleTestCallback(buffer, output) + return [{ + \ 'bufnr': a:buffer, + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': join(split(a:output[0])), + \ 'type': 'E', + \ 'nr': -1, + \}] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'ToggleTestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo foo bar', + \}) + +After: + Restore + + unlet! g:expected_loclist + unlet! b:i + + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + + " Not sure this is necessary since it was Save/Restore-d + let g:ale_buffer_info = {} + + delfunction ToggleTestCallback + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALEPopulateQuickfix should have results): + AssertEqual 'foobar', &filetype + + " Clear so we can check that they're unmodified. + call setqflist([]) + call setloclist(winnr(), []) + + " Try to run the linter a few times, as it fails randomly in NeoVim. + for b:i in range(5) + ALELint + call ale#test#WaitForJobs(2000) + + if !has('nvim') + " Sleep so the delayed list function can run. + " This breaks the tests in NeoVim for some reason. + sleep 1ms + endif + + if ale#test#GetLoclistWithoutNewerKeys() == g:expected_loclist + break + endif + endfor + + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [], ale#test#GetQflistWithoutNewerKeys() + + ALEPopulateLocList + AssertNotEqual 0, get(getloclist(0, {'winid':0}), 'winid', 0) + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + + ALEPopulateQuickfix + AssertEqual g:expected_loclist, ale#test#GetQflistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_ale_toggle.vader b/dot_vim/plugged/ale/test/test_ale_toggle.vader new file mode 100644 index 0000000..98df3f7 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_toggle.vader @@ -0,0 +1,444 @@ +Before: + Save g:ale_buffer_info + Save g:ale_set_signs + Save g:ale_set_lists_synchronously + Save g:ale_run_synchronously + Save g:ale_pattern_options + Save g:ale_pattern_options_enabled + Save g:ale_set_balloons + + let g:ale_set_signs = 1 + let g:ale_set_lists_synchronously = 1 + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + let g:ale_pattern_options = {} + let g:ale_pattern_options_enabled = 1 + let g:ale_set_balloons = + \ has('balloon_eval') && has('gui_running') || + \ has('balloon_eval_term') && !has('gui_running') + + unlet! b:ale_enabled + + let g:ale_buffer_info = {} + let g:expected_loclist = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}] + let g:expected_groups = [ + \ 'ALECleanupGroup', + \ 'ALEEvents', + \ 'ALEHighlightBufferGroup', + \] + let g:has_nvim_highlight = exists('*nvim_buf_add_highlight') && exists('*nvim_buf_clear_namespace') + + function! ToggleTestCallback(buffer, output) + return [{ + \ 'bufnr': a:buffer, + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'foo bar', + \ 'type': 'E', + \ 'nr': -1, + \}] + endfunction + + function! ParseAuGroups() + redir => l:output + silent exec 'autocmd' + redir end + + let l:results = [] + + for l:line in split(l:output, "\n") + let l:match = matchlist(l:line, '^ALE[a-zA-Z]\+') + + " We don't care about some groups here. + if !empty(l:match) + \&& l:match[0] !=# 'ALECompletionGroup' + \&& l:match[0] !=# 'ALEBufferFixGroup' + \&& l:match[0] !=# 'ALEPatternOptionsGroup' + call add(l:results, l:match[0]) + endif + endfor + + call uniq(sort(l:results)) + + return l:results + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'ToggleTestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo', + \ 'read_buffer': 0, + \}) + + call ale#sign#Clear() + +After: + Restore + + unlet! g:ale_run_synchronously_callbacks + unlet! g:expected_loclist + unlet! g:expected_groups + unlet! b:ale_enabled + unlet! g:output + unlet! g:has_nvim_highlight + + call ale#linter#Reset() + + " Toggle ALE back on if we fail when it's disabled. + if !g:ale_enabled + ALEToggle + endif + + delfunction ToggleTestCallback + delfunction ParseAuGroups + + call setloclist(0, []) + call ale#sign#Clear() + call clearmatches() + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALEToggle should reset everything and then run again): + AssertEqual 'foobar', &filetype + + ALELint + call ale#test#FlushJobs() + + " First check that everything is there... + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + " Only check the legacy matches if not using the new NeoVIM API. + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual g:expected_groups, ParseAuGroups() + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + + " Now Toggle ALE off. + ALEToggle + + " Everything should be cleared. + Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' + AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' + + if !g:has_nvim_highlight + AssertEqual [], getmatches(), 'The highlights were not cleared' + endif + + AssertEqual g:expected_groups, ParseAuGroups() + + " Toggle ALE on, everything should be set up and run again. + ALEToggle + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual g:expected_groups, ParseAuGroups() + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + +Execute(ALEToggle should skip filename keys and preserve them): + AssertEqual 'foobar', &filetype + + let g:ale_buffer_info['/foo/bar/baz.txt'] = { + \ 'job_list': [], + \ 'active_linter_list': [], + \ 'loclist': [], + \ 'temporary_file_list': [], + \ 'temporary_directory_list': [], + \ 'history': [], + \} + + ALELint + call ale#test#FlushJobs() + + " Now Toggle ALE off. + ALEToggle + + AssertEqual + \ { + \ 'job_list': [], + \ 'active_linter_list': [], + \ 'loclist': [], + \ 'temporary_file_list': [], + \ 'temporary_directory_list': [], + \ 'history': [], + \ }, + \ get(g:ale_buffer_info, '/foo/bar/baz.txt', {}) + + " Toggle ALE on again. + ALEToggle + call ale#test#FlushJobs() + + AssertEqual + \ { + \ 'job_list': [], + \ 'active_linter_list': [], + \ 'loclist': [], + \ 'temporary_file_list': [], + \ 'temporary_directory_list': [], + \ 'history': [], + \ }, + \ get(g:ale_buffer_info, '/foo/bar/baz.txt', {}) + +Execute(ALEDisable should reset everything and stay disabled): + ALELint + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + + ALEDisable + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 0, g:ale_enabled + + ALEDisable + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 0, g:ale_enabled + +Execute(ALEEnable should enable ALE and lint again): + let g:ale_enabled = 0 + + ALEEnable + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 1, g:ale_enabled + +Execute(ALEReset should reset everything for a buffer): + AssertEqual 'foobar', &filetype + + ALELint + call ale#test#FlushJobs() + + " First check that everything is there... + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + + " Now Toggle ALE off. + ALEReset + call ale#test#FlushJobs() + + " Everything should be cleared. + Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' + AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' + + if !g:has_nvim_highlight + AssertEqual [], getmatches(), 'The highlights were not cleared' + endif + + AssertEqual 1, g:ale_enabled + +Execute(ALEToggleBuffer should reset everything and then run again): + AssertEqual 'foobar', &filetype + + ALELint + call ale#test#FlushJobs() + + " First check that everything is there... + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + + " Now Toggle ALE off. + ALEToggleBuffer + + " Everything should be cleared. + Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' + AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' + + if !g:has_nvim_highlight + AssertEqual [], getmatches(), 'The highlights were not cleared' + endif + + " Toggle ALE on, everything should be set up and run again. + ALEToggleBuffer + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual g:expected_groups, ParseAuGroups() + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + +Execute(ALEDisableBuffer should reset everything and stay disabled): + ALELint + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + + ALEDisableBuffer + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 0, b:ale_enabled + +Execute(ALEEnableBuffer should enable ALE and lint again): + let b:ale_enabled = 0 + + ALEEnableBuffer + call ale#test#FlushJobs() + + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 1, b:ale_enabled + +Execute(ALEEnableBuffer should complain when ALE is disabled globally): + let g:ale_enabled = 0 + let b:ale_enabled = 0 + + redir => g:output + ALEEnableBuffer + redir END + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 0, b:ale_enabled + AssertEqual 0, g:ale_enabled + AssertEqual + \ 'ALE cannot be enabled locally when disabled globally', + \ join(split(g:output)) + +Execute(ALEResetBuffer should reset everything for a buffer): + AssertEqual 'foobar', &filetype + + ALELint + call ale#test#FlushJobs() + + " First check that everything is there... + AssertEqual g:expected_loclist, ale#test#GetLoclistWithoutNewerKeys() + AssertEqual [0, [[2, 1000001, 'ALEErrorSign']]], ale#sign#FindCurrentSigns(bufnr('%')) + + if !g:has_nvim_highlight + AssertEqual + \ [{'group': 'ALEError', 'pos1': [2, 3, 1]}], + \ map(getmatches(), '{''group'': v:val.group, ''pos1'': v:val.pos1}') + endif + + AssertEqual [{'lnum': 2, 'bufnr': bufnr(''), 'col': 3, 'linter_name': 'testlinter', 'vcol': 0, 'nr': -1, 'type': 'E', 'text': 'foo bar', 'sign_id': 1000001}], g:ale_buffer_info[bufnr('')].loclist + + " Now Toggle ALE off. + ALEResetBuffer + call ale#test#FlushJobs() + + " Everything should be cleared. + Assert !has_key(g:ale_buffer_info, bufnr('')), 'The g:ale_buffer_info Dictionary was not removed' + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys(), 'The loclist was not cleared' + AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared' + + if !g:has_nvim_highlight + AssertEqual [], getmatches(), 'The highlights were not cleared' + endif + + AssertEqual 1, g:ale_enabled + AssertEqual 1, get(b:, 'ale_enabled', 1) + +Execute(Disabling ALE should disable balloons): + " These tests won't run in the console, but we can run them manually in GVim. + if has('balloon_eval') && has('gui_running') + \|| (has('balloon_eval_term') && !has('gui_running')) + call ale#linter#Reset() + + " Enable balloons, so we can check the expr value. + call ale#balloon#Enable() + + if has('balloon_eval') && has('gui_running') + AssertEqual 1, &ballooneval + else + AssertEqual 1, &balloonevalterm + endif + + AssertEqual 'ale#balloon#Expr()', &balloonexpr + + " Toggle ALE off. + ALEToggle + + " The balloon settings should be reset. + if has('balloon_eval') && has('gui_running') + AssertEqual 0, &ballooneval + else + AssertEqual 0, &balloonevalterm + endif + + AssertEqual '', &balloonexpr + endif + +Execute(Enabling ALE should enable balloons if the setting is on): + if has('balloon_eval') && has('gui_running') + \|| (has('balloon_eval_term') && !has('gui_running')) + call ale#linter#Reset() + call ale#balloon#Disable() + ALEDisable + let g:ale_set_balloons = 0 + ALEEnable + + if has('balloon_eval') && has('gui_running') + AssertEqual 0, &ballooneval + else + AssertEqual 0, &balloonevalterm + endif + + AssertEqual '', &balloonexpr + + ALEDisable + let g:ale_set_balloons = 1 + ALEEnable + + if has('balloon_eval') && has('gui_running') + AssertEqual 1, &ballooneval + else + AssertEqual 1, &balloonevalterm + endif + + AssertEqual 'ale#balloon#Expr()', &balloonexpr + endif diff --git a/dot_vim/plugged/ale/test/test_ale_var.vader b/dot_vim/plugged/ale/test/test_ale_var.vader new file mode 100644 index 0000000..419a998 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ale_var.vader @@ -0,0 +1,24 @@ +Before: + let g:ale_some_variable = 'abc' + +After: + unlet! g:ale_some_variable + unlet! b:undefined_variable_name + +Execute(ale#Var should return global variables): + AssertEqual 'abc', ale#Var(bufnr(''), 'some_variable') + +Execute(ale#Var should return buffer overrides): + let b:ale_some_variable = 'def' + + AssertEqual 'def', ale#Var(bufnr(''), 'some_variable') + +Execute(ale#Var should return buffer overrides for buffer numbers as strings): + let b:ale_some_variable = 'def' + + AssertEqual 'def', ale#Var(string(bufnr('')), 'some_variable') + +Execute(ale#Var should throw exceptions for undefined variables): + let b:undefined_variable_name = 'def' + + AssertThrows call ale#Var(bufnr(''), 'undefined_variable_name') diff --git a/dot_vim/plugged/ale/test/test_alejobstarted_autocmd.vader b/dot_vim/plugged/ale/test/test_alejobstarted_autocmd.vader new file mode 100644 index 0000000..6fa1ff8 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_alejobstarted_autocmd.vader @@ -0,0 +1,46 @@ +Before: + Save g:ale_buffer_info + + let g:job_started_success = 0 + let g:ale_run_synchronously = 1 + + unlet! b:ale_linted + + function! TestCallback(buffer, output) + return [] + endfunction + + call ale#linter#PreventLoading('testft') + call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': 'true', + \}) + +After: + Restore + + let g:ale_run_synchronously = 0 + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + + unlet! g:job_started_success + + delfunction TestCallback + call ale#linter#Reset() + +Given testft (An empty file): +Execute(Run a lint cycle with an actual job to check for ALEJobStarted): + augroup VaderTest + autocmd! + autocmd User ALEJobStarted let g:job_started_success = 1 + augroup END + + ALELint + + AssertEqual g:job_started_success, 1 diff --git a/dot_vim/plugged/ale/test/test_alelint_autocmd.vader b/dot_vim/plugged/ale/test/test_alelint_autocmd.vader new file mode 100644 index 0000000..332cb36 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_alelint_autocmd.vader @@ -0,0 +1,40 @@ +Before: + let g:pre_success = 0 + let g:post_success = 0 + let g:ale_run_synchronously = 1 + + unlet! b:ale_linted + +After: + let g:ale_run_synchronously = 0 + let g:ale_buffer_info = {} + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + +Given testft(An empty file): +Execute(Run a lint cycle, and check that a variable is set in the autocmd): + augroup VaderTest + autocmd! + autocmd User ALELintPre let g:pre_success = 1 + autocmd User ALELintPost let g:post_success = 1 + augroup END + + call ale#Queue(0) + + AssertEqual g:pre_success, 1 + AssertEqual g:post_success, 1 + +Execute(b:ale_linted should be increased after each lint cycle): + AssertEqual get(b:, 'ale_linted'), 0 + + call ale#Queue(0) + + AssertEqual get(b:, 'ale_linted'), 1 + + call ale#Queue(0) + + AssertEqual get(b:, 'ale_linted'), 2 diff --git a/dot_vim/plugged/ale/test/test_ant_build_classpath_command.vader b/dot_vim/plugged/ale/test/test_ant_build_classpath_command.vader new file mode 100644 index 0000000..b97dc59 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ant_build_classpath_command.vader @@ -0,0 +1,27 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/java/javac.vim + + Save $PATH + let $PATH = ale#path#Simplify(g:dir . '/test-files/ant/bin') + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return `cd '[dir]' && 'ant' classpath -S -q`): + call ale#test#SetFilename('test-files/ant/ant-project/Main.java') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/ant/ant-project'), + \ ale#Escape('ant') . ' classpath' . ' -S' . ' -q', + \ ], + \ ale#ant#BuildClasspathCommand(bufnr('')) + +Execute(Should return empty string if ant cannot be executed): + call ale#test#SetFilename('test-files/ant/not-an-ant-project/Main.java') + + AssertEqual ['', ''], ale#ant#BuildClasspathCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_ant_find_project_root.vader b/dot_vim/plugged/ale/test/test_ant_find_project_root.vader new file mode 100644 index 0000000..b0868ad --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ant_find_project_root.vader @@ -0,0 +1,35 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/java/javac.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return current directory if called on the project root): + call ale#test#SetFilename('test-files/ant/ant-project/Main.java') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/ant/ant-project'), + \ ale#ant#FindProjectRoot(bufnr('')) + +Execute(Should return root directory if called on a deeply nested source file): + call ale#test#SetFilename('test-files/ant/ant-project/src/several/namespace/layers/A.java') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/ant/ant-project'), + \ ale#ant#FindProjectRoot(bufnr('')) + +Execute(Should return empty string if called on a non-ant project): + call ale#test#SetFilename('test-files/ant/non-ant-project/Main.java') + + AssertEqual + \ '', + \ ale#ant#FindProjectRoot(bufnr('')) + +Execute(Should return empty string if called on a file in a non-ant project): + call ale#test#SetFilename('test-files/ant/non-ant-project/several/namespace/layers/A.java') + + AssertEqual + \ '', + \ ale#ant#FindProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_autocmd_commands.vader b/dot_vim/plugged/ale/test/test_autocmd_commands.vader new file mode 100644 index 0000000..9f42eff --- /dev/null +++ b/dot_vim/plugged/ale/test/test_autocmd_commands.vader @@ -0,0 +1,238 @@ +Before: + function! CheckAutocmd(group) + call ale#events#Init() + + redir => l:output + execute 'silent! autocmd ' . a:group + redir END + + let l:matches = [] + let l:header = '' + " Some event names have aliases, and NeoVim and Vim produce + " different output. The names are remapped to fix this. + let l:event_name_corrections = { + \ 'BufWrite': 'BufWritePre', + \ 'BufRead': 'BufReadPost', + \} + + " autocmd commands are split across two lines in output, so we + " must merge the lines back into one simple line. + for l:line in split(l:output, "\n") + if l:line =~# '^ALE' && split(l:line)[0] ==# a:group + let l:header = split(l:line)[1] + let l:header = get(l:event_name_corrections, l:header, l:header) + elseif !empty(l:header) + " There's an extra line for buffer events, and we should only look + " for the one matching the current buffer. + if l:line =~# '' + let l:header .= ' ' + elseif l:line[:0] is# ' ' + call add(l:matches, join(split(l:header . l:line))) + else + let l:header = '' + endif + endif + endfor + + call sort(l:matches) + + return l:matches + endfunction + + Save g:ale_completion_enabled + Save g:ale_echo_cursor + Save g:ale_enabled + Save g:ale_fix_on_save + Save g:ale_lint_on_enter + Save g:ale_lint_on_filetype_changed + Save g:ale_lint_on_insert_leave + Save g:ale_lint_on_save + Save g:ale_lint_on_text_changed + Save g:ale_pattern_options_enabled + Save g:ale_hover_cursor + + " Turn everything on by default for these tests. + let g:ale_completion_enabled = 1 + let g:ale_echo_cursor = 1 + let g:ale_enabled = 1 + let g:ale_fix_on_save = 1 + let g:ale_lint_on_enter = 1 + let g:ale_lint_on_filetype_changed = 1 + let g:ale_lint_on_insert_leave = 1 + let g:ale_lint_on_save = 1 + let g:ale_lint_on_text_changed = 1 + let g:ale_pattern_options_enabled = 1 + let g:ale_hover_cursor = 1 + +After: + delfunction CheckAutocmd + Restore + + if g:ale_completion_enabled + call ale#completion#Enable() + else + call ale#completion#Disable() + endif + + call ale#events#Init() + +Execute (All events should be set up when everything is on): + let g:ale_echo_cursor = 1 + + AssertEqual + \ [ + \ 'BufEnter * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufReadPost * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufWinEnter * call ale#events#LintOnEnter(str2nr(expand('''')))', + \ 'BufWritePost * call ale#events#SaveEvent(str2nr(expand('''')))', + \ 'CursorHold * if exists(''*ale#engine#Cleanup'') | call ale#cursor#EchoCursorWarningWithDelay() | endif', + \ 'CursorHold if exists(''*ale#lsp#Send'') | call ale#hover#ShowTruncatedMessageAtCursor() | endif', + \ 'CursorMoved * if exists(''*ale#engine#Cleanup'') | call ale#cursor#EchoCursorWarningWithDelay() | endif', + \ 'FileChangedShellPost * call ale#events#FileChangedEvent(str2nr(expand('''')))', + \ 'FileType * call ale#events#FileTypeEvent( str2nr(expand('''')), expand(''''))', + \ 'InsertLeave * if ale#Var(str2nr(expand('''')), ''lint_on_insert_leave'') | call ale#Queue(0) | endif', + \ 'InsertLeave if exists(''*ale#engine#Cleanup'') | call ale#cursor#EchoCursorWarning() | endif', + \ 'TextChanged * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ 'TextChangedI * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ ], + \ CheckAutocmd('ALEEvents') + +Execute (Only the required events should be bound even if various settings are off): + let g:ale_enabled = 1 + let g:ale_completion_enabled = 0 + let g:ale_echo_cursor = 0 + let g:ale_fix_on_save = 0 + let g:ale_lint_on_enter = 0 + let g:ale_lint_on_filetype_changed = 0 + let g:ale_lint_on_insert_leave = 0 + let g:ale_lint_on_save = 0 + let g:ale_lint_on_text_changed = 0 + let g:ale_pattern_options_enabled = 0 + let g:ale_hover_cursor = 0 + + AssertEqual + \ [ + \ 'BufEnter * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufReadPost * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufWritePost * call ale#events#SaveEvent(str2nr(expand('''')))', + \ ], + \ CheckAutocmd('ALEEvents') + +Execute (The cursor hover event should be enabled with g:ale_hover_cursor = 1): + let g:ale_enabled = 1 + let g:ale_completion_enabled = 0 + let g:ale_echo_cursor = 0 + let g:ale_fix_on_save = 0 + let g:ale_lint_on_enter = 0 + let g:ale_lint_on_filetype_changed = 0 + let g:ale_lint_on_insert_leave = 0 + let g:ale_lint_on_save = 0 + let g:ale_lint_on_text_changed = 0 + let g:ale_pattern_options_enabled = 0 + let g:ale_hover_cursor = 1 + + AssertEqual + \ [ + \ 'BufEnter * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufReadPost * call ale#events#ReadOrEnterEvent(str2nr(expand('''')))', + \ 'BufWritePost * call ale#events#SaveEvent(str2nr(expand('''')))', + \ 'CursorHold * if exists(''*ale#lsp#Send'') | call ale#hover#ShowTruncatedMessageAtCursor() | endif', + \ ], + \ CheckAutocmd('ALEEvents') + +Execute (g:ale_lint_on_text_changed = 1 bind both events): + let g:ale_lint_on_text_changed = 1 + + AssertEqual + \ [ + \ 'TextChanged * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ 'TextChangedI * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''^TextChanged''') + +Execute (g:ale_lint_on_text_changed = 'always' should bind both events): + let g:ale_lint_on_text_changed = 'always' + + AssertEqual + \ [ + \ 'TextChanged * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ 'TextChangedI * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''^TextChanged''') + +Execute (g:ale_lint_on_text_changed = 'normal' should bind only TextChanged): + let g:ale_lint_on_text_changed = 'normal' + + AssertEqual + \ [ + \ 'TextChanged * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''^TextChanged''') + +Execute (g:ale_lint_on_text_changed = 'insert' should bind only TextChangedI): + let g:ale_lint_on_text_changed = 'insert' + + AssertEqual + \ [ + \ 'TextChangedI * call ale#Queue(ale#Var(str2nr(expand('''')), ''lint_delay''))', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''^TextChanged''') + +Execute (g:ale_lint_on_insert_leave = 1 should bind InsertLeave): + let g:ale_lint_on_insert_leave = 1 + let g:ale_echo_cursor = 0 + + AssertEqual + \ [ + \ 'InsertLeave * if ale#Var(str2nr(expand('''')), ''lint_on_insert_leave'') | call ale#Queue(0) | endif', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''^InsertLeave''') + +Execute (g:ale_lint_on_filetype_changed = 1 should bind the FileType event): + let g:ale_lint_on_filetype_changed = 1 + + AssertEqual + \ [ + \ 'FileType * call ale#events#FileTypeEvent( ' + \ . 'str2nr(expand('''')), ' + \ . 'expand('''')' + \ . ')', + \ ], + \ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''\v^FileType''') + +Execute (ALECleanupGroup should include the right commands): + if exists('##VimSuspend') + AssertEqual [ + \ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''''))) | endif', + \ 'QuitPre * call ale#events#QuitEvent(str2nr(expand('''')))', + \ 'VimSuspend * if exists(''*ale#engine#CleanupEveryBuffer'') | call ale#engine#CleanupEveryBuffer() | endif', + \], CheckAutocmd('ALECleanupGroup') + else + AssertEqual [ + \ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''''))) | endif', + \ 'QuitPre * call ale#events#QuitEvent(str2nr(expand('''')))', + \], CheckAutocmd('ALECleanupGroup') + endif + +Execute(ALECompletionActions should always be set up): + AssertEqual [ + \ 'CompleteDone * call ale#completion#HandleUserData(v:completed_item)', + \], CheckAutocmd('ALECompletionActions') + +Execute(Enabling completion should set up autocmd events correctly): + let g:ale_completion_enabled = 0 + call ale#completion#Enable() + + AssertEqual [ + \ 'CompleteDone * call ale#completion#Done()', + \ 'TextChangedI * call ale#completion#Queue()', + \], CheckAutocmd('ALECompletionGroup') + AssertEqual 1, g:ale_completion_enabled + +Execute(Disabling completion should remove autocmd events correctly): + let g:ale_completion_enabled = 1 + call ale#completion#Enable() + call ale#completion#Disable() + + AssertEqual [], CheckAutocmd('ALECompletionGroup') + AssertEqual 0, g:ale_completion_enabled diff --git a/dot_vim/plugged/ale/test/test_backwards_compatibility.vader b/dot_vim/plugged/ale/test/test_backwards_compatibility.vader new file mode 100644 index 0000000..e4e3756 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_backwards_compatibility.vader @@ -0,0 +1,19 @@ +" These tests, and the code that it covers, may be removed upon a major release. + +After: + unlet! g:ale_linters_sh_shellcheck_exclusions + unlet! g:ale_sh_shellcheck_exclusions + unlet! g:ale_linters_sh_shell_default_shell + unlet! g:ale_sh_shell_default_shell + +Execute(Old variable name for the 'shellcheck' linter should still work): + let g:ale_linters_sh_shellcheck_exclusions = 'SC1234' + runtime ale_linters/sh/shellcheck.vim + + AssertEqual 'SC1234', g:ale_sh_shellcheck_exclusions + +Execute (Old variable name for the 'shell' linter should still work): + let g:ale_linters_sh_shell_default_shell = 'woosh' + runtime ale_linters/sh/shell.vim + + AssertEqual 'woosh', g:ale_sh_shell_default_shell diff --git a/dot_vim/plugged/ale/test/test_balloon_messages.vader b/dot_vim/plugged/ale/test/test_balloon_messages.vader new file mode 100644 index 0000000..d0724c2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_balloon_messages.vader @@ -0,0 +1,87 @@ +Before: + Save g:ale_buffer_info + Save g:ale_enabled + Save g:ale_set_balloons + + let g:ale_set_balloons = 1 + + let g:ale_buffer_info[bufnr('')] = {'loclist': [ + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'col': 10, + \ 'linter_name': 'eslint', + \ 'type': 'W', + \ 'text': 'Ignore me.', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'lnum': 1, + \ 'col': 10, + \ 'text': 'Missing semicolon. (semi)', + \ 'type': 'E', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'lnum': 2, + \ 'col': 10, + \ 'text': 'Infix operators must be spaced. (space-infix-ops)' + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'lnum': 2, + \ 'col': 15, + \ 'text': 'Missing radix parameter (radix)' + \ }, + \]} + +After: + Restore + + unlet! b:ale_enabled + unlet! b:ale_set_balloons + +Execute(Balloon messages should be shown for the correct lines): + AssertEqual + \ 'Missing semicolon. (semi)', + \ ale#balloon#MessageForPos(bufnr(''), 1, 1) + +Execute(Balloon messages should be shown for earlier columns): + AssertEqual + \ 'Infix operators must be spaced. (space-infix-ops)', + \ ale#balloon#MessageForPos(bufnr(''), 2, 1) + +Execute(Balloon messages should be shown for later columns): + AssertEqual + \ 'Missing radix parameter (radix)', + \ ale#balloon#MessageForPos(bufnr(''), 2, 16) + +Execute(Balloon messages should be disabled if ALE is disabled globally): + let g:ale_enabled = 0 + " Enabling the buffer should not make a difference. + let b:ale_enabled = 1 + + AssertEqual '', ale#balloon#MessageForPos(bufnr(''), 1, 1) + +Execute(Balloon messages should be disabled if ALE is disabled for a buffer): + let b:ale_enabled = 0 + + AssertEqual '', ale#balloon#MessageForPos(bufnr(''), 1, 1) + +Execute(Balloon messages should be disabled if the global setting is off): + let g:ale_set_balloons = 0 + + AssertEqual '', ale#balloon#MessageForPos(bufnr(''), 1, 1) + +Execute(Balloon messages should be disabled if the buffer setting is off): + let b:ale_set_balloons = 0 + + AssertEqual '', ale#balloon#MessageForPos(bufnr(''), 1, 1) + +Execute(The balloon buffer setting should override the global one): + let g:ale_set_balloons = 0 + let b:ale_set_balloons = 1 + + AssertEqual + \ 'Missing semicolon. (semi)', + \ ale#balloon#MessageForPos(bufnr(''), 1, 1) diff --git a/dot_vim/plugged/ale/test/test_c_flag_parsing.vader b/dot_vim/plugged/ale/test/test_c_flag_parsing.vader new file mode 100644 index 0000000..c661651 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_c_flag_parsing.vader @@ -0,0 +1,689 @@ +Before: + Save g:ale_c_parse_makefile + Save g:ale_c_always_make + Save b:ale_c_always_make + + call ale#test#SetDirectory('/testplugin/test') + + let g:ale_c_parse_makefile = 1 + let g:ale_c_always_make = 1 + let b:ale_c_always_make = 1 + + function SplitAndParse(path_prefix, command) abort + let l:args = ale#c#ShellSplit(a:command) + + return ale#c#ParseCFlags(a:path_prefix, 0, l:args) + endfunction + +After: + delfunction SplitAndParse + + Restore + + call ale#test#RestoreDirectory() + +Execute(The make command should be correct): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'make -n --always-make', + \ ], + \ ale#c#GetMakeCommand(bufnr('')) + + " You should be able to disable --always-make for a buffer. + let b:ale_c_always_make = 0 + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'make -n', + \ ], + \ ale#c#GetMakeCommand(bufnr('')) + +Execute(Should recognize GNUmakefile as a makefile): + call ale#test#SetFilename('test-files/c/gnumakefile_project/file.c') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir. '/test-files/c/gnumakefile_project'), + \ 'make -n --always-make', + \ ], + \ ale#c#GetMakeCommand(bufnr('')) + +Execute(The CFlags parser should be able to parse include directives): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')), + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -Isubdir -c file.c']) + + AssertEqual + \ '-isystem ' . ale#Escape('/usr/include/dir'), + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -isystem /usr/include/dir -c file.c']) + +Execute(ParseCFlags should ignore -c and -o): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')), + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -Isubdir -c file.c -o a.out']) + +Execute(The CFlags parser should be able to parse macro directives): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' -DTEST=1', + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -Isubdir -DTEST=1 -c file.c']) + +Execute(The CFlags parser should be able to parse macro directives with spaces): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' -DTEST=$(( 2 * 4 ))', + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -Isubdir -DTEST=$(( 2 * 4 )) -c file.c']) + +Execute(The CFlags parser should be able to parse shell directives with spaces): + call ale#test#SetFilename('test-files/c/makefile_project/subdir/file.c') + + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' -DTEST=`date +%s`', + \ ale#c#ParseCFlagsFromMakeOutput(bufnr(''), ['gcc -Isubdir -DTEST=`date +%s` -c file.c']) + +Execute(ParseCFlags should be able to parse flags with relative paths): + AssertEqual + \ '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')) + \ . ' -DTEST=`date +%s`', + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Isubdir ' + \ . '-I'. ale#path#Simplify('kernel/include') + \ . ' -DTEST=`date +%s` -c file.c' + \ ) + +Execute(We should handle paths with spaces in double quotes): + AssertEqual + \ '-Dgoal=9' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir with spaces')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')) + \ . ' -DTEST=`date +%s`', + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . '-I"dir with spaces"' . ' -I'. ale#path#Simplify('kernel/include') + \ . ' -DTEST=`date +%s` -c file.c' + \ ) + +Execute(ParseCFlags should handle paths with spaces in single quotes): + AssertEqual + \ '-Dgoal=9' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir with spaces')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')) + \ . ' -DTEST=`date +%s`', + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . '-I''dir with spaces''' . ' -I'. ale#path#Simplify('kernel/include') + \ . ' -DTEST=`date +%s` -c file.c' + \ ) + +Execute(ParseCFlags should handle paths with minuses): + AssertEqual + \ '-Dgoal=9' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir with spaces')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir-with-dash')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')) + \ . ' -DTEST=`date +%s`', + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . '-I''dir with spaces''' . ' -Idir-with-dash' + \ . ' -I'. ale#path#Simplify('kernel/include') + \ . ' -DTEST=`date +%s` -c file.c' + \ ) + +Execute(We should handle -D with minuses): + AssertEqual + \ '-Dgoal=9' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' -Dmacro-with-dash' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir with spaces')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir-with-dash')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')) + \ . ' -DTEST=`date +%s`', + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . '-Dmacro-with-dash ' + \ . '-I''dir with spaces''' . ' -Idir-with-dash' + \ . ' -I'. ale#path#Simplify('kernel/include') + \ . ' -DTEST=`date +%s` -c file.c' + \ ) + +Execute(We should handle flags at the end of the line): + AssertEqual + \ '-Dgoal=9' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/subdir')) + \ . ' -Dmacro-with-dash' + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir with spaces')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/dir-with-dash')) + \ . ' ' . '-I' . ' ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/kernel/include')), + \ SplitAndParse( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . '-Dmacro-with-dash ' + \ . '-I''dir with spaces''' . ' -Idir-with-dash' + \ . ' -I'. ale#path#Simplify('kernel/include') + \ ) + +Execute(FlagsFromCompileCommands should tolerate empty values): + AssertEqual '', ale#c#FlagsFromCompileCommands(bufnr(''), '') + +Execute(ParseCompileCommandsFlags should tolerate empty values): + AssertEqual '', ale#c#ParseCompileCommandsFlags(bufnr(''), {}, {}) + +Execute(ParseCompileCommandsFlags should parse some basic flags): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c')) + + " We should read the absolute path filename entry, not the other ones. + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify('/usr/include/xmms2')), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'): [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/xmms2') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ }, + \ ], + \ "xmms2-mpris.c": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ }, + \ ], + \ }, + \ { + \ ale#path#Simplify('/foo/bar/xmms2-mpris/src'): [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris/src'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': 'other.c', + \ }, + \ ], + \ "src": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify((has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-other.c'), + \ }, + \ ], + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should fall back to files with the same name): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c')) + + " We should prefer the basename file flags, not the base dirname flags. + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify('/usr/include/xmms2')), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ "xmms2-mpris.c": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/xmms2') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ }, + \ ], + \ }, + \ { + \ "src": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify((has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-other.c'), + \ }, + \ ], + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should parse flags for exact directory matches): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c')) + + " We should ues the exact directory flags, not the file basename flags. + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify('/usr/include/xmms2')), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ "xmms2-mpris.c": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ }, + \ ], + \ }, + \ { + \ ale#path#Simplify('/foo/bar/xmms2-mpris/src'): [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris/src'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/xmms2') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': 'other.c', + \ }, + \ ], + \ "src": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/ignoreme') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify((has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-other.c'), + \ }, + \ ], + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should fall back to files in the same directory): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c')) + + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify('/usr/include/xmms2')), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ {}, + \ { + \ "src": [ + \ { + \ 'directory': ale#path#Simplify('/foo/bar/xmms2-mpris'), + \ 'command': '/usr/bin/cc -I' . ale#path#Simplify('/usr/include/xmms2') + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'), + \ 'file': ale#path#Simplify((has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-other.c'), + \ }, + \ ], + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should tolerate items without commands): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c')) + + AssertEqual + \ '', + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ "xmms2-mpris.c": [ + \ { + \ 'directory': '/foo/bar/xmms2-mpris', + \ 'file': '/foo/bar/xmms2-mpris/src/xmms2-mpris.c', + \ }, + \ ], + \ }, + \ {}, + \ ) + +Execute(ParseCompileCommandsFlags should take commands from matching .c files for .h files): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.h')) + + AssertEqual + \ '-I ' . ale#Escape('/usr/include/xmms2'), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ 'xmms2-mpris.c': [ + \ { + \ 'directory': '/foo/bar/xmms2-mpris', + \ 'file': (has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-mpris.c', + \ 'command': '/usr/bin/cc -I' . '/usr/include/xmms2' + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . '/foo/bar/xmms2-mpris/src/xmms2-mpris.c', + \ }, + \ ], + \ }, + \ {}, + \ ) + +Execute(ParseCompileCommandsFlags should take commands from matching .cpp files for .hpp files): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.hpp')) + + AssertEqual + \ '-I ' . ale#Escape('/usr/include/xmms2'), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ 'xmms2-mpris.cpp': [ + \ { + \ 'directory': '/foo/bar/xmms2-mpris', + \ 'file': (has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-mpris.cpp', + \ 'command': '/usr/bin/cc -I' . '/usr/include/xmms2' + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . '/foo/bar/xmms2-mpris/src/xmms2-mpris.cpp', + \ }, + \ ], + \ }, + \ { + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should take commands from matching .cpp files for .h files): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.h')) + + AssertEqual + \ '-I ' . ale#Escape('/usr/include/xmms2'), + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ 'xmms2-mpris.cpp': [ + \ { + \ 'directory': '/foo/bar/xmms2-mpris', + \ 'file': (has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-mpris.cpp', + \ 'command': '/usr/bin/cc -I' . '/usr/include/xmms2' + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . '/foo/bar/xmms2-mpris/src/xmms2-mpris.cpp', + \ }, + \ ], + \ }, + \ { + \ }, + \ ) + +Execute(ParseCompileCommandsFlags should not take commands from .c files for .h files with different names): + silent noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/other.h')) + + AssertEqual + \ '', + \ ale#c#ParseCompileCommandsFlags( + \ bufnr(''), + \ { + \ 'xmms2-mpris.c': [ + \ { + \ 'directory': '/foo/bar/xmms2-mpris', + \ 'file': (has('win32') ? 'C:' : '') . '/foo/bar/xmms2-mpris/src/xmms2-mpris.c', + \ 'command': '/usr/bin/cc -I' . '/usr/include/xmms2' + \ . ' -o CMakeFiles/xmms2-mpris.dir/src/xmms2-mpris.c.o' + \ . ' -c ' . '/foo/bar/xmms2-mpris/src/xmms2-mpris.c', + \ }, + \ ], + \ }, + \ { + \ }, + \ ) + +Execute(ShellSplit should not merge flags): + AssertEqual + \ [ + \ 'gcc', + \ '-Dgoal=9', + \ '-Tlinkerfile.ld', + \ 'blabla', + \ '-Isubdir', + \ 'subdir/somedep1.o', + \ 'subdir/somedep2.o', + \ '-I''dir with spaces''', + \ '-Idir-with-dash', + \ 'subdir/somedep3.o', + \ 'subdir/somedep4.o', + \ '-I' . ale#path#Simplify('kernel/include'), + \ 'subdir/somedep5.o', + \ 'subdir/somedep6.o', + \ ], + \ ale#c#ShellSplit( + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla -Isubdir ' + \ . 'subdir/somedep1.o ' . 'subdir/somedep2.o ' + \ . '-I''dir with spaces''' . ' -Idir-with-dash ' + \ . 'subdir/somedep3.o ' . 'subdir/somedep4.o ' + \ . ' -I'. ale#path#Simplify('kernel/include') . ' ' + \ . 'subdir/somedep5.o ' . 'subdir/somedep6.o' + \ ) + +Execute(ShellSplit should handle parenthesis and quotes): + AssertEqual + \ [ + \ 'gcc', + \ '-Dgoal=9', + \ '-Tlinkerfile.ld', + \ 'blabla', + \ '-Dtest1="('' '')"', + \ 'file1.o', + \ '-Dtest2=''(` `)''', + \ 'file2.o', + \ '-Dtest3=`(" ")`', + \ 'file3.o', + \ ] , + \ ale#c#ShellSplit( + \ 'gcc -Dgoal=9 -Tlinkerfile.ld blabla ' + \ . '-Dtest1="('' '')" file1.o ' + \ . '-Dtest2=''(` `)'' file2.o ' + \ . '-Dtest3=`(" ")` file3.o' + \ ) + +Execute(We should include several important flags): + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/inc')) + \ . ' -I ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/include')) + \ . ' -iquote ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incquote')) + \ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem')) + \ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter')) + \ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework')) + \ . ' -include file.h' + \ . ' -imacros macros.h' + \ . ' -Dmacro="value"' + \ . ' -DGoal=9' + \ . ' -D macro2' + \ . ' -D macro3="value"' + \ . ' -Bbdir' + \ . ' -B bdir2' + \ . ' -iprefix prefix -iwithprefix prefix2 -iwithprefixbefore prefix3' + \ . ' -isysroot sysroot --sysroot=test --no-sysroot-suffix -imultilib multidir' + \ . ' -Wsome-warning -std=c89 -pedantic -pedantic-errors -ansi' + \ . ' -foption -O2 -C -CC -trigraphs -nostdinc -nostdinc++' + \ . ' -iplugindir=dir -march=native -w', + \ ale#c#ParseCFlags( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 0, + \ [ + \ 'gcc', + \ '-Iinc', + \ '-I', + \ 'include', + \ '-iquote', + \ 'incquote', + \ '-isystem', + \ 'incsystem', + \ '-idirafter', + \ 'incafter', + \ '-iframework', + \ 'incframework', + \ '-include', + \ 'file.h', + \ '-imacros', + \ 'macros.h', + \ '-Dmacro="value"', + \ '-DGoal=9', + \ '-D', + \ 'macro2', + \ '-D', + \ 'macro3="value"', + \ '-Bbdir', + \ '-B', + \ 'bdir2', + \ '-iprefix', + \ 'prefix', + \ '-iwithprefix', + \ 'prefix2', + \ '-iwithprefixbefore', + \ 'prefix3', + \ '-isysroot', + \ 'sysroot', + \ '--sysroot=test', + \ '--no-sysroot-suffix', + \ '-imultilib', + \ 'multidir', + \ '-Wsome-warning', + \ '-std=c89', + \ '-pedantic', + \ '-pedantic-errors', + \ '-ansi', + \ '-foption', + \ '-O2', + \ '-C', + \ '-CC', + \ '-trigraphs', + \ '-nostdinc', + \ '-nostdinc++', + \ '-iplugindir=dir', + \ '-march=native', + \ '-w', + \ ], + \ ) + +Execute(We should quote the flags we need to quote): + AssertEqual + \ '-I ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/inc')) + \ . ' -I ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/include')) + \ . ' -iquote ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incquote')) + \ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem')) + \ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter')) + \ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework')) + \ . ' -include file.h' + \ . ' -imacros macros.h' + \ . ' ' . ale#Escape('-Dmacro="value"') + \ . ' -DGoal=9' + \ . ' -D macro2' + \ . ' -D ' . ale#Escape('macro3="value"') + \ . ' -Bbdir' + \ . ' -B bdir2' + \ . ' -iprefix prefix -iwithprefix prefix2 -iwithprefixbefore prefix3' + \ . ' -isysroot sysroot --sysroot=test' + \ . ' ' . ale#Escape('--sysroot="quoted"') + \ . ' ' . ale#Escape('--sysroot=foo bar') + \ . ' --no-sysroot-suffix -imultilib multidir' + \ . ' -Wsome-warning -std=c89 -pedantic -pedantic-errors -ansi' + \ . ' -foption -O2 -C -CC -trigraphs -nostdinc -nostdinc++' + \ . ' -iplugindir=dir -march=native -w', + \ ale#c#ParseCFlags( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 1, + \ [ + \ 'gcc', + \ '-Iinc', + \ '-I', + \ 'include', + \ '-iquote', + \ 'incquote', + \ '-isystem', + \ 'incsystem', + \ '-idirafter', + \ 'incafter', + \ '-iframework', + \ 'incframework', + \ '-include', + \ 'file.h', + \ '-imacros', + \ 'macros.h', + \ '-Dmacro="value"', + \ '-DGoal=9', + \ '-D', + \ 'macro2', + \ '-D', + \ 'macro3="value"', + \ '-Bbdir', + \ '-B', + \ 'bdir2', + \ '-iprefix', + \ 'prefix', + \ '-iwithprefix', + \ 'prefix2', + \ '-iwithprefixbefore', + \ 'prefix3', + \ '-isysroot', + \ 'sysroot', + \ '--sysroot=test', + \ '--sysroot="quoted"', + \ '--sysroot=foo bar', + \ '--no-sysroot-suffix', + \ '-imultilib', + \ 'multidir', + \ '-Wsome-warning', + \ '-std=c89', + \ '-pedantic', + \ '-pedantic-errors', + \ '-ansi', + \ '-foption', + \ '-O2', + \ '-C', + \ '-CC', + \ '-trigraphs', + \ '-nostdinc', + \ '-nostdinc++', + \ '-iplugindir=dir', + \ '-march=native', + \ '-w', + \ ], + \ ) + +Execute(We should exclude other flags that cause problems): + AssertEqual + \ '', + \ ale#c#ParseCFlags( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 0, + \ [ + \ 'gcc', + \ '-Wl,option', + \ '-Wa,option', + \ '-Wp,option', + \ '-c', + \ 'filename.c', + \ 'somelib.a', + \ '-fdump-file=name', + \ '-fdiagnostics-arg', + \ '-fno-show-column', + \ '-fstack-usage', + \ '-Tlinkerfile.ld', + \ ], + \ ) + +Execute(We should expand @file in CFlags): + AssertEqual + \ '-DARGS1 -DARGS2 -O2', + \ ale#c#ParseCFlags( + \ ale#path#Simplify(g:dir. '/test-files/c/makefile_project'), + \ 0, + \ [ + \ 'gcc', + \ '-g', + \ '@./args', + \ '-O2', + \ ], + \ ) diff --git a/dot_vim/plugged/ale/test/test_checkingbuffer_autocmd.vader b/dot_vim/plugged/ale/test/test_checkingbuffer_autocmd.vader new file mode 100644 index 0000000..9e642b1 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_checkingbuffer_autocmd.vader @@ -0,0 +1,57 @@ +Before: + Save g:ale_run_synchronously + Save g:ale_buffer_info + + let g:ale_run_synchronously = 1 + let g:ale_buffer_info = {} + + let g:checking_buffer = 0 + + unlet! b:ale_linted + + function! TestCallback(buffer, output) + return [] + endfunction + + call ale#linter#PreventLoading('testft') + call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': 'true', + \}) + +After: + Restore + + unlet! g:checking_buffer + + delfunction TestCallback + call ale#linter#Reset() + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + +Given testft (An empty file): +Execute(ALELintPre should not return success on ale#engine#IsCheckingBuffer): + augroup VaderTest + autocmd! + autocmd User ALELintPre let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 + augroup END + + ALELint + + AssertEqual g:checking_buffer, 0 + +Execute(ALEJobStarted should return success on ale#engine#IsCheckingBuffer): + augroup VaderTest + autocmd! + autocmd User ALEJobStarted let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 + augroup END + + ALELint + + AssertEqual g:checking_buffer, 1 diff --git a/dot_vim/plugged/ale/test/test_cleanup.vader b/dot_vim/plugged/ale/test/test_cleanup.vader new file mode 100644 index 0000000..232874a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_cleanup.vader @@ -0,0 +1,14 @@ +After: + unlet! g:buffer + let g:ale_buffer_info = {} + +Execute('ALE globals should be cleared when the buffer is deleted): + new + + let g:ale_buffer_info = { + \ bufnr(''): {'temporary_file_list': [], 'temporary_directory_list': []}, + \ 10347: {'temporary_file_list': [], 'temporary_directory_list': []}, + \} + + bdelete + AssertEqual {10347: {'temporary_file_list': [], 'temporary_directory_list': []}}, g:ale_buffer_info diff --git a/dot_vim/plugged/ale/test/test_code_action.vader b/dot_vim/plugged/ale/test/test_code_action.vader new file mode 100644 index 0000000..80e2b1d --- /dev/null +++ b/dot_vim/plugged/ale/test/test_code_action.vader @@ -0,0 +1,605 @@ +Before: + let g:notified_changes = [] + + runtime autoload/ale/lsp.vim + + function! ale#lsp#NotifyForChanges(conn_id, buffer) abort + call add(g:notified_changes, { + \ 'conn_id': a:conn_id, + \ 'buffer': a:buffer + \}) + endfunction + + Save g:ale_enabled + let g:ale_enabled = 0 + + let g:file1 = tempname() + let g:file2 = tempname() + let g:test = {} + + let g:test.create_change = {line, offset, end_line, end_offset, value -> + \{ + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': line, + \ 'offset': offset, + \ }, + \ 'end': { + \ 'line': end_line, + \ 'offset': end_offset, + \ }, + \ 'newText': value, + \ }], + \ }] + \}} + + function! WriteFileAndEdit() abort + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + execute 'edit ' . g:file1 + endfunction! + +After: + " Close the extra buffers if we opened it. + if bufnr(g:file1) != -1 && buflisted(bufnr(g:file1)) + execute ':bp! | :bd! ' . bufnr(g:file1) + endif + if bufnr(g:file2) != -1 && buflisted(bufnr(g:file2)) + execute ':bp! | :bd! ' . bufnr(g:file2) + endif + + if filereadable(g:file1) + call delete(g:file1) + endif + if filereadable(g:file2) + call delete(g:file2) + endif + + unlet! g:notified_changes + " unlet! g:expected_notified_changes + unlet! g:file1 + unlet! g:file2 + unlet! g:test + unlet! g:changes + delfunction WriteFileAndEdit + + runtime autoload/ale/lsp.vim + + Restore + + +Execute(It should modify and save multiple files): + call writefile([ + \ 'class Name {', + \ ' value: string', + \ '}', + \ '', + \ 'class B {', + \ ' constructor(readonly a: Name) {}', + \ '}' + \], g:file1, 'S') + call writefile([ + \ 'import A from "A"', + \ 'import {', + \ ' B,', + \ ' C,', + \ '} from "module"', + \ 'import D from "D"', + \], g:file2, 'S') + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 1, + \ 'offset': 7, + \ }, + \ 'end': { + \ 'line': 1, + \ 'offset': 11, + \ }, + \ 'newText': 'Value', + \ }, { + \ 'start': { + \ 'line': 6, + \ 'offset': 27, + \ }, + \ 'end': { + \ 'line': 6, + \ 'offset': 31, + \ }, + \ 'newText': 'Value', + \ }], + \ }, { + \ 'fileName': g:file2, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 2, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 6, + \ 'offset': 1, + \ }, + \ 'newText': "import {A, B} from 'module'\n\n", + \ }] + \ }], + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual [ + \ 'class Value {', + \ ' value: string', + \ '}', + \ '', + \ 'class B {', + \ ' constructor(readonly a: Value) {}', + \ '}', + \ '', + \], readfile(g:file1, 'b') + + AssertEqual [ + \ 'import A from "A"', + \ 'import {A, B} from ''module''', + \ '', + \ 'import D from "D"', + \ '', + \], readfile(g:file2, 'b') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file2), + \}], g:notified_changes + +Execute(Beginning of file can be modified): + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'newText': "type A: string\ntype B: number\n", + \ }], + \ }] + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual [ + \ 'type A: string', + \ 'type B: number', + \] + g:test.text + [''], readfile(g:file1, 'b') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + + +Execute(End of file can be modified): + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 4, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 4, + \ 'offset': 1, + \ }, + \ 'newText': "type A: string\ntype B: number\n", + \ }], + \ }] + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual g:test.text + [ + \ 'type A: string', + \ 'type B: number', + \ '', + \], readfile(g:file1, 'b') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + + +Execute(Current buffer contents will be reloaded): + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + + execute 'edit ' . g:file1 + let g:test.buffer = bufnr(g:file1) + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'newText': "type A: string\ntype B: number\n", + \ }], + \ }] + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual [ + \ 'type A: string', + \ 'type B: number', + \] + g:test.text + [''], readfile(g:file1, 'b') + + AssertEqual [ + \ 'type A: string', + \ 'type B: number', + \] + g:test.text, getbufline(g:test.buffer, 1, '$') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + + +Execute(Unlisted buffer contents will be modified correctly): + let g:test.text = [ + \ 'class Name {', + \ ' value: string', + \ '}', + \] + call writefile(g:test.text, g:file1, 'S') + + execute 'edit ' . g:file1 + let g:test.buffer = bufnr(g:file1) + + execute 'bd' + AssertEqual bufnr(g:file1), g:test.buffer + + call ale#code_action#HandleCodeAction( + \ { + \ 'changes': [{ + \ 'fileName': g:file1, + \ 'textChanges': [{ + \ 'start': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'end': { + \ 'line': 1, + \ 'offset': 1, + \ }, + \ 'newText': "type A: string\ntype B: number\n", + \ }], + \ }] + \ }, + \ {'should_save': 1, 'conn_id': 'test_conn'}, + \) + + AssertEqual [ + \ 'type A: string', + \ 'type B: number', + \] + g:test.text + [''], readfile(g:file1, 'b') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(g:file1), + \}], g:notified_changes + +# Tests for cursor repositioning. In comments `=` designates change range, and +# `C` cursor position + +# C === +Execute(Cursor will not move when it is before text change): + call WriteFileAndEdit() + let g:test.changes = g:test.create_change(2, 3, 2, 8, 'value2') + + call setpos('.', [0, 1, 1, 0]) + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) + AssertEqual [1, 1], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + + call setpos('.', [0, 2, 2, 0]) + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) + AssertEqual [2, 2], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +# ====C==== +Execute(Cursor column will move to the change end when cursor between start/end): + let g:test.changes = g:test.create_change(2, 3, 2, 8, 'value2') + + for r in range(3, 8) + call WriteFileAndEdit() + call setpos('.', [0, 2, r, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction(g:test.changes, { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \}) + AssertEqual ' value2: string', getline('.') + AssertEqual [2, 9], getpos('.')[1:2] + endfor + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}, { + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + + +# ====C +Execute(Cursor column will move back when new text is shorter): + call WriteFileAndEdit() + call setpos('.', [0, 2, 8, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(2, 3, 2, 8, 'val'), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual ' val: string', getline('.') + AssertEqual [2, 6], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + + +# ==== C +Execute(Cursor column will move forward when new text is longer): + call WriteFileAndEdit() + + call setpos('.', [0, 2, 8, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(2, 3, 2, 8, 'longValue'), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual ' longValue: string', getline('.') + AssertEqual [2, 12], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +# ========= +# = +# C +Execute(Cursor line will move when updates are happening on lines above): + call WriteFileAndEdit() + call setpos('.', [0, 3, 1, 0]) + AssertEqual '}', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(1, 1, 2, 1, "test\ntest\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual '}', getline('.') + AssertEqual [4, 1], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + + +# ========= +# =C +Execute(Cursor line and column will move when change on lines above and just before cursor column): + call WriteFileAndEdit() + call setpos('.', [0, 2, 2, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(1, 1, 2, 1, "test\ntest\n123"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual '123 value: string', getline('.') + AssertEqual [3, 5], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +# ========= +# ======C== +# = +Execute(Cursor line and column will move at the end of changes): + call WriteFileAndEdit() + call setpos('.', [0, 2, 10, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(1, 1, 3, 1, "test\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual '}', getline('.') + AssertEqual [2, 1], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +# C == +# === +Execute(Cursor will not move when changes happening on lines >= cursor, but after cursor): + call WriteFileAndEdit() + call setpos('.', [0, 2, 3, 0]) + AssertEqual ' value: string', getline('.') + call ale#code_action#HandleCodeAction( + \ g:test.create_change(2, 10, 3, 1, "number\n"), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual ' value: number', getline('.') + AssertEqual [2, 3], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +Execute(Cursor will not move when change covers entire file): + call WriteFileAndEdit() + call setpos('.', [0, 2, 3, 0]) + call ale#code_action#HandleCodeAction( + \ g:test.create_change(1, 1, len(g:test.text) + 1, 1, + \ join(g:test.text + ['x'], "\n")), + \ { + \ 'should_save': 1, + \ 'conn_id': 'test_conn', + \ }) + AssertEqual [2, 3], getpos('.')[1:2] + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +Execute(It should just modify file when should_save is set to v:false): + call WriteFileAndEdit() + let g:test.change = g:test.create_change(1, 1, 1, 1, "import { writeFile } from 'fs';\n") + call ale#code_action#HandleCodeAction(g:test.change, { + \ 'conn_id': 'test_conn', + \}) + AssertEqual 1, getbufvar(bufnr(''), '&modified') + AssertEqual [ + \ 'import { writeFile } from ''fs'';', + \ 'class Name {', + \ ' value: string', + \ '}', + \], getline(1, '$') + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +Given typescript(An example TypeScript file): + type Foo = {} + + export interface ISomething { + fooLongName: Foo | null + } + + export class SomethingElse implements ISomething { + // Bindings + fooLongName!: ISomething['fooLongName'] + } + +Execute(): + let g:changes = [ + \ {'end': {'offset': 14, 'line': 4}, 'newText': 'foo', 'start': {'offset': 3, 'line': 4}}, + \ {'end': {'offset': 40, 'line': 9}, 'newText': 'foo', 'start': {'offset': 29, 'line': 9}}, + \ {'end': {'offset': 14, 'line': 9}, 'newText': 'foo', 'start': {'offset': 3, 'line': 9}}, + \] + + call ale#code_action#ApplyChanges(expand('%:p'), g:changes, { + \ 'conn_id': 'test_conn', + \}) + + AssertEqual [{ + \ 'conn_id': 'test_conn', + \ 'buffer': bufnr(''), + \}], g:notified_changes + +Expect(The changes should be applied correctly): + type Foo = {} + + export interface ISomething { + foo: Foo | null + } + + export class SomethingElse implements ISomething { + // Bindings + foo!: ISomething['foo'] + } diff --git a/dot_vim/plugged/ale/test/test_code_action_corner_cases.vader b/dot_vim/plugged/ale/test/test_code_action_corner_cases.vader new file mode 100644 index 0000000..b5741d4 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_code_action_corner_cases.vader @@ -0,0 +1,141 @@ +" Tests for various corner cases of applying code changes from LSP. +" +" These can be verified against the reference vscode implementation using the +" following javascript program: +" +" const { TextDocument } = require('vscode-languageserver-textdocument'); +" const { TextEdit, Position, Range } = require('vscode-languageserver-types'); +" function MkPos(line, offset) { return Position.create(line - 1, offset - 1); } +" function MkInsert(pos, newText) { return TextEdit.insert(pos, newText); } +" function MkDelete(start, end) { return TextEdit.del(Range.create(start, end)); } +" function TestChanges(s, es) { +" return TextDocument.applyEdits(TextDocument.create(null, null, null, s), es); +" } +" +" const fs = require("fs"); +" const assert = require('assert').strict; +" const testRegex = /(? ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + let g:handle_code_action_called = 1 + Assert !get(a:options, 'should_save') + call add(g:code_actions, a:code_action) + endfunction + + function! ale#util#Input(message, value) abort + return '2' + endfunction + +After: + Restore + + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:code_actions + unlet! g:handle_code_action_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/codefix.vim + runtime autoload/ale/code_action.vim + +Execute(Failed codefix responses should be handled correctly): + call ale#codefix#HandleTSServerResponse( + \ 1, + \ {'command': 'getCodeFixes', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Given typescript(Some typescript file): + foo + somelongerline () + bazxyzxyzxyz + +Execute(getCodeFixes from tsserver should be handled): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, { + \ 'command': 'getCodeFixes', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'type': 'response', + \ 'body': [ + \ { + \ 'description': 'Import default "x" from module "./z"', + \ 'fixName': 'import', + \ 'changes': [ + \ { + \ 'fileName': "/foo/bar/file1.ts", + \ 'textChanges': [ + \ { + \ 'end': { + \ 'line': 2, + \ 'offset': 1, + \ }, + \ 'newText': 'import x from "./z";^@', + \ 'start': { + \ 'line': 2, + \ 'offset': 1, + \ } + \ } + \ ] + \ } + \ ] + \ } + \ ] + \}) + + AssertEqual g:handle_code_action_called, 1 + AssertEqual + \ [ + \ { + \ 'description': 'codefix', + \ 'changes': [ + \ { + \ 'fileName': "/foo/bar/file1.ts", + \ 'textChanges': [ + \ { + \ 'end': { + \ 'line': 2, + \ 'offset': 1 + \ }, + \ 'newText': 'import x from "./z";^@', + \ 'start': { + \ 'line': 2, + \ 'offset': 1 + \ } + \ } + \ ] + \ } + \ ] + \ } + \ ], + \ g:code_actions + +Execute(getCodeFixes from tsserver should be handled with user input if there are more than one action): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, { + \ 'command': 'getCodeFixes', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'type': 'response', + \ 'body': [ + \ { + \ 'description': 'Import default "x" from module "./z"', + \ 'fixName': 'import', + \ 'changes': [ + \ { + \ 'fileName': "/foo/bar/file1.ts", + \ 'textChanges': [ + \ { + \ 'end': { + \ 'line': 2, + \ 'offset': 1, + \ }, + \ 'newText': 'import x from "./z";^@', + \ 'start': { + \ 'line': 2, + \ 'offset': 1, + \ } + \ } + \ ] + \ } + \ ] + \ }, + \ { + \ 'description': 'Import default "x" from module "./y"', + \ 'fixName': 'import', + \ 'changes': [ + \ { + \ 'fileName': "/foo/bar/file1.ts", + \ 'textChanges': [ + \ { + \ 'end': { + \ 'line': 2, + \ 'offset': 1, + \ }, + \ 'newText': 'import x from "./y";^@', + \ 'start': { + \ 'line': 2, + \ 'offset': 1, + \ } + \ } + \ ] + \ } + \ ] + \ } + \ ] + \}) + + AssertEqual g:handle_code_action_called, 1 + AssertEqual + \ [ + \ { + \ 'description': 'codefix', + \ 'changes': [ + \ { + \ 'fileName': "/foo/bar/file1.ts", + \ 'textChanges': [ + \ { + \ 'end': { + \ 'line': 2, + \ 'offset': 1 + \ }, + \ 'newText': 'import x from "./y";^@', + \ 'start': { + \ 'line': 2, + \ 'offset': 1 + \ } + \ } + \ ] + \ } + \ ] + \ } + \ ], + \ g:code_actions + +Execute(Prints a tsserver error message when getCodeFixes unsuccessful): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, { + \ 'command': 'getCodeFixes', + \ 'request_seq': 3, + \ 'success': v:false, + \ 'message': 'something is wrong', + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''Error while getting code fixes. Reason: something is wrong'''], g:expr_list + +Execute(Does nothing when where are no code fixes): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, { + \ 'command': 'getCodeFixes', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [] + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No code fixes available.'''], g:expr_list + +Execute(tsserver codefix requests should be sent): + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + let g:ale_buffer_info = {bufnr(''): {'loclist': [{'lnum': 2, 'col': 5, 'code': 2304, 'linter_name': 'tsserver'}]}} + call setpos('.', [bufnr(''), 2, 16, 0]) + + " ALECodeAction + call ale#codefix#Execute(0) + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'code_actions', g:capability_checked + AssertEqual + \ 'function(''ale#codefix#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@getCodeFixes', { + \ 'startLine': 2, + \ 'startOffset': 16, + \ 'endLine': 2, + \ 'endOffset': 17, + \ 'file': expand('%:p'), + \ 'errorCodes': [2304], + \ }] + \ ], + \ g:message_list + +Execute(tsserver codefix requests should be sent only for error with code): + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + let g:ale_buffer_info = {bufnr(''): {'loclist': [{'lnum': 2, 'col': 16, 'linter_name': 'tsserver'}, {'lnum': 2, 'col': 16, 'code': 2304, 'linter_name': 'tsserver'}]}} + call setpos('.', [bufnr(''), 2, 16, 0]) + + " ALECodeAction + call ale#codefix#Execute(0) + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'code_actions', g:capability_checked + AssertEqual + \ 'function(''ale#codefix#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@getCodeFixes', { + \ 'startLine': 2, + \ 'startOffset': 16, + \ 'endLine': 2, + \ 'endOffset': 17, + \ 'file': expand('%:p'), + \ 'errorCodes': [2304], + \ }] + \ ], + \ g:message_list + +Execute(getApplicableRefactors from tsserver should be handled): + call ale#codefix#SetMap({3: { + \ 'buffer': expand('%:p'), + \ 'line': 1, + \ 'column': 2, + \ 'end_line': 3, + \ 'end_column': 4, + \ 'connection_id': 0, + \}}) + call ale#codefix#HandleTSServerResponse(1, + \ {'seq': 0, 'request_seq': 3, 'type': 'response', 'success': v:true, 'body': [{'actions': [{'description': 'Extract to constant in enclosing scope', 'name': 'constant_scope_0'}], 'description': 'Extract constant', 'name': 'Extract Symbol'}, {'actions': [{'description': 'Extract to function in module scope', 'name': 'function_scope_1'}], 'description': 'Extract function', 'name': 'Extract Symbol'}], 'command': 'getApplicableRefactors'}) + + AssertEqual + \ [ + \ [0, 'ts@getEditsForRefactor', { + \ 'startLine': 1, + \ 'startOffset': 2, + \ 'endLine': 3, + \ 'endOffset': 5, + \ 'file': expand('%:p'), + \ 'refactor': 'Extract Symbol', + \ 'action': 'function_scope_1', + \ }] + \ ], + \ g:message_list + +Execute(getApplicableRefactors should print error on failure): + call ale#codefix#SetMap({3: { + \ 'buffer': expand('%:p'), + \ 'line': 1, + \ 'column': 2, + \ 'end_line': 3, + \ 'end_column': 4, + \ 'connection_id': 0, + \}}) + call ale#codefix#HandleTSServerResponse(1, + \ {'seq': 0, 'request_seq': 3, 'type': 'response', 'success': v:false, 'message': 'oops', 'command': 'getApplicableRefactors'}) + + AssertEqual ['echom ''Error while getting applicable refactors. Reason: oops'''], g:expr_list + +Execute(getApplicableRefactors should do nothing if there are no refactors): + call ale#codefix#SetMap({3: { + \ 'buffer': expand('%:p'), + \ 'line': 1, + \ 'column': 2, + \ 'end_line': 3, + \ 'end_column': 4, + \ 'connection_id': 0, + \}}) + call ale#codefix#HandleTSServerResponse(1, + \ {'seq': 0, 'request_seq': 3, 'type': 'response', 'success': v:true, 'body': [], 'command': 'getApplicableRefactors'}) + + AssertEqual ['echom ''No applicable refactors available.'''], g:expr_list + +Execute(getEditsForRefactor from tsserver should be handled): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, + \{'seq': 0, 'request_seq': 3, 'type': 'response', 'success': v:true, 'body': {'edits': [{'fileName': '/foo/bar/file.ts', 'textChanges': [{'end': {'offset': 35, 'line': 9}, 'newText': 'newFunction(app);', 'start': {'offset': 3, 'line': 8}}, {'end': {'offset': 4, 'line': 19}, 'newText': '^@function newFunction(app: Router) {^@ app.use(booExpressCsrf());^@ app.use(booExpressRequireHttps);^@}^@', 'start': {'offset': 4, 'line': 19}}]}], 'renameLocation': {'offset': 3, 'line': 8}, 'renameFilename': '/foo/bar/file.ts'}, 'command': 'getEditsForRefactor' } + \) + + AssertEqual g:handle_code_action_called, 1 + AssertEqual + \ [ + \ { + \ 'description': 'editsForRefactor', + \ 'changes': [{'fileName': '/foo/bar/file.ts', 'textChanges': [{'end': {'offset': 35, 'line': 9}, 'newText': 'newFunction(app);', 'start': {'offset': 3, 'line': 8}}, {'end': {'offset': 4, 'line': 19}, 'newText': '^@function newFunction(app: Router) {^@ app.use(booExpressCsrf());^@ app.use(booExpressRequireHttps);^@}^@', 'start': {'offset': 4, 'line': 19}}]}], + \ } + \ ], + \ g:code_actions + +Execute(getEditsForRefactor should print error on failure): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleTSServerResponse(1, + \{'seq': 0, 'request_seq': 3, 'type': 'response', 'success': v:false, 'message': 'oops', 'command': 'getEditsForRefactor' } + \) + + AssertEqual ['echom ''Error while getting edits for refactor. Reason: oops'''], g:expr_list + +Execute(Failed LSP responses should be handled correctly): + call ale#codefix#HandleLSPResponse( + \ 1, + \ {'method': 'workspace/applyEdit', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Given python(Some python file): + def main(): + a = 1 + b = a + 2 + +Execute("workspace/applyEdit" from LSP should be handled): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleLSPResponse(1, + \ {'id': 0, 'jsonrpc': '2.0', 'method': 'workspace/applyEdit', 'params': {'edit': {'changes': {'file:///foo/bar/file.ts': [{'range': {'end': {'character': 27, 'line': 7}, 'start': {'character': 27, 'line': 7}}, 'newText': ', Config'}, {'range': {'end': {'character': 12, 'line': 96}, 'start': {'character': 2, 'line': 94}}, 'newText': 'await newFunction(redis, imageKey, cover, config);'}, {'range': {'end': {'character': 2, 'line': 99}, 'start': {'character': 2, 'line': 99}}, 'newText': '^@async function newFunction(redis: IRedis, imageKey: string, cover: Buffer, config: Config) {^@ try {^@ await redis.set(imageKey, cover, ''ex'', parseInt(config.coverKeyTTL, 10));^@ }^@ catch { }^@}^@'}]}}}}) + + AssertEqual g:handle_code_action_called, 1 + AssertEqual + \ [{'description': 'applyEdit', 'changes': [{'fileName': '/foo/bar/file.ts', 'textChanges': [{'end': {'offset': 28, 'line': 8}, 'newText': ', Config', 'start': {'offset': 28, 'line': 8}}, {'end': {'offset': 13, 'line': 97}, 'newText': 'await newFunction(redis, imageKey, cover, config);', 'start': {'offset': 3, 'line': 95}}, {'end': {'offset': 3, 'line': 100}, 'newText': '^@async function newFunction(redis: IRedis, imageKey: string, cover: Buffer, config: Config) {^@ try {^@ await redis.set(imageKey, cover, ''ex'', parseInt(config.coverKeyTTL, 10));^@ }^@ catch { }^@}^@', 'start': {'offset': 3, 'line': 100}}]}]}], + \ g:code_actions + +Execute(Code Actions from LSP should be handled when returned with documentChanges): + call ale#codefix#SetMap({2: {}}) + call ale#codefix#HandleLSPResponse(1, + \ {'id': 2, 'jsonrpc': '2.0', 'result': [{'diagnostics': v:null, 'edit': {'changes': v:null, 'documentChanges': [{'edits': [{'range': {'end': {'character': 4, 'line': 2}, 'start': {'character': 4, 'line': 1}}, 'newText': ''}, {'range': {'end': {'character': 9, 'line': 2}, 'start': {'character': 8, 'line': 2}}, 'newText': '(1)'}], 'textDocument': {'uri': 'file:///foo/bar/test.py', 'version': v:null}}]}, 'kind': 'refactor.inline', 'title': 'Inline variable', 'command': v:null}, {'diagnostics': v:null, 'edit': {'changes': v:null, 'documentChanges': [{'edits': [{'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}, 'newText': 'def func_bomdjnxh():^@ a = 1return a^@^@^@'}, {'range': {'end': {'character': 9, 'line': 1}, 'start': {'character': 8, 'line': 1}}, 'newText': 'func_bomdjnxh()^@'}], 'textDocument': {'uri': 'file:///foo/bar/test.py', 'version': v:null}}]}, 'kind': 'refactor.extract', 'title': 'Extract expression into function ''func_bomdjnxh''', 'command': v:null}]}) + + AssertEqual g:handle_code_action_called, 1 + AssertEqual + \ [{'description': 'codeaction', 'changes': [{'fileName': '/foo/bar/test.py', 'textChanges': [{'end': {'offset': 1, 'line': 1}, 'newText': 'def func_bomdjnxh():^@ a = 1return a^@^@^@', 'start': {'offset': 1, 'line': 1}}, {'end': {'offset': 10, 'line': 2}, 'newText': 'func_bomdjnxh()^@', 'start': {'offset': 9, 'line': 2}}]}]}], + \ g:code_actions + +Execute(LSP Code Actions handles CodeAction responses): + call ale#codefix#SetMap({3: { + \ 'connection_id': 0, + \}}) + call ale#codefix#HandleLSPResponse(1, + \ {'id': 3, 'jsonrpc': '2.0', 'result': [{'kind': 'refactor', 'title': 'Extract to inner function in function ''getVideo''', 'command': {'arguments': [{'file': '/foo/bar/file.ts', 'endOffset': 0, 'action': 'function_scope_0', 'startOffset': 1, 'startLine': 65, 'refactor': 'Extract Symbol', 'endLine': 68}], 'title': 'Extract to inner function in function ''getVideo''', 'command': '_typescript.applyRefactoring'}}, {'kind': 'refactor', 'title': 'Extract to function in module scope', 'command': {'arguments': [{'file': '/foo/bar/file.ts', 'endOffset': 0, 'action': 'function_scope_1', 'startOffset': 1, 'startLine': 65, 'refactor': 'Extract Symbol', 'endLine': 68}], 'title': 'Extract to function in module scope', 'command': '_typescript.applyRefactoring'}}]}) + + AssertEqual + \ [[0, 'workspace/executeCommand', {'arguments': [{'file': '/foo/bar/file.ts', 'action': 'function_scope_1', 'endOffset': 0, 'refactor': 'Extract Symbol', 'endLine': 68, 'startLine': 65, 'startOffset': 1}], 'command': '_typescript.applyRefactoring'}]], + \ g:message_list + +Execute(LSP Code Actions handles Command responses): + call ale#codefix#SetMap({2: { + \ 'connection_id': 2, + \}}) + call ale#codefix#HandleLSPResponse(1, + \ {'id': 2, 'jsonrpc': '2.0', 'result': [{'title': 'fake for testing'}, {'arguments': [{'documentChanges': [{'edits': [{'range': {'end': {'character': 31, 'line': 2}, 'start': {'character': 31, 'line': 2}}, 'newText': ', createVideo'}], 'textDocument': {'uri': 'file:///foo/bar/file.ts', 'version': 1}}]}], 'title': 'Add ''createVideo'' to existing import declaration from "./video"', 'command': '_typescript.applyWorkspaceEdit'}]}) + + AssertEqual + \ [[0, 'workspace/executeCommand', {'arguments': [{'documentChanges': [{'edits': [{'range': {'end': {'character': 31, 'line': 2}, 'start': {'character': 31, 'line': 2}}, 'newText': ', createVideo'}], 'textDocument': {'uri': 'file:///foo/bar/file.ts', 'version': 1}}]}], 'command': '_typescript.applyWorkspaceEdit'}]], + \ g:message_list + +Execute(Prints message when LSP code action returns no results): + call ale#codefix#SetMap({3: {}}) + call ale#codefix#HandleLSPResponse(1, + \ {'id': 3, 'jsonrpc': '2.0', 'result': []}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No code actions received from server'''], g:expr_list + +Execute(LSP code action requests should be sent): + call ale#linter#Reset() + + runtime ale_linters/python/jedils.vim + let g:ale_buffer_info = {bufnr(''): {'loclist': [{'lnum': 2, 'col': 5, 'end_lnum': 2, 'end_col': 6, 'code': 2304, 'text': 'oops'}]}} + call setpos('.', [bufnr(''), 2, 5, 0]) + + " ALECodeAction + call ale#codefix#Execute(0) + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'code_actions', g:capability_checked + AssertEqual + \ 'function(''ale#codefix#HandleLSPResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ [0, 'textDocument/codeAction', { + \ 'context': { + \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] + \ }, + \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))} + \ }] + \ ], + \ g:message_list[-1:] + +Execute(LSP code action requests should be sent only for error with code): + call ale#linter#Reset() + + runtime ale_linters/python/jedils.vim + let g:ale_buffer_info = {bufnr(''): {'loclist': [{'lnum': 2, 'col': 5, 'end_lnum': 2, 'end_col': 6, 'code': 2304, 'text': 'oops'}]}} + call setpos('.', [bufnr(''), 2, 5, 0]) + + " ALECodeAction + call ale#codefix#Execute(0) + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'code_actions', g:capability_checked + AssertEqual + \ 'function(''ale#codefix#HandleLSPResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ [0, 'textDocument/codeAction', { + \ 'context': { + \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] + \ }, + \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))} + \ }] + \ ], + \ g:message_list[-1:] diff --git a/dot_vim/plugged/ale/test/test_computed_lint_file_values.vader b/dot_vim/plugged/ale/test/test_computed_lint_file_values.vader new file mode 100644 index 0000000..6c3d209 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_computed_lint_file_values.vader @@ -0,0 +1,150 @@ +Before: + Save g:ale_enabled + Save g:ale_run_synchronously + Save g:ale_set_lists_synchronously + Save g:ale_buffer_info + + let g:ale_enabled = 1 + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + + function! TestCallback(buffer, output) + " Windows adds extra spaces to the text from echo. + return [{ + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'testlinter1', + \}] + endfunction + function! TestCallback2(buffer, output) + " Windows adds extra spaces to the text from echo. + return [{ + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'testlinter2', + \}] + endfunction + function! TestCallback3(buffer, output) + " Windows adds extra spaces to the text from echo. + return [{ + \ 'lnum': 3, + \ 'col': 3, + \ 'text': 'testlinter3', + \}] + endfunction + + " These two linters computer their lint_file values after running commands. + call ale#linter#Define('foobar', { + \ 'name': 'testlinter1', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \ 'lint_file': {b -> ale#command#Run(b, 'echo', {-> 1})}, + \}) + call ale#linter#Define('foobar', { + \ 'name': 'testlinter2', + \ 'callback': 'TestCallback2', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \ 'lint_file': {b -> ale#command#Run(b, 'echo', {-> ale#command#Run(b, 'echo', {-> 1})})}, + \}) + " This one directly computes the result. + call ale#linter#Define('foobar', { + \ 'name': 'testlinter3', + \ 'callback': 'TestCallback3', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \ 'lint_file': {b -> 1}, + \}) + + let g:filename = tempname() + call writefile([], g:filename) + call ale#test#SetFilename(g:filename) + +After: + delfunction TestCallback + + call ale#engine#Cleanup(bufnr('')) + Restore + call ale#linter#Reset() + + " Items and markers, etc. + call setloclist(0, []) + call clearmatches() + call ale#sign#Clear() + + if filereadable(g:filename) + call delete(g:filename) + endif + + unlet g:filename + +Given foobar(A file with some lines): + foo + bar + baz + +Execute(lint_file results where the result is eventually computed should be run): + call ale#Queue(0, 'lint_file') + call ale#test#FlushJobs() + + AssertEqual + \ [ + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'testlinter2', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }, + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 2, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'testlinter1', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }, + \ { + \ 'bufnr': bufnr('%'), + \ 'lnum': 3, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'testlinter3', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(Linters where lint_file eventually evaluates to 1 shouldn't be run if we don't want to run them): + call ale#Queue(0, '') + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Execute(Keeping computed lint_file jobs running should work): + AssertEqual 'testlinter2', ale#linter#Get('foobar')[1].name + + call ale#engine#InitBufferInfo(bufnr('')) + + call ale#engine#MarkLinterActive( + \ g:ale_buffer_info[bufnr('')], + \ ale#linter#Get('foobar')[1] + \) + call ale#engine#RunLinters(bufnr(''), ale#linter#Get('foobar'), 0) + + Assert !empty(g:ale_buffer_info[bufnr('')].active_linter_list), + \ 'The active linter list was empty' + Assert ale#engine#IsCheckingBuffer(bufnr('')), + \ 'The IsCheckingBuffer function returned 0' diff --git a/dot_vim/plugged/ale/test/test_csslint_config_detection.vader b/dot_vim/plugged/ale/test/test_csslint_config_detection.vader new file mode 100644 index 0000000..c8e5fa9 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_csslint_config_detection.vader @@ -0,0 +1,29 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + + runtime ale_linters/css/csslint.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(--config should be set when the .csslintrc file is found): + call ale#test#SetFilename('test-files/csslint/some-app/subdir/testfile.js') + + AssertEqual + \ ( + \ 'csslint --format=compact ' + \ . '--config=' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/csslint/some-app/.csslintrc')) + \ . ' %t' + \ ), + \ ale_linters#css#csslint#GetCommand(bufnr('')) + +Execute(--config should not be used when no .csslintrc file exists): + call ale#test#SetFilename('test-files/csslint/other-app/testfile.css') + + AssertEqual + \ ( + \ 'csslint --format=compact ' + \ . ' %t' + \ ), + \ ale_linters#css#csslint#GetCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_cursor_warnings.vader b/dot_vim/plugged/ale/test/test_cursor_warnings.vader new file mode 100644 index 0000000..7aac774 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_cursor_warnings.vader @@ -0,0 +1,276 @@ +Before: + Save g:ale_echo_msg_format + Save g:ale_echo_cursor + Save b:ale_lint_on_insert_leave + + let g:ale_echo_msg_format = '%code: %%s' + let b:ale_lint_on_insert_leave = 0 + + " We should prefer the error message at column 10 instead of the warning. + let g:ale_buffer_info = { + \ bufnr('%'): { + \ 'loclist': [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'W', + \ 'code': 'semi', + \ 'text': 'Ignore me.', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'E', + \ 'code': 'semi', + \ 'text': "Missing semicolon.\r", + \ 'detail': "Every statement should end with a semicolon\nsecond line", + \ }, + \ { + \ 'lnum': 1, + \ 'col': 14, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'I', + \ 'text': 'Some information', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'W', + \ 'code': 'space-infix-ops', + \ 'text': 'Infix operators must be spaced.', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 15, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'E', + \ 'code': 'radix', + \ 'text': 'Missing radix parameter', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 1, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'E', + \ 'text': 'lowercase error', + \ }, + \ ], + \ }, + \} + + " Turn off other features, we only care about this one feature in this test. + let g:ale_set_loclist = 0 + let g:ale_set_signs = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 1 + + runtime autoload/ale/cursor.vim + + let g:last_message = '' + + function! ale#cursor#Echom(message) abort + let g:last_message = a:message + endfunction + + call ale#linter#Reset() + call ale#linter#PreventLoading('javascript') + +After: + Restore + + unlet! g:last_message + + runtime autoload/ale/cursor.vim + + call cursor(1, 1) + + let g:ale_set_loclist = 1 + let g:ale_set_signs = 1 + let g:ale_set_highlights = 1 + + let g:ale_buffer_info = {} + + unlet! g:output + unlet! b:ale_loclist_msg_format + + " Clearing the messages breaks tests on NeoVim for some reason, but all + " we need to do for these tests is just make it so the last message isn't + " carried over between test cases. + echomsg '' + + " Close the preview window if it's open. + if &filetype is# 'ale-preview' + noautocmd :q! + endif + + call ale#linter#Reset() + +Given javascript(A Javscript file with warnings/errors): + var x = 3 + 12345678 + var x = 5*2 + parseInt("10"); + //" comment + +Execute(Messages should be shown for the correct lines): + call cursor(1, 1) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'semi: Missing semicolon.', g:last_message + +Execute(Messages should be shown for earlier columns): + call cursor(2, 1) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'space-infix-ops: Infix operators must be spaced.', g:last_message + +Execute(Messages should be shown for later columns): + call cursor(2, 16) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'radix: Missing radix parameter', g:last_message + +Execute(The message at the cursor should be shown when linting ends): + call cursor(1, 1) + call ale#engine#SetResults( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist, + \) + + AssertEqual 'semi: Missing semicolon.', g:last_message + +Execute(The message at the cursor should be shown on InsertLeave): + call cursor(2, 9) + doautocmd InsertLeave + + AssertEqual 'space-infix-ops: Infix operators must be spaced.', g:last_message + +Execute(ALEDetail should print 'detail' attributes): + call cursor(1, 1) + + ALEDetail + + AssertEqual + \ ['Every statement should end with a semicolon', 'second line'], + \ getline(1, '$') + +Execute(ALEDetail should print regular 'text' attributes): + call cursor(2, 10) + + ALEDetail + + " ALEDetail opens a window, so check the text in it. + AssertEqual + \ ['Infix operators must be spaced.'], + \ getline(1, '$') + +Execute(ALEDetail should not capitlise cursor messages): + call cursor(3, 1) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'lowercase error', g:last_message + +Execute(The linter name should be formatted into the message correctly): + let g:ale_echo_msg_format = '%linter%: %s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ 'bettercode: Infix operators must be spaced.', + \ g:last_message + +Execute(The severity should be formatted into the message correctly): + let g:ale_echo_msg_format = '%severity%: %s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ 'Warning: Infix operators must be spaced.', + \ g:last_message + + call cursor(1, 10) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'Error: Missing semicolon.', g:last_message + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'Info: Some information', g:last_message + +Execute(The type should be formatted into the message correctly): + let g:ale_echo_msg_format = '%type%: %s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ 'W: Infix operators must be spaced.', + \ g:last_message + + call cursor(1, 10) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'E: Missing semicolon.', g:last_message + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'I: Some information', g:last_message + +Execute(The %code% and %ifcode% should show the code and some text): + let g:ale_echo_msg_format = '%(code) %%s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ '(space-infix-ops) Infix operators must be spaced.', + \ g:last_message + +Execute(The %code% and %ifcode% should be removed when there's no code): + let g:ale_echo_msg_format = '%(code) %%s' + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'Some information', g:last_message + +Execute(The buffer message format option should take precedence): + let g:ale_echo_msg_format = '%(code) %%s' + let b:ale_echo_msg_format = 'FOO %s' + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'FOO Some information', g:last_message + +Execute(The cursor message shouldn't be echoed if the option is off): + let g:ale_echo_cursor = 0 + let g:last_message = 'foo' + + call cursor(1, 1) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'foo', g:last_message diff --git a/dot_vim/plugged/ale/test/test_deferred_command_string.vader b/dot_vim/plugged/ale/test/test_deferred_command_string.vader new file mode 100644 index 0000000..173b6bb --- /dev/null +++ b/dot_vim/plugged/ale/test/test_deferred_command_string.vader @@ -0,0 +1,50 @@ +Before: + Save g:ale_run_synchronously + Save g:ale_emulate_job_failure + Save g:ale_buffer_info + + let g:ale_run_synchronously = 1 + let g:ale_buffer_info = {} + let b:ale_history = [] + + call ale#linter#Reset() + call ale#assert#SetUpLinterTestCommands() + call ale#linter#Define('foobar', { + \ 'name': 'lint_file_linter', + \ 'callback': 'LintFileCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': {b -> ale#command#Run(b, 'echo', {-> ale#command#Run(b, 'echo', {-> 'foo'})})}, + \ 'read_buffer': 0, + \}) + + " Run the test commands in the shell. + let g:ale_run_synchronously_emulate_commands = 0 + +After: + Restore + + call ale#assert#TearDownLinterTest() + unlet! g:ale_run_synchronously_callbacks + +Given foobar (Some imaginary filetype): +Execute(It should be possible to compute an executable to check based on the result of commands): + AssertLinter has('win32') ? 'cmd' : 'echo', 'foo' + + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ 1, + \ len(filter(copy(b:ale_history), 'string(v:val.command) =~# ''foo''')) + +Execute(It handle the deferred command failing): + let g:ale_emulate_job_failure = 1 + + AssertLinter has('win32') ? 'cmd' : 'echo', 0 + + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ 0, + \ len(filter(copy(b:ale_history), 'string(v:val.command) =~# ''foo''')) diff --git a/dot_vim/plugged/ale/test/test_deferred_executable_string.vader b/dot_vim/plugged/ale/test/test_deferred_executable_string.vader new file mode 100644 index 0000000..3bdc525 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_deferred_executable_string.vader @@ -0,0 +1,46 @@ +Before: + Save g:ale_run_synchronously + Save g:ale_emulate_job_failure + Save g:ale_buffer_info + + let g:ale_run_synchronously = 1 + let g:ale_buffer_info = {} + let b:ale_history = [] + + call ale#linter#Reset() + call ale#assert#SetUpLinterTestCommands() + call ale#linter#Define('foobar', { + \ 'name': 'lint_file_linter', + \ 'callback': 'LintFileCallback', + \ 'executable': {b -> ale#command#Run(b, 'echo', {-> ale#command#Run(b, 'echo', {-> 'foo'})})}, + \ 'command': 'echo', + \ 'read_buffer': 0, + \}) + +After: + Restore + + call ale#assert#TearDownLinterTest() + +Given foobar (Some imaginary filetype): +Execute(It should be possible to compute an executable to check based on the result of commands): + AssertLinter 'foo', 'echo' + + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ [{'status': 0, 'job_id': 'executable', 'command': 'foo'}], + \ filter(copy(b:ale_history), 'v:val.job_id is# ''executable''') + +Execute(It handle the deferred command failing): + let g:ale_emulate_job_failure = 1 + + AssertLinter 0, 'echo' + + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ [], + \ filter(copy(b:ale_history), 'v:val.job_id is# ''executable''') diff --git a/dot_vim/plugged/ale/test/test_deno_executable_detection.vader b/dot_vim/plugged/ale/test/test_deno_executable_detection.vader new file mode 100644 index 0000000..87690bf --- /dev/null +++ b/dot_vim/plugged/ale/test/test_deno_executable_detection.vader @@ -0,0 +1,20 @@ +Before: + Save g:ale_deno_executable + runtime autoload/ale/handlers/deno.vim + +After: + unlet! b:ale_deno_executable + + call ale#linter#Reset() + +Execute(Default executable should be detected correctly): + AssertEqual + \ 'deno', + \ ale#handlers#deno#GetExecutable(bufnr('')) + +Execute(User specified executable should override default): + let g:ale_deno_executable = '/path/to/deno-bin' + AssertEqual + \ '/path/to/deno-bin', + \ ale#handlers#deno#GetExecutable(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/test_disabling_ale.vader b/dot_vim/plugged/ale/test/test_disabling_ale.vader new file mode 100644 index 0000000..6159f79 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_disabling_ale.vader @@ -0,0 +1,119 @@ +Before: + Save g:ale_buffer_info + Save g:ale_enabled + Save b:ale_enabled + Save g:ale_maximum_file_size + Save b:ale_maximum_file_size + + function! SetUpCursorData() + let g:ale_buffer_info = { + \ bufnr('%'): { + \ 'loclist': [ + \ { + \ 'lnum': 2, + \ 'col': 10, + \ 'linter_name': 'testlinter', + \ 'type': 'W', + \ 'text': 'X' + \ }, + \ ], + \ }, + \} + + call cursor(2, 16) + endfunction + + function! TestCallback(buffer, output) + return [] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': 'echo', + \ 'command': 'true', + \}) + + function GetLastMessage() + redir => l:output + silent mess + redir END + + let l:lines = split(l:output, "\n") + + return empty(l:lines) ? '' : l:lines[-1] + endfunction + + echomsg '' + +After: + Restore + call ale#linter#Reset() + delfunction TestCallback + delfunction GetLastMessage + delfunction SetUpCursorData + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(Linting shouldn't happen when ALE is disabled globally): + let g:ale_enabled = 0 + let g:ale_buffer_info = {} + + call ale#Queue(0) + + AssertEqual {}, g:ale_buffer_info + +Execute(Linting shouldn't happen when the file is too large with a global options): + let g:ale_maximum_file_size = 12 + let g:ale_buffer_info = {} + + call ale#Queue(0) + + AssertEqual {}, g:ale_buffer_info + +Execute(Linting shouldn't happen when ALE is disabled locally): + let b:ale_enabled = 0 + let g:ale_buffer_info = {} + + call ale#Queue(0) + + AssertEqual {}, g:ale_buffer_info + +Execute(Linting shouldn't happen when the file is too large with a local options): + let b:ale_maximum_file_size = 12 + let g:ale_buffer_info = {} + + call ale#Queue(0) + + AssertEqual {}, g:ale_buffer_info + +Execute(Cursor warnings shouldn't be echoed when ALE is disabled globally): + let g:ale_enabled = 0 + + call SetUpCursorData() + call ale#cursor#EchoCursorWarning() + AssertEqual '', GetLastMessage() + +Execute(Cursor warnings shouldn't be echoed when the file is too large with global options): + let g:ale_maximum_file_size = 12 + + call SetUpCursorData() + call ale#cursor#EchoCursorWarning() + AssertEqual '', GetLastMessage() + +Execute(Cursor warnings shouldn't be echoed when ALE is disabled locally): + let b:ale_enabled = 0 + + call SetUpCursorData() + call ale#cursor#EchoCursorWarning() + AssertEqual '', GetLastMessage() + +Execute(Cursor warnings shouldn't be echoed when the file is too large with local options): + let b:ale_maximum_file_size = 12 + + call SetUpCursorData() + call ale#cursor#EchoCursorWarning() + AssertEqual '', GetLastMessage() diff --git a/dot_vim/plugged/ale/test/test_dockerfile_hadolint_linter.vader b/dot_vim/plugged/ale/test/test_dockerfile_hadolint_linter.vader new file mode 100644 index 0000000..ba7e218 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_dockerfile_hadolint_linter.vader @@ -0,0 +1,106 @@ +" NOTE: We use the 'b:' forms below to ensure that we're properly using +" ale#Var() + +Given dockerfile: + # + +Before: + Save g:ale_dockerfile_hadolint_use_docker + Save g:ale_dockerfile_hadolint_docker_image + silent! unlet g:ale_dockerfile_hadolint_use_docker + silent! unlet g:ale_dockerfile_hadolint_docker_image + + " enable loading inside test container + silent! cd /testplugin + source ale_linters/dockerfile/hadolint.vim + + +After: + Restore + silent! unlet b:ale_dockerfile_hadolint_use_docker + silent! unlet b:ale_dockerfile_hadolint_docker_image + silent! unlet b:ale_dockerfile_hadolint_options + + +Execute(linter honors ..._use_docker correctly): + + " default: never + AssertEqual + \ 'hadolint', + \ ale_linters#dockerfile#hadolint#GetExecutable(bufnr('')) + + " explicit never + let b:ale_dockerfile_hadolint_use_docker = 'never' + AssertEqual + \ 'hadolint', + \ ale_linters#dockerfile#hadolint#GetExecutable(bufnr('')) + + let b:ale_dockerfile_hadolint_use_docker = 'always' + AssertEqual + \ 'docker', + \ ale_linters#dockerfile#hadolint#GetExecutable(bufnr('')) + + " hadolint if present, otherwise docker + let command = 'docker' + if executable('hadolint') + let command = 'hadolint' + endif + + let b:ale_dockerfile_hadolint_use_docker = 'yes' + AssertEqual + \ command, + \ ale_linters#dockerfile#hadolint#GetExecutable(bufnr('')) + + +Execute(command is correct when using docker): + let b:ale_dockerfile_hadolint_use_docker = 'always' + + AssertEqual + \ "docker run --rm -i hadolint/hadolint hadolint --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) + +Execute(command is correct when using docker and supplying options): + let b:ale_dockerfile_hadolint_use_docker = 'always' + let b:ale_dockerfile_hadolint_options = '--ignore DL3006' + + AssertEqual + \ "docker run --rm -i hadolint/hadolint hadolint --ignore DL3006 --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) + +Execute(command is correct when not docker): + let b:ale_dockerfile_hadolint_use_docker = 'never' + + AssertEqual + \ "hadolint --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) + +Execute(command is correct when not docker and supplying options): + let b:ale_dockerfile_hadolint_use_docker = 'never' + let b:ale_dockerfile_hadolint_options = '--ignore DL3006' + + AssertEqual + \ "hadolint --ignore DL3006 --no-color -", + \ ale_linters#dockerfile#hadolint#GetCommand(bufnr('')) + +Execute(test warnings from hadolint): + AssertEqual + \ [{'lnum': 10, 'col': 0, 'type': 'W', 'code': 'DL3007', 'text': 'DL3007: Using latest is prone to errors', 'detail': "DL3007 ( https://github.com/hadolint/hadolint/wiki/DL3007 )\n\nUsing latest is prone to errors"}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '-:10 DL3007 warning: Using latest is prone to errors', + \ ]) + +Execute(test warnings from shellcheck): + AssertEqual + \ [{'lnum': 3, 'col': 0, 'type': 'W', 'code': 'SC2154', 'text': 'SC2154: bar is referenced but not assigned.', 'detail': "SC2154 ( https://github.com/koalaman/shellcheck/wiki/SC2154 )\n\nbar is referenced but not assigned."}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ '-:3 SC2154 warning: bar is referenced but not assigned.', + \ ]) + +Execute(test errors from dockerfile parser): + AssertEqual + \ [{'lnum': 3, 'col': 4, 'type': 'E', 'text': 'unexpected "A" expecting at least one space after ''RUN''', 'detail': 'hadolint could not parse the file because of a syntax error.'}], + \ ale_linters#dockerfile#hadolint#Handle(bufnr(''), [ + \ "/dev/stdin:3:4 unexpected \"A\" expecting at least one space after 'RUN'", + \ ]) + +" fin... diff --git a/dot_vim/plugged/ale/test/test_env_function.vader b/dot_vim/plugged/ale/test/test_env_function.vader new file mode 100644 index 0000000..856a3f5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_env_function.vader @@ -0,0 +1,8 @@ +Execute(ale#Env should produce the correct syntax): + if has('win32') + AssertEqual 'set name=xxx && ', ale#Env('name', 'xxx') + AssertEqual 'set name="foo bar" && ', ale#Env('name', 'foo bar') + else + AssertEqual 'name=''xxx'' ', ale#Env('name', 'xxx') + AssertEqual 'name=''foo bar'' ', ale#Env('name', 'foo bar') + endif diff --git a/dot_vim/plugged/ale/test/test_errors_removed_after_filetype_changed.vader b/dot_vim/plugged/ale/test/test_errors_removed_after_filetype_changed.vader new file mode 100644 index 0000000..7c6c55a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_errors_removed_after_filetype_changed.vader @@ -0,0 +1,78 @@ +Before: + Save &filetype + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + + let g:ale_buffer_info = {} + + " Enable only the one feature we need. + let g:ale_set_signs = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 1 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + call setloclist(0, []) + + noautocmd let &filetype = 'foobar' + + function! TestCallback(buffer, output) + return [{'text': 'x', 'lnum': 1}] + endfunction + + call ale#linter#PreventLoading('foobar') + call ale#linter#Define('foobar', { + \ 'name': 'buffer_linter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd': 'true', + \ 'command': 'true', + \ 'read_buffer': 0, + \}) + call ale#linter#PreventLoading('foobar2') + call ale#linter#Define('foobar2', { + \ 'name': 'buffer_linter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd': 'true', + \ 'command': 'true', + \ 'read_buffer': 0, + \}) + +After: + Restore + + unlet! g:ale_run_synchronously_callbacks + delfunction TestCallback + + call ale#linter#Reset() + call setloclist(0, []) + +Execute(Error should be removed when the filetype changes to something else we cannot check): + call ale#Queue(0) + call ale#test#FlushJobs() + sleep 1ms + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) + + noautocmd let &filetype = 'foobar2' + + call ale#Queue(0) + call ale#test#FlushJobs() + sleep 1ms + + " We should get some items from the second filetype. + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) + + noautocmd let &filetype = 'xxx' + + call ale#Queue(0) + call ale#test#FlushJobs() + sleep 1ms + + AssertEqual 0, len(ale#test#GetLoclistWithoutNewerKeys()) diff --git a/dot_vim/plugged/ale/test/test_filename_mapping.vader b/dot_vim/plugged/ale/test/test_filename_mapping.vader new file mode 100644 index 0000000..e9af539 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_filename_mapping.vader @@ -0,0 +1,62 @@ +Before: + Save g:ale_filename_mappings + Save b:ale_filename_mappings + + let g:ale_filename_mappings = {} + unlet! b:ale_filename_mappings + +After: + Restore + +Execute(ale#GetFilenameMappings should return the correct mappings for given linters/fixers): + let g:ale_filename_mappings = {'a': [['foo', 'bar']], 'b': [['baz', 'foo']]} + + AssertEqual [['foo', 'bar']], ale#GetFilenameMappings(bufnr(''), 'a') + AssertEqual [['baz', 'foo']], ale#GetFilenameMappings(bufnr(''), 'b') + AssertEqual [], ale#GetFilenameMappings(bufnr(''), 'c') + + let b:ale_filename_mappings = {'b': [['abc', 'xyz']]} + + AssertEqual [], ale#GetFilenameMappings(bufnr(''), 'a') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), 'b') + AssertEqual [], ale#GetFilenameMappings(bufnr(''), 'c') + +Execute(ale#GetFilenameMappings should return Lists set for use with all tools): + let g:ale_filename_mappings = [['foo', 'bar']] + + AssertEqual [['foo', 'bar']], ale#GetFilenameMappings(bufnr(''), 'a') + AssertEqual [['foo', 'bar']], ale#GetFilenameMappings(bufnr(''), '') + AssertEqual [['foo', 'bar']], ale#GetFilenameMappings(bufnr(''), v:null) + + let b:ale_filename_mappings = [['abc', 'xyz']] + + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), 'a') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), '') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), v:null) + +Execute(ale#GetFilenameMappings should let you use * as a fallback): + let g:ale_filename_mappings = {'a': [['foo', 'bar']], '*': [['abc', 'xyz']]} + + AssertEqual [['foo', 'bar']], ale#GetFilenameMappings(bufnr(''), 'a') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), 'b') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), '') + AssertEqual [['abc', 'xyz']], ale#GetFilenameMappings(bufnr(''), v:null) + +Execute(ale#filename_mapping#Invert should invert filename mappings): + AssertEqual + \ [['b', 'a'], ['y', 'x']], + \ ale#filename_mapping#Invert([['a', 'b'], ['x', 'y']]) + \ +Execute(ale#filename_mapping#Map return the filename as-is if there are no mappings): + AssertEqual + \ '/foo//bar', + \ ale#filename_mapping#Map('/foo//bar', [['/bar', '/data/']]) + +Execute(ale#filename_mapping#Map should map filenames): + AssertEqual + \ '/data/bar', + \ ale#filename_mapping#Map('/foo//bar', [ + \ ['/data/', '/baz/'], + \ ['/foo/', '/data/'], + \ ['/foo/', '/xyz/'], + \ ]) diff --git a/dot_vim/plugged/ale/test/test_filerename.vader b/dot_vim/plugged/ale/test/test_filerename.vader new file mode 100644 index 0000000..c91b355 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_filerename.vader @@ -0,0 +1,224 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:handle_code_action_called = 0 + let g:code_actions = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/filerename.vim + runtime autoload/ale/code_action.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + let g:handle_code_action_called = 1 + Assert get(a:options, 'should_save') + call add(g:code_actions, a:code_action) + endfunction + + function! ale#util#Input(message, value, completion) abort + return 'a-new-name' + endfunction + + call ale#filerename#SetMap({ + \ 3: { + \ 'old_name': 'oldName', + \ 'new_name': 'aNewName', + \ }, + \}) + +After: + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#filerename#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:code_actions + unlet! g:handle_code_action_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/filerename.vim + runtime autoload/ale/code_action.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#filerename#HandleTSServerResponse(1, {'command': 'foo'}) + AssertEqual g:handle_code_action_called, 0 + +Execute(Failed file rename responses should be handled correctly): + call ale#filerename#SetMap({3: {'old_name': 'oldName', 'new_name': 'a-test'}}) + call ale#filerename#HandleTSServerResponse( + \ 1, + \ {'command': 'getEditsForFileRename', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Code actions from tsserver should be handled): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'seq': 0, + \ 'request_seq': 3, + \ 'type': 'response', + \ 'success': v:true, + \ 'body': [ + \ { + \ 'fileName': '/foo/bar/file1.tsx', + \ 'textChanges': [ + \ { + \ 'end': {'offset': 55, 'line': 22}, + \ 'newText': './file2', + \ 'start': {'offset': 34, 'line': 22}, + \ } + \ ] + \ } + \ ], + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'filerename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.tsx', + \ 'textChanges': [ + \ { + \ 'end': {'offset': 55, 'line': 22}, + \ 'newText': './file2', + \ 'start': {'offset': 34, 'line': 22}, + \ } + \ ] + \ } + \ ], + \ } + \ ], + \ g:code_actions + +Execute(HandleTSServerResponse does nothing when no data in filerename_map): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': -9, + \ 'success': v:true, + \ 'body': {} + \}) + + AssertEqual g:handle_code_action_called, 0 + +Execute(Prints a tsserver error message when unsuccessful): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': 3, + \ 'success': v:false, + \ 'message': 'This file cannot be renamed', + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''Error renaming file "oldName" to "aNewName". ' . + \ 'Reason: This file cannot be renamed'''], g:expr_list + +Execute(Does nothing when no changes): + call ale#filerename#HandleTSServerResponse(1, { + \ 'command': 'getEditsForFileRename', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [], + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No changes while renaming "oldName" to "aNewName"'''], g:expr_list + +Execute(tsserver file rename requests should be sent): + call ale#filerename#SetMap({}) + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFileRename + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'filerename', g:capability_checked + AssertEqual + \ 'function(''ale#filerename#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@getEditsForFileRename', { + \ 'oldFilePath': expand('%:p'), + \ 'newFilePath': 'a-new-name', + \ }] + \ ], + \ g:message_list + AssertEqual {'42': {'old_name': expand('%:p'), 'new_name': 'a-new-name'}}, + \ ale#filerename#GetMap() diff --git a/dot_vim/plugged/ale/test/test_filetype_linter_defaults.vader b/dot_vim/plugged/ale/test/test_filetype_linter_defaults.vader new file mode 100644 index 0000000..ca73a8e --- /dev/null +++ b/dot_vim/plugged/ale/test/test_filetype_linter_defaults.vader @@ -0,0 +1,137 @@ +Before: + Save g:ale_linters + Save g:ale_linters_explicit + + let g:ale_linters_explicit = 0 + let g:ale_linters = {} + + function! GetLinterNames(filetype) abort + return sort(map(ale#linter#Get(a:filetype), 'v:val.name')) + endfunction + +After: + Restore + + call ale#linter#Reset() + +Execute(The defaults for the apkbuild filetype should be correct): + AssertEqual ['apkbuild_lint', 'secfixes_check'], GetLinterNames('apkbuild') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('apkbuild') + +Execute(The defaults for the csh filetype should be correct): + AssertEqual ['shell'], GetLinterNames('csh') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('csh') + +Execute(The defaults for the elixir filetype should be correct): + AssertEqual ['credo', 'dialyxir', 'dogma'], GetLinterNames('elixir') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('elixir') + +Execute(The defaults for the go filetype should be correct): + AssertEqual ['gofmt', 'golint', 'gopls', 'govet'], GetLinterNames('go') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('go') + +Execute(The defaults for the hack filetype should be correct): + AssertEqual ['hack'], GetLinterNames('hack') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('hack') + +Execute(The defaults for the help filetype should be correct): + AssertEqual [], GetLinterNames('help') + +Execute(The defaults for the inko filetype should be correct): + AssertEqual ['inko'], GetLinterNames('inko') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('inko') + +Execute(The defaults for the json filetype should be correct): + AssertEqual ['jsonlint', 'spectral', 'vscodejson'], GetLinterNames('json') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('json') + +Execute(The defaults for the json5 filetype should be correct): + AssertEqual [], GetLinterNames('json5') + +Execute(The defaults for the jsonc filetype should be correct): + AssertEqual [], GetLinterNames('jsonc') + +Execute(The defaults for the perl filetype should be correct): + AssertEqual ['perlcritic'], GetLinterNames('perl') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('perl') + +Execute(The defaults for the perl6 filetype should be correct): + AssertEqual [], GetLinterNames('perl6') + +Execute(The defaults for the python filetype should be correct): + AssertEqual ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], GetLinterNames('python') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('python') + +Execute(The defaults for the rust filetype should be correct): + AssertEqual ['cargo', 'rls'], GetLinterNames('rust') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('rust') + +Execute(The defaults for the spec filetype should be correct): + AssertEqual [], GetLinterNames('spec') + +Execute(The defaults for the text filetype should be correct): + AssertEqual [], GetLinterNames('text') + +Execute(The defaults for the vue filetype should be correct): + AssertEqual ['eslint', 'vls'], GetLinterNames('vue') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('vue') + +Execute(The defaults for the zsh filetype should be correct): + AssertEqual ['shell'], GetLinterNames('zsh') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('zsh') + +Execute(The defaults for the verilog filetype should be correct): + " This filetype isn't configured with default, so we can test loading all + " available linters with this. + AssertEqual ['hdl-checker', 'iverilog', 'verilator', 'vlog', 'xvlog', 'yosys'], GetLinterNames('verilog') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('verilog') + +Execute(The defaults for the vader filetype should be correct): + AssertEqual ['vimls'], GetLinterNames('vader') + + let g:ale_linters_explicit = 1 + + AssertEqual [], GetLinterNames('vader') + +Execute(Default aliases for React should be defined): + AssertEqual ['javascript', 'jsx'], ale#linter#ResolveFiletype('javascriptreact') + AssertEqual ['typescript', 'tsx'], ale#linter#ResolveFiletype('typescriptreact') diff --git a/dot_vim/plugged/ale/test/test_filetype_mapping.vader b/dot_vim/plugged/ale/test/test_filetype_mapping.vader new file mode 100644 index 0000000..2d72491 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_filetype_mapping.vader @@ -0,0 +1,29 @@ +Before: + augroup TestFiletypeGroup + autocmd! + autocmd BufEnter,BufRead *.x setf xfiletype + autocmd BufEnter,BufRead *.y set filetype=yfiletype + autocmd BufEnter,BufRead *.z setlocal filetype=zfiletype + autocmd BufEnter,BufRead *.jsx set filetype=javascript.jsx + augroup END + +After: + unlet! g:map + augroup TestFiletypeGroup + autocmd! + augroup END + augroup! TestFiletypeGroup + +Execute(ALE should parse autocmd filetypes correctly): + let g:map = ale#filetypes#LoadExtensionMap() + + AssertEqual '.x', g:map['xfiletype'] + AssertEqual '.y', g:map['yfiletype'] + AssertEqual '.z', g:map['zfiletype'] + AssertEqual '.jsx', g:map['javascript.jsx'] + +Execute(ALE should guess file extensions appropriately): + " The whole string should be used, if there's a match. + AssertEqual '.jsx', ale#filetypes#GuessExtension('javascript.jsx') + " The first part should be used. + AssertEqual '.x', ale#filetypes#GuessExtension('xfiletype.yfiletype') diff --git a/dot_vim/plugged/ale/test/test_find_nearest_directory.vader b/dot_vim/plugged/ale/test/test_find_nearest_directory.vader new file mode 100644 index 0000000..740668d --- /dev/null +++ b/dot_vim/plugged/ale/test/test_find_nearest_directory.vader @@ -0,0 +1,17 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(We should be able to find a directory some directory down): + call ale#test#SetFilename('test-files/top/middle/bottom/dummy.txt') + + AssertEqual + \ ale#path#Simplify(expand('%:p:h:h:h:h:h') . '/test-files/top/ale-special-directory-name-dont-use-this-please/'), + \ ale#path#FindNearestDirectory(bufnr('%'), 'ale-special-directory-name-dont-use-this-please') + +Execute(We shouldn't find anything for files which don't match): + AssertEqual + \ '', + \ ale#path#FindNearestDirectory(bufnr('%'), 'ale-this-should-never-match-anything') diff --git a/dot_vim/plugged/ale/test/test_find_references.vader b/dot_vim/plugged/ale/test/test_find_references.vader new file mode 100644 index 0000000..01c1546 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_find_references.vader @@ -0,0 +1,480 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + Save g:ale_default_navigation + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:preview_called = 0 + let g:item_list = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + let g:ale_default_navigation = 'buffer' + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/preview.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#preview#ShowSelection(item_list, options) abort + let g:preview_called = 1 + let g:item_list = a:item_list + let g:options = a:options + + call ale#preview#SetLastSelection(a:item_list, a:options) + endfunction + +After: + Restore + + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#references#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:item_list + unlet! g:preview_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/preview.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#references#HandleTSServerResponse(1, {'command': 'foo'}) + +Execute(Failed reference responses should be handled correctly): + call ale#references#SetMap({3: {}}) + call ale#references#HandleTSServerResponse( + \ 1, + \ {'command': 'references', 'request_seq': 3} + \) + AssertEqual {}, ale#references#GetMap() + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Results should be shown for tsserver responses): + " We should remember these options when we repeat the selection. + call ale#references#SetMap( + \ { + \ 3: { + \ 'ignorethis': 'x', + \ 'open_in': 'tab', + \ 'use_relative_paths': 1, + \ } + \ } + \) + call ale#references#HandleTSServerResponse(1, { + \ 'command': 'references', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'symbolStartOffset': 9, + \ 'refs': [ + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:true, + \ 'lineText': 'import {doSomething} from ''./whatever''', + \ 'end': {'offset': 24, 'line': 9}, + \ 'start': {'offset': 9, 'line': 9}, + \ 'isDefinition': v:true, + \ }, + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 804}, + \ 'start': {'offset': 3, 'line': 804}, + \ 'isDefinition': v:false, + \ }, + \ { + \ 'file': '/foo/bar/other/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 51}, + \ 'start': {'offset': 3, 'line': 51}, + \ 'isDefinition': v:false, + \ }, + \ ], + \ 'symbolDisplayString': 'import doSomething', + \ 'symbolName': 'doSomething()', + \ }, + \}) + + AssertEqual + \ [ + \ {'filename': '/foo/bar/app.ts', 'column': 9, 'line': 9, 'match': 'import {doSomething} from ''./whatever'''}, + \ {'filename': '/foo/bar/app.ts', 'column': 3, 'line': 804, 'match': 'doSomething()'}, + \ {'filename': '/foo/bar/other/app.ts', 'column': 3, 'line': 51, 'match': 'doSomething()'}, + \ ], + \ g:item_list + AssertEqual {}, ale#references#GetMap() + + " We should be able to repeat selections with ALERepeatSelection + let g:item_list = [] + ALERepeatSelection + + AssertEqual + \ [ + \ {'filename': '/foo/bar/app.ts', 'column': 9, 'line': 9, 'match': 'import {doSomething} from ''./whatever'''}, + \ {'filename': '/foo/bar/app.ts', 'column': 3, 'line': 804, 'match': 'doSomething()'}, + \ {'filename': '/foo/bar/other/app.ts', 'column': 3, 'line': 51, 'match': 'doSomething()'}, + \ ], + \ g:item_list + AssertEqual {}, ale#references#GetMap() + AssertEqual + \ { + \ 'open_in': 'tab', + \ 'use_relative_paths': 1, + \ }, + \ g:options + +Execute(Results should be put to quickfix for tsserver responses): + call ale#references#SetMap( + \ { + \ 3: { + \ 'ignorethis': 'x', + \ 'open_in': 'quickfix', + \ } + \ } + \) + call ale#references#HandleTSServerResponse(1, { + \ 'command': 'references', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'symbolStartOffset': 9, + \ 'refs': [ + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:true, + \ 'lineText': 'import {doSomething} from ''./whatever''', + \ 'end': {'offset': 24, 'line': 9}, + \ 'start': {'offset': 9, 'line': 9}, + \ 'isDefinition': v:true, + \ }, + \ { + \ 'file': '/foo/bar/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 804}, + \ 'start': {'offset': 3, 'line': 804}, + \ 'isDefinition': v:false, + \ }, + \ { + \ 'file': '/foo/bar/other/app.ts', + \ 'isWriteAccess': v:false, + \ 'lineText': ' doSomething()', + \ 'end': {'offset': 18, 'line': 51}, + \ 'start': {'offset': 3, 'line': 51}, + \ 'isDefinition': v:false, + \ }, + \ ], + \ 'symbolDisplayString': 'import doSomething', + \ 'symbolName': 'doSomething()', + \ }, + \}) + + AssertEqual + \ 3, + \ len(getqflist()) + AssertEqual {}, ale#references#GetMap() + +Execute(The preview window should not be opened for empty tsserver responses): + call ale#references#SetMap({3: {}}) + call ale#references#HandleTSServerResponse(1, { + \ 'command': 'references', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'symbolStartOffset': 9, + \ 'refs': [ + \ ], + \ 'symbolDisplayString': 'import doSomething', + \ 'symbolName': 'doSomething()', + \ }, + \}) + + Assert !g:preview_called + AssertEqual {}, ale#references#GetMap() + AssertEqual ['echom ''No references found.'''], g:expr_list + +Execute(tsserver reference requests should be sent): + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'references', g:capability_checked + AssertEqual + \ 'function(''ale#references#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@references', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'current-buffer', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute('-relative' argument should enable 'use_relative_paths' in HandleTSServerResponse): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -relative + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'current-buffer', 'use_relative_paths': 1}}, ale#references#GetMap() + +Execute(`-tab` should display results in tabs): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -tab + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'tab', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute(The default navigation type should be used): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + let g:ale_default_navigation = 'tab' + ALEFindReferences + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'tab', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute(`-split` should display results in splits): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -split + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'split', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute(`-vsplit` should display results in vsplits): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -vsplit + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'vsplit', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute(`-quickfix` should display results in quickfix): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEFindReferences -quickfix + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'quickfix', 'use_relative_paths': 0}}, ale#references#GetMap() + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(LSP reference responses should be handled): + call ale#references#SetMap({3: {}}) + call ale#references#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'range': { + \ 'start': {'line': 7, 'character': 15}, + \ }, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'line': 3, + \ 'column': 8, + \ }, + \ { + \ 'filename': ale#path#Simplify(g:dir . '/other_file'), + \ 'line': 8, + \ 'column': 16, + \ }, + \ ], + \ g:item_list + AssertEqual {}, ale#references#GetMap() + +Execute(LSP reference responses should be put to quickfix): + call ale#references#SetMap({3: { 'open_in': 'quickfix' }}) + call ale#references#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'range': { + \ 'start': {'line': 7, 'character': 15}, + \ }, + \ }, + \ ], + \ } + \) + + AssertEqual + \ 2, + \ len(getqflist()) + +Execute(Preview windows should not be opened for empty LSP reference responses): + call ale#references#SetMap({3: {}}) + call ale#references#HandleLSPResponse(1, {'id': 3, 'result': []}) + + Assert !g:preview_called + AssertEqual {}, ale#references#GetMap() + AssertEqual ['echom ''No references found.'''], g:expr_list + +Execute(LSP reference responses with a null result should be handled): + call ale#references#SetMap({3: {}}) + call ale#references#HandleLSPResponse(1, {'id': 3, 'result': v:null}) + + Assert !g:preview_called + AssertEqual {}, ale#references#GetMap() + AssertEqual ['echom ''No references found.'''], g:expr_list + +Execute(LSP reference requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEFindReferences + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'references', g:capability_checked + AssertEqual + \ 'function(''ale#references#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/references', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ 'context': {'includeDeclaration': v:false}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'current-buffer', 'use_relative_paths': 0}}, ale#references#GetMap() + +Execute('-relative' argument should enable 'use_relative_paths' in HandleLSPResponse): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEFindReferences -relative + + call g:InitCallback() + + AssertEqual {'42': {'open_in': 'current-buffer', 'use_relative_paths': 1}}, ale#references#GetMap() diff --git a/dot_vim/plugged/ale/test/test_floating_preview.vader b/dot_vim/plugged/ale/test/test_floating_preview.vader new file mode 100644 index 0000000..4341555 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_floating_preview.vader @@ -0,0 +1,92 @@ +Before: + let g:ale_floating_preview = 0 + let g:ale_hover_to_floating_preview = 0 + let g:ale_detail_to_floating_preview = 0 + + runtime autoload/ale/floating_preview.vim + + let g:floated_lines = [] + let g:floating_preview_show_called = 0 + + " Stub out so we can track the call + function! ale#floating_preview#Show(lines, ...) abort + let g:floating_preview_show_called = 1 + let g:floated_lines = a:lines + endfunction + + let g:ale_buffer_info = { + \ bufnr('%'): { + \ 'loclist': [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'notalinter', + \ 'nr': -1, + \ 'type': 'E', + \ 'code': 'semi', + \ 'text': "Missing semicolon.\r", + \ 'detail': "Every statement should end with a semicolon\nsecond line", + \ }, + \ ], + \ } + \} + + call ale#linter#Reset() + call ale#linter#PreventLoading('javascript') + +After: + Restore + + let g:ale_floating_preview = 0 + let g:ale_hover_to_floating_preview = 0 + let g:ale_detail_to_floating_preview = 0 + + call cursor(1, 1) + + let g:ale_buffer_info = {} + + " Close the preview window if it's open. + if &filetype is# 'ale-preview' + noautocmd :q! + endif + + call ale#linter#Reset() + + +Given javascript(A file with warnings/errors): + var x = 3 + 12345678 + var x = 5*2 + parseInt("10"); + // comment + +Execute(Floating preview is used with ALEDetail when g:ale_floating_preview set): + let g:ale_floating_preview = 1 + + call cursor(1, 10) + + ALEDetail + + let expected = ["Every statement should end with a semicolon", "second line"] + + AssertEqual 1, g:floating_preview_show_called + AssertEqual expected, g:floated_lines + +Execute(Floating preview is used with ALEDetail when g:ale_detail_to_floating_preview set): + let g:ale_detail_to_floating_preview = 1 + + call cursor(1, 10) + + ALEDetail + + let expected = ["Every statement should end with a semicolon", "second line"] + + AssertEqual 1, g:floating_preview_show_called + AssertEqual expected, g:floated_lines + +Execute(Floating preview is not used with ALEDetail by default): + call cursor(1, 10) + + ALEDetail + + AssertEqual 0, g:floating_preview_show_called diff --git a/dot_vim/plugged/ale/test/test_format_command.vader b/dot_vim/plugged/ale/test/test_format_command.vader new file mode 100644 index 0000000..3b7ee98 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_format_command.vader @@ -0,0 +1,186 @@ +Before: + silent! cd /testplugin/test + silent file top/middle/bottom/dummy.txt + + function! CheckTempFile(filename) abort + " Check every part of the temporary filename, except the random part. + AssertEqual fnamemodify(tempname(), ':h'), fnamemodify(a:filename, ':h:h') + AssertEqual 'dummy.txt', fnamemodify(a:filename, ':t') + endfunction + + runtime autoload/ale/command.vim + + function! ale#command#CreateTempFile(buffer, temporary_file, input) abort + return !empty(a:temporary_file) + endfunction + +After: + unlet! g:result + unlet! g:match + + delfunction CheckTempFile + + runtime autoload/ale/command.vim + +Execute(FormatCommand should do nothing to basic command strings): + AssertEqual + \ ['', 'awesome-linter do something', 0], + \ ale#command#FormatCommand(bufnr('%'), '', 'awesome-linter do something', 0, v:null, v:null, []) + +Execute(FormatCommand should handle %%, and ignore other percents): + AssertEqual + \ ['', '% %%d %%f %x %', 0], + \ ale#command#FormatCommand(bufnr('%'), '', '%% %%%d %%%f %x %', 0, v:null, v:null, []) + +Execute(FormatCommand should convert %s to the current filename): + AssertEqual + \ [ + \ '', + \ 'foo ' . ale#Escape(expand('%:p')) . ' bar ' . ale#Escape(expand('%:p')), + \ 0, + \ ], + \ ale#command#FormatCommand(bufnr('%'), '', 'foo %s bar %s', 0, v:null, v:null, []) + +Execute(FormatCommand should convert %t to a new temporary filename): + let g:result = ale#command#FormatCommand(bufnr('%'), '', 'foo %t bar %t', 0, v:null, v:null, []) + + call CheckTempFile(g:result[0]) + + let g:match = matchlist(g:result[1], '\v^foo (.*) bar (.*)$') + + Assert !empty(g:match), 'No match found! Result was: ' . g:result[1] + " The first item of the result should be a temporary filename, and it should + " be the same as the escaped name in the command string. + AssertEqual ale#Escape(g:result[0]), g:match[1] + " The two temporary filenames formatted in should be the same. + AssertEqual g:match[1], g:match[2] + +Execute(FormatCommand should not convert %t to a new temporary filename when the input is given as v:false): + let g:result = ale#command#FormatCommand(bufnr('%'), '', 'foo %t bar %t', 0, v:false, v:null, []) + + AssertEqual ['', 'foo %t bar %t', 0], g:result + +Execute(FormatCommand should signal that files are created when temporary files are needed): + AssertEqual + \ 1, + \ ale#command#FormatCommand(bufnr('%'), '', 'foo %t', 0, v:null, v:null, [])[2] + + AssertEqual + \ 0, + \ ale#command#FormatCommand(bufnr('%'), '', 'foo %s', 0, v:null, v:null, [])[2] + +Execute(FormatCommand should let you combine %s and %t): + let g:result = ale#command#FormatCommand(bufnr('%'), '', 'foo %t bar %s', 0, v:null, v:null, []) + + call CheckTempFile(g:result[0]) + + let g:match = matchlist(g:result[1], '\v^foo (.*) bar (.*)$') + + Assert !empty(g:match), 'No match found! Result was: ' . g:result[1] + " The first item of the result should be a temporary filename, and it should + " be the same as the escaped name in the command string. + AssertEqual ale#Escape(g:result[0]), g:match[1] + " The second item should be equal to the original filename. + AssertEqual ale#Escape(expand('%:p')), g:match[2] + +Execute(FormatCommand should replace %e with the escaped executable): + if has('win32') + AssertEqual + \ ['', 'foo foo', 0], + \ ale#command#FormatCommand(bufnr('%'), 'foo', '%e %e', 0, v:null, v:null, []) + AssertEqual + \ ['', '"foo bar"', 0], + \ ale#command#FormatCommand(bufnr('%'), 'foo bar', '%e', 0, v:null, v:null, []) + AssertEqual + \ ['', '%e %e', 0], + \ ale#command#FormatCommand(bufnr('%'), '', '%e %e', 0, v:null, v:null, []) + else + AssertEqual + \ ['', '''foo'' ''foo''', 0], + \ ale#command#FormatCommand(bufnr('%'), 'foo', '%e %e', 0, v:null, v:null, []) + AssertEqual + \ ['', '''foo bar''', 0], + \ ale#command#FormatCommand(bufnr('%'), 'foo bar', '%e', 0, v:null, v:null, []) + AssertEqual + \ ['', '%e %e', 0], + \ ale#command#FormatCommand(bufnr('%'), '', '%e %e', 0, v:null, v:null, []) + endif + +Execute(EscapeCommandPart should escape all percent signs): + AssertEqual '%%s %%t %%%% %%s %%t %%%%', ale#engine#EscapeCommandPart('%s %t %% %s %t %%') + +Execute(EscapeCommandPart should pipe in temporary files appropriately): + let g:result = ale#command#FormatCommand(bufnr('%'), '', 'foo bar', 1, v:null, v:null, []) + + call CheckTempFile(g:result[0]) + + let g:match = matchlist(g:result[1], '\v^foo bar \< (.*)$') + Assert !empty(g:match), 'No match found! Result was: ' . g:result[1] + AssertEqual ale#Escape(g:result[0]), g:match[1] + + let g:result = ale#command#FormatCommand(bufnr('%'), '', 'foo bar %t', 1, v:null, v:null, []) + + call CheckTempFile(g:result[0]) + + let g:match = matchlist(g:result[1], '\v^foo bar (.*)$') + Assert !empty(g:match), 'No match found! Result was: ' . g:result[1] + AssertEqual ale#Escape(g:result[0]), g:match[1] + +Execute(FormatCommand should apply filename modifiers to the current file): + AssertEqual + \ ale#Escape(expand('%:p:h')) + \ . ' ' . ale#Escape('dummy.txt') + \ . ' ' . ale#Escape(expand('%:p:h:t')) + \ . ' ' . ale#Escape('txt') + \ . ' ' . ale#Escape(expand('%:p:r')), + \ ale#command#FormatCommand(bufnr(''), '', '%s:h %s:t %s:h:t %s:e %s:r', 0, v:null, v:null, [])[1] + +Execute(FormatCommand should apply filename modifiers to the temporary file): + let g:result = ale#command#FormatCommand(bufnr(''), '', '%t:h %t:t %t:h:t %t:e %t:r', 0, v:null, v:null, []) + + AssertEqual + \ ale#Escape(fnamemodify(g:result[0], ':h')) + \ . ' ' . ale#Escape('dummy.txt') + \ . ' ' . ale#Escape(fnamemodify(g:result[0], ':h:t')) + \ . ' ' . ale#Escape('txt') + \ . ' ' . ale#Escape(fnamemodify(g:result[0], ':r')), + \ g:result[1] + +Execute(FormatCommand should apply filename mappings the current file): + let g:result = ale#command#FormatCommand(bufnr('%'), '', '%s', 0, v:null, v:null, [ + \ [expand('%:p:h'), '/foo/bar'], + \]) + + Assert g:result[1] =~# '/foo/bar' + +Execute(FormatCommand should apply filename mappings to temporary files): + let g:result = ale#command#FormatCommand(bufnr('%'), '', '%t', 0, v:null, v:null, [ + \ [fnamemodify(tempname(), ':h:h'), '/foo/bar'] + \]) + + Assert g:result[1] =~# '/foo/bar' + +Execute(FormatCommand should apply filename modifiers to mapped filenames): + let g:result = ale#command#FormatCommand(bufnr('%'), '', '%s:h', 0, v:null, v:null, [ + \ [expand('%:p:h'), '/foo/bar'], + \]) + + AssertEqual ale#Escape('/foo/bar'), g:result[1] + + let g:result = ale#command#FormatCommand(bufnr('%'), '', '%t:h:h:h', 0, v:null, v:null, [ + \ [fnamemodify(tempname(), ':h:h'), '/foo/bar'] + \]) + + AssertEqual ale#Escape('/foo/bar'), g:result[1] + +Execute(FormatCommand should apply regular cwd paths): + AssertEqual + \ 'cd ' . (has('unix') ? '' : '/d ') . ale#Escape('/foo /bar') . ' && abc', + \ ale#command#FormatCommand(bufnr('%'), '', 'abc', 0, v:null, '/foo /bar', [])[1] + \ +Execute(FormatCommand should apply cwd substitution and formatting): + call ale#test#SetFilename('foo.txt') + + AssertEqual + \ 'cd ' . (has('unix') ? '' : '/d ') . ale#Escape(getcwd()) . ' && abc', + \ ale#command#FormatCommand(bufnr('%'), '', 'abc', 0, v:null, '%s:h', [])[1] diff --git a/dot_vim/plugged/ale/test/test_format_temporary_file_creation.vader b/dot_vim/plugged/ale/test/test_format_temporary_file_creation.vader new file mode 100644 index 0000000..1040940 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_format_temporary_file_creation.vader @@ -0,0 +1,63 @@ +Before: + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_enabled + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + + " Disable the features we don't need to check. + let g:ale_buffer_info = {} + let g:ale_echo_cursor = 0 + let g:ale_enabled = 1 + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + let g:ale_set_highlights = 0 + let g:ale_set_loclist = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_signs = 0 + + let g:output = [] + + function! TestCallback(buffer, output) + " Extract just letters from the output. + let g:output = filter( + \ map(a:output, 'matchstr(v:val, ''[a-zA-Z]\+'')'), + \ '!empty(v:val)' + \) + + return [] + endfunction + + call ale#linter#PreventLoading('foobar') + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'cat', + \ 'command': has('win32') ? 'type %t' : 'cat %t', + \}) + +After: + Restore + + unlet! g:ale_run_synchronously_callbacks + unlet! g:output + delfunction TestCallback + + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALE should be able to read the %t file): + AssertEqual 'foobar', &filetype + + ALELint + call ale#test#FlushJobs() + + AssertEqual ['foo', 'bar', 'baz'], g:output diff --git a/dot_vim/plugged/ale/test/test_function_arg_count.vader b/dot_vim/plugged/ale/test/test_function_arg_count.vader new file mode 100644 index 0000000..d256c40 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_function_arg_count.vader @@ -0,0 +1,45 @@ +Before: + function! Func0() + endfunction + function! Func1(x) + endfunction + function! Func2(x,y) + endfunction + function! Func3(x,y,z) + endfunction + function! Func3a(x,y,z,...) + endfunction + +After: + delfunction Func0 + delfunction Func1 + delfunction Func2 + delfunction Func3 + delfunction Func3a + +Execute(We should be able to compute the argument count for function names): + AssertEqual 0, ale#util#FunctionArgCount('Func0') + AssertEqual 1, ale#util#FunctionArgCount('Func1') + AssertEqual 2, ale#util#FunctionArgCount('Func2') + AssertEqual 3, ale#util#FunctionArgCount('Func3') + AssertEqual 3, ale#util#FunctionArgCount('Func3a') + +Execute(We should be able to compute the argument count for Funcrefs): + AssertEqual 0, ale#util#FunctionArgCount(function('Func0')) + AssertEqual 1, ale#util#FunctionArgCount(function('Func1')) + AssertEqual 2, ale#util#FunctionArgCount(function('Func2')) + AssertEqual 3, ale#util#FunctionArgCount(function('Func3')) + AssertEqual 3, ale#util#FunctionArgCount(function('Func3a')) + +Execute(We should be able to compute the argument count for lambdas): + if has('lambda') + AssertEqual 0, ale#util#FunctionArgCount({->1}) + AssertEqual 1, ale#util#FunctionArgCount({x->1}) + AssertEqual 2, ale#util#FunctionArgCount({x,y->1}) + AssertEqual 3, ale#util#FunctionArgCount({x,y,z->1}) + AssertEqual 3, ale#util#FunctionArgCount({x,y,z,...->1}) + endif + +Execute(We should be able to compute the argument count autoload functions not yet loaded): + AssertEqual 1, ale#util#FunctionArgCount(function('ale#fixers#yapf#Fix')) + AssertEqual 1, ale#util#FunctionArgCount('ale#fixers#yapf#Fix') diff --git a/dot_vim/plugged/ale/test/test_fuzzy_json_decode.vader b/dot_vim/plugged/ale/test/test_fuzzy_json_decode.vader new file mode 100644 index 0000000..4b1c608 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_fuzzy_json_decode.vader @@ -0,0 +1,29 @@ +Execute(FuzzyJSONDecode should return the default for empty Lists): + AssertEqual [], ale#util#FuzzyJSONDecode([], []) + AssertEqual {}, ale#util#FuzzyJSONDecode([], {}) + +Execute(FuzzyJSONDecode should return the default for empty Strings): + AssertEqual [], ale#util#FuzzyJSONDecode('', []) + AssertEqual {}, ale#util#FuzzyJSONDecode('', {}) + +Execute(FuzzyJSONDecode should return the default value for ['']): + AssertEqual [], ale#util#FuzzyJSONDecode([''], []) + AssertEqual {}, ale#util#FuzzyJSONDecode([''], {}) + +Execute(FuzzyJSONDecode should return the default value for only whitespace lines): + AssertEqual [], ale#util#FuzzyJSONDecode(['', "\n"], []) + AssertEqual {}, ale#util#FuzzyJSONDecode(['', "\n"], {}) + +Execute(FuzzyJSONDecode should return the default for Lists with invalid JSON): + AssertEqual [], ale#util#FuzzyJSONDecode(['x'], []) + AssertEqual {}, ale#util#FuzzyJSONDecode(['x'], {}) + +Execute(FuzzyJSONDecode should return the default for Strings with invalid JSON): + AssertEqual [], ale#util#FuzzyJSONDecode('x', []) + AssertEqual {}, ale#util#FuzzyJSONDecode('x', {}) + +Execute(FuzzyJSONDecode should return the JSON from the JSON string): + AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', []) + AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', {}) + AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], []) + AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], {}) diff --git a/dot_vim/plugged/ale/test/test_get_abspath.vader b/dot_vim/plugged/ale/test/test_get_abspath.vader new file mode 100644 index 0000000..7e1b593 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_get_abspath.vader @@ -0,0 +1,29 @@ +Execute(Relative paths should be resolved correctly): + AssertEqual + \ has('win32') ? '\foo\bar\baz\whatever.txt' : '/foo/bar/baz/whatever.txt', + \ ale#path#GetAbsPath('/foo/bar/xyz', '../baz/whatever.txt') + AssertEqual + \ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', + \ ale#path#GetAbsPath('/foo/bar/xyz', './whatever.txt') + AssertEqual + \ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', + \ ale#path#GetAbsPath('/foo/bar/xyz', 'whatever.txt') + + if has('win32') + AssertEqual + \ 'C:\foo\bar\baz\whatever.txt', + \ ale#path#GetAbsPath('C:\foo\bar\baz\xyz', '../whatever.txt') + endif + +Execute(Absolute paths should be resolved correctly): + AssertEqual + \ has('win32') ? '\ding\dong' : '/ding/dong', + \ ale#path#GetAbsPath('/foo/bar/xyz', '/ding/dong') + + AssertEqual + \ has('win32') ? '\ding\dong' : '/ding/dong', + \ ale#path#GetAbsPath('/foo/bar/xyz', '//ding/dong') + + if has('win32') + AssertEqual '\ding', ale#path#GetAbsPath('/foo/bar/xyz', '\\ding') + endif diff --git a/dot_vim/plugged/ale/test/test_get_loclist.vader b/dot_vim/plugged/ale/test/test_get_loclist.vader new file mode 100644 index 0000000..1469699 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_get_loclist.vader @@ -0,0 +1,31 @@ +Before: + let g:loclist = [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'eslint', + \ 'nr': -1, + \ 'type': 'E', + \ 'col': 10, + \ 'text': 'Missing semicolon. (semi)' + \ }, + \ { + \ 'lnum': 2, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'eslint', + \ 'nr': -1, + \ 'type': 'W', + \ 'col': 10, + \ 'text': 'Infix operators must be spaced. (space-infix-ops)' + \ }, + \] + let g:ale_buffer_info = {'1': {'loclist': g:loclist}} + +After: + unlet g:loclist + let g:ale_buffer_info = {} + +Execute(GetLoclist should return the loclist): + AssertEqual g:loclist, ale#engine#GetLoclist(1) diff --git a/dot_vim/plugged/ale/test/test_getmatches.vader b/dot_vim/plugged/ale/test/test_getmatches.vader new file mode 100644 index 0000000..edf84f6 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_getmatches.vader @@ -0,0 +1,163 @@ +Execute (ale#util#GetMatches should return matches for many lines): + AssertEqual + \ [ + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '47', + \ '14', + \ 'Missing trailing comma.', + \ 'Warning/comma-dangle', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ [ + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ '56', + \ '41', + \ 'Missing semicolon.', + \ 'Error/semi', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ ], + \ ale#util#GetMatches( + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ ], + \ [ + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$', + \ ] + \ ) + +Execute (ale#util#GetMatches should accept a string for a single pattern): + AssertEqual + \ [ + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '47', + \ '14', + \ 'Missing trailing comma.', + \ 'Warning/comma-dangle', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ [ + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ '56', + \ '41', + \ 'Missing semicolon.', + \ 'Error/semi', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ ], + \ ale#util#GetMatches( + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ ], + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$' + \ ) + +Execute (ale#util#MapMatches should map matches): + AssertEqual + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ ], + \ ale#util#MapMatches( + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ ], + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$', + \ {match -> match[0]} + \ ) + +Execute (ale#util#GetMatches should accept a single line as a string): + AssertEqual + \ [ + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '47', + \ '14', + \ 'Missing trailing comma.', + \ 'Warning/comma-dangle', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ ], + \ ale#util#GetMatches( + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ [ + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$', + \ ] + \ ) + +Execute (ale#util#GetMatches should match multiple patterns correctly): + AssertEqual + \ [ + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '47', + \ '14', + \ 'Missing trailing comma.', + \ 'Warning/comma-dangle', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ [ + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ '56', + \ '41', + \ 'Missing semicolon.', + \ 'Error/semi', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ [ + \ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token', + \ '13', + \ '3', + \ 'Parsing error: Unexpected token', + \ '', + \ '', + \ '', + \ '', + \ '', + \ '', + \ ], + \ ], + \ ale#util#GetMatches( + \ [ + \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]', + \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]', + \ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token', + \ ], + \ [ + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$', + \ '^.*:\(\d\+\):\(\d\+\): \(.\+\)$', + \ ] + \ ) diff --git a/dot_vim/plugged/ale/test/test_go_to_definition.vader b/dot_vim/plugged/ale/test/test_go_to_definition.vader new file mode 100644 index 0000000..726de55 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_go_to_definition.vader @@ -0,0 +1,689 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + Save g:ale_default_navigation + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:message_list = [] + let g:expr_list = [] + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + let g:ale_default_navigation = 'buffer' + + runtime autoload/ale/linter.vim + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + +After: + Restore + + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#definition#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#definition#HandleTSServerResponse(1, {'command': 'foo'}) + +Execute(Tagstack should be incremented if supported): + if exists('*gettagstack') && exists('*settagstack') + let original_stack_depth = gettagstack().length + endif + call ale#definition#UpdateTagStack() + if exists('*gettagstack') && exists('*settagstack') + AssertEqual original_stack_depth + 1, gettagstack().length + endif + +Execute(Failed definition responses should be handled correctly): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ {'command': 'definition', 'request_seq': 3} + \) + AssertEqual {}, ale#definition#GetMap() + +Execute(Failed definition responses with no files should be handled correctly): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'definition', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [], + \ } + \) + AssertEqual {}, ale#definition#GetMap() + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Other files should be jumped to for definition responses): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'definition', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [ + \ { + \ 'file': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'start': {'line': 3, 'offset': 7}, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 7], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Other files should be jumped to for definition responses in tabs too): + call ale#definition#SetMap({3: {'open_in': 'tab'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'definition', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [ + \ { + \ 'file': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'start': {'line': 3, 'offset': 7}, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ 'tabedit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 7], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Other files should be jumped to for definition responses in splits too): + call ale#definition#SetMap({3: {'open_in': 'split'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'definition', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [ + \ { + \ 'file': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'start': {'line': 3, 'offset': 7}, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ 'split +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 7], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Other files should be jumped to for definition responses in vsplits too): + call ale#definition#SetMap({3: {'open_in': 'vsplit'}}) + call ale#definition#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'definition', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [ + \ { + \ 'file': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'start': {'line': 3, 'offset': 7}, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ 'vsplit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 7], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(tsserver definition requests should be sent): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEGoToDefinition + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'definition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@definition', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(tsserver type definition requests should be sent): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEGoToTypeDefinition + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'typeDefinition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@typeDefinition', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(tsserver implementation requests should be sent): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEGoToImplementation + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@implementation', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(tsserver tab definition requests should be sent): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALEGoToDefinition -tab + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'definition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@definition', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() + +Execute(The default navigation type should be used): + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + let g:ale_default_navigation = 'tab' + ALEGoToDefinition + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'definition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@definition', {'file': expand('%:p'), 'line': 2, 'offset': 5}] + \ ], + \ g:message_list + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Other files should be jumped to for LSP definition responses): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Newer LocationLink items should be supported): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'targetUri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'targetRange': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Locations inside the same file should be jumped to without using :edit): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(expand('%:p'))), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Other files should be jumped to in tabs for LSP definition responses): + call ale#definition#SetMap({3: {'open_in': 'tab'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ 'tabedit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Definition responses with lists should be handled): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'range': { + \ 'start': {'line': 20, 'character': 3}, + \ }, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + +Execute(Definition responses with null response should be handled): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse(1, {'id': 3, 'result': v:null}) + + AssertEqual [], g:expr_list + +Execute(LSP definition requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToDefinition + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'definition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/definition', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(LSP type definition requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToTypeDefinition + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'typeDefinition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/typeDefinition', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(LSP implementation requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToImplementation + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/implementation', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'current-buffer'}}, ale#definition#GetMap() + +Execute(LSP tab definition requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToDefinition -tab + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'definition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/definition', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() + +Execute(LSP tab type definition requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToTypeDefinition -tab + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'typeDefinition', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/typeDefinition', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() + +Execute(LSP tab implementation requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALEGoToImplementation -tab + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'implementation', g:capability_checked + AssertEqual + \ 'function(''ale#definition#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/implementation', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'open_in': 'tab'}}, ale#definition#GetMap() diff --git a/dot_vim/plugged/ale/test/test_gradle_build_classpath_command.vader b/dot_vim/plugged/ale/test/test_gradle_build_classpath_command.vader new file mode 100644 index 0000000..9557aa0 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_gradle_build_classpath_command.vader @@ -0,0 +1,52 @@ +Before: + Save $PATH + Save $PATHEXT + + let $PATHEXT = '.' + + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/kotlin/kotlinc.vim + + let g:command_tail = ' -I ' . ale#Escape(ale#gradle#GetInitPath()) + \ . ' -q printClasspath' + + let g:gradle_init_path = ale#path#Simplify(g:dir . '../../autoload/ale/gradle/init.gradle') + +After: + Restore + + unlet! g:gradle_init_path + unlet! g:command_tail + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return 'gradlew' command if project includes gradle wapper): + call ale#test#SetFilename('test-files/gradle/wrapped-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/gradle/wrapped-project'), + \ ale#Escape(ale#path#Simplify(g:dir . '/test-files/gradle/wrapped-project/gradlew')) + \ . g:command_tail, + \ ], + \ ale#gradle#BuildClasspathCommand(bufnr('')) + +Execute(Should return 'gradle' command if project does not include gradle wapper): + call ale#test#SetFilename('test-files/gradle/unwrapped-project/src/main/kotlin/dummy.kt') + let $PATH .= (has('win32') ? ';' : ':') + \ . ale#path#Simplify(g:dir . '/test-files/gradle') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/gradle/unwrapped-project'), + \ ale#Escape('gradle') . g:command_tail + \ ], + \ ale#gradle#BuildClasspathCommand(bufnr('')) + +Execute(Should return empty string if gradle cannot be executed): + call ale#test#SetFilename('test-files/gradle/non-gradle-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ ['', ''], + \ ale#gradle#BuildClasspathCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_gradle_find_executable.vader b/dot_vim/plugged/ale/test/test_gradle_find_executable.vader new file mode 100644 index 0000000..f874748 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_gradle_find_executable.vader @@ -0,0 +1,37 @@ +Before: + Save $PATH + Save $PATHEXT + + " Count the gradle executable without .exe as executable on Windows + let $PATHEXT = '.' + + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/kotlin/kotlinc.vim + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return 'gradlew' if found in parent directory): + call ale#test#SetFilename('test-files/gradle/wrapped-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/gradle/wrapped-project/gradlew'), + \ ale#gradle#FindExecutable(bufnr('')) + +Execute(Should return 'gradle' if 'gradlew' not found in parent directory): + call ale#test#SetFilename('test-files/gradle/unwrapped-project/src/main/kotlin/dummy.kt') + let $PATH .= (has('win32') ? ';': ':') . ale#path#Simplify(g:dir . '/test-files/gradle') + + AssertEqual + \ 'gradle', + \ ale#gradle#FindExecutable(bufnr('')) + +Execute(Should return empty string if 'gradlew' not in parent directory and gradle not in path): + call ale#test#SetFilename('test-files/gradle/unwrapped-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ '', + \ ale#gradle#FindExecutable(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_gradle_find_project_root.vader b/dot_vim/plugged/ale/test/test_gradle_find_project_root.vader new file mode 100644 index 0000000..b615918 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_gradle_find_project_root.vader @@ -0,0 +1,35 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/kotlin/kotlinc.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return directory for 'gradlew' if found in parent directory): + call ale#test#SetFilename('test-files/gradle/wrapped-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/gradle/wrapped-project'), + \ ale#gradle#FindProjectRoot(bufnr('')) + +Execute(Should return directory for 'settings.gradle' if found in parent directory): + call ale#test#SetFilename('test-files/gradle/settings-gradle-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/gradle/settings-gradle-project'), + \ ale#gradle#FindProjectRoot(bufnr('')) + +Execute(Should return directory for 'build.gradle' if found in parent directory): + call ale#test#SetFilename('test-files/gradle/build-gradle-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/gradle/build-gradle-project'), + \ ale#gradle#FindProjectRoot(bufnr('')) + +Execute(Should return empty string if gradle files are not found in parent directory): + call ale#test#SetFilename('test-files/gradle/non-gradle-project/src/main/kotlin/dummy.kt') + + AssertEqual + \ '', + \ ale#gradle#FindProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_helptags.vader b/dot_vim/plugged/ale/test/test_helptags.vader new file mode 100644 index 0000000..8c9c546 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_helptags.vader @@ -0,0 +1,2 @@ +Execute (helptags should run without issue): + helptags ALL diff --git a/dot_vim/plugged/ale/test/test_highlight_placement.vader b/dot_vim/plugged/ale/test/test_highlight_placement.vader new file mode 100644 index 0000000..e8b7ac2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_highlight_placement.vader @@ -0,0 +1,465 @@ +Before: + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_enabled + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + Save g:ale_exclude_highlights + Save b:ale_exclude_highlights + + runtime autoload/ale/virtualtext.vim + runtime autoload/ale/highlight.vim + + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + let g:ale_set_highlights = 1 + let g:ale_set_signs = 1 + let g:ale_buffer_info = {} + + " Disable features we don't need for these tests. + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_echo_cursor = 0 + let g:ale_exclude_highlights = [] + let b:ale_exclude_highlights = [] + + function! GenerateResults(buffer, output) + return [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'foo', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'type': 'W', + \ 'text': 'bar', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'wat', + \ }, + \] + endfunction + + let g:has_nvim_highlight = exists('*nvim_buf_add_highlight') && exists('*nvim_buf_clear_namespace') + let g:nvim_highlight_matches = {} + + function! ale#highlight#nvim_buf_clear_namespace(buffer, ns_id, line_start, line_end) abort + if a:line_end != -1 + throw 'nvim api behavior not supported' + endif + + let l:matches = get(g:nvim_highlight_matches, a:buffer, []) + call filter( + \ l:matches, + \ {_, val -> val.pos1[0] < (a:line_start + 1) }, + \) + endfunction + + function! ale#highlight#nvim_buf_add_highlight(buffer, ns_id, hl_group, line, col_start, col_end) abort + if a:col_end == -1 + throw 'nvim api behavior not supported' + endif + + let l:matches = get(g:nvim_highlight_matches, a:buffer, []) + let g:nvim_highlight_matches[a:buffer] = l:matches + + let l:new_match = { + \ 'group': a:hl_group, + \ 'priority': 10, + \ 'pos1': [a:line + 1, a:col_start + 1, a:col_end - a:col_start], + \} + + call add(l:matches, l:new_match) + " sort by line number to emulate getmatches faithfully + call sort(l:matches, {m1, m2 -> m1.pos1[0] - m2.pos1[0]}) + endfunction + + " We don't care what the IDs are, just that we have some matches. + " The IDs are generated. + function! GetMatchesWithoutIDs() abort + if g:has_nvim_highlight + return get(g:nvim_highlight_matches, bufnr(''), []) + else + let l:list = getmatches() + + for l:item in l:list + call remove(l:item, 'id') + endfor + + return l:list + endif + endfunction + + function! GetLinkedGroup(grp) abort + return synIDattr(synIDtrans(hlID(a:grp)), 'name') + endfunction + + call ale#linter#Define('testft', { + \ 'name': 'x', + \ 'executable': has('win32') ? 'cmd': 'echo', + \ 'command': has('win32') ? 'echo' : '/bin/sh -c ''echo''', + \ 'callback': 'GenerateResults', + \}) + highlight link SomeOtherGroup SpellBad + +After: + Restore + + unlet! g:ale_run_synchronously_callbacks + unlet! g:items + unlet! b:ale_enabled + unlet! g:has_nvim_highlight + unlet! g:nvim_highlight_matches + + delfunction GenerateResults + call ale#linter#Reset() + call clearmatches() + call ale#sign#Clear() + if has('textprop') && has('popupwin') + call prop_type_delete('ale') + endif + highlight clear SomeOtherGroup + + runtime autoload/ale/highlight.vim + +Given testft(A Javscript file with warnings/errors): + foo + bar + baz wat + line four + +" Autoloading virtualtext.vim first should still properly initialize hl-groups +Execute(Loading virtualtext first does not break highlight groups): + AssertEqual + \ "SpellBad", + \ GetLinkedGroup("ALEError") + AssertEqual + \ "SpellCap", + \ GetLinkedGroup("ALEWarning") + +Execute(Highlights should be set when a linter runs): + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [2, 1, 1]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 5, 1]} + \ ], + \ GetMatchesWithoutIDs() + +" This test is important for preventing ALE from showing highlights for +" the wrong files. +Execute(Highlights set by ALE should be removed when buffer cleanup is done): + call ale#engine#InitBufferInfo(bufnr('%')) + + call ale#highlight#SetHighlights(bufnr('%'), [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, + \]) + + if !g:has_nvim_highlight + " This check doesn't work with the new API, for some reason. + AssertEqual + \ [{'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]}], + \ GetMatchesWithoutIDs() + endif + + call ale#engine#Cleanup(bufnr('%')) + + AssertEqual [], GetMatchesWithoutIDs() + +Execute(Highlights should be cleared when buffers are hidden): + call ale#engine#InitBufferInfo(bufnr('%')) + " The second item should be ignored, as it has no column infomration. + let g:ale_buffer_info[bufnr('%')].loclist = [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 4, 'col': 0}, + \] + call ale#highlight#SetHighlights( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist + \) + + AssertEqual 1, len(GetMatchesWithoutIDs()), 'The highlights weren''t initially set!' + + call ale#highlight#BufferHidden(bufnr('%')) + + AssertEqual 0, len(GetMatchesWithoutIDs()), 'The highlights weren''t cleared!' + + call ale#highlight#UpdateHighlights() + + AssertEqual 1, len(GetMatchesWithoutIDs()), 'The highlights weren''t set again!' + +Execute(Only ALE highlights should be restored when buffers are restored): + call ale#engine#InitBufferInfo(bufnr('%')) + let g:ale_buffer_info[bufnr('%')].loclist = [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, + \] + call ale#highlight#SetHighlights( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist + \) + + call matchaddpos('SomeOtherGroup', [[1, 1, 1]]) + + " We should have both highlights. + if g:has_nvim_highlight + " When the newer NeoVim API is used, we don't have to worry about + " other highlights, namespacing is available. + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]}, + \ ], + \ GetMatchesWithoutIDs() + else + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]}, + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}, + \ ], + \ sort(GetMatchesWithoutIDs(), {m1, m2 -> m1.group < m2.group ? -1 : 1}) + endif + + call ale#highlight#BufferHidden(bufnr('%')) + + " We should remove our highlight, but not the other one. + if g:has_nvim_highlight + AssertEqual [], GetMatchesWithoutIDs() + else + AssertEqual + \ [ + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]} + \ ], + \ GetMatchesWithoutIDs() + endif + + call ale#highlight#UpdateHighlights() + + " Our highlight should apper again. + if g:has_nvim_highlight + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]}, + \ ], + \ GetMatchesWithoutIDs() + else + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]}, + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}, + \ ], + \ sort(GetMatchesWithoutIDs(), {m1, m2 -> m1.group < m2.group ? -1 : 1}) + endif + +Execute(Highlight end columns should set an appropriate size): + call ale#highlight#SetHighlights(bufnr('%'), [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2, 'end_col': 5}, + \ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 4, 'col': 1, 'end_col': 5}, + \]) + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 4]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [4, 1, 5]}, + \ ], + \ GetMatchesWithoutIDs() + +Execute(Highlight end columns should set an appropriate size): + call ale#highlight#SetHighlights(bufnr('%'), [ + \ {'bufnr': bufnr('%') - 1, 'type': 'E', 'lnum': 1, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 1, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 2, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'sub_type': 'style', 'lnum': 3, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 4, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'W', 'lnum': 5, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'W', 'sub_type': 'style', 'lnum': 6, 'col': 1}, + \ {'bufnr': bufnr('%'), 'type': 'I', 'lnum': 7, 'col': 1}, + \ {'bufnr': bufnr('%') + 1, 'type': 'E', 'lnum': 1, 'col': 1}, + \]) + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [2, 1, 1]}, + \ {'group': 'ALEStyleError', 'priority': 10, 'pos1': [3, 1, 1]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [4, 1, 1]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [5, 1, 1]}, + \ {'group': 'ALEStyleWarning', 'priority': 10, 'pos1': [6, 1, 1]}, + \ {'group': 'ALEInfo', 'priority': 10, 'pos1': [7, 1, 1]}, + \ ], + \ GetMatchesWithoutIDs() + +Execute(Highlighting should support errors spanning many lines): + let g:items = [ + \ {'bufnr': bufnr(''), 'type': 'E', 'lnum': 1, 'col': 1, 'end_lnum': 10, 'end_col': 3}, + \] + + call ale#highlight#SetHighlights(bufnr(''), g:items) + + if g:has_nvim_highlight + " The newer NeoVim highlight API produces different output. + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [2, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [4, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [5, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [6, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [7, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [8, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [9, 1, 1073741824]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [10, 1, 3]}, + \ ], + \ GetMatchesWithoutIDs() + else + " We should set 2 highlights for the item, as we can only add 8 at a time. + AssertEqual + \ [ + \ { + \ 'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1073741824], + \ 'pos2': [2], 'pos3': [3], 'pos4': [4], 'pos5': [5], 'pos6': [6], + \ 'pos7': [7], 'pos8': [8], + \ }, + \ { + \ 'group': 'ALEError', 'priority': 10, + \ 'pos1': [9], 'pos2': [10, 1, 3] + \ }, + \ ], + \ GetMatchesWithoutIDs() + endif + +Execute(Highlights should always be cleared when the buffer highlight list is empty): + if g:has_nvim_highlight + " The newer API uses namespacing. We'll emulate it here. + call ale#highlight#nvim_buf_add_highlight( + \ bufnr(''), + \ 1, + \ 'ALEError', + \ 0, + \ 0, + \ 1, + \) + + AssertEqual + \ [{'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}], + \ GetMatchesWithoutIDs() + else + " Add our highlights and something else. + call matchaddpos('ALEError', [[1, 1, 1]]) + call matchaddpos('SomeOtherGroup', [[1, 1, 1]]) + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}, + \ ], + \ GetMatchesWithoutIDs() + endif + + + " Set the List we use for holding highlights for buffers. + let b:ale_highlight_items = [] + + " Call the function for updating the highlights called when buffers + " are entered, or when problems are presented. + call ale#highlight#UpdateHighlights() + + " Check that we remove our highlights. + if g:has_nvim_highlight + AssertEqual [], GetMatchesWithoutIDs() + else + AssertEqual + \ [{'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}], + \ GetMatchesWithoutIDs() + endif + +Execute(Highlights should be hidden when excluded): + let b:ale_exclude_highlights = ['ig.*ore', 'nope'] + + call ale#highlight#SetHighlights(bufnr('%'), [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 1, 'col': 1, 'text': 'hello'}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 2, 'col': 1, 'text': 'ignore'}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 1, 'text': 'nope'}, + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 4, 'col': 1, 'text': 'world'}, + \]) + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'ALEError', 'priority': 10, 'pos1': [4, 1, 1]}, + \ ], + \ GetMatchesWithoutIDs() + +Execute(Highlights should be cleared when ALE is disabled): + let g:ale_enabled = 1 + call ale#highlight#SetHighlights(bufnr(''), [ + \ {'bufnr': bufnr(''), 'type': 'E', 'lnum': 1, 'col': 1, 'end_lnum': 10, 'end_col': 3}, + \]) + + let g:ale_enabled = 0 + call ale#highlight#UpdateHighlights() + + AssertEqual [], GetMatchesWithoutIDs() + + let g:ale_enabled = 1 + call ale#highlight#SetHighlights(bufnr(''), [ + \ {'bufnr': bufnr(''), 'type': 'E', 'lnum': 1, 'col': 1, 'end_lnum': 10, 'end_col': 3}, + \]) + + let b:ale_enabled = 0 + call ale#highlight#UpdateHighlights() + + AssertEqual [], GetMatchesWithoutIDs() + +Execute(Line highlights should be set when signs are disabled): + " This will mess with your settings, but it needs to be tested. + " We need to match highlights case-insensitively when removing them. + hi link aleerrorline spellbad + + let g:ale_set_signs = 0 + + call ale#highlight#SetHighlights(bufnr(''), [ + \ {'bufnr': bufnr(''), 'type': 'E', 'lnum': 1, 'col': 1}, + \ {'bufnr': bufnr(''), 'type': 'W', 'lnum': 2, 'col': 1}, + \ {'bufnr': bufnr(''), 'type': 'I', 'lnum': 3, 'col': 1}, + \]) + + if g:has_nvim_highlight + " The output is different with the newer NeoVIM highlight API. + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'ALEErrorLine', 'priority': 10, 'pos1': [1, 1, 1073741824]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [2, 1, 1]}, + \ {'group': 'ALEWarningLine', 'priority': 10, 'pos1': [2, 1, 1073741824]}, + \ {'group': 'ALEInfo', 'priority': 10, 'pos1': [3, 1, 1]}, + \ {'group': 'ALEInfoLine', 'priority': 10, 'pos1': [3, 1, 1073741824]} + \ ], + \ GetMatchesWithoutIDs() + else + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [2, 1, 1]}, + \ {'group': 'ALEInfo', 'priority': 10, 'pos1': [3, 1, 1]}, + \ {'group': 'aleerrorline', 'priority': 10, 'pos1': [1]}, + \ {'group': 'ALEWarningLine', 'priority': 10, 'pos1': [2]}, + \ {'group': 'ALEInfoLine', 'priority': 10, 'pos1': [3]}, + \ ], + \ GetMatchesWithoutIDs() + endif + + " All of the highlights should be removed. + call ale#highlight#RemoveHighlights() + AssertEqual [], GetMatchesWithoutIDs() diff --git a/dot_vim/plugged/ale/test/test_highlight_position_chunking.vader b/dot_vim/plugged/ale/test/test_highlight_position_chunking.vader new file mode 100644 index 0000000..cd9161b --- /dev/null +++ b/dot_vim/plugged/ale/test/test_highlight_position_chunking.vader @@ -0,0 +1,76 @@ +Execute(CreatePositions() should support single character matches): + AssertEqual [[[1, 5, 1]]], ale#highlight#CreatePositions(1, 5, 1, 5) + " When the end column is behind the start column, ignore it. + AssertEqual [[[2, 5, 1]]], ale#highlight#CreatePositions(2, 5, 1, 5) + +Execute(CreatePositions() should support multiple character matches on a single line): + AssertEqual [[[1, 5, 6]]], ale#highlight#CreatePositions(1, 5, 1, 10) + " When the end column is behind the start column, ignore it. + AssertEqual [[[2, 5, 6]]], ale#highlight#CreatePositions(2, 5, 1, 10) + +Execute(CreatePositions() should support character matches two lines): + AssertEqual [[[1, 5, 1073741824], [2, 1, 10]]], ale#highlight#CreatePositions(1, 5, 2, 10) + +Execute(CreatePositions() should support character matches across many lines): + " Test chunks from 1,3 to 1,17 + AssertEqual [ + \ [[1, 5, 1073741824], 2, [3, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 3, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, [4, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 4, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, [5, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 5, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, [6, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 6, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, [7, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 7, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, [8, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 8, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [[9, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 9, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, [10, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 10, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, [11, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 11, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, [12, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 12, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, 12, [13, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 13, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, 12, 13, [14, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 14, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, 12, 13, 14, [15, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 15, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, 12, 13, 14, 15, [16, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 16, 10) + AssertEqual [ + \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8], + \ [9, 10, 11, 12, 13, 14, 15, 16], + \ [[17, 1, 10]], + \], ale#highlight#CreatePositions(1, 5, 17, 10) + " Test another random sample at higher lines. + AssertEqual [ + \ [[21, 8, 1073741824], 22, 23, 24, 25, 26, 27, 28], + \ [29, 30, 31, 32, 33, 34, 35, 36], + \ [[37, 1, 2]], + \], ale#highlight#CreatePositions(21, 8, 37, 2) diff --git a/dot_vim/plugged/ale/test/test_history_saving.vader b/dot_vim/plugged/ale/test/test_history_saving.vader new file mode 100644 index 0000000..5d81c2a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_history_saving.vader @@ -0,0 +1,177 @@ +Before: + Save g:ale_max_buffer_history_size + Save g:ale_history_enabled + Save g:ale_history_log_output + Save g:ale_run_synchronously + Save g:ale_enabled + + let g:ale_enabled = 1 + let g:ale_run_synchronously = 1 + + unlet! b:ale_fixers + unlet! b:ale_enabled + unlet! b:ale_history + + " Temporarily set the shell to /bin/sh, if it isn't already set that way. + " This will make it so the test works when running it directly. + let g:current_shell = &shell + + if !has('win32') + let &shell = '/bin/sh' + endif + + let g:history = [] + let g:ale_buffer_info = {} + let g:ale_max_buffer_history_size = 20 + let g:ale_history_log_output = 0 + + function! TestFixer(buffer) + return {'command': 'echo foo'} + endfunction + + function! CollectResults(buffer, output) + return [] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'CollectResults', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') + \ ? 'echo command history test' + \ : '/bin/sh -c ''echo command history test''', + \ 'read_buffer': 0, + \}) + +After: + Restore + + unlet! g:expected_results + unlet! b:ale_fixers + unlet! b:ale_enabled + " Clear the history we changed. + unlet! b:ale_history + + " Reset the shell back to what it was before. + let &shell = g:current_shell + unlet g:current_shell + unlet g:history + + call ale#engine#Cleanup(bufnr('')) + call ale#linter#Reset() + + let g:ale_buffer_info = {} + let g:ale_max_buffer_history_size = 20 + delfunction TestFixer + delfunction CollectResults + +Given foobar (Some imaginary filetype): + anything + +Execute(History should be set when commands are run): + AssertEqual 'foobar', &filetype + + let b:ale_history = [] + ALELint + call ale#test#FlushJobs() + + let g:history = filter( + \ copy(ale#history#Get(bufnr(''))), + \ 'v:val.job_id isnot# ''executable''', + \) + + AssertEqual 1, len(g:history) + AssertEqual + \ ['command', 'exit_code', 'job_id', 'status'], + \ sort(keys(g:history[0])) + + if has('win32') + AssertEqual 'cmd /s/c "echo command history test"', g:history[0].command + else + AssertEqual ['/bin/sh', '-c', '/bin/sh -c ''echo command history test'''], g:history[0].command + endif + + AssertEqual 'finished', g:history[0].status + AssertEqual 0, g:history[0].exit_code + " The Job ID will change each time, but we can check the type. + AssertEqual type(1), type(g:history[0].job_id) + +Execute(History should be not set when disabled): + AssertEqual 'foobar', &filetype + + let g:ale_history_enabled = 0 + + ALELint + call ale#test#FlushJobs() + + AssertEqual [], ale#history#Get(bufnr('')) + +Execute(History should include command output if logging is enabled): + AssertEqual 'foobar', &filetype + + let g:ale_history_log_output = 1 + + " Retry this test until it works. This one can randomly fail. + let b:ale_history = [] + ALELint + call ale#test#FlushJobs() + + let g:history = ale#history#Get(bufnr('')) + + AssertEqual 1, len(g:history) + AssertEqual + \ ['command history test'], + \ map( + \ copy(get(g:history[0], 'output', [])), + \ 'substitute(v:val, ''[\r ]*$'', '''', ''g'')' + \ ) + +Execute(History items should be popped after going over the max): + let b:ale_history = map(range(20), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}') + + call ale#history#Add(bufnr(''), 'started', 347, 'last command') + + AssertEqual + \ ( + \ map(range(1, 19), '{''status'': ''started'', ''job_id'': v:val, ''command'': ''foobar''}') + \ + [{'status': 'started', 'job_id': 347, 'command': 'last command'}] + \ ), + \ ale#history#Get(bufnr('')) + +Execute(Nothing should be added to history if the size is too low): + let g:ale_max_buffer_history_size = 0 + + call ale#history#Add(bufnr(''), 'started', 347, 'last command') + + AssertEqual [], ale#history#Get(bufnr('')) + + let g:ale_max_buffer_history_size = -2 + + call ale#history#Add(1, 'started', 347, 'last command') + + AssertEqual [], ale#history#Get(bufnr('')) + +Given foobar(Some file with an imaginary filetype): + a + b + c + +Execute(The history should be updated when fixers are run): + call ale#test#SetFilename('dummy.txt') + + let b:ale_fixers = {'foobar': ['TestFixer']} + let b:ale_enabled = 0 + + ALEFix + + AssertEqual ['started'], map(copy(b:ale_history), 'v:val.status') + + call ale#test#FlushJobs() + + AssertEqual ['finished'], map(copy(b:ale_history), 'v:val.status') + + if has('win32') + AssertEqual 'cmd /s/c "echo foo ', split(b:ale_history[0].command, '<')[0] + else + AssertEqual '/bin/sh -c echo foo ', split(join(b:ale_history[0].command), '<')[0] + endif diff --git a/dot_vim/plugged/ale/test/test_hover.vader b/dot_vim/plugged/ale/test/test_hover.vader new file mode 100644 index 0000000..7a9c8d9 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_hover.vader @@ -0,0 +1,272 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:Callback = 0 + let g:message_list = [] + let g:item_list = [] + let g:show_message_arg_list = [] + + let g:ale_floating_preview = 0 + let g:ale_hover_to_floating_preview = 0 + let g:ale_detail_to_floating_preview = 0 + + runtime autoload/ale/linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/util.vim + runtime autoload/ale/floating_preview.vim + runtime autoload/ale/hover.vim + + let g:floated_lines = [] + let g:floating_preview_show_called = 0 + + " Stub out so we can track the call + function! ale#floating_preview#Show(lines, ...) abort + let g:floating_preview_show_called = 1 + let g:floated_lines = a:lines + endfunction + + function! ale#lsp_linter#StartLSP(buffer, linter, callback) abort + let g:Callback = a:callback + + return { + \ 'command': 'foobar', + \ 'connection_id': 347, + \ 'project_root': '/foo/bar', + \} + endfunction + + function! ale#lsp#Send(conn_id, message, root) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#ShowMessage(string, ...) abort + call add(g:show_message_arg_list, [a:string] + a:000) + endfunction + + function! HandleValidLSPResult(result) abort + " The cursor is beyond the length of the line. + " We will clamp the cursor position with the line length. + call setpos('.', [bufnr(''), 1, 5, 0]) + + call ale#hover#SetMap({3: { + \ 'buffer': bufnr(''), + \ 'line': 1, + \ 'column': 5, + \}}) + call ale#hover#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': a:result, + \ } + \) + endfunction + + +After: + call ale#hover#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:Callback + unlet! g:message_list + unlet! b:ale_linters + unlet! g:show_message_arg_list + + delfunction HandleValidLSPResult + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/floating_preview.vim + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Other messages for the tsserver handler should be ignored): + call ale#hover#HandleTSServerResponse(1, {'command': 'foo'}) + +Execute(Failed hover responses should be handled correctly): + call ale#hover#SetMap({3: {}}) + call ale#hover#HandleTSServerResponse( + \ 1, + \ {'command': 'quickinfo', 'request_seq': 3} + \) + AssertEqual {}, ale#hover#GetMap() + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(tsserver quickinfo responses will null missing bodies should be handled): + call ale#hover#SetMap({3: {}}) + call ale#hover#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'quickinfo', + \ 'request_seq': 3, + \ 'success': v:true, + \ } + \) + + AssertEqual {}, ale#hover#GetMap() + +Execute(tsserver quickinfo displayString values should be displayed): + call ale#hover#SetMap({3: {'buffer': bufnr('')}}) + call ale#hover#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'quickinfo', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': {'displayString': 'foo bar'}, + \ } + \) + + AssertEqual [['foo bar']], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover responses with just a string should be handled): + call HandleValidLSPResult({'contents': 'foobar'}) + + AssertEqual [['foobar', {'commands': []}]], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover null responses should be handled): + call HandleValidLSPResult(v:null) + + AssertEqual [], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover responses with markup content should be handled): + call HandleValidLSPResult({'contents': {'kind': 'markdown', 'value': 'markup'}}) + + AssertEqual [['markup', {'commands': []}]], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover responses with markup content missing values should be handled): + call HandleValidLSPResult({'contents': {'kind': 'markdown'}}) + + AssertEqual [], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover response with lists of strings should be handled): + call HandleValidLSPResult({'contents': [ + \ "foo\n", + \ "bar\n", + \]}) + + AssertEqual [["foo\n\nbar", {'commands': []}]], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover response with lists of strings and marked strings should be handled): + call HandleValidLSPResult({'contents': [ + \ {'language': 'rust', 'value': 'foo'}, + \ "bar\n", + \]}) + + AssertEqual [ + \ [ + \ "foo\n\nbar", + \ { + \ 'commands': [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_rust syntax/rust.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%2l/ contains=@ALE_hover_rust', + \ ], + \ }, + \ ], + \], g:show_message_arg_list + AssertEqual {}, ale#hover#GetMap() + +Execute(LSP hover with ale_floating_preview should float): + let g:ale_floating_preview = 1 + + call HandleValidLSPResult({'contents': "the message\ncontinuing"}) + + AssertEqual 1, g:floating_preview_show_called + AssertEqual ["the message", "continuing"], g:floated_lines + +Execute(LSP hover ale_hover_to_floating_preview should float): + let g:ale_hover_to_floating_preview = 1 + + call HandleValidLSPResult({'contents': "the message\ncontinuing"}) + + AssertEqual 1, g:floating_preview_show_called + AssertEqual ["the message", "continuing"], g:floated_lines + + +Execute(LSP hover by default should not float): + call HandleValidLSPResult({'contents': "the message\ncontinuing"}) + + AssertEqual 0, g:floating_preview_show_called + +Execute(tsserver responses for documentation requests should be handled): + call ale#hover#SetMap({3: {'show_documentation': 1, 'buffer': bufnr('')}}) + + call ale#hover#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'quickinfo', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'documentation': 'foo is a very good method', + \ 'displayString': 'foo bar', + \ }, + \ } + \) + + " The preview window should show the text. + AssertEqual ['foo is a very good method'], ale#test#GetPreviewWindowText() + silent! pclose + +Execute(hover with show_documentation should be in the preview window, not floating): + let g:ale_hover_to_floating_preview = 1 + let g:ale_floating_preview = 1 + + call ale#hover#SetMap({3: {'show_documentation': 1, 'buffer': bufnr('')}}) + + call ale#hover#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'quickinfo', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'documentation': 'foo is a very good method', + \ 'displayString': 'foo bar ', + \ }, + \ } + \) + + let expected = ["Every statement should end with a semicolon", "second line"] + + AssertEqual 0, g:floating_preview_show_called + +Execute(TSServer hover without show_documentation and ale_floating_preview should float): + let g:ale_floating_preview = 1 + + call ale#hover#SetMap({3: {'buffer': bufnr('')}}) + + call ale#hover#HandleTSServerResponse( + \ 1, + \ { + \ 'command': 'quickinfo', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'displayString': "the message\ncontinuing", + \ }, + \ } + \) + + AssertEqual 1, g:floating_preview_show_called + AssertEqual ["the message", "continuing"], g:floated_lines diff --git a/dot_vim/plugged/ale/test/test_hover_parsing.vader b/dot_vim/plugged/ale/test/test_hover_parsing.vader new file mode 100644 index 0000000..4129c26 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_hover_parsing.vader @@ -0,0 +1,173 @@ +Execute(Invalid results should be handled): + AssertEqual [[], []], ale#hover#ParseLSPResult(0) + AssertEqual [[], []], ale#hover#ParseLSPResult([0]) + AssertEqual [[], []], ale#hover#ParseLSPResult('') + AssertEqual [[], []], ale#hover#ParseLSPResult({}) + AssertEqual [[], []], ale#hover#ParseLSPResult([{}]) + AssertEqual [[], []], ale#hover#ParseLSPResult(['']) + AssertEqual [[], []], ale#hover#ParseLSPResult({'value': ''}) + AssertEqual [[], []], ale#hover#ParseLSPResult([{'value': ''}]) + AssertEqual [[], []], ale#hover#ParseLSPResult({'kind': 'markdown'}) + AssertEqual [[], []], ale#hover#ParseLSPResult({'kind': 'plaintext'}) + AssertEqual [[], []], ale#hover#ParseLSPResult({'kind': 'x', 'value': 'xxx'}) + +Execute(A string with a code fence should be handled): + AssertEqual + \ [ + \ [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', + \ ], + \ [ + \ 'def foo():', + \ ' pass', + \ ], + \ ], + \ ale#hover#ParseLSPResult(join([ + \ '```python', + \ 'def foo():', + \ ' pass', + \ '```', + \ ], "\n")) + + AssertEqual + \ [ + \ [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_typescript syntax/typescript.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', + \ 'syntax region ALE_hover_2 start=/\%5l/ end=/\%8l/ contains=@ALE_hover_python', + \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_typescript', + \ ], + \ [ + \ 'def foo():', + \ ' pass', + \ '', + \ 'middle line', + \ '', + \ 'def bar():', + \ ' pass', + \ '', + \ 'const baz = () => undefined', + \ ], + \ ], + \ ale#hover#ParseLSPResult(join([ + \ '```python', + \ 'def foo():', + \ ' pass', + \ '```', + \ 'middle line', + \ '```python', + \ 'def bar():', + \ ' pass', + \ '```', + \ '```typescript', + \ 'const baz = () => undefined', + \ '```', + \ ], "\n")) + +Execute(Multiple strings with fences should be handled): + AssertEqual + \ [ + \ [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_typescript syntax/typescript.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', + \ 'syntax region ALE_hover_2 start=/\%5l/ end=/\%8l/ contains=@ALE_hover_python', + \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_typescript', + \ ], + \ [ + \ 'def foo():', + \ ' pass', + \ '', + \ 'middle line', + \ '', + \ 'def bar():', + \ ' pass', + \ '', + \ 'const baz = () => undefined', + \ ], + \ ], + \ ale#hover#ParseLSPResult([ + \ join([ + \ '```python', + \ 'def foo():', + \ ' pass', + \ '```', + \ ], "\n"), + \ join([ + \ 'middle line', + \ '```python', + \ 'def bar():', + \ ' pass', + \ '```', + \ '```typescript', + \ 'const baz = () => undefined', + \ '```', + \ ], "\n"), + \ ]) + +Execute(Objects with kinds should be handled): + AssertEqual + \ [ + \ [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', + \ ], + \ [ + \ 'def foo():', + \ ' pass', + \ '', + \ '```typescript', + \ 'const baz = () => undefined', + \ '```', + \ ], + \ ], + \ ale#hover#ParseLSPResult([ + \ { + \ 'kind': 'markdown', + \ 'value': join([ + \ '```python', + \ 'def foo():', + \ ' pass', + \ '```', + \ ], "\n"), + \ }, + \ { + \ 'kind': 'plaintext', + \ 'value': join([ + \ '```typescript', + \ 'const baz = () => undefined', + \ '```', + \ ], "\n"), + \ }, + \ ]) + +Execute(Simple markdown formatting should be handled): + AssertEqual + \ [ + \ [ + \ 'unlet! b:current_syntax', + \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', + \ ], + \ [ + \ 'def foo():', + \ ' pass', + \ '', + \ 'formatted _ line _', + \ ], + \ ], + \ ale#hover#ParseLSPResult(join([ + \ '```python', + \ 'def foo():', + \ ' pass', + \ '```', + \ 'formatted \_ line \_', + \ ], "\n")) diff --git a/dot_vim/plugged/ale/test/test_ignoring_linters.vader b/dot_vim/plugged/ale/test/test_ignoring_linters.vader new file mode 100644 index 0000000..f97a0cf --- /dev/null +++ b/dot_vim/plugged/ale/test/test_ignoring_linters.vader @@ -0,0 +1,403 @@ +Before: + Save g:ale_disable_lsp + +After: + Restore + + unlet! b:ale_disable_lsp + +Execute(GetList should ignore some invalid values): + AssertEqual [], ale#engine#ignore#GetList('', 'foo') + AssertEqual [], ale#engine#ignore#GetList('', 0) + AssertEqual [], ale#engine#ignore#GetList('', v:null) + +Execute(GetList should handle Lists): + AssertEqual ['foo', 'bar'], ale#engine#ignore#GetList('', ['foo', 'bar']) + +Execute(GetList should handle Dictionaries): + AssertEqual + \ ['linter1', 'linter2'], + \ uniq(sort(ale#engine#ignore#GetList('x.y.z', { + \ 'x': ['linter1'], + \ 'abc': ['linter3'], + \ 'z': ['linter2'], + \ }))) + +Execute(Exclude should ignore some invalid values): + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo.bar', + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ 'foo', + \ 0, + \ ) + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo.bar', + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ 0, + \ 0, + \ ) + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo.bar', + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ v:null, + \ 0, + \ ) + +Execute(Exclude should handle Lists): + AssertEqual + \ [ + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo.bar', + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ['linter1', 'alias1'], + \ 0, + \ ) + +Execute(Exclude should handle Dictionaries): + AssertEqual + \ [ + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo.bar', + \ [ + \ {'name': 'linter1', 'aliases': []}, + \ {'name': 'linter2', 'aliases': ['alias1']}, + \ {'name': 'linter3', 'aliases': []}, + \ ], + \ {'foo': ['linter1'], 'bar': ['alias1']}, + \ 0, + \ ) + +Execute(Exclude should filter LSP linters when g:ale_disable_lsp is set to 1): + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo', + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ {'name': 'linter3', 'aliases': [], 'lsp': 'stdio'}, + \ ], + \ [], + \ 1, + \ ) + +Execute(Exclude should filter LSP linters when b:ale_disable_lsp is set to 1): + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo', + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ {'name': 'linter3', 'aliases': [], 'lsp': 'stdio'}, + \ ], + \ [], + \ 1, + \ ) + +Before: + Save g:ale_linters_ignore + Save g:ale_buffer_info + Save g:ale_disable_lsp + + let g:ale_disable_lsp = 0 + + let g:linters = [] + let g:loclist = [] + let g:run_linters_called = 0 + + runtime autoload/ale/engine.vim + + " Mock the engine function so we can set it up. + function! ale#engine#RunLinters(buffer, linters, should_lint_file) abort + let g:linters = a:linters + let g:run_linters_called = 1 + endfunction + + function! ale#engine#HandleLoclist(linter_name, buffer, loclist, from_other_source) abort + let g:loclist = a:loclist + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': has('win32') ? 'echo' : 'true', + \}) + call ale#test#SetDirectory('/testplugin/test') + +After: + Restore + + unlet! b:ale_linted + unlet! b:ale_linters_ignore + unlet! b:ale_quitting + unlet! b:ale_save_event_fired + unlet! b:ale_disable_lsp + unlet! g:linters + unlet! g:loclist + unlet! g:lsp_message + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + call ale#lsp_linter#ClearLSPData() + runtime autoload/ale/engine.vim + +Given foobar(An empty file): +Execute(Global ignore lists should be applied for linters): + " We have to set up buffer info so RunLinters is called. + let g:ale_buffer_info = {bufnr(''): {}} + + ALELint + Assert g:run_linters_called, "The mock callback wasn't called" + AssertEqual ['testlinter'], map(g:linters, 'v:val.name') + + let g:ale_linters_ignore = ['testlinter'] + ALELint + AssertEqual [], g:linters + +Execute(buffer ignore lists should be applied for linters): + " We have to set up buffer info so RunLinters is called. + let g:ale_buffer_info = {bufnr(''): {}} + + ALELint + Assert g:run_linters_called, "The mock callback wasn't called" + AssertEqual ['testlinter'], map(g:linters, 'v:val.name') + + let b:ale_linters_ignore = ['testlinter'] + ALELint + AssertEqual [], g:linters + +Execute(Buffer ignore lists should be applied for tsserver): + call ale#test#SetFilename('filename.ts') + call ale#engine#InitBufferInfo(bufnr('')) + + let g:lsp_message = { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': g:dir . '/filename.ts', + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': ''','' expected.', + \ "code":1005 + \ }, + \ ], + \ }, + \} + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 14, + \ 'nr': 1005, + \ 'code': '1005', + \ 'type': 'E', + \ 'end_col': 14, + \ 'end_lnum': 2, + \ 'text': ''','' expected.', + \ }, + \ ], + \ g:loclist + + let g:loclist = [] + let b:ale_linters_ignore = ['tsserver'] + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual [], g:loclist + +Execute(Buffer ignore lists should be applied for LSP linters): + call ale#test#SetFilename('filename.py') + call ale#engine#InitBufferInfo(bufnr('')) + call ale#lsp_linter#SetLSPLinterMap({'347': 'lsplinter'}) + + let g:lsp_message = { + \ 'jsonrpc': '2.0', + \ 'method': 'textDocument/publishDiagnostics', + \ 'params': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'diagnostics': [ + \ { + \ 'severity': 1, + \ 'message': 'x', + \ 'range': { + \ 'start': {'line': 0, 'character': 9}, + \ 'end': {'line': 0, 'character': 9}, + \ }, + \ } + \ ], + \ }, + \} + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'type': 'E', + \ 'end_col': 9, + \ 'end_lnum': 1, + \ 'text': 'x', + \ } + \ ], + \ g:loclist + + let b:ale_linters_ignore = ['lsplinter'] + let g:loclist = [] + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual [], g:loclist + +Execute(ale_disable_lsp should be applied for tsserver): + call ale#test#SetFilename('filename.ts') + call ale#engine#InitBufferInfo(bufnr('')) + + let g:lsp_message = { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': g:dir . '/filename.ts', + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': ''','' expected.', + \ "code":1005 + \ }, + \ ], + \ }, + \} + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual + \ [ + \ { + \ 'lnum': 2, + \ 'col': 14, + \ 'nr': 1005, + \ 'code': '1005', + \ 'type': 'E', + \ 'end_col': 14, + \ 'end_lnum': 2, + \ 'text': ''','' expected.', + \ }, + \ ], + \ g:loclist + + let g:loclist = [] + let b:ale_disable_lsp = 1 + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual [], g:loclist + +Execute(ale_disable_lsp should be applied for LSP linters): + call ale#test#SetFilename('filename.py') + call ale#engine#InitBufferInfo(bufnr('')) + call ale#lsp_linter#SetLSPLinterMap({'347': 'lsplinter'}) + + let g:lsp_message = { + \ 'jsonrpc': '2.0', + \ 'method': 'textDocument/publishDiagnostics', + \ 'params': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'diagnostics': [ + \ { + \ 'severity': 1, + \ 'message': 'x', + \ 'range': { + \ 'start': {'line': 0, 'character': 9}, + \ 'end': {'line': 0, 'character': 9}, + \ }, + \ } + \ ], + \ }, + \} + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'type': 'E', + \ 'end_col': 9, + \ 'end_lnum': 1, + \ 'text': 'x', + \ } + \ ], + \ g:loclist + + let b:ale_disable_lsp = 1 + let g:loclist = [] + + call ale#lsp_linter#HandleLSPResponse(347, g:lsp_message) + + AssertEqual [], g:loclist diff --git a/dot_vim/plugged/ale/test/test_jq_linter.vader b/dot_vim/plugged/ale/test/test_jq_linter.vader new file mode 100644 index 0000000..cbe23b9 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_jq_linter.vader @@ -0,0 +1,18 @@ +Before: + runtime ale_linters/json/jq.vim + +After: + call ale#linter#Reset() + +Execute (Should parse error correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 9, + \ 'text': 'Expected another array element', + \ } + \ ], + \ ale_linters#json#jq#Handle(0, [ + \ 'parse error: Expected another array element at line 1, column 9' + \ ]) diff --git a/dot_vim/plugged/ale/test/test_jsonlint_executable_detection.vader b/dot_vim/plugged/ale/test/test_jsonlint_executable_detection.vader new file mode 100644 index 0000000..60bc6d7 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_jsonlint_executable_detection.vader @@ -0,0 +1,45 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + + runtime ale_linters/json/jsonlint.vim + +After: + let g:ale_json_jsonlint_executable = 'jsonlint' + let g:ale_json_jsonlint_use_global = 0 + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(local executable should be detected correctly): + call ale#test#SetFilename('test-files/jsonlint/app/src/app.json') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/jsonlint/app/node_modules/.bin/jsonlint'), + \ ale_linters#json#jsonlint#GetExecutable(bufnr('')) + +Execute(recursively executable should be detected correctly): + call ale#test#SetFilename('test-files/jsonlint/app-without-jsonlint/src/app.json') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/jsonlint/node_modules/jsonlint/lib/cli.js'), + \ ale_linters#json#jsonlint#GetExecutable(bufnr('')) + +Execute(use_global should override project executable): + let g:ale_json_jsonlint_use_global = 1 + + call ale#test#SetFilename('test-files/jsonlint/app/src/app.json') + + AssertEqual + \ 'jsonlint', + \ ale_linters#json#jsonlint#GetExecutable(bufnr('')) + +Execute(manually defined should override default executable): + let g:ale_json_jsonlint_use_global = 1 + let g:ale_json_jsonlint_executable = 'custom_jsonlint' + + call ale#test#SetFilename('test-files/jsonlint/app/src/app.json') + + AssertEqual + \ 'custom_jsonlint', + \ ale_linters#json#jsonlint#GetExecutable(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/test_line_join.vader b/dot_vim/plugged/ale/test/test_line_join.vader new file mode 100644 index 0000000..9356a2b --- /dev/null +++ b/dot_vim/plugged/ale/test/test_line_join.vader @@ -0,0 +1,84 @@ +Before: + let g:lines = [] + let g:data = '' + + function! LineCallback(job_id, line) abort + call add(g:lines, a:line) + endfunction + + function! RawCallback(job_id, some_data) abort + let g:data .= a:some_data + endfunction + +After: + unlet! g:last_line + unlet! g:lines + unlet! g:data + delfunction LineCallback + delfunction RawCallback + +Execute (ALE should handle empty Lists for the lines): + let g:last_line = ale#util#JoinNeovimOutput(1, '', [], 'nl', function('LineCallback')) + + AssertEqual [], g:lines + AssertEqual '', g:last_line + +Execute (ALE should pass on full lines for NeoVim): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x', 'y', ''], 'nl', function('LineCallback')) + + AssertEqual ['x', 'y'], g:lines + AssertEqual '', g:last_line + +Execute (ALE should pass on a single long line): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x'], 'nl', function('LineCallback')) + + AssertEqual [], g:lines + AssertEqual 'x', g:last_line + +Execute (ALE should handle just a single line of output): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x', ''], 'nl', function('LineCallback')) + + AssertEqual ['x'], g:lines + AssertEqual '', g:last_line + +Execute (ALE should join two incomplete pieces of large lines together): + let g:last_line = ale#util#JoinNeovimOutput(1, 'x', ['y'], 'nl', function('LineCallback')) + + AssertEqual [], g:lines + AssertEqual 'xy', g:last_line + +Execute (ALE join incomplete lines, and set new ones): + let g:last_line = ale#util#JoinNeovimOutput(1, 'x', ['y', 'z', 'a'], 'nl', function('LineCallback')) + + AssertEqual ['xy', 'z'], g:lines + AssertEqual 'a', g:last_line + +Execute (ALE join incomplete lines, and set new ones, with two elements): + let g:last_line = ale#util#JoinNeovimOutput(1, 'x', ['y', 'z'], 'nl', function('LineCallback')) + + AssertEqual ['xy'], g:lines + AssertEqual 'z', g:last_line + +Execute (ALE should pass on full lines for NeoVim for raw data): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x', 'y', ''], 'raw', function('RawCallback')) + + AssertEqual "x\ny\n", g:data + AssertEqual '', g:last_line + +Execute (ALE should pass on a single long line): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x'], 'raw', function('RawCallback')) + + AssertEqual 'x', g:data + AssertEqual '', g:last_line + +Execute (ALE should handle just a single line of output): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['x', ''], 'raw', function('RawCallback')) + + AssertEqual "x\n", g:data + AssertEqual '', g:last_line + +Execute (ALE should pass on two lines and one incomplete one): + let g:last_line = ale#util#JoinNeovimOutput(1, '', ['y', 'z', 'a'], 'raw', function('RawCallback')) + + AssertEqual "y\nz\na", g:data + AssertEqual '', g:last_line diff --git a/dot_vim/plugged/ale/test/test_lint_file_linters.vader b/dot_vim/plugged/ale/test/test_lint_file_linters.vader new file mode 100644 index 0000000..682e413 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_lint_file_linters.vader @@ -0,0 +1,317 @@ +Before: + Save g:ale_fix_on_save + Save g:ale_enabled + Save g:ale_run_synchronously + Save g:ale_set_lists_synchronously + Save g:ale_buffer_info + Save g:ale_linters + + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + unlet! g:ale_run_synchronously_callbacks + let g:ale_set_lists_synchronously = 1 + let b:ale_save_event_fired = 0 + + let g:buffer_result = [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'buffer error', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'buffer warning', + \ 'type': 'W', + \ }, + \] + + function! LintFileCallback(buffer, output) + return [ + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \] + endfunction + + function! BufferCallback(buffer, output) + return deepcopy(g:buffer_result) + endfunction + + function! GetSimplerLoclist() + let l:loclist = [] + + for l:item in ale#test#GetLoclistWithoutNewerKeys() + call add(l:loclist, { + \ 'lnum': l:item.lnum, + \ 'col': l:item.col, + \ 'text': l:item.text, + \ 'type': l:item.type, + \}) + endfor + + return l:loclist + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'lint_file_linter', + \ 'callback': 'LintFileCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo', + \ 'lint_file': 1, + \}) + + call ale#linter#Define('foobar', { + \ 'name': 'buffer_linter', + \ 'callback': 'BufferCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': 'echo', + \ 'read_buffer': 0, + \}) + + let g:filename = tempname() + call writefile([], g:filename) + call ale#test#SetFilename(g:filename) + +After: + if !g:ale_run_synchronously + call ale#engine#Cleanup(bufnr('')) + endif + + Restore + + unlet! g:ale_run_synchronously_callbacks + unlet! b:ale_save_event_fired + unlet! b:ale_enabled + unlet g:buffer_result + let g:ale_buffer_info = {} + call ale#linter#Reset() + call setloclist(0, []) + delfunction LintFileCallback + delfunction BufferCallback + + if filereadable(g:filename) + call delete(g:filename) + endif + + unlet g:filename + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(Running linters without 'lint_file' should run only buffer linters): + call ale#Queue(0) + call ale#test#FlushJobs() + + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'buffer error', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'buffer warning', + \ 'type': 'W', + \ }, + \], GetSimplerLoclist() + +Execute(Running linters with 'lint_file' should run all linters): + Assert filereadable(expand('%:p')), 'The file was not readable' + + call ale#Queue(0, 'lint_file') + call ale#test#FlushJobs() + + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'buffer error', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'buffer warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \], GetSimplerLoclist() + +Execute(Linter errors from files should be kept): + Assert filereadable(expand('%:p')), 'The file was not readable' + + call ale#Queue(0, 'lint_file') + call ale#test#FlushJobs() + + " Change the results for the buffer callback. + let g:buffer_result = [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'new buffer error', + \ 'type': 'E', + \ }, + \] + + call ale#Queue(0) + call ale#test#FlushJobs() + + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 1, + \ 'text': 'new buffer error', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \], GetSimplerLoclist() + +Execute(Linter errors from files should be kept when no other linters are run): + let g:ale_linters = {'foobar': ['lint_file_linter']} + Assert filereadable(expand('%:p')), 'The file was not readable' + + call ale#Queue(0, 'lint_file') + call ale#test#FlushJobs() + + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \], GetSimplerLoclist() + + call ale#Queue(0) + + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \], GetSimplerLoclist() + +Execute(The Save event should respect the buffer number): + let g:ale_linters = {'foobar': ['lint_file_linter']} + Assert filereadable(expand('%:p')), 'The file was not readable' + + call ale#events#SaveEvent(bufnr('') + 1) + call ale#test#FlushJobs() + + " We shouldn't get any prblems yet. + AssertEqual [], GetSimplerLoclist() + + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + " We should get them now we used the right buffer number. + AssertEqual [ + \ { + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'file warning', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 3, + \ 'text': 'file error', + \ 'type': 'E', + \ }, + \], GetSimplerLoclist() + +Execute(The Save event should set b:ale_save_event_fired to 1): + let g:ale_lint_on_save = 1 + let b:ale_enabled = 1 + + call ale#linter#Reset() + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + " This flag needs to be set so windows can be opened, etc. + AssertEqual 1, b:ale_save_event_fired + +Execute(b:ale_save_event_fired should be set to 0 when results are set): + let b:ale_save_event_fired = 1 + + call ale#engine#SetResults(bufnr(''), []) + call ale#test#FlushJobs() + + AssertEqual 0, b:ale_save_event_fired + +Execute(lint_file linters should stay running after checking without them): + let g:ale_run_synchronously = 0 + + " Run all linters, then just the buffer linters. + call ale#Queue(0, 'lint_file') + call ale#Queue(0) + + " The lint_file linter should still be running. + AssertEqual + \ ['lint_file_linter', 'buffer_linter'], + \ map(copy(g:ale_buffer_info[bufnr('')].active_linter_list), 'v:val.name') + " We should have 1 job for each linter. + AssertEqual + \ 2, + \ len(keys(get(get(ale#command#GetData(), bufnr(''), {}), 'jobs', {}))) + + call ale#test#WaitForJobs(2000) + +Execute(The save event should not lint the buffer when ALE is disabled): + let g:ale_enabled = 0 + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual [], GetSimplerLoclist() + AssertEqual 0, b:ale_save_event_fired diff --git a/dot_vim/plugged/ale/test/test_lint_on_enter_when_file_changed.vader b/dot_vim/plugged/ale/test/test_lint_on_enter_when_file_changed.vader new file mode 100644 index 0000000..9d5e64e --- /dev/null +++ b/dot_vim/plugged/ale/test/test_lint_on_enter_when_file_changed.vader @@ -0,0 +1,84 @@ +Before: + Save &filetype + Save g:ale_buffer_info + Save g:ale_lint_on_enter + Save g:ale_set_lists_synchronously + + let g:buf = bufnr('') + let g:ale_lint_on_enter = 1 + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + + function! TestCallback(buffer, output) + return [{ + \ 'lnum': 1, + \ 'col': 3, + \ 'text': 'baz boz', + \}] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': has('win32') ? 'echo' : 'true', + \}) + +After: + Restore + unlet! g:buf + let g:ale_run_synchronously = 0 + delfunction TestCallback + call ale#linter#Reset() + call setloclist(0, []) + +Execute(The file changed event function should set b:ale_file_changed): + let g:ale_lint_on_enter = 0 + + if has('gui_running') + new + else + e test + endif + + call ale#events#FileChangedEvent(g:buf) + close + + " We should set the flag in the other buffer + AssertEqual 1, getbufvar(g:buf, 'ale_file_changed') + +Execute(The file changed event function should lint the current buffer when it has changed): + set filetype=foobar + call ale#events#FileChangedEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual [{ + \ 'bufnr': bufnr(''), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'baz boz', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }], ale#test#GetLoclistWithoutNewerKeys() + +Execute(The buffer should be checked after entering it after the file has changed): + let b:ale_file_changed = 1 + + set filetype=foobar + call ale#events#ReadOrEnterEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual [{ + \ 'bufnr': bufnr(''), + \ 'lnum': 1, + \ 'vcol': 0, + \ 'col': 3, + \ 'text': 'baz boz', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \ }], ale#test#GetLoclistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_lint_on_filetype_changed.vader b/dot_vim/plugged/ale/test/test_lint_on_filetype_changed.vader new file mode 100644 index 0000000..cfc99d5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_lint_on_filetype_changed.vader @@ -0,0 +1,77 @@ +Before: + Save &filetype + Save g:ale_lint_on_filetype_changed + + let g:ale_lint_on_filetype_changed = 1 + let g:queue_calls = [] + + function! ale#Queue(...) + call add(g:queue_calls, a:000) + endfunction + +After: + Restore + + unlet! g:queue_calls + + " Reload the ALE code to load the real function again. + runtime autoload/ale.vim + + unlet! b:ale_original_filetype + +Execute(The original filetype should be set on BufEnter): + let &filetype = 'foobar' + + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 'foobar', b:ale_original_filetype + + let &filetype = 'bazboz' + + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 'bazboz', b:ale_original_filetype + +Execute(Linting should not be queued when the filetype is the same): + let b:ale_original_filetype = 'foobar' + let g:queue_calls = [] + + call ale#events#FileTypeEvent(bufnr(''), 'foobar') + + AssertEqual [], g:queue_calls + +Execute(Linting should be queued when the filetype changes): + let b:ale_original_filetype = 'foobar' + let g:queue_calls = [] + + call ale#events#FileTypeEvent(bufnr(''), 'bazboz') + + AssertEqual [[300, 'lint_file', bufnr('')]], g:queue_calls + " The original filetype should be updated, so we don't trigger linting + " by setting a filetype equal to what it already is. + AssertEqual 'bazboz', b:ale_original_filetype + +Execute(Linting should be done when the original filetype was blank): + let b:ale_original_filetype = '' + + call ale#events#FileTypeEvent(bufnr(''), 'bazboz') + + AssertEqual [[300, 'lint_file', bufnr('')]], g:queue_calls + AssertEqual 'bazboz', b:ale_original_filetype + +Execute(Linting should not be done when the setting is off): + let b:ale_original_filetype = 'foobar' + let g:ale_lint_on_filetype_changed = 0 + + call ale#events#FileTypeEvent(bufnr(''), 'bazboz') + + AssertEqual [], g:queue_calls + " We should still update the old filetype + AssertEqual 'bazboz', b:ale_original_filetype + +Execute(Linting should be done when the original filetype was not set): + unlet! b:ale_original_filetype + + call ale#events#FileTypeEvent(bufnr(''), 'bazboz') + + AssertEqual [], g:queue_calls diff --git a/dot_vim/plugged/ale/test/test_linter_defintion_processing.vader b/dot_vim/plugged/ale/test/test_linter_defintion_processing.vader new file mode 100644 index 0000000..4c096a5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_linter_defintion_processing.vader @@ -0,0 +1,501 @@ +Before: + Save g:ale_root + Save b:ale_root + + let g:ale_root = {} + unlet! b:ale_root + + let g:linter = {} + +After: + unlet g:linter + +Execute (PreProcess should throw when the linter object is not a Dictionary): + AssertThrows call ale#linter#PreProcess('testft', '') + AssertEqual 'The linter object must be a Dictionary', g:vader_exception + +Execute (PreProcess should throw when there is no name): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \}) + AssertEqual '`name` must be defined to name the linter', g:vader_exception + +Execute (PreProcess should throw when there is no callback): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'executable': 'echo', + \ 'command': 'echo', + \}) + AssertEqual '`callback` must be defined with a callback to accept output', g:vader_exception + +Execute (PreProcess should throw when then callback is not a function): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 1, + \ 'executable': 'echo', + \ 'command': 'echo', + \}) + AssertEqual '`callback` must be defined with a callback to accept output', g:vader_exception + +Execute (PreProcess should throw when there is no executable): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'command': 'echo', + \}) + AssertEqual '`executable` must be defined', g:vader_exception + +Execute (PreProcess should throw when executable is not a string): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 123, + \ 'command': 'echo', + \}) + AssertEqual '`executable` must be a String or Function if defined', g:vader_exception + +Execute (PreProcess should allow executable to be a callback): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': function('type'), + \ 'command': 'echo', + \}) + +Execute (PreProcess should throw when there is no command): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \}) + AssertEqual '`command` must be defined', g:vader_exception + +Execute (PreProcess should throw when command is not a string): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': [], + \}) + AssertEqual '`command` must be a String or Function if defined', g:vader_exception + +Execute (PreProcess should allow command to be a callback): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': function('type'), + \}) + +Execute (PreProcess should throw when cwd is not a string): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'cwd': [], + \ 'command': 'echo', + \}) + AssertEqual '`cwd` must be a String or Function if defined', g:vader_exception + +Execute (PreProcess should allow cwd to be a callback): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'cwd': function('type'), + \ 'command': 'echo', + \}) + +Execute (PreProcess should allow cwd to be a string): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'cwd': '/foo/bar', + \ 'command': 'echo', + \}) + +Execute (PreProcess should when the output stream isn't a valid string): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \ 'output_stream': 'xxx', + \}) + AssertEqual "`output_stream` must be 'stdout', 'stderr', or 'both'", g:vader_exception + +Execute (PreProcess should not throw when everything is correct): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \}) + +Execute (PreProcess should accept an stdout output_stream): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \ 'output_stream': 'stdout', + \}) + +Execute (PreProcess should accept an stderr output_stream): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \ 'output_stream': 'stderr', + \}) + +Execute (PreProcess should accept a 'both' output_stream): + call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \ 'output_stream': 'both', + \}) + +Execute(PreProcess should process the read_buffer option correctly): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'read_buffer': '0', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`read_buffer` must be `0` or `1`', g:vader_exception + + let g:linter.read_buffer = 0 + + call ale#linter#PreProcess('testft', g:linter) + + let g:linter.read_buffer = 1 + + call ale#linter#PreProcess('testft', g:linter) + +Execute(PreProcess should set a default value for read_buffer): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \} + + AssertEqual 1, ale#linter#PreProcess('testft', g:linter).read_buffer + +Execute(PreProcess should process the lint_file option correctly): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'lint_file': 'x', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`lint_file` must be `0`, `1`, or a Function', g:vader_exception + + let g:linter.lint_file = 0 + + AssertEqual 0, ale#linter#PreProcess('testft', g:linter).lint_file + " The default for read_buffer should be 1 when lint_file is 0 + AssertEqual 1, ale#linter#PreProcess('testft', g:linter).read_buffer + + let g:linter.lint_file = 1 + + AssertEqual 1, ale#linter#PreProcess('testft', g:linter).lint_file + " The default for read_buffer should still be 1 + AssertEqual 1, ale#linter#PreProcess('testft', g:linter).read_buffer + + let g:linter.read_buffer = 1 + + " We should be able to set `read_buffer` and `lint_file` at the same time. + AssertEqual 1, ale#linter#PreProcess('testft', g:linter).read_buffer + + let g:linter.lint_file = function('type') + + Assert type(ale#linter#PreProcess('testft', g:linter).lint_file) is v:t_func + +Execute(PreProcess should set a default value for lint_file): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \} + + AssertEqual 0, ale#linter#PreProcess('testft', g:linter).lint_file + +Execute(PreProcess should set a default value for aliases): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \} + + AssertEqual [], ale#linter#PreProcess('testft', g:linter).aliases + +Execute(PreProcess should complain about invalid `aliases` values): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'aliases': 'foo', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`aliases` must be a List of String values', g:vader_exception + + let g:linter.aliases = [1] + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`aliases` must be a List of String values', g:vader_exception + +Execute(PreProcess should accept `aliases` lists): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'aliases': [], + \} + + AssertEqual [], ale#linter#PreProcess('testft', g:linter).aliases + + let g:linter.aliases = ['foo', 'bar'] + + AssertEqual ['foo', 'bar'], ale#linter#PreProcess('testft', g:linter).aliases + +Execute(PreProcess should accept tsserver LSP configuration): + let g:linter = { + \ 'name': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'lsp': 'tsserver', + \ 'language': 'x', + \ 'project_root': 'x', + \} + + AssertEqual 'tsserver', ale#linter#PreProcess('testft', g:linter).lsp + +Execute(PreProcess should accept stdio LSP configuration): + let g:linter = { + \ 'name': 'x', + \ 'executable': 'x', + \ 'command': 'x', + \ 'lsp': 'stdio', + \ 'language': 'x', + \ 'project_root': 'x', + \} + + AssertEqual 'stdio', ale#linter#PreProcess('testft', g:linter).lsp + +Execute(PreProcess should accept LSP server configurations): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'foobar', + \ 'project_root': 'x', + \} + + AssertEqual 'socket', ale#linter#PreProcess('testft', g:linter).lsp + +Execute(PreProcess should accept let you specify the `language` as a Function): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': {-> 'foobar'}, + \ 'project_root': 'x', + \} + + AssertEqual 'foobar', ale#linter#PreProcess('testft', g:linter).language(bufnr('')) + +Execute(PreProcess should complain about invalid language values): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 0, + \ 'project_root': 'x', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`language` must be a String or Function if defined', g:vader_exception + +Execute(PreProcess should use the filetype as the language string by default): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'project_root': 'x', + \} + + AssertEqual 'testft', ale#linter#PreProcess('testft', g:linter).language + +Execute(PreProcess should require an `address` for LSP socket configurations): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`address` must be defined for getting the LSP address', g:vader_exception + +Execute(PreProcess should complain about `address` for non-LSP linters): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'SomeFunction', + \ 'executable': 'echo', + \ 'command': 'echo', + \ 'address': 'X', + \} + + AssertThrows call ale#linter#PreProcess('testft', g:linter) + AssertEqual '`address` cannot be used when lsp != ''socket''', g:vader_exception + +Execute(PreProcess accept `address` as a String): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'foo:123', + \ 'language': 'x', + \ 'project_root': 'x', + \}) + + AssertEqual 'foo:123', ale#linter#GetAddress(0, g:linter) + +Execute(PreProcess accept address as a Function): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': {-> 'foo:123'}, + \ 'language': 'x', + \ 'project_root': 'x', + \}) + + AssertEqual 'foo:123', ale#linter#GetAddress(0, g:linter) + +Execute(PreProcess should complain about invalid address values): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 0, + \ 'language': 'x', + \ 'project_root': 'x', + \}) + AssertEqual '`address` must be a String or Function if defined', g:vader_exception + +Execute(PreProcess should allow the `project_root` to be set as a String): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'foo:123', + \ 'language': 'x', + \ 'project_root': '/foo/bar', + \}) + + AssertEqual '/foo/bar', ale#lsp_linter#FindProjectRoot(0, g:linter) + +Execute(PreProcess should `project_root` be set as a Function): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'foo:123', + \ 'language': 'x', + \ 'project_root': {-> '/foo/bar'}, + \}) + + AssertEqual '/foo/bar', ale#lsp_linter#FindProjectRoot(0, g:linter) + +Execute(PreProcess should complain when `project_root` is invalid): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'foo:123', + \ 'language': 'x', + \ 'project_root': 0, + \}) + AssertEqual '`project_root` must be a String or Function', g:vader_exception + +Execute(PreProcess should throw when `initialization_options` is not a Dictionary or callback): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'initialization_options': 0, + \}) + AssertEqual '`initialization_options` must be a Dictionary or Function if defined', g:vader_exception + +Execute(PreProcess should accept `initialization_options` as a Dictionary): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'initialization_options': {'foo': v:true}, + \}) + + AssertEqual {'foo': v:true}, ale#lsp_linter#GetOptions(0, g:linter) + +Execute(PreProcess should accept `initialization_options` as a Function): + let g:linter = ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'initialization_options': {-> {'foo': v:true}}, + \}) + + AssertEqual {'foo': v:true}, ale#lsp_linter#GetOptions(0, g:linter) + +Execute(PreProcess should accept `lsp_config` as a Dictionary): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'lsp_config': {'foo': 'bar'}, + \} + + AssertEqual {'foo': 'bar'}, ale#lsp_linter#GetConfig(0, g:linter) + +Execute(PreProcess should accept `lsp_config` as a Function): + let g:linter = { + \ 'name': 'x', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'lsp_config': {-> {'foo': 'bar'}}, + \} + + AssertEqual {'foo': 'bar'}, ale#lsp_linter#GetConfig(0, g:linter) + +Execute(PreProcess should throw when `lsp_config` is not a Dictionary or Function): + AssertThrows call ale#linter#PreProcess('testft', { + \ 'name': 'foo', + \ 'lsp': 'socket', + \ 'address': 'X', + \ 'language': 'x', + \ 'project_root': 'x', + \ 'lsp_config': 'x', + \}) + AssertEqual '`lsp_config` must be a Dictionary or Function if defined', g:vader_exception diff --git a/dot_vim/plugged/ale/test/test_linter_retrieval.vader b/dot_vim/plugged/ale/test/test_linter_retrieval.vader new file mode 100644 index 0000000..88885b7 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_linter_retrieval.vader @@ -0,0 +1,190 @@ +Before: + Save g:ale_linters + Save g:ale_linter_aliases + + let g:testlinter1 = {'name': 'testlinter1', 'executable': 'testlinter1', 'command': 'testlinter1', 'callback': 'testCB1', 'output_stream': 'stdout', 'read_buffer': 1, 'lint_file': 0, 'aliases': [], 'lsp': ''} + let g:testlinter2 = {'name': 'testlinter2', 'executable': 'testlinter2', 'command': 'testlinter2', 'callback': 'testCB2', 'output_stream': 'stdout', 'read_buffer': 0, 'lint_file': 1, 'aliases': [], 'lsp': ''} + call ale#linter#Reset() + call ale#linter#PreventLoading('testft') + call ale#linter#PreventLoading('javascript') + call ale#linter#PreventLoading('typescript') + +After: + Restore + + unlet! g:testlinter1 + unlet! g:testlinter2 + unlet! b:ale_linters + unlet! b:ale_linter_aliases + call ale#linter#Reset() + +Execute (You should be able to get a defined linter): + call ale#linter#Define('testft', g:testlinter1) + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (You should be able get select a single linter): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1']} + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (You should be able to select a linter by an alias): + let g:testlinter1.aliases = ['foo', 'linter1alias'] + + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['linter1alias']} + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (You should be able to select linters with a buffer option): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1', 'testlinter2']} + let b:ale_linters = {'testft': ['testlinter1']} + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (b:ale_linters should work when set to a List): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1', 'testlinter2']} + let b:ale_linters = ['testlinter1'] + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (b:ale_linters should disable all linters when set to an empty List): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1', 'testlinter2']} + let b:ale_linters = [] + + AssertEqual [], ale#linter#Get('testft') + +Execute (b:ale_linters should enable all available linters when set to 'all'): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1']} + let b:ale_linters = 'all' + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft') + +Execute (Buffer settings shouldn't completely replace global settings): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1']} + let b:ale_linters = {'testft2': ['testlinter1', 'testlinter2']} + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (You should be able to alias linters from one filetype to another): + call ale#linter#Define('testft1', g:testlinter1) + let g:ale_linter_aliases = {'testft2': 'testft1'} + + AssertEqual [g:testlinter1], ale#linter#Get('testft2') + +Execute (You should be able to filter aliased linters): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft1', g:testlinter2) + let g:ale_linters = {'testft1': ['testlinter1'], 'testft2': ['testlinter2']} + let g:ale_linter_aliases = {'testft2': 'testft1'} + + AssertEqual [g:testlinter1], ale#linter#Get('testft1') + AssertEqual [g:testlinter2], ale#linter#Get('testft2') + +Execute (Dot-separated filetypes should be handled correctly): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1.testft2') + +Execute (Linters for multiple aliases should be loaded): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let ale_linter_aliases = {'testft3': ['testft1', 'testft2']} + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft3') + +Execute (You should be able to alias filetypes to themselves and another): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1') + +Execute (Buffer-local overrides for aliases should be used): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let g:ale_linter_aliases = {'testft1': ['testft2']} + let b:ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1') + +Execute (The local alias option shouldn't completely replace the global one): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let g:ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + " This is a key set for a different filetype. + " We should look for a key in this Dictionary first, and then check the + " global Dictionary. + let b:ale_linter_aliases = {'testft3': ['testft1']} + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1') + +Execute (Lists should be accepted for local aliases): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let g:ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + " We should load the testft2 linters for this buffer, with no duplicates. + let b:ale_linter_aliases = ['testft2'] + + AssertEqual [g:testlinter2], ale#linter#Get('anything.else') + +Execute (Strings should be accepted for local aliases): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let g:ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + " We should load the testft2 linters for this buffer, with no duplicates. + let b:ale_linter_aliases = 'testft2' + + AssertEqual [g:testlinter2], ale#linter#Get('anything.else') + +Execute (Buffer-local overrides for aliases should be used): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let g:ale_linter_aliases = {'testft1': ['testft2']} + let b:ale_linter_aliases = {'testft1': ['testft1', 'testft2']} + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1') + +Execute (Linters new linters with the same name should replace old ones): + let g:testlinter1.name = g:testlinter2.name + + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft1', g:testlinter2) + + AssertEqual [g:testlinter2], ale#linter#GetAll(['testft1']) + +Execute (Linters should be loaded from disk appropriately): + call ale#linter#Reset() + AssertEqual [{'name': 'testlinter', 'output_stream': 'stdout', 'executable': 'testlinter', 'command': 'testlinter', 'callback': 'testCB', 'read_buffer': 1, 'lint_file': 0, 'aliases': [], 'lsp': ''}], ale#linter#Get('testft') + + +Execute (Linters for later filetypes should replace the former ones): + call ale#linter#Define('javascript', { + \ 'name': 'eslint', + \ 'executable': 'y', + \ 'command': 'y', + \ 'callback': 'y', + \}) + call ale#linter#Define('typescript', { + \ 'name': 'eslint', + \ 'executable': 'x', + \ 'command': 'x', + \ 'callback': 'x', + \}) + + AssertEqual [ + \ {'output_stream': 'stdout', 'lint_file': 0, 'read_buffer': 1, 'name': 'eslint', 'executable': 'x', 'lsp': '', 'aliases': [], 'command': 'x', 'callback': 'x'} + \], ale#linter#Get('javascript.typescript') diff --git a/dot_vim/plugged/ale/test/test_linter_type_mapping.vader b/dot_vim/plugged/ale/test/test_linter_type_mapping.vader new file mode 100644 index 0000000..0ec22a5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_linter_type_mapping.vader @@ -0,0 +1,120 @@ +Before: + Save g:ale_type_map + +After: + Restore + unlet! b:ale_type_map + +Execute(It should be possible to remap errors to style errors): + let g:ale_type_map = {'foo': {'E': 'ES'}} + + AssertEqual + \ [ + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) + +Execute(It should be possible to remap errors to style errors with buffer-local variables): + let b:ale_type_map = {'foo': {'E': 'ES'}} + + AssertEqual + \ [ + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) + +Execute(It should be possible to remap warnings to style warnings): + let g:ale_type_map = {'foo': {'W': 'WS'}} + + AssertEqual + \ [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) + +Execute(It should be possible to remap style errors to errors): + let g:ale_type_map = {'foo': {'ES': 'E'}} + + AssertEqual + \ [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) + +Execute(It should be possible to remap style warnings to warnings): + let g:ale_type_map = {'foo': {'WS': 'W'}} + + AssertEqual + \ [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) + +Execute(It should be possible to info problems to warnings): + let g:ale_type_map = {'foo': {'I': 'W'}} + + AssertEqual + \ [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1, 'linter_name': 'foo'}, + \ ], + \ ale#engine#FixLocList(bufnr(''), 'foo', 0, [ + \ {'type': 'E', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'E', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'W', 'sub_type': 'style', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ {'type': 'I', 'lnum': 1, 'text': 'x', 'bufnr': bufnr(''), 'col': 0, 'vcol': 0, 'nr': -1}, + \ ]) diff --git a/dot_vim/plugged/ale/test/test_linting_blacklist.vader b/dot_vim/plugged/ale/test/test_linting_blacklist.vader new file mode 100644 index 0000000..2bcc957 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_linting_blacklist.vader @@ -0,0 +1,16 @@ +Before: + let g:ale_buffer_info = {} + +After: + call ale#engine#Cleanup(bufnr('')) + + let g:ale_buffer_info = {} + +Given unite (A Unite.vim file): + anything + +Execute(Running ALE on a blacklisted file shouldn't change anything): + call ale#Queue(0) + call ale#test#WaitForJobs(2000) + + AssertEqual {}, g:ale_buffer_info diff --git a/dot_vim/plugged/ale/test/test_linting_updates_loclist.vader b/dot_vim/plugged/ale/test/test_linting_updates_loclist.vader new file mode 100644 index 0000000..41c8652 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_linting_updates_loclist.vader @@ -0,0 +1,96 @@ +Before: + Save g:ale_echo_cursor + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + Save g:ale_run_synchronously + Save g:ale_set_lists_synchronously + Save g:ale_buffer_info + Save g:ale_sign_offset + + " We want to check that sign IDs are set for this test. + let g:ale_set_signs = 1 + let g:ale_set_loclist = 1 + let g:ale_sign_offset = 2000000 + " Disable features we don't need for these tests. + let g:ale_set_quickfix = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + let g:ale_buffer_info = {} + + function! TestCallback(buffer, output) + return [ + \ { + \ 'lnum': 1, + \ 'type': 'W', + \ 'col': 10, + \ 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]', + \ }, + \ { + \ 'lnum': 2, + \ 'type': 'E', + \ 'col': 10, + \ 'text': 'Missing semicolon. [Error/semi]', + \ } + \] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd': 'true', + \ 'command': 'true', + \ 'read_buffer': 0, + \}) + + sign unplace * + + call ale#engine#Cleanup(bufnr('')) + +After: + Restore + + delfunction TestCallback + + call ale#linter#Reset() + + sign unplace * + +Given foobar (Some JavaScript with problems): + var y = 3+3; + var y = 3 + +Execute(The loclist should be updated after linting is done): + ALELint + call ale#test#FlushJobs() + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'testlinter', + \ 'nr': -1, + \ 'type': 'W', + \ 'col': 10, + \ 'text': 'Infix operators must be spaced. [Warning/space-infix-ops]', + \ 'sign_id': 2000001, + \ }, + \ { + \ 'lnum': 2, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'testlinter', + \ 'nr': -1, + \ 'type': 'E', + \ 'col': 10, + \ 'text': 'Missing semicolon. [Error/semi]', + \ 'sign_id': 2000002, + \ } + \ ], + \ get(get(g:ale_buffer_info, bufnr('%'), {}), 'loclist', []) diff --git a/dot_vim/plugged/ale/test/test_list_formatting.vader b/dot_vim/plugged/ale/test/test_list_formatting.vader new file mode 100644 index 0000000..eaa67a9 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_list_formatting.vader @@ -0,0 +1,188 @@ +Before: + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_loclist_msg_format + Save g:ale_open_list + Save g:ale_buffer_info + Save g:ale_set_lists_synchronously + + let g:ale_set_lists_synchronously = 1 + let g:ale_loclist_msg_format = '%code: %%s' + let g:ale_open_list = 0 + let g:loclist = [] + let g:ale_buffer_info = {bufnr(''): {'loclist': g:loclist}} + + function! AddItem(data) abort + let l:item = { + \ 'bufnr': bufnr(''), + \ 'lnum': 1, + \ 'col': 1, + \ 'type': 'E', + \ 'linter_name': 'some_linter', + \} + + call add(g:loclist, extend(l:item, a:data)) + endfunction + +After: + Restore + + unlet! g:loclist + unlet! b:ale_loclist_msg_format + + delfunction AddItem + + call setloclist(0, []) + call setqflist([]) + +Execute(Formatting with codes should work for the loclist): + call AddItem({'text': "nocode\r"}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'nocode', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + call remove(g:loclist, 0) + call AddItem({'text': 'withcode', 'code': 'E123'}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'E123: withcode', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(Formatting with codes should work for the quickfix list): + let g:ale_set_loclist = 0 + let g:ale_set_quickfix = 1 + + call AddItem({'text': "nocode\r"}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'nocode', + \ }, + \ ], + \ ale#test#GetQflistWithoutNewerKeys() + + call remove(g:loclist, 0) + call AddItem({'text': 'withcode', 'code': 'E123'}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'E123: withcode', + \ }, + \ ], + \ ale#test#GetQflistWithoutNewerKeys() + +Execute(Formatting with the linter name should work for the loclist): + let g:ale_loclist_msg_format = '(%linter%) %s' + + call AddItem({'text': 'whatever'}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': '(some_linter) whatever', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(Formatting with the linter name should work for the quickfix list): + let g:ale_loclist_msg_format = '(%linter%) %s' + let g:ale_set_loclist = 0 + let g:ale_set_quickfix = 1 + + call AddItem({'text': 'whatever'}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': '(some_linter) whatever', + \ }, + \ ], + \ ale#test#GetQflistWithoutNewerKeys() + +Execute(The buffer loclist format option should take precedence): + let g:ale_loclist_msg_format = '(%linter%) %s' + let b:ale_loclist_msg_format = 'FOO %s' + + call AddItem({'text': 'whatever'}) + call ale#list#SetLists(bufnr(''), g:loclist) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 1, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'FOO whatever', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_list_opening.vader b/dot_vim/plugged/ale/test/test_list_opening.vader new file mode 100644 index 0000000..4400418 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_list_opening.vader @@ -0,0 +1,290 @@ +" Author: Yann Fery +Before: + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_open_list + Save g:ale_keep_list_window_open + Save g:ale_list_window_size + Save g:ale_list_vertical + Save g:ale_buffer_info + Save g:ale_set_lists_synchronously + + let g:ale_set_loclist = 1 + let g:ale_set_quickfix = 0 + let g:ale_open_list = 0 + let g:ale_keep_list_window_open = 0 + let g:ale_list_window_size = 10 + let g:ale_list_vertical = 0 + let g:ale_set_lists_synchronously = 1 + + let g:loclist = [ + \ {'bufnr': bufnr(''), 'lnum': 5, 'col': 5, 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 5, 'col': 4, 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 2, 'col': 10, 'text': 'x'}, + \ {'bufnr': bufnr(''), 'lnum': 3, 'col': 2, 'text': 'x'}, + \] + let g:ale_buffer_info = {bufnr(''): {'loclist': g:loclist}} + + function GetQuickfixHeight() abort + for l:win in range(1, winnr('$')) + if getwinvar(l:win, '&buftype') ==# 'quickfix' + return winheight(l:win) + endif + endfor + + return 0 + endfunction + + " If the window is vertical, window size should match column size/width + function GetQuickfixIsVertical(cols) abort + for l:win in range(1, winnr('$')) + if getwinvar(l:win, '&buftype') is# 'quickfix' + return winwidth(l:win) == a:cols + endif + endfor + + return 0 + endfunction + +After: + Restore + + unlet! g:loclist + unlet! b:ale_list_vertical + unlet! b:ale_list_window_size + unlet! b:ale_open_list + unlet! b:ale_keep_list_window_open + unlet! b:ale_save_event_fired + + delfunction GetQuickfixHeight + delfunction GetQuickfixIsVertical + + " Close quickfix window after every execute block + lcl + ccl + call setloclist(0, []) + call setqflist([]) + +Execute(IsQuickfixOpen should return the right output): + AssertEqual 0, ale#list#IsQuickfixOpen() + call setloclist(0, g:loclist) + lopen + AssertEqual 1, ale#list#IsQuickfixOpen() + lcl + AssertEqual 0, ale#list#IsQuickfixOpen() + call setqflist(g:loclist) + copen + AssertEqual 1, ale#list#IsQuickfixOpen() + ccl + AssertEqual 0, ale#list#IsQuickfixOpen() + +Execute(The quickfix window should not open by default for the loclist): + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert !ale#list#IsQuickfixOpen() + +Execute(The quickfix window should open for just the loclist): + let g:ale_open_list = 1 + + " It should not open for an empty list. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + + " With a non-empty loclist, the window must open. + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + + " Clear the list and it should close again. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + +Execute(The quickfix window should open on the correct threshold): + " The window should open for a value lower than number of entries. + let g:ale_open_list = len(g:loclist) - 1 + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + + " Clear the list to be ready for a new value. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + + " It should also open for a value equal to the number of entries. + let g:ale_open_list = len(g:loclist) + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + + " Clear the list again, preparing for a final value. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + + " Window should not open for values higher than number of loclist entries. + let g:ale_open_list = len(g:loclist) + 1 + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert !ale#list#IsQuickfixOpen() + + " Clear the list just to clean up. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen() + +Execute(The quickfix window height should be correct for the loclist): + let g:ale_open_list = 1 + let g:ale_list_window_size = 7 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 7, GetQuickfixHeight() + +Execute(The quickfix window height should be correct for the loclist with buffer variables): + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 8, GetQuickfixHeight() + +Execute(The quickfix window should be vertical for the loclist with appropriate variables): + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + let b:ale_list_vertical = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 1, GetQuickfixIsVertical(8) + +Execute(The quickfix window should be horizontal for the loclist with appropriate variables): + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + let b:ale_list_vertical = 0 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 0, GetQuickfixIsVertical(8) + +Execute(The quickfix window should stay open for just the loclist): + let g:ale_open_list = 1 + let g:ale_keep_list_window_open = 1 + + " The window should stay open after even after it is made blank again. + call ale#list#SetLists(bufnr('%'), g:loclist) + call ale#list#SetLists(bufnr('%'), []) + Assert ale#list#IsQuickfixOpen() + +Execute(The quickfix window should not open by default when quickfix is on): + let g:ale_set_quickfix = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert !ale#list#IsQuickfixOpen() + +Execute(The quickfix window should open for the quickfix list): + let g:ale_set_quickfix = 1 + let g:ale_open_list = 1 + + let g:ale_buffer_info[bufnr('') + 1] = { + \ 'loclist': [{'bufnr': -1, 'filename': '/foo/bar', 'lnum': 5, 'col': 5, 'text': 'x'}], + \} + + " It should not open for an empty list. + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen(), 'The quickfix window was opened when the list was empty' + + " With a non-empty quickfix list, the window must open. + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen(), 'The quickfix window was closed when the list was not empty' + + " Clear this List. The window should stay open, as there are other items. + let g:ale_buffer_info[bufnr('')].loclist = [] + call ale#list#SetLists(bufnr('%'), []) + Assert ale#list#IsQuickfixOpen(), 'The quickfix window closed even though there are items in another buffer' + + " Clear the other List now. Now the window should close. + call remove(g:ale_buffer_info, bufnr('') + 1) + call ale#list#SetLists(bufnr('%'), []) + Assert !ale#list#IsQuickfixOpen(), 'The quickfix window was not closed' + +Execute(The quickfix window should stay open for the quickfix list): + let g:ale_set_quickfix = 1 + let g:ale_open_list = 1 + let g:ale_keep_list_window_open = 1 + + " The window should stay open after even after it is made blank again. + call ale#list#SetLists(bufnr('%'), g:loclist) + call ale#list#SetLists(bufnr('%'), []) + Assert ale#list#IsQuickfixOpen() + +Execute(The quickfix window height should be correct for the quickfix list): + let g:ale_set_quickfix = 1 + let g:ale_open_list = 1 + let g:ale_list_window_size = 7 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 7, GetQuickfixHeight() + +Execute(The quickfix window height should be correct for the quickfix list with buffer variables): + let g:ale_set_quickfix = 1 + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 8, GetQuickfixHeight() + +Execute(The quickfix window should be vertical for the quickfix with appropriate variables): + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + let b:ale_list_vertical = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 1, GetQuickfixIsVertical(8) + +Execute(The quickfix window should be horizontal for the quickfix with appropriate variables): + let g:ale_open_list = 1 + let b:ale_list_window_size = 8 + let b:ale_list_vertical = 0 + + call ale#list#SetLists(bufnr('%'), g:loclist) + + AssertEqual 0, GetQuickfixIsVertical(8) + +Execute(The buffer ale_open_list option should be respected): + let b:ale_open_list = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + Assert ale#list#IsQuickfixOpen() + +Execute(The buffer ale_keep_list_window_open option should be respected): + let b:ale_open_list = 1 + let b:ale_keep_list_window_open = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + call ale#list#SetLists(bufnr('%'), []) + + Assert ale#list#IsQuickfixOpen() + +Execute(The ale_open_list='on_save' option should work): + let b:ale_open_list = 'on_save' + + call ale#list#SetLists(bufnr('%'), g:loclist) + " The list shouldn't open yet, the event wasn't fired. + Assert !ale#list#IsQuickfixOpen() + + " Turn this option off, to ensure that we update lists immediately when we + " save buffers. + let g:ale_set_lists_synchronously = 0 + let b:ale_save_event_fired = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + " Now the list should have opened. + Assert ale#list#IsQuickfixOpen() + + call ale#list#SetLists(bufnr('%'), []) + " The window should close again when the loclist is empty. + Assert !ale#list#IsQuickfixOpen() + +Execute(The window shouldn't open on save when ale_open_list=0): + let b:ale_open_list = 0 + let b:ale_save_event_fired = 1 + + call ale#list#SetLists(bufnr('%'), g:loclist) + " Now the list should have opened. + Assert !ale#list#IsQuickfixOpen() diff --git a/dot_vim/plugged/ale/test/test_list_titles.vader b/dot_vim/plugged/ale/test/test_list_titles.vader new file mode 100644 index 0000000..dfb042f --- /dev/null +++ b/dot_vim/plugged/ale/test/test_list_titles.vader @@ -0,0 +1,77 @@ +Before: + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_buffer_info + Save g:ale_set_lists_synchronously + + let g:ale_buffer_info = {} + let g:ale_set_loclist = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_lists_synchronously = 1 + + call ale#test#SetDirectory('/testplugin/test') + +After: + Restore + + call setloclist(0, []) + call setqflist([]) + + call ale#test#RestoreDirectory() + +Execute(The loclist titles should be set appropriately): + silent noautocmd file foo + + let g:ale_set_loclist = 1 + + call ale#list#SetLists(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 5, 'col': 5, 'text': 'x', 'type': 'E'}, + \]) + + AssertEqual [{ + \ 'lnum': 5, + \ 'bufnr': bufnr(''), + \ 'col': 5, + \ 'text': 'x', + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \}], ale#test#GetLoclistWithoutNewerKeys() + + if !has('nvim') + AssertEqual + \ {'title': ale#path#Simplify(getcwd() . '/foo')}, + \ getloclist(0, {'title': ''}) + endif + +Execute(The quickfix titles should be set appropriately): + silent noautocmd file foo + + let g:ale_set_quickfix = 1 + + let g:ale_buffer_info[bufnr('')] = { + \ 'loclist': [{'bufnr': bufnr(''), 'lnum': 5, 'col': 5, 'text': 'x', 'type': 'E'}], + \} + + call ale#list#SetLists(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 5, 'col': 5, 'text': 'x', 'type': 'E'}, + \]) + AssertEqual [{ + \ 'lnum': 5, + \ 'bufnr': bufnr(''), + \ 'col': 5, + \ 'text': 'x', + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \}], ale#test#GetQflistWithoutNewerKeys() + + if !has('nvim') + AssertEqual + \ {'title': ale#path#Simplify(getcwd() . '/foo')}, + \ getqflist({'title': ''}) + endif diff --git a/dot_vim/plugged/ale/test/test_load_all_linters.vader b/dot_vim/plugged/ale/test/test_load_all_linters.vader new file mode 100644 index 0000000..6806719 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_load_all_linters.vader @@ -0,0 +1,6 @@ +Execute(Exceptions shouldn't be thrown when loading all linters): + " This test will look for errors when loading any of the linter files. + runtime! ale_linters/*/*.vim + +After: + call ale#linter#Reset() diff --git a/dot_vim/plugged/ale/test/test_loclist_binary_search.vader b/dot_vim/plugged/ale/test/test_loclist_binary_search.vader new file mode 100644 index 0000000..219fb31 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_loclist_binary_search.vader @@ -0,0 +1,66 @@ +Before: + let g:loclist = [ + \ {'bufnr': 1, 'lnum': 2, 'col': 10}, + \ {'bufnr': 1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 1, 'lnum': 3, 'col': 10}, + \ {'bufnr': 1, 'lnum': 3, 'col': 12}, + \ {'bufnr': 1, 'lnum': 3, 'col': 25}, + \ {'bufnr': 1, 'lnum': 5, 'col': 4}, + \ {'bufnr': 1, 'lnum': 5, 'col': 5}, + \ {'bufnr': 1, 'lnum': 9, 'col': 5}, + \ {'bufnr': 1, 'lnum': 10, 'col': 1}, + \ {'bufnr': 2, 'lnum': 7, 'col': 10}, + \ {'bufnr': 2, 'lnum': 9, 'col': 2}, + \ {'bufnr': 2, 'lnum': 10, 'col': 2}, + \ {'bufnr': 2, 'lnum': 11, 'col': 2}, + \] + +After: + unlet g:loclist + +Execute(Exact column matches should be correct): + AssertEqual 1, ale#util#BinarySearch(g:loclist, 1, 3, 2) + +Execute(Off lines, there should be no match): + AssertEqual -1, ale#util#BinarySearch(g:loclist, 1, 4, 2) + +Execute(Near column matches should be taken): + AssertEqual 2, ale#util#BinarySearch(g:loclist, 1, 3, 11) + AssertEqual 3, ale#util#BinarySearch(g:loclist, 1, 3, 13) + +Execute(Columns before should be taken when the cursor is far ahead): + AssertEqual 4, ale#util#BinarySearch(g:loclist, 1, 3, 300) + +Execute(The only problems on lines in later columns should be matched): + AssertEqual 7, ale#util#BinarySearch(g:loclist, 1, 9, 1) + +Execute(The only problems on lines in earlier columns should be matched): + AssertEqual 8, ale#util#BinarySearch(g:loclist, 1, 10, 30) + +Execute(Lines for other buffers should not be matched): + AssertEqual -1, ale#util#BinarySearch(g:loclist, 1, 7, 10) + +Execute(Searches for buffers later in the list should work): + AssertEqual 10, ale#util#BinarySearch(g:loclist, 2, 9, 10) + +Execute(Searches should work with just one item): + let g:loclist = [{'bufnr': 1, 'lnum': 3, 'col': 10}] + + AssertEqual 0, ale#util#BinarySearch(g:loclist, 1, 3, 2) + +Execute(Searches should return the last item on a single column): + let g:loclist = [ + \ {'bufnr': 1, 'lnum': 1, 'col': 10, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 10, 'type': 'E'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 11, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 11, 'type': 'E'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 20, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 20, 'type': 'E'}, + \] + + " We should return the index for the last item at some column to the right. + AssertEqual 1, ale#util#BinarySearch(g:loclist, 1, 1, 1) + " We should return the index for the last item at the column we are on. + AssertEqual 3, ale#util#BinarySearch(g:loclist, 1, 1, 11) + " We should prefer items to the left of the cursor, over the right. + AssertEqual 3, ale#util#BinarySearch(g:loclist, 1, 1, 19) diff --git a/dot_vim/plugged/ale/test/test_loclist_corrections.vader b/dot_vim/plugged/ale/test/test_loclist_corrections.vader new file mode 100644 index 0000000..60b1eba --- /dev/null +++ b/dot_vim/plugged/ale/test/test_loclist_corrections.vader @@ -0,0 +1,469 @@ +Before: + Save g:ale_filename_mappings + + let g:ale_filename_mappings = {} + +After: + unlet! b:temp_name + unlet! b:other_bufnr + + Restore + + +Execute(FixLocList should map filenames): + " Paths converted back into temporary filenames shouldn't be included. + let g:ale_filename_mappings = { + \ 'linter2': [['/xxx/', '/data/']], + \ 'linter1': [ + \ ['/bar/', '/data/special/'], + \ ['/foo/', '/data/'], + \ [ + \ ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h')) . '/', + \ '/x-tmp/', + \ ], + \ ], + \} + + AssertEqual + \ [ + \ '/foo/file.txt', + \ v:null, + \ '/bar/file.txt', + \ ], + \ map( + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'linter1', + \ 0, + \ [ + \ {'text': 'x', 'lnum': 1, 'filename': '/data/file.txt'}, + \ {'text': 'x', 'lnum': 1, 'filename': '/x-tmp/file.txt'}, + \ {'text': 'x', 'lnum': 1, 'filename': '/data/special/file.txt'}, + \ ], + \ ), + \ 'get(v:val, ''filename'', v:null)', + \ ) + + +Given foo (Some file with lines to count): + foo12345678 + bar12345678 + baz12345678 + four12345678 + five12345678 + six12345678 + seven12345678 + eight12345678 + nine12345678 + ten12345678 + +Execute(FixLocList should set all the default values correctly): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'b', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': 2}, {'text': 'b', 'lnum': 2}], + \ ) + +Execute(FixLocList should use the values we supply): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 3, + \ 'col': 4, + \ 'bufnr': 10000, + \ 'vcol': 0, + \ 'type': 'W', + \ 'nr': 42, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{ + \ 'text': 'a', + \ 'lnum': 3, + \ 'col': 4, + \ 'bufnr': 10000, + \ 'vcol': 1, + \ 'type': 'W', + \ 'nr': 42, + \ }], + \ ) + +Execute(FixLocList should set items with lines beyond the end to the last line): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'end_lnum': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': 11, 'end_lnum': 12}], + \ ) + +Execute(FixLocList should move line 0 to line 1): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 1, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': 0}], + \ ) + +Execute(FixLocList should convert line and column numbers correctly): + " The numbers should be 10, not 8 as octals. + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': '010', 'col': '010'}], + \ ) + +Execute(FixLocList should pass on end_col values): + " The numbers should be 10, not 8 as octals. + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 10, + \ 'end_col': 12, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 11, + \ 'end_col': 12, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [ + \ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012'}, + \ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12}, + \ ], + \ ) + +Execute(FixLocList should pass on end_lnum values): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 7, + \ 'col': 10, + \ 'end_lnum': 10, + \ 'end_col': 12, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 7, + \ 'col': 11, + \ 'end_lnum': 10, + \ 'end_col': 12, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [ + \ {'text': 'a', 'lnum': '07', 'col': '010', 'end_col': '012', 'end_lnum': '010'}, + \ {'text': 'a', 'lnum': '07', 'col': '011', 'end_col': 12, 'end_lnum': 10}, + \ ], + \ ) + +Execute(FixLocList should allow subtypes to be set): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'sub_type': 'style', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': 11, 'sub_type': 'style'}], + \ ) + +Execute(FixLocList should accept filenames): + let b:other_bufnr = bufnr('/foo/bar/baz', 1) + + " Make sure we actually get another buffer number, or the test is invalid. + AssertNotEqual -1, b:other_bufnr + + call ale#test#SetFilename('test.txt') + + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'filename': expand('%:p'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 3, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'filename': expand('%:p'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 4, + \ 'col': 0, + \ 'bufnr': b:other_bufnr, + \ 'filename': '/foo/bar/baz', + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 5, + \ 'col': 0, + \ 'bufnr': b:other_bufnr, + \ 'filename': '/foo/bar/baz', + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [ + \ {'text': 'a', 'lnum': 2, 'filename': expand('%:p')}, + \ {'text': 'a', 'lnum': 3, 'filename': expand('%:p')}, + \ {'text': 'a', 'lnum': 4, 'filename': '/foo/bar/baz'}, + \ {'text': 'a', 'lnum': 5, 'filename': '/foo/bar/baz'}, + \ ], + \ ) + +Execute(FixLocList should interpret temporary filenames as being the current buffer): + let b:temp_name = tempname() + + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr(''), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ { + \ 'text': 'a', + \ 'lnum': 3, + \ 'col': 0, + \ 'bufnr': bufnr(''), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr(''), + \ 'foobar', + \ 0, + \ [ + \ {'text': 'a', 'lnum': 2, 'filename': b:temp_name}, + \ {'text': 'a', 'lnum': 3, 'filename': substitute(b:temp_name, '\\', '/', 'g')}, + \ ], + \ ) + +Execute(The error code should be passed on): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 10, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ 'code': 'some-code' + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [{'text': 'a', 'lnum': 11, 'code': 'some-code'}], + \ ) + +Execute(FixLocList should mark problems as coming from other sources if requested): + AssertEqual + \ [ + \ { + \ 'text': 'a', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ 'from_other_source': 1, + \ }, + \ { + \ 'text': 'b', + \ 'lnum': 2, + \ 'col': 0, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'type': 'E', + \ 'nr': -1, + \ 'linter_name': 'foobar', + \ 'from_other_source': 1, + \ }, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 1, + \ [{'text': 'a', 'lnum': 2}, {'text': 'b', 'lnum': 2}], + \ ) + +Given(A file with Japanese multi-byte text): + ã¯ã˜ã‚ã¾ã—ã¦! + -ç§ã¯ãƒ¯ãƒ¼ãƒ—ã§ã™ã€‚ +Execute(character positions should be converted to byte positions): + AssertEqual + \ [ + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 0, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 1, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 4, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 13, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 13, 'end_lnum': 1, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 17, 'end_lnum': 2, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ {'lnum': 2, 'bufnr': bufnr(''), 'col': 17, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'}, + \ ], + \ ale#engine#FixLocList( + \ bufnr('%'), + \ 'foobar', + \ 0, + \ [ + \ {'text': 'a', 'lnum': 1, 'col': 0, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 1, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 2, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 3, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 5, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 5, 'end_lnum': 1, 'vcol': 1}, + \ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 7, 'end_lnum': 2, 'vcol': 1}, + \ {'text': 'a', 'lnum': 2, 'col': 7, 'vcol': 1}, + \ ], + \ ) diff --git a/dot_vim/plugged/ale/test/test_loclist_jumping.vader b/dot_vim/plugged/ale/test/test_loclist_jumping.vader new file mode 100644 index 0000000..8ec4e58 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_loclist_jumping.vader @@ -0,0 +1,121 @@ +Before: + let g:ale_buffer_info = { + \ bufnr(''): { + \ 'loclist': [ + \ {'type': 'E', 'bufnr': bufnr('') - 1, 'lnum': 3, 'col': 2}, + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 1, 'col': 2}, + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 1, 'col': 3}, + \ {'type': 'W', 'sub_type': 'style', 'bufnr': bufnr(''), 'lnum': 2, 'col': 1}, + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 2, 'col': 2}, + \ {'type': 'W', 'sub_type': 'style', 'bufnr': bufnr(''), 'lnum': 2, 'col': 3}, + \ {'type': 'W', 'bufnr': bufnr(''), 'lnum': 2, 'col': 6}, + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 2, 'col': 700}, + \ {'type': 'E', 'bufnr': bufnr('') + 1, 'lnum': 3, 'col': 2}, + \ ], + \ }, + \} + + function! TestJump(position, wrap, filter, subtype_filter, pos) + call cursor(a:pos) + + if type(a:position) == type(0) + call ale#loclist_jumping#JumpToIndex(a:position) + else + call ale#loclist_jumping#Jump(a:position, a:wrap, a:filter, + \ a:subtype_filter) + endif + + return getcurpos()[1:2] + endfunction + +After: + let g:ale_buffer_info = {} + delfunction TestJump + +Given foobar (Some imaginary filetype): + 12345678 + 12345678 + +Execute(loclist jumping should jump correctly when not wrapping): + AssertEqual [2, 1], TestJump('before', 0, 'any', 'any', [2, 2]) + AssertEqual [1, 3], TestJump('before', 0, 'any', 'any', [2, 1]) + AssertEqual [2, 3], TestJump('after', 0, 'any', 'any', [2, 2]) + AssertEqual [2, 1], TestJump('after', 0, 'any', 'any', [1, 3]) + AssertEqual [2, 6], TestJump('after', 0, 'any', 'any', [2, 4]) + AssertEqual [2, 8], TestJump('after', 0, 'any', 'any', [2, 6]) + +Execute(loclist jumping should jump correctly when wrapping): + AssertEqual [2, 1], TestJump('before', 1, 'any', 'any', [2, 2]) + AssertEqual [1, 3], TestJump('before', 1, 'any', 'any', [2, 1]) + AssertEqual [2, 3], TestJump('after', 1, 'any', 'any', [2, 2]) + AssertEqual [2, 1], TestJump('after', 1, 'any', 'any', [1, 3]) + AssertEqual [2, 6], TestJump('after', 1, 'any', 'any', [2, 4]) + + AssertEqual [1, 2], TestJump('after', 1, 'any', 'any', [2, 8]) + AssertEqual [2, 8], TestJump('before', 1, 'any', 'any', [1, 2]) + +Execute(loclist jumping should jump correctly with warning filters): + AssertEqual [2, 1], TestJump('after', 0, 'W', 'any', [1, 2]) + AssertEqual [2, 6], TestJump('after', 0, 'W', 'any', [2, 3]) + AssertEqual [2, 1], TestJump('after', 1, 'W', 'any', [2, 6]) + +Execute(loclist jumping should jump correctly with error filters): + AssertEqual [1, 2], TestJump('after', 1, 'E', 'any', [2, 700]) + AssertEqual [2, 2], TestJump('before', 0, 'E', 'any', [2, 700]) + AssertEqual [2, 2], TestJump('after', 1, 'E', 'any', [1, 3]) + +Execute(loclist jumping should jump correctly with sub type filters): + AssertEqual [2, 3], TestJump('after', 0, 'any', 'style', [2, 1]) + AssertEqual [2, 2], TestJump('after', 0, 'any', '', [1, 3]) + AssertEqual [2, 1], TestJump('after', 1, 'any', 'style', [2, 6]) + +Execute(loclist jumping not jump when the loclist is empty): + let g:ale_buffer_info[bufnr('%')].loclist = [] + + AssertEqual [1, 6], TestJump('before', 0, 'any', 'any', [1, 6]) + AssertEqual [1, 6], TestJump('before', 1, 'any', 'any', [1, 6]) + AssertEqual [1, 6], TestJump('after', 0, 'any', 'any', [1, 6]) + AssertEqual [1, 6], TestJump('after', 1, 'any', 'any', [1, 6]) + +Execute(We should be able to jump to the last item): + AssertEqual [2, 8], TestJump(-1, 0, 'any', 'any', [1, 6]) + +Execute(We shouldn't move when jumping to the last item where there are none): + let g:ale_buffer_info[bufnr('%')].loclist = [] + + AssertEqual [1, 6], TestJump(-1, 0, 'any', 'any', [1, 6]) + +Execute(We should be able to jump to the first item): + AssertEqual [1, 2], TestJump(0, 0, 'any', 'any', [1, 6]) + +Execute(We shouldn't move when jumping to the first item where there are none): + let g:ale_buffer_info[bufnr('%')].loclist = [] + + AssertEqual [1, 6], TestJump(0, 0, 'any', 'any', [1, 6]) + +Execute(We should be able to jump when the error line is blank): + " Add a blank line at the end. + call setline(1, getline('.', '$') + ['']) + " Add a problem on the blank line. + call add(g:ale_buffer_info[bufnr('%')].loclist, {'type': 'E', 'bufnr': bufnr(''), 'lnum': 3, 'col': 1}) + + AssertEqual 0, len(getline(3)) + AssertEqual [2, 8], TestJump('before', 0, 'any', 'any', [3, 1]) + AssertEqual [2, 8], TestJump('before', 1, 'any', 'any', [3, 1]) + AssertEqual [3, 1], TestJump('after', 0, 'any', 'any', [3, 1]) + AssertEqual [1, 2], TestJump('after', 1, 'any', 'any', [3, 1]) + +Execute(ALE should jump to column 1 instead of 0): + let g:ale_buffer_info = { + \ bufnr(''): { + \ 'loclist': [ + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 1, 'col': 5}, + \ {'type': 'E', 'bufnr': bufnr(''), 'lnum': 2, 'col': 0}, + \ ], + \ }, + \} + + AssertEqual [2, 1], TestJump('after', 1, 'any', 'any', [1, 5]) + AssertEqual [1, 5], TestJump('after', 1, 'any', 'any', [2, 1]) + AssertEqual [2, 1], TestJump('before', 1, 'any', 'any', [1, 5]) + AssertEqual [1, 5], TestJump('before', 1, 'any', 'any', [2, 1]) diff --git a/dot_vim/plugged/ale/test/test_loclist_sorting.vader b/dot_vim/plugged/ale/test/test_loclist_sorting.vader new file mode 100644 index 0000000..376e743 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_loclist_sorting.vader @@ -0,0 +1,43 @@ +Execute(loclist item should be sorted): + AssertEqual [ + \ {'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2}, + \ {'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2}, + \ {'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2}, + \ {'bufnr': 1, 'lnum': 2, 'col': 10}, + \ {'bufnr': 1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 1, 'lnum': 5, 'col': 4}, + \ {'bufnr': 1, 'lnum': 5, 'col': 5}, + \ {'bufnr': 2, 'lnum': 1, 'col': 2}, + \ {'bufnr': 2, 'lnum': 1, 'col': 5}, + \ {'bufnr': 2, 'lnum': 5, 'col': 5}, + \ {'bufnr': 3, 'lnum': 1, 'col': 1}, + \ ], + \ sort([ + \ {'bufnr': 3, 'lnum': 1, 'col': 1}, + \ {'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2}, + \ {'bufnr': 1, 'lnum': 5, 'col': 5}, + \ {'bufnr': 2, 'lnum': 5, 'col': 5}, + \ {'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2}, + \ {'bufnr': 1, 'lnum': 5, 'col': 4}, + \ {'bufnr': 1, 'lnum': 2, 'col': 10}, + \ {'bufnr': 2, 'lnum': 1, 'col': 5}, + \ {'bufnr': 1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 2, 'lnum': 1, 'col': 2}, + \ {'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2}, + \], 'ale#util#LocItemCompare') + +Execute(Items should be sorted in by their problem priority when they lie on the same column): + AssertEqual [ + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'}, + \ ], + \ sort([ + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'}, + \], 'ale#util#LocItemCompare') diff --git a/dot_vim/plugged/ale/test/test_maven_build_classpath_command.vader b/dot_vim/plugged/ale/test/test_maven_build_classpath_command.vader new file mode 100644 index 0000000..c10f457 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_maven_build_classpath_command.vader @@ -0,0 +1,53 @@ +Before: + Save $PATH + Save $PATHEXT + + let $PATHEXT = '.' + + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/java/javac.vim + let g:expected_wrapper = '' + if has('unix') + let g:expected_wrapper = 'mvnw' + else + let g:expected_wrapper = 'mvnw.cmd' + endif + +After: + Restore + + unlet! g:expected_wrapper + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should use 'mvnw' in classpath command if available): + call ale#test#SetFilename('test-files/maven/maven-java-project/module1/src/main/java/dummy1.java') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module1'), + \ ale#Escape(ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module1/' . g:expected_wrapper)) + \ . ' dependency:build-classpath', + \ ], + \ ale#maven#BuildClasspathCommand(bufnr('')) + +Execute(Should use 'mvn' in classpath command if it is executable and 'mvnw' is unavailable): + call ale#test#SetFilename('test-files/maven/maven-java-project/module2/src/main/java/dummy2.java') + let $PATH .= (has('win32') ? ';' : ':') + \ . ale#path#Simplify(g:dir . '/test-files/maven') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module2'), + \ ale#Escape('mvn') + \ . ' dependency:build-classpath', + \ ], + \ ale#maven#BuildClasspathCommand(bufnr('')) + +Execute(Should return empty string if maven cannot be executed): + call ale#test#SetFilename('test-files/maven/non-maven-project/src/main/java/dummy.java') + + AssertEqual + \ ['', ''], + \ ale#maven#BuildClasspathCommand(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_maven_find_executable.vader b/dot_vim/plugged/ale/test/test_maven_find_executable.vader new file mode 100644 index 0000000..f0f06b1 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_maven_find_executable.vader @@ -0,0 +1,46 @@ +Before: + Save $PATH + Save $PATHEXT + + " Count the maven executable without .exe as executable on Windows + let $PATHEXT = '.' + + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/java/javac.vim + let g:expected_wrapper = '' + if has('unix') + let g:expected_wrapper = 'mvnw' + else + let g:expected_wrapper = 'mvnw.cmd' + endif + +After: + Restore + + unlet! g:expected_wrapper + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return 'mvnw' if found in parent directory): + call ale#test#SetFilename('test-files/maven/maven-java-project/module1/src/main/java/dummy1.java') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module1/' . g:expected_wrapper), + \ ale#maven#FindExecutable(bufnr('')) + +Execute(Should return 'mvn' if 'mvnw' not found in parent directory): + call ale#test#SetFilename('test-files/maven/maven-java-project/module2/src/main/java/dummy2.java') + let $PATH .= (has('win32') ? ';' : ':') + \ . ale#path#Simplify(g:dir . '/test-files/maven') + + AssertEqual + \ 'mvn', + \ ale#maven#FindExecutable(bufnr('')) + +Execute(Should return empty string if 'mvnw' not in parent directory and mvn not in path): + call ale#test#SetFilename('mvn-test-files/java-maven-project/module2/src/main/java/dummy2.java') + + AssertEqual + \ '', + \ ale#gradle#FindExecutable(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_maven_find_project_root.vader b/dot_vim/plugged/ale/test/test_maven_find_project_root.vader new file mode 100644 index 0000000..f761b2e --- /dev/null +++ b/dot_vim/plugged/ale/test/test_maven_find_project_root.vader @@ -0,0 +1,28 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/kotlin/javac.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return directory for 'mvnw' if found in parent directory): + call ale#test#SetFilename('test-files/maven/maven-java-project/module1/src/main/java/dummy1.java') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module1'), + \ ale#maven#FindProjectRoot(bufnr('')) + +Execute(Should return directory for 'pom.xml' if found in parent directory): + call ale#test#SetFilename('test-files/maven/maven-java-project/module2/src/main/java/dummy2.java') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module2'), + \ ale#maven#FindProjectRoot(bufnr('')) + +Execute(Should return empty string if maven files are not found in parent directory): + call ale#test#SetFilename('test-files/maven/non-maven-project/src/main/java/dummy.java') + + AssertEqual + \ '', + \ ale#maven#FindProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_nearest_file_search.vader b/dot_vim/plugged/ale/test/test_nearest_file_search.vader new file mode 100644 index 0000000..f5c12de --- /dev/null +++ b/dot_vim/plugged/ale/test/test_nearest_file_search.vader @@ -0,0 +1,15 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(We should be able to find a configuration file further up): + call ale#test#SetFilename('test-files/top/middle/bottom/dummy.txt') + + AssertEqual + \ ale#path#Simplify(expand('%:p:h:h:h:h:h') . '/test-files/top/example.ini'), + \ ale#path#FindNearestFile(bufnr('%'), 'example.ini') + +Execute(We shouldn't find anything for files which don't match): + AssertEqual '', ale#path#FindNearestFile(bufnr('%'), 'cantfindthis') diff --git a/dot_vim/plugged/ale/test/test_nimlsp_project_root.vader b/dot_vim/plugged/ale/test/test_nimlsp_project_root.vader new file mode 100644 index 0000000..d10989b --- /dev/null +++ b/dot_vim/plugged/ale/test/test_nimlsp_project_root.vader @@ -0,0 +1,19 @@ +Before: + runtime ale_linters/nim/nimlsp.vim + call ale#test#SetDirectory('/testplugin/test') + +After: + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + +Execute(Detect root of nim project with .git/ correctly): + call ale#test#SetFilename('test-files/nim/with-git/src/source.nim') + call mkdir(g:dir . '/.git') + AssertEqual + \ ale#path#Simplify(g:dir), + \ ale_linters#nim#nimlsp#GetProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_no_linting_on_write_quit.vader b/dot_vim/plugged/ale/test/test_no_linting_on_write_quit.vader new file mode 100644 index 0000000..161e616 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_no_linting_on_write_quit.vader @@ -0,0 +1,118 @@ +Before: + Save g:ale_echo_cursor + Save g:ale_fix_on_save + Save g:ale_fixers + Save g:ale_lint_on_save + Save g:ale_set_highlights + Save g:ale_set_lists_synchronously + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + " Disable the things we don't need, but leave enabled what we do. + let g:ale_echo_cursor = 0 + let g:ale_set_signs = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 1 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + function! TestCallback(buffer, output) + return [{'lnum': 1, 'col': 1, 'text': 'xxx'}] + endfunction + + function AddLine(buffer, lines) abort + return a:lines + ['x'] + endfunction + + let g:ale_fixers = { + \ 'testft': ['AddLine'], + \} + + call ale#linter#PreventLoading('testft') + call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'true', + \ 'command': 'true', + \}) + +Given testft (An empty file): + +After: + Restore + + unlet! g:ale_run_synchronously + unlet! b:ale_quitting + delfunction TestCallback + delfunction AddLine + + call ale#linter#Reset() + call setloclist(0, []) + +Execute(No linting should be done on :wq or :x): + let g:ale_lint_on_save = 1 + let g:ale_fix_on_save = 0 + + " First try just the SaveEvent, to be sure that we set errors in the test. + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) + + " Now try doing it again, but where we run the quit event first. + call setloclist(0, []) + call ale#events#QuitEvent(bufnr('')) + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Execute(No linting should be for :w after :q fails): + let g:ale_lint_on_save = 1 + let g:ale_fix_on_save = 0 + + call ale#events#QuitEvent(bufnr('')) + call ale#test#FlushJobs() + + " Simulate 2 seconds passing. + let b:ale_quitting -= 1000 + + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) + +Execute(No linting should be done on :wq or :x after fixing files): + let g:ale_lint_on_save = 1 + let g:ale_fix_on_save = 1 + + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) + + " Now try doing it again, but where we run the quit event first. + call setloclist(0, []) + call ale#events#QuitEvent(bufnr('')) + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Execute(Linting should be done after :q fails and fixing files): + let g:ale_lint_on_save = 1 + let g:ale_fix_on_save = 1 + + call ale#events#QuitEvent(bufnr('')) + call ale#test#FlushJobs() + + " Simulate 2 seconds passing. + let b:ale_quitting -= 1000 + + call ale#events#SaveEvent(bufnr('')) + call ale#test#FlushJobs() + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()) diff --git a/dot_vim/plugged/ale/test/test_organize_imports.vader b/dot_vim/plugged/ale/test/test_organize_imports.vader new file mode 100644 index 0000000..87cd295 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_organize_imports.vader @@ -0,0 +1,172 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:handle_code_action_called = 0 + let g:code_actions = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/organize_imports.vim + runtime autoload/ale/code_action.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + let g:handle_code_action_called = 1 + AssertEqual !&hidden, get(a:options, 'should_save') + call add(g:code_actions, a:code_action) + endfunction + +After: + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#references#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:code_actions + unlet! g:handle_code_action_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/organize_imports.vim + runtime autoload/ale/code_action.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#organize_imports#HandleTSServerResponse(1, {'command': 'foo'}) + AssertEqual g:handle_code_action_called, 0 + +Execute(Failed organizeImports responses should be handled correctly): + call ale#organize_imports#HandleTSServerResponse( + \ 1, + \ {'command': 'organizeImports', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Execute(Code actions from tsserver should be handled): + call ale#organize_imports#HandleTSServerResponse(1, { + \ 'command': 'organizeImports', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': [], + \}) + AssertEqual g:handle_code_action_called, 1 + AssertEqual [{ + \ 'description': 'Organize Imports', + \ 'changes': [], + \}], g:code_actions + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(tsserver organize imports requests should be sent): + call ale#linter#Reset() + runtime ale_linters/typescript/tsserver.vim + + ALEOrganizeImports + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual + \ 'function(''ale#organize_imports#HandleTSServerResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@organizeImports', { + \ 'scope': { + \ 'type': 'file', + \ 'args': { + \ 'file': expand('%:p'), + \ }, + \ }, + \ }] + \ ], + \ g:message_list + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Should result in error message): + call ale#linter#Reset() + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + + ALEOrganizeImports + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual [ + \ 'echom ''OrganizeImports currently only works with tsserver''', + \], g:expr_list diff --git a/dot_vim/plugged/ale/test/test_other_sources.vader b/dot_vim/plugged/ale/test/test_other_sources.vader new file mode 100644 index 0000000..45a7d30 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_other_sources.vader @@ -0,0 +1,153 @@ +Before: + Save g:ale_buffer_info + Save g:ale_set_signs + Save g:ale_set_quickfix + Save g:ale_set_loclist + Save g:ale_set_highlights + Save g:ale_echo_cursor + + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + let g:ale_set_lists_synchronously = 1 + let g:ale_set_signs = 0 + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 1 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + + function! TestCallback(buffer, output) + return [] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', + \}) + +After: + Restore + + unlet! b:ale_linters + unlet! g:want_results_signaled + unlet! g:want_results_buffer_value + unlet! g:lint_pre_signaled + unlet! g:ale_run_synchronously + unlet! g:ale_set_lists_synchronously + + delfunction TestCallback + + augroup VaderTest + autocmd! + augroup END + + augroup! VaderTest + + call ale#linter#Reset() + call setloclist(0, []) + +Given foobar (Some imaginary filetype): +Execute(StartChecking should mark a buffer as being actively checked): + Assert !ale#engine#IsCheckingBuffer(bufnr('')) + + call ale#other_source#StartChecking(bufnr(''), 'other-source-linter') + + Assert ale#engine#IsCheckingBuffer(bufnr('')) + +Execute(ShowResults should make a buffer inactive): + call ale#other_source#StartChecking(bufnr(''), 'other-source-linter') + call ale#other_source#StartChecking(bufnr(''), 'second-other-source-linter') + + call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', []) + + Assert ale#engine#IsCheckingBuffer(bufnr('')) + + call ale#other_source#ShowResults(bufnr(''), 'second-other-source-linter', []) + + Assert !ale#engine#IsCheckingBuffer(bufnr('')) + +Execute(ShowResults should show results at any time): + call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', [ + \ {'text': 'xyz', 'lnum': 1}, + \]) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 0, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': -1, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'xyz', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + + call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', []) + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + +Execute(A regular lint cycle shouldn't clear results from other sources): + call ale#other_source#ShowResults(bufnr(''), 'other-source-linter', [ + \ {'text': 'xyz', 'lnum': 1}, + \]) + ALELint + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 0, + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': -1, + \ 'type': 'E', + \ 'pattern': '', + \ 'text': 'xyz', + \ }, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() + +Execute(ALEWantResults should be signaled when a buffer is checked): + augroup VaderTest + autocmd! + autocmd User ALEWantResults let g:want_results_signaled = 1 + autocmd User ALELintPre let g:lint_pre_signaled = 1 + augroup END + + " Even when all linters are disabled, we should send the signal. + let b:ale_linters = [] + ALELint + + Assert get(g:, 'want_results_signaled') + Assert !get(g:, 'lint_pre_signaled') + +Execute(ALEWantResults should set a variable indicating which buffer is being checked): + augroup VaderTest + autocmd! + autocmd User ALEWantResults let g:want_results_buffer_value = g:ale_want_results_buffer + augroup END + + let b:ale_linters = [] + ALELint + + AssertEqual bufnr(''), g:want_results_buffer_value + +Execute(ALEWantResults should lead to an ALELintPre signal if another source responds): + augroup VaderTest + autocmd! + autocmd User ALEWantResults call ale#other_source#StartChecking(bufnr(''), 'other-source-linter') + autocmd User ALELintPre let g:lint_pre_signaled = 1 + augroup END + + " Even when all linters are disabled, we should send the signal. + let b:ale_linters = [] + ALELint + + Assert get(g:, 'lint_pre_signaled') diff --git a/dot_vim/plugged/ale/test/test_parse_command_args.vader b/dot_vim/plugged/ale/test/test_parse_command_args.vader new file mode 100644 index 0000000..0103b96 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_parse_command_args.vader @@ -0,0 +1,52 @@ +After: + unlet! b:parse_result + + if exists(':ParseTest') + delcommand ParseTest + endif + +Execute(ale#args#Parse should handle empty input): + AssertEqual + \ [{}, ''], + \ ale#args#Parse([], '') + AssertEqual + \ [{}, ''], + \ ale#args#Parse(['foo', 'bar'], '') + +Execute(ale#args#Parse should parse commands correctly): + AssertEqual + \ [{'foo': '', 'bar': ''}, 'leave these alone'], + \ ale#args#Parse(['foo', 'bar'], '-foo -bar leave these alone') + AssertEqual + \ [{'foo': ''}, 'leave these alone'], + \ ale#args#Parse(['foo', 'bar'], '-foo leave these alone') + +Execute(ale#args#Parse should raise errors for unknown arguments): + AssertThrows call ale#args#Parse(['foo', 'bar'], '-nope leave these alone') + AssertEqual 'Invalid argument: -nope', g:vader_exception + +Execute(ale#args#Parse should stop parsing arguments after --): + AssertEqual + \ [{'foo': ''}, ' --nope leave these alone'], + \ ale#args#Parse(['foo', 'bar'], '-foo -- --nope leave these alone') + AssertEqual + \ [{}, '--'], + \ ale#args#Parse(['foo', 'bar'], '-- --') + AssertEqual + \ [{}, ''], + \ ale#args#Parse(['foo', 'bar'], '--') + +Execute(ale#args#Parse should work for an example command): + command! -nargs=* ParseTest let b:parse_result = ale#args#Parse(['foo', 'bar'], ) + + ParseTest + AssertEqual [{}, ''], b:parse_result + + ParseTest -foo + AssertEqual [{'foo': ''}, ''], b:parse_result + + ParseTest -foo -bar + AssertEqual [{'foo': '', 'bar': ''}, ''], b:parse_result + + ParseTest -foo -bar leave these alone + AssertEqual [{'foo': '', 'bar': ''}, 'leave these alone'], b:parse_result diff --git a/dot_vim/plugged/ale/test/test_path_dirname.vader b/dot_vim/plugged/ale/test/test_path_dirname.vader new file mode 100644 index 0000000..818a62a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_path_dirname.vader @@ -0,0 +1,13 @@ +Execute(ale#path#Dirname should return empty strings should be returned for empty values): + AssertEqual '', ale#path#Dirname('') + AssertEqual '', ale#path#Dirname(0) + AssertEqual '', ale#path#Dirname(v:null) + +Execute(ale#path#Dirname should return the dirname of paths): + AssertEqual '/foo', ale#path#Dirname('/foo/bar') + AssertEqual '/foo', ale#path#Dirname('/foo/bar/') + + if has('win32') + AssertEqual 'C:\foo', ale#path#Dirname('C:\foo\bar') + AssertEqual 'C:\foo', ale#path#Dirname('C:\foo\bar\') + endif diff --git a/dot_vim/plugged/ale/test/test_path_equality.vader b/dot_vim/plugged/ale/test/test_path_equality.vader new file mode 100644 index 0000000..ee6ae2c --- /dev/null +++ b/dot_vim/plugged/ale/test/test_path_equality.vader @@ -0,0 +1,82 @@ +Before: + function! CheckPath(path) abort + return ale#path#IsBufferPath(bufnr(''), ale#path#Simplify(a:path)) + endfunction + +After: + delfunction CheckPath + +Execute(ale#path#Simplify should adjust paths correctly): + if has('unix') + " Multiple slashes should be removed correctly. + AssertEqual '/foo/bar/baz', ale#path#Simplify('////foo///bar///baz') + " Back slashes should be converted to forward slashes. + " This means some valid filenames are adjusted incorrectly, but in practice + " no filenames for code should contain back slashes, and adjusting slashes + " like this makes ALE work in MSYS. + AssertEqual 'foo/bar/baz', ale#path#Simplify('foo\bar\baz') + else + " Multiple slashes should be removed correctly. + AssertEqual '\foo\bar\baz', ale#path#Simplify('\\\foo\bar\baz') + " Forward slashes should be replaced with back slashes. + AssertEqual 'foo\bar\baz', ale#path#Simplify('foo/bar/baz') + endif + +Execute(ale#path#IsBufferPath should match simple relative paths): + call ale#test#SetFilename('app/foo.txt') + + Assert CheckPath('app/foo.txt'), 'No match for foo.txt' + Assert !CheckPath('app/bar.txt'), 'Bad match for bar.txt' + +Execute(ale#path#IsBufferPath should match relative paths with dots): + call ale#test#SetFilename('app/foo.txt') + + " Skip these checks on Windows. + if !has('win32') + Assert CheckPath('../../app/foo.txt'), 'No match for ../../app/foo.txt' + endif + +Execute(ale#path#IsBufferPath should match absolute paths): + silent file! foo.txt + + Assert CheckPath(getcwd() . '/foo.txt'), 'No match for foo.txt' + Assert !CheckPath(getcwd() . '/bar.txt'), 'Bad match for bar.txt' + +Execute(ale#path#IsBufferPath should match paths beginning with ./): + silent file! foo.txt + + if !has('win32') + Assert ale#path#IsBufferPath(bufnr(''), './foo.txt'), 'No match for ./foo.txt' + endif + +Execute(ale#path#IsBufferPath should match if our path ends with the test path): + silent file! foo/bar/baz.txt + + Assert CheckPath('bar/baz.txt'), 'No match for bar/baz.txt' + +Execute(ale#path#IsBufferPath should match paths with redundant slashes): + silent file! foo.txt + + Assert CheckPath(getcwd() . '////foo.txt'), 'No match for foo.txt' + +Execute(ale#path#IsBufferPath should accept various names for stdin): + Assert ale#path#IsBufferPath(bufnr(''), '-') + Assert ale#path#IsBufferPath(bufnr(''), 'stdin') + Assert ale#path#IsBufferPath(bufnr(''), '') + Assert ale#path#IsBufferPath(bufnr(''), '') + +Execute(ale#path#IsBufferPath should match files in /tmp): + call ale#test#SetFilename('app/test.ts') + + Assert ale#path#IsBufferPath(bufnr(''), tempname() . '/test.ts') + +Execute(ale#path#IsBufferPath should match Windows paths on Unix): + " This test should pass Unix. + " + " Back slashes in paths should be replaced with forward slashes, even though + " back slashes are valid in filenames on Unix. + if has('unix') + call ale#test#SetFilename('app/foo/test.ts') + + Assert ale#path#IsBufferPath(bufnr(''), 'foo\test.ts') + endif diff --git a/dot_vim/plugged/ale/test/test_path_upwards.vader b/dot_vim/plugged/ale/test/test_path_upwards.vader new file mode 100644 index 0000000..cd461a2 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_path_upwards.vader @@ -0,0 +1,48 @@ +Execute(ale#path#Upwards should return the correct path components): + if has('unix') + " Absolute paths should include / on the end. + AssertEqual + \ ['/foo/bar/baz', '/foo/bar', '/foo', '/'], + \ ale#path#Upwards('/foo/bar/baz') + AssertEqual + \ ['/foo/bar/baz', '/foo/bar', '/foo', '/'], + \ ale#path#Upwards('/foo/bar/baz///') + " Relative paths do not. + AssertEqual + \ ['foo/bar/baz', 'foo/bar', 'foo'], + \ ale#path#Upwards('foo/bar/baz') + AssertEqual + \ ['foo2/bar', 'foo2'], + \ ale#path#Upwards('foo//..////foo2////bar') + " Expect an empty List for empty strings. + AssertEqual [], ale#path#Upwards('') + endif + + if has('win32') + AssertEqual + \ ['C:\foo\bar\baz', 'C:\foo\bar', 'C:\foo', 'C:\'], + \ ale#path#Upwards('C:\foo\bar\baz') + AssertEqual + \ ['C:\foo\bar\baz', 'C:\foo\bar', 'C:\foo', 'C:\'], + \ ale#path#Upwards('C:\foo\bar\baz\\\') + AssertEqual + \ ['/foo\bar\baz', '/foo\bar', '/foo', '/'], + \ ale#path#Upwards('/foo/bar/baz') + AssertEqual + \ ['foo\bar\baz', 'foo\bar', 'foo'], + \ ale#path#Upwards('foo/bar/baz') + AssertEqual + \ ['foo\bar\baz', 'foo\bar', 'foo'], + \ ale#path#Upwards('foo\bar\baz') + " simplify() is used internally, and should sort out \ paths when actually + " running Windows, which we can't test here. + AssertEqual + \ ['foo2\bar', 'foo2'], + \ ale#path#Upwards('foo//..///foo2////bar') + " Expect an empty List for empty strings. + AssertEqual [], ale#path#Upwards('') + " Paths starting with // return / + AssertEqual + \ ['/foo2\bar', '/foo2', '/'], + \ ale#path#Upwards('//foo//..///foo2////bar') + endif diff --git a/dot_vim/plugged/ale/test/test_path_uri.vader b/dot_vim/plugged/ale/test/test_path_uri.vader new file mode 100644 index 0000000..e2daccf --- /dev/null +++ b/dot_vim/plugged/ale/test/test_path_uri.vader @@ -0,0 +1,73 @@ +Before: + scriptencoding utf-8 + +Execute(ale#path#ToFileURI should work for Windows paths): + AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToFileURI('C:\foo\bar\baz.tst') + AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo\bar\baz.tst') + +Execute(ale#path#FromFileURI should work for Unix paths): + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('file:/foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/foo/bar/baz.tst') + +Execute(ale#path#FromFileURI should work for Windows paths): + if has('win32') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst') + else + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:/C:/foo/bar/baz.tst') + AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:///c:/foo/bar/baz.tst') + AssertEqual '/c:/foo/bar/baz.tst', ale#path#FromFileURI('file:/c:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C:/foo/bar/baz.tst') + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C:/foo/bar/baz.tst') + endif + +Execute(ale#path#FromFileURI parse Windows paths with a pipe): + if has('win32') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst') + else + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:///C|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('file:/C|/foo/bar/baz.tst') + AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:///c|/foo/bar/baz.tst') + AssertEqual '/c|/foo/bar/baz.tst', ale#path#FromFileURI('file:/c|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:///C|/foo/bar/baz.tst') + AssertEqual '/C|/foo/bar/baz.tst', ale#path#FromFileURI('FILE:/C|/foo/bar/baz.tst') + endif + +Execute(ale#path#FromFileURI should handle the colon for the drive letter being encoded): + " These URIs shouldn't be created, but we'll handle them anyway. + if has('win32') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst') + else + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromFileURI('file:///C%3A/foo/bar/baz.tst') + endif + +Execute(ale#path#ToFileURI should work for Unix paths): + AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToFileURI('/foo/bar/baz.tst') + AssertEqual 'foo/bar/baz.tst', ale#path#ToFileURI('foo/bar/baz.tst') + +Execute(ale#path#ToFileURI should keep safe characters): + AssertEqual '//a-zA-Z0-9$-_.!*''(),', ale#path#ToFileURI('\/a-zA-Z0-9$-_.!*''(),') + +Execute(ale#path#ToFileURI should percent encode unsafe characters): + AssertEqual '%20%2b%3a%3f%26%3d', ale#path#ToFileURI(' +:?&=') + +Execute(ale#path#FromFileURI should decode percent encodings): + AssertEqual ' +:?&=', ale#path#FromFileURI('%20%2b%3a%3f%26%3d') + +Execute(ale#path#ToFileURI should handle UTF-8): + AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToFileURI('/Téléchargement') + +Execute(ale#path#FromFileURI should handle UTF-8): + AssertEqual '/Téléchargement', ale#path#FromFileURI('file:///T%C3%A9l%C3%A9chargement') diff --git a/dot_vim/plugged/ale/test/test_pattern_options.vader b/dot_vim/plugged/ale/test/test_pattern_options.vader new file mode 100644 index 0000000..3b6500e --- /dev/null +++ b/dot_vim/plugged/ale/test/test_pattern_options.vader @@ -0,0 +1,107 @@ +Before: + Save g:ale_pattern_options + Save g:ale_pattern_options_enabled + Save b:ale_quitting + Save b:ale_original_filetype + Save &filetype + + unlet! b:ale_file_changed + + let g:ale_pattern_options_enabled = 1 + let g:ale_pattern_options = {} + + let b:ale_enabled = 0 + let b:some_option = 0 + + call ale#test#SetDirectory('/testplugin/test') + +After: + Restore + + unlet! b:ale_enabled + unlet! b:some_option + + call ale#test#RestoreDirectory() + +Execute(The pattern options function should work when there are no patterns): + call ale#test#SetFilename('foobar.js') + call ale#events#ReadOrEnterEvent(bufnr('')) + +Execute(Buffer variables should be set when filename patterns match): + let g:ale_pattern_options = { + \ 'baz.*\.js': { + \ 'ale_enabled': 1, + \ 'some_option': 347, + \ '&filetype': 'pattern_option_set_filetype', + \ }, + \} + + call ale#test#SetFilename('foobar.js') + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 0, b:ale_enabled + AssertEqual 0, b:some_option + + call ale#test#SetFilename('bazboz.js') + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 1, b:ale_enabled + AssertEqual 347, b:some_option + AssertEqual 'pattern_option_set_filetype', &filetype + +Execute(Multiple pattern matches should be applied): + let g:ale_pattern_options = { + \ 'foo': { + \ 'some_option': 666, + \ }, + \ 'bar': { + \ 'ale_enabled': 1, + \ 'some_option': 123, + \ }, + \ 'notmatched': { + \ 'some_option': 489, + \ 'ale_enabled': 0, + \ }, + \} + + call ale#test#SetFilename('foobar.js') + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 1, b:ale_enabled + AssertEqual 666, b:some_option + +Execute(Patterns should not be applied when the setting is disabled): + let g:ale_pattern_options_enabled = 0 + let g:ale_pattern_options = {'foo': {'some_option': 666}} + + call ale#test#SetFilename('foobar.js') + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 0, b:some_option + +" This test is important for making sure we update the sorted items. +Execute(Patterns should be applied after the Dictionary changes): + call ale#test#SetFilename('foobar.js') + + let g:ale_pattern_options = {} + + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 0, b:some_option + + let g:ale_pattern_options['foo'] = {'some_option': 666} + + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 666, b:some_option + +Execute(SetOptions should tolerate settings being unset): + " This might happen if ALE is loaded in a weird way, so tolerate it. + unlet! g:ale_pattern_options + unlet! g:ale_pattern_options_enabled + + call ale#events#ReadOrEnterEvent(bufnr('')) + + let g:ale_pattern_options_enabled = 1 + + call ale#events#ReadOrEnterEvent(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_prepare_command.vader b/dot_vim/plugged/ale/test/test_prepare_command.vader new file mode 100644 index 0000000..4e963b8 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_prepare_command.vader @@ -0,0 +1,96 @@ +Before: + Save &shell + Save &shellcmdflag + Save g:ale_shell + Save g:ale_shell_arguments + + Save b:ale_shell + Save b:ale_shell_arguments + + unlet! b:ale_shell + unlet! b:ale_shell_arguments + + unlet! g:ale_shell + unlet! g:ale_shell_arguments + +After: + Restore + +Execute(sh should be used when the shell is fish): + if !has('win32') + " Set something else, so we will replace that too. + let &shellcmdflag = '-f' + let &shell = 'fish' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/bin/fish' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/local/bin/fish' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + endif + +Execute(sh should be used when the shell is powershell): + if !has('win32') + " Set something else, so we will replace that too. + let &shellcmdflag = '-f' + let &shell = 'pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/bin/pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/local/bin/pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + endif + +Execute(Other shells should be used when set): + if !has('win32') + let &shell = '/bin/bash' + let &shellcmdflag = '-c' + let g:ale_shell = &shell + + AssertEqual ['/bin/bash', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + endif + +Execute(cmd /s/c as a string should be used on Windows): + if has('win32') + let &shell = 'who cares' + let &shellcmdflag = 'whatever' + + AssertEqual 'cmd /s/c "foobar"', ale#job#PrepareCommand(bufnr(''), 'foobar') + endif + +Execute(Setting g:ale_shell should cause ale#job#PrepareCommand to use set shell): + let g:ale_shell = '/foo/bar' + + if has('win32') + AssertEqual ['/foo/bar', '/c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + else + AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + endif + + let g:ale_shell_arguments = '-x' + + AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + +Execute(Setting b:ale_shell should cause ale#job#PrepareCommand to use set shell): + let g:ale_shell = '/wrong/foo/bar' + let b:ale_shell = '/foo/bar' + + if has('win32') + AssertEqual ['/foo/bar', '/c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + else + AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") + endif + + let g:ale_shell_arguments = '--verbose -x' + let b:ale_shell_arguments = '-x' + + AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar") diff --git a/dot_vim/plugged/ale/test/test_puppet_path_detection.vader b/dot_vim/plugged/ale/test/test_puppet_path_detection.vader new file mode 100644 index 0000000..e918e91 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_puppet_path_detection.vader @@ -0,0 +1,22 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + + runtime ale_linters/puppet/languageserver.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(old-style module should find its root correctly): + call ale#test#SetFilename('test-files/puppet/old-style-module/manifests/init.pp') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/puppet/old-style-module'), + \ ale_linters#puppet#languageserver#GetProjectRoot(bufnr('')) + +Execute(new-style module should find its root correctly): + call ale#test#SetFilename('test-files/puppet/new-style-module/lib/puppet/types/exampletype.rb') + + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/puppet/new-style-module'), + \ ale_linters#puppet#languageserver#GetProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_python_find_project_root.vader b/dot_vim/plugged/ale/test/test_python_find_project_root.vader new file mode 100644 index 0000000..e323c86 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_python_find_project_root.vader @@ -0,0 +1,11 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(Detect root of Python project with .flake8 correctly): + call ale#test#SetFilename('test-files/python/python-package-project/package-name/module.py') + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/python/python-package-project'), + \ ale#python#FindProjectRoot(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_python_pipenv.vader b/dot_vim/plugged/ale/test/test_python_pipenv.vader new file mode 100644 index 0000000..041e287 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_python_pipenv.vader @@ -0,0 +1,19 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(ale#python#PipenvPresent is true when a pipenv environment is present): + call ale#test#SetFilename('test-files/python/pipenv/whatever.py') + + AssertEqual + \ ale#python#PipenvPresent(bufnr('%')), + \ 1 + +Execute(ale#python#PipenvPresent is false when no pipenv environment is present): + call ale#test#SetFilename('test-files/python/no_pipenv/whatever.py') + + AssertEqual + \ ale#python#PipenvPresent(bufnr('%')), + \ 0 diff --git a/dot_vim/plugged/ale/test/test_python_poetry.vader b/dot_vim/plugged/ale/test/test_python_poetry.vader new file mode 100644 index 0000000..8197b78 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_python_poetry.vader @@ -0,0 +1,19 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(ale#python#poetryPresent is true when a poetry environment is present): + call ale#test#SetFilename('test-files/python/poetry/whatever.py') + + AssertEqual + \ ale#python#PoetryPresent(bufnr('%')), + \ 1 + +Execute(ale#python#poetryPresent is false when no poetry environment is present): + call ale#test#SetFilename('test-files/python/no_poetry/whatever.py') + + AssertEqual + \ ale#python#PoetryPresent(bufnr('%')), + \ 0 diff --git a/dot_vim/plugged/ale/test/test_python_traceback.vader b/dot_vim/plugged/ale/test/test_python_traceback.vader new file mode 100644 index 0000000..6a65998 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_python_traceback.vader @@ -0,0 +1,79 @@ +Execute(ale#python#HandleTraceback returns empty List for empty lines): + AssertEqual + \ [], + \ ale#python#HandleTraceback([], 10) + +Execute(ale#python#HandleTraceback returns traceback, when present): + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'Exception: Example error (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "./example.py", line 5, in ', + \ ' raise Exception(''Example message'')', + \ 'Exception: Example error', + \ ], "\n"), + \ }], + \ ale#python#HandleTraceback([ + \ 'Traceback (most recent call last):', + \ ' File "./example.py", line 5, in ', + \ ' raise Exception(''Example message'')', + \ 'Exception: Example error', + \ ], 1) + +" SyntaxError has extra output lines about the source +Execute(ale#python#HandleTraceback returns SyntaxError traceback): + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'SyntaxError: invalid syntax (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "", line 1, in ', + \ ' File "example.py", line 5', + \ ' +', + \ ' ^', + \ 'SyntaxError: invalid syntax', + \ ], "\n"), + \ }], + \ ale#python#HandleTraceback([ + \ 'Traceback (most recent call last):', + \ ' File "", line 1, in ', + \ ' File "example.py", line 5', + \ ' +', + \ ' ^', + \ 'SyntaxError: invalid syntax', + \ ], 1) + +Execute(ale#python#HandleTraceback ignores traceback after line limit): + AssertEqual + \ [], + \ ale#python#HandleTraceback([ + \ '', + \ 'Traceback (most recent call last):', + \ ' File "./example.py", line 5, in ', + \ ' raise Exception(''Example message'')', + \ 'Exception: Example error', + \ ], 1) + +Execute(ale#python#HandleTraceback doesn't include later lines in detail): + AssertEqual + \ [{ + \ 'lnum': 1, + \ 'text': 'Exception: Example error (See :ALEDetail)', + \ 'detail': join([ + \ 'Traceback (most recent call last):', + \ ' File "./example.py", line 5, in ', + \ ' raise Exception(''Example message'')', + \ 'Exception: Example error', + \ ], "\n"), + \ }], + \ ale#python#HandleTraceback([ + \ 'Traceback (most recent call last):', + \ ' File "./example.py", line 5, in ', + \ ' raise Exception(''Example message'')', + \ 'Exception: Example error', + \ 'file:1:2: Style issue', + \ 'file:3:4: Non-style issue', + \ ], 1) diff --git a/dot_vim/plugged/ale/test/test_python_virtualenv.vader b/dot_vim/plugged/ale/test/test_python_virtualenv.vader new file mode 100644 index 0000000..b44c5fa --- /dev/null +++ b/dot_vim/plugged/ale/test/test_python_virtualenv.vader @@ -0,0 +1,12 @@ +Before: + Save $VIRTUAL_ENV + let $VIRTUAL_ENV = "/opt/example/" + +After: + Restore + +Execute(ale#python#FindVirtualenv falls back to $VIRTUAL_ENV when no directories match): + AssertEqual + \ ale#python#FindVirtualenv(bufnr('%')), + \ '/opt/example/', + \ 'Expected VIRTUAL_ENV environment variable to be used, but it was not' diff --git a/dot_vim/plugged/ale/test/test_quickfix_deduplication.vader b/dot_vim/plugged/ale/test/test_quickfix_deduplication.vader new file mode 100644 index 0000000..9cb8b93 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_quickfix_deduplication.vader @@ -0,0 +1,50 @@ +Before: + Save g:ale_buffer_info + +After: + Restore + +Execute: + " Results from multiple buffers should be gathered together. + " Equal problems should be de-duplicated. + let g:ale_buffer_info = { + \ '1': {'loclist': [ + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 2, 'text': 'foo'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 5, 'text': 'bar'}, + \ {'type': 'E', 'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 4, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 5, 'col': 5, 'text': 'foo'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 2, 'col': 10, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 3, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 5, 'text': 'x'}, + \ {'type': 'E', 'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 3, 'lnum': 1, 'col': 1, 'text': 'foo'}, + \ ]}, + \ '2': {'loclist': [ + \ {'type': 'E', 'bufnr': 1, 'lnum': 2, 'col': 10, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 5, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 2, 'text': 'foo'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 3, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 4, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 5, 'text': 'bar'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 5, 'col': 5, 'text': 'another error'}, + \ ]}, + \} + + AssertEqual + \ [ + \ {'type': 'E', 'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 2, 'col': 10, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 3, 'col': 2, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 4, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 1, 'lnum': 5, 'col': 5, 'text': 'x'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 2, 'text': 'foo'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 1, 'col': 5, 'text': 'bar'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 5, 'col': 5, 'text': 'another error'}, + \ {'type': 'E', 'bufnr': 2, 'lnum': 5, 'col': 5, 'text': 'foo'}, + \ {'type': 'E', 'bufnr': 3, 'lnum': 1, 'col': 1, 'text': 'foo'}, + \ ], + \ ale#list#GetCombinedList() diff --git a/dot_vim/plugged/ale/test/test_quitting_variable.vader b/dot_vim/plugged/ale/test/test_quitting_variable.vader new file mode 100644 index 0000000..32eb0c3 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_quitting_variable.vader @@ -0,0 +1,39 @@ +Before: + Save g:ale_enabled + + unlet! b:ale_quitting + let g:ale_enabled = 0 + +After: + Restore + + unlet! b:ale_quitting + unlet! b:time_before + +Execute(QuitEvent should set b:ale_quitting some time from the clock): + let b:time_before = ale#events#ClockMilliseconds() + + call ale#events#QuitEvent(bufnr('')) + + Assert b:ale_quitting >= b:time_before + Assert b:ale_quitting <= ale#events#ClockMilliseconds() + +Execute(ReadOrEnterEvent should set b:ale_quitting to 0): + let b:ale_quitting = 1 + + call ale#events#ReadOrEnterEvent(bufnr('')) + + AssertEqual 0, b:ale_quitting + +Execute(The QuitRecently function should work when the variable isn't set): + AssertEqual 0, ale#events#QuitRecently(bufnr('')) + +Execute(The QuitRecently function should return 1 when ALE quit recently): + let b:ale_quitting = ale#events#ClockMilliseconds() + + AssertEqual 1, ale#events#QuitRecently(bufnr('')) + +Execute(The QuitRecently function should return 0 when a second has passed): + let b:ale_quitting = ale#events#ClockMilliseconds() - 1001 + + AssertEqual 0, ale#events#QuitRecently(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_redundant_tsserver_rendering_avoided.vader b/dot_vim/plugged/ale/test/test_redundant_tsserver_rendering_avoided.vader new file mode 100644 index 0000000..05660d4 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_redundant_tsserver_rendering_avoided.vader @@ -0,0 +1,178 @@ +Before: + Save g:ale_buffer_info + Save g:ale_disable_lsp + Save g:ale_lsp_suggestions + + let g:ale_disable_lsp = 0 + let g:ale_lsp_suggestions = 1 + unlet! b:ale_disable_lsp + + function! CreateError(type, message) abort + let l:diagnostics = [] + + if !empty(a:message) + let l:diagnostics = [{ + \ 'start': {'line': 1, 'offset': 1}, + \ 'end': {'line': 1, 'offset':1}, + \ 'text': a:message, + \ 'code': 1005, + \}] + endif + + return { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': a:type, + \ 'body': {'file': expand('%:p'), 'diagnostics': l:diagnostics}, + \} + endfunction + + function! CreateLoclist(message) abort + let l:list = [] + + if !empty(a:message) + let l:list = [{ + \ 'lnum': 1, + \ 'col': 1, + \ 'end_lnum': 1, + \ 'end_col': 1, + \ 'text': a:message, + \}] + endif + + return l:list + endfunction + + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('filename.ts') + + runtime autoload/ale/engine.vim + + let g:ale_buffer_info = {bufnr(''): {'loclist': [], 'active_linter_list': []}} + let g:ale_handle_loclist_called = 0 + + function! ale#engine#HandleLoclist(linter_name, buffer, loclist, from_other_source) abort + let g:ale_handle_loclist_called = 1 + endfunction + +After: + Restore + + delfunction CreateError + delfunction CreateLoclist + + call ale#test#RestoreDirectory() + + runtime autoload/ale/engine.vim + +Execute(An initial empty list of syntax errors should be ignored): + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', '')) + + Assert !g:ale_handle_loclist_called + +Execute(An initial list of syntax errors should be handled): + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Subsequent empty lists should be ignored): + let g:ale_buffer_info[bufnr('')].syntax_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', '')) + + Assert !g:ale_handle_loclist_called + +Execute(Empty then non-empty syntax errors should be handled): + let g:ale_buffer_info[bufnr('')].syntax_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then empty syntax errors should be handled): + let g:ale_buffer_info[bufnr('')].syntax_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', '')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then non-empty syntax errors should be handled): + let g:ale_buffer_info[bufnr('')].syntax_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('syntaxDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(An initial empty list of semantic errors should be ignored): + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', '')) + + Assert !g:ale_handle_loclist_called + +Execute(An initial list of semantic errors should be handled): + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Subsequent empty lists should be ignored - semantic): + let g:ale_buffer_info[bufnr('')].semantic_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', '')) + + Assert !g:ale_handle_loclist_called + +Execute(Empty then non-empty semantic errors should be handled): + let g:ale_buffer_info[bufnr('')].semantic_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then empty semantic errors should be handled): + let g:ale_buffer_info[bufnr('')].semantic_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', '')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then non-empty semantic errors should be handled): + let g:ale_buffer_info[bufnr('')].semantic_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Subsequent empty lists should be ignored - suggestion): + let g:ale_buffer_info[bufnr('')].suggestion_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', '')) + + Assert !g:ale_handle_loclist_called + +Execute(You should be able to disable suggestions): + let g:ale_lsp_suggestions = 0 + let g:ale_buffer_info[bufnr('')].suggestion_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x')) + + Assert !g:ale_handle_loclist_called + +Execute(Empty then non-empty suggestion messages should be handled): + let g:ale_buffer_info[bufnr('')].suggestion_loclist = [] + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then empt suggestion messages should be handled): + let g:ale_buffer_info[bufnr('')].suggestion_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', '')) + + Assert g:ale_handle_loclist_called + +Execute(Non-empty then non-empty suggestion messages should be handled): + let g:ale_buffer_info[bufnr('')].suggestion_loclist = CreateLoclist('x') + + call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x')) + + Assert g:ale_handle_loclist_called diff --git a/dot_vim/plugged/ale/test/test_regex_escaping.vader b/dot_vim/plugged/ale/test/test_regex_escaping.vader new file mode 100644 index 0000000..b79b8c5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_regex_escaping.vader @@ -0,0 +1,4 @@ +Execute(ale#util#EscapePCRE should escape strings for PCRE or RE2 appropriately): + AssertEqual '\\\^\$\*\+\?\.\(\)\|\{\}\[\]', ale#util#EscapePCRE('\^$*+?.()|{}[]') + AssertEqual 'abcABC09', ale#util#EscapePCRE('abcABC09') + AssertEqual '/', ale#util#EscapePCRE('/') diff --git a/dot_vim/plugged/ale/test/test_rename.vader b/dot_vim/plugged/ale/test/test_rename.vader new file mode 100644 index 0000000..83f0aa7 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_rename.vader @@ -0,0 +1,504 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:old_filename = expand('%:p') + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:handle_code_action_called = 0 + let g:code_actions = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/rename.vim + runtime autoload/ale/code_action.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + + if a:linter.lsp is# 'tsserver' + call ale#lsp#MarkConnectionAsTsserver(g:conn_id) + endif + + let l:details = { + \ 'command': 'foobar', + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \} + + let g:InitCallback = {-> ale#lsp_linter#OnInit(a:linter, l:details, a:Callback)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#code_action#HandleCodeAction(code_action, options) abort + let g:handle_code_action_called = 1 + AssertEqual !&hidden, get(a:options, 'should_save', 0) + call add(g:code_actions, a:code_action) + endfunction + + function! ale#util#Input(message, value) abort + return 'a-new-name' + endfunction + + call ale#rename#SetMap({ + \ 3: { + \ 'old_name': 'oldName', + \ 'new_name': 'aNewName', + \ }, + \}) + +After: + if g:conn_id isnot v:null + call ale#lsp#RemoveConnectionWithID(g:conn_id) + endif + + call ale#rename#SetMap({}) + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:old_filename + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:code_actions + unlet! g:handle_code_action_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/rename.vim + runtime autoload/ale/code_action.vim + +Execute(Other messages for the tsserver handler should be ignored): + call ale#rename#HandleTSServerResponse(1, {'command': 'foo'}) + AssertEqual g:handle_code_action_called, 0 + +Execute(Failed rename responses should be handled correctly): + call ale#rename#SetMap({3: {'old_name': 'oldName', 'new_name': 'a-test'}}) + call ale#rename#HandleTSServerResponse( + \ 1, + \ {'command': 'rename', 'request_seq': 3} + \) + AssertEqual g:handle_code_action_called, 0 + +Given typescript(Some typescript file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Code actions from tsserver should be handled): + call ale#rename#HandleTSServerResponse(1, { + \ 'command': 'rename', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'locs': [ + \ { + \ 'file': '/foo/bar/file1.ts', + \ 'locs': [ + \ { + \ 'start': { + \ 'line': 1, + \ 'offset': 2, + \ }, + \ 'end': { + \ 'line': 3, + \ 'offset': 4, + \ }, + \ }, + \ ], + \ }, + \ { + \ 'file': '/foo/bar/file2.ts', + \ 'locs': [ + \ { + \ 'start': { + \ 'line': 10, + \ 'offset': 20, + \ }, + \ 'end': { + \ 'line': 30, + \ 'offset': 40, + \ }, + \ }, + \ ], + \ }, + \ ] + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'rename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.ts', + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 1, + \ 'offset': 2, + \ }, + \ 'end': { + \ 'line': 3, + \ 'offset': 4, + \ }, + \ 'newText': 'aNewName', + \ }, + \ ], + \ }, + \ { + \ 'fileName': '/foo/bar/file2.ts', + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 10, + \ 'offset': 20, + \ }, + \ 'end': { + \ 'line': 30, + \ 'offset': 40, + \ }, + \ 'newText': 'aNewName', + \ }, + \ ], + \ }, + \ ], + \ } + \ ], + \ g:code_actions + +Execute(HandleTSServerResponse does nothing when no data in rename_map): + call ale#rename#HandleTSServerResponse(1, { + \ 'command': 'rename', + \ 'request_seq': -9, + \ 'success': v:true, + \ 'body': {} + \}) + + AssertEqual g:handle_code_action_called, 0 + +Execute(Prints a tsserver error message when unsuccessful): + call ale#rename#HandleTSServerResponse(1, { + \ 'command': 'rename', + \ 'request_seq': 3, + \ 'success': v:false, + \ 'message': 'This symbol cannot be renamed', + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''Error renaming "oldName" to: "aNewName". ' . + \ 'Reason: This symbol cannot be renamed'''], g:expr_list + +Execute(Does nothing when no changes): + call ale#rename#HandleTSServerResponse(1, { + \ 'command': 'rename', + \ 'request_seq': 3, + \ 'success': v:true, + \ 'body': { + \ 'locs': [] + \ } + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''Error renaming "oldName" to: "aNewName"'''], g:expr_list + +Execute(tsserver rename requests should be sent): + call ale#rename#SetMap({}) + call ale#linter#Reset() + + runtime ale_linters/typescript/tsserver.vim + call setpos('.', [bufnr(''), 2, 5, 0]) + + ALERename + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'rename', g:capability_checked + AssertEqual + \ 'function(''ale#rename#HandleTSServerResponse'')', + \ string(g:Callback) + AssertEqual + \ [ + \ ale#lsp#tsserver_message#Change(bufnr('')), + \ [0, 'ts@rename', { + \ 'file': expand('%:p'), + \ 'line': 2, + \ 'offset': 5, + \ 'arguments': { + \ 'findInComments': g:ale_rename_tsserver_find_in_comments, + \ 'findInStrings': g:ale_rename_tsserver_find_in_strings, + \ }, + \ }] + \ ], + \ g:message_list + AssertEqual {'42': {'old_name': 'somelongerline', 'new_name': 'a-new-name'}}, + \ ale#rename#GetMap() + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(Code actions from LSP should be handled): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \ 'result': { + \ 'changes': { + \ 'file:///foo/bar/file1.ts': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 1, + \ 'character': 2, + \ }, + \ 'end': { + \ 'line': 3, + \ 'character': 4, + \ }, + \ }, + \ 'newText': 'bla123' + \ }, + \ ], + \ }, + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'rename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.ts', + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 2, + \ 'offset': 3, + \ }, + \ 'end': { + \ 'line': 4, + \ 'offset': 5, + \ }, + \ 'newText': 'bla123', + \ }, + \ ], + \ }, + \ ], + \ } + \ ], + \ g:code_actions + +Execute(DocumentChanges from LSP should be handled): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \ 'result': { + \ 'documentChanges': [ + \ { + \ 'textDocument': { + \ 'version': 1.0, + \ 'uri': 'file:///foo/bar/file1.ts', + \ }, + \ 'edits': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 1, + \ 'character': 2, + \ }, + \ 'end': { + \ 'line': 3, + \ 'character': 4, + \ }, + \ }, + \ 'newText': 'bla123', + \ }, + \ ], + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'rename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.ts', + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 2, + \ 'offset': 3, + \ }, + \ 'end': { + \ 'line': 4, + \ 'offset': 5, + \ }, + \ 'newText': 'bla123', + \ }, + \ ], + \ }, + \ ], + \ } + \ ], + \ g:code_actions + +Execute(Single DocumentChange from LSP should be handled): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \ 'result': { + \ 'documentChanges': { + \ 'textDocument': { + \ 'version': 1.0, + \ 'uri': 'file:///foo/bar/file1.ts', + \ }, + \ 'edits': [ + \ { + \ 'range': { + \ 'start': { + \ 'line': 1, + \ 'character': 2, + \ }, + \ 'end': { + \ 'line': 3, + \ 'character': 4, + \ }, + \ }, + \ 'newText': 'bla123', + \ }, + \ ], + \ }, + \ }, + \}) + + AssertEqual + \ [ + \ { + \ 'description': 'rename', + \ 'changes': [ + \ { + \ 'fileName': '/foo/bar/file1.ts', + \ 'textChanges': [ + \ { + \ 'start': { + \ 'line': 2, + \ 'offset': 3, + \ }, + \ 'end': { + \ 'line': 4, + \ 'offset': 5, + \ }, + \ 'newText': 'bla123', + \ }, + \ ], + \ }, + \ ], + \ } + \ ], + \ g:code_actions +Execute(LSP should perform no action when no result): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No rename result received from server'''], g:expr_list + +Execute(LSP should perform no action when no changes): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \ 'result': {}, + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No changes received from server'''], g:expr_list + +Execute(LSP should perform no action when changes is empty): + call ale#rename#HandleLSPResponse(1, { + \ 'id': 3, + \ 'result': { + \ 'changes': [], + \ }, + \}) + + AssertEqual g:handle_code_action_called, 0 + AssertEqual ['echom ''No changes received from server'''], g:expr_list + +Execute(LSP rename requests should be sent): + call ale#rename#SetMap({}) + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALERename + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'rename', g:capability_checked + AssertEqual + \ 'function(''ale#rename#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [1, 'textDocument/didChange', { + \ 'textDocument': { + \ 'uri': ale#path#ToFileURI(expand('%:p')), + \ 'version': g:ale_lsp_next_version_id - 1, + \ }, + \ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}] + \ }], + \ [0, 'textDocument/rename', { + \ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))}, + \ 'position': {'line': 0, 'character': 2}, + \ 'newName': 'a-new-name', + \ }], + \ ], + \ g:message_list + + AssertEqual {'42': {'old_name': 'foo', 'new_name': 'a-new-name'}}, + \ ale#rename#GetMap() diff --git a/dot_vim/plugged/ale/test/test_resolve_local_path.vader b/dot_vim/plugged/ale/test/test_resolve_local_path.vader new file mode 100644 index 0000000..d8a8ec5 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_resolve_local_path.vader @@ -0,0 +1,17 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(We should be able to find the local version of a file): + call ale#test#SetFilename('test-files/top/middle/bottom/dummy.txt') + + AssertEqual + \ ale#path#Simplify(expand('%:p:h:h:h:h:h') . '/test-files/top/example.ini'), + \ ale#path#ResolveLocalPath(bufnr('%'), 'example.ini', '/global/config.ini') + +Execute(We shouldn't find anything for files which don't match): + AssertEqual + \ '/global/config.ini', + \ ale#path#ResolveLocalPath(bufnr('%'), 'missing.ini', '/global/config.ini') diff --git a/dot_vim/plugged/ale/test/test_results_not_cleared_when_opening_loclist.vader b/dot_vim/plugged/ale/test/test_results_not_cleared_when_opening_loclist.vader new file mode 100644 index 0000000..c586345 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_results_not_cleared_when_opening_loclist.vader @@ -0,0 +1,30 @@ +Before: + Save g:ale_buffer_info + + call ale#linter#Reset() + +After: + Restore + + call setloclist(0, []) + call clearmatches() + call ale#sign#Clear() + +Given foobar (Some file): + abc + +Execute(The loclist shouldn't be cleared when opening the loclist): + call ale#engine#InitBufferInfo(bufnr('')) + let g:ale_buffer_info[bufnr('')].loclist = [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, + \] + call setloclist(0, g:ale_buffer_info[bufnr('')].loclist) + + " The cleanup function is called when the loclist window is closed. + " If some cleanup is done for this buffer, for which nothing is wrong, + " then the loclist for the window, which is the same window as the window + " we are checking, will be cleared. + :lopen + :q + + AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()), 'The loclist was cleared' diff --git a/dot_vim/plugged/ale/test/test_sandbox_execution.vader b/dot_vim/plugged/ale/test/test_sandbox_execution.vader new file mode 100644 index 0000000..cf994ce --- /dev/null +++ b/dot_vim/plugged/ale/test/test_sandbox_execution.vader @@ -0,0 +1,103 @@ +Before: + function! TestCallback(buffer, output) + return [ + \ { + \ 'lnum': 1, + \ 'bufnr': 1, + \ 'vcol': 0, + \ 'linter_name': 'testlinter', + \ 'nr': -1, + \ 'type': 'E', + \ 'col': 1, + \ 'text': 'Test Error', + \ }, + \] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'callback': 'TestCallback', + \ 'executable': 'echo', + \ 'command': 'echo', + \}) + + let g:ale_buffer_info = {} + +After: + unlet! b:in_sandbox + unlet! b:result + + delfunction TestCallback + call ale#linter#Reset() + let g:ale_buffer_info = {} + + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ale#util#InSandbox should return 1 when in a sandbox): + sandbox let b:in_sandbox = ale#util#InSandbox() + + Assert b:in_sandbox, 'ale#util#InSandbox() returned 0 for a sandbox command' + +Execute(ALE shouldn't blow up when run from a sandbox): + AssertEqual 'foobar', &filetype + + sandbox call ale#Queue(0) + sandbox call ale#Queue(1) + +Execute(ALE shouldn't blow up if file cleanup happens in a sandbox): + " Make a call to an engine function first, so the function will be defined + " before we make the sandbox call. + " + " You are not allowed to define any functions in the sandbox. + call ale#engine#InitBufferInfo(3) + + let g:ale_buffer_info[3] = { + \ 'temporary_file_list': ['/tmp/foo'], + \ 'temporary_directory_list': ['/tmp/bar'], + \} + sandbox call ale#command#RemoveManagedFiles(3) + + AssertEqual ['/tmp/foo'], g:ale_buffer_info[3].temporary_file_list + AssertEqual ['/tmp/bar'], g:ale_buffer_info[3].temporary_directory_list + +Execute(You shouldn't be able to define linters from the sandbox): + call ale#linter#Reset() + call ale#linter#PreventLoading('testft') + + AssertThrows sandbox call ale#linter#Define('testft', { + \ 'name': 'testlinter', + \ 'output_stream': 'stdout', + \ 'executable': 'testlinter', + \ 'command': 'testlinter', + \ 'callback': 'testCB', + \}) + AssertEqual 'Vim(let):E48: Not allowed in sandbox', g:vader_exception + AssertEqual [], ale#linter#GetAll(['testft']) + +Execute(You shouldn't be able to register fixers from the sandbox): + call ale#fix#registry#Clear() + AssertThrows sandbox call ale#fix#registry#Add('prettier', '', ['javascript'], 'prettier') + AssertEqual 'Vim(let):E48: Not allowed in sandbox', g:vader_exception + AssertEqual [], ale#fix#registry#CompleteFixers('', 'ALEFix ', 7) + +Execute(You shouldn't be able to get linters from the sandbox, to prevent tampering): + AssertThrows sandbox call ale#linter#GetLintersLoaded() + AssertEqual 'Vim(let):E48: Not allowed in sandbox', g:vader_exception + + call ale#linter#Reset() + + sandbox let b:result = ale#linter#GetAll(['testft']) + + AssertEqual 0, len(b:result) + + let b:result = ale#linter#GetAll(['testft']) + + AssertEqual 1, len(b:result) + + sandbox let b:result = ale#linter#GetAll(['testft']) + + AssertEqual 0, len(b:result) diff --git a/dot_vim/plugged/ale/test/test_semver_utils.vader b/dot_vim/plugged/ale/test/test_semver_utils.vader new file mode 100644 index 0000000..b38feb0 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_semver_utils.vader @@ -0,0 +1,43 @@ +After: + call ale#semver#ResetVersionCache() + +Execute(ParseVersion should return the version from the lines of output): + " We should be able to parse the semver string from flake8 + AssertEqual [3, 0, 4], ale#semver#ParseVersion([ + \ '3.0.4 (mccabe: 0.5.2, pyflakes: 1.2.3, pycodestyle: 2.0.0) CPython 2.7.12 on Linux', + \ '1.2.3', + \]) + +Execute(ParseVersion should return an empty list when no vesrion can be found): + AssertEqual [], ale#semver#ParseVersion(['x']) + AssertEqual [], ale#semver#ParseVersion([]) + +Execute(ParseVersion should tolerate missing patch numbers): + " This goes against the semver spec, but we handle it anyway. + AssertEqual [3, 4, 0], ale#semver#ParseVersion(['Version 3.4']) + +Execute(GTE should compare triples correctly): + Assert ale#semver#GTE([3, 0, 4], [3, 0, 0]) + Assert ale#semver#GTE([3, 0, 0], [3, 0, 0]) + Assert ale#semver#GTE([3, 0, 0], [2, 0, 0]) + Assert ale#semver#GTE([3, 1, 0], [3, 1, 0]) + Assert ale#semver#GTE([3, 2, 0], [3, 1, 0]) + Assert ale#semver#GTE([3, 2, 2], [3, 1, 6]) + Assert ale#semver#GTE([3, 2, 5], [3, 2, 5]) + Assert ale#semver#GTE([3, 2, 6], [3, 2, 5]) + Assert !ale#semver#GTE([2, 9, 1], [3, 0, 0]) + Assert !ale#semver#GTE([3, 2, 3], [3, 3, 3]) + Assert !ale#semver#GTE([3, 3, 2], [3, 3, 3]) + +Execute(GTE should compare pairs correctly): + Assert ale#semver#GTE([3, 0], [3, 0, 0]) + Assert ale#semver#GTE([3, 0], [3, 0]) + Assert ale#semver#GTE([3, 1], [3, 0]) + Assert ale#semver#GTE([3, 1], [3, 0, 0]) + Assert ale#semver#GTE([3, 0, 1], [3, 0]) + Assert !ale#semver#GTE([3, 0], [3, 0, 1]) + Assert !ale#semver#GTE([3, 0], [3, 1]) + Assert !ale#semver#GTE([2, 9, 11], [3, 0]) + +Execute(GTE should permit the LHS to be an empty List): + Assert !ale#semver#GTE([], [0, 0, 0]) diff --git a/dot_vim/plugged/ale/test/test_set_list_timers.vader b/dot_vim/plugged/ale/test/test_set_list_timers.vader new file mode 100644 index 0000000..07e0202 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_set_list_timers.vader @@ -0,0 +1,29 @@ +Before: + Save g:ale_set_lists_synchronously + Save g:ale_open_list + + let g:ale_set_lists_synchronously = 0 + +After: + Restore + + sleep 1ms + call setloclist(0, []) + lclose + +Execute(The SetLists function should work when run in a timer): + call ale#list#SetLists(bufnr(''), [ + \ {'bufnr': bufnr(''), 'lnum': 5, 'col': 5, 'text': 'x', 'type': 'E'}, + \]) + sleep 1ms + AssertEqual [{ + \ 'lnum': 5, + \ 'bufnr': bufnr(''), + \ 'col': 5, + \ 'text': 'x', + \ 'valid': 1, + \ 'vcol': 0, + \ 'nr': 0, + \ 'type': 'E', + \ 'pattern': '', + \}], ale#test#GetLoclistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_setting_loclist_from_another_buffer.vader b/dot_vim/plugged/ale/test/test_setting_loclist_from_another_buffer.vader new file mode 100644 index 0000000..d33fa07 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_setting_loclist_from_another_buffer.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_buffer_info + + let g:ale_buffer_info = { + \ bufnr(''): { + \ 'loclist': [{'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'text': 'foo'}] + \ }, + \} + + let g:original_buffer = bufnr('%') + noautocmd new + +After: + Restore + + unlet! g:original_buffer + +Execute(Errors should be set in the loclist for the original buffer, not the new one): + call ale#list#SetLists( + \ g:original_buffer, + \ g:ale_buffer_info[(g:original_buffer)].loclist, + \ ) + + AssertEqual [], ale#test#GetLoclistWithoutNewerKeys() + AssertEqual 1, len(getloclist(bufwinid(g:original_buffer))) + AssertEqual 'foo', getloclist(bufwinid(g:original_buffer))[0].text diff --git a/dot_vim/plugged/ale/test/test_setting_problems_found_in_previous_buffers.vader b/dot_vim/plugged/ale/test/test_setting_problems_found_in_previous_buffers.vader new file mode 100644 index 0000000..f1a31fc --- /dev/null +++ b/dot_vim/plugged/ale/test/test_setting_problems_found_in_previous_buffers.vader @@ -0,0 +1,98 @@ +Before: + Save g:ale_buffer_info + Save &filetype + Save g:ale_set_lists_synchronously + + let g:ale_set_lists_synchronously = 1 + + " Set up items in other buffers which should set in this one. + let g:ale_buffer_info = {} + call ale#engine#InitBufferInfo(bufnr('') + 1) + let g:ale_buffer_info[bufnr('') + 1].loclist = + \ ale#engine#FixLocList(bufnr('') + 1, 'linter_one', 0, [ + \ {'lnum': 1, 'filename': expand('%:p'), 'text': 'foo'}, + \ {'lnum': 2, 'filename': expand('%:p'), 'text': 'bar'}, + \ {'lnum': 2, 'text': 'ignore this one'}, + \ ]) + call ale#engine#InitBufferInfo(bufnr('') + 2) + let g:ale_buffer_info[bufnr('') + 2].loclist = + \ ale#engine#FixLocList(bufnr('') + 2, 'linter_one', 0, [ + \ {'lnum': 1, 'filename': expand('%:p'), 'text': 'foo'}, + \ {'lnum': 3, 'filename': expand('%:p'), 'text': 'baz'}, + \ {'lnum': 5, 'text': 'ignore this one'}, + \ ]) + + call ale#linter#Define('foobar', { + \ 'name': 'linter_one', + \ 'callback': 'WhoCares', + \ 'executable': 'echo', + \ 'command': 'sleep 1000', + \ 'lint_file': 1, + \}) + +After: + call ale#engine#Cleanup(bufnr('')) + Restore + call ale#linter#Reset() + + " Items and markers, etc. + call setloclist(0, []) + call clearmatches() + call ale#sign#Clear() + +Given foobar(A file with some lines): + foo + bar + baz + +Execute(Problems found from previously opened buffers should be set when linting for the first time): + call ale#engine#RunLinters(bufnr(''), ale#linter#Get(&filetype), 0) + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'bufnr': bufnr(''), + \ 'col': 0, + \ 'filename': expand('%:p'), + \ 'linter_name': 'linter_one', + \ 'nr': -1, + \ 'type': 'E', + \ 'vcol': 0, + \ 'text': 'foo', + \ 'sign_id': 1000001, + \ }, + \ { + \ 'lnum': 2, + \ 'bufnr': bufnr(''), + \ 'col': 0, + \ 'filename': expand('%:p'), + \ 'linter_name': 'linter_one', + \ 'nr': -1, + \ 'type': 'E', + \ 'vcol': 0, + \ 'text': 'bar', + \ 'sign_id': 1000002, + \ }, + \ { + \ 'lnum': 3, + \ 'bufnr': bufnr(''), + \ 'col': 0, + \ 'filename': expand('%:p'), + \ 'linter_name': 'linter_one', + \ 'nr': -1, + \ 'type': 'E', + \ 'vcol': 0, + \ 'text': 'baz', + \ 'sign_id': 1000003, + \ }, + \ ], + \ g:ale_buffer_info[bufnr('')].loclist + + AssertEqual + \ [ + \ {'lnum': 1, 'bufnr': bufnr(''), 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'foo'}, + \ {'lnum': 2, 'bufnr': bufnr(''), 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'bar'}, + \ {'lnum': 3, 'bufnr': bufnr(''), 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'E', 'pattern': '', 'text': 'baz'}, + \ ], + \ ale#test#GetLoclistWithoutNewerKeys() diff --git a/dot_vim/plugged/ale/test/test_shell_detection.vader b/dot_vim/plugged/ale/test/test_shell_detection.vader new file mode 100644 index 0000000..11d801c --- /dev/null +++ b/dot_vim/plugged/ale/test/test_shell_detection.vader @@ -0,0 +1,177 @@ +Before: + runtime ale_linters/sh/shell.vim + runtime ale_linters/sh/shellcheck.vim + +After: + call ale#linter#Reset() + + unlet! b:is_bash + unlet! b:is_sh + unlet! b:is_kornshell + +Given(A file with a Bash hashbang): + #!/bin/bash + +Execute(/bin/bash should be detected appropriately): + AssertEqual 'bash', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'bash', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with /bin/sh): + #!/usr/bin/env sh -eu --foobar + +Execute(/bin/sh should be detected appropriately): + AssertEqual 'sh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'sh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with bash as an argument to env): + #!/usr/bin/env bash + +Execute(/usr/bin/env bash should be detected appropriately): + AssertEqual 'bash', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'bash', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a tcsh hash bang and arguments): + #!/usr/bin/env tcsh -eu --foobar + +Execute(tcsh should be detected appropriately): + AssertEqual 'tcsh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'tcsh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'tcsh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a zsh hash bang and arguments): + #!/usr/bin/env zsh -eu --foobar + +Execute(zsh should be detected appropriately): + AssertEqual 'zsh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'zsh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'zsh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a csh hash bang and arguments): + #!/usr/bin/env csh -eu --foobar + +Execute(csh should be detected appropriately): + AssertEqual 'csh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'csh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'csh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a ksh hashbang): + #!/bin/ksh + +Execute(/bin/ksh should be detected appropriately): + AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a ksh as an argument to env): + #!/usr/bin/env ksh + +Execute(ksh should be detected appropriately): + AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a sh hash bang and arguments): + #!/usr/bin/env sh -eu --foobar + +Execute(sh should be detected appropriately): + AssertEqual 'sh', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'sh', ale_linters#sh#shell#GetExecutable(bufnr('')) + AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file without a hashbang): + +Execute(The bash dialect should be used for shellcheck if b:is_bash is 1): + let b:is_bash = 1 + + AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Execute(The sh dialect should be used for shellcheck if b:is_sh is 1): + let b:is_sh = 1 + + AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Execute(The ksh dialect should be used for shellcheck if b:is_kornshell is 1): + let b:is_kornshell = 1 + + AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Execute(The filetype should be used as the default shell type when there is no hashbang line): + set filetype=zsh + AssertEqual 'zsh', ale#handlers#sh#GetShellType(bufnr('')) + + set filetype=tcsh + AssertEqual 'tcsh', ale#handlers#sh#GetShellType(bufnr('')) + + set filetype=python + AssertEqual '', ale#handlers#sh#GetShellType(bufnr('')) + +Given(A file with /bin/ash): + #!/bin/ash + +Execute(The ash dialect should be used for the shell and the base function): + AssertEqual 'ash', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'ash', ale_linters#sh#shell#GetExecutable(bufnr('')) + +Execute(dash should be used for shellcheck, which has no ash dialect): + AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with /bin/dash): + #!/bin/dash + +Execute(The dash dialect should be used for the shell and the base function): + AssertEqual 'dash', ale#handlers#sh#GetShellType(bufnr('')) + AssertEqual 'dash', ale_linters#sh#shell#GetExecutable(bufnr('')) + +Execute(dash should be used for shellcheck): + AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a Bash shellcheck shell directive): + # shellcheck shell=bash + +Execute(bash dialect should be detected appropriately): + AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a sh shellcheck shell directive): + #shellcheck shell=sh + +Execute(sh dialect should be detected appropriately): + AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a tcsh shellcheck shell directive): + # shellcheck shell=tcsh + +Execute(tcsh dialect should be detected appropriately): + AssertEqual 'tcsh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a zsh shellcheck shell directive): + # shellcheck shell=zsh + +Execute(zsh dialect should be detected appropriately): + AssertEqual 'zsh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a csh shellcheck shell directive): + # shellcheck shell=csh + +Execute(zsh dialect should be detected appropriately): + AssertEqual 'csh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a ksh shellcheck shell directive): + # shellcheck shell=ksh + +Execute(ksh dialect should be detected appropriately): + AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a dash shellcheck shell directive): + # shellcheck shell=dash + +Execute(dash dialect should be detected appropriately): + AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) + +Given(A file with a ash shellcheck shell directive): + # shellcheck shell=ash + +Execute(dash dialect should be detected for ash that shellcheck does not support): + AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_should_do_nothing_conditions.vader b/dot_vim/plugged/ale/test/test_should_do_nothing_conditions.vader new file mode 100644 index 0000000..6dfed55 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_should_do_nothing_conditions.vader @@ -0,0 +1,88 @@ +Before: + Save g:ale_filetype_blacklist + Save g:ale_maximum_file_size + Save g:ale_enabled + Save &l:statusline + + let b:fake_mode = 'n' + + call ale#test#SetDirectory('/testplugin/test') + + let b:funky_command_created = 0 + + runtime autoload/ale/util.vim + + function! ale#util#Mode(...) abort + return b:fake_mode + endfunction + + " We will test for the existence of this command, so create one if needed. + if !exists(':CtrlPFunky') + command CtrlPFunky echo + let b:funky_command_created = 1 + endif + +After: + Restore + + call ale#test#RestoreDirectory() + + if b:funky_command_created + delcommand CtrlPFunky + let b:funky_command_created = 0 + endif + + unlet! b:funky_command_created + unlet! b:fake_mode + + if &diff is 1 + let &diff = 0 + endif + + runtime autoload/ale/util.vim + +Given foobar(An empty file): +Execute(ALE shouldn't do much of anything for ctrlp-funky buffers): + Assert !ale#ShouldDoNothing(bufnr('')), 'The preliminary check failed' + + let &l:statusline = '%#CtrlPMode2# prt %*%#CtrlPMode1# line %* ={%#CtrlPMode1# funky %*}= <-> %=%<%#CtrlPMode2# %{getcwd()} %*' + + Assert ale#ShouldDoNothing(bufnr('')) + +Execute(ALE shouldn't try to check buffers with '.' as the filename): + AssertEqual + \ 0, + \ ale#ShouldDoNothing(bufnr('')), + \ 'ShouldDoNothing() was 1 for some other reason' + + silent! noautocmd file . + + Assert ale#ShouldDoNothing(bufnr('')) + +Execute(DoNothing should return 1 when the filetype is empty): + AssertEqual + \ 0, + \ ale#ShouldDoNothing(bufnr('')), + \ 'ShouldDoNothing() was 1 for some other reason' + + set filetype= + + AssertEqual 1, ale#ShouldDoNothing(bufnr('')) + +Execute(DoNothing should return 1 when an operator is pending): + let b:fake_mode = 'no' + + AssertEqual 1, ale#ShouldDoNothing(bufnr('')) + +Execute(DoNothing should return 1 for diff buffers): + let &diff = 1 + + AssertEqual 1, ale#ShouldDoNothing(bufnr('')) + +Execute(The DoNothing check should work if the ALE globals aren't defined): + unlet! g:ale_filetype_blacklist + unlet! g:ale_maximum_file_size + unlet! g:ale_enabled + + " This shouldn't throw exceptions. + call ale#ShouldDoNothing(bufnr('')) diff --git a/dot_vim/plugged/ale/test/test_sml_command.vader b/dot_vim/plugged/ale/test/test_sml_command.vader new file mode 100644 index 0000000..e89486c --- /dev/null +++ b/dot_vim/plugged/ale/test/test_sml_command.vader @@ -0,0 +1,45 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(smlnj finds CM file if it exists): + call ale#test#SetFilename('test-files/smlnj/cm/foo.sml') + + AssertEqual + \ ale#test#GetFilename('test-files/smlnj/cm/sources.cm'), + \ ale#handlers#sml#GetCmFile(bufnr('%')) + +Execute(smlnj finds CM file by searching upwards): + call ale#test#SetFilename('test-files/smlnj/cm/path/to/bar.sml') + + AssertEqual + \ ale#test#GetFilename('test-files/smlnj/cm/sources.cm'), + \ ale#handlers#sml#GetCmFile(bufnr('%')) + +Execute(smlnj returns '' when no CM file found): + call ale#test#SetFilename('test-files/smlnj/file/qux.sml') + + AssertEqual '', ale#handlers#sml#GetCmFile(bufnr('%')) + +Execute(CM-project mode enabled when CM file found): + call ale#test#SetFilename('test-files/smlnj/cm/foo.sml') + + AssertEqual 'sml', ale#handlers#sml#GetExecutableSmlnjCm(bufnr('%')) + +Execute(single-file mode disabled when CM file found): + call ale#test#SetFilename('test-files/smlnj/cm/foo.sml') + + AssertEqual '', ale#handlers#sml#GetExecutableSmlnjFile(bufnr('%')) + +Execute(CM-project mode disabled when CM file not found): + call ale#test#SetFilename('test-files/smlnj/file/qux.sml') + + AssertEqual '', ale#handlers#sml#GetExecutableSmlnjCm(bufnr('%')) + +Execute(single-file mode enabled when CM file found): + call ale#test#SetFilename('test-files/smlnj/file/qux.sml') + + AssertEqual 'sml', ale#handlers#sml#GetExecutableSmlnjFile(bufnr('%')) diff --git a/dot_vim/plugged/ale/test/test_socket_connections.vader b/dot_vim/plugged/ale/test/test_socket_connections.vader new file mode 100644 index 0000000..c59b942 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_socket_connections.vader @@ -0,0 +1,139 @@ +Before: + let g:can_run_socket_tests = !has('win32') + \ && (exists('*ch_close') || exists('*chanclose')) + + if g:can_run_socket_tests + call ale#test#SetDirectory('/testplugin/test') + + let g:channel_id_received = 0 + let g:data_received = '' + + function! WaitForData(expected_data, timeout) abort + let l:ticks = 0 + + while l:ticks < a:timeout + " Sleep first, so we can switch to the callback. + let l:ticks += 10 + sleep 10ms + + if g:data_received is# a:expected_data + break + endif + endwhile + endfunction + + function! TestCallback(channel_id, data) abort + let g:channel_id_received = a:channel_id + let g:data_received .= a:data + endfunction + + let g:port = 10347 + let g:pid_tcp = str2nr(system( + \ 'python' + \ . ' ' . ale#Escape(g:dir . '/script/dumb_tcp_server.py') + \ . ' ' . g:port + \)) + let g:pipe_path = tempname() + let g:pid_pipe = str2nr(system( + \ 'python' + \ . ' ' . ale#Escape(g:dir . '/script/dumb_named_pipe_server.py') + \ . ' ' . g:pipe_path + \)) + endif + +After: + if g:can_run_socket_tests + call ale#test#RestoreDirectory() + + unlet! g:channel_id_received + unlet! g:data_received + unlet! g:channel_id + + delfunction WaitForData + delfunction TestCallback + + if has_key(g:, 'pid_tcp') + call system('kill ' . g:pid_tcp) + endif + + if has_key(g:, 'pid_pipe') + call system('kill ' . g:pid_pipe) + endif + + unlet! g:pid_tcp + unlet! g:port + unlet! g:pid_pipe + unlet! g:pipe_path + endif + + unlet! g:can_run_socket_tests + +Execute(Sending and receiving connections to tcp sockets should work): + if g:can_run_socket_tests + let g:channel_id = ale#socket#Open( + \ '127.0.0.1:' . g:port, + \ {'callback': function('TestCallback')} + \) + + Assert g:channel_id >= 0, 'The socket was not opened!' + + call ale#socket#Send(g:channel_id, 'hello') + call ale#socket#Send(g:channel_id, ' world') + + AssertEqual 1, ale#socket#IsOpen(g:channel_id) + + " Wait up to 1 second for the expected data to arrive. + call WaitForData('hello world', 1000) + + AssertEqual g:channel_id, g:channel_id_received + AssertEqual 'hello world', g:data_received + AssertEqual '127.0.0.1:' . g:port, ale#socket#GetAddress(g:channel_id) + + call ale#socket#Close(g:channel_id) + + AssertEqual 0, ale#socket#IsOpen(g:channel_id) + AssertEqual '', ale#socket#GetAddress(g:channel_id) + endif + + " NeoVim versions which can't connect to sockets should just fail. + if has('nvim') && !exists('*chanclose') + AssertEqual -1, ale#socket#Open( + \ '127.0.0.1:1111', + \ {'callback': function('function')} + \) + endif + +Execute(Sending and receiving connections to named pipe sockets should work): + if g:can_run_socket_tests && has('nvim-0.4') + let g:channel_id = ale#socket#Open( + \ g:pipe_path, + \ {'callback': function('TestCallback')} + \) + + Assert g:channel_id >= 0, 'The socket was not opened!' + + call ale#socket#Send(g:channel_id, 'hello') + call ale#socket#Send(g:channel_id, ' world') + + AssertEqual 1, ale#socket#IsOpen(g:channel_id) + + " Wait up to 1 second for the expected data to arrive. + call WaitForData('hello world', 1000) + + AssertEqual g:channel_id, g:channel_id_received + AssertEqual 'hello world', g:data_received + AssertEqual g:pipe_path, ale#socket#GetAddress(g:channel_id) + + call ale#socket#Close(g:channel_id) + + AssertEqual 0, ale#socket#IsOpen(g:channel_id) + AssertEqual '', ale#socket#GetAddress(g:channel_id) + endif + + " NeoVim versions which can't connect to sockets should just fail. + if has('nvim-0.4') && !exists('*chanclose') + AssertEqual -1, ale#socket#Open( + \ g:pipe_path, + \ {'callback': function('function')} + \) + endif diff --git a/dot_vim/plugged/ale/test/test_statusline.vader b/dot_vim/plugged/ale/test/test_statusline.vader new file mode 100644 index 0000000..f76cbfa --- /dev/null +++ b/dot_vim/plugged/ale/test/test_statusline.vader @@ -0,0 +1,157 @@ +Before: + Save g:ale_statusline_format + Save g:ale_buffer_info + + let g:ale_buffer_info = {} + + " A function for conveniently creating expected count objects. + function! Counts(data) abort + let l:res = { + \ '0': 0, + \ '1': 0, + \ 'error': 0, + \ 'warning': 0, + \ 'info': 0, + \ 'style_error': 0, + \ 'style_warning': 0, + \ 'total': 0, + \} + + for l:key in keys(a:data) + let l:res[l:key] = a:data[l:key] + endfor + + let l:res[0] = l:res.error + l:res.style_error + let l:res[1] = l:res.warning + l:res.style_warning + l:res.info + let l:res.total = l:res[0] + l:res[1] + + return l:res + endfunction + + " A test simplified loclist that will be used for some of the + " tests in this module. + let g:test_buffer_info = { + \ bufnr(''): { + \ 'loclist': [ + \ {'bufnr': bufnr('') - 1, 'type': 'E'}, + \ {'bufnr': bufnr('') - 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': bufnr('') - 1, 'type': 'W'}, + \ {'bufnr': bufnr('') - 1, 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr('') - 1, 'type': 'I'}, + \ {'bufnr': bufnr(''), 'type': 'E'}, + \ {'bufnr': bufnr(''), 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'W'}, + \ {'bufnr': bufnr(''), 'type': 'W'}, + \ {'bufnr': bufnr(''), 'type': 'W'}, + \ {'bufnr': bufnr(''), 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr(''), 'type': 'I'}, + \ {'bufnr': bufnr(''), 'type': 'I'}, + \ {'bufnr': bufnr(''), 'type': 'I'}, + \ {'bufnr': bufnr(''), 'type': 'I'}, + \ {'bufnr': bufnr(''), 'type': 'I'}, + \ {'bufnr': bufnr('') + 1, 'type': 'E'}, + \ {'bufnr': bufnr('') + 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': bufnr('') + 1, 'type': 'W'}, + \ {'bufnr': bufnr('') + 1, 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': bufnr('') + 1, 'type': 'I'}, + \ ], + \ }, + \} +After: + Restore + + delfunction Counts + unlet g:test_buffer_info + +Execute (Count should be 0 when data is empty): + AssertEqual Counts({}), ale#statusline#Count(bufnr('')) + +Execute (FirstProblem should be 0 when data is empty): + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'error') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'warning') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'style_error') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'style_warning') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'info') + +Execute (Count should read data from the cache): + let g:ale_buffer_info = {'44': {'count': Counts({'error': 1, 'warning': 2})}} + AssertEqual Counts({'error': 1, 'warning': 2}), ale#statusline#Count(44) + +Execute (FirstProblem should read data from the cache): + let g:ale_buffer_info = + \{"44": + \{'count': 0, + \'first_problems': + \{'error': {'lnum': 3}, + \'warning': {'lnum': 44}, + \'style_error': {'lnum': 22}, + \'style_warning': {'lnum': 223}, + \'info': {'lnum': 2} + \} + \} + \} + AssertEqual {'lnum': 3}, ale#statusline#FirstProblem(44, 'error') + AssertEqual {'lnum': 44}, ale#statusline#FirstProblem(44, 'warning') + AssertEqual {'lnum': 223}, ale#statusline#FirstProblem(44, 'style_warning') + AssertEqual {'lnum': 22}, ale#statusline#FirstProblem(44, 'style_error') + AssertEqual {'lnum': 2}, ale#statusline#FirstProblem(44, 'info') + +Execute (The count should be correct after an update): + let g:ale_buffer_info = {'44': {}} + call ale#statusline#Update(44, []) + AssertEqual Counts({}), ale#statusline#Count(44) + +Execute (FirstProblem should be correct after an update): + let g:ale_buffer_info = {'44': {}} + call ale#statusline#Update(44, []) + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'error') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'warning') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'style_error') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'style_warning') + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'info') + +Execute (Count should match the loclist): + let g:ale_buffer_info = g:test_buffer_info + AssertEqual { + \ 'error': 1, + \ 'style_error': 2, + \ 'warning': 3, + \ 'style_warning': 4, + \ 'info': 5, + \ '0': 3, + \ '1': 12, + \ 'total': 15, + \}, ale#statusline#Count(bufnr('')) + +Execute (FirstProblem should pull the first matching value from the loclist): + let g:ale_buffer_info = g:test_buffer_info + AssertEqual {'bufnr': bufnr(''), 'type': 'E'}, ale#statusline#FirstProblem(bufnr(''), 'error') + AssertEqual {'bufnr': bufnr(''), 'type': 'W'}, ale#statusline#FirstProblem(bufnr(''), 'warning') + AssertEqual {'bufnr': bufnr(''), 'type': 'E', 'sub_type': 'style'}, ale#statusline#FirstProblem(bufnr(''), 'style_error') + AssertEqual {'bufnr': bufnr(''), 'type': 'W', 'sub_type': 'style'}, ale#statusline#FirstProblem(bufnr(''), 'style_warning') + AssertEqual {'bufnr': bufnr(''), 'type': 'I'}, ale#statusline#FirstProblem(bufnr(''), 'info') + +Execute (Output should be empty for non-existent buffer): + let g:ale_buffer_info = g:test_buffer_info + AssertEqual Counts({}), ale#statusline#Count(9001) + AssertEqual {}, ale#statusline#FirstProblem(9001, 'error') + AssertEqual {}, ale#statusline#FirstProblem(9001, 'warning') + AssertEqual {}, ale#statusline#FirstProblem(9001, 'style_error') + AssertEqual {}, ale#statusline#FirstProblem(9001, 'style_warning') + AssertEqual {}, ale#statusline#FirstProblem(9001, 'info') + +Execute(ale#statusline#Update shouldn't blow up when globals are undefined): + unlet! g:ale_statusline_format + call ale#statusline#Update(1, []) + +Execute(ale#statusline#Count should return 0 counts when globals are undefined): + unlet! g:ale_statusline_format + AssertEqual Counts({}), ale#statusline#Count(1) + +Execute(FirstProblem should return an empty dict when globals are undefined): + unlet! g:ale_statusline_format + AssertEqual {}, ale#statusline#FirstProblem(bufnr(''), 'info') diff --git a/dot_vim/plugged/ale/test/test_swift_find_project_root.vader b/dot_vim/plugged/ale/test/test_swift_find_project_root.vader new file mode 100644 index 0000000..88a2602 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_swift_find_project_root.vader @@ -0,0 +1,18 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + +After: + call ale#test#RestoreDirectory() + +Execute(Detect root of Swift project with Package.swift correctly): + call ale#test#SetFilename('test-files/swift/swift-package-project/src/folder/dummy.swift') + AssertEqual + \ ale#path#Simplify(g:dir . '/test-files/swift/swift-package-project'), + \ ale#swift#FindProjectRoot(bufnr('')) + +Execute(Detect no root in case of non-Package.swift project): + call ale#test#SetFilename('test-files/swift/non-swift-package-project/src/folder/dummy.swift') + AssertEqual + \ '', + \ ale#swift#FindProjectRoot(bufnr('')) + diff --git a/dot_vim/plugged/ale/test/test_symbol_search.vader b/dot_vim/plugged/ale/test/test_symbol_search.vader new file mode 100644 index 0000000..754826a --- /dev/null +++ b/dot_vim/plugged/ale/test/test_symbol_search.vader @@ -0,0 +1,189 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + call ale#test#SetFilename('dummy.txt') + + let g:Callback = '' + let g:expr_list = [] + let g:message_list = [] + let g:preview_called = 0 + let g:item_list = [] + let g:options = {} + let g:capability_checked = '' + let g:conn_id = v:null + let g:InitCallback = v:null + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/preview.vim + + function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort + let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {}) + call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer) + let l:details = { + \ 'buffer': a:buffer, + \ 'connection_id': g:conn_id, + \ 'project_root': '/foo/bar', + \ 'language_id': 'python', + \} + + let g:InitCallback = {-> a:Callback(a:linter, l:details)} + endfunction + + function! ale#lsp#HasCapability(conn_id, capability) abort + let g:capability_checked = a:capability + + return 1 + endfunction + + function! ale#lsp#RegisterCallback(conn_id, callback) abort + let g:Callback = a:callback + endfunction + + function! ale#lsp#Send(conn_id, message) abort + call add(g:message_list, a:message) + + return 42 + endfunction + + function! ale#util#Execute(expr) abort + call add(g:expr_list, a:expr) + endfunction + + function! ale#preview#ShowSelection(item_list, options) abort + let g:preview_called = 1 + let g:item_list = a:item_list + let g:options = a:options + endfunction + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + + unlet! g:capability_checked + unlet! g:InitCallback + unlet! g:conn_id + unlet! g:Callback + unlet! g:message_list + unlet! g:expr_list + unlet! b:ale_linters + unlet! g:options + unlet! g:item_list + unlet! g:preview_called + + runtime autoload/ale/lsp_linter.vim + runtime autoload/ale/lsp.vim + runtime autoload/ale/util.vim + runtime autoload/ale/preview.vim + +Execute(Other messages for the LSP handler should be ignored): + call ale#symbol#HandleLSPResponse(1, {'command': 'foo'}) + +Execute(Failed symbol responses should be handled correctly): + call ale#symbol#SetMap({3: {}}) + call ale#symbol#HandleLSPResponse(1, {'id': 3}) + AssertEqual {}, ale#symbol#GetMap() + +Execute(LSP symbol responses should be handled): + call ale#symbol#SetMap({3: {}}) + call ale#symbol#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ { + \ 'name': 'foo', + \ 'location': { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'range': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ }, + \ { + \ 'name': 'foobar', + \ 'location': { + \ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')), + \ 'range': { + \ 'start': {'line': 7, 'character': 15}, + \ }, + \ }, + \ }, + \ ], + \ } + \) + + AssertEqual + \ [ + \ { + \ 'filename': ale#path#Simplify(g:dir . '/completion_dummy_file'), + \ 'line': 3, + \ 'column': 8, + \ 'match': 'foo', + \ }, + \ { + \ 'filename': ale#path#Simplify(g:dir . '/other_file'), + \ 'line': 8, + \ 'column': 16, + \ 'match': 'foobar', + \ }, + \ ], + \ g:item_list + AssertEqual {}, ale#symbol#GetMap() + +Execute(Preview windows should not be opened for empty LSP symbol responses): + call ale#symbol#SetMap({3: {}}) + call ale#symbol#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': [ + \ ], + \ } + \) + + Assert !g:preview_called + AssertEqual {}, ale#symbol#GetMap() + AssertEqual ['echom ''No symbols found.'''], g:expr_list + +Given python(Some Python file): + foo + somelongerline + bazxyzxyzxyz + +Execute(LSP symbol requests should be sent): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALESymbolSearch foo bar + + " We shouldn't register the callback yet. + AssertEqual '''''', string(g:Callback) + + AssertEqual type(function('type')), type(g:InitCallback) + call g:InitCallback() + + AssertEqual 'symbol_search', g:capability_checked + AssertEqual + \ 'function(''ale#symbol#HandleLSPResponse'')', + \ string(g:Callback) + + AssertEqual + \ [ + \ [0, 'workspace/symbol', {'query': 'foo bar'}], + \ ], + \ g:message_list + + AssertEqual {'42': {'buffer': bufnr(''), 'use_relative_paths': 0}}, ale#symbol#GetMap() + +Execute('-relative' argument should enable 'use_relative_paths' in HandleLSPResponse): + runtime ale_linters/python/pylsp.vim + let b:ale_linters = ['pylsp'] + call setpos('.', [bufnr(''), 1, 5, 0]) + + ALESymbolSearch -relative foo bar + + call g:InitCallback() + + AssertEqual {'42': {'buffer': bufnr(''), 'use_relative_paths': 1}}, ale#symbol#GetMap() diff --git a/dot_vim/plugged/ale/test/test_temporary_file_management.vader b/dot_vim/plugged/ale/test/test_temporary_file_management.vader new file mode 100644 index 0000000..bb73588 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_temporary_file_management.vader @@ -0,0 +1,146 @@ +Before: + Save g:ale_buffer_info + + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + + let g:command = 'echo test' + let g:filename = '' + let g:directory = '' + let g:preserved_directory = '' + + function! TestCommandCallback(buffer) abort + " We are registering a temporary file, so we should delete it. + let g:filename = tempname() + call writefile(['foo'], g:filename) + call ale#command#ManageFile(a:buffer, g:filename) + + " We are registering this directory appropriately, so we should delete + " the whole thing. + let g:directory = tempname() + call mkdir(g:directory) + call writefile(['foo'], g:directory . '/bar') + call ale#command#ManageDirectory(a:buffer, g:directory) + + " We are registering this directory as temporary file, so we + " shouldn't delete it. + let g:preserved_directory = tempname() + call mkdir(g:preserved_directory) + call writefile(['foo'], g:preserved_directory . '/bar') + call ale#command#ManageFile(a:buffer, g:preserved_directory) + + return g:command + endfunction + + function! TestCallback(buffer, output) abort + return [] + endfunction + + call ale#linter#Define('foobar', { + \ 'name': 'testlinter', + \ 'executable': has('win32') ? 'cmd' : 'echo', + \ 'callback': 'TestCallback', + \ 'command': function('TestCommandCallback'), + \}) + call ale#command#ClearData() + +After: + Restore + + if !empty(g:preserved_directory) + call delete(g:preserved_directory, 'rf') + endif + + unlet! g:ale_run_synchronously + unlet! g:command + unlet! g:filename + unlet! g:directory + unlet! g:preserved_directory + delfunction TestCommandCallback + delfunction TestCallback + call ale#linter#Reset() + call ale#command#ClearData() + +Given foobar (Some imaginary filetype): + foo + bar + baz + +Execute(ALE should delete managed files/directories appropriately after linting): + AssertEqual 'foobar', &filetype + + call ale#Queue(0) + call ale#test#FlushJobs() + + Assert !filereadable(g:filename), 'The temporary file was not deleted' + Assert !isdirectory(g:directory), 'The temporary directory was not deleted' + Assert isdirectory(g:preserved_directory), 'The temporary directory was not kept' + +Execute(ALE should delete managed files even if no command is run): + AssertEqual 'foobar', &filetype + + let g:command = '' + + call ale#Queue(0) + call ale#test#WaitForJobs(2000) + + Assert !filereadable(g:filename), 'The temporary file was not deleted' + Assert !isdirectory(g:directory), 'The temporary directory was not deleted' + Assert isdirectory(g:preserved_directory), 'The temporary directory was not kept' + +Execute(ALE should delete managed files when the buffer is removed): + call ale#engine#InitBufferInfo(bufnr('%')) + call TestCommandCallback(bufnr('%')) + call ale#engine#Cleanup(bufnr('%')) + + Assert !filereadable(g:filename), 'The temporary file was not deleted' + Assert !isdirectory(g:directory), 'The temporary directory was not deleted' + Assert isdirectory(g:preserved_directory), 'The tempoary directory was not kept' + +Execute(ALE should create and delete directories for ale#command#CreateDirectory()): + call ale#engine#InitBufferInfo(bufnr('%')) + + let b:dir = ale#command#CreateDirectory(bufnr('%')) + let b:dir2 = ale#command#CreateDirectory(bufnr('%')) + + Assert isdirectory(b:dir), 'The directory was not created' + + " We should get the correct file permissions. + " We want to ensure that the directory is not readable by 'other' + if has('unix') + AssertEqual 'rwxr-x---', getfperm(b:dir) + endif + + " The two directories shouldn't be the same. + AssertNotEqual b:dir2, b:dir + + call ale#engine#Cleanup(bufnr('%')) + + Assert !isdirectory(b:dir), 'The directory was not deleted' + Assert !isdirectory(b:dir2), 'The second directory was not deleted' + +Execute(ale#command#ManageFile should add the file even if the buffer info hasn't been set yet): + call ale#command#ManageFile(bufnr(''), '/foo/bar') + + AssertEqual + \ { + \ bufnr(''): { + \ 'jobs': {}, + \ 'file_list': ['/foo/bar'], + \ 'directory_list': [], + \ }, + \ }, + \ ale#command#GetData() + +Execute(ale#command#ManageDirectory should add the directory even if the buffer info hasn't been set yet): + call ale#command#ManageDirectory(bufnr(''), '/foo/bar') + + AssertEqual + \ { + \ bufnr(''): { + \ 'jobs': {}, + \ 'file_list': [], + \ 'directory_list': ['/foo/bar'], + \ }, + \ }, + \ ale#command#GetData() diff --git a/dot_vim/plugged/ale/test/test_tmpdir_wrapper.vader b/dot_vim/plugged/ale/test/test_tmpdir_wrapper.vader new file mode 100644 index 0000000..151b894 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_tmpdir_wrapper.vader @@ -0,0 +1,32 @@ +Before: + let g:exists = exists('$TMPDIR') + let g:old_value = $TMPDIR + +After: + if g:exists + let $TMPDIR = g:old_value + else + silent! unlet! $TMPDIR + endif + + unlet! g:exists + unlet! g:old_value + +Execute(ale#util#Tempname shouldn't set $TMPDIR to an empty string if it isn't set): + " You can't run this test twice on old Vim versions. + if has('unix') + Assert ale#util#Tempname() =~# '^/tmp' + Assert !exists('$TMPDIR'), '$TMPDIR exists where it shouldn''t' + endif + +Execute(ale#util#Tempname shouldn't replace $TMPDIR and reset them to an empty string.): + if has('unix') + let $TMPDIR = '' + Assert ale#util#Tempname() =~# '^/tmp' + + if !has('nvim') + Assert exists('$TMPDIR'), '$TMPDIR doesn''t exist where it should' + endif + + AssertEqual '', $TMPDIR + endif diff --git a/dot_vim/plugged/ale/test/test_vim8_processid_parsing.vader b/dot_vim/plugged/ale/test/test_vim8_processid_parsing.vader new file mode 100644 index 0000000..26416b1 --- /dev/null +++ b/dot_vim/plugged/ale/test/test_vim8_processid_parsing.vader @@ -0,0 +1,5 @@ +Execute(Vim8 Process ID parsing should work): + AssertEqual 123, ale#job#ParseVim8ProcessID('process 123 run') + AssertEqual 347, ale#job#ParseVim8ProcessID('process 347 failed') + AssertEqual 789, ale#job#ParseVim8ProcessID('process 789 dead') + AssertEqual 0, ale#job#ParseVim8ProcessID('no process') diff --git a/dot_vim/plugged/ale/test/test_virtualtext.vader b/dot_vim/plugged/ale/test/test_virtualtext.vader new file mode 100644 index 0000000..8fc1ead --- /dev/null +++ b/dot_vim/plugged/ale/test/test_virtualtext.vader @@ -0,0 +1,179 @@ +Before: + Save g:ale_buffer_info + Save g:ale_virtualtext_cursor + Save g:ale_virtualtext_delay + Save g:ale_virtualtext_prefix + Save b:ale_virtualtext_prefix + + call ale#virtualtext#ResetDataForTests() + + let g:setting = '' + let g:ale_virtualtext_delay = 0 + let g:ale_buffer_info = { + \ bufnr(''): { + \ 'loclist': [ + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'E', + \ 'lnum': 1, + \ 'col': 5, + \ 'text': 'Line 1 error', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'W', + \ 'lnum': 2, + \ 'col': 1, + \ 'text': 'Line 2 warning 1', + \ }, + \ { + \ 'bufnr': bufnr(''), + \ 'type': 'W', + \ 'lnum': 2, + \ 'col': 5, + \ 'text': 'Line 2 warning 2', + \ }, + \ ], + \ }, + \} + +After: + Restore + + unlet! g:setting + unlet! g:ns_id + +Execute(The correct highlight groups should be loaded for virtual-text): + AssertEqual 'ALEVirtualTextError', ale#virtualtext#GetGroup({}) + AssertEqual 'ALEVirtualTextError', ale#virtualtext#GetGroup({'type': 'E'}) + AssertEqual 'ALEVirtualTextStyleError', + \ ale#virtualtext#GetGroup({'type': 'E', 'sub_type': 'style'}) + AssertEqual 'ALEVirtualTextWarning', ale#virtualtext#GetGroup({'type': 'W'}) + AssertEqual 'ALEVirtualTextStyleWarning', + \ ale#virtualtext#GetGroup({'type': 'W', 'sub_type': 'style'}) + AssertEqual 'ALEVirtualTextInfo', ale#virtualtext#GetGroup({'type': 'I'}) + +Given python (An empty Python file): +Execute(Comment text should be detected correctly for Python files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual '#', ale#virtualtext#GetComment(bufnr('')) + endif + +Given java (An empty Java file): +Execute(Comment text should be detected correctly for Java files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual '//', ale#virtualtext#GetComment(bufnr('')) + endif + +Given html (An empty HTML file): +Execute(Comment text should be detected correctly for HTML files): + if has('patch-9.0.0297') || has('nvim-0.8.0') + AssertEqual "\[$3]\nendif\n"] + }, + "Initial State activity": { + "prefix": "init-state", + "body": "(*) -> $1", + "description": "Model an initial starting point for the activity diagram" + }, + "Node": { + "prefix": "no", + "body": "node $1", + "description": "A cube modelling a node in the system" + }, + "Note left": { + "prefix": "note-lf", + "body": "note left : $0", + "description": "A note that appears on the left" + }, + "Note right": { + "prefix": "note-rt", + "body": "note right : $0", + "description": "A note that appears on the right" + }, + "Object": { + "prefix": "ob", + "body": "object $1 {\n$2\n}\n", + "description": "A default Object" + }, + "Package": { + "prefix": "pa", + "body": ["package $1 {\n$2\n}\n"], + "description": "Package UML structure" + }, + "Sequence Message": { + "prefix": "mess", + "body": "$1 -> $2", + "description": "An arrow for the message sent on a Sequence diagram" + }, + "Sequence Return": { + "prefix": "ret", + "body": "$1 <-- $2", + "description": "An arrow for the message return on a Sequence diagram" + }, + "State Final": { + "prefix": "sfinal", + "body": " --> [*]", + "description": "Describe the final state of objects" + }, + "State Initial": { + "prefix": "sinit", + "body": "[*] --> ", + "description": "Describe the initial state of objects" + }, + "Title": { + "prefix": "ti", + "body": "title $0", + "description": "The document title" + }, + "Start Uml Template": { + "prefix": "startuml", + "body": "@startuml\n $1\n@enduml", + "description": "Inside $1 begin defining your diagram" + }, + "Use Arrow (left)": { + "prefix": ">", + "body": " --> $1", + "description": "Object A uses -> () " + }, + "Use Arrow (Right)": { + "prefix": "<", + "body": " <-- $1", + "description": "Object A uses -> () " + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/python/base.json b/dot_vim/plugged/friendly-snippets/snippets/python/base.json new file mode 100644 index 0000000..80b0b2d --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/python/base.json @@ -0,0 +1,173 @@ +{ + "#!/usr/bin/env python": { + "prefix": "env", + "body": "#!/usr/bin/env python\n$0", + "description": "Adds shebang line for default python interpreter." + }, + "#!/usr/bin/env python3": { + "prefix": "env3", + "body": "#!/usr/bin/env python3\n$0", + "description": "Adds shebang line for default python 3 interpreter." + }, + "# -*- coding=utf-8 -*-": { + "prefix": "enc", + "body": "# -*- coding=utf-8 -*-\n$0", + "description": "set default python2.x encoding specification to utf-8 as it is mentioned in pep-0263." + }, + "# coding=utf-8": { + "prefix": "enco", + "body": "# coding=utf-8\n$0", + "description": "Set default python3 encoding specification to utf-8, by default this is the encoding for python3.x as it is mentioned in pep-3120." + }, + "from future import ...": { + "prefix": "fenc", + "body": [ + "# -*- coding: utf-8 -*-", + "from __future__ import absolute_import, division, print_function, unicode_literals" + ], + "description": "Import future statement definitions for python2.x scripts using utf-8 as encoding." + }, + "from future import ... v1": { + "prefix": "fenco", + "body": [ + "# coding: utf-8", + "from __future__ import absolute_import, division, print_function, unicode_literals" + ], + "description": "Import future statement definitions for python3.x scripts using utf-8 as encoding." + }, + "import": { + "prefix": "im", + "body": "import ${1:package/module}$0", + "description": "Import a package or module" + }, + "from ... import ...": { + "prefix": "fim", + "body": "from ${1:package/module} import ${2:names}$0", + "description": "Import statement that allows individual objects from the module to be imported directly into the caller’s symbol table." + }, + "class": { + "prefix": "class", + "body": ["class ${1:classname}(${2:object}):", "\t${3:pass}"], + "description": "Code snippet for a class definition" + }, + "New class": { + "prefix": "classi", + "body": "class ${1:ClassName}(${2:object}):\n\t\"\"\"${3:docstring for $1.}\"\"\"\n\tdef __init__(self, ${4:arg}):\n\t\t${5:super($1, self).__init__()}\n\t\tself.arg = arg\n\t\t$0", + "description": "Code snippet for a class definition." + }, + "New method": { + "prefix": "defs", + "body": "def ${1:mname}(self, ${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for a class method definition." + }, + "New method w/ return": { + "prefix": "defst", + "body": "def ${1:mname}(self, ${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0", + "description": "Code snippet for a class method definition." + }, + "New function": { + "prefix": "def", + "body": "def ${1:fname}(${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for function definition." + }, + "New function w/ return": { + "prefix": "deft", + "body": "def ${1:fname}(${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0", + "description": "Code snippet for function definition." + }, + "New async function": { + "prefix": "adef", + "body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for async function definition." + }, + "New property": { + "prefix": "property", + "body": "@property\ndef ${1:foo}(self):\n \"\"\"${2:The $1 property.}\"\"\"\n ${3:return self._$1}\n@${4:$1}.setter\ndef ${5:$1}(self, value):\n ${6:self._$1} = value", + "description": "New property: get and set via decorator" + }, + "if": { + "prefix": "if", + "body": "if ${1:condition}:\n\t${2:pass}$0", + "description": "Code snippet for the if statement." + }, + "if/else": { + "prefix": "if/else", + "body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"], + "description": "Code snippet for an if statement with else" + }, + "elif": { + "prefix": "elif", + "body": ["elif ${1:expression}:", "\t${2:pass}"], + "description": "Code snippet for an elif" + }, + "else": { + "prefix": "else", + "body": ["else:", "\t${1:pass}"], + "description": "Code snippet for an else" + }, + "for": { + "prefix": "for", + "body": "for ${1:value} in ${2:iterable}:\n\t${3:pass}$0", + "description": "Code snippet to create a for loop structure." + }, + "for/else": { + "prefix": "for/else", + "body": [ + "for ${1:target_list} in ${2:expression_list}:", + "\t${3:pass}", + "else:", + "\t${4:pass}" + ], + "description": "Code snippet for a for loop with else" + }, + "while": { + "prefix": "while", + "body": "while ${1:condition}:\n\t${2:pass}$0", + "description": "Code snippet to create a while loop structure." + }, + "while/else": { + "prefix": "while/else", + "body": ["while ${1:expression}:", "\t${2:pass}", "else:", "\t${3:pass}"], + "description": "Code snippet for a while loop with else" + }, + "try:except:": { + "prefix": "try", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}$0", + "description": "Code Snippet for a try and except blocks." + }, + "try:except:else:finally": { + "prefix": "tryef", + "body": "try:\n\t${1:pass}\nexcept${2: ${3:Exception} as ${4:e}}:\n\t${5:raise}\nelse:\n\t${6:pass}\nfinally:\n\t${7:pass}$0", + "description": "Code Snippet for a try/except/finally with else statement." + }, + "try:except:else": { + "prefix": "trye", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nelse:\n\t${5:pass}$0", + "description": "Code Snippet for a try/except with else statement." + }, + "try:except:finally": { + "prefix": "tryf", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nfinally:\n\t${5:pass}$0", + "description": "Code Snippet for a try/except/finally." + }, + "with": { + "prefix": "with", + "body": ["with ${1:expression} as ${2:target}:", "\t${3:pass}"], + "description": "Code snippet for a with statement" + }, + "self": { + "prefix": ".", + "body": "self.$0", + "description": "Shortend snippet to reference the self property in an object." + }, + "__magic__": { + "prefix": "__", + "body": "__${1:init}__$0", + "description": "Code snippet to create magic methods." + }, + "if __name__ == \"__main__\"": { + "prefix": "ifmain", + "body": "if __name__ == \"__main__\":\n\t${1:main()}$0", + "description": "Create implicitly all the code at the top level using the __name__ special variable." + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/python/comprehension.json b/dot_vim/plugged/friendly-snippets/snippets/python/comprehension.json new file mode 100644 index 0000000..0bc0db1 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/python/comprehension.json @@ -0,0 +1,47 @@ +{ + "List comprehension": { + "prefix": "lc", + "body": "[${1:value} for ${2:value} in ${3:iterable}]$0", + "description" : "List comprehension for creating a list based on existing lists." + }, + "List comprehension if else": { + "prefix": "lcie", + "body": "[${1:value} if ${2:condition} else ${3:condition} for ${4:value} in ${5:iterable}]$0", + "description" : "List comprehension for creating a list based on existing lists, with conditional if-else statement." + }, + "List comprehension if filter": { + "prefix": "lci", + "body": "[${1:value} for ${2:value} in ${3:iterable} if ${4:condition}$0]", + "description" : "List comprehension for creating a list based on existing lists, with conditional if statement." + }, + "Dictionary comprehension": { + "prefix": "dc", + "body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable}}$0", + "description" : "Handy and faster way to create dictories based on existing dictionaries." + }, + "Dictionary comprehension if filter": { + "prefix": "dci", + "body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable} if ${6:condition}}$0", + "description" : "Handy and faster way to create dictories based on existing dictionaries, with conditional if statement." + }, + "Set comprehension": { + "prefix": "sc", + "body": "{${1:value} for ${2:value} in ${3:iterable}}$0", + "description" : "Create a set based on existing iterables." + }, + "Set Comprehension if filter": { + "prefix": "sci", + "body": "{${1:value} for ${2:value} in ${3:iterable} if ${4:condition}}$0", + "description" : "Create a set based on existing iterables, with condition if statement." + }, + "Generator comprehension": { + "prefix": "gc", + "body": "(${1:key} for ${2:value} in ${3:iterable})$0", + "description" : "Create a generator based on existing iterables." + }, + "Generator comprehension if filter": { + "prefix": "gci", + "body": "(${1:key} for ${2:value} in ${3:iterable} if ${4:condition})$0", + "description" : "Create a generator based on existing iterables, with condition if statement." + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/python/debug.json b/dot_vim/plugged/friendly-snippets/snippets/python/debug.json new file mode 100644 index 0000000..f4e1554 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/python/debug.json @@ -0,0 +1,34 @@ +{ + "PDB set trace": { + "prefix": "pdb", + "body": "__import__('pdb').set_trace()$0", + "description": "Code snippet for pdb debug" + }, + "iPDB set trace": { + "prefix": "ipdb", + "body": "__import__('ipdb').set_trace()$0", + "description": "Code snippet for ipdb debug" + }, + "rPDB set trace": { + "prefix": "rpdb", + "body": "import rpdb2; rpdb2.start_embedded_debugger('${1:debug_password}')$0" + }, + "PuDB set trace": { + "prefix": "pudb", + "body": "import pudb; pudb.set_trace()$0", + "description": "Code snippet for pudb debug" + }, + "IPython set trace": { + "prefix": "ipydb", + "body": "from IPython import embed; embed()$0" + }, + "Celery set trace": { + "prefix": "rdb", + "body": "from celery.contrib import rdb; rdb.set_trace()$0", + "description": "Code snippet for celery remote debugger breakpoint" + }, + "Pretty print": { + "prefix": "pprint", + "body": "__import__('pprint').pprint(${1:expression})$0" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/python/python.json b/dot_vim/plugged/friendly-snippets/snippets/python/python.json new file mode 100644 index 0000000..d98305f --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/python/python.json @@ -0,0 +1,122 @@ +{ + "try/except": { + "prefix": "try/except", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}" + ], + "description": "Code snippet for a try/except statement" + }, + "try/finally": { + "prefix": "try/finally", + "body": ["try:", "\t${1:pass}", "finally:", "\t${2:pass}"], + "description": "Code snippet for a try/finally statement" + }, + "try/except/else": { + "prefix": "try/except/else", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "else:", + "\t${5:pass}" + ], + "description": "Code snippet for a try/except/else statement" + }, + "try/except/finally": { + "prefix": "try/except/finally", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "finally:", + "\t${5:pass}" + ], + "description": "Code snippet for a try/except/finally statement" + }, + "try/except/else/finally": { + "prefix": "try/except/else/finally", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "else:", + "\t${5:pass}", + "finally:", + "\t${6:pass}" + ], + "description": "Code snippet for a try/except/else/finally statement" + }, + "def(class method)": { + "prefix": "def class method", + "body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\t${3:pass}"], + "description": "Code snippet for a class method" + }, + "def(static class method)": { + "prefix": "def static class method", + "body": [ + "@staticmethod", + "def ${1:funcname}(${2:parameter_list}):", + "\t${3:pass}" + ], + "description": "Code snippet for a static class method" + }, + "def(abstract class method)": { + "prefix": "def abstract class method", + "body": [ + "def ${1:funcname}(self, ${2:parameter_list}):", + "\traise NotImplementedError" + ], + "description": "Code snippet for an abstract class method" + }, + "lambda": { + "prefix": "lambda", + "body": ["lambda ${1:parameter_list}: ${2:expression}"], + "description": "Code snippet for a lambda statement" + }, + "if(main)": { + "prefix": "__main__", + "body": ["if __name__ == \"__main__\":", " ${1:pass}"], + "description": "Code snippet for a `if __name__ == \"__main__\": ...` block" + }, + "async/def": { + "prefix": "async/def", + "body": ["async def ${1:funcname}(${2:parameter_list}):", "\t${3:pass}"], + "description": "Code snippet for an async statement" + }, + "async/for": { + "prefix": "async/for", + "body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}"], + "description": "Code snippet for an async for statement" + }, + "async/for/else": { + "prefix": "async/for/else", + "body": [ + "async for ${1:target} in ${2:iter}:", + "\t${3:block}", + "else:", + "\t${4:block}" + ], + "description": "Code snippet for an async for statement with else" + }, + "async/with": { + "prefix": "async/with", + "body": ["async with ${1:expr} as ${2:var}:", "\t${3:block}"], + "description": "Code snippet for an async with statement" + }, + "add/new/cell": { + "prefix": "add/new/cell", + "body": "# %%", + "description": "Code snippet to add a new cell" + }, + "mark/markdown": { + "prefix": "mark/markdown", + "body": "# %% [markdown]", + "description": "Code snippet to add a new markdown cell" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/python/unittest.json b/dot_vim/plugged/friendly-snippets/snippets/python/unittest.json new file mode 100644 index 0000000..23bd58e --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/python/unittest.json @@ -0,0 +1,54 @@ +{ + "Assert equal": { + "prefix": "ase", + "body": "self.assertEqual(${1:expected}, ${2:actual}${3:, '${4:message}'})$0" + }, + "Assert not equal": { + "prefix": "asne", + "body": "self.assertNotEqual(${1:expected}, ${2:actual}${3:, '${4:message}'})$0" + }, + "Assert raises": { + "prefix": "asr", + "body": "self.assertRaises(${1:exception}, ${2:callable}, ${3:args})$0" + }, + "Assert True": { + "prefix": "ast", + "body": "self.assertTrue(${1:actual}${2:, '${3:message}'})$0" + }, + "Assert False": { + "prefix": "asf", + "body": "self.assertFalse(${1:actual}${2:, '${3:message}'})$0" + }, + "Assert is": { + "prefix": "asi", + "body": "self.assertIs(${1:expected}, ${2:actual}${3:, '${4:message}'})$0" + }, + "Assert is not": { + "prefix": "asint", + "body": "self.assertIsNot(${1:expected}, ${2:actual}${3:, '${4:message}'})$0" + }, + "Assert is None": { + "prefix": "asino", + "body": "self.assertIsNone(${1:actual}${2:, '${3:message}'})$0" + }, + "Assert is not None": { + "prefix": "asinno", + "body": "self.assertIsNotNone(${1:actual}${2:, '${3:message}'})$0" + }, + "Assert in": { + "prefix": "asin", + "body": "self.assertIn(${1:needle}, ${2:haystack}${3:, '${4:message}'})$0" + }, + "Assert not in": { + "prefix": "asni", + "body": "self.assertNotIn(${1:needle}, ${2:haystack}${3:, '${4:message}'})$0" + }, + "Assert": { + "prefix": "as", + "body": "self.assert_(${1:boolean expression}${2:, '${3:message}'})$0" + }, + "Fail (a test)": { + "prefix": "fail", + "body": "self.fail('${1:message}')$0" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/quarto.json b/dot_vim/plugged/friendly-snippets/snippets/quarto.json new file mode 100644 index 0000000..0c14daf --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/quarto.json @@ -0,0 +1,128 @@ +{ + "Insert bold text": { + "prefix": "bold", + "body": "**${1:${TM_SELECTED_TEXT}}**$0", + "description": "Insert bold text" + }, + "Insert italic text": { + "prefix": "italic", + "body": "*${1:${TM_SELECTED_TEXT}}*$0", + "description": "Insert italic text" + }, + "Insert quoted text": { + "prefix": "quote", + "body": "> ${1:${TM_SELECTED_TEXT}}", + "description": "Insert quoted text" + }, + "Insert inline code": { + "prefix": "code", + "body": "`${1:${TM_SELECTED_TEXT}}`$0", + "description": "Insert inline code" + }, + "Insert shortcode": { + "prefix": "shortcode", + "body": "{{< $0 >}}", + "description": "Insert shortcode" + }, + "Insert fenced code block": { + "prefix": "fenced codeblock", + "body": [ + "```${1|python,c,c++,c#,ruby,go,java,php,htm,css,javascript,json,markdown,console|}", + "${TM_SELECTED_TEXT}$0", + "```" + ], + "description": "Insert fenced code block" + }, + "Insert executable code block": { + "prefix": "executable codeblock", + "body": [ + "```{${1|python,r,julia,ojs,sql,bash|}}", + "${TM_SELECTED_TEXT}$0", + "```" + ], + "description": "Insert executable code block" + }, + "Insert raw code block": { + "prefix": "raw codeblock", + "body": [ + "```{${1|html,latex,openxml,opendocument,asciidoc,docbook,markdown,dokuwiki,fb2,gfm,haddock,icml,ipynb,jats,jira,json,man,mediawiki,ms,muse,opml,org,plain,rst,rtf,tei,texinfo,textile,xwiki,zimwiki,native|}}", + "${TM_SELECTED_TEXT}$0", + "```" + ], + "description": "Insert raw code block" + }, + "Insert heading level 1": { + "prefix": "heading1", + "body": "# ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 1" + }, + "Insert heading level 2": { + "prefix": "heading2", + "body": "## ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 2" + }, + "Insert heading level 3": { + "prefix": "heading3", + "body": "### ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 3" + }, + "Insert heading level 4": { + "prefix": "heading4", + "body": "#### ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 4" + }, + "Insert heading level 5": { + "prefix": "heading5", + "body": "##### ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 5" + }, + "Insert heading level 6": { + "prefix": "heading6", + "body": "###### ${1:${TM_SELECTED_TEXT}}", + "description": "Insert heading level 6" + }, + "Insert unordered list": { + "prefix": "unordered list", + "body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"], + "description": "Insert unordered list" + }, + "Insert ordered list": { + "prefix": "ordered list", + "body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"], + "description": "Insert ordered list" + }, + "Insert horizontal rule": { + "prefix": "horizontal rule", + "body": "----------\n", + "description": "Insert horizontal rule" + }, + "Insert link": { + "prefix": "link", + "body": "[${TM_SELECTED_TEXT:${1:text}}](https://${2:link})$0", + "description": "Insert link" + }, + "Insert image": { + "prefix": "image", + "body": "![${TM_SELECTED_TEXT:${1:alt}}](https://${2:link})$0", + "description": "Insert image" + }, + "Insert strikethrough": { + "prefix": "strikethrough", + "body": "~~${1:${TM_SELECTED_TEXT}}~~", + "description": "Insert strikethrough" + }, + "Insert div block": { + "prefix": "div", + "body": ["::: {.${1:class}}", "${TM_SELECTED_TEXT}$0", ":::"], + "description": "Insert div block" + }, + "Insert callout block": { + "prefix": "callout", + "body": [ + "::: {.${1|callout,callout-note,callout-tip,callout-important,callout-caution,callout-warning|}}", + "${TM_SELECTED_TEXT}$0", + ":::" + ], + "description": "Insert callout block" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/r.json b/dot_vim/plugged/friendly-snippets/snippets/r.json new file mode 100644 index 0000000..7677308 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/r.json @@ -0,0 +1,169 @@ +{ + "library": { + "prefix": "lib", + "body": [ + "library(${1:package})" + ] + }, + "require": { + "prefix": "req", + "body": [ + "require(${1:package})" + ] + }, + "source": { + "prefix": "src", + "body": [ + "source(\"${1:file.R}\")" + ] + }, + "return": { + "prefix": "ret", + "body": "return(${1:code})" + }, + "matrix": { + "prefix": "mat", + "body": "matrix(${1:data}, nrow = ${2:rows}, ncol = ${3:cols})" + }, + "setGeneric": { + "prefix": "sg", + "body": [ + "setGeneric(\"${1:generic}\", function(${2:x, ...}) {", + " standardGeneric(\"${1:generic}\")", + "})\n" + ] + }, + "setMethod": { + "prefix": "sm", + "body": [ + "setMethod(\"${1:generic}\", ${2:class}, function(${2:x, ...}) {", + " ${0}", + "})\n" + ] + }, + "setClass": { + "prefix": "sc", + "body": [ + "setClass(\"${1:Class}\", slots = c(${2:name = \"type\"}))\n" + ] + }, + "if": { + "prefix": "if", + "body": [ + "if (${1:condition}) {", + " ${0}", + "}\n" + ] + }, + "else": { + "prefix": "el", + "body": [ + "else {", + " ${0}", + "}\n" + ] + }, + "else if": { + "prefix": "ei", + "body": [ + "else if (${1:condition}) {", + " ${0}", + "}\n" + ] + }, + "function": { + "prefix": "fun", + "body": [ + "${1:name} <- function(${2:variables}) {", + " ${0}", + "}\n" + ] + }, + "for": { + "prefix": "for", + "body": [ + "for (${1:variable} in ${2:vector}) {", + " ${0}", + "}\n" + ] + }, + "while": { + "prefix": "while", + "body": [ + "while (${1:condition}) {", + " ${0}", + "}\n" + ] + }, + "switch": { + "prefix": "switch", + "body": [ + "switch (${1:object},", + " ${2:case} = ${3:action}", + ")\n" + ] + }, + "apply": { + "prefix": "apply", + "body": "apply(${1:array}, ${2:margin}, ${3:...})" + }, + "lapply": { + "prefix": "lapply", + "body": "lapply(${1:list}, ${2:function})" + }, + "sapply": { + "prefix": "sapply", + "body": "sapply(${1:list}, ${2:function})" + }, + "mapply": { + "prefix": "mapply", + "body": "mapply(${1:function}, ${2:...})" + }, + "tapply": { + "prefix": "tapply", + "body": "tapply(${1:vector}, ${2:index}, ${3:function})" + }, + "vapply": { + "prefix": "vapply", + "body": "vapply(${1:list}, ${2:function}, FUN.VALUE = ${3:type}, ${4:...})" + }, + "rapply": { + "prefix": "rapply", + "body": "rapply(${1:list}, ${2:function})" + }, + "timestamp": { + "prefix": "ts", + "body": "# ${CURRENT_DAY_NAME_SHORT} ${CURRENT_MONTH_NAME_SHORT} ${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND} ${CURRENT_YEAR} ------------------------------\n" + }, + "shinyapp": { + "prefix": "shinyapp", + "body": [ + "library(shiny)", + "", + "ui <- fluidPage(", + " ${0}", + ")", + "", + "server <- function(input, output, session) {", + " ", + "}", + "", + "shinyApp(ui, server)\n" + ] + }, + "shinymod": { + "prefix": "shinymod", + "body": [ + "${1:name}_UI <- function(id) {", + " ns <- NS(id)", + " tagList(", + " ${0}", + " )", + "}", + "", + "${1:name} <- function(input, output, session) {", + " ", + "}\n" + ] + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/rescript.json b/dot_vim/plugged/friendly-snippets/snippets/rescript.json new file mode 100644 index 0000000..b9de0de --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/rescript.json @@ -0,0 +1,217 @@ +{ + "Module": { + "prefix": ["module"], + "body": [ + "module ${1:Name} = {", + "\t${2:// Module contents}", + "}" + ] + }, + "Switch": { + "prefix": ["switch"], + "body": [ + "switch ${1:value} {", + "| ${2:pattern1} => ${3:expression}", + "${4:| ${5:pattern2} => ${6:expression}}", + "}" + ] + }, + "Try": { + "prefix": ["try"], + "body": [ + "try {", + "\t${1:expression}", + "} catch {", + "| ${2:MyException} => ${3:expression}", + "}" + ] + }, + "For Loop": { + "prefix": ["for"], + "body": [ + "for ${1:i} in ${2:startValueInclusive} to ${3:endValueInclusive} {", + "\t${4:Js.log(${1:i})}", + "}" + ] + }, + "Reverse For Loop": { + "prefix": ["for"], + "body": [ + "for ${1:i} in ${2:startValueInclusive} downto ${3:endValueInclusive} {", + "\t${4:Js.log(${1:i})}", + "}" + ] + }, + "Global External Object": { + "prefix": ["@bs", "external"], + "body": [ + "@val external ${1:setTimeout}: ${2:(unit => unit, int) => float} = \"${3:setTimeout}\"" + ] + }, + "Global External Module": { + "prefix": ["@bs", "external"], + "body": [ + "@scope(\"${1:Math}\") @val external ${2:random}: ${3:unit => float} = \"${4:random}\"" + ] + }, + "JS Module External": { + "prefix": ["@bs", "external"], + "body": [ + "@module(\"${1:path}\") external ${2:dirname}: ${3:string => string} = \"${4:dirname}\"" + ] + }, + "JS Module Default External": { + "prefix": ["@bs", "external"], + "body": [ + "@module external ${1:leftPad}: ${2:(string, int) => string} = \"${3:leftPad}\"" + ] + }, + "variable": { + "prefix": ["l", "let", "var"], + "body": ["let ${1:x} = ${2:\"hello\"}"] + }, + "mutable variable": { + "prefix": ["lm", "letm", "mvar"], + "body": ["let ${1:x} = ref(${2:\"hello\"})"] + }, + "type": { + "prefix": ["t", "tp", "type"], + "body": ["type ${1:x} = ${2:int}"] + }, + "type with generic": { + "prefix": ["tpg", "typeg"], + "body": ["type ${1:x}<'${2:a}> = ${3:int}"] + }, + "type polimorphic variant": { + "prefix": ["tpv", "typepv"], + "body": ["type ${1:x} = [ #${2:one} | #${3:two} ]"] + }, + "inline functin": { + "prefix": ["fn"], + "body": [ + "let ${1:name} = (${2}) => ${0}" + ] + }, + "function": { + "prefix": ["function"], + "body": [ + "let ${1:doSomeStuff} = (${2}) => {", + "\t${0}", + "}" + ] + }, + "pipe functions": { + "prefix": ["fnpp", "funcpp", "pipe"], + "body": [ + "${1:firstFunction}", + "\t->${2:secondFunction}" + ] + }, + "console.log": { + "prefix": ["cl", "col"], + "body": ["Js.log(${1:something})"] + }, + "console.info": { + "prefix": ["ci", "coi"], + "body": ["Js.info(${1:something})"] + }, + "console.warn": { + "prefix": ["cw", "cow"], + "body": ["Js.warn(${1:something})"] + }, + "console.error": { + "prefix": ["ce", "cer"], + "body": ["Js.error(${1:something})"] + }, + "console.trace": { + "prefix": ["ct", "ctr"], + "body": ["Js.trace(${1:something})"] + }, + "console.timeStart": { + "prefix": ["cts"], + "body": ["Js.timeStart(${1:something})"] + }, + "console.timeEnd": { + "prefix": ["cte"], + "body": ["Js.timeEnd(${1:something})"] + }, + "Belt. fromString": { + "prefix": ["bfs", "bfstr"], + "body": ["Belt.Int.fromString(${1:10})"] + }, + "Belt. toString": { + "prefix": ["bts", "btstr"], + "body": ["Belt.Int.toString(${1:10})"] + }, + "if inline": { + "prefix": ["ifi"], + "body": ["if ${1:a} {${2:b}} else {${3:c}}"] + }, + "Ternary operator": { + "prefix": ["to"], + "body": ["${1:a} ? ${2:b} : ${3:c}"] + }, + "Object destructuring": { + "prefix": ["dob"], + "body": ["let {${1:a}} = ${2:data}"] + }, + "Array destructuring": { + "prefix": ["dar"], + "body": ["let [${1:a}] = ${2:data}"] + }, + "Raise exception": { + "prefix": ["rs", "raise"], + "body": ["raise(${1:SomeError}(${2:// write your text}))"] + }, + "@genType": { + "prefix": ["gt"], + "body": ["@genType"] + }, + "@genType import": { + "prefix": ["gti"], + "body": ["@genType.import(\"${1:./MyMath}\")"] + }, + "@genType alias": { + "prefix": ["gta"], + "body": ["@genType.as(\"${1:CB}\")"] + }, + "@@warning": { + "prefix": ["@w"], + "body": ["@@warning(\"${1:-27}\")"] + }, + "alias": { + "prefix": ["@a"], + "body": ["@as(\"${1:aria-label}\")"] + }, + "compiler deprecation warn": { + "prefix": ["@dw"], + "body": [ + "@deprecated(\"${1:This field deprecated}. Use ${2:something} instead\")" + ] + }, + "Top level js embed": { + "prefix": ["tle", "tlr"], + "body": [ + "%%raw(`", + "\t${1://js code}", + "`)" + ] + }, + "expression level js embed": { + "prefix": ["ele", "exe", "elr"], + "body": ["%raw(\"${1://js expression}\")"] + }, + "js debugger": { + "prefix": ["dbg"], + "body": ["%%debugger"] + }, + "React Component": { + "prefix": ["react.component", "@react"], + "body": [ + "@react.component", + "let make = (${1}) => {", + "\t${2}", + "}" + ] + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/rmarkdown.json b/dot_vim/plugged/friendly-snippets/snippets/rmarkdown.json new file mode 100644 index 0000000..1602347 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/rmarkdown.json @@ -0,0 +1,40 @@ +{ + "YAML Header": { + "prefix": "---", + "body": [ + "---", + "title: ${1:title}", + "date: ${2:\"`r Sys.Date()`\"}", + "output: ${4:pdf_document}", + "---" + ] + }, + "Insert Block Chunck": { + "prefix": "```", + "body": [ + "```{r}", + "${1}", + "```" + ] + }, + "Insert Inline Chunck": { + "prefix": "`", + "body": "`r ${0}`" + }, + "Insert Code Language": { + "prefix": "```", + "body": [ + "```{${1:lang}}", + "${0}", + "```" + ] + }, + "Insert Block Equation": { + "prefix": "$$", + "body": [ + "\\$$", + "${0}", + "\\$$" + ] + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/ruby.json b/dot_vim/plugged/friendly-snippets/snippets/ruby.json new file mode 100644 index 0000000..c6a506f --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/ruby.json @@ -0,0 +1,440 @@ +{ + "Exception block": { + "prefix": "begin", + "body": [ + "begin", + "\t$1", + "rescue => exception", + "\t", + "end" + ] + }, + "Exception block with ensure": { + "prefix": "begin ensure", + "body": [ + "begin", + "\t$1", + "rescue => exception", + "\t", + "ensure", + "\t", + "end" + ] + }, + "Exception block with else and ensure": { + "prefix": "begin", + "body": [ + "begin", + "\t$1", + "rescue => exception", + "\t", + "else", + "\t", + "ensure", + "\t", + "end" + ] + }, + "Class definition with initialize": { + "prefix": "class init", + "body": [ + "class ${1:ClassName}", + "\tdef initialize", + "\t\t$0", + "\tend", + "end" + ] + }, + "Class definition": { + "prefix": "class", + "body": [ + "class ${1:ClassName}", + "\t$0", + "end" + ] + }, + "for loop": { + "prefix": "for", + "body": [ + "for ${1:value} in ${2:enumerable} do", + "\t$0", + "end" + ] + }, + "if": { + "prefix": "if", + "body": [ + "if ${1:test}", + "\t$0", + "end" + ] + }, + "if else": { + "prefix": "ife", + "body": [ + "if ${1:test}", + "\t$0", + "else", + "\t", + "end" + ] + }, + "if elsif": { + "prefix": "ifei", + "body": [ + "if ${1:test}", + "\t$0", + "elsif ", + "\t", + "end" + ] + }, + "if elsif else": { + "prefix": "ifee", + "body": [ + "if ${1:test}", + "\t$0", + "elsif ", + "\t", + "else", + "\t", + "end" + ] + }, + "case": { + "prefix": "case", + "body": [ + "case ${1:test}", + "when $2", + "\t$3", + "when $4", + "\t$5", + "else", + "\t$6", + "end" + ] + }, + "forever loop": { + "prefix": "loop", + "body": [ + "loop do", + "\t$0", + "end" + ] + }, + "Module definition": { + "prefix": "module", + "body": [ + "module ${1:ModuleName}", + "\t$0", + "end" + ] + }, + "unless": { + "prefix": "unless", + "body": [ + "unless ${1:test}", + "\t$0", + "end" + ] + }, + "until loop": { + "prefix": "until", + "body": [ + "until ${1:test}", + "\t$0", + "end" + ] + }, + "while loop": { + "prefix": "while", + "body": [ + "while ${1:test}", + "\t$0", + "end" + ] + }, + "method definition": { + "prefix": "def", + "body": [ + "def ${1:method_name}", + "\t$0", + "end" + ] + }, + "class method definition": { + "prefix": "defs", + "body": [ + "def self.${1:method_name}", + "\t$0", + "end" + ] + }, + "initialize method definition": { + "prefix": "definit", + "body": [ + "def initialize(${1:args})", + "\t$0", + "end" + ] + }, + "method_missing definition": { + "prefix": "defmm", + "body": [ + "def method_missing(meth, *args, &blk)", + "\t$0", + "end" + ] + }, + "delegator definition": { + "prefix": "defd", + "body": "def_delegator :${1:@del_obj}, :${2:del_meth}, :${0:new_name}" + }, + "alias method definition": { + "prefix": "am", + "body": "alias_method :${1:new_name}, :${0:old_name}" + }, + "Rake Task": { + "prefix": "rake", + "description": "Create a Rake Task", + "body": [ + "namespace :${1} do", + "\tdesc \"${2}\"", + "\ttask ${3}: :environment do", + "\t\t${4}", + "\tend", + "end" + ] + }, + "Insert do … end block": { + "prefix": "do", + "body": [ + "do", + "\t$0", + "end" + ] + }, + "Insert do |variable| … end block": { + "prefix": "dop", + "body": [ + "do |${1:variable}|", + "\t$0", + "end" + ] + }, + "Insert curly braces block": { + "prefix": [ + "{p", + "{P" + ], + "body": "{ ${1:|${2:variable}| }$0 " + }, + "Insert encoding comment": { + "prefix": "enc", + "body": "# encoding: utf-8$0" + }, + "Insert frozen literal string": { + "prefix": "frozen", + "body": "# frozen_string_literal: true$0" + }, + "Insert require": { + "prefix": "req", + "body": "require '${1}'$0" + }, + "Insert require_relative": { + "prefix": "reqr", + "body": "require_relative '${1}'$0" + }, + "Insert attr_reader": { + "prefix": "r", + "body": "attr_reader :${0:attr_names}" + }, + "Insert attr_writer": { + "prefix": "w", + "body": "attr_writer :${0:attr_names}" + }, + "Insert attr_accessor": { + "prefix": "rw", + "body": "attr_accessor :${0:attr_names}" + }, + "Insert inctance variable cache": { + "prefix": "ivc", + "body": "@${1:variable_name} ||= ${0:cached_value}" + }, + "Insert each with inline block": { + "prefix": "ea", + "body": "each { |${1:e}| $0 }" + }, + "Insert each with multiline block": { + "prefix": "ead", + "body": [ + "each do |${1:e}|", + "\t$0", + "end" + ] + }, + "Insert each with index inline block": { + "prefix": "eawi", + "body": "each_with_index { |${1:e}, ${2:i}| $0 }" + }, + "Insert each with index multiline block": { + "prefix": "eawid", + "body": [ + "each_with_index do |${1:e}, ${2:i}|", + "\t$0", + "end" + ] + }, + "Insert reduce inline block": { + "prefix": "red", + "body": "reduce(${1:init}) { |${2:mem}, ${3:var}| $0 }" + }, + "Insert reduce multiline block": { + "prefix": "redd", + "body": [ + "reduce(${1:init}) do |${2:mem}, ${3:var}|", + "\t$0", + "end" + ] + }, + "Insert map inline block": { + "prefix": "map", + "body": "map { |${1:e}| $0 }" + }, + "Insert map multiline block": { + "prefix": "mapd", + "body": [ + "map do |${1:e}|", + "\t$0", + "end" + ] + }, + "Insert lambda arrow": { + "prefix": "->", + "body": "-> { $0 }" + }, + "Insert lambda arrow with arguments": { + "prefix": "->a", + "body": "->(${1:args}) { $0 }" + }, + "Insert do block": { + "prefix": "do", + "body": [ + "do", + "\t$0", + "end" + ] + }, + "Insert do block with variables": { + "prefix": "dov", + "body": [ + "do |${1:v}|", + "\t$0", + "end" + ] + }, + "Insert key: value": { + "prefix": ":", + "body": "${1:key}: ${2:value}" + }, + "Insert inline block": { + "prefix": "b", + "body": "{ |${1:var}| $0 }" + }, + "Insert byebug call": { + "prefix": "debug", + "body": "require 'byebug'; byebug" + }, + "Insert pry call": { + "prefix": "pry", + "body": "require 'pry'; binding.pry" + }, + "Insert irb call": { + "prefix": "irb", + "body": "binding.irb" + }, + "Insert RSpec.describe class": { + "prefix": "rdesc", + "body": [ + "RSpec.describe ${1:described_class} do", + "\t$0", + "end" + ] + }, + "Insert describe class": { + "prefix": "desc", + "body": [ + "describe ${1:described_class} do", + "\t$0", + "end" + ] + }, + "Insert describe block": { + "prefix": "descm", + "body": [ + "describe '${1:#method}' do", + "\t${0:pending 'Not implemented'}", + "end" + ] + }, + "Insert context block": { + "prefix": "cont", + "body": [ + "context '${1:message}' do", + "\t$0", + "end" + ] + }, + "Insert before block": { + "prefix": "bef", + "body": [ + "before :${1:each} do", + "\t$0", + "end" + ] + }, + "Insert let": { + "prefix": "let", + "body": "let(:${1:object}) { $0 }" + }, + "Insert let!": { + "prefix": "let!", + "body": "let!(:${1:object}) { $0 }" + }, + "Insert subject definition": { + "prefix": "subj", + "body": "subject(:${1:name}) { $0 }" + }, + "Insert expect": { + "prefix": "exp", + "body": "expect(${1:object}).to ${0}" + }, + "Insert expect with block": { + "prefix": "expb", + "body": "expect { ${1:object} }.to ${0}" + }, + "Insert expect with raise_error": { + "prefix": "experr", + "body": "expect { ${1:object} }.to raise_error ${2:StandardError}" + }, + "Insert allow": { + "prefix": "allow", + "body": "allow(${1:object}).to $0" + }, + "Insert shared_examples": { + "prefix": "shared", + "body": "shared_examples '${0:shared examples name}'" + }, + "Insert it_behaves_like": { + "prefix": "ibl", + "body": "it_behaves_like '${0:shared examples name}'" + }, + "Insert it block": { + "prefix": "it", + "body": [ + "it '${1:spec_name}' do", + "\t$0", + "end" + ] + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/rust.json b/dot_vim/plugged/friendly-snippets/snippets/rust.json new file mode 100644 index 0000000..815bee1 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/rust.json @@ -0,0 +1,413 @@ +{ + "allow": { + "prefix": "allow", + "body": ["#![allow(${1})]"], + "description": "#![allow(…)]" + }, + "deny": { + "prefix": "deny", + "body": ["#![deny(${1})]"], + "description": "#![deny(…)]" + }, + "warn": { + "prefix": "warn", + "body": ["#![warn(${1})]"], + "description": "#![warn(…)]" + }, + "no_std": { + "prefix": "no_std", + "body": ["#![no_std]"], + "description": "#![no_std]" + }, + "no_core": { + "prefix": "no_core", + "body": ["#![no_core]"], + "description": "#![no_core]" + }, + "feature": { + "prefix": "feature", + "body": ["#![feature(${1})]"], + "description": "#![feature(…)]" + }, + "macro_use": { + "prefix": "macro_use", + "body": ["#[macro_use(${1})]"], + "description": "#[macro_use(…)]" + }, + "repr": { + "prefix": "repr", + "body": ["#[repr(${1})]"], + "description": "#[repr(…)]" + }, + "cfg": { + "prefix": "cfg", + "body": ["#[cfg(${1})]"], + "description": "#[cfg(…)]" + }, + "cfg_attr": { + "prefix": "cfg_attr", + "body": ["#[cfg_attr(${1}, ${2})]"], + "description": "#[cfg_attr(…, …)]" + }, + "cfg!": { + "prefix": "cfg!", + "body": ["cfg!(${1})"], + "description": "cfg!(…)" + }, + "column": { + "prefix": "column", + "body": ["column!()"], + "description": "column!()" + }, + "concat": { + "prefix": "concat", + "body": ["concat!(${1})"], + "description": "concat!(…)" + }, + "concat_idents": { + "prefix": "concat_idents", + "body": ["concat_idents!(${1})"], + "description": "concat_idents!(…)" + }, + "debug_assert": { + "prefix": "debug_assert", + "body": ["debug_assert!(${1});"], + "description": "debug_assert!(…)" + }, + "debug_assert_eq": { + "prefix": "debug_assert_eq", + "body": ["debug_assert_eq!(${1}, ${2});"], + "description": "debug_assert_eq!(…, …)" + }, + "env": { + "prefix": "env", + "body": ["env!(\"${1}\")"], + "description": "env!(\"…\")" + }, + "file": { + "prefix": "file", + "body": ["file!()"], + "description": "file!()" + }, + "format": { + "prefix": "format", + "body": ["format!(\"${1}\")"], + "description": "format!(…)" + }, + "format_args": { + "prefix": "format_args", + "body": ["format_args!(\"${1}\")"], + "description": "format_args!(…)" + }, + "include": { + "prefix": "include", + "body": ["include!(\"${1}\");"], + "description": "include!(\"…\");" + }, + "include_bytes": { + "prefix": "include_bytes", + "body": ["include_bytes!(\"${1}\")"], + "description": "include_bytes!(\"…\")" + }, + "include_str": { + "prefix": "include_str", + "body": ["include_str!(\"${1}\")"], + "description": "include_str!(\"…\")" + }, + "line": { + "prefix": "line", + "body": ["line!()"], + "description": "line!()" + }, + "module_path": { + "prefix": "module_path", + "body": ["module_path!()"], + "description": "module_path!()" + }, + "option_env": { + "prefix": "option_env", + "body": ["option_env!(\"${1}\")"], + "description": "option_env!(\"…\")" + }, + "panic": { + "prefix": "panic", + "body": ["panic!(\"${1}\");"], + "description": "panic!(…);" + }, + "print": { + "prefix": "print", + "body": ["print!(\"${1}\");"], + "description": "print!(…);" + }, + "println": { + "prefix": "println", + "body": ["println!(\"${1}\");"], + "description": "println!(…);" + }, + "stringify": { + "prefix": "stringify", + "body": ["stringify!(${1})"], + "description": "stringify!(…)" + }, + "thread_local": { + "prefix": "thread_local", + "body": ["thread_local!(static ${1:STATIC}: ${2:Type} = ${4:init});"], + "description": "thread_local!(static …: … = …);" + }, + "try": { + "prefix": "try", + "body": ["try!(${1})"], + "description": "try!(…)" + }, + "unimplemented": { + "prefix": "unimplemented", + "body": ["unimplemented!()"], + "description": "unimplemented!()" + }, + "unreachable": { + "prefix": "unreachable", + "body": ["unreachable!(${1})"], + "description": "unreachable!(…)" + }, + "vec": { + "prefix": "vec", + "body": ["vec![${1}]"], + "description": "vec![…]" + }, + "write": { + "prefix": "write", + "body": ["write!(${1}, \"${2}\")"], + "description": "write!(…)" + }, + "writeln": { + "prefix": "writeln", + "body": ["writeln!(${1}, \"${2}\")"], + "description": "writeln!(…, …)" + }, + "Err": { + "prefix": "Err", + "body": ["Err(${1})"], + "description": "Err(…)" + }, + "Ok": { + "prefix": "Ok", + "body": ["Ok(${1:result})"], + "description": "Ok(…)" + }, + "Some": { + "prefix": "Some", + "body": ["Some(${1})"], + "description": "Some(…)" + }, + "assert": { + "prefix": "assert", + "body": ["assert!(${1});"], + "description": "assert!(…);" + }, + "assert_eq": { + "prefix": "assert_eq", + "body": ["assert_eq!(${1}, ${2});"], + "description": "assert_eq!(…, …);" + }, + "bench": { + "prefix": "bench", + "body": [ + "#[bench]", + "fn ${1:name}(b: &mut test::Bencher) {", + " ${2:b.iter(|| ${3:/* benchmark code */})}", + "}" + ], + "description": "#[bench]" + }, + "const": { + "prefix": "const", + "body": ["const ${1:CONST}: ${2:Type} = ${4:init};"], + "description": "const …: … = …;" + }, + "derive": { + "prefix": "derive", + "body": ["#[derive(${1})]"], + "description": "#[derive(…)]" + }, + "else": { + "prefix": "else", + "body": ["else {", " ${1:unimplemented!();}", "}"], + "description": "else { … }" + }, + "enum": { + "prefix": "enum", + "body": [ + "#[derive(Debug)]", + "enum ${1:Name} {", + " ${2:Variant1},", + " ${3:Variant2},", + "}" + ], + "description": "enum … { … }" + }, + "extern-crate": { + "prefix": "extern-crate", + "body": ["extern crate ${1:name};"], + "description": "extern crate …;" + }, + "extern-fn": { + "prefix": "extern-fn", + "body": [ + "extern \"C\" fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {", + " ${5:// add code here}", + "}" + ], + "description": "extern \"C\" fn …(…) { … }" + }, + "extern-mod": { + "prefix": "extern-mod", + "body": ["extern \"C\" {", " ${2:// add code here}", "}"], + "description": "extern \"C\" { … }" + }, + "fn": { + "prefix": "fn", + "body": [ + "fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {", + " ${5:unimplemented!();}", + "}" + ], + "description": "fn …(…) { … }" + }, + "for": { + "prefix": "for", + "body": ["for ${1:pat} in ${2:expr} {", " ${3:unimplemented!();}", "}"], + "description": "for … in … { … }" + }, + "if-let": { + "prefix": "if-let", + "body": [ + "if let ${1:Some(pat)} = ${2:expr} {", + " ${0:unimplemented!();}", + "}" + ], + "description": "if let … = … { … }" + }, + "if": { + "prefix": "if", + "body": ["if ${1:condition} {", " ${2:unimplemented!();}", "}"], + "description": "if … { … }" + }, + "impl-trait": { + "prefix": "impl-trait", + "body": [ + "impl ${1:Trait} for ${2:Type} {", + " ${3:// add code here}", + "}" + ], + "description": "impl … for … { … }" + }, + "impl": { + "prefix": "impl", + "body": ["impl ${1:Type} {", " ${2:// add code here}", "}"], + "description": "impl … { … }" + }, + "inline-fn": { + "prefix": "inline-fn", + "body": [ + "#[inline]", + "pub fn ${1:name}() {", + " ${2:unimplemented!();}", + "}" + ], + "description": "inlined function" + }, + "let": { + "prefix": "let", + "body": ["let ${1:pat} = ${2:expr};"], + "description": "let … = …;" + }, + "loop": { + "prefix": "loop", + "body": ["loop {", " ${2:unimplemented!();}", "}"], + "description": "loop { … }" + }, + "macro_rules": { + "prefix": "macro_rules", + "body": ["macro_rules! ${1:name} {", " (${2}) => (${3})", "}"], + "description": "macro_rules! … { … }" + }, + "main": { + "prefix": "main", + "body": ["fn main() {", " ${1:unimplemented!();}", "}"], + "description": "fn main() { … }" + }, + "match": { + "prefix": "match", + "body": [ + "match ${1:expr} {", + " ${2:Some(expr)} => ${3:expr},", + " ${4:None} => ${5:expr},", + "}" + ], + "description": "match … { … }" + }, + "mod": { + "prefix": "mod", + "body": ["mod ${1:name};"], + "description": "mod …;" + }, + "mod-block": { + "prefix": "mod-block", + "body": ["mod ${1:name} {", " ${2:// add code here}", "}"], + "description": "mod … { … }" + }, + "static": { + "prefix": "static", + "body": ["static ${1:STATIC}: ${2:Type} = ${4:init};"], + "description": "static …: … = …;" + }, + "struct-tuple": { + "prefix": "struct-tuple", + "body": ["struct ${1:Name}(${2:Type});"], + "description": "struct …(…);" + }, + "struct-unit": { + "prefix": "struct-unit", + "body": ["struct ${1:Name};"], + "description": "struct …;" + }, + "struct": { + "prefix": "struct", + "body": [ + "#[derive(Debug)]", + "struct ${1:Name} {", + " ${2:field}: ${3:Type}", + "}" + ], + "description": "struct … { … }" + }, + "test": { + "prefix": "test", + "body": ["#[test]", "fn ${1:name}() {", " ${2:unimplemented!();}", "}"], + "description": "#[test]" + }, + "trait": { + "prefix": "trait", + "body": ["trait ${1:Name} {", " ${2:// add code here}", "}", ""], + "description": "trait … { … }" + }, + "type": { + "prefix": "type", + "body": ["type ${1:Alias} = ${2:Type};"], + "description": "type … = …;" + }, + "while-let": { + "prefix": "while-let", + "body": [ + "while let ${1:Some(pat)} = ${2:expr} {", + " ${0:unimplemented!();}", + "}" + ], + "description": "while let … = … { … }" + }, + "while": { + "prefix": "while", + "body": ["while ${1:condition} {", " ${2:unimplemented!();}", "}"], + "description": "while … { … }" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/scala.json b/dot_vim/plugged/friendly-snippets/snippets/scala.json new file mode 100644 index 0000000..a90585c --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/scala.json @@ -0,0 +1,97 @@ +{ + "object": { + "prefix": "object", + "body": ["object ${1:ObjectName} {", + "\t${2:println(\"Hello, world!\")}", + "}" + ], + "description": "Object" + }, + "class": { + "prefix": "class", + "body": ["class ${1:ClassName} {", + "\t${2:println(\"Hello, world!\")}", + "}" + ], + "description": "Class" + }, + "case_class": { + "prefix": "case_class", + "body": "case class ${1:CaseClassName}(${2:argName}: ${3:ArgType})", + "description": "Case class" + }, + "trait": { + "prefix": "trait", + "body": ["trait ${1:TraitName} {", + "\t${2:}", + "}" + ], + "description": "Trait" + }, + "main_object": { + "prefix": "obj_main", + "body": ["object ${1:ObjectName} {", + "\tdef main(args: Array[String]): Unit = {", + "\t\t${2:println(\"Hello, world!\")}", + "\t}", + "}" + ], + "description": "Object with main method" + }, + "app": { + "prefix": "app", + "body": ["object ${1:App} extends App {", + "\t${2:println(\"Hello, world!\")}", + "}" + ], + "description": "Object extending App" + }, + "def": { + "prefix": "def", + "body": ["def ${1:methodName}(${2:argName}: ${3:ArgType}): ${4:ReturnType} = {", + "\t${5:println(\"Hello, world!\")}", + "}" + ], + "description": "Method" + }, + "def_short": { + "prefix": "def_short", + "body": "def ${1:methodName}(${2:argName}: ${3:ArgType}): ${4:ReturnType} = ${5:println(\"Hello, world!\")}", + "description": "Method as one-liner" + }, + "for": { + "prefix": "for", + "body": ["for (${1:element} <- elements) {", + "\t${2:println(element.toString)}", + "}" + ], + "description": "For loop" + }, + "while": { + "prefix": "while", + "body": ["while(${1:condition}) {", + "\t${2:println(\"Hello, world!\")}", + "}" + ], + "description": "While loop" + }, + "ifelse": { + "prefix": "ifelse", + "body": ["if (${1:condition}) {", + "\t${2:println(\"Hello, world!\")}", + "} else {", + "\t${2:println(\"Hello, world!\")}", + "}" + ], + "description": "Branch based on conditions using if/else" + }, + "match": { + "prefix": "match", + "body": ["${1:x} match {", + "\tcase ${2:0} => ${3:\"zero\"}", + "\tcase ${4:1} => ${5:\"one\"}", + "}" + ], + "description": "Branch based on conditions using pattern matching" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/shell.json b/dot_vim/plugged/friendly-snippets/snippets/shell.json new file mode 100644 index 0000000..35e070c --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/shell.json @@ -0,0 +1,93 @@ +{ + "bash": { + "prefix": ["bash", "#!", "shebang"], + "body": "${1|#!/bin/bash,#!/usr/bin/env bash,#!/bin/sh,#!/usr/bin/env sh|}\n", + "description": [ + "Option 1:\n", + "#!/bin/bash\n", + "Description: Shebang Bash executor.\n", + "Option 2:\n", + "#!/usr/bin/env bash\n", + "Description: Shell searchs for the first match of bash in the $PATH environment variable.\n", + "It can be useful if you aren't aware of the absolute path or don't want to search for it.\n" + ] + }, + "echo": { + "prefix": "echo", + "body": "echo \"${0:message}\"", + "description": "Echo a message." + }, + "read": { + "prefix": "read", + "body": "read -r ${0:VAR}", + "description": "Read input of ${VAR}." + }, + "if": { + "prefix": "if", + "body": "if [[ ${1:condition} ]]; then\n\t${0}\nfi", + "description": "An IF statement." + }, + "elseif": { + "prefix": "elseif", + "body": "elif [[ ${1:condition} ]]; then\n\t${0}", + "description": "Add an elseif to an if statement." + }, + "else": { + "prefix": "else", + "body": "else\n\t${0:command}", + "description": "else" + }, + "for_in": { + "prefix": "for_in", + "body": "for ${1:VAR} in ${0:LIST}\ndo\n\techo \"\\$${1:VAR}\"\ndone\n", + "description": "for loop in list" + }, + "for_i": { + "prefix": "for_i", + "body": "for ((${1:i} = 0; ${1:i} < ${0:10}; ${1:i}++)); do\n\techo \"\\$${1:i}\"\ndone\n", + "description": "An index-based iteration for loop." + }, + "while": { + "prefix": "while", + "body": "while [[ ${1:condition} ]]; do\n\t${0}\ndone\n", + "description": "A while loop by condition." + }, + "until": { + "prefix": "until", + "body": "until [[ ${1:condition} ]]; do\n\t${0}\ndone\n", + "description": "until loop by condition" + }, + "function": { + "prefix": "function", + "body": "${1:name} ()\n{\n\t${0}\n}", + "description": [ + "This defines a function named name.\n", + "The reserved word function is optional.\n", + "If the function reserved word is supplied, the parentheses are optional.\n", + "1. Recommended way:\n", + "name() {}\n", + "2. C-like-way:\nfunction name [()] {}" + ] + }, + "case": { + "prefix": "case", + "body": "case \"\\$${1:VAR}\" in\n\t${2:1}) echo 1\n\t;;\n\t${3:2|3}) echo 2 or 3\n\t;;\n\t*) echo default\n\t;;\nesac\n", + "description": [ + "case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac\n", + "A case command first expands word, and tries to match it against each pattern in turn." + ] + }, + "break": { + "prefix": "break", + "body": "break ${0}", + "description": [ + "The break command tells Bash to leave the loop straight away.\n", + "Enter the break or break (n) where n=number of loops." + ] + }, + "expr": { + "prefix": "expr", + "body": "expr ${0:1 + 1}", + "description": "Calculate numbers with Bash." + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/solidity.json b/dot_vim/plugged/friendly-snippets/snippets/solidity.json new file mode 100644 index 0000000..6052be6 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/solidity.json @@ -0,0 +1,210 @@ +{ + + "spdx license": { + "prefix": "spdx", + "body": "// SPDX-License-Identifier: MIT", + "description": "SPDX License" + }, + "pragma solidity":{ + "prefix": "pra", + "body": "pragma solidity ${1:version};" + }, + "pragma solidity example":{ + "prefix": "pragm-ex", + "body": "pragma solidity >=0.5.0 <0.8.0;" + }, + "pragma abicoder":{ + "prefix": "pragm-abicoder", + "body": "pragma abicoder v2;" + }, + "import contract": { + "prefix": "im", + "body": "import '${1:contract}';" + }, + "contract declaration": { + "prefix": "con", + "body": "contract ${1:Name} {\n\t$0\n}" + }, + "library declaration": { + "prefix": "lib", + "body": "library ${1:Name} {\n\t$0\n}" + }, + "interface declaration": { + "prefix": "interf", + "body": "interface ${1:Name} {\n\t$0\n}" + }, + "enum declaration": { + "prefix": "enum", + "body": "enum ${1:Name} {${2:item1}, ${3:item2} }" + }, + "mapping declaration":{ + "prefix": "map", + "body": "mapping (${1:type1}=>${2:type2}) ${3:name};" + }, + "constructor declaration": { + "prefix": "const", + "body": "constructor (${1:type} ${2:name}) public {\n\t$0\n}" + }, + "function declaration": { + "prefix": "func", + "body": "function ${1:name}(${2:type} ${3:name}) {\n\t$0\n}" + }, + "function return declaration": { + "prefix": "funcr", + "body": "function ${1:name}(${2:type} ${3:name}) returns (${4:type} ${5:name}) {\n\t$0\n}" + } + , + "function view declaration": { + "prefix": "funcrview", + "body": "function ${1:name}(${2:type} ${3:name}) view public returns (${4:type} ${5:name}) {\n\t$0\n}" + }, + "event declaration": { + "prefix": "ev", + "body": "event ${1:name}(${2:type} ${3:name} $0);" + }, + "error declaration": { + "prefix": "error", + "body": "error ${1:name}(${2:type} ${3:name} $0);" + }, + "modifier declaration": { + "prefix": "mod", + "body": "modifier ${1:name}($2) {\n\t$0_\n}" + }, + "if else statement": { + "prefix": "ife", + "body": "if (${1:condition}) {\n\t$2\n} else {\n\t$0\n}" + }, + "for statement": { + "prefix": "for", + "body": "for (uint256 ${1:index} = 0; $1 < ${2:array}.length; $1${3:++}) {\n\t$0\n}" + }, + "unchecked" : { + "prefix": "unchecked", + "body": "unchecked {\n\t$0\n}" + }, + "natspec contract": { + "prefix": "\/\/\/nat_contract", + "body": "\/\/\/ @title A title that should describe the contract\/interface\r\n\/\/\/ @author The name of the author\r\n\/\/\/ @notice Explain to an end user what this does\r\n\/\/\/ @dev Explain to a developer any extra details", + "description": "natspec for contract" + }, + "natspec variable": { + "prefix": "\/\/\/nat_statevariable", + "body": "\/\/\/ @notice Explain to an end user what this does\r\n\/\/\/ @dev Explain to a developer any extra details\r\n\/\/\/ @return Documents the return variables of a contract\u2019s function state variable\r\n\/\/\/ @inheritdoc\tCopies all missing tags from the base function (must be followed by the contract name)", + "description": "natspec for state variable" + }, + "natspec function": { + "prefix": "\/\/\/nat_function", + "body": "\/\/\/ @notice Explain to an end user what this does\r\n\/\/\/ @dev Explain to a developer any extra details\r\n\/\/\/ @param Documents a parameter just like in doxygen (must be followed by parameter name)\r\n\/\/\/ @return Documents the return variables of a contract\u2019s function state variable\r\n\/\/\/ @inheritdoc\tCopies all missing tags from the base function (must be followed by the contract name)", + "description": "natspec for function" + }, + "natspec event": { + "prefix": "\/\/\/nat_event", + "body": "\/\/\/ @notice Explain to an end user what this does\r\n\/\/\/ @dev Explain to a developer any extra details\r\n\/\/\/ @param Documents a parameter just like in doxygen (must be followed by parameter name)", + "description": "natspec for event" + }, + "erc20 interface": { + "prefix": "erc20i", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}", + "description": "ERC20 token standard interface" + }, + "erc20 example": { + "prefix": "erc20", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender , uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}\r\n\r\ncontract Standard_Token is Token {\r\n uint256 constant private MAX_UINT256 = 2**256 - 1;\r\n mapping (address => uint256) public balances;\r\n mapping (address => mapping (address => uint256)) public allowed;\r\n uint256 public totalSupply;\r\n \/*\r\n NOTE:\r\n The following variables are OPTIONAL vanities. One does not have to include them.\r\n They allow one to customise the token contract & in no way influences the core functionality.\r\n Some wallets\/interfaces might not even bother to look at this information.\r\n *\/\r\n string public name; \/\/fancy name: eg Simon Bucks\r\n uint8 public decimals; \/\/How many decimals to show.\r\n string public symbol; \/\/An identifier: eg SBX\r\n\r\n constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) {\r\n balances[msg.sender] = _initialAmount; \/\/ Give the creator all initial tokens\r\n totalSupply = _initialAmount; \/\/ Update total supply\r\n name = _tokenName; \/\/ Set the name for display purposes\r\n decimals = _decimalUnits; \/\/ Amount of decimals for display purposes\r\n symbol = _tokenSymbol; \/\/ Set the symbol for display purposes\r\n }\r\n\r\n function transfer(address _to, uint256 _value) public override returns (bool success) {\r\n require(balances[msg.sender] >= _value, \"token balance is lower than the value requested\");\r\n balances[msg.sender] -= _value;\r\n balances[_to] += _value;\r\n emit Transfer(msg.sender, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {\r\n uint256 allowance = allowed[_from][msg.sender];\r\n require(balances[_from] >= _value && allowance >= _value, \"token balance or allowance is lower than amount requested\");\r\n balances[_to] += _value;\r\n balances[_from] -= _value;\r\n if (allowance < MAX_UINT256) {\r\n allowed[_from][msg.sender] -= _value;\r\n }\r\n emit Transfer(_from, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function balanceOf(address _owner) public override view returns (uint256 balance) {\r\n return balances[_owner];\r\n }\r\n\r\n function approve(address _spender, uint256 _value) public override returns (bool success) {\r\n allowed[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {\r\n return allowed[_owner][_spender];\r\n }\r\n}", + "description": "ERC20 example implementation" + }, + "erc165 interface": { + "prefix": "erc165i", + "body": "\/\/ https://eips.ethereum.org/EIPS/eip-165 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}", + "description": "ERC165 Standard Interface Detection Interface: Creates a standard method to publish and detect what interfaces a smart contract implements." + }, + "erc721 interface": { + "prefix": "erc721i", + "body": "\/\/ https://eips.ethereum.org/EIPS/eip-721, http://erc721.org/ \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\n\/\/\/ @title ERC-721 Non-Fungible Token Standard\r\n\/\/\/ @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-721\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x80ac58cd.\r\ninterface ERC721 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of any NFT changes by any mechanism.\r\n \/\/\/ This event emits when NFTs are created (`from` == 0) and destroyed\r\n \/\/\/ (`to` == 0). Exception: during contract creation, any number of NFTs\r\n \/\/\/ may be created and assigned without emitting Transfer. At the time of\r\n \/\/\/ any transfer, the approved address for that NFT (if any) is reset to none.\r\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when the approved address for an NFT is changed or\r\n \/\/\/ reaffirmed. The zero address indicates there is no approved address.\r\n \/\/\/ When a Transfer event emits, this also indicates that the approved\r\n \/\/\/ address for that NFT (if any) is reset to none.\r\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when an operator is enabled or disabled for an owner.\r\n \/\/\/ The operator can manage all NFTs of the owner.\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/\/\/ @notice Count all NFTs assigned to an owner\r\n \/\/\/ @dev NFTs assigned to the zero address are considered invalid, and this\r\n \/\/\/ function throws for queries about the zero address.\r\n \/\/\/ @param _owner An address for whom to query the balance\r\n \/\/\/ @return The number of NFTs owned by `_owner`, possibly zero\r\n function balanceOf(address _owner) external view returns (uint256);\r\n\r\n \/\/\/ @notice Find the owner of an NFT\r\n \/\/\/ @dev NFTs assigned to zero address are considered invalid, and queries\r\n \/\/\/ about them do throw.\r\n \/\/\/ @param _tokenId The identifier for an NFT\r\n \/\/\/ @return The address of the owner of the NFT\r\n function ownerOf(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT. When transfer is complete, this function\r\n \/\/\/ checks if `_to` is a smart contract (code size > 0). If so, it calls\r\n \/\/\/ `onERC721Received` on `_to` and throws if the return value is not\r\n \/\/\/ `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n \/\/\/ @param data Additional data with no specified format, sent in call to `_to`\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable;\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev This works identically to the other function with an extra data parameter,\r\n \/\/\/ except this function just sets data to \"\".\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\r\n \/\/\/ TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\r\n \/\/\/ THEY MAY BE PERMANENTLY LOST\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Change or reaffirm the approved address for an NFT\r\n \/\/\/ @dev The zero address indicates there is no approved address.\r\n \/\/\/ Throws unless `msg.sender` is the current NFT owner, or an authorized\r\n \/\/\/ operator of the current owner.\r\n \/\/\/ @param _approved The new approved NFT controller\r\n \/\/\/ @param _tokenId The NFT to approve\r\n function approve(address _approved, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Enable or disable approval for a third party (\"operator\") to manage\r\n \/\/\/ all of `msg.sender`'s assets\r\n \/\/\/ @dev Emits the ApprovalForAll event. The contract MUST allow\r\n \/\/\/ multiple operators per owner.\r\n \/\/\/ @param _operator Address to add to the set of authorized operators\r\n \/\/\/ @param _approved True if the operator is approved, false to revoke approval\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/\/\/ @notice Get the approved address for a single NFT\r\n \/\/\/ @dev Throws if `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _tokenId The NFT to find the approved address for\r\n \/\/\/ @return The approved address for this NFT, or the zero address if there is none\r\n function getApproved(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Query if an address is an authorized operator for another address\r\n \/\/\/ @param _owner The address that owns the NFTs\r\n \/\/\/ @param _operator The address that acts on behalf of the owner\r\n \/\/\/ @return True if `_operator` is an approved operator for `_owner`, false otherwise\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}", + "description": "ERC-721 Non-Fungible Token Standard, A standard interface for non-fungible tokens, also known as deeds." + }, + "erc777 interface": { + "prefix": "erc777i", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-777\r\n\/\/ Example implementation https:\/\/github.com\/0xjac\/ERC777\/blob\/master\/contracts\/examples\/ReferenceToken.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface ERC777Token {\r\n function name() external view returns (string memory);\r\n function symbol() external view returns (string memory);\r\n function totalSupply() external view returns (uint256);\r\n function balanceOf(address holder) external view returns (uint256);\r\n function granularity() external view returns (uint256);\r\n\r\n function defaultOperators() external view returns (address[] memory);\r\n function isOperatorFor(\r\n address operator,\r\n address holder\r\n ) external view returns (bool);\r\n function authorizeOperator(address operator) external;\r\n function revokeOperator(address operator) external;\r\n\r\n function send(address to, uint256 amount, bytes calldata data) external;\r\n function operatorSend(\r\n address from,\r\n address to,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n function burn(uint256 amount, bytes calldata data) external;\r\n function operatorBurn(\r\n address from,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n event Sent(\r\n address indexed operator,\r\n address indexed from,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Minted(\r\n address indexed operator,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Burned(\r\n address indexed operator,\r\n address indexed from,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event AuthorizedOperator(\r\n address indexed operator,\r\n address indexed holder\r\n );\r\n event RevokedOperator(address indexed operator, address indexed holder);\r\n}", + "description": "ERC777 token standard, extending ERC20" + }, + "erc1155 interface": { + "prefix": "erc1155i", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n\/\/ Example implementation https:\/\/github.com\/enjin\/erc-1155\/blob\/master\/contracts\/ERC1155.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\n\/**\r\n @title ERC-1155 Multi Token Standard\r\n @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n Note: The ERC-165 identifier for this interface is 0xd9b67a26.\r\n *\/\r\ninterface ERC1155 \/* is ERC165 *\/ {\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_id` argument MUST be the token type being transferred.\r\n The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);\r\n\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_ids` argument MUST be the list of tokens being transferred.\r\n The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);\r\n\r\n \/**\r\n @dev MUST emit when approval for a second party\/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).\r\n *\/\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/**\r\n @dev MUST emit when the URI is updated for a token ID.\r\n URIs are defined in RFC 3986.\r\n The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\r\n *\/\r\n event URI(string _value, uint256 indexed _id);\r\n\r\n \/**\r\n @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if balance of holder for token `_id` is lower than the `_value` sent.\r\n MUST revert on any other error.\r\n MUST emit the `TransferSingle` event to reflect the balance change (see \"Safe Transfer Rules\" section of the standard).\r\n After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _id ID of the token type\r\n @param _value Transfer amount\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`\r\n *\/\r\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if length of `_ids` is not the same as length of `_values`.\r\n MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.\r\n MUST revert on any other error.\r\n MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see \"Safe Transfer Rules\" section of the standard).\r\n Balance changes and events MUST follow the ordering of the arrays (_ids[0]\/_values[0] before _ids[1]\/_values[1], etc).\r\n After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _ids IDs of each token type (order and length must match _values array)\r\n @param _values Transfer amounts per token type (order and length must match _ids array)\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`\r\n *\/\r\n function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Get the balance of an account's tokens.\r\n @param _owner The address of the token holder\r\n @param _id ID of the token\r\n @return The _owner's balance of the token type requested\r\n *\/\r\n function balanceOf(address _owner, uint256 _id) external view returns (uint256);\r\n\r\n \/**\r\n @notice Get the balance of multiple account\/token pairs\r\n @param _owners The addresses of the token holders\r\n @param _ids ID of the tokens\r\n @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)\r\n *\/\r\n function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);\r\n\r\n \/**\r\n @notice Enable or disable approval for a third party (\"operator\") to manage all of the caller's tokens.\r\n @dev MUST emit the ApprovalForAll event on success.\r\n @param _operator Address to add to the set of authorized operators\r\n @param _approved True if the operator is approved, false to revoke approval\r\n *\/\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/**\r\n @notice Queries the approval status of an operator for a given owner.\r\n @param _owner The owner of the tokens\r\n @param _operator Address of authorized operator\r\n @return True if the operator is approved, false if not\r\n *\/\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\n\/* ERC-1155 Token Receiver\r\nSmart contracts MUST implement all of the functions in the ERC1155TokenReceiver interface to accept transfers. See \u201CSafe Transfer Rules\u201D for further detail.\r\n\r\nSmart contracts MUST implement the ERC-165 supportsInterface function and signify support for the ERC1155TokenReceiver interface to accept transfers. See \u201CERC1155TokenReceiver ERC-165 rules\u201D for further detail.\r\n\r\n\/**\r\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\r\n*\/\r\ninterface ERC1155TokenReceiver {\r\n \/**\r\n @notice Handle the receipt of a single ERC1155 token type.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\r\n This function MUST revert if it rejects the transfer.\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _id The ID of the token being transferred\r\n @param _value The amount of tokens being transferred\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\r\n *\/\r\n function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);\r\n\r\n \/**\r\n @notice Handle the receipt of multiple ERC1155 token types.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\r\n This function MUST revert if it rejects the transfer(s).\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\r\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\r\n *\/\r\n function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external returns(bytes4);\r\n}", + "description": "EIP-1155: ERC-1155 Multi Token Standard, A standard interface for contracts that manage multiple token types. A single deployed contract may include any combination of fungible tokens, non-fungible tokens or other configurations (e.g. semi-fungible tokens)." + }, + "erc1820": { + "prefix": "erc1820", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1820\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\/* ERC1820 Pseudo-introspection Registry Contract\r\n * This standard defines a universal registry smart contract where any address (contract or regular account) can\r\n * register which interface it supports and which smart contract is responsible for its implementation.\r\n *\r\n * Written in 2019 by Jordi Baylina and Jacques Dafflon\r\n *\r\n * To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to\r\n * this software to the public domain worldwide. This software is distributed without any warranty.\r\n *\r\n * You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see\r\n * .\r\n *\r\n * \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\r\n * \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2588\u2588\u2588\u2588\u2557\r\n * \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2551\r\n * \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\r\n * \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\r\n * \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D\r\n *\r\n * \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\r\n * \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\r\n * \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D\r\n * \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u255A\u2588\u2588\u2554\u255D\r\n * \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\r\n * \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\r\n *\r\n *\/\r\n\/\/ IV is value needed to have a vanity address starting with '0x1820'.\r\n\/\/ IV: 53759\r\n\r\n\/\/\/ @dev The interface a contract MUST implement if it is the implementer of\r\n\/\/\/ some (other) interface for any address other than itself.\r\ninterface ERC1820ImplementerInterface {\r\n \/\/\/ @notice Indicates whether the contract implements the interface 'interfaceHash' for the address 'addr' or not.\r\n \/\/\/ @param interfaceHash keccak256 hash of the name of the interface\r\n \/\/\/ @param addr Address for which the contract will implement the interface\r\n \/\/\/ @return ERC1820_ACCEPT_MAGIC only if the contract implements 'interfaceHash' for the address 'addr'.\r\n function canImplementInterfaceForAddress(bytes32 interfaceHash, address addr) external view returns(bytes32);\r\n}\r\n\r\n\r\n\/\/\/ @title ERC1820 Pseudo-introspection Registry Contract\r\n\/\/\/ @author Jordi Baylina and Jacques Dafflon\r\n\/\/\/ @notice This contract is the official implementation of the ERC1820 Registry.\r\n\/\/\/ @notice For more details, see https:\/\/eips.ethereum.org\/EIPS\/eip-1820\r\ncontract ERC1820Registry {\r\n \/\/\/@dev @notice ERC165 Invalid ID.\r\n bytes4 constant internal INVALID_ID = 0xffffffff;\r\n \/\/\/@dev @notice Method ID for the ERC165 supportsInterface method (= `bytes4(keccak256('supportsInterface(bytes4)'))`).\r\n bytes4 constant internal ERC165ID = 0x01ffc9a7;\r\n \/\/\/@dev @notice Magic value which is returned if a contract implements an interface on behalf of some other address.\r\n bytes32 constant internal ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked(\"ERC1820_ACCEPT_MAGIC\"));\r\n\r\n \/\/\/@dev @notice mapping from addresses and interface hashes to their implementers.\r\n mapping(address => mapping(bytes32 => address)) internal interfaces;\r\n \/\/\/@dev @notice mapping from addresses to their manager.\r\n mapping(address => address) internal managers;\r\n \/\/\/@dev @notice flag for each address and erc165 interface to indicate if it is cached.\r\n mapping(address => mapping(bytes4 => bool)) internal erc165Cached;\r\n\r\n \/\/\/ @notice Indicates a contract is the 'implementer' of 'interfaceHash' for 'addr'.\r\n event InterfaceImplementerSet(address indexed addr, bytes32 indexed interfaceHash, address indexed implementer);\r\n \/\/\/ @notice Indicates 'newManager' is the address of the new manager for 'addr'.\r\n event ManagerChanged(address indexed addr, address indexed newManager);\r\n\r\n \/\/\/ @notice Query if an address implements an interface and through which contract.\r\n \/\/\/ @param _addr Address being queried for the implementer of an interface.\r\n \/\/\/ (If '_addr' is the zero address then 'msg.sender' is assumed.)\r\n \/\/\/ @param _interfaceHash Keccak256 hash of the name of the interface as a string.\r\n \/\/\/ E.g., 'web3.utils.keccak256(\"ERC777TokensRecipient\")' for the 'ERC777TokensRecipient' interface.\r\n \/\/\/ @return The address of the contract which implements the interface '_interfaceHash' for '_addr'\r\n \/\/\/ or '0' if '_addr' did not register an implementer for this interface.\r\n function getInterfaceImplementer(address _addr, bytes32 _interfaceHash) external view returns (address) {\r\n address addr = _addr == address(0) ? msg.sender : _addr;\r\n if (isERC165Interface(_interfaceHash)) {\r\n bytes4 erc165InterfaceHash = bytes4(_interfaceHash);\r\n return implementsERC165Interface(addr, erc165InterfaceHash) ? addr : address(0);\r\n }\r\n return interfaces[addr][_interfaceHash];\r\n }\r\n\r\n \/\/\/ @notice Sets the contract which implements a specific interface for an address.\r\n \/\/\/ Only the manager defined for that address can set it.\r\n \/\/\/ (Each address is the manager for itself until it sets a new manager.)\r\n \/\/\/ @param _addr Address for which to set the interface.\r\n \/\/\/ (If '_addr' is the zero address then 'msg.sender' is assumed.)\r\n \/\/\/ @param _interfaceHash Keccak256 hash of the name of the interface as a string.\r\n \/\/\/ E.g., 'web3.utils.keccak256(\"ERC777TokensRecipient\")' for the 'ERC777TokensRecipient' interface.\r\n \/\/\/ @param _implementer Contract address implementing '_interfaceHash' for '_addr'.\r\n function setInterfaceImplementer(address _addr, bytes32 _interfaceHash, address _implementer) external {\r\n address addr = _addr == address(0) ? msg.sender : _addr;\r\n require(getManager(addr) == msg.sender, \"Not the manager\");\r\n\r\n require(!isERC165Interface(_interfaceHash), \"Must not be an ERC165 hash\");\r\n if (_implementer != address(0) && _implementer != msg.sender) {\r\n require(\r\n ERC1820ImplementerInterface(_implementer)\r\n .canImplementInterfaceForAddress(_interfaceHash, addr) == ERC1820_ACCEPT_MAGIC,\r\n \"Does not implement the interface\"\r\n );\r\n }\r\n interfaces[addr][_interfaceHash] = _implementer;\r\n emit InterfaceImplementerSet(addr, _interfaceHash, _implementer);\r\n }\r\n\r\n \/\/\/ @notice Sets '_newManager' as manager for '_addr'.\r\n \/\/\/ The new manager will be able to call 'setInterfaceImplementer' for '_addr'.\r\n \/\/\/ @param _addr Address for which to set the new manager.\r\n \/\/\/ @param _newManager Address of the new manager for 'addr'. (Pass '0x0' to reset the manager to '_addr'.)\r\n function setManager(address _addr, address _newManager) external {\r\n require(getManager(_addr) == msg.sender, \"Not the manager\");\r\n managers[_addr] = _newManager == _addr ? address(0) : _newManager;\r\n emit ManagerChanged(_addr, _newManager);\r\n }\r\n\r\n \/\/\/ @notice Get the manager of an address.\r\n \/\/\/ @param _addr Address for which to return the manager.\r\n \/\/\/ @return Address of the manager for a given address.\r\n function getManager(address _addr) public view returns(address) {\r\n \/\/ By default the manager of an address is the same address\r\n if (managers[_addr] == address(0)) {\r\n return _addr;\r\n } else {\r\n return managers[_addr];\r\n }\r\n }\r\n\r\n \/\/\/ @notice Compute the keccak256 hash of an interface given its name.\r\n \/\/\/ @param _interfaceName Name of the interface.\r\n \/\/\/ @return The keccak256 hash of an interface name.\r\n function interfaceHash(string calldata _interfaceName) external pure returns(bytes32) {\r\n return keccak256(abi.encodePacked(_interfaceName));\r\n }\r\n\r\n \/* --- ERC165 Related Functions --- *\/\r\n \/* --- Developed in collaboration with William Entriken. --- *\/\r\n\r\n \/\/\/ @notice Updates the cache with whether the contract implements an ERC165 interface or not.\r\n \/\/\/ @param _contract Address of the contract for which to update the cache.\r\n \/\/\/ @param _interfaceId ERC165 interface for which to update the cache.\r\n function updateERC165Cache(address _contract, bytes4 _interfaceId) external {\r\n interfaces[_contract][_interfaceId] = implementsERC165InterfaceNoCache(\r\n _contract, _interfaceId) ? _contract : address(0);\r\n erc165Cached[_contract][_interfaceId] = true;\r\n }\r\n\r\n \/\/\/ @notice Checks whether a contract implements an ERC165 interface or not.\r\n \/\/ If the result is not cached a direct lookup on the contract address is performed.\r\n \/\/ If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling\r\n \/\/ 'updateERC165Cache' with the contract address.\r\n \/\/\/ @param _contract Address of the contract to check.\r\n \/\/\/ @param _interfaceId ERC165 interface to check.\r\n \/\/\/ @return True if '_contract' implements '_interfaceId', false otherwise.\r\n function implementsERC165Interface(address _contract, bytes4 _interfaceId) public view returns (bool) {\r\n if (!erc165Cached[_contract][_interfaceId]) {\r\n return implementsERC165InterfaceNoCache(_contract, _interfaceId);\r\n }\r\n return interfaces[_contract][_interfaceId] == _contract;\r\n }\r\n\r\n \/\/\/ @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.\r\n \/\/\/ @param _contract Address of the contract to check.\r\n \/\/\/ @param _interfaceId ERC165 interface to check.\r\n \/\/\/ @return True if '_contract' implements '_interfaceId', false otherwise.\r\n function implementsERC165InterfaceNoCache(address _contract, bytes4 _interfaceId) public view returns (bool) {\r\n uint256 success;\r\n uint256 result;\r\n\r\n (success, result) = noThrowCall(_contract, ERC165ID);\r\n if (success == 0 || result == 0) {\r\n return false;\r\n }\r\n\r\n (success, result) = noThrowCall(_contract, INVALID_ID);\r\n if (success == 0 || result != 0) {\r\n return false;\r\n }\r\n\r\n (success, result) = noThrowCall(_contract, _interfaceId);\r\n if (success == 1 && result == 1) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n \/\/\/ @notice Checks whether the hash is a ERC165 interface (ending with 28 zeroes) or not.\r\n \/\/\/ @param _interfaceHash The hash to check.\r\n \/\/\/ @return True if '_interfaceHash' is an ERC165 interface (ending with 28 zeroes), false otherwise.\r\n function isERC165Interface(bytes32 _interfaceHash) internal pure returns (bool) {\r\n return _interfaceHash & 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF == 0;\r\n }\r\n\r\n \/\/\/ @dev Make a call on a contract without throwing if the function does not exist.\r\n function noThrowCall(address _contract, bytes4 _interfaceId)\r\n internal view returns (uint256 success, uint256 result)\r\n {\r\n bytes4 erc165ID = ERC165ID;\r\n\r\n assembly {\r\n let x := mload(0x40) \/\/ Find empty storage location using \"free memory pointer\"\r\n mstore(x, erc165ID) \/\/ Place signature at beginning of empty storage\r\n mstore(add(x, 0x04), _interfaceId) \/\/ Place first argument directly next to signature\r\n\r\n success := staticcall(\r\n 30000, \/\/ 30k gas\r\n _contract, \/\/ To addr\r\n x, \/\/ Inputs are stored at location x\r\n 0x24, \/\/ Inputs are 36 (4 + 32) bytes long\r\n x, \/\/ Store output over input (saves space)\r\n 0x20 \/\/ Outputs are 32 bytes long\r\n )\r\n\r\n result := mload(x) \/\/ Load the result\r\n }\r\n }\r\n},", + "description": "EIP-1820: Pseudo-introspection Registry Contract, This standard defines a universal registry smart contract where any address (contract or regular account) can register which interface it supports and which smart contract is responsible for its implementation." + }, + "erc173": { + "prefix": "erc173-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control whitch\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}", + "description": "Draft: EIP-173: Implementation example, Contract Ownership Standard, A standard interface for ownership of contracts." + }, + "erc173i": { + "prefix": "erc173i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\n\/\/\/ @title ERC-173 Contract Ownership Standard\r\n\/\/\/ @dev See https:\/\/github.com\/ethereum\/EIPs\/blob\/master\/EIPS\/eip-173.md\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x7f5828d0\r\ninterface ERC173 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of a contract changes\r\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n \/\/\/ @notice Get the address of the owner\r\n \/\/\/ @return The address of the owner.\r\n function owner() external view returns (address);\r\n \/\/\/ @notice Set the address of the new owner of the contract\r\n \/\/\/ @dev Set _newOwner to address(0) to renounce any ownership.\r\n \/\/\/ @param _newOwner The address of the new owner of the contract\r\n function transferOwnership(address _newOwner) external;\r\n}\r\n\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}", + "description": "Draft: EIP-173 Interface for Contract Ownership Standard, A standard interface for ownership of contracts." + }, + "erc725i": { + "prefix": "erc725i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-725\r\n\/\/ https:\/\/github.com\/ERC725Alliance\/ERC725 (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\n\/*\r\nThe following describes standard functions for a unique identifiable proxy account to be used by humans, groups, organisations, objects and machines.\r\nThe proxy has 2 abilities: (1) it can execute arbitrary contract calls, and (2) it can hold arbitrary data through a generic key\/value store.\r\nOne of these keys should hold the owner of the contract. The owner may be an address or a key manager contract for more complex management logic.\r\nMost importantly, this contract should be the reference point for a long-lasting identifiable profiles.\r\n*\/\r\ninterface ERC725 {\r\n event DataChanged(bytes32 indexed key, bytes32 indexed value);\r\n event OwnerChanged(address indexed ownerAddress);\r\n event ContractCreated(address indexed contractAddress);\r\n\r\n \/\/ address public owner;\r\n\r\n function changeOwner(address _owner) external;\r\n function getData(bytes32 _key) external view returns (bytes32 _value);\r\n function setData(bytes32 _key, bytes32 _value) external;\r\n function execute(uint256 _operationType, address _to, uint256 _value, bytes calldata _data) external;\r\n}", + "description": "Draft: EIP-725: Proxy Account. Standard functions for a unique identifiable proxy account to be used by humans, groups, organisations, objects and machines" + }, + "erc1996i": { + "prefix": "erc1996i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1996\r\n\/\/ https:\/\/github.com\/IoBuilders\/holdable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows tokens to be put on hold.\r\nThis guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time.\r\nHolds are similar to escrows in that are firm and lead to final settlement.\r\n*\/\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface IHoldable \/* is ERC-20 *\/ {\r\n enum HoldStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n Executed,\r\n ReleasedByNotary,\r\n ReleasedByPayee,\r\n ReleasedOnExpiration\r\n }\r\n\r\n function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function holdFrom(string calldata operationId, address from, address to, address notary,\r\n uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function releaseHold(string calldata operationId) external returns (bool);\r\n function executeHold(string calldata operationId, uint256 value) external returns (bool);\r\n function renewHold(string calldata operationId, uint256 timeToExpiration) external returns (bool);\r\n function retrieveHoldData(string calldata operationId) external view returns (address from, address to, address notary,\r\n uint256 value, uint256 expiration, HoldStatusCode status);\r\n\r\n function balanceOnHold(address account) external view returns (uint256);\r\n function netBalanceOf(address account) external view returns (uint256);\r\n function totalSupplyOnHold() external view returns (uint256);\r\n\r\n function authorizeHoldOperator(address operator) external returns (bool);\r\n function revokeHoldOperator(address operator) external returns (bool);\r\n function isHoldOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event HoldCreated(address indexed holdIssuer, string operationId, address from,\r\n address to, address indexed notary, uint256 value, uint256 expiration);\r\n event HoldExecuted(address indexed holdIssuer, string operationId, address indexed notary, uint256 heldValue, uint256 transferredValue);\r\n event HoldReleased(address indexed holdIssuer, string operationId, HoldStatusCode status);\r\n event HoldRenewed(address indexed holdIssuer, string operationId, uint256 oldExpiration, uint256 newExpiration);\r\n event AuthorizedHoldOperator(address indexed operator, address indexed account);\r\n event RevokedHoldOperator(address indexed operator, address indexed account);\r\n}", + "description": "Draft: EIP-1996: Holdable Token, An extension to the ERC-20 standard token that allows tokens to be put on hold. This guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time. Holds are similar to escrows in that are firm and lead to final settlement." + }, + "erc2018i": { + "prefix": "erc2018i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2018\r\n\/\/ https:\/\/github.com\/IoBuilders\/clearable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nIn banking and finance, clearing denotes all activities from the time a commitment is made for a transaction until it is settled\r\n\r\nThe clearing process turns the promise of a transfer into the actual movement of money from one account to another.\r\nA clearing agent decides if the transfer can be executed or not.\r\nThe amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures,\r\nthat the execution of the transfer will be successful when it is executed.\r\n*\/\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface ClearableToken \/* is ERC-1996 *\/ {\r\n enum ClearableTransferStatusCode { Nonexistent, Ordered, InProcess, Executed, Rejected, Cancelled }\r\n\r\n function orderTransfer(string calldata operationId, address to, uint256 value) external returns (bool);\r\n function orderTransferFrom(string calldata operationId, address from, address to, uint256 value) external returns (bool);\r\n function cancelTransfer(string calldata operationId) external returns (bool);\r\n function processClearableTransfer(string calldata operationId) external returns (bool);\r\n function executeClearableTransfer(string calldata operationId) external returns (bool);\r\n function rejectClearableTransfer(string calldata operationId, string calldata reason) external returns (bool);\r\n function retrieveClearableTransferData(string calldata operationId) external view returns (address from, address to,\r\n uint256 value, ClearableTransferStatusCode status);\r\n\r\n function authorizeClearableTransferOperator(address operator) external returns (bool);\r\n function revokeClearableTransferOperator(address operator) external returns (bool);\r\n function isClearableTransferOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event ClearableTransferOrdered(address indexed orderer, string operationId, address indexed from, address indexed to, uint256 value);\r\n event ClearableTransferInProcess(address indexed orderer, string operationId);\r\n event ClearableTransferExecuted(address indexed orderer, string operationId);\r\n event ClearableTransferRejected(address indexed orderer, string operationId, string reason);\r\n event ClearableTransferCancelled(address indexed orderer, string operationId);\r\n event AuthorizedClearableTransferOperator(address indexed operator, address indexed account);\r\n event RevokedClearableTransferOperator(address indexed operator, address indexed account);\r\n}", + "description": "Draft: EIP-2018: The clearing process turns the promise of a transfer into the actual movement of money from one account to another. A clearing agent decides if the transfer can be executed or not. The amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures, that the execution of the transfer will be successful when it is executed." + }, + "erc2019i": { + "prefix": "erc2019i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2019\r\n\/\/ https:\/\/github.com\/IoBuilders\/fundable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request a wallet to be funded, by calling the smart contract and attaching a fund instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order tokenization requests through blockchain.\r\nThis is done by calling the orderFund or orderFundFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the fund request.\r\nIn this case, fund instructions are provided when submitting the request,\r\nwhich are used by the operator to determine the source of the funds to be debited in order to do fund the token wallet (through minting).\r\n*\/\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface IFundable \/* is ERC-20 *\/ {\r\n enum FundStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizeFundOperator(address orderer) external returns (bool);\r\n function revokeFundOperator(address orderer) external returns (bool) ;\r\n function orderFund(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderFundFrom(string calldata operationId, address walletToFund, uint256 value,\r\n string calldata instructions) external returns (bool);\r\n function cancelFund(string calldata operationId) external returns (bool);\r\n function processFund(string calldata operationId) external returns (bool);\r\n function executeFund(string calldata operationId) external returns (bool);\r\n function rejectFund(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isFundOperatorFor(address walletToFund, address orderer) external view returns (bool);\r\n function retrieveFundData(address orderer, string calldata operationId) external view returns (address walletToFund,\r\n uint256 value, string memory instructions, FundStatusCode status);\r\n\r\n event FundOrdered(address indexed orderer, string indexed operationId, address indexed , uint256 value, string instructions);\r\n event FundInProcess(address indexed orderer, string indexed operationId);\r\n event FundExecuted(address indexed orderer, string indexed operationId);\r\n event FundRejected(address indexed orderer, string indexed operationId, string reason);\r\n event FundCancelled(address indexed orderer, string indexed operationId);\r\n event FundOperatorAuthorized(address indexed walletToFund, address indexed orderer);\r\n event FundOperatorRevoked(address indexed walletToFund, address indexed orderer);\r\n}", + "description": "Draft: EIP-2019: Fundable Token. An extension to the ERC-20 standard token that allows Token wallet owners to request a wallet to be funded, by calling the smart contract and attaching a fund instruction string." + }, + "erc2020i": { + "prefix": "erc2020i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2020\r\n\/\/ https:\/\/github.com\/IoBuilders\/em-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nThe E-Money Standard Token aims to enable the issuance of regulated electronic money on blockchain networks, and its practical usage in real financial applications.\r\n\r\nFinancial institutions work today with electronic systems,\r\nwhich hold account balances in databases on core banking systems.\r\nIn order for an institution to be allowed to maintain records of client balances segregated and available for clients,\r\nsuch institution must be regulated under a known legal framework and must possess a license to do so.\r\nMaintaining a license under regulatory supervision entails ensuring compliance (i.e. performing KYC on all clients and ensuring good AML practices before allowing transactions)\r\nand demonstrating technical and operational solvency through periodic audits,\r\nso clients depositing funds with the institution can rest assured that their money is safe.\r\n*\/\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface EMoneyToken \/* is ERC-1996, ERC-2018, ERC-2019, ERC-2021 *\/ {\r\n function currency() external view returns (string memory);\r\n function version() external pure returns (string memory);\r\n function availableFunds(address account) external view returns (uint256);\r\n function checkTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkApproveAllowed(address from, address spender, uint256 value) external view returns (byte status);\r\n function checkHoldAllowed(address from, address to, address notary, uint256 value) external view returns (byte status);\r\n function checkAuthorizeHoldOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkAuthorizeClearableTransferOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderFundAllowed(address to, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizeFundOperatorAllowed(address operator, address to) external view returns (byte status);\r\n function checkOrderPayoutAllowed(address from, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizePayoutOperatorAllowed(address operator, address from) external view returns (byte status);\r\n}", + "description": "Draft: EIP-2020: E-Money Standard Token. The E-Money Standard Token aims to enable the issuance of regulated electronic money on blockchain networks, and its practical usage in real financial applications." + }, + "erc2021i": { + "prefix": "erc2021i-draft", + "body": "\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2021\r\n\/\/ https:\/\/github.com\/IoBuilders\/payoutable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request payout from their wallet,\r\nby calling the smart contract and attaching a payout instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order payout requests through blockchain.\r\nThis is done by calling the orderPayoutFrom or orderPayoutFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the payout request.\r\nIn this case, payout instructions are provided when submitting the request, which are used by the operator to determine the destination of the funds.\r\n\r\nIn general, it is not advisable to place explicit routing instructions for the payouts on a verbatim basis on the blockchain,\r\nand it is advised to use a private communication alternatives, such as private channels, encrypted storage or similar,\r\nto do so (external to the blockchain ledger). Another (less desirable) possibility is to place these instructions on the instructions field in encrypted form.\r\n*\/\r\n\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface IPayoutable \/* is ERC-20 *\/ {\r\n enum PayoutStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n FundsInSuspense,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizePayoutOperator(address orderer) external returns (bool);\r\n function revokePayoutOperator(address orderer) external returns (bool);\r\n function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderPayoutFrom(string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions)\r\n external returns (bool);\r\n function cancelPayout(string calldata operationId) external returns (bool);\r\n function processPayout(string calldata operationId) external returns (bool);\r\n function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool);\r\n function executePayout(string calldata operationId) external returns (bool);\r\n function rejectPayout(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isPayoutOperatorFor(address walletToDebit, address orderer) external view returns (bool);\r\n function retrievePayoutData(string calldata operationId) external view\r\n returns (address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status);\r\n\r\n event PayoutOrdered(address indexed orderer, string indexed operationId, address indexed walletToDebit, uint256 value, string instructions);\r\n event PayoutInProcess(address indexed orderer, string indexed operationId);\r\n event PayoutFundsInSuspense(address indexed orderer, string indexed operationId);\r\n event PayoutExecuted(address indexed orderer, string indexed operationId);\r\n event PayoutRejected(address indexed orderer, string indexed operationId, string reason);\r\n event PayoutCancelled(address indexed orderer, string indexed operationId);\r\n event PayoutOperatorAuthorized(address indexed walletToBePaidOut, address indexed orderer);\r\n event PayoutOperatorRevoked(address indexed walletToBePaidOut, address indexed orderer);\r\n}", + "description": "Draft: EIP-2021: Payoutable Token: An extension to the ERC-20 standard token that allows Token wallet owners to request payout from their wallet, by calling the smart contract and attaching a payout instruction string." + }, + "uniV2Pair": { + "prefix": "uniV2Pair", + "body":"\/\/ https:\/\/uniswap.org\/docs\/v2\/smart-contracts\/pair\/\r\n\/\/ https:\/\/github.com\/Uniswap\/uniswap-v2-core\/blob\/master\/contracts\/UniswapV2Pair.sol implementation\r\n\/\/ SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.5.0;\r\n\r\ninterface IUniswapV2Pair {\r\n event Approval(address indexed owner, address indexed spender, uint value);\r\n event Transfer(address indexed from, address indexed to, uint value);\r\n\r\n function name() external pure returns (string memory);\r\n function symbol() external pure returns (string memory);\r\n function decimals() external pure returns (uint8);\r\n function totalSupply() external view returns (uint);\r\n function balanceOf(address owner) external view returns (uint);\r\n function allowance(address owner, address spender) external view returns (uint);\r\n\r\n function approve(address spender, uint value) external returns (bool);\r\n function transfer(address to, uint value) external returns (bool);\r\n function transferFrom(address from, address to, uint value) external returns (bool);\r\n\r\n function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n function PERMIT_TYPEHASH() external pure returns (bytes32);\r\n function nonces(address owner) external view returns (uint);\r\n\r\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\r\n\r\n event Mint(address indexed sender, uint amount0, uint amount1);\r\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\r\n event Swap(\r\n address indexed sender,\r\n uint amount0In,\r\n uint amount1In,\r\n uint amount0Out,\r\n uint amount1Out,\r\n address indexed to\r\n );\r\n event Sync(uint112 reserve0, uint112 reserve1);\r\n\r\n function MINIMUM_LIQUIDITY() external pure returns (uint);\r\n function factory() external view returns (address);\r\n function token0() external view returns (address);\r\n function token1() external view returns (address);\r\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n function price0CumulativeLast() external view returns (uint);\r\n function price1CumulativeLast() external view returns (uint);\r\n function kLast() external view returns (uint);\r\n\r\n function mint(address to) external returns (uint liquidity);\r\n function burn(address to) external returns (uint amount0, uint amount1);\r\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\r\n function skim(address to) external;\r\n function sync() external;\r\n}", + "description": "Uniswap Pair Interface" + }, + "uniV2PairERC20": { + "prefix": "uniV2PairERC20", + "body":"\/\/ https:\/\/uniswap.org\/docs\/v2\/smart-contracts\/pair-erc-20\/\r\n\/\/ https:\/\/github.com\/Uniswap\/uniswap-v2-core\/blob\/master\/contracts\/UniswapV2Pair.sol implementation\r\n\/\/ SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.5.0;\r\n\r\ninterface IUniswapV2ERC20 {\r\n event Approval(address indexed owner, address indexed spender, uint value);\r\n event Transfer(address indexed from, address indexed to, uint value);\r\n\r\n function name() external pure returns (string memory);\r\n function symbol() external pure returns (string memory);\r\n function decimals() external pure returns (uint8);\r\n function totalSupply() external view returns (uint);\r\n function balanceOf(address owner) external view returns (uint);\r\n function allowance(address owner, address spender) external view returns (uint);\r\n\r\n function approve(address spender, uint value) external returns (bool);\r\n function transfer(address to, uint value) external returns (bool);\r\n function transferFrom(address from, address to, uint value) external returns (bool);\r\n\r\n function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n function PERMIT_TYPEHASH() external pure returns (bytes32);\r\n function nonces(address owner) external view returns (uint);\r\n\r\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\r\n}", + "description": "Uniswap Pair ERC20 Interface" + }, + "uniV2Factory": { + "prefix": "uniV2Factory", + "body":"\/\/ https:\/\/uniswap.org\/docs\/v2\/smart-contracts\/factory\/\r\n\/\/ https:\/\/github.com\/Uniswap\/uniswap-v2-core\/blob\/master\/contracts\/UniswapV2Factory.solimplementation\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/\/ UniswapV2Factory is deployed at 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f on the Ethereum mainnet, and the Ropsten, Rinkeby, G\u00F6rli, and Kovan testnets\r\npragma solidity >=0.5.0;\r\n\r\ninterface IUniswapV2Factory {\r\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r\n\r\n function getPair(address tokenA, address tokenB) external view returns (address pair);\r\n function allPairs(uint) external view returns (address pair);\r\n function allPairsLength() external view returns (uint);\r\n\r\n function feeTo() external view returns (address);\r\n function feeToSetter() external view returns (address);\r\n\r\n function createPair(address tokenA, address tokenB) external returns (address pair);\r\n}", + "description": "Uniswap Factory" + }, + "uniV2Router01": { + "prefix": "uniV2Router01", + "body": "\/\/ https:\/\/uniswap.org\/docs\/v2\/smart-contracts\/router01\/\r\n\/\/ https:\/\/github.com\/Uniswap\/uniswap-v2-periphery\/blob\/master\/contracts\/UniswapV2Router01.sol implementation\r\n\/\/ UniswapV2Router01 is deployed at 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a on the Ethereum mainnet, and the Ropsten, Rinkeby, G\u00F6rli, and Kovan testnets\r\n\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.6.2;\r\n\r\ninterface IUniswapV2Router01 {\r\n function factory() external pure returns (address);\r\n function WETH() external pure returns (address);\r\n\r\n function addLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint amountADesired,\r\n uint amountBDesired,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB, uint liquidity);\r\n function addLiquidityETH(\r\n address token,\r\n uint amountTokenDesired,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n function removeLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquidityETH(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountToken, uint amountETH);\r\n function removeLiquidityWithPermit(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquidityETHWithPermit(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountToken, uint amountETH);\r\n function swapExactTokensForTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapTokensForExactTokens(\r\n uint amountOut,\r\n uint amountInMax,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n\r\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\r\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\r\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\r\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\r\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\r\n}", + "description": "Uniswap Router01" + }, + "uniV2Router02": { + "prefix": "uniV2Router02", + "body": "\/\/ https:\/\/uniswap.org\/docs\/v2\/smart-contracts\/router02\/\r\n\/\/ https:\/\/github.com\/Uniswap\/uniswap-v2-periphery\/blob\/master\/contracts\/UniswapV2Router02.sol implementation\r\n\/\/ UniswapV2Router02 is deployed at 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on the Ethereum mainnet, and the Ropsten, Rinkeby, G\u00F6rli, and Kovan testnets.\r\n\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.6.2;\r\n\r\n\/\/ You can add this typing \"uniV2Router01\" \r\nimport '.\/IUniswapV2Router01.sol';\r\n\r\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\r\n function removeLiquidityETHSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountETH);\r\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountETH);\r\n\r\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external;\r\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external payable;\r\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external;\r\n}", + "description": "Uniswap Router02" + }, + "solidityTips": { + "prefix": "solidityTips", + "body": "\/\/Paul Razvan Berg tips (@PaulRBerg)\r\n1\uFE0F\u20E3 Use \"type(uint256).max\" instead of \"uint256(-1)\"\r\n2\uFE0F\u20E3 Surround code with {} to avoid \"stack too deep\"\r\n3\uFE0F\u20E3 Skip tuple vars with commas: \"uint a, , ,\"\r\n4\uFE0F\u20E3 Swap vars in one line: \"(a,b)=(b,a)\"\r\n5\uFE0F\u20E3 Use \"assert\" and get built-in formal verification with SMTChecker\r\n\r\n-----------------------------------------------\r\n\r\n\/\/ Daniel Luca tips (CleanUnicorn.eth)\r\n1\uFE0F\u20E3 You can format numbers in Solidity using underscores.\r\ni.e.,\r\n1_000 is a thousand\r\n1_0_0_0 is a thousand\r\n1_000e0_3 is a million\r\n\r\nPython spec https:\/\/www.python.org\/dev\/peps\/pep-0515\/\r\n\r\n------------------------------\r\nContribute tips here: https:\/\/github.com\/juanfranblanco\/vscode-solidity\/blob\/master\/snippets\/solidity.json#L197-L201 \r\nEscape the text using: https:\/\/www.freeformatter.com\/json-escape.html\r\n------------------------------\r\n", + "description": "solidity tips" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/sql.json b/dot_vim/plugged/friendly-snippets/snippets/sql.json new file mode 100644 index 0000000..9efd633 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/sql.json @@ -0,0 +1,226 @@ +{ + "createt": { + "prefix": "createt", + "body": ["CREATE TABLE ${1:tableName} (", "\t${2:attribute(s)}", ");"], + "description": "Create regular table" + }, + "createti": { + "prefix": "createti", + "body": ["CREATE TABLE IF NOT EXISTS ${1:tableName} (", + "\t${2:attribute(s)}", + ");" + ], + "description": "Create table with conditional" + }, + "created": { + "prefix": "created", + "body": ["CREATE DATABASE ${1:name};"], + "description": "Create regular table" + }, + "createdi": { + "prefix": "createdi", + "body": ["CREATE DATABASE IF NOT EXISTS ${1:name};"], + "description": "Create table with conditional" + }, + "insert": { + "prefix": "insert", + "body": ["INSERT INTO ${1:tableName} (", + "\t${2:attribute(s)}", ") VALUES ( ${3:values} )" + ], + "description": "Insert value(s)" + }, + "dropt": { + "prefix": "dropt", + "body": ["DROP TABLE ${1:tableName};"], + "description": "Drop table" + }, + "dropd": { + "prefix": "dropd", + "body": ["DROP DATABASE ${1:dbName};"], + "description": "Drop database" + }, + "dropti": { + "prefix": "dropti", + "body": ["DROP TABLE IF EXISTS ${1:tableName};"], + "description": "Drop table with conditional" + }, + "dropdi": { + "prefix": "dropdi", + "body": ["DROP DATABASE IF EXISTS ${1:dbName};"], + "description": "Drop database with conditional" + }, + "showt": { + "prefix": "showt", + "body": ["SHOW TABLES;"], + "description": "Show tables" + }, + "showd": { + "prefix": "showd", + "body": ["SHOW DATABASES;"], + "description": "Show databases" + }, + "select": { + "prefix": "select", + "body": ["SELECT ${1:attribute(s)} FROM ${2:tableName};"], + "description": "Regular select" + }, + "selectd": { + "prefix": "selectd", + "body": ["SELECT DISTINCT ${1:attribute(s)}", "\tFROM ${2:tableName};"], + "description": "Select Distinct" + }, + "selectw": { + "prefix": "selectw", + "body": ["SELECT ${1:attribute(s)}","\tFROM ${2:tableName}", + "\tWHERE ${3:condition};" + ], + "description": "Select with condition" + }, + "selector": { + "prefix": "selector", + "body": ["SELECT ${1:attribute(s)}","\tFROM ${2:tableName}", + "\tORDER BY ${3:attribute(s)} ${4:ASC|DESC};" + ], + "description": "Select with order" + }, + "updatet": { + "prefix": "updatet", + "body": ["UPDATE ${1:tableName}","\tSET ${2:attribute(s)}", + "\tWHERE ${3:condition};" + ], + "description": "Update table" + }, + "delete": { + "prefix": "delete", + "body": ["DELETE FROM ${1:tableName}", "\tWHERE ${3:condition};"], + "description": "Delete records" + }, + "altert": { + "prefix": "altert", + "body": ["ALTER TABLE ${1:tableName}", "\t ${2:intructions};"], + "description": "Alter table" + }, + "alterad": { + "prefix": "alterad", + "body": ["ALTER TABLE ${1:tableName}", "\tADD COLUMN ${2:col_name};"], + "description": "Alter table - Add column" + }, + "alteraf": { + "prefix": "alteraf", + "body": ["ALTER TABLE ${1:tableName}", "\tADD COLUMN ${2:col_name}", + "\tAFTER ${5:col_name};" + ], + "description": "Alter table - Add column after" + }, + "alterdb": { + "prefix": "alterdb", + "body": ["ALTER DATABASE ${1:dbName}", "\tCHARACTER SET ${2:charset}", + "\tCOLLATE ${3:utf8_unicode_ci};" + ], + "description": "Alter database" + }, + "ijoin": { + "prefix": "ijoin", + "body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}", + "\tINNER JOIN ${3:tableName2}", "\tON ${4:match};" + ], + "description": "Inner Join" + }, + "rjoin": { + "prefix": "rjoin", + "body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}", + "\tRIGHT JOIN ${3:tableName2}", "\tON ${4:match};" + ], + "description": "Right Join" + }, + "ljoin": { + "prefix": "ljoin", + "body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}", + "\tLEFT JOIN ${3:tableName2}", "\tON ${4:match};" + ], + "description": "Left Join" + }, + "fjoin": { + "prefix": "fjoin", + "body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}", + "\tFULL JOIN OUTER ${3:tableName2}", "\tON ${4:match}", + "\tWHERE ${5:condition};" + ], + "description": "Full Join" + }, + "union": { + "prefix": "union", + "body": ["SELECT ${1:attribute(s)} FROM ${2:tableName}", "UNION", + "SELECT ${3:attribute(s)} FROM ${4:tableName2};" + ], + "description": "Regular union" + }, + "uniona": { + "prefix": "uniona", + "body": ["SELECT ${1:attribute(s)} FROM ${2:tableName}", "UNION ALL", + "SELECT ${3:attribute(s)} FROM ${4:tableName2};" + ], + "description": "All union" + }, + "groupb": { + "prefix": "groupb", + "body": ["SELECT ${1:attribute(s)}", "\tFROM ${2:tableName}", + "\tGROUP BY ${3:attribute(s)};" + ], + "description": "Group by" + }, + "bakupd": { + "prefix": "bakupd", + "body": ["BACKUP DATABASE ${1:dbName}", "\tTO DISK ${2:filepath};"], + "description": "Backup database" + }, + "bakupdw": { + "prefix": "bakupdw", + "body": ["BACKUP DATABASE ${1:dbName}", "\tTO DISK ${2:filepath}", + "\tWITH ${3:DIFERENTIAL};" + ], + "description": "Diferencial backup database" + }, + "primaryk": { + "prefix": "primaryk", + "body": ["PRIMARY KEY(${1:attribute})"], + "description": "Primary Key" + }, + "primarykc": { + "prefix": "primarykc", + "body": ["CONSTRAINT ${1:attribute} PRIMARY KEY(${2:attribute(s)})"], + "description": "Constraint rimary Key" + }, + "foreingk": { + "prefix": "foreingk", + "body": ["FOREIGN KEY(${1:attribute}) REFERENCES ${2:tableName}(${3:attribute})"], + "description": "Foreing Key" + }, + "foreingkc": { + "prefix": "foreingkc", + "body": ["CONSTRAINT ${1:attribute} FOREIGN KEY (${2:attribute(s)})", + "\tREFERENCES ${3:tableName}(${4:attribute})" + ], + "description": "Constraint foreing Key" + }, + "check": { + "prefix": "check", + "body": ["CHECK ( ${1:condition} )"], + "description": "Check" + }, + "creteuser": { + "prefix": "createuser", + "body": "CREATE USER '${1:username}'@'${2:localhost}' IDENTIFIED BY '${3:password}';", + "description": "Create User" + }, + "deleteuser": { + "prefix": "deleteuser", + "body": "DELETE FROM mysql.user WHERE user = '${1:userName}';", + "description": "Delete user" + }, + "grantuser":{ + "prefix": "grantuser", + "body": "GRANT ALL PRIVILEGES ON ${1:db}.${2:tb} TO '${3:user_name}'@'${4:localhost}';", + "description": "Grant privileges" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/svelte.json b/dot_vim/plugged/friendly-snippets/snippets/svelte.json new file mode 100644 index 0000000..2667d69 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/svelte.json @@ -0,0 +1,616 @@ +{ + "svelte-component-format": { + "prefix": "s-component-format", + "body": [ + "", + "", + "", + "", + "${3:}" + ], + "description": "add a script to your svelte file" + }, + "svelte-script-tag": { + "prefix": "s-script", + "body": [""], + "description": "add a script to your svelte file" + }, + "svelte-script-context": { + "prefix": "s-script-context", + "body": [ + "" + ], + "description": "add a script with context=\"module\" to your svelte file" + }, + "svelte-style-tag": { + "prefix": "s-style", + "body": [""], + "description": "add styles to your svelte file" + }, + "svelte-expression": { + "prefix": "s-expression", + "body": ["{${1:expression}}"], + "description": "basic expression" + }, + "svelte-expression-html": { + "prefix": "s-expression-html", + "body": ["{@html ${1:expression}}"], + "description": "html content expression" + }, + "svelte-expression-debug": { + "prefix": "s-expression-debug", + "body": ["{@debug ${1:var1}${2:,var2}}"], + "description": "html content expression" + }, + "svelte-if-block": { + "prefix": "s-if-block", + "body": ["{#if ${1:condition}}", "\t${2: }", "{/if}"], + "description": "if block" + }, + "svelte-if-else-block": { + "prefix": "s-if-else-block", + "body": [ + "{#if ${1:condition}}", + "\t${2: }", + "{:else}", + "\t${3: }", + "{/if}" + ], + "description": "if else block" + }, + "svelte-else-block": { + "prefix": "s-else-block", + "body": ["{:else}", "\t${1: }"], + "description": "else block" + }, + "svelte-if-else-if-block": { + "prefix": "s-if-else-if-block", + "body": [ + "{#if ${1:condition}}", + "\t${2: }", + "{:else if ${3: otherCondition}}", + "\t${4: }", + "{:else}", + "\t${5: }", + "{/if}" + ], + "description": "if else if block" + }, + "svelte-else-if-block": { + "prefix": "s-else-if-block", + "body": [ + "{:else if ${1: otherCondition}}", + "\t${2: }" + ], + "description": "else if block" + }, + "svelte-each-block": { + "prefix": "s-each-block", + "body": [ + "{#each ${1:items} as ${2:item}}", + "\t${3: }", + "{/each}" + ], + "description": "each block" + }, + "svelte-each-else-block": { + "prefix": "s-each-else-block", + "body": [ + "{#each ${1:items} as ${2:item}}", + "\t${3: }", + "{:else}", + "\t${4: }", + "{/each}" + ], + "description": "each else block" + }, + "svelte-each-index-block": { + "prefix": "s-each-index-block", + "body": [ + "{#each ${1:items} as ${2:item},${3:i}}", + "\t${4: }", + "{/each}" + ], + "description": "each index block" + }, + "svelte-each-key-block": { + "prefix": "s-each-key-block", + "body": [ + "{#each ${1:items} as ${2:item},(${3:key})}", + "\t${4: }", + "{/each}" + ], + "description": "each index block" + }, + "svelte-each-index-key-block": { + "prefix": "s-each-index-key-block", + "body": [ + "{#each ${1:items} as ${2:item},i (${3:key})}", + "\t${4: }", + "{/each}" + ], + "description": "each index key block" + }, + "svelte-await-then-block": { + "prefix": "s-await-then-block", + "body": [ + "{#await ${1:promise}}", + "\t", + "{:then ${2:value}}", + "\t", + "{/await}" + ], + "description": "await then block" + }, + "svelte-then-block": { + "prefix": "s-then-block", + "body": ["{:then ${1:value}}", "\t"], + "description": "then block" + }, + "svelte-await-short-block": { + "prefix": "s-await-short-block", + "body": [ + "{#await ${1:promise} then ${2:value}}", + "\t", + "{/await}" + ], + "description": "await short block" + }, + "svelte-await-catch-block": { + "prefix": "s-await-catch-block", + "body": [ + "{#await ${1:promise}}", + "\t", + "{:then ${value}}", + "\t", + "{:catch error}", + "\t", + "{/await}" + ], + "description": "await catch block" + }, + "svelte-catch-block": { + "prefix": "s-catch-block", + "body": ["{:catch error}", "\t"], + "description": "catch block" + }, + "svelte-on-event": { + "prefix": "s-on-event", + "body": ["on:${1:eventname}={${2:handler}}"], + "description": "on event" + }, + "svelte-on-event-forward": { + "prefix": "s-on-event-foward", + "body": ["on:${1:eventname}"], + "description": "on event foward" + }, + "svelte-on-event-modifiers": { + "prefix": "s-on-event-modifiers", + "body": [ + "on:${1:eventname}|${2|preventDefault,stopPropagation,passive,capture,once|}={${3:handler}}" + ], + "description": "on event w/ modifiers" + }, + "svelte-on-event-inline": { + "prefix": "s-on-event-inline", + "body": ["on:${1:click}=\"{() => ${2:count += 1}}\""], + "description": "on event inline" + }, + "svelte-modifiers": { + "prefix": "s-modifier", + "body": ["|${1|preventDefault,stopPropagation,passive,capture,once|}"], + "description": "modifier" + }, + "svelte-bind": { + "prefix": "s-bind", + "body": ["bind:${1:property}"], + "description": "bind property" + }, + "svelte-bind-property": { + "prefix": "s-bind-property", + "body": ["bind:${1:property}={${2:variable}}"], + "description": "bind property" + }, + "svelte-bind-video": { + "prefix": "s-bind-video", + "body": [ + "" + ], + "description": "bind property" + }, + "svelte-bind-audio": { + "prefix": "s-bind-audio", + "body": [ + "" + ], + "description": "bind property" + }, + "svelte-bind-media-elements": { + "prefix": "s-bind-media-elements", + "body": [ + "bind:${1|duration,buffered,played,seekable,seeking,ended,currentTime,playbackRate,paused,volume,muted,videoWidth,videoHeight|}" + ], + "description": "bind property" + }, + "svelte-bind-block-level": { + "prefix": "s-bind-block-level", + "body": [ + "bind:${1|clientWidth,clientHeight,offsetWidth,offsetHeight|}={${2:variable}}" + ], + "description": "bind property" + }, + "svelte-bind-group": { + "prefix": "s-bind-group", + "body": ["bind:group={${1:variable}}"], + "description": "bind group" + }, + "svelte-bind-this": { + "prefix": "s-bind-this", + "body": ["bind:this={${1:dom_node}}"], + "description": "bind this" + }, + "svelte-class": { + "prefix": "s-class", + "body": ["class:${1:name}={${2:condition}}"], + "description": "class" + }, + "svelte-class-short": { + "prefix": "s-class-short", + "body": ["class:${1:name}}"], + "description": "class shorthand" + }, + "svelte-use": { + "prefix": "s-use", + "body": ["use:action"], + "description": "use action" + }, + "svelte-use-parameters": { + "prefix": "s-use-parameters", + "body": ["use:action={${1:parameters}}"], + "description": "use action w/ parameters" + }, + "svelte-transition": { + "prefix": "s-transition", + "body": ["${1|transition,in,out|}:${2:name}"], + "description": "transition" + }, + "svelte-transition-params": { + "prefix": "s-transition-params", + "body": ["${1|transition,in,out|}:${2:name}={${3:params}}"], + "description": "transition-params" + }, + "svelte-transition-events": { + "prefix": "s-transition-events", + "body": [ + "on:${1|introstart,introend,outrostart,outroend|}=\"{() => status = '${1|introstart,introend,outrostart,outroend|}'}\"" + ], + "description": "transition-events" + }, + "svelte-transition-local": { + "prefix": "s-transition-local", + "body": ["${1|transition,in,out|}:${2:name}|${3:local}"], + "description": "transition local" + }, + "svelte-transition-all": { + "prefix": "s-transition-all", + "body": ["${1|transition,in,out|}:${2:name}|${3:local}={${4:params}}"], + "description": "transition" + }, + "svelte-animate": { + "prefix": "s-animate", + "body": ["animate:${1:name}={${2:params}}"], + "description": "animate" + }, + "svelte-slot": { + "prefix": "s-slot", + "body": ["${1:}"], + "description": "slot" + }, + "svelte-slot-name": { + "prefix": "s-slot-name", + "body": ["${2:}"], + "description": "slot w/ name" + }, + "svelte-slot-prop": { + "prefix": "s-slot-prop", + "body": [ + "${3:}" + ], + "description": "slot w/ prop" + }, + "svelte-self": { + "prefix": "s-self", + "body": [""], + "description": "svelte:self" + }, + "svelte-self-prop": { + "prefix": "s-self-prop", + "body": [""], + "description": "svelte:self" + }, + "svelte-component": { + "prefix": "s-component", + "body": [""], + "description": "svelte:component" + }, + "svelte-window": { + "prefix": "s-window", + "body": [""], + "description": "svelte:window" + }, + "svelte-window-bind": { + "prefix": "s-window-bind", + "body": [ + "bind:${1|innerWidth,innerHeight,outerWidth,outerHeight,scrollX,scrollY,online|}={${2:variable}}" + ], + "description": "svelte:window bind properties" + }, + "svelte-body": { + "prefix": "s-body", + "body": [""], + "description": "svelte:body" + }, + "svelte-head": { + "prefix": "s-head", + "body": ["", "\t${1:}", ""], + "description": "svelte:head" + }, + "svelte-options": { + "prefix": "s-options", + "body": [ + "" + ], + "description": "svelte:options" + }, + "svelte-create-component": { + "prefix": "s-create-component", + "body": [ + "const component = new ${1:App}({", + "\ttarget: ${2|target,document.body|},", + "\tprops: ${3:props},", + "\tanchor: ${4:anchor},", + "\thydrate: ${5|false,true|},", + "\tintro: ${5|false,true|}", + "})" + ], + "description": "svelte create component" + }, + "svelte-reactive-statement": { + "prefix": "s-reactive-statement", + "body": ["$: ${1:variable} = ${2:prop}"], + "description": "reactive statement" + }, + "svelte-reactive-block": { + "prefix": "s-reactive-block", + "body": ["$: { ${1:console.log(${2:prop});}}"], + "description": "reactive block" + }, + "svelte-action": { + "prefix": "s-action", + "body": [ + "function ${1:foo}(node) {", + "\t// the node has been mounted in the DOM", + "\treturn {", + "\t\tdestroy() {", + "\t\t\t// the node has been removed from the DOM", + "\t\t}", + "\t};", + "}" + ], + "description": "action function" + }, + "svelte-action-parameters": { + "prefix": "s-action-parameters", + "body": [ + "function ${1:foo}(node, ${2:parameters}) {", + "\t// the node has been mounted in the DOM", + "\treturn {", + "\t\tdestroy() {", + "\t\t\t// the node has been removed from the DOM", + "\t\t}", + "\t};", + "}" + ], + "description": "action function" + }, + "svelte-action-update": { + "prefix": "s-action-update", + "body": [ + "function ${1:foo}(node, ${2:parameters}) {", + "\t// the node has been mounted in the DOM", + "\treturn {", + "\t\tupdate(${2:parameters}) {", + "\t\t\t// the value of `${2:parameters}` has changed", + "\t\t}", + "\t\tdestroy() {", + "\t\t\t// the node has been removed from the DOM", + "\t\t}", + "\t};", + "}" + ], + "description": "action w/ update function" + }, + "svelte-on-mount": { + "prefix": "s-lifecycle-mount", + "body": ["onMount(() => {", "\t${1:// content here}", "});"], + "description": "onMount lifecycle function" + }, + "svelte-before-update": { + "prefix": "s-lifecycle-before-update", + "body": ["beforeUpdate(() => {", "\t${1:// content here}", "});"], + "description": "beforeUpdate lifecycle function" + }, + "svelte-after-update": { + "prefix": "s-lifecycle-after-update", + "body": ["afterUpdate(() => {", "\t${1:// content here}", "});"], + "description": "afterUpdate lifecycle function" + }, + "svelte-on-destroy": { + "prefix": "s-lifecycle-destroy", + "body": ["onDestroy(() => {", "\t${1:// content here}", "});"], + "description": "onDestroy lifecycle function" + }, + "svelte-tick": { + "prefix": "s-tick", + "body": ["await tick()"], + "description": "svelte tick function" + }, + "svelte-set-context": { + "prefix": "s-set-content", + "body": ["setContext(${1:key}, ${2:context})"], + "description": "svelte setContext" + }, + "svelte-get-context": { + "prefix": "s-get-content", + "body": ["getContext(${1:key})"], + "description": "svelte getContext" + }, + "svelte-dispatch": { + "prefix": "s-dispatch", + "body": ["const dispatch = createEventDispatcher();"], + "description": "svelte dispatch" + }, + "svelte-dispatch-event": { + "prefix": "s-dispatch-event", + "body": ["dispatch(${1:key},${2:data})"], + "description": "svelte dispatch event" + }, + "svelte-writeable": { + "prefix": "s-writeable", + "body": ["const ${1:store} = writable(${2:initialValue});"], + "description": "svelte writeable" + }, + "svelte-writeable-set": { + "prefix": "s-writeable-set", + "body": [ + "const ${1:store} = writable(${2:initialValue}, () => {", + "\t${3:console.log('got a subscriber');}", + "\treturn () => ${4:console.log('no more subscribers');}", + "});" + ], + "description": "svelte writeable w/ set function" + }, + "svelte-readable": { + "prefix": "s-readable", + "body": [ + "const ${1:store} = readable(${2:initialValue}, () => {", + "\t${3:console.log('got a subscriber');}", + "\treturn () => ${4:console.log('no more subscribers');}", + "});" + ], + "description": "svelte readable (set function required)" + }, + "svelte-derived": { + "prefix": "s-derived", + "body": [ + "const ${1:derivedStore} = derived(${2:storeA}, $${2:storeA} => $${2:storeA} * 2);" + ], + "description": "svelte derived store" + }, + "svelte-derived-multiple": { + "prefix": "s-derived-multiple", + "body": [ + "const ${1:derivedStore} = derived([${2:storeA}, ${3:storeB}], ([$${2:storeA}, $${3:storeB}]) => $${2:storeA} + $${3:storeB});" + ], + "description": "svelte derived store" + }, + "svelte-derived-set": { + "prefix": "s-derived-set", + "body": [ + "const ${1:derivedStore} = derived(${2:storeA}, ($${2:storeA}, set) => {", + "\tsetTimeout(() => set($${2:storeA}), 1000);", + "}, 'one moment...');" + ], + "description": "svelte derived store" + }, + "svelte-derived-multiple-set": { + "prefix": "s-derived-multiple-set", + "body": [ + "const ${1:derivedStore} = derived([${2:storeA}, ${3:storeB}], ([$${2:storeA}, $${3:storeB}], set) => {", + "\tsetTimeout(() => set($${2:storeA} + $${3:storeB}), 1000);", + "}, 'one moment...');" + ], + "description": "svelte derived store" + }, + "svelte-store-get": { + "prefix": "s-store-get-value", + "body": ["const ${1:value} = get(${2:store});"], + "description": "svelte get value from store" + }, + "svelte-component-set": { + "prefix": "s-component-set", + "body": ["${1:component}.$set(${2: params});"], + "description": "svelte component api $set" + }, + "svelte-component-on": { + "prefix": "s-component-on", + "body": ["${1:component}.$on(${2:eventname}, ${3:handler});"], + "description": "svelte component api $on" + }, + "svelte-component-destroy": { + "prefix": "s-component-destroy", + "body": ["${1:component}.$destroy();"], + "description": "svelte component api $destroy" + }, + "svelte-render-component": { + "prefix": "s-render-component", + "body": [ + "const { head, html, css } = ${1:App}.render({", + "\tprops: ${3:props},", + "})" + ], + "description": "svelte render component" + }, + "svelte-tweened": { + "prefix": "s-tweened", + "body": ["const ${1:store} = tweened(${2:value}, ${3:options});"], + "description": "svelte create tweened store" + }, + "svelte-spring": { + "prefix": "s-spring", + "body": ["const ${1:store} = spring(${2:value}, ${3:options});"], + "description": "svelte create spring store" + }, + "svelte-register": { + "prefix": "s-register", + "body": [ + "require('svelte/register');", + "const ${1:App} = require('${2:./App.svelte}').default;" + ], + "description": "svelte register" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/swift.json b/dot_vim/plugged/friendly-snippets/snippets/swift.json new file mode 100644 index 0000000..7421e92 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/swift.json @@ -0,0 +1,175 @@ +{ + "print": { + "prefix": "print", + "body": "print(\"$1\")\n$0", + "description": "print(\"...\")" + }, + "print value": { + "prefix": "printv", + "body": "print(\"\\($1)\")\n$0", + "description": "print(\"\\(...)\")" + }, + "while": { + "prefix": "while", + "body": [ + "while ${1:condition} {", + "\t$0", + "}" + ], + "description": "while statement" + }, + "repeat-while": { + "prefix": "repeat", + "body": [ + "repeat {", + "\t$0", + "} while ${1:condition}" + ], + "description": "repeat-while statement" + }, + "for": { + "prefix": "for", + "body": [ + "for ${1:item} in ${2:collection} {", + "\t$0", + "}" + ], + "description": "for-in statement" + }, + "if": { + "prefix": "if", + "body": [ + "if ${1:condition} {", + "\t$0", + "}" + ], + "description": "if statement" + }, + "else if": { + "prefix": "elif", + "body": [ + "else if ${1:condition} {", + "\t$0", + "}" + ], + "description": "else clause with a nested if statement" + }, + "else": { + "prefix": "else", + "body": [ + "else {", + "\t$0", + "}" + ], + "description": "else clause" + }, + "if let": { + "prefix": "iflet", + "body": [ + "if let ${1:value} = ${2:optional} {", + "\t$0", + "}" + ], + "description": "if statement with optional binding" + }, + "guard": { + "prefix": "guard", + "body": [ + "guard ${1:condition} else {", + "\t$0", + "}" + ], + "description": "guard statement" + }, + "guard let": { + "prefix": "guardlet", + "body": [ + "guard let ${1:value} = ${2:optional} else {", + "\t$0", + "}" + ], + "description": "guard statement with optional binding" + }, + "switch": { + "prefix": "switch", + "body": [ + "switch ${1:value} {", + "case ${2:pattern}:", + "\t$0", + "default:", + "\t", + "}" + ], + "description": "switch statement" + }, + "do": { + "prefix": "do", + "body": [ + "do {", + "\t$0", + "} catch ${1:error} {", + "\t$2", + "}" + ], + "description": "do statement" + }, + "func": { + "prefix": "func", + "body": [ + "func ${1:name}(${2:parameters}) -> ${3:Type} {", + "\t$0", + "}" + ], + "description": "function declaration" + }, + "struct": { + "prefix": "struct", + "body": [ + "struct ${1:Name} {", + "", + "\t$0", + "}" + ], + "description": "struct declaration" + }, + "enum": { + "prefix": "enum", + "body": [ + "enum ${1:Name} {", + "", + "\tcase $0", + "}" + ], + "description": "enum declaration" + }, + "class": { + "prefix": "class", + "body": [ + "class ${1:Name} {", + "", + "\t$0", + "}" + ], + "description": "class declaration" + }, + "protocol": { + "prefix": "protocol", + "body": [ + "protocol ${1:Name} {", + "", + "\t$0", + "}" + ], + "description": "protocol declaration" + }, + "extension": { + "prefix": "extension", + "body": [ + "extension ${1:Type} {", + "", + "\t$0", + "}" + ], + "description": "extension declaration" + } +} \ No newline at end of file diff --git a/dot_vim/plugged/friendly-snippets/snippets/systemverilog.json b/dot_vim/plugged/friendly-snippets/snippets/systemverilog.json new file mode 100644 index 0000000..8f3d26b --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/systemverilog.json @@ -0,0 +1,1434 @@ +{ + "timescale": { + "prefix": ["ts", "timescale", "`timescale"], + "body": [ + "`timescale ${1:1ps}/${2:100ns}$0" + ], + "description": "add timescale for verification" + }, + + "module": { + "prefix": "module", + "body": [ + "module ${1:moduleName} (", + "\t${2:ports}", + ");", + "\t$0", + "endmodule" + ], + "description": "Insert a module without parameter" + }, + + "if": { + "prefix": "if", + "body": [ + "if (${1:conditions}) begin", + "\t$0", + "end" + ], + "description": "if (...) begin ... end" + }, + + "ifelse": { + "prefix": "ifelse", + "body": [ + "if (${1:conditions}) begin", + "\t$2", + "end", + "else begin", + "\t$0", + "end" + ], + "description": "if (...) begin ... end else begin ... end" + }, + + "else": { + "prefix": "else", + "body": [ + "else begin", + "\t$0", + "end" + ], + "description": "else begin ... end" + }, + + "begin/end": { + "prefix": "begin", + "body": [ + "begin", + "\t$0", + "end" + ], + "description": "Insert a begin ... end block" + }, + + "initial": { + "prefix": "initial", + "body": [ + "initial begin", + "\t$0", + "end" + ], + "description": "initial begin ... end" + }, + + "case": { + "prefix": "case", + "body": [ + "case (${1:param})", + "\t$2", + "\tdefault : $0", + "endcase" + ], + "description": "case () ... endcase" + }, + + "casex": { + "prefix": "casex", + "body": [ + "casex (${1:param})", + "\t$2", + "\tdefault : $0", + "endcase" + ], + "description": "casex () ... endcase" + }, + + "casez": { + "prefix": "casez", + "body": [ + "casez (${1:param})", + "\t$2", + "\tdefault : $0", + "endcase" + ], + "description": "casez () ... endcase" + }, + + "parameter": { + "prefix": "parameter", + "body": [ + "parameter $1 = $2;" + ], + "description": "paramter var = val;" + }, + + "localparam": { + "prefix": "localparam", + "body": "localparam $1 = $2;", + "description": "localparam var = val;" + }, + + "function": { + "prefix": "function", + "body": [ + "function ${1:functionName} (${2:param});", + "\t$0", + "endfunction" + ], + "description": "function (...) ... endfunction" + }, + + "always_ff block": { + "prefix": "always_ff", + "body": [ + "always_ff @(${1:clock}) begin : ${2:blockName}", + "\t$0", + "end" + ], + "description": "Insert an always_ff block" + }, + + "always_comb block": { + "prefix": "always_comb", + "body": [ + "always_comb begin : ${1:blockName}", + "\t$0", + "end" + ], + "description": "Insert an always_comb block" + }, + + "always_latch block": { + "prefix": "always_latch", + "body": [ + "always_latch begin : ${1:blockName}", + "\t$0", + "end" + ], + "description": "Insert an always_latch block" + }, + + "typedef enum": { + "prefix": "typedef enum", + "body": [ + "typedef enum {$1} ${2};" + ], + "description": "typedef enum (data_type) { ... } name" + }, + + "enum": { + "prefix": [ + "en", + "enum" + ], + "body": [ + "enum {$1} ${2};" + ], + "description": "enum (data_type) { ... } name" + }, + + "import": { + "prefix": "import", + "body": "import ${1:packageName}::${2:scope};", + "description": "import name::scope" + }, + + "fork-join": { + "prefix": "fork join", + "body": [ + "fork", + "\t$0", + "join" + ], + "description": "fork ... join" + }, + + "fork-join_any": { + "prefix": "fork join_any", + "body": [ + "fork", + "\t$0", + "join_any" + ], + "description": "fork ... join_any" + }, + + "fork-join_none": { + "prefix": "fork join_none", + "body": [ + "fork", + "\t$0", + "join_none" + ], + "description": "fork ... join_none" + }, + + "for loop": { + "prefix": "for", + "body": [ + "for ($1 = $2; $3; $4) begin", + "\t$0", + "end" + ], + "description": "for (...) begin ... end" + }, + + "while loop": { + "prefix": "while", + "body": [ + "while ($1) begin", + "\t$0", + "end" + ], + "description": "while (...) begin ... end" + }, + + "forever": { + "prefix": "forever", + "body": [ + "forever begin", + "\t$0", + "end" + ], + "description": "forever begin ... end" + }, + + "repeat": { + "prefix": "repeat", + "body": [ + "repeat (${1:times}) begin", + "\t$0", + "end" + ], + "description": "repeat (...) begin ... end" + }, + + "foreach": { + "prefix": "foreach", + "body": [ + "foreach ($1) begin", + "\t$0", + "end" + ], + "description": "foreach (...) begin ... end" + }, + + "constraint": { + "prefix": "constraint", + "body": [ + "constraint ${1:constraintName} {", + "\t$0", + "}" + ], + "description": "systemverilog constraint" + }, + + "covergroup": { + "prefix": "covergroup", + "body": [ + "covergroup ${1:covergroupName};", + "\t$0", + "endgroup" + ], + "description": "SystemVerilog basic covergroup" + }, + + "covergroup with an event trigger": { + "prefix": "covergroup trigger", + "body": [ + "covergroup ${1:covergroupName} @(${2:coverageEvent});", + "\t$0", + "endgroup" + ], + "description": "Covergroup with event trigger" + }, + + "sv_coverpoint": { + "prefix": ["sv_coverpoint", "coverpoint"], + "body": [ + "coverpoint ${1:coverpointName} {", + "\t$0", + "}" + ], + "description": "SystemVerilog coverage point template." + }, + + "package": { + "prefix": "package", + "body": [ + "package ${1:packageName};", + "\t$0", + "endpackage" + ], + "description": "package name; ... endpackage" + }, + + "interface": { + "prefix": "interface", + "body": [ + "interface ${1:interfaceName};", + "\t$0", + "endinterface" + ], + "description": "interface name; ... endinterface" + }, + + "program": { + "prefix": "program", + "body": [ + "program ${1:programName};", + "\t$0", + "endprogram" + ], + "description": "program statement" + }, + + "class": { + "prefix": "class", + "body": [ + "class ${1:className};", + "\t$0", + "endclass : $1" + ], + "description": "class name; ... endclass" + }, + + "class extends": { + "prefix": "class extends", + "body": [ + "class ${1:className} extends ${2:superClass};", + "\t$0", + "endclass" + ], + "description": "class name extends super; ... endclass" + }, + + "task": { + "prefix": "task", + "body": [ + "task ${1:automatic} ${2:taskName} (${3:arguments});", + "\t$0", + "endtask" + ], + "description": "task name; ... endtask" + }, + + "modport": { + "prefix": "modport", + "body": [ + "modport ${1:identifier} (", + "\t$0", + ");" + ], + "description": "SystemVerilog modport" + }, + + "uvm_macro_info": { + "prefix": "`uvm_info", + "body": [ + "`uvm_info(\"${1:$TM_FILENAME_BASE}\", \"${2:message}\", ${3|UVM_NONE,UVM_LOW,UVM_MEDIUM,UVM_HIGH,UVM_FULL,UVM_DEBUG|})\n$0" + ], + "description": "uvm_info macro" + }, + + "uvm_macro_warning": { + "prefix": "`uvm_warning", + "body": [ + "`uvm_warning(\"${1:$TM_FILENAME_BASE}\", \"${2:message}\")\n$0" + ], + "description": "uvm_warning macro" + }, + + "uvm_macro_error": { + "prefix": "`uvm_error", + "body": [ + "`uvm_error(\"${1:$TM_FILENAME_BASE}\", \"${2:message}\")\n$0" + ], + "description": "uvm_error macro" + }, + + "uvm_macro_fatal": { + "prefix": "`uvm_fatal", + "body": [ + "`uvm_fatal(\"${1:$TM_FILENAME_BASE}\", \"${2:message}\")\n$0" + ], + "description": "uvm_fatal macro" + }, + + "uvm_macro_object_utils": { + "prefix": "`uvm_object_utils", + "body": [ + "`uvm_object_utils(${1:type})" + ], + "description": "register the object class to factory" + }, + + "uvm_macro_object_utils_block": { + "prefix": [ + "`uvm_object_utils_begin", + "uvm_object_utils_block" + ], + "body": [ + "`uvm_object_utils_begin(${1:type})", + "\t$2", + "`uvm_object_utils_end" + ], + "description": "register the object class to factory, with field automation" + }, + + "uvm_macro_field": { + "prefix": ["`uvm_field", "field automation"], + "body": "`uvm_field_${1:data_type}($2, ${3:flag bit});", + "description": "uvm field automation" + }, + + "uvm_macro_object_param_utils": { + "prefix": "`uvm_object_param_utils", + "body": [ + "`uvm_object_param_utils(${1:type})" + ], + "description": "register the object class(with parameter) to factory" + }, + + "uvm_macro_object_param_utils_block": { + "prefix": [ + "`uvm_object_param_utils_begin", + "uvm_object_param_utils_block" + ], + "body": [ + "`uvm_object_param_utils_begin(${1:type})", + "\t$2", + "`uvm_object_param_utils_end" + ], + "description": "register the object class(with parameter) to factory, with field automation" + }, + + "uvm_macro_component_utils": { + "prefix": "`uvm_component_utils", + "body": [ + "`uvm_component_utils(${1:type})" + ], + "description": "register the component class to factory" + }, + + "uvm_macro_component_param_utils": { + "prefix": "`uvm_component_param_utils", + "body": [ + "`uvm_component_param_utils(${1:type})" + ], + "description": "register the component class(with parameter) to factory" + }, + + "uvm_analysis_imp_decl": { + "prefix": "`uvm_analysis_imp_decl", + "body": "`uvm_analysis_imp_decl(${1:name})", + "description": "add suffix to analysis_imp" + }, + + "uvm_declare_p_sequencer": { + "prefix": "`uvm_declare_p_sequencer", + "body": "`uvm_declare_p_sequencer(${1:sequencer})", + "description": "case m_sequencer to p_sequencer" + }, + + "uvm_macro_do": { + "prefix": "`uvm_do", + "body": "`uvm_do(${1:SEQ_OR_ITEM})", + "description": "uvm_do macro" + }, + + "uvm_macro_do_pri": { + "prefix": "`uvm_do_pri", + "body": "`uvm_do_pri(${1:SEQ_OR_ITEM}, ${2:PRIORITY})", + "description": "uvm_do_pri macro" + }, + + "uvm_macro_do_with": { + "prefix": "`uvm_do_with", + "body": "`uvm_do_with(${1:SEQ_OR_ITEM}, ${2:CONSTRAINTS})", + "description": "uvm_do_with macro" + }, + + "uvm_macro_do_pri_with": { + "prefix": "`uvm_do_pri_with", + "body": "`uvm_do_pri_with(${1:SEQ_OR_ITEM}, ${2:PRIORITY}, ${3:CONSTRAINTS})", + "description": "uvm_do_pri_with macro" + }, + + "uvm_macro_do_on": { + "prefix": "`uvm_do_on", + "body": "`uvm_do_on(${1:SEQ_OR_ITEM}, ${2:SEQR})", + "description": "uvm_do_on macro" + }, + + "uvm_macro_do_on_pri": { + "prefix": "`uvm_do_on_pri", + "body": "`uvm_do_on_pri(${1:SEQ_OR_ITEM}, ${2:SEQR}, ${3:PRIORITY})", + "description": "uvm_do_on_pri macro" + }, + + "uvm_macro_do_on_with": { + "prefix": "`uvm_do_on_with", + "body": "`uvm_do_on_with(${1:SEQ_OR_ITEM}, ${2:SEQR}, ${3:CONSTRAINTS})", + "description": "uvm_do_on_with macro" + }, + + "uvm_macro_do_on_pri_with": { + "prefix": "`uvm_do_on_pri_with", + "body": "`uvm_do_on_pri_with(${1:SEQ_OR_ITEM}, ${2:SEQR}, ${3:PRIORITY}, ${4:CONSTRAINTS})", + "description": "uvm_do_on_pri_with macro" + }, + + "uvm_config_db_set": { + "prefix": "uvm_config_db_set", + "body": [ + "uvm_config_db#(${1:type})::set(${2:contxt}, ${3:inst_name}, ${4:field_name}, ${5:value});" + ], + "description": "set the value to config database" + }, + + "uvm_config_db_get": { + "prefix": "uvm_config_db_get", + "body": [ + "uvm_config_db#(${1:type})::get(${2:contxt}, ${3:inst_name}, ${4:field_name}, ${5:value});" + ], + "description": "get the value from config database" + }, + + "default_sequence": { + "prefix": ["set_default_sequence", "default_sequence"], + "body": [ + "uvm_config_db#(uvm_object_wrapper)::set(${1:contxt}, ${2:inst_name}, \"default_sequence\", ${3:value});" + ], + "description": "use default_sequence to start a sequence on sequencer" + }, + + "uvm_object_factory_instantiation": { + "prefix": ["uvm_factory_instantiation_object","create_object"], + "body": [ + "${1:instance_name} = ${2:}::type_id::create(.name(\"$1\"), .contxt(get_full_name()));\n" + ], + "description": "use factory to create an instance of an object" + }, + + "uvm_component_factory_instantiation": { + "prefix": ["uvm_factory_instantation_component","create_component"], + "body": [ + "${1:instance_name} = ${2:component_type}::type_id::create(\"$1\", this);\n" + ], + "description": "use factory to create an instance of a component" + }, + + "uvm_factory_set_type_override_by_type": { + "prefix": "set_type_override_by_type", + "body": "set_type_override_by_type(${1:base_type}, ${2:new_type});", + "description": "factory type override" + }, + + "uvm_factory_inst_override": { + "prefix": "uvm_factory_inst_override", + "body": [ + "${1:}::type_id::set_inst_override(${2:}::get_type(), {get_full_name(), \"${3:*}\"});\n" + ], + "description": "factory instance override" + }, + + "uvm_factory_type_override": { + "prefix": "uvm_factory_type_override", + "body": [ + "${1:}::type_id::set_type_override(${2:}::get_type());" + ], + "description": "factory type override" + }, + + "uvm_build_phase": { + "prefix": ["uvm_phase_build", "uvm_build_phase"], + "body": [ + "virtual function void build_phase(uvm_phase phase);", + "\tsuper.build_phase(phase);", + "\t$1", + "endfunction : build_phase" + ], + "description": "UVM build_phase template" + }, + + "uvm_connect_phase": { + "prefix": ["uvm_phase_connect", "uvm_connect_phase"], + "body": [ + "virtual function void connect_phase(uvm_phase phase);", + "\tsuper.connect_phase(phase);", + "\t$1", + "endfunction : connect_phase" + ], + "description": "UVM connect_phase template" + }, + + "uvm_end_of_elaboration_phase": { + "prefix": ["uvm_phase_end_of_elaboration", "uvm_end_of_elaboration_phase"], + "body": [ + "virtual function void end_of_elaboration_phase(uvm_phase phase);", + "\tsuper.end_of_elaboration_phase(phase);", + "\t$1", + "endfunction : end_of_elaboration_phase" + ], + "description": "UVM end_of_elaboration_phase template" + }, + + "uvm_start_of_simulation_phase": { + "prefix": ["uvm_phase_start_of_simulation", "uvm_start_of_simulation_phase"], + "body": [ + "virtual function void start_of_simulation_phase(uvm_phase phase);", + "\tsuper.start_of_simulation_phase(phase);", + "\t$1", + "endfunction : start_of_simulation_phase" + ], + "description": "UVM start_of_simulation_phase template" + }, + + "uvm_run_phase": { + "prefix": ["uvm_phase_run", "uvm_run_phase"], + "body": [ + "virtual task run_phase(uvm_phase phase);", + "\t$1", + "endtask : run_phase" + ], + "description": "UVM run_phase template" + }, + + "uvm_pre_reset_phase": { + "prefix": ["uvm_phase_pre_reset", "uvm_pre_reset_phase"], + "body": [ + "virtual task pre_reset_phase(uvm_phase phase);", + "\t$1", + "endtask: pre_reset_phase" + ], + "description": "UVM pre_reset_phase template" + }, + + "uvm_reset_phase": { + "prefix": ["uvm_phase_reset", "uvm_reset_phase"], + "body": [ + "virtual task reset_phase(uvm_phase phase);", + "\t$1", + "endtask: reset_phase" + ], + "description": "UVM reset_phase template" + }, + + "uvm_post_reset_phase": { + "prefix": ["uvm_phase_post_reset", "uvm_post_reset_phase"], + "body": [ + "virtual task post_reset_phase(uvm_phase phase);", + "\t$1", + "endtask: post_reset_phase" + ], + "description": "UVM post_reset_phase template" + }, + + "uvm_pre_configure_phase": { + "prefix": ["uvm_phase_pre_configure", "uvm_pre_configure_phase"], + "body": [ + "virtual task pre_configure_phase(uvm_phase phase);", + "\t$1", + "endtask: pre_configure_phase" + ], + "description": "UVM pre_configure_phase template" + }, + + "uvm_configure_phase": { + "prefix": ["uvm_phase_configure", "uvm_configure_phase"], + "body": [ + "virtual task configure_phase(uvm_phase phase);", + "\t$1", + "endtask: configure_phase" + ], + "description": "UVM post_configure_phase template" + }, + + "uvm_post_configure_phase": { + "prefix": ["uvm_phase_post_configure", "uvm_post_configure_phase"], + "body": [ + "virtual task post_configure_phase(uvm_phase phase);", + "\t$1", + "endtask: post_configure_phase" + ], + "description": "UVM post_configure_phase template" + }, + + "uvm_pre_main_phase": { + "prefix": ["uvm_phase_pre_main", "uvm_pre_main_phase"], + "body": [ + "virtual task pre_main_phase(uvm_phase phase);", + "\t$1", + "endtask: pre_main_phase" + ], + "description": "UVM pre_main_phase template" + }, + + "uvm_main_phase": { + "prefix": ["uvm_phase_main", "uvm_main_phase"], + "body": [ + "virtual task main_phase(uvm_phase phase);", + "\t$1", + "endtask: main_phase" + ], + "description": "UVM main_phase template" + }, + + "uvm_post_main_phase": { + "prefix": ["uvm_phase_post_main", "uvm_post_main_phase"], + "body": [ + "virtual task post_main_phase(uvm_phase phase);", + "\t$1", + "endtask: post_main_phase" + ], + "description": "UVM post_main_phase template" + }, + + "uvm_pre_shutdown_phase": { + "prefix": ["uvm_phase_pre_shutdown", "uvm_pre_shutdown_phase"], + "body": [ + "virtual task pre_shutdown_phase(uvm_phase phase);", + "\t$1", + "endtask: pre_shutdown_phase" + ], + "description": "UVM pre_shutdown_phase template" + }, + + "uvm_shutdown_phase": { + "prefix": ["uvm_phase_shutdown", "uvm_shutdown_phase"], + "body": [ + "virtual task shutdown_phase(uvm_pase phase);", + "\t$1", + "endtask: shutdown_phase" + ], + "description": "UVM shutdown_phase template" + }, + + "uvm_post_shutdown_phase": { + "prefix": ["uvm_phase_post_shutdown", "uvm_post_shutdown_phase"], + "body": [ + "virtual task post_shutdown_phase(uvm_phase phase);", + "\t$1", + "endtask: post_shutdown_phase" + ], + "description": "UVM post_shutdown_phase template" + }, + + "uvm_extract_phase": { + "prefix": ["uvm_phase_extract", "uvm_extract_phase"], + "body": [ + "virtual function void extract_phase(uvm_phase phase);", + "\tsuper.extract_phase(phase);", + "\t$1", + "endfunction: extract_phase" + ], + "description": "UVM extract_phase template" + }, + + "uvm_check_phase": { + "prefix": ["uvm_phase_check", "uvm_check_phase"], + "body": [ + "virtual function void check_phase(uvm_phase phase);", + "\tsuper.check_phase(phase);", + "\t$1", + "endfunction: check_phase" + ], + "description": "UVM check_phase template" + }, + + "uvm_report_phase": { + "prefix": ["uvm_phase_report", "uvm_report_phase"], + "body": [ + "virtual function void report_phase(uvm_phase phase);", + "\tsuper.report_phase(phase);", + "\t$1", + "endfunction: report_phase" + ], + "description": "UVM report_phase template" + }, + + "uvm_final_phase": { + "prefix": ["uvm_phase_final", "uvm_final_phase"], + "body": [ + "virtual function void final_phase(uvm_phase phase);", + "\tsuper.final_phase(phase);", + "\t$1", + "endfunction: final_phase" + ], + "description": "UVM final_phase template" + }, + + "set_drain_time":{ + "prefix": "set_drain_time", + "body": "phase.phase_done.set_drain_time(this, ${1:drain_time});", + "description": "set drain time of a phase" + }, + + "uvm_objection_block": { + "prefix": ["uvm_objection_block","phase_objection"], + "body": [ + "phase.raise_objection(this);", + "\t$0", + "phase.drop_objection(this);" + ], + "description": "UVM raise_objection & drop_objection template" + }, + + "uvm_analysis_port": { + "prefix": "uvm_analysis_port", + "body": [ + "uvm_analysis_port #(${1:className}) ${2:name};" + ], + "description": "UVM analysis_port template" + }, + + "uvm_analysis_imp": { + "prefix": "uvm_analysis_imp", + "body": [ + "uvm_analysis_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM analysis_imp template" + }, + + "uvm_blocking_put_port": { + "prefix": "uvm_blocking_put_port", + "body": [ + "uvm_blocking_put_port #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_put_port template" + }, + + "uvm_nonblocking_put_port": { + "prefix": "uvm_nonblocking_put_port", + "body": [ + "uvm_nonblocking_put_port #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_put_port template" + }, + + "uvm_put_port": { + "prefix": "uvm_put_port", + "body": [ + "uvm_put_port #(${1:className}) ${2:name};" + ], + "description": "UVM put_port template" + }, + + "uvm_blocking_get_port": { + "prefix": "uvm_blocking_get_port", + "body": [ + "uvm_blocking_get_port #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_get_port template" + }, + + "uvm_nonblocking_get_port": { + "prefix": "uvm_nonblocking_get_port", + "body": [ + "uvm_nonblocking_get_port #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_get_port template" + }, + + "uvm_get_port": { + "prefix": "uvm_get_port", + "body": [ + "uvm_get_port #(${1:className}) ${2:name};" + ], + "description": "UVM get_port template" + }, + + "uvm_blocking_peek_port": { + "prefix": "uvm_blocking_peek_port", + "body": [ + "uvm_blocking_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_peek_port template" + }, + + "uvm_nonblocking_peek_port": { + "prefix": "uvm_nonblocking_peek_port", + "body": [ + "uvm_nonblocking_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_peek_port template" + }, + + "uvm_peek_port": { + "prefix": "uvm_peek_port", + "body": [ + "uvm_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM peek_port template" + }, + + "uvm_blocking_get_peek_port": { + "prefix": "uvm_blocking_get_peek_port", + "body": [ + "uvm_blocking_get_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_get_peek_port template" + }, + + "uvm_nonblocking_get_peek_port": { + "prefix": "uvm_nonblocking_get_peek_port", + "body": [ + "uvm_nonblocking_get_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_get_peek_port template" + }, + + "uvm_get_peek_port": { + "prefix": "uvm_get_peek_port", + "body": [ + "uvm_get_peek_port #(${1:className}) ${2:name};" + ], + "description": "UVM get_peek_port template" + }, + + "uvm_blocking_transport_port": { + "prefix": "uvm_blocking_transport_port", + "body": [ + "uvm_blocking_transport_port #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM blocking_transport_port template" + }, + + "uvm_nonblocking_transport_port": { + "prefix": "uvm_nonblocking_transport_port", + "body": [ + "uvm_nonblocking_transport_port #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM nonblocking_transport_port template" + }, + + "uvm_transport_port": { + "prefix": "uvm_transport_port", + "body": [ + "uvm_transport_port #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM transport_port template" + }, + + "uvm_blocking_put_export": { + "prefix": "uvm_blocking_put_export", + "body": [ + "uvm_blocking_put_export #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_put_export template" + }, + + "uvm_nonblocking_put_export": { + "prefix": "uvm_nonblocking_put_export", + "body": [ + "uvm_nonblocking_put_export #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_put_export template" + }, + + "uvm_put_export": { + "prefix": "uvm_put_export", + "body": [ + "uvm_put_export #(${1:className}) ${2:name};" + ], + "description": "UVM put_export template" + }, + + "uvm_blocking_get_export": { + "prefix": "uvm_blocking_get_export", + "body": [ + "uvm_blocking_get_export #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_get_export template" + }, + + "uvm_nonblocking_get_export": { + "prefix": "uvm_nonblocking_get_export", + "body": [ + "uvm_nonblocking_get_export #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_get_export template" + }, + + "uvm_get_export": { + "prefix": "uvm_get_export", + "body": [ + "uvm_get_export #(${1:className}) ${2:name};" + ], + "description": "UVM get_export template" + }, + + "uvm_blocking_peek_export": { + "prefix": "uvm_blocking_peek_export", + "body": [ + "uvm_blocking_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_peek_export template" + }, + + "uvm_nonblocking_peek_export": { + "prefix": "uvm_nonblocking_peek_export", + "body": [ + "uvm_nonblocking_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_peek_export template" + }, + + "uvm_peek_export": { + "prefix": "uvm_peek_export", + "body": [ + "uvm_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM peek_export template" + }, + + "uvm_blocking_get_peek_export": { + "prefix": "uvm_blocking_get_peek_export", + "body": [ + "uvm_blocking_get_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM blocking_get_peek_export template" + }, + + "uvm_nonblocking_get_peek_export": { + "prefix": "uvm_nonblocking_get_peek_export", + "body": [ + "uvm_nonblocking_get_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM nonblocking_get_peek_export template" + }, + + "uvm_get_peek_export": { + "prefix": "uvm_get_peek_export", + "body": [ + "uvm_get_peek_export #(${1:className}) ${2:name};" + ], + "description": "UVM get_peek_export template" + }, + + "uvm_blocking_transport_export": { + "prefix": "uvm_blocking_transport_export", + "body": [ + "uvm_blocking_transport_export #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM blocking_transport_export template" + }, + + "uvm_nonblocking_transport_export": { + "prefix": "uvm_nonblocking_transport_export", + "body": [ + "uvm_nonblocking_transport_export #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM nonblocking_transport_export template" + }, + + "uvm_transport_export": { + "prefix": "uvm_transport_export", + "body": [ + "uvm_transport_export #(${1:REQ className}, ${2:RSP className}) ${3:name};" + ], + "description": "UVM transport_export template" + }, + + "uvm_blocking_put_imp": { + "prefix": "uvm_blocking_put_imp", + "body": [ + "uvm_blocking_put_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM blocking_put_imp template" + }, + + "uvm_nonblocking_put_imp": { + "prefix": "uvm_nonblocking_put_imp", + "body": [ + "uvm_nonblocking_put_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM nonblocking_put_imp template" + }, + + "uvm_put_imp": { + "prefix": "uvm_put_imp", + "body": [ + "uvm_put_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM put_imp template" + }, + + "uvm_blocking_get_imp": { + "prefix": "uvm_blocking_get_imp", + "body": [ + "uvm_blocking_get_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM blocking_get_imp template" + }, + + "uvm_nonblocking_get_imp": { + "prefix": "uvm_nonblocking_get_imp", + "body": [ + "uvm_nonblocking_get_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM nonblocking_get_imp template" + }, + + "uvm_get_imp": { + "prefix": "uvm_get_imp", + "body": [ + "uvm_get_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM get_imp template" + }, + + "uvm_blocking_peek_imp": { + "prefix": "uvm_blocking_peek_imp", + "body": [ + "uvm_blocking_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM blocking_peek_imp template" + }, + + "uvm_nonblocking_peek_imp": { + "prefix": "uvm_nonblocking_peek_imp", + "body": [ + "uvm_nonblocking_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM nonblocking_peek_imp template" + }, + + "uvm_peek_imp": { + "prefix": "uvm_peek_imp", + "body": [ + "uvm_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM peek_imp template" + }, + + "uvm_blocking_get_peek_imp": { + "prefix": "uvm_blocking_get_peek_imp", + "body": [ + "uvm_blocking_get_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM blocking_get_peek_imp template" + }, + + "uvm_nonblocking_get_peek_imp": { + "prefix": "uvm_nonblocking_get_peek_imp", + "body": [ + "uvm_nonblocking_get_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM nonblocking_get_peek_imp template" + }, + + "uvm_get_peek_imp": { + "prefix": "uvm_get_peek_imp", + "body": [ + "uvm_get_peek_imp #(${1:className}, ${2:IMP}) ${3:name};" + ], + "description": "UVM get_peek_imp template" + }, + + "uvm_blocking_transport_imp": { + "prefix": "uvm_blocking_transport_imp", + "body": [ + "uvm_blocking_transport_imp #(${1:REQ className}, ${2:RSP className}, ${3:IMP}) ${4:name};" + ], + "description": "UVM blocking_transport_imp template" + }, + + "uvm_nonblocking_transport_imp": { + "prefix": "uvm_nonblocking_transport_imp", + "body": [ + "uvm_nonblocking_transport_imp #(${1:REQ className}, ${2:RSP className}, ${3:IMP}) ${4:name};" + ], + "description": "UVM nonblocking_transport_imp template" + }, + + "uvm_transport_imp": { + "prefix": "uvm_transport_imp", + "body": [ + "uvm_transport_imp #(${1:REQ className}, ${2:RSP className}, ${3:IMP}) ${4:name};" + ], + "description": "UVM transport_imp template" + }, + + "uvm_tlm_analysis_fifo": { + "prefix": "uvm_tlm_analysis_fifo", + "body": [ + "uvm_tlm_analysis_fifo #(${1:className}) ${2:name};" + ], + "description": "UVM tlm_analysis_fifo template" + }, + + "uvm_driver": { + "prefix": "uvm_driver", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_driver #(${2:transactionType});", + "\t$3", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM driver class template" + }, + + "uvm_monitor": { + "prefix": "uvm_monitor", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_monitor;", + "\t$2", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM monitor class template" + }, + + "uvm_sequencer": { + "prefix": "uvm_sequencer", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_sequencer #(${2:transactionType});", + "\t$3", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM sequencer class template" + }, + + "uvm_scoreboard": { + "prefix": "uvm_scoreboard", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_scoreboard;", + "\t$2", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM scoreboard class template" + }, + + "uvm_env": { + "prefix": "uvm_env", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_env;", + "\t$2", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM env class template" + }, + + "uvm_test": { + "prefix": "uvm_test", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_test;", + "\t$2", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM test class template" + }, + + "uvm_sequence": { + "prefix": "uvm_sequence", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_sequence #(${2:transactionType});", + "\t$3", + "\t", + "\t`uvm_object_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\");", + "\t\tsuper.new(name);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM sequence class template" + }, + + "uvm_sequence_with_parameters": { + "prefix": "uvm_sequence_with_parameters", + "body": [ + "class ${1:$TM_FILENAME_BASE} #(${2:parameters}) extends uvm_sequence;", + "\ttypedef $1 #(${2/(\\b(parameter|type)\\s+([A-Za-z_][A-Za-z0-9_$]*)(\\s*=\\s*([A-Za-z0-9_$]+))?)*\\b/$3/g}) this_type_t;", + "\t`uvm_object_param_utils(this_type_t);\n", + "\tfunction new(string name = \"$1\");", + "\t\tsuper.new(name);", + "\tendfunction: new\n", + "\textern virtual task body();\n", + "\t$0", + "endclass: $1" + ], + "description": "UVM sequence class template with parameters" + }, + + "uvm_sequence_item": { + "prefix": "uvm_sequence_item", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_sequence_item;", + "\t$2", + "\t", + "\t`uvm_object_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\");", + "\t\tsuper.new(name);", + "\tendfunction\n", + "\t$0", + "endclass\n\n" + ], + "description": "UVM sequence item class template" + }, + + "uvm_sequence_item_with_parameters": { + "prefix": "uvm_sequence_item_with_parameters", + "body": [ + "class ${1:$TM_FILENAME_BASE} #(${2:parameters}) extends uvm_sequence_item;", + "\ttypedef $1 #(${2/(\\b(parameter|type)\\s+([A-Za-z_][A-Za-z0-9_$]*)(\\s*=\\s*([A-Za-z0-9_$]+))?)*\\b/$3/g}) this_type_t;", + "\t`uvm_object_param_utils(this_type_t);\n", + "\tfunction new(string name = \"$1\");", + "\t\tsuper.new(name);", + "\tendfunction: new\n", + "\t$0", + "endclass: $1\n\n" + ], + "description": "UVM parametrized sequence item class template" + }, + + "uvm_object": { + "prefix": "uvm_object", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_object;", + "\t$2", + "\t", + "\t`uvm_object_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\");", + "\t\tsuper.new(name);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM object class template" + }, + + "uvm_object_with_parameters": { + "prefix": "uvm_object_with_parameters", + "body": [ + "class ${1:$TM_FILENAME_BASE} #(${2:parameters}) extends uvm_object;", + "\ttypedef $1 #(${2/(\\b(parameter|type)\\s+([A-Za-z_][A-Za-z0-9_$]*)(\\s*=\\s*([A-Za-z0-9_$]+))?)*\\b/$3/g}) this_type_t;", + "\t`uvm_object_param_utils(this_type_t);\n", + "\tfunction new(string name = \"$1\");", + "\t\tsuper.new(name);", + "\tendfunction: new", + "\t$0", + "endclass: $1\n" + ], + "description": "UVM parametrized object class template" + }, + + "uvm_component": { + "prefix": "uvm_component", + "body": [ + "class ${1:$TM_FILENAME_BASE} extends uvm_component;", + "\t$2", + "\t", + "\t`uvm_component_utils(${1:$TM_FILENAME_BASE});\n", + "\tfunction new(string name = \"${1:$TM_FILENAME_BASE}\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction\n", + "\t$0", + "endclass" + ], + "description": "UVM component class template" + }, + + "uvm_component_with_parameters": { + "prefix": "uvm_component_with_parameters", + "body": [ + "class ${1:$TM_FILENAME_BASE} #(${2:parameters}) extends uvm_component;", + "\ttypedef $1 #(${2/(\\b(parameter|type)\\s+([A-Za-z_][A-Za-z0-9_$]*)(\\s*=\\s*([A-Za-z0-9_$]+))?)*\\b/$3/g}) this_type_t;", + "\t`uvm_component_param_utils(this_type_t);\n", + "\t${4:config_obj_t} config_obj;\n\n", + "\tfunction new(string name = \"$1\", uvm_component parent);", + "\t\tsuper.new(name, parent);", + "\tendfunction: new\n", + "\t$0", + "endclass: $1\n" + ], + "description": "UVM parametrized component class template" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/verilog.json b/dot_vim/plugged/friendly-snippets/snippets/verilog.json new file mode 100644 index 0000000..2e67e2a --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/verilog.json @@ -0,0 +1,114 @@ +{ + "if": { + "prefix": "if", + "body": ["if (${1}) begin", "\n${0}", "\nend"], + "description": "If statement" + }, + "if-else": { + "prefix": "ife", + "body": [ + "if (${1}) begin", + "\n\t${2}", + "\nend", + "\nelse begin", + "\n\t${3}", + "\nend" + ], + "description": "If-else statement" + }, + "else-if": { + "prefix": "eif", + "body": ["else if (${1}) begin", "\n${0}", "\nend"], + "description": "else-if statement" + }, + "else": { + "prefix": "el", + "body": ["else begin", "\n${0}", "\nend"], + "description": "else-if statement" + }, + "while": { + "prefix": "wh", + "body": ["whlie (${1}) begin\n\t${0}\nend"], + "description": "While loop" + }, + "repeat loop": { + "prefix": "repeat (${1}) begin", + "body": ["repeat (${1}) begin\n\t${0}\nend"], + "description": "Repeat loop" + }, + "case statement": { + "prefix": "case", + "body": [ + "case (${1:variable})\n\t${2: value}: begin\n\t\t${3}\n\tend\ndefault: begin\n\t${4}\n", + "end", + "endcase" + ], + "description": "Case Statement" + }, + "casez statement": { + "prefix": "casez", + "body": [ + "casez (${1:variable})\n\t${2: value}: begin\n\t\t${3}\n\tend\ndefault: begin\n\t${4}\n", + "end", + "endcase" + ], + "description": "Casez Statement" + }, + "always block": { + "prefix": "al", + "body": ["always @(${1:Sensitive list}) begin\n", "\t${0}", "\nend"], + "description": "Always block" + }, + "module block": { + "prefix": "modu", + "body": ["module ${1:FILENAME} (\n\t${2}\n);", "\t${0}", "\nendmodule"], + "description": "Module Block" + }, + "for": { + "prefix": "for", + "body": [ + "for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) begin", + "\n\t${4}", + "\nend" + ], + "description": "For loop" + }, + "forever": { + "prefix": "forev", + "body": ["forever begin\n\t${0}\nend"], + "description": "Forever loop" + }, + "function": { + "prefix": "fun", + "body": [ + "function ${1:void} ${2:name}(${3});", + "\n\t${0}", + "endfunction: $2" + ], + "description": "Function snippet" + }, + "task": { + "prefix": "task", + "body": ["task ${1:name}(${2});", "\n\t${0}", "\nendtask: $1"], + "description": "Task snippet" + }, + "Initial Begin": { + "prefix": "ini", + "body": ["initial begin\n\t${0}\nend"], + "description": "Initial Begin" + }, + "typedef struct packed": { + "prefix": "tdsp", + "body": ["typedef struct packed {", "\n\tint ${2:data};", "\n${1:name}"], + "description": "Typedef struct packed" + }, + "typedef enum": { + "prefix": "tde", + "body": [ + "typedef enum ${2:logic[15:0]} \n{", + "\n${3:REG = 16'h0000}", + "\n} ${1:my_dest_t};" + ], + "description": "Typedef enum" + } +} diff --git a/dot_vim/plugged/friendly-snippets/snippets/vhdl.json b/dot_vim/plugged/friendly-snippets/snippets/vhdl.json new file mode 100644 index 0000000..f019fb8 --- /dev/null +++ b/dot_vim/plugged/friendly-snippets/snippets/vhdl.json @@ -0,0 +1,249 @@ +{ + "ieee_imports": { + "prefix": "ieee", + "description": "IEEE Standard Packages", + "body": [ + "library IEEE;", + "use IEEE.std_logic_1164.all;", + "use IEEE.numeric_std.all;" + ] + }, + "entity_declaration": { + "prefix": "ent", + "description": "Entity Declaration", + "body": [ + "entity ${1:$TM_FILENAME_BASE} is", + "\tport (", + "\t\t$0", + "\t);", + "end entity ${1:$TM_FILENAME_BASE};" + ] + }, + "architecture_declaration": { + "prefix": "arch", + "description": "Architecture Declaration", + "body": [ + "architecture ${1:rtl} of ${2:$TM_FILENAME_BASE} is", + "\t", + "begin", + "\t", + "\t$0", + "\t", + "end architecture ${1:rtl};" + ] + }, + "configuration_declaration": { + "prefix": "conf", + "description": "Configuration Declaration", + "body": [ + "configuration ${1:rtl} of ${2:$TM_FILENAME_BASE} is", + "\t", + "\t$0", + "\t", + "end configuration ${1:rtl};" + ] + }, + "package_declaration": { + "prefix": "pack", + "description": "Package Declaration", + "body": [ + "package ${1:$TM_FILENAME_BASE} is", + "\t", + "\t$0", + "\t", + "end package ${1:$TM_FILENAME_BASE};" + ] + }, + "package_body_declaration": { + "prefix": "pack", + "description": "Package Body Declaration", + "body": [ + "package body ${1:$TM_FILENAME_BASE} is", + "\t", + "\t$0", + "\t", + "end package body ${1:$TM_FILENAME_BASE};" + ] + }, + "case": { + "prefix": "case", + "description": "Case Statement", + "body": [ + "case ${1:expression} is", + "\twhen ${2:choice} =>", + "\t\t$0", + "", + "\twhen others =>", + "\t\t", + "", + "end case;" + ] + }, + "case_generate": { + "prefix": "case", + "description": "Case Generate Statement", + "body": [ + "${1:generate_label}: case ${2:expression} generate", + "\twhen ${3:choice} =>", + "\t\t$0", + "", + "\twhen others =>", + "\t\tnull;", + "", + "end generate $1;" + ] + }, + "if": { + "prefix": "if", + "description": "If Statement", + "body": [ + "if ${1:condition} then", + "\t$0", + "end if;" + ] + }, + "if_generate": { + "prefix": "if", + "description": "If Generate Statement", + "body": [ + "${1:generate_label}: if ${2:condition} generate", + "\t$0", + "end generate $1;" + ] + }, + "for": { + "prefix": "for", + "description": "For Loop", + "body": [ + "for ${1:loop_var} in ${2:range} loop", + "\t$0", + "end loop;" + ] + }, + "for_generate": { + "prefix": "for", + "description": "For Generate", + "body": [ + "${1:generate_label}: for ${2:iteration} generate", + "\t$0", + "end generate $1;" + ] + }, + "assert": { + "prefix": "assert", + "description": "Assertion", + "body": [ + "assert ${1:neg_condition} report ${2:message} severity ${3|note,warning,error,failure|};" + ] + }, + "enumeration_type": { + "prefix": "typeenum", + "description": "Enumeration type declaration", + "body": [ + "type ${1:type_name} is (${0});" + ] + }, + "array_type": { + "prefix": "typearray", + "description": "Array type declaration", + "body": [ + "type ${1:type_name} is array (${2:range}) of ${3:element_type};" + ] + }, + "record_type": { + "prefix": "typerecord", + "description": "Record type declaration", + "body": [ + "type ${1:type_name} is record", + "\t${0}", + "end record ${1:type_name};" + ] + }, + "subtype": { + "prefix": "subt", + "description": "Subtype declaration", + "body": [ + "subtype ${1:subtype_name} is ${2:base_type} range ${3:0} ${4|to,downto|} ${5:7};" + ] + }, + "testbench_process": { + "prefix": "tproc, processt", + "description": "Testbench Process (No Sensitivity List)", + "body": [ + "${1:proc_name}: process", + "begin", + "\t$0", + "end process $1;" + ] + }, + "combinational_process": { + "prefix": "cproc, processc", + "description": "Combinational Process", + "body": [ + "${1:proc_name}: process(${2:sensitivity_list})", + "begin", + "\t$0", + "end process $1;" + ] + }, + "asynchronous_reset_clocked_process": { + "prefix": "aproc, processa", + "description": "Clocked Process (Asynchronous Reset)", + "body": [ + "${1:proc_name}: process(${3:clk}, ${4:rst})", + "begin", + "\tif ${4:rst} = ${5:rst_val} then", + "\t\t$0", + "\telsif ${2|rising_edge,falling_edge|}(${3:clk}) then", + "\t\t", + "\tend if;", + "end process $1;" + ] + }, + "synchronous_reset_clocked_process": { + "prefix": "sproc, processs", + "description": "Clocked Process (Synchronous Reset)", + "body": [ + "${1:proc_name}: process(${3:clk})", + "begin", + "\tif ${2|rising_edge,falling_edge|}(${3:clk}) then", + "\t\tif ${4:rst} = ${5:rst_val} then", + "\t\t\t$0", + "\t\telse", + "\t\t\t", + "\t\tend if;", + "\tend if;", + "end process $1;" + ] + }, + "std_logic_vector": { + "prefix": "std", + "description": "std_logic_vector Type", + "body": "std_logic_vector(${1:7} ${2|downto,to|} ${3:0})" + }, + "std_ulogic_vector": { + "prefix": "stdu", + "description": "std_ulogic_vector Type", + "body": "std_ulogic_vector(${1:7} ${2|downto,to|} ${3:0})" + }, + "signed": { + "prefix": "si", + "description": "signed Type", + "body": "signed(${1:7} ${2|downto,to|} ${3:0})" + }, + "unsigned": { + "prefix": "uns", + "description": "unsigned Type", + "body": "unsigned(${1:7} ${2|downto,to|} ${3:0})" + }, + "zeroes": { + "prefix": "oth", + "description": "Zero Others", + "body": "others => '0'" + }, + "integer_range_limitation": { + "prefix": "intr", + "description": "Integer (Range Limitation)", + "body": "integer range ${1:0} ${2|downto,to|} ${3:255}" + } +} diff --git a/dot_vim/plugged/gruvbox/CHANGELOG.md b/dot_vim/plugged/gruvbox/CHANGELOG.md new file mode 100644 index 0000000..90fd3a2 --- /dev/null +++ b/dot_vim/plugged/gruvbox/CHANGELOG.md @@ -0,0 +1,117 @@ +# Change Log + +## [Unreleased](https://github.com/morhetz/gruvbox/tree/HEAD) + +[Full Changelog](https://github.com/morhetz/gruvbox/compare/v1.3.5...HEAD) + +**Fixed bugs:** + +- Lighter background on terminal [\#8](https://github.com/morhetz/gruvbox/issues/8) + +**Closed issues:** + +- Installation issue. [\#54](https://github.com/morhetz/gruvbox/issues/54) + +- Italic font in terminal\(urxvt\) [\#49](https://github.com/morhetz/gruvbox/issues/49) + +- Unable to log in when sourcing the palette shellscript [\#48](https://github.com/morhetz/gruvbox/issues/48) + +- How can i modify multiple comment scheme [\#46](https://github.com/morhetz/gruvbox/issues/46) + +- Remove comment highlight in iterm [\#44](https://github.com/morhetz/gruvbox/issues/44) + +- Comments looking strange withing tmux [\#43](https://github.com/morhetz/gruvbox/issues/43) + +- comments are reverse-video in xterm [\#41](https://github.com/morhetz/gruvbox/issues/41) + +- What font are you using in the screenshots? [\#39](https://github.com/morhetz/gruvbox/issues/39) + +- vim-signature crashes when I use gruvbox [\#38](https://github.com/morhetz/gruvbox/issues/38) + +- Color of statusbar in inactive windows [\#37](https://github.com/morhetz/gruvbox/issues/37) + +- Go method and struct highlighting missing [\#36](https://github.com/morhetz/gruvbox/issues/36) + +- gruvbox\_256palette.sh doesn't work for Konsole [\#35](https://github.com/morhetz/gruvbox/issues/35) + +- Contrast in jekyll markdown files [\#33](https://github.com/morhetz/gruvbox/issues/33) + +- Pentadactyl Gruvbox Theme [\#32](https://github.com/morhetz/gruvbox/issues/32) + +- make vertsplit better [\#31](https://github.com/morhetz/gruvbox/issues/31) + +- Console support. [\#30](https://github.com/morhetz/gruvbox/issues/30) + +- How can I change the background color? [\#29](https://github.com/morhetz/gruvbox/issues/29) + +- Some words are not bold [\#28](https://github.com/morhetz/gruvbox/issues/28) + +- Terminal theme on base gruvbox [\#25](https://github.com/morhetz/gruvbox/issues/25) + +- Markdown has inverted colors when using \* [\#24](https://github.com/morhetz/gruvbox/issues/24) + +- how install it on mac osx [\#23](https://github.com/morhetz/gruvbox/issues/23) + +- Comments color for Terminal Vim [\#22](https://github.com/morhetz/gruvbox/issues/22) + +- Move palette files to gruvbox-generalized [\#20](https://github.com/morhetz/gruvbox/issues/20) + +- Maybe add Gruvbox Airline theme? [\#19](https://github.com/morhetz/gruvbox/issues/19) + +- For Sublime text [\#18](https://github.com/morhetz/gruvbox/issues/18) + +**Merged pull requests:** + +- Fix the 256 palette script failed login issue [\#53](https://github.com/morhetz/gruvbox/pull/53) ([jonasmalacofilho](https://github.com/jonasmalacofilho)) + +- add minimal coloring for gitcommit highlighting [\#52](https://github.com/morhetz/gruvbox/pull/52) ([daniely](https://github.com/daniely)) + +- For terminals, turn off italics by default. [\#47](https://github.com/morhetz/gruvbox/pull/47) ([ryanmjacobs](https://github.com/ryanmjacobs)) + +- Change color of vertical/horizontal seperators between split windows [\#45](https://github.com/morhetz/gruvbox/pull/45) ([deshtop](https://github.com/deshtop)) + +- Improve gruvbox with C code [\#34](https://github.com/morhetz/gruvbox/pull/34) ([gladiac](https://github.com/gladiac)) + +- Fix for linux console [\#27](https://github.com/morhetz/gruvbox/pull/27) ([vyp](https://github.com/vyp)) + +- Colors for plugin vimshell.vim [\#21](https://github.com/morhetz/gruvbox/pull/21) ([joelmo](https://github.com/joelmo)) + +## [v1.3.5](https://github.com/morhetz/gruvbox/tree/v1.3.5) (2014-03-19) + +[Full Changelog](https://github.com/morhetz/gruvbox/compare/v0.0.8...v1.3.5) + +**Implemented enhancements:** + +- Better selection colors [\#15](https://github.com/morhetz/gruvbox/issues/15) + +- When hlsearch is on, the cursor inverts the search color and not visible [\#2](https://github.com/morhetz/gruvbox/issues/2) + +**Fixed bugs:** + +- Problem with changing between dark and light on 256 color terminal [\#7](https://github.com/morhetz/gruvbox/issues/7) + +- IndentGuides coloring doesn't show up [\#1](https://github.com/morhetz/gruvbox/issues/1) + +**Closed issues:** + +- Requesting rxvt-unicode theme [\#17](https://github.com/morhetz/gruvbox/issues/17) + +- gruvbox\_256palette.sh gets reset \(gnome-terminal on Ubuntu\) [\#13](https://github.com/morhetz/gruvbox/issues/13) + +- Powerline colors [\#12](https://github.com/morhetz/gruvbox/issues/12) + +- Info necessary for making a port of this colorscheme [\#10](https://github.com/morhetz/gruvbox/issues/10) + +**Merged pull requests:** + +- Fix GNU screen detection for \*-bce [\#16](https://github.com/morhetz/gruvbox/pull/16) ([blueyed](https://github.com/blueyed)) + +- Added iTerm2 dark theme [\#11](https://github.com/morhetz/gruvbox/pull/11) ([Greduan](https://github.com/Greduan)) + +- Fix typo in Readme [\#5](https://github.com/morhetz/gruvbox/pull/5) ([ViViDboarder](https://github.com/ViViDboarder)) + +## [v0.0.8](https://github.com/morhetz/gruvbox/tree/v0.0.8) (2012-12-08) + + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/dot_vim/plugged/gruvbox/README.md b/dot_vim/plugged/gruvbox/README.md new file mode 100644 index 0000000..eca249c --- /dev/null +++ b/dot_vim/plugged/gruvbox/README.md @@ -0,0 +1,113 @@ + + +gruvbox is heavily inspired by [badwolf][], [jellybeans][] and [solarized][]. + +Designed as a bright theme with pastel 'retro groove' colors and light/dark mode switching in the way of [solarized][]. The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes. + + [badwolf]: https://github.com/sjl/badwolf + [jellybeans]: https://github.com/nanotech/jellybeans.vim + [solarized]: http://ethanschoonover.com/solarized + +Attention +--------- + +1. [Read this first](https://github.com/morhetz/gruvbox/wiki/Terminal-specific) +2. Typeface from gallery is [Fantasque Sans Mono](https://github.com/belluzj/fantasque-sans) +3. Typeface from screenshots below is [Fira Mono](https://mozilla.github.io/Fira/) + +Screenshots +----------- + +Refer [Gallery][] for more syntax-specific screenshots. + + [Gallery]: https://github.com/morhetz/gruvbox/wiki/Gallery + +### Dark mode + +![Screenshot Dark](http://i.imgur.com/GkIl8Fn.png) + +### Light mode + +![Screenshot Light](http://i.imgur.com/X75niEa.png) + +### Airline theme + +![Screenshot Airline](http://i.imgur.com/wRQceUR.png) + +Palette +------- + +### Dark mode + +![Palette Dark](http://i.imgur.com/wa666xg.png) + +### Light mode + +![Palette Light](http://i.imgur.com/49qKyYW.png) + +Contrast options +---------------- + +Refer [wiki section][] for contrast configuration and other options. + + [wiki section]: https://github.com/morhetz/gruvbox/wiki/Configuration#ggruvbox_contrast_dark + +![Contrast Options](http://i.imgur.com/5MSbe6T.png) + +Documentation +------------- + +Please check [wiki][] for installation details, terminal-specific setup, troubleshooting, configuration options and others. + + [wiki]: https://github.com/morhetz/gruvbox/wiki + +Features +-------- + +* Lots of style-customization options (contrast, color invertion, italics usage etc.) +* Extended filetype highlighting: Html, Xml, Vim, Clojure, C, Python, JavaScript, TypeScript, PureScript, CoffeeScript, Ruby, Objective-C, Go, Lua, MoonScript, Java, Markdown, Haskell, Elixir +* Supported plugins: [EasyMotion][], [vim-sneak][], [Indent Guides][], [indentLine][], [Rainbow Parentheses][], [Airline][], [Lightline][], [GitGutter][], [Signify][], [ShowMarks][], [Signature][], [Syntastic][], [Ale][], [CtrlP][], [Startify][], [NERDTree][], [Dirvish][] + + [EasyMotion]: https://github.com/Lokaltog/vim-easymotion + [vim-sneak]: https://github.com/justinmk/vim-sneak + [Indent Guides]: https://github.com/nathanaelkane/vim-indent-guides + [indentLine]: https://github.com/Yggdroot/indentLine + [Rainbow Parentheses]: https://github.com/kien/rainbow_parentheses.vim + [Airline]: https://github.com/bling/vim-airline + [Lightline]: https://github.com/itchyny/lightline.vim + [GitGutter]: https://github.com/airblade/vim-gitgutter + [Signify]: https://github.com/mhinz/vim-signify + [ShowMarks]: http://www.vim.org/scripts/script.php?script_id=152 + [Signature]: https://github.com/kshenoy/vim-signature + [Syntastic]: https://github.com/scrooloose/syntastic + [Ale]: https://github.com/w0rp/ale + [CtrlP]: https://github.com/kien/ctrlp.vim + [Startify]: https://github.com/mhinz/vim-startify + [NERDTree]: https://github.com/scrooloose/nerdtree + [Dirvish]: https://github.com/justinmk/vim-dirvish + +Contributions +------------- + +See [gruvbox-contrib][] repo for contributions, ports and extras. + +[gruvbox-contrib]: https://github.com/morhetz/gruvbox-contrib + +ToDo +---- + +* Filetype syntax highlighting (R, TeX, Swift, Erlang) +* Plugin support (Tagbar, VimPlug) + +Self-Promotion +-------------- + +If you like gruvbox follow the repository on +[GitHub](https://github.com/morhetz/gruvbox) and vote for it on +[vim.org](http://www.vim.org/scripts/script.php?script_id=4349). + +License +------- +[MIT/X11][] + + [MIT/X11]: https://en.wikipedia.org/wiki/MIT_License diff --git a/dot_vim/plugged/gruvbox/autoload/airline/themes/gruvbox.vim b/dot_vim/plugged/gruvbox/autoload/airline/themes/gruvbox.vim new file mode 100644 index 0000000..6862a81 --- /dev/null +++ b/dot_vim/plugged/gruvbox/autoload/airline/themes/gruvbox.vim @@ -0,0 +1,79 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Retro groove color scheme for Airline +" Author: morhetz +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 12 Aug 2017 +" ----------------------------------------------------------------------------- + +let g:airline#themes#gruvbox#palette = {} + +function! airline#themes#gruvbox#refresh() + + let M0 = airline#themes#get_highlight('Identifier') + let accents_group = airline#themes#get_highlight('Special') + let modified_group = [M0[0], '', M0[2], '', ''] + let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg']) + let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg']) + + let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg']) + let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg']) + let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg']) + let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group } + let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group + let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group + let g:airline#themes#gruvbox#palette.normal.airline_error = error_group + let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group + + let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg']) + let s:I2 = s:N2 + let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg']) + let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified + let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning + let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning + let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error + let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error + + let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg']) + let s:R2 = s:I2 + let s:R3 = s:I3 + let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified + let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning + let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning + let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error + let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error + + let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg']) + let s:V2 = s:N2 + let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg']) + let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] } + let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning + let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning + let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error + let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error + + let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg']) + let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group } + + let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group } + + let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg']) + let g:airline#themes#gruvbox#palette.tabline = { + \ 'airline_tab': s:N2, + \ 'airline_tabsel': s:N1, + \ 'airline_tabtype': s:V1, + \ 'airline_tabfill': s:TF, + \ 'airline_tabhid': s:IA, + \ 'airline_tabmod': s:I1 + \ } + +endfunction + +call airline#themes#gruvbox#refresh() + +" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: diff --git a/dot_vim/plugged/gruvbox/autoload/gruvbox.vim b/dot_vim/plugged/gruvbox/autoload/gruvbox.vim new file mode 100644 index 0000000..44bec6e --- /dev/null +++ b/dot_vim/plugged/gruvbox/autoload/gruvbox.vim @@ -0,0 +1,41 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Retro groove color scheme for Vim +" Author: morhetz +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 09 Apr 2014 +" ----------------------------------------------------------------------------- + +function! gruvbox#invert_signs_toggle() + if g:gruvbox_invert_signs == 0 + let g:gruvbox_invert_signs=1 + else + let g:gruvbox_invert_signs=0 + endif + + colorscheme gruvbox +endfunction + +" Search Highlighting {{{ + +function! gruvbox#hls_show() + set hlsearch + call GruvboxHlsShowCursor() +endfunction + +function! gruvbox#hls_hide() + set nohlsearch + call GruvboxHlsHideCursor() +endfunction + +function! gruvbox#hls_toggle() + if &hlsearch + call gruvbox#hls_hide() + else + call gruvbox#hls_show() + endif +endfunction + +" }}} + +" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: diff --git a/dot_vim/plugged/gruvbox/autoload/lightline/colorscheme/gruvbox.vim b/dot_vim/plugged/gruvbox/autoload/lightline/colorscheme/gruvbox.vim new file mode 100644 index 0000000..4730c09 --- /dev/null +++ b/dot_vim/plugged/gruvbox/autoload/lightline/colorscheme/gruvbox.vim @@ -0,0 +1,57 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim) +" Author: gmoe +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 20 Sep 2017 +" ----------------------------------------------------------------------------- + +function! s:getGruvColor(group) + let guiColor = synIDattr(hlID(a:group), "fg", "gui") + let termColor = synIDattr(hlID(a:group), "fg", "cterm") + return [ guiColor, termColor ] +endfunction + +if exists('g:lightline') + + let s:bg0 = s:getGruvColor('GruvboxBg0') + let s:bg1 = s:getGruvColor('GruvboxBg1') + let s:bg2 = s:getGruvColor('GruvboxBg2') + let s:bg4 = s:getGruvColor('GruvboxBg4') + let s:fg1 = s:getGruvColor('GruvboxFg1') + let s:fg4 = s:getGruvColor('GruvboxFg4') + + let s:yellow = s:getGruvColor('GruvboxYellow') + let s:blue = s:getGruvColor('GruvboxBlue') + let s:aqua = s:getGruvColor('GruvboxAqua') + let s:orange = s:getGruvColor('GruvboxOrange') + let s:green = s:getGruvColor('GruvboxGreen') + + let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}} + let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ] + let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ] + let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ] + let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ] + let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ] + let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ] + let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ] + let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ] + let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ] + let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ] + let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ] + let s:p.tabline.right = [ [ s:bg0, s:orange ] ] + let s:p.normal.error = [ [ s:bg0, s:orange ] ] + let s:p.normal.warning = [ [ s:bg2, s:yellow ] ] + + let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p) +endif diff --git a/dot_vim/plugged/gruvbox/colors/gruvbox.vim b/dot_vim/plugged/gruvbox/colors/gruvbox.vim new file mode 100644 index 0000000..66246fb --- /dev/null +++ b/dot_vim/plugged/gruvbox/colors/gruvbox.vim @@ -0,0 +1,1418 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Retro groove color scheme for Vim +" Author: morhetz +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 12 Aug 2017 +" ----------------------------------------------------------------------------- + +" Supporting code ------------------------------------------------------------- +" Initialisation: {{{ + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let g:colors_name='gruvbox' + +if !(has('termguicolors') && &termguicolors) && !has('gui_running') && &t_Co != 256 + finish +endif + +" }}} +" Global Settings: {{{ + +if !exists('g:gruvbox_bold') + let g:gruvbox_bold=1 +endif +if !exists('g:gruvbox_italic') + if has('gui_running') || $TERM_ITALICS == 'true' + let g:gruvbox_italic=1 + else + let g:gruvbox_italic=0 + endif +endif +if !exists('g:gruvbox_undercurl') + let g:gruvbox_undercurl=1 +endif +if !exists('g:gruvbox_underline') + let g:gruvbox_underline=1 +endif +if !exists('g:gruvbox_inverse') + let g:gruvbox_inverse=1 +endif + +if !exists('g:gruvbox_guisp_fallback') || index(['fg', 'bg'], g:gruvbox_guisp_fallback) == -1 + let g:gruvbox_guisp_fallback='NONE' +endif + +if !exists('g:gruvbox_improved_strings') + let g:gruvbox_improved_strings=0 +endif + +if !exists('g:gruvbox_improved_warnings') + let g:gruvbox_improved_warnings=0 +endif + +if !exists('g:gruvbox_termcolors') + let g:gruvbox_termcolors=256 +endif + +if !exists('g:gruvbox_invert_indent_guides') + let g:gruvbox_invert_indent_guides=0 +endif + +if exists('g:gruvbox_contrast') + echo 'g:gruvbox_contrast is deprecated; use g:gruvbox_contrast_light and g:gruvbox_contrast_dark instead' +endif + +if !exists('g:gruvbox_contrast_dark') + let g:gruvbox_contrast_dark='medium' +endif + +if !exists('g:gruvbox_contrast_light') + let g:gruvbox_contrast_light='medium' +endif + +let s:is_dark=(&background == 'dark') + +" }}} +" Palette: {{{ + +" setup palette dictionary +let s:gb = {} + +" fill it with absolute colors +let s:gb.dark0_hard = ['#1d2021', 234] " 29-32-33 +let s:gb.dark0 = ['#282828', 235] " 40-40-40 +let s:gb.dark0_soft = ['#32302f', 236] " 50-48-47 +let s:gb.dark1 = ['#3c3836', 237] " 60-56-54 +let s:gb.dark2 = ['#504945', 239] " 80-73-69 +let s:gb.dark3 = ['#665c54', 241] " 102-92-84 +let s:gb.dark4 = ['#7c6f64', 243] " 124-111-100 +let s:gb.dark4_256 = ['#7c6f64', 243] " 124-111-100 + +let s:gb.gray_245 = ['#928374', 245] " 146-131-116 +let s:gb.gray_244 = ['#928374', 244] " 146-131-116 + +let s:gb.light0_hard = ['#f9f5d7', 230] " 249-245-215 +let s:gb.light0 = ['#fbf1c7', 229] " 253-244-193 +let s:gb.light0_soft = ['#f2e5bc', 228] " 242-229-188 +let s:gb.light1 = ['#ebdbb2', 223] " 235-219-178 +let s:gb.light2 = ['#d5c4a1', 250] " 213-196-161 +let s:gb.light3 = ['#bdae93', 248] " 189-174-147 +let s:gb.light4 = ['#a89984', 246] " 168-153-132 +let s:gb.light4_256 = ['#a89984', 246] " 168-153-132 + +let s:gb.bright_red = ['#fb4934', 167] " 251-73-52 +let s:gb.bright_green = ['#b8bb26', 142] " 184-187-38 +let s:gb.bright_yellow = ['#fabd2f', 214] " 250-189-47 +let s:gb.bright_blue = ['#83a598', 109] " 131-165-152 +let s:gb.bright_purple = ['#d3869b', 175] " 211-134-155 +let s:gb.bright_aqua = ['#8ec07c', 108] " 142-192-124 +let s:gb.bright_orange = ['#fe8019', 208] " 254-128-25 + +let s:gb.neutral_red = ['#cc241d', 124] " 204-36-29 +let s:gb.neutral_green = ['#98971a', 106] " 152-151-26 +let s:gb.neutral_yellow = ['#d79921', 172] " 215-153-33 +let s:gb.neutral_blue = ['#458588', 66] " 69-133-136 +let s:gb.neutral_purple = ['#b16286', 132] " 177-98-134 +let s:gb.neutral_aqua = ['#689d6a', 72] " 104-157-106 +let s:gb.neutral_orange = ['#d65d0e', 166] " 214-93-14 + +let s:gb.faded_red = ['#9d0006', 88] " 157-0-6 +let s:gb.faded_green = ['#79740e', 100] " 121-116-14 +let s:gb.faded_yellow = ['#b57614', 136] " 181-118-20 +let s:gb.faded_blue = ['#076678', 24] " 7-102-120 +let s:gb.faded_purple = ['#8f3f71', 96] " 143-63-113 +let s:gb.faded_aqua = ['#427b58', 66] " 66-123-88 +let s:gb.faded_orange = ['#af3a03', 130] " 175-58-3 + +" }}} +" Setup Emphasis: {{{ + +let s:bold = 'bold,' +if g:gruvbox_bold == 0 + let s:bold = '' +endif + +let s:italic = 'italic,' +if g:gruvbox_italic == 0 + let s:italic = '' +endif + +let s:underline = 'underline,' +if g:gruvbox_underline == 0 + let s:underline = '' +endif + +let s:undercurl = 'undercurl,' +if g:gruvbox_undercurl == 0 + let s:undercurl = '' +endif + +let s:inverse = 'inverse,' +if g:gruvbox_inverse == 0 + let s:inverse = '' +endif + +" }}} +" Setup Colors: {{{ + +let s:vim_bg = ['bg', 'bg'] +let s:vim_fg = ['fg', 'fg'] +let s:none = ['NONE', 'NONE'] + +" determine relative colors +if s:is_dark + let s:bg0 = s:gb.dark0 + if g:gruvbox_contrast_dark == 'soft' + let s:bg0 = s:gb.dark0_soft + elseif g:gruvbox_contrast_dark == 'hard' + let s:bg0 = s:gb.dark0_hard + endif + + let s:bg1 = s:gb.dark1 + let s:bg2 = s:gb.dark2 + let s:bg3 = s:gb.dark3 + let s:bg4 = s:gb.dark4 + + let s:gray = s:gb.gray_245 + + let s:fg0 = s:gb.light0 + let s:fg1 = s:gb.light1 + let s:fg2 = s:gb.light2 + let s:fg3 = s:gb.light3 + let s:fg4 = s:gb.light4 + + let s:fg4_256 = s:gb.light4_256 + + let s:red = s:gb.bright_red + let s:green = s:gb.bright_green + let s:yellow = s:gb.bright_yellow + let s:blue = s:gb.bright_blue + let s:purple = s:gb.bright_purple + let s:aqua = s:gb.bright_aqua + let s:orange = s:gb.bright_orange +else + let s:bg0 = s:gb.light0 + if g:gruvbox_contrast_light == 'soft' + let s:bg0 = s:gb.light0_soft + elseif g:gruvbox_contrast_light == 'hard' + let s:bg0 = s:gb.light0_hard + endif + + let s:bg1 = s:gb.light1 + let s:bg2 = s:gb.light2 + let s:bg3 = s:gb.light3 + let s:bg4 = s:gb.light4 + + let s:gray = s:gb.gray_244 + + let s:fg0 = s:gb.dark0 + let s:fg1 = s:gb.dark1 + let s:fg2 = s:gb.dark2 + let s:fg3 = s:gb.dark3 + let s:fg4 = s:gb.dark4 + + let s:fg4_256 = s:gb.dark4_256 + + let s:red = s:gb.faded_red + let s:green = s:gb.faded_green + let s:yellow = s:gb.faded_yellow + let s:blue = s:gb.faded_blue + let s:purple = s:gb.faded_purple + let s:aqua = s:gb.faded_aqua + let s:orange = s:gb.faded_orange +endif + +" reset to 16 colors fallback +if g:gruvbox_termcolors == 16 + let s:bg0[1] = 0 + let s:fg4[1] = 7 + let s:gray[1] = 8 + let s:red[1] = 9 + let s:green[1] = 10 + let s:yellow[1] = 11 + let s:blue[1] = 12 + let s:purple[1] = 13 + let s:aqua[1] = 14 + let s:fg1[1] = 15 +endif + +" save current relative colors back to palette dictionary +let s:gb.bg0 = s:bg0 +let s:gb.bg1 = s:bg1 +let s:gb.bg2 = s:bg2 +let s:gb.bg3 = s:bg3 +let s:gb.bg4 = s:bg4 + +let s:gb.gray = s:gray + +let s:gb.fg0 = s:fg0 +let s:gb.fg1 = s:fg1 +let s:gb.fg2 = s:fg2 +let s:gb.fg3 = s:fg3 +let s:gb.fg4 = s:fg4 + +let s:gb.fg4_256 = s:fg4_256 + +let s:gb.red = s:red +let s:gb.green = s:green +let s:gb.yellow = s:yellow +let s:gb.blue = s:blue +let s:gb.purple = s:purple +let s:gb.aqua = s:aqua +let s:gb.orange = s:orange + +" }}} +" Setup Terminal Colors For Neovim: {{{ + +if has('nvim') + let g:terminal_color_0 = s:bg0[0] + let g:terminal_color_8 = s:gray[0] + + let g:terminal_color_1 = s:gb.neutral_red[0] + let g:terminal_color_9 = s:red[0] + + let g:terminal_color_2 = s:gb.neutral_green[0] + let g:terminal_color_10 = s:green[0] + + let g:terminal_color_3 = s:gb.neutral_yellow[0] + let g:terminal_color_11 = s:yellow[0] + + let g:terminal_color_4 = s:gb.neutral_blue[0] + let g:terminal_color_12 = s:blue[0] + + let g:terminal_color_5 = s:gb.neutral_purple[0] + let g:terminal_color_13 = s:purple[0] + + let g:terminal_color_6 = s:gb.neutral_aqua[0] + let g:terminal_color_14 = s:aqua[0] + + let g:terminal_color_7 = s:fg4[0] + let g:terminal_color_15 = s:fg1[0] +endif + +" }}} +" Overload Setting: {{{ + +let s:hls_cursor = s:orange +if exists('g:gruvbox_hls_cursor') + let s:hls_cursor = get(s:gb, g:gruvbox_hls_cursor) +endif + +let s:number_column = s:none +if exists('g:gruvbox_number_column') + let s:number_column = get(s:gb, g:gruvbox_number_column) +endif + +let s:sign_column = s:bg1 + +if exists('g:gitgutter_override_sign_column_highlight') && + \ g:gitgutter_override_sign_column_highlight == 1 + let s:sign_column = s:number_column +else + let g:gitgutter_override_sign_column_highlight = 0 + + if exists('g:gruvbox_sign_column') + let s:sign_column = get(s:gb, g:gruvbox_sign_column) + endif +endif + +let s:color_column = s:bg1 +if exists('g:gruvbox_color_column') + let s:color_column = get(s:gb, g:gruvbox_color_column) +endif + +let s:vert_split = s:bg0 +if exists('g:gruvbox_vert_split') + let s:vert_split = get(s:gb, g:gruvbox_vert_split) +endif + +let s:invert_signs = '' +if exists('g:gruvbox_invert_signs') + if g:gruvbox_invert_signs == 1 + let s:invert_signs = s:inverse + endif +endif + +let s:invert_selection = s:inverse +if exists('g:gruvbox_invert_selection') + if g:gruvbox_invert_selection == 0 + let s:invert_selection = '' + endif +endif + +let s:invert_tabline = '' +if exists('g:gruvbox_invert_tabline') + if g:gruvbox_invert_tabline == 1 + let s:invert_tabline = s:inverse + endif +endif + +let s:italicize_comments = s:italic +if exists('g:gruvbox_italicize_comments') + if g:gruvbox_italicize_comments == 0 + let s:italicize_comments = '' + endif +endif + +let s:italicize_strings = '' +if exists('g:gruvbox_italicize_strings') + if g:gruvbox_italicize_strings == 1 + let s:italicize_strings = s:italic + endif +endif + +" }}} +" Highlighting Function: {{{ + +function! s:HL(group, fg, ...) + " Arguments: group, guifg, guibg, gui, guisp + + " foreground + let fg = a:fg + + " background + if a:0 >= 1 + let bg = a:1 + else + let bg = s:none + endif + + " emphasis + if a:0 >= 2 && strlen(a:2) + let emstr = a:2 + else + let emstr = 'NONE,' + endif + + " special fallback + if a:0 >= 3 + if g:gruvbox_guisp_fallback != 'NONE' + let fg = a:3 + endif + + " bg fallback mode should invert higlighting + if g:gruvbox_guisp_fallback == 'bg' + let emstr .= 'inverse,' + endif + endif + + let histring = [ 'hi', a:group, + \ 'guifg=' . fg[0], 'ctermfg=' . fg[1], + \ 'guibg=' . bg[0], 'ctermbg=' . bg[1], + \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2] + \ ] + + " special + if a:0 >= 3 + call add(histring, 'guisp=' . a:3[0]) + endif + + execute join(histring, ' ') +endfunction + +" }}} +" Gruvbox Hi Groups: {{{ + +" memoize common hi groups +call s:HL('GruvboxFg0', s:fg0) +call s:HL('GruvboxFg1', s:fg1) +call s:HL('GruvboxFg2', s:fg2) +call s:HL('GruvboxFg3', s:fg3) +call s:HL('GruvboxFg4', s:fg4) +call s:HL('GruvboxGray', s:gray) +call s:HL('GruvboxBg0', s:bg0) +call s:HL('GruvboxBg1', s:bg1) +call s:HL('GruvboxBg2', s:bg2) +call s:HL('GruvboxBg3', s:bg3) +call s:HL('GruvboxBg4', s:bg4) + +call s:HL('GruvboxRed', s:red) +call s:HL('GruvboxRedBold', s:red, s:none, s:bold) +call s:HL('GruvboxGreen', s:green) +call s:HL('GruvboxGreenBold', s:green, s:none, s:bold) +call s:HL('GruvboxYellow', s:yellow) +call s:HL('GruvboxYellowBold', s:yellow, s:none, s:bold) +call s:HL('GruvboxBlue', s:blue) +call s:HL('GruvboxBlueBold', s:blue, s:none, s:bold) +call s:HL('GruvboxPurple', s:purple) +call s:HL('GruvboxPurpleBold', s:purple, s:none, s:bold) +call s:HL('GruvboxAqua', s:aqua) +call s:HL('GruvboxAquaBold', s:aqua, s:none, s:bold) +call s:HL('GruvboxOrange', s:orange) +call s:HL('GruvboxOrangeBold', s:orange, s:none, s:bold) + +call s:HL('GruvboxRedSign', s:red, s:sign_column, s:invert_signs) +call s:HL('GruvboxGreenSign', s:green, s:sign_column, s:invert_signs) +call s:HL('GruvboxYellowSign', s:yellow, s:sign_column, s:invert_signs) +call s:HL('GruvboxBlueSign', s:blue, s:sign_column, s:invert_signs) +call s:HL('GruvboxPurpleSign', s:purple, s:sign_column, s:invert_signs) +call s:HL('GruvboxAquaSign', s:aqua, s:sign_column, s:invert_signs) +call s:HL('GruvboxOrangeSign', s:orange, s:sign_column, s:invert_signs) + +" }}} + +" Vanilla colorscheme --------------------------------------------------------- +" General UI: {{{ + +" Normal text +call s:HL('Normal', s:fg1, s:bg0) + +" Correct background (see issue #7): +" --- Problem with changing between dark and light on 256 color terminal +" --- https://github.com/morhetz/gruvbox/issues/7 +if s:is_dark + set background=dark +else + set background=light +endif + +if version >= 700 + " Screen line that the cursor is + call s:HL('CursorLine', s:none, s:bg1) + " Screen column that the cursor is + hi! link CursorColumn CursorLine + + " Tab pages line filler + call s:HL('TabLineFill', s:bg4, s:bg1, s:invert_tabline) + " Active tab page label + call s:HL('TabLineSel', s:green, s:bg1, s:invert_tabline) + " Not active tab page label + hi! link TabLine TabLineFill + + " Match paired bracket under the cursor + call s:HL('MatchParen', s:none, s:bg3, s:bold) +endif + +if version >= 703 + " Highlighted screen columns + call s:HL('ColorColumn', s:none, s:color_column) + + " Concealed element: \lambda → λ + call s:HL('Conceal', s:blue, s:none) + + " Line number of CursorLine + call s:HL('CursorLineNr', s:yellow, s:bg1) +endif + +hi! link NonText GruvboxBg2 +hi! link SpecialKey GruvboxBg2 + +call s:HL('Visual', s:none, s:bg3, s:invert_selection) +hi! link VisualNOS Visual + +call s:HL('Search', s:yellow, s:bg0, s:inverse) +call s:HL('IncSearch', s:hls_cursor, s:bg0, s:inverse) + +call s:HL('Underlined', s:blue, s:none, s:underline) + +call s:HL('StatusLine', s:bg2, s:fg1, s:inverse) +call s:HL('StatusLineNC', s:bg1, s:fg4, s:inverse) + +" The column separating vertically split windows +call s:HL('VertSplit', s:bg3, s:vert_split) + +" Current match in wildmenu completion +call s:HL('WildMenu', s:blue, s:bg2, s:bold) + +" Directory names, special names in listing +hi! link Directory GruvboxGreenBold + +" Titles for output from :set all, :autocmd, etc. +hi! link Title GruvboxGreenBold + +" Error messages on the command line +call s:HL('ErrorMsg', s:bg0, s:red, s:bold) +" More prompt: -- More -- +hi! link MoreMsg GruvboxYellowBold +" Current mode message: -- INSERT -- +hi! link ModeMsg GruvboxYellowBold +" 'Press enter' prompt and yes/no questions +hi! link Question GruvboxOrangeBold +" Warning messages +hi! link WarningMsg GruvboxRedBold + +" }}} +" Gutter: {{{ + +" Line number for :number and :# commands +call s:HL('LineNr', s:bg4, s:number_column) + +" Column where signs are displayed +call s:HL('SignColumn', s:none, s:sign_column) + +" Line used for closed folds +call s:HL('Folded', s:gray, s:bg1, s:italic) +" Column where folds are displayed +call s:HL('FoldColumn', s:gray, s:bg1) + +" }}} +" Cursor: {{{ + +" Character under cursor +call s:HL('Cursor', s:none, s:none, s:inverse) +" Visual mode cursor, selection +hi! link vCursor Cursor +" Input moder cursor +hi! link iCursor Cursor +" Language mapping cursor +hi! link lCursor Cursor + +" }}} +" Syntax Highlighting: {{{ + +if g:gruvbox_improved_strings == 0 + hi! link Special GruvboxOrange +else + call s:HL('Special', s:orange, s:bg1, s:italicize_strings) +endif + +call s:HL('Comment', s:gray, s:none, s:italicize_comments) +call s:HL('Todo', s:vim_fg, s:vim_bg, s:bold . s:italic) +call s:HL('Error', s:red, s:vim_bg, s:bold . s:inverse) + +" Generic statement +hi! link Statement GruvboxRed +" if, then, else, endif, swicth, etc. +hi! link Conditional GruvboxRed +" for, do, while, etc. +hi! link Repeat GruvboxRed +" case, default, etc. +hi! link Label GruvboxRed +" try, catch, throw +hi! link Exception GruvboxRed +" sizeof, "+", "*", etc. +hi! link Operator Normal +" Any other keyword +hi! link Keyword GruvboxRed + +" Variable name +hi! link Identifier GruvboxBlue +" Function name +hi! link Function GruvboxGreenBold + +" Generic preprocessor +hi! link PreProc GruvboxAqua +" Preprocessor #include +hi! link Include GruvboxAqua +" Preprocessor #define +hi! link Define GruvboxAqua +" Same as Define +hi! link Macro GruvboxAqua +" Preprocessor #if, #else, #endif, etc. +hi! link PreCondit GruvboxAqua + +" Generic constant +hi! link Constant GruvboxPurple +" Character constant: 'c', '/n' +hi! link Character GruvboxPurple +" String constant: "this is a string" +if g:gruvbox_improved_strings == 0 + call s:HL('String', s:green, s:none, s:italicize_strings) +else + call s:HL('String', s:fg1, s:bg1, s:italicize_strings) +endif +" Boolean constant: TRUE, false +hi! link Boolean GruvboxPurple +" Number constant: 234, 0xff +hi! link Number GruvboxPurple +" Floating point constant: 2.3e10 +hi! link Float GruvboxPurple + +" Generic type +hi! link Type GruvboxYellow +" static, register, volatile, etc +hi! link StorageClass GruvboxOrange +" struct, union, enum, etc. +hi! link Structure GruvboxAqua +" typedef +hi! link Typedef GruvboxYellow + +" }}} +" Completion Menu: {{{ + +if version >= 700 + " Popup menu: normal item + call s:HL('Pmenu', s:fg1, s:bg2) + " Popup menu: selected item + call s:HL('PmenuSel', s:bg2, s:blue, s:bold) + " Popup menu: scrollbar + call s:HL('PmenuSbar', s:none, s:bg2) + " Popup menu: scrollbar thumb + call s:HL('PmenuThumb', s:none, s:bg4) +endif + +" }}} +" Diffs: {{{ + +call s:HL('DiffDelete', s:red, s:bg0, s:inverse) +call s:HL('DiffAdd', s:green, s:bg0, s:inverse) +"call s:HL('DiffChange', s:bg0, s:blue) +"call s:HL('DiffText', s:bg0, s:yellow) + +" Alternative setting +call s:HL('DiffChange', s:aqua, s:bg0, s:inverse) +call s:HL('DiffText', s:yellow, s:bg0, s:inverse) + +" }}} +" Spelling: {{{ + +if has("spell") + " Not capitalised word, or compile warnings + if g:gruvbox_improved_warnings == 0 + call s:HL('SpellCap', s:none, s:none, s:undercurl, s:red) + else + call s:HL('SpellCap', s:green, s:none, s:bold . s:italic) + endif + " Not recognized word + call s:HL('SpellBad', s:none, s:none, s:undercurl, s:blue) + " Wrong spelling for selected region + call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:aqua) + " Rare word + call s:HL('SpellRare', s:none, s:none, s:undercurl, s:purple) +endif + +" }}} + +" Plugin specific ------------------------------------------------------------- +" EasyMotion: {{{ + +hi! link EasyMotionTarget Search +hi! link EasyMotionShade Comment + +" }}} +" Sneak: {{{ + +hi! link Sneak Search +hi! link SneakLabel Search + +" }}} +" Indent Guides: {{{ + +if !exists('g:indent_guides_auto_colors') + let g:indent_guides_auto_colors = 0 +endif + +if g:indent_guides_auto_colors == 0 + if g:gruvbox_invert_indent_guides == 0 + call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2) + call s:HL('IndentGuidesEven', s:vim_bg, s:bg1) + else + call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2, s:inverse) + call s:HL('IndentGuidesEven', s:vim_bg, s:bg3, s:inverse) + endif +endif + +" }}} +" IndentLine: {{{ + +if !exists('g:indentLine_color_term') + let g:indentLine_color_term = s:bg2[1] +endif +if !exists('g:indentLine_color_gui') + let g:indentLine_color_gui = s:bg2[0] +endif + +" }}} +" Rainbow Parentheses: {{{ + +if !exists('g:rbpt_colorpairs') + let g:rbpt_colorpairs = + \ [ + \ ['blue', '#458588'], ['magenta', '#b16286'], + \ ['red', '#cc241d'], ['166', '#d65d0e'] + \ ] +endif + +let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ] +let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ] + +if !exists('g:rainbow_conf') + let g:rainbow_conf = {} +endif +if !has_key(g:rainbow_conf, 'guifgs') + let g:rainbow_conf['guifgs'] = g:rainbow_guifgs +endif +if !has_key(g:rainbow_conf, 'ctermfgs') + let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs +endif + +let g:niji_dark_colours = g:rbpt_colorpairs +let g:niji_light_colours = g:rbpt_colorpairs + +"}}} +" GitGutter: {{{ + +hi! link GitGutterAdd GruvboxGreenSign +hi! link GitGutterChange GruvboxAquaSign +hi! link GitGutterDelete GruvboxRedSign +hi! link GitGutterChangeDelete GruvboxAquaSign + +" }}} +" GitCommit: "{{{ + +hi! link gitcommitSelectedFile GruvboxGreen +hi! link gitcommitDiscardedFile GruvboxRed + +" }}} +" Signify: {{{ + +hi! link SignifySignAdd GruvboxGreenSign +hi! link SignifySignChange GruvboxAquaSign +hi! link SignifySignDelete GruvboxRedSign + +" }}} +" Syntastic: {{{ + +call s:HL('SyntasticError', s:none, s:none, s:undercurl, s:red) +call s:HL('SyntasticWarning', s:none, s:none, s:undercurl, s:yellow) + +hi! link SyntasticErrorSign GruvboxRedSign +hi! link SyntasticWarningSign GruvboxYellowSign + +" }}} +" Signature: {{{ +hi! link SignatureMarkText GruvboxBlueSign +hi! link SignatureMarkerText GruvboxPurpleSign + +" }}} +" ShowMarks: {{{ + +hi! link ShowMarksHLl GruvboxBlueSign +hi! link ShowMarksHLu GruvboxBlueSign +hi! link ShowMarksHLo GruvboxBlueSign +hi! link ShowMarksHLm GruvboxBlueSign + +" }}} +" CtrlP: {{{ + +hi! link CtrlPMatch GruvboxYellow +hi! link CtrlPNoEntries GruvboxRed +hi! link CtrlPPrtBase GruvboxBg2 +hi! link CtrlPPrtCursor GruvboxBlue +hi! link CtrlPLinePre GruvboxBg2 + +call s:HL('CtrlPMode1', s:blue, s:bg2, s:bold) +call s:HL('CtrlPMode2', s:bg0, s:blue, s:bold) +call s:HL('CtrlPStats', s:fg4, s:bg2, s:bold) + +" }}} +" Startify: {{{ + +hi! link StartifyBracket GruvboxFg3 +hi! link StartifyFile GruvboxFg1 +hi! link StartifyNumber GruvboxBlue +hi! link StartifyPath GruvboxGray +hi! link StartifySlash GruvboxGray +hi! link StartifySection GruvboxYellow +hi! link StartifySpecial GruvboxBg2 +hi! link StartifyHeader GruvboxOrange +hi! link StartifyFooter GruvboxBg2 + +" }}} +" Vimshell: {{{ + +let g:vimshell_escape_colors = [ + \ s:bg4[0], s:red[0], s:green[0], s:yellow[0], + \ s:blue[0], s:purple[0], s:aqua[0], s:fg4[0], + \ s:bg0[0], s:red[0], s:green[0], s:orange[0], + \ s:blue[0], s:purple[0], s:aqua[0], s:fg0[0] + \ ] + +" }}} +" BufTabLine: {{{ + +call s:HL('BufTabLineCurrent', s:bg0, s:fg4) +call s:HL('BufTabLineActive', s:fg4, s:bg2) +call s:HL('BufTabLineHidden', s:bg4, s:bg1) +call s:HL('BufTabLineFill', s:bg0, s:bg0) + +" }}} +" Asynchronous Lint Engine: {{{ + +call s:HL('ALEError', s:none, s:none, s:undercurl, s:red) +call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:yellow) +call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:blue) + +hi! link ALEErrorSign GruvboxRedSign +hi! link ALEWarningSign GruvboxYellowSign +hi! link ALEInfoSign GruvboxBlueSign + +" }}} +" Dirvish: {{{ + +hi! link DirvishPathTail GruvboxAqua +hi! link DirvishArg GruvboxYellow + +" }}} +" Netrw: {{{ + +hi! link netrwDir GruvboxAqua +hi! link netrwClassify GruvboxAqua +hi! link netrwLink GruvboxGray +hi! link netrwSymLink GruvboxFg1 +hi! link netrwExe GruvboxYellow +hi! link netrwComment GruvboxGray +hi! link netrwList GruvboxBlue +hi! link netrwHelpCmd GruvboxAqua +hi! link netrwCmdSep GruvboxFg3 +hi! link netrwVersion GruvboxGreen + +" }}} +" NERDTree: {{{ + +hi! link NERDTreeDir GruvboxAqua +hi! link NERDTreeDirSlash GruvboxAqua + +hi! link NERDTreeOpenable GruvboxOrange +hi! link NERDTreeClosable GruvboxOrange + +hi! link NERDTreeFile GruvboxFg1 +hi! link NERDTreeExecFile GruvboxYellow + +hi! link NERDTreeUp GruvboxGray +hi! link NERDTreeCWD GruvboxGreen +hi! link NERDTreeHelp GruvboxFg1 + +hi! link NERDTreeToggleOn GruvboxGreen +hi! link NERDTreeToggleOff GruvboxRed + +" }}} +" Vim Multiple Cursors: {{{ + +call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse) +call s:HL('multiple_cursors_visual', s:none, s:bg2) + +" }}} +" coc.nvim: {{{ + +hi! link CocErrorSign GruvboxRedSign +hi! link CocWarningSign GruvboxOrangeSign +hi! link CocInfoSign GruvboxYellowSign +hi! link CocHintSign GruvboxBlueSign +hi! link CocErrorFloat GruvboxRed +hi! link CocWarningFloat GruvboxOrange +hi! link CocInfoFloat GruvboxYellow +hi! link CocHintFloat GruvboxBlue +hi! link CocDiagnosticsError GruvboxRed +hi! link CocDiagnosticsWarning GruvboxOrange +hi! link CocDiagnosticsInfo GruvboxYellow +hi! link CocDiagnosticsHint GruvboxBlue + +hi! link CocSelectedText GruvboxRed +hi! link CocCodeLens GruvboxGray + +call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red) +call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:orange) +call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow) +call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue) + +" }}} + +" Filetype specific ----------------------------------------------------------- +" Diff: {{{ + +hi! link diffAdded GruvboxGreen +hi! link diffRemoved GruvboxRed +hi! link diffChanged GruvboxAqua + +hi! link diffFile GruvboxOrange +hi! link diffNewFile GruvboxYellow + +hi! link diffLine GruvboxBlue + +" }}} +" Html: {{{ + +hi! link htmlTag GruvboxBlue +hi! link htmlEndTag GruvboxBlue + +hi! link htmlTagName GruvboxAquaBold +hi! link htmlArg GruvboxAqua + +hi! link htmlScriptTag GruvboxPurple +hi! link htmlTagN GruvboxFg1 +hi! link htmlSpecialTagName GruvboxAquaBold + +call s:HL('htmlLink', s:fg4, s:none, s:underline) + +hi! link htmlSpecialChar GruvboxOrange + +call s:HL('htmlBold', s:vim_fg, s:vim_bg, s:bold) +call s:HL('htmlBoldUnderline', s:vim_fg, s:vim_bg, s:bold . s:underline) +call s:HL('htmlBoldItalic', s:vim_fg, s:vim_bg, s:bold . s:italic) +call s:HL('htmlBoldUnderlineItalic', s:vim_fg, s:vim_bg, s:bold . s:underline . s:italic) + +call s:HL('htmlUnderline', s:vim_fg, s:vim_bg, s:underline) +call s:HL('htmlUnderlineItalic', s:vim_fg, s:vim_bg, s:underline . s:italic) +call s:HL('htmlItalic', s:vim_fg, s:vim_bg, s:italic) + +" }}} +" Xml: {{{ + +hi! link xmlTag GruvboxBlue +hi! link xmlEndTag GruvboxBlue +hi! link xmlTagName GruvboxBlue +hi! link xmlEqual GruvboxBlue +hi! link docbkKeyword GruvboxAquaBold + +hi! link xmlDocTypeDecl GruvboxGray +hi! link xmlDocTypeKeyword GruvboxPurple +hi! link xmlCdataStart GruvboxGray +hi! link xmlCdataCdata GruvboxPurple +hi! link dtdFunction GruvboxGray +hi! link dtdTagName GruvboxPurple + +hi! link xmlAttrib GruvboxAqua +hi! link xmlProcessingDelim GruvboxGray +hi! link dtdParamEntityPunct GruvboxGray +hi! link dtdParamEntityDPunct GruvboxGray +hi! link xmlAttribPunct GruvboxGray + +hi! link xmlEntity GruvboxOrange +hi! link xmlEntityPunct GruvboxOrange +" }}} +" Vim: {{{ + +call s:HL('vimCommentTitle', s:fg4_256, s:none, s:bold . s:italicize_comments) + +hi! link vimNotation GruvboxOrange +hi! link vimBracket GruvboxOrange +hi! link vimMapModKey GruvboxOrange +hi! link vimFuncSID GruvboxFg3 +hi! link vimSetSep GruvboxFg3 +hi! link vimSep GruvboxFg3 +hi! link vimContinue GruvboxFg3 + +" }}} +" Clojure: {{{ + +hi! link clojureKeyword GruvboxBlue +hi! link clojureCond GruvboxOrange +hi! link clojureSpecial GruvboxOrange +hi! link clojureDefine GruvboxOrange + +hi! link clojureFunc GruvboxYellow +hi! link clojureRepeat GruvboxYellow +hi! link clojureCharacter GruvboxAqua +hi! link clojureStringEscape GruvboxAqua +hi! link clojureException GruvboxRed + +hi! link clojureRegexp GruvboxAqua +hi! link clojureRegexpEscape GruvboxAqua +call s:HL('clojureRegexpCharClass', s:fg3, s:none, s:bold) +hi! link clojureRegexpMod clojureRegexpCharClass +hi! link clojureRegexpQuantifier clojureRegexpCharClass + +hi! link clojureParen GruvboxFg3 +hi! link clojureAnonArg GruvboxYellow +hi! link clojureVariable GruvboxBlue +hi! link clojureMacro GruvboxOrange + +hi! link clojureMeta GruvboxYellow +hi! link clojureDeref GruvboxYellow +hi! link clojureQuote GruvboxYellow +hi! link clojureUnquote GruvboxYellow + +" }}} +" C: {{{ + +hi! link cOperator GruvboxPurple +hi! link cStructure GruvboxOrange + +" }}} +" Python: {{{ + +hi! link pythonBuiltin GruvboxOrange +hi! link pythonBuiltinObj GruvboxOrange +hi! link pythonBuiltinFunc GruvboxOrange +hi! link pythonFunction GruvboxAqua +hi! link pythonDecorator GruvboxRed +hi! link pythonInclude GruvboxBlue +hi! link pythonImport GruvboxBlue +hi! link pythonRun GruvboxBlue +hi! link pythonCoding GruvboxBlue +hi! link pythonOperator GruvboxRed +hi! link pythonException GruvboxRed +hi! link pythonExceptions GruvboxPurple +hi! link pythonBoolean GruvboxPurple +hi! link pythonDot GruvboxFg3 +hi! link pythonConditional GruvboxRed +hi! link pythonRepeat GruvboxRed +hi! link pythonDottedName GruvboxGreenBold + +" }}} +" CSS: {{{ + +hi! link cssBraces GruvboxBlue +hi! link cssFunctionName GruvboxYellow +hi! link cssIdentifier GruvboxOrange +hi! link cssClassName GruvboxGreen +hi! link cssColor GruvboxBlue +hi! link cssSelectorOp GruvboxBlue +hi! link cssSelectorOp2 GruvboxBlue +hi! link cssImportant GruvboxGreen +hi! link cssVendor GruvboxFg1 + +hi! link cssTextProp GruvboxAqua +hi! link cssAnimationProp GruvboxAqua +hi! link cssUIProp GruvboxYellow +hi! link cssTransformProp GruvboxAqua +hi! link cssTransitionProp GruvboxAqua +hi! link cssPrintProp GruvboxAqua +hi! link cssPositioningProp GruvboxYellow +hi! link cssBoxProp GruvboxAqua +hi! link cssFontDescriptorProp GruvboxAqua +hi! link cssFlexibleBoxProp GruvboxAqua +hi! link cssBorderOutlineProp GruvboxAqua +hi! link cssBackgroundProp GruvboxAqua +hi! link cssMarginProp GruvboxAqua +hi! link cssListProp GruvboxAqua +hi! link cssTableProp GruvboxAqua +hi! link cssFontProp GruvboxAqua +hi! link cssPaddingProp GruvboxAqua +hi! link cssDimensionProp GruvboxAqua +hi! link cssRenderProp GruvboxAqua +hi! link cssColorProp GruvboxAqua +hi! link cssGeneratedContentProp GruvboxAqua + +" }}} +" JavaScript: {{{ + +hi! link javaScriptBraces GruvboxFg1 +hi! link javaScriptFunction GruvboxAqua +hi! link javaScriptIdentifier GruvboxRed +hi! link javaScriptMember GruvboxBlue +hi! link javaScriptNumber GruvboxPurple +hi! link javaScriptNull GruvboxPurple +hi! link javaScriptParens GruvboxFg3 + +" }}} +" YAJS: {{{ + +hi! link javascriptImport GruvboxAqua +hi! link javascriptExport GruvboxAqua +hi! link javascriptClassKeyword GruvboxAqua +hi! link javascriptClassExtends GruvboxAqua +hi! link javascriptDefault GruvboxAqua + +hi! link javascriptClassName GruvboxYellow +hi! link javascriptClassSuperName GruvboxYellow +hi! link javascriptGlobal GruvboxYellow + +hi! link javascriptEndColons GruvboxFg1 +hi! link javascriptFuncArg GruvboxFg1 +hi! link javascriptGlobalMethod GruvboxFg1 +hi! link javascriptNodeGlobal GruvboxFg1 +hi! link javascriptBOMWindowProp GruvboxFg1 +hi! link javascriptArrayMethod GruvboxFg1 +hi! link javascriptArrayStaticMethod GruvboxFg1 +hi! link javascriptCacheMethod GruvboxFg1 +hi! link javascriptDateMethod GruvboxFg1 +hi! link javascriptMathStaticMethod GruvboxFg1 + +" hi! link javascriptProp GruvboxFg1 +hi! link javascriptURLUtilsProp GruvboxFg1 +hi! link javascriptBOMNavigatorProp GruvboxFg1 +hi! link javascriptDOMDocMethod GruvboxFg1 +hi! link javascriptDOMDocProp GruvboxFg1 +hi! link javascriptBOMLocationMethod GruvboxFg1 +hi! link javascriptBOMWindowMethod GruvboxFg1 +hi! link javascriptStringMethod GruvboxFg1 + +hi! link javascriptVariable GruvboxOrange +" hi! link javascriptVariable GruvboxRed +" hi! link javascriptIdentifier GruvboxOrange +" hi! link javascriptClassSuper GruvboxOrange +hi! link javascriptIdentifier GruvboxOrange +hi! link javascriptClassSuper GruvboxOrange + +" hi! link javascriptFuncKeyword GruvboxOrange +" hi! link javascriptAsyncFunc GruvboxOrange +hi! link javascriptFuncKeyword GruvboxAqua +hi! link javascriptAsyncFunc GruvboxAqua +hi! link javascriptClassStatic GruvboxOrange + +hi! link javascriptOperator GruvboxRed +hi! link javascriptForOperator GruvboxRed +hi! link javascriptYield GruvboxRed +hi! link javascriptExceptions GruvboxRed +hi! link javascriptMessage GruvboxRed + +hi! link javascriptTemplateSB GruvboxAqua +hi! link javascriptTemplateSubstitution GruvboxFg1 + +" hi! link javascriptLabel GruvboxBlue +" hi! link javascriptObjectLabel GruvboxBlue +" hi! link javascriptPropertyName GruvboxBlue +hi! link javascriptLabel GruvboxFg1 +hi! link javascriptObjectLabel GruvboxFg1 +hi! link javascriptPropertyName GruvboxFg1 + +hi! link javascriptLogicSymbols GruvboxFg1 +hi! link javascriptArrowFunc GruvboxYellow + +hi! link javascriptDocParamName GruvboxFg4 +hi! link javascriptDocTags GruvboxFg4 +hi! link javascriptDocNotation GruvboxFg4 +hi! link javascriptDocParamType GruvboxFg4 +hi! link javascriptDocNamedParamType GruvboxFg4 + +hi! link javascriptBrackets GruvboxFg1 +hi! link javascriptDOMElemAttrs GruvboxFg1 +hi! link javascriptDOMEventMethod GruvboxFg1 +hi! link javascriptDOMNodeMethod GruvboxFg1 +hi! link javascriptDOMStorageMethod GruvboxFg1 +hi! link javascriptHeadersMethod GruvboxFg1 + +hi! link javascriptAsyncFuncKeyword GruvboxRed +hi! link javascriptAwaitFuncKeyword GruvboxRed + +" }}} +" PanglossJS: {{{ + +hi! link jsClassKeyword GruvboxAqua +hi! link jsExtendsKeyword GruvboxAqua +hi! link jsExportDefault GruvboxAqua +hi! link jsTemplateBraces GruvboxAqua +hi! link jsGlobalNodeObjects GruvboxFg1 +hi! link jsGlobalObjects GruvboxFg1 +hi! link jsFunction GruvboxAqua +hi! link jsFuncParens GruvboxFg3 +hi! link jsParens GruvboxFg3 +hi! link jsNull GruvboxPurple +hi! link jsUndefined GruvboxPurple +hi! link jsClassDefinition GruvboxYellow + +" }}} +" TypeScript: {{{ + +hi! link typeScriptReserved GruvboxAqua +hi! link typeScriptLabel GruvboxAqua +hi! link typeScriptFuncKeyword GruvboxAqua +hi! link typeScriptIdentifier GruvboxOrange +hi! link typeScriptBraces GruvboxFg1 +hi! link typeScriptEndColons GruvboxFg1 +hi! link typeScriptDOMObjects GruvboxFg1 +hi! link typeScriptAjaxMethods GruvboxFg1 +hi! link typeScriptLogicSymbols GruvboxFg1 +hi! link typeScriptDocSeeTag Comment +hi! link typeScriptDocParam Comment +hi! link typeScriptDocTags vimCommentTitle +hi! link typeScriptGlobalObjects GruvboxFg1 +hi! link typeScriptParens GruvboxFg3 +hi! link typeScriptOpSymbols GruvboxFg3 +hi! link typeScriptHtmlElemProperties GruvboxFg1 +hi! link typeScriptNull GruvboxPurple +hi! link typeScriptInterpolationDelimiter GruvboxAqua + +" }}} +" PureScript: {{{ + +hi! link purescriptModuleKeyword GruvboxAqua +hi! link purescriptModuleName GruvboxFg1 +hi! link purescriptWhere GruvboxAqua +hi! link purescriptDelimiter GruvboxFg4 +hi! link purescriptType GruvboxFg1 +hi! link purescriptImportKeyword GruvboxAqua +hi! link purescriptHidingKeyword GruvboxAqua +hi! link purescriptAsKeyword GruvboxAqua +hi! link purescriptStructure GruvboxAqua +hi! link purescriptOperator GruvboxBlue + +hi! link purescriptTypeVar GruvboxFg1 +hi! link purescriptConstructor GruvboxFg1 +hi! link purescriptFunction GruvboxFg1 +hi! link purescriptConditional GruvboxOrange +hi! link purescriptBacktick GruvboxOrange + +" }}} +" CoffeeScript: {{{ + +hi! link coffeeExtendedOp GruvboxFg3 +hi! link coffeeSpecialOp GruvboxFg3 +hi! link coffeeCurly GruvboxOrange +hi! link coffeeParen GruvboxFg3 +hi! link coffeeBracket GruvboxOrange + +" }}} +" Ruby: {{{ + +hi! link rubyStringDelimiter GruvboxGreen +hi! link rubyInterpolationDelimiter GruvboxAqua + +" }}} +" ObjectiveC: {{{ + +hi! link objcTypeModifier GruvboxRed +hi! link objcDirective GruvboxBlue + +" }}} +" Go: {{{ + +hi! link goDirective GruvboxAqua +hi! link goConstants GruvboxPurple +hi! link goDeclaration GruvboxRed +hi! link goDeclType GruvboxBlue +hi! link goBuiltins GruvboxOrange + +" }}} +" Lua: {{{ + +hi! link luaIn GruvboxRed +hi! link luaFunction GruvboxAqua +hi! link luaTable GruvboxOrange + +" }}} +" MoonScript: {{{ + +hi! link moonSpecialOp GruvboxFg3 +hi! link moonExtendedOp GruvboxFg3 +hi! link moonFunction GruvboxFg3 +hi! link moonObject GruvboxYellow + +" }}} +" Java: {{{ + +hi! link javaAnnotation GruvboxBlue +hi! link javaDocTags GruvboxAqua +hi! link javaCommentTitle vimCommentTitle +hi! link javaParen GruvboxFg3 +hi! link javaParen1 GruvboxFg3 +hi! link javaParen2 GruvboxFg3 +hi! link javaParen3 GruvboxFg3 +hi! link javaParen4 GruvboxFg3 +hi! link javaParen5 GruvboxFg3 +hi! link javaOperator GruvboxOrange + +hi! link javaVarArg GruvboxGreen + +" }}} +" Elixir: {{{ + +hi! link elixirDocString Comment + +hi! link elixirStringDelimiter GruvboxGreen +hi! link elixirInterpolationDelimiter GruvboxAqua + +hi! link elixirModuleDeclaration GruvboxYellow + +" }}} +" Scala: {{{ + +" NB: scala vim syntax file is kinda horrible +hi! link scalaNameDefinition GruvboxFg1 +hi! link scalaCaseFollowing GruvboxFg1 +hi! link scalaCapitalWord GruvboxFg1 +hi! link scalaTypeExtension GruvboxFg1 + +hi! link scalaKeyword GruvboxRed +hi! link scalaKeywordModifier GruvboxRed + +hi! link scalaSpecial GruvboxAqua +hi! link scalaOperator GruvboxFg1 + +hi! link scalaTypeDeclaration GruvboxYellow +hi! link scalaTypeTypePostDeclaration GruvboxYellow + +hi! link scalaInstanceDeclaration GruvboxFg1 +hi! link scalaInterpolation GruvboxAqua + +" }}} +" Markdown: {{{ + +call s:HL('markdownItalic', s:fg3, s:none, s:italic) + +hi! link markdownH1 GruvboxGreenBold +hi! link markdownH2 GruvboxGreenBold +hi! link markdownH3 GruvboxYellowBold +hi! link markdownH4 GruvboxYellowBold +hi! link markdownH5 GruvboxYellow +hi! link markdownH6 GruvboxYellow + +hi! link markdownCode GruvboxAqua +hi! link markdownCodeBlock GruvboxAqua +hi! link markdownCodeDelimiter GruvboxAqua + +hi! link markdownBlockquote GruvboxGray +hi! link markdownListMarker GruvboxGray +hi! link markdownOrderedListMarker GruvboxGray +hi! link markdownRule GruvboxGray +hi! link markdownHeadingRule GruvboxGray + +hi! link markdownUrlDelimiter GruvboxFg3 +hi! link markdownLinkDelimiter GruvboxFg3 +hi! link markdownLinkTextDelimiter GruvboxFg3 + +hi! link markdownHeadingDelimiter GruvboxOrange +hi! link markdownUrl GruvboxPurple +hi! link markdownUrlTitleDelimiter GruvboxGreen + +call s:HL('markdownLinkText', s:gray, s:none, s:underline) +hi! link markdownIdDeclaration markdownLinkText + +" }}} +" Haskell: {{{ + +" hi! link haskellType GruvboxYellow +" hi! link haskellOperators GruvboxOrange +" hi! link haskellConditional GruvboxAqua +" hi! link haskellLet GruvboxOrange +" +hi! link haskellType GruvboxFg1 +hi! link haskellIdentifier GruvboxFg1 +hi! link haskellSeparator GruvboxFg1 +hi! link haskellDelimiter GruvboxFg4 +hi! link haskellOperators GruvboxBlue +" +hi! link haskellBacktick GruvboxOrange +hi! link haskellStatement GruvboxOrange +hi! link haskellConditional GruvboxOrange + +hi! link haskellLet GruvboxAqua +hi! link haskellDefault GruvboxAqua +hi! link haskellWhere GruvboxAqua +hi! link haskellBottom GruvboxAqua +hi! link haskellBlockKeywords GruvboxAqua +hi! link haskellImportKeywords GruvboxAqua +hi! link haskellDeclKeyword GruvboxAqua +hi! link haskellDeriving GruvboxAqua +hi! link haskellAssocType GruvboxAqua + +hi! link haskellNumber GruvboxPurple +hi! link haskellPragma GruvboxPurple + +hi! link haskellString GruvboxGreen +hi! link haskellChar GruvboxGreen + +" }}} +" Json: {{{ + +hi! link jsonKeyword GruvboxGreen +hi! link jsonQuote GruvboxGreen +hi! link jsonBraces GruvboxFg1 +hi! link jsonString GruvboxFg1 + +" }}} + + +" Functions ------------------------------------------------------------------- +" Search Highlighting Cursor {{{ + +function! GruvboxHlsShowCursor() + call s:HL('Cursor', s:bg0, s:hls_cursor) +endfunction + +function! GruvboxHlsHideCursor() + call s:HL('Cursor', s:none, s:none, s:inverse) +endfunction + +" }}} + +" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: diff --git a/dot_vim/plugged/gruvbox/dot_git/HEAD b/dot_vim/plugged/gruvbox/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/gruvbox/dot_git/branches/.keep b/dot_vim/plugged/gruvbox/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/gruvbox/dot_git/config b/dot_vim/plugged/gruvbox/dot_git/config new file mode 100644 index 0000000..21280f5 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/morhetz/gruvbox.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/gruvbox/dot_git/description b/dot_vim/plugged/gruvbox/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/post-update.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-push.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/gruvbox/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/gruvbox/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/gruvbox/dot_git/index b/dot_vim/plugged/gruvbox/dot_git/index new file mode 100644 index 0000000..79d1513 Binary files /dev/null and b/dot_vim/plugged/gruvbox/dot_git/index differ diff --git a/dot_vim/plugged/gruvbox/dot_git/info/exclude b/dot_vim/plugged/gruvbox/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/gruvbox/dot_git/logs/HEAD b/dot_vim/plugged/gruvbox/dot_git/logs/HEAD new file mode 100644 index 0000000..d78471a --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 bf2885a95efdad7bd5e4794dd0213917770d79b7 LinlyBoi 1676062730 +0200 clone: from https://github.com/morhetz/gruvbox.git +bf2885a95efdad7bd5e4794dd0213917770d79b7 bf2885a95efdad7bd5e4794dd0213917770d79b7 LinlyBoi 1676062732 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/gruvbox/dot_git/logs/refs/heads/master b/dot_vim/plugged/gruvbox/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..b8f5006 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 bf2885a95efdad7bd5e4794dd0213917770d79b7 LinlyBoi 1676062730 +0200 clone: from https://github.com/morhetz/gruvbox.git diff --git a/dot_vim/plugged/gruvbox/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/gruvbox/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..b8f5006 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 bf2885a95efdad7bd5e4794dd0213917770d79b7 LinlyBoi 1676062730 +0200 clone: from https://github.com/morhetz/gruvbox.git diff --git a/dot_vim/plugged/gruvbox/dot_git/objects/info/.keep b/dot_vim/plugged/gruvbox/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.idx b/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.idx new file mode 100644 index 0000000..cd102b7 Binary files /dev/null and b/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.idx differ diff --git a/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.pack b/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.pack new file mode 100644 index 0000000..de94166 Binary files /dev/null and b/dot_vim/plugged/gruvbox/dot_git/objects/pack/readonly_pack-3a07c924f99cd2caf1ccb4fd9380b1168f83f690.pack differ diff --git a/dot_vim/plugged/gruvbox/dot_git/packed-refs b/dot_vim/plugged/gruvbox/dot_git/packed-refs new file mode 100644 index 0000000..b511e53 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/packed-refs @@ -0,0 +1,10 @@ +# pack-refs with: peeled fully-peeled sorted +bf2885a95efdad7bd5e4794dd0213917770d79b7 refs/remotes/origin/master +e299ad48ccb1e1b9e036dcbb363f49e2fe6abc75 refs/remotes/origin/next +e7fbff0921f44cadf6f8dd325a10874bd4587106 refs/tags/v0.0.8 +^3353a6235ec691bf8f00722f1bf762dad3b520c7 +e00de54291b1b99144aa5a9da833d6f9ba615dc3 refs/tags/v1.3.5 +2a5a99e9ccd6a5dbceac58629c20cd3c18a57bc7 refs/tags/v1.9.3 +7fde9c10ceff684529c1646bf759af3a25bb576c refs/tags/v2.0.0 +5e7436a9400ad7a0fef94049f5eb81ed4f8bb3aa refs/tags/v3.0.1-rc.0 +^a7f043a00c3b4e667560ffa618568eb99e711bbf diff --git a/dot_vim/plugged/gruvbox/dot_git/refs/heads/master b/dot_vim/plugged/gruvbox/dot_git/refs/heads/master new file mode 100644 index 0000000..d89adc8 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/refs/heads/master @@ -0,0 +1 @@ +bf2885a95efdad7bd5e4794dd0213917770d79b7 diff --git a/dot_vim/plugged/gruvbox/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/gruvbox/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/gruvbox/dot_git/refs/tags/.keep b/dot_vim/plugged/gruvbox/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/gruvbox/dot_git/shallow b/dot_vim/plugged/gruvbox/dot_git/shallow new file mode 100644 index 0000000..0675870 --- /dev/null +++ b/dot_vim/plugged/gruvbox/dot_git/shallow @@ -0,0 +1,7 @@ +2a5a99e9ccd6a5dbceac58629c20cd3c18a57bc7 +3353a6235ec691bf8f00722f1bf762dad3b520c7 +7fde9c10ceff684529c1646bf759af3a25bb576c +a7f043a00c3b4e667560ffa618568eb99e711bbf +bf2885a95efdad7bd5e4794dd0213917770d79b7 +e00de54291b1b99144aa5a9da833d6f9ba615dc3 +e299ad48ccb1e1b9e036dcbb363f49e2fe6abc75 diff --git a/dot_vim/plugged/gruvbox/executable_gruvbox_256palette.sh b/dot_vim/plugged/gruvbox/executable_gruvbox_256palette.sh new file mode 100644 index 0000000..c7fd190 --- /dev/null +++ b/dot_vim/plugged/gruvbox/executable_gruvbox_256palette.sh @@ -0,0 +1,118 @@ +#!/bin/sh + +if [ "${TERM%%-*}" = "screen" ]; then + if [ -n "$TMUX" ]; then + printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\033\\" + printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\033\\" + + printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\033\\" + printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\033\\" + printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\033\\" + printf "\033Ptmux;\033\033]4;241;rgb:66/5c/54\007\033\\" + printf "\033Ptmux;\033\033]4;243;rgb:7c/6f/64\007\033\\" + + printf "\033Ptmux;\033\033]4;244;rgb:92/83/74\007\033\\" + printf "\033Ptmux;\033\033]4;245;rgb:92/83/74\007\033\\" + + printf "\033Ptmux;\033\033]4;228;rgb:f2/e5/bc\007\033\\" + printf "\033Ptmux;\033\033]4;230;rgb:f9/f5/d7\007\033\\" + + printf "\033Ptmux;\033\033]4;229;rgb:fb/f1/c7\007\033\\" + printf "\033Ptmux;\033\033]4;223;rgb:eb/db/b2\007\033\\" + printf "\033Ptmux;\033\033]4;250;rgb:d5/c4/a1\007\033\\" + printf "\033Ptmux;\033\033]4;248;rgb:bd/ae/93\007\033\\" + printf "\033Ptmux;\033\033]4;246;rgb:a8/99/84\007\033\\" + + printf "\033Ptmux;\033\033]4;167;rgb:fb/49/34\007\033\\" + printf "\033Ptmux;\033\033]4;142;rgb:b8/bb/26\007\033\\" + printf "\033Ptmux;\033\033]4;214;rgb:fa/bd/2f\007\033\\" + printf "\033Ptmux;\033\033]4;109;rgb:83/a5/98\007\033\\" + printf "\033Ptmux;\033\033]4;175;rgb:d3/86/9b\007\033\\" + printf "\033Ptmux;\033\033]4;108;rgb:8e/c0/7c\007\033\\" + printf "\033Ptmux;\033\033]4;208;rgb:fe/80/19\007\033\\" + + printf "\033Ptmux;\033\033]4;88;rgb:9d/00/06\007\033\\" + printf "\033Ptmux;\033\033]4;100;rgb:79/74/0e\007\033\\" + printf "\033Ptmux;\033\033]4;136;rgb:b5/76/14\007\033\\" + printf "\033Ptmux;\033\033]4;24;rgb:07/66/78\007\033\\" + printf "\033Ptmux;\033\033]4;96;rgb:8f/3f/71\007\033\\" + printf "\033Ptmux;\033\033]4;66;rgb:42/7b/58\007\033\\" + printf "\033Ptmux;\033\033]4;130;rgb:af/3a/03\007\033\\" + else + printf "\033P\033]4;236;rgb:32/30/2f\007\033\\" + printf "\033P\033]4;234;rgb:1d/20/21\007\033\\" + + printf "\033P\033]4;235;rgb:28/28/28\007\033\\" + printf "\033P\033]4;237;rgb:3c/38/36\007\033\\" + printf "\033P\033]4;239;rgb:50/49/45\007\033\\" + printf "\033P\033]4;241;rgb:66/5c/54\007\033\\" + printf "\033P\033]4;243;rgb:7c/6f/64\007\033\\" + + printf "\033P\033]4;244;rgb:92/83/74\007\033\\" + printf "\033P\033]4;245;rgb:92/83/74\007\033\\" + + printf "\033P\033]4;228;rgb:f2/e5/bc\007\033\\" + printf "\033P\033]4;230;rgb:f9/f5/d7\007\033\\" + + printf "\033P\033]4;229;rgb:fb/f1/c7\007\033\\" + printf "\033P\033]4;223;rgb:eb/db/b2\007\033\\" + printf "\033P\033]4;250;rgb:d5/c4/a1\007\033\\" + printf "\033P\033]4;248;rgb:bd/ae/93\007\033\\" + printf "\033P\033]4;246;rgb:a8/99/84\007\033\\" + + printf "\033P\033]4;167;rgb:fb/49/34\007\033\\" + printf "\033P\033]4;142;rgb:b8/bb/26\007\033\\" + printf "\033P\033]4;214;rgb:fa/bd/2f\007\033\\" + printf "\033P\033]4;109;rgb:83/a5/98\007\033\\" + printf "\033P\033]4;175;rgb:d3/86/9b\007\033\\" + printf "\033P\033]4;108;rgb:8e/c0/7c\007\033\\" + printf "\033P\033]4;208;rgb:fe/80/19\007\033\\" + + printf "\033P\033]4;88;rgb:9d/00/06\007\033\\" + printf "\033P\033]4;100;rgb:79/74/0e\007\033\\" + printf "\033P\033]4;136;rgb:b5/76/14\007\033\\" + printf "\033P\033]4;24;rgb:07/66/78\007\033\\" + printf "\033P\033]4;96;rgb:8f/3f/71\007\033\\" + printf "\033P\033]4;66;rgb:42/7b/58\007\033\\" + printf "\033P\033]4;130;rgb:af/3a/03\007\033\\" + fi + +elif [ "$TERM" != "linux" ] && [ "$TERM" != "vt100" ] && [ "$TERM" != "vt220" ]; then + + printf "\033]4;236;rgb:32/30/2f\033\\" + printf "\033]4;234;rgb:1d/20/21\033\\" + + printf "\033]4;235;rgb:28/28/28\033\\" + printf "\033]4;237;rgb:3c/38/36\033\\" + printf "\033]4;239;rgb:50/49/45\033\\" + printf "\033]4;241;rgb:66/5c/54\033\\" + printf "\033]4;243;rgb:7c/6f/64\033\\" + + printf "\033]4;244;rgb:92/83/74\033\\" + printf "\033]4;245;rgb:92/83/74\033\\" + + printf "\033]4;228;rgb:f2/e5/bc\033\\" + printf "\033]4;230;rgb:f9/f5/d7\033\\" + + printf "\033]4;229;rgb:fb/f1/c7\033\\" + printf "\033]4;223;rgb:eb/db/b2\033\\" + printf "\033]4;250;rgb:d5/c4/a1\033\\" + printf "\033]4;248;rgb:bd/ae/93\033\\" + printf "\033]4;246;rgb:a8/99/84\033\\" + + printf "\033]4;167;rgb:fb/49/34\033\\" + printf "\033]4;142;rgb:b8/bb/26\033\\" + printf "\033]4;214;rgb:fa/bd/2f\033\\" + printf "\033]4;109;rgb:83/a5/98\033\\" + printf "\033]4;175;rgb:d3/86/9b\033\\" + printf "\033]4;108;rgb:8e/c0/7c\033\\" + printf "\033]4;208;rgb:fe/80/19\033\\" + + printf "\033]4;88;rgb:9d/00/06\033\\" + printf "\033]4;100;rgb:79/74/0e\033\\" + printf "\033]4;136;rgb:b5/76/14\033\\" + printf "\033]4;24;rgb:07/66/78\033\\" + printf "\033]4;96;rgb:8f/3f/71\033\\" + printf "\033]4;66;rgb:42/7b/58\033\\" + printf "\033]4;130;rgb:af/3a/03\033\\" +fi diff --git a/dot_vim/plugged/gruvbox/executable_gruvbox_256palette_osx.sh b/dot_vim/plugged/gruvbox/executable_gruvbox_256palette_osx.sh new file mode 100644 index 0000000..ad5111a --- /dev/null +++ b/dot_vim/plugged/gruvbox/executable_gruvbox_256palette_osx.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +if [ "${TERM%%-*}" = "screen" ]; then + if [ -n "$TMUX" ]; then + printf "\033Ptmux;\033\033]4;236;rgb:26/24/23\007\033\\" + printf "\033Ptmux;\033\033]4;234;rgb:16/18/19\007\033\\" + + printf "\033Ptmux;\033\033]4;235;rgb:1e/1e/1e\007\033\\" + printf "\033Ptmux;\033\033]4;237;rgb:2e/2a/29\007\033\\" + printf "\033Ptmux;\033\033]4;239;rgb:3f/39/35\007\033\\" + printf "\033Ptmux;\033\033]4;241;rgb:53/4a/42\007\033\\" + printf "\033Ptmux;\033\033]4;243;rgb:68/5c/51\007\033\\" + + printf "\033Ptmux;\033\033]4;244;rgb:7f/70/61\007\033\\" + printf "\033Ptmux;\033\033]4;245;rgb:7f/70/61\007\033\\" + + printf "\033Ptmux;\033\033]4;228;rgb:ef/df/ae\007\033\\" + printf "\033Ptmux;\033\033]4;230;rgb:f8/f4/cd\007\033\\" + + printf "\033Ptmux;\033\033]4;229;rgb:fa/ee/bb\007\033\\" + printf "\033Ptmux;\033\033]4;223;rgb:e6/d4/a3\007\033\\" + printf "\033Ptmux;\033\033]4;250;rgb:cb/b8/90\007\033\\" + printf "\033Ptmux;\033\033]4;248;rgb:af/9f/81\007\033\\" + printf "\033Ptmux;\033\033]4;246;rgb:97/87/71\007\033\\" + + printf "\033Ptmux;\033\033]4;167;rgb:f7/30/28\007\033\\" + printf "\033Ptmux;\033\033]4;142;rgb:aa/b0/1e\007\033\\" + printf "\033Ptmux;\033\033]4;214;rgb:f7/b1/25\007\033\\" + printf "\033Ptmux;\033\033]4;109;rgb:71/95/86\007\033\\" + printf "\033Ptmux;\033\033]4;175;rgb:c7/70/89\007\033\\" + printf "\033Ptmux;\033\033]4;108;rgb:7d/b6/69\007\033\\" + printf "\033Ptmux;\033\033]4;208;rgb:fb/6a/16\007\033\\" + + printf "\033Ptmux;\033\033]4;88;rgb:89/00/09\007\033\\" + printf "\033Ptmux;\033\033]4;100;rgb:66/62/0d\007\033\\" + printf "\033Ptmux;\033\033]4;136;rgb:a5/63/11\007\033\\" + printf "\033Ptmux;\033\033]4;24;rgb:0e/53/65\007\033\\" + printf "\033Ptmux;\033\033]4;96;rgb:7b/2b/5e\007\033\\" + printf "\033Ptmux;\033\033]4;66;rgb:35/6a/46\007\033\\" + printf "\033Ptmux;\033\033]4;130;rgb:9d/28/07\007\033\\" + else + printf "\033P\033]4;236;rgb:26/24/23\007\033\\" + printf "\033P\033]4;234;rgb:16/18/19\007\033\\" + + printf "\033P\033]4;235;rgb:1e/1e/1e\007\033\\" + printf "\033P\033]4;237;rgb:2e/2a/29\007\033\\" + printf "\033P\033]4;239;rgb:3f/39/35\007\033\\" + printf "\033P\033]4;241;rgb:53/4a/42\007\033\\" + printf "\033P\033]4;243;rgb:68/5c/51\007\033\\" + + printf "\033P\033]4;244;rgb:7f/70/61\007\033\\" + printf "\033P\033]4;245;rgb:7f/70/61\007\033\\" + + printf "\033P\033]4;228;rgb:ef/df/ae\007\033\\" + printf "\033P\033]4;230;rgb:f8/f4/cd\007\033\\" + + printf "\033P\033]4;229;rgb:fa/ee/bb\007\033\\" + printf "\033P\033]4;223;rgb:e6/d4/a3\007\033\\" + printf "\033P\033]4;250;rgb:cb/b8/90\007\033\\" + printf "\033P\033]4;248;rgb:af/9f/81\007\033\\" + printf "\033P\033]4;246;rgb:97/87/71\007\033\\" + + printf "\033P\033]4;167;rgb:f7/30/28\007\033\\" + printf "\033P\033]4;142;rgb:aa/b0/1e\007\033\\" + printf "\033P\033]4;214;rgb:f7/b1/25\007\033\\" + printf "\033P\033]4;109;rgb:71/95/86\007\033\\" + printf "\033P\033]4;175;rgb:c7/70/89\007\033\\" + printf "\033P\033]4;108;rgb:7d/b6/69\007\033\\" + printf "\033P\033]4;208;rgb:fb/6a/16\007\033\\" + + printf "\033P\033]4;88;rgb:89/00/09\007\033\\" + printf "\033P\033]4;100;rgb:66/62/0d\007\033\\" + printf "\033P\033]4;136;rgb:a5/63/11\007\033\\" + printf "\033P\033]4;24;rgb:0e/53/65\007\033\\" + printf "\033P\033]4;96;rgb:7b/2b/5e\007\033\\" + printf "\033P\033]4;66;rgb:35/6a/46\007\033\\" + printf "\033P\033]4;130;rgb:9d/28/07\007\033\\" + fi +else + printf "\033]4;236;rgb:26/24/23\033\\" + printf "\033]4;234;rgb:16/18/19\033\\" + + printf "\033]4;235;rgb:1e/1e/1e\033\\" + printf "\033]4;237;rgb:2e/2a/29\033\\" + printf "\033]4;239;rgb:3f/39/35\033\\" + printf "\033]4;241;rgb:53/4a/42\033\\" + printf "\033]4;243;rgb:68/5c/51\033\\" + + printf "\033]4;244;rgb:7f/70/61\033\\" + printf "\033]4;245;rgb:7f/70/61\033\\" + + printf "\033]4;228;rgb:ef/df/ae\033\\" + printf "\033]4;230;rgb:f8/f4/cd\033\\" + + printf "\033]4;229;rgb:fa/ee/bb\033\\" + printf "\033]4;223;rgb:e6/d4/a3\033\\" + printf "\033]4;250;rgb:cb/b8/90\033\\" + printf "\033]4;248;rgb:af/9f/81\033\\" + printf "\033]4;246;rgb:97/87/71\033\\" + + printf "\033]4;167;rgb:f7/30/28\033\\" + printf "\033]4;142;rgb:aa/b0/1e\033\\" + printf "\033]4;214;rgb:f7/b1/25\033\\" + printf "\033]4;109;rgb:71/95/86\033\\" + printf "\033]4;175;rgb:c7/70/89\033\\" + printf "\033]4;108;rgb:7d/b6/69\033\\" + printf "\033]4;208;rgb:fb/6a/16\033\\" + + printf "\033]4;88;rgb:89/00/09\033\\" + printf "\033]4;100;rgb:66/62/0d\033\\" + printf "\033]4;136;rgb:a5/63/11\033\\" + printf "\033]4;24;rgb:0e/53/65\033\\" + printf "\033]4;96;rgb:7b/2b/5e\033\\" + printf "\033]4;66;rgb:35/6a/46\033\\" + printf "\033]4;130;rgb:9d/28/07\033\\" +fi diff --git a/dot_vim/plugged/gruvbox/package.json b/dot_vim/plugged/gruvbox/package.json new file mode 100644 index 0000000..355c180 --- /dev/null +++ b/dot_vim/plugged/gruvbox/package.json @@ -0,0 +1,10 @@ +{ + "name": "gruvbox", + "version": "2.0.0", + "repository": "git@github.com:morhetz/gruvbox.git", + "author": "Pavel Pertsev ", + "license": "MIT", + "vim": { + "opt": true + } +} diff --git a/dot_vim/plugged/pony-vim-syntax/LICENSE b/dot_vim/plugged/pony-vim-syntax/LICENSE new file mode 100644 index 0000000..a84c395 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/LICENSE @@ -0,0 +1,25 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + diff --git a/dot_vim/plugged/pony-vim-syntax/README.md b/dot_vim/plugged/pony-vim-syntax/README.md new file mode 100644 index 0000000..faca9aa --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/README.md @@ -0,0 +1,3 @@ +A syntax file for editing [pony](http://ponylang.org) source files in [vim](http://www.vim.org/). + +Install with your favourite plugin manager such as [vim-plug](https://github.com/junegunn/vim-plug) or [pathogen](https://github.com/tpope/vim-pathogen). diff --git a/dot_vim/plugged/pony-vim-syntax/autoload/neomake/makers/ft/pony.vim b/dot_vim/plugged/pony-vim-syntax/autoload/neomake/makers/ft/pony.vim new file mode 100644 index 0000000..34d9cbb --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/autoload/neomake/makers/ft/pony.vim @@ -0,0 +1,14 @@ +function! neomake#makers#ft#pony#EnabledMakers() + return ['ponyc'] +endfunction + +function! neomake#makers#ft#pony#ponyc() + " This is currently a hack. Ponyc itself uses the project directory as + " the target to build. Using %:p:h like this fetches the parent + " directory of the current file which might cause supurious errors on + " package imports if the current file is nested under a sub-directory. + return { + \ 'args': ['--pass=expr', '%:p:h'], + \ 'errorformat': '%f:%l:%c: %m' + \ } +endfunction diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/HEAD b/dot_vim/plugged/pony-vim-syntax/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/branches/.keep b/dot_vim/plugged/pony-vim-syntax/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/config b/dot_vim/plugged/pony-vim-syntax/dot_git/config new file mode 100644 index 0000000..3eee313 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/dleonard0/pony-vim-syntax.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/description b/dot_vim/plugged/pony-vim-syntax/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/post-update.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-push.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/index b/dot_vim/plugged/pony-vim-syntax/dot_git/index new file mode 100644 index 0000000..31da433 Binary files /dev/null and b/dot_vim/plugged/pony-vim-syntax/dot_git/index differ diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/info/exclude b/dot_vim/plugged/pony-vim-syntax/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/logs/HEAD b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/HEAD new file mode 100644 index 0000000..ee94a9a --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc LinlyBoi 1673460161 +0200 clone: from https://github.com/dleonard0/pony-vim-syntax.git +caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc LinlyBoi 1673460166 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/heads/master b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..19839e6 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc LinlyBoi 1673460161 +0200 clone: from https://github.com/dleonard0/pony-vim-syntax.git diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..19839e6 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc LinlyBoi 1673460161 +0200 clone: from https://github.com/dleonard0/pony-vim-syntax.git diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/objects/info/.keep b/dot_vim/plugged/pony-vim-syntax/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.idx b/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.idx new file mode 100644 index 0000000..5c822e2 Binary files /dev/null and b/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.idx differ diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.pack b/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.pack new file mode 100644 index 0000000..3953d18 Binary files /dev/null and b/dot_vim/plugged/pony-vim-syntax/dot_git/objects/pack/readonly_pack-ff9bbc7fd9e747e73f37a198f8e2c83e2e7934f9.pack differ diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/packed-refs b/dot_vim/plugged/pony-vim-syntax/dot_git/packed-refs new file mode 100644 index 0000000..0bfec9e --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc refs/remotes/origin/master diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/refs/heads/master b/dot_vim/plugged/pony-vim-syntax/dot_git/refs/heads/master new file mode 100644 index 0000000..483498d --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/refs/heads/master @@ -0,0 +1 @@ +caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/pony-vim-syntax/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/refs/tags/.keep b/dot_vim/plugged/pony-vim-syntax/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/pony-vim-syntax/dot_git/shallow b/dot_vim/plugged/pony-vim-syntax/dot_git/shallow new file mode 100644 index 0000000..483498d --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/dot_git/shallow @@ -0,0 +1 @@ +caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc diff --git a/dot_vim/plugged/pony-vim-syntax/ftdetect/pony.vim b/dot_vim/plugged/pony-vim-syntax/ftdetect/pony.vim new file mode 100644 index 0000000..af247fb --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/ftdetect/pony.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *.pony set filetype=pony diff --git a/dot_vim/plugged/pony-vim-syntax/syntax/pony.vim b/dot_vim/plugged/pony-vim-syntax/syntax/pony.vim new file mode 100644 index 0000000..625fe38 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/syntax/pony.vim @@ -0,0 +1,180 @@ +" Vim syntax file +" Language: Pony +" Maintainer: You +" Last Change: 2015 May 6 +" Original Author: David Leonard + +if exists("b:current_syntax") + finish +endif + +" For syntastic as the 'pony' filetype is not officially registered. +if exists('g:syntastic_extra_filetypes') + call add(g:syntastic_extra_filetypes, 'pony') +else + let g:syntastic_extra_filetypes = ['pony'] +endif + +" TODO add markdown to triple-comments + +syn case match + +" Sync at the beginning of classes, functions +syn sync match ponySync grouphere NONE "^\s*\%(class\|fun\|be\|new\)\s\+[a-zA-Z_]" + +" Constants +syn region ponyString start=+"+ skip=+\\"+ end=+"+ contains=ponyEscape +syn region ponyTripleString start=+"""+ end=+"""+ contains=ponyEscape,@markdownBlock +syn match ponyEscape contained "\\x\x\{2}" +syn match ponyEscape contained "\\u\x\{4}" +syn match ponyEscape contained "\\U\x\{6}" +syn match ponyEscape contained "\\[\\abefnrtv\"'0]" + +hi def link ponyString String +hi def link ponyTripleString String +hi def link ponyEscape Character + +syn match ponyInt "\d\+" +syn match ponyIntError "0[bx]" +syn match ponyInt "0x\x\+" +syn match ponyInt "0b[01]\+" +syn match ponyCharError "'" +syn match ponyChar "'[^\\']'" +syn match ponyChar "'\\[\\abefnrtv\"'0]'" contains=ponyEscape +syn match ponyChar "'\\x\x\{2}'" contains=ponyEscape +syn match ponyChar "'\\u\x\{4}'" contains=ponyEscape +syn match ponyChar "'\\U\x\{6}'" contains=ponyEscape +syn keyword ponyBoolean true false +syn match ponyReal "\d\+\%(\.\d\+\)\=[Ee][+-]\=\d\+" +syn match ponyReal "\d\+\.\d\+\%([Ee][+-]\=\d\+\)\=" + +hi def link ponyInt Number +hi def link ponyChar Number +hi def link ponyBoolean Boolean +hi def link ponyReal Float +hi def link ponyCharError Error +hi def link ponyIntError Error + +" Identifiers + +syn match ponyId "\<\a[a-zA-Z0-9_']*" nextgroup=ponyCap,ponyCapMod +syn match ponyPrivateId "\<_[a-zA-Z0-9_']\+" +syn cluster PonyIdentifier contains=ponyId,ponyPrivateId +"hi def link ponyId Identifier +"hi def link ponyPrivateId Identifier + +syn keyword ponyBuiltinClass Array ArrayKeys ArrayValues ArrayPairs +syn keyword ponyBuiltinClass Env Pointer String StringValues +hi def link ponyBuiltinClass Structure + +syn keyword ponyBuiltinType Number Signed Unsigned Float +syn keyword ponyBuiltinType I8 I16 I32 I64 I128 U8 U16 U32 U64 U128 F32 F64 +syn keyword ponyBuiltinType EventID Align IntFormat NumberPrefix FloatFormat +hi def link ponyBuiltinType Type + +syn keyword ponyBuiltinIface Arithmetic Logical Bits Comparable Ordered +syn keyword ponyBuiltinIface EventNotify Iterator ReadSeq StdinNotify Seq +syn keyword ponyBuiltinIface Stringable Bytes BytesList Stream Any +hi def link ponyBuiltinIface Type + +syn region ponyMethodDecl matchgroup=ponyMethodKeyword start=+\<\%(fun\|be\|new\)\>+ end=+[[({]\@=+ contains=ponyCap,ponyMethod,@PonyComment +syn keyword ponyMethodKeyword contained fun be new +syn match ponyMethod contained "\<\a[a-zA-Z0-9_']*" +syn match ponyMethod contained "\<_[a-zA-Z0-9_']\+" +hi def link ponyMethod Function +hi def link ponyMethodKeyword Keyword + +syn region ponyVarDecl matchgroup=ponyVarKeyword start=+\<\%(var\|let\|embed\)\>+ end=+[:=]\@=+ contains=ponyVar,@PonyComment +syn keyword ponyVarKeyword contained var let embed +syn match ponyVar contained "\<\a[a-zA-Z0-9_']*" +syn match ponyVar contained "\<_[a-zA-Z0-9_']\+" +hi def link ponyVar Identifier +hi def link ponyVarKeyword Keyword + +" Operators and delimiters + +syn match ponyCapModError +[\^\!]+ +hi def link ponyCapModError Error + +syn match ponyQuestion +?+ +hi def link ponyQuestion StorageClass + +syn match ponyAt +@+ +hi def link ponyAt Delimiter + +syn match ponyAtOpError +@[^ \-[("a-zA-Z_]+ +syn match ponyAtIdError +@\s\+[^"a-zA-Z_]+ +hi def link ponyAtIdError Error +hi def link ponyAtOpError Error + +syn keyword ponyOp1 and or xor is isnt not consume +syn match ponyOp2 +\([=!]=\|[<>]=\|<<\|>>\|@-\|[-+<>*/%&|]\)+ +hi def link ponyOp1 Operator +hi def link ponyOp2 Operator + +" Keywords + +syn keyword ponyUse use +hi def link ponyUse Include + +syn keyword ponyStatement return break continue +syn keyword ponyKeyword error +syn keyword ponyConditional if then else elseif match +syn keyword ponyKeyword do end +syn keyword ponyKeyword in +syn keyword ponyRepeat while repeat until for +syn keyword ponyKeyword with +syn keyword ponyTry try recover +syn keyword ponyKeyword this box +syn keyword ponyKeyword as where +hi def link ponyStatement Statement +hi def link ponyConditional Conditional +hi def link ponyRepeat Repeat +hi def link ponyKeyword Keyword +hi def link ponyTry Exception + +syn keyword ponyTypedef type +syn keyword ponyStructure interface trait primitive class actor +hi def link ponyTypedef Typedef +hi def link ponyStructure Structure + +syn keyword ponyCap iso trn ref val box tag nextgroup=ponyCapMod +syn match ponyCapMod contained +[\^\!]+ +hi def link ponyCap StorageClass +hi def link ponyCapMod StorageClass + +syn keyword ponySpecial compiler_intrinsic +hi def link ponySpecial Special + +syn keyword ponyAny _ +hi def link ponyAny Special + +" Parentheses + +syn match ponyParenError +[()]+ +syn region ponyParen transparent start=+(+ end=+)+ contains=TOP,ponyParenError +syn match ponyArrayError +[\[\]]+ +syn region ponyArray transparent start=+\[+ end=+]+ contains=TOP,ponyArrayError +syn match ponyConstError +[{}]+ +syn region ponyConst transparent start=+{+ end=+}+ contains=TOP,ponyConstError + +hi def link ponyParenError Error +hi def link ponyArrayError Error +hi def link ponyConstError Error + +" Methods + +syn match ponyIntroducer +=>+ +hi def link ponyIntroducer Delimiter + +" Comments +syn region ponyLineComment start=+//+ end=+$+ contains=ponyTodo keepend +syn region ponyNestedComment start=+/\*+ end=+\*/+ contains=ponyTodo,ponyNestedComment +syn cluster ponyComment contains=ponyLineComment,ponyNestedComment +syn keyword ponyTodo contained TODO FIXME XXX + +hi def link ponyLineComment Comment +hi def link ponyNestedComment Comment +hi def link ponyTodo Todo + +let b:current_syntax = "pony" diff --git a/dot_vim/plugged/pony-vim-syntax/syntax_checkers/pony/ponyc.vim b/dot_vim/plugged/pony-vim-syntax/syntax_checkers/pony/ponyc.vim new file mode 100644 index 0000000..c00ac01 --- /dev/null +++ b/dot_vim/plugged/pony-vim-syntax/syntax_checkers/pony/ponyc.vim @@ -0,0 +1,43 @@ +"============================================================================ +"File: ponyc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Earnestly +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. +" +"============================================================================ + +if exists('g:loaded_syntastic_pony_ponyc_checker') + finish +endif +let g:loaded_syntastic_pony_ponyc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_pony_ponyc_GetLocList() dict + + " This is currently a hack. `ponyc` itself uses the project directory as + " the target to build. Using expand like this fetches the parent + " directory of the current file which might cause supurious errors on + " package imports if the current file is nested under a sub-directory. + let n = expand('%:p:h') + + let makeprg = self.makeprgBuild({ + \ 'args': '--pass=expr', + \ 'fname': n}) + + let errorformat = + \ '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'pony', + \ 'name': 'ponyc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/dot_vim/plugged/rainbow_parentheses.vim/autoload/rainbow_parentheses.vim b/dot_vim/plugged/rainbow_parentheses.vim/autoload/rainbow_parentheses.vim new file mode 100644 index 0000000..87a74ad --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/autoload/rainbow_parentheses.vim @@ -0,0 +1,98 @@ +"============================================================================== +" Description: Rainbow colors for parentheses, based on rainbow_parenthsis.vim +" by Martin Krischik and others. +" 2011-10-12: Use less code. Leave room for deeper levels. +"============================================================================== + +let s:pairs = [ + \ ['brown', 'RoyalBlue3'], + \ ['Darkblue', 'SeaGreen3'], + \ ['darkgray', 'DarkOrchid3'], + \ ['darkgreen', 'firebrick3'], + \ ['darkcyan', 'RoyalBlue3'], + \ ['darkred', 'SeaGreen3'], + \ ['darkmagenta', 'DarkOrchid3'], + \ ['brown', 'firebrick3'], + \ ['gray', 'RoyalBlue3'], + \ ['black', 'SeaGreen3'], + \ ['darkmagenta', 'DarkOrchid3'], + \ ['Darkblue', 'firebrick3'], + \ ['darkgreen', 'RoyalBlue3'], + \ ['darkcyan', 'SeaGreen3'], + \ ['darkred', 'DarkOrchid3'], + \ ['red', 'firebrick3'], + \ ] +let s:pairs = exists('g:rbpt_colorpairs') ? g:rbpt_colorpairs : s:pairs +let s:max = exists('g:rbpt_max') ? g:rbpt_max : max([len(s:pairs), 16]) +let s:loadtgl = exists('g:rbpt_loadcmd_toggle') ? g:rbpt_loadcmd_toggle : 0 +let s:types = [['(',')'],['\[','\]'],['{','}'],['<','>']] + +func! s:extend() + if s:max > len(s:pairs) + cal extend(s:pairs, s:pairs) + cal s:extend() + elseif s:max < len(s:pairs) + cal remove(s:pairs, s:max, -1) + endif +endfunc +cal s:extend() + +func! rainbow_parentheses#activate() + let [id, s:active] = [1, 1] + for [ctermfg, guifg] in s:pairs + exe 'hi default level'.id.'c ctermfg='.ctermfg.' guifg='.guifg + let id += 1 + endfor +endfunc + +func! rainbow_parentheses#clear() + for each in range(1, s:max) + exe 'hi clear level'.each.'c' + endfor + let s:active = 0 +endfunc + +func! rainbow_parentheses#toggle() + if !exists('s:active') + cal rainbow_parentheses#load(0) + endif + let afunc = exists('s:active') && s:active ? 'clear' : 'activate' + cal call('rainbow_parentheses#'.afunc, []) +endfunc + +func! rainbow_parentheses#toggleall() + if !exists('s:active') + cal rainbow_parentheses#load(0) + cal rainbow_parentheses#load(1) + cal rainbow_parentheses#load(2) + endif + if exists('s:active') && s:active + cal rainbow_parentheses#clear() + else + cal rainbow_parentheses#activate() + endif +endfunc + +func! s:cluster() + let levels = join(map(range(1, s:max), '"level".v:val'), ',') + exe 'sy cluster rainbow_parentheses contains=@TOP'.levels.',NoInParens' +endfunc +cal s:cluster() + +func! rainbow_parentheses#load(...) + let [level, grp, type] = ['', '', s:types[a:1]] + let alllvls = map(range(1, s:max), '"level".v:val') + if !exists('b:loaded') + let b:loaded = [0,0,0,0] + endif + let b:loaded[a:1] = s:loadtgl && b:loaded[a:1] ? 0 : 1 + for each in range(1, s:max) + let region = 'level'. each .(b:loaded[a:1] ? '' : 'none') + let grp = b:loaded[a:1] ? 'level'.each.'c' : 'Normal' + let cmd = 'sy region %s matchgroup=%s start=/%s/ end=/%s/ contains=TOP,%s,NoInParens' + exe printf(cmd, region, grp, type[0], type[1], join(alllvls, ',')) + cal remove(alllvls, 0) + endfor +endfunc + +" vim:ts=2:sw=2:sts=2 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/HEAD b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/branches/.keep b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/config b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/config new file mode 100644 index 0000000..51706fd --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/kien/rainbow_parentheses.vim.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/description b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/post-update.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-push.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/index b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/index new file mode 100644 index 0000000..70e957d Binary files /dev/null and b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/index differ diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/info/exclude b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/HEAD b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/HEAD new file mode 100644 index 0000000..09d3c9a --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 LinlyBoi 1673460162 +0200 clone: from https://github.com/kien/rainbow_parentheses.vim.git +eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 LinlyBoi 1673460166 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/heads/master b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..81f672b --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 LinlyBoi 1673460162 +0200 clone: from https://github.com/kien/rainbow_parentheses.vim.git diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..81f672b --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 LinlyBoi 1673460162 +0200 clone: from https://github.com/kien/rainbow_parentheses.vim.git diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/info/.keep b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.idx b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.idx new file mode 100644 index 0000000..b4a9326 Binary files /dev/null and b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.idx differ diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.pack b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.pack new file mode 100644 index 0000000..6bdd143 Binary files /dev/null and b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/objects/pack/readonly_pack-8767058172ee12147ab6b2c064135484c529c208.pack differ diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/packed-refs b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/packed-refs new file mode 100644 index 0000000..e0c9596 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 refs/remotes/origin/master diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/heads/master b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/heads/master new file mode 100644 index 0000000..a02f0d7 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/heads/master @@ -0,0 +1 @@ +eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/tags/.keep b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/dot_git/shallow b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/shallow new file mode 100644 index 0000000..a02f0d7 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/dot_git/shallow @@ -0,0 +1 @@ +eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 diff --git a/dot_vim/plugged/rainbow_parentheses.vim/plugin/rainbow_parentheses.vim b/dot_vim/plugged/rainbow_parentheses.vim/plugin/rainbow_parentheses.vim new file mode 100644 index 0000000..20ce8e5 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/plugin/rainbow_parentheses.vim @@ -0,0 +1,13 @@ +"============================================================================== +" Description: Rainbow colors for parentheses, based on rainbow_parenthsis.vim +" by Martin Krischik and others. +"============================================================================== +" GetLatestVimScripts: 3772 1 :AutoInstall: rainbow_parentheses.zip + +com! RainbowParenthesesToggle cal rainbow_parentheses#toggle() +com! RainbowParenthesesToggleAll cal rainbow_parentheses#toggleall() +com! RainbowParenthesesActivate cal rainbow_parentheses#activate() +com! RainbowParenthesesLoadRound cal rainbow_parentheses#load(0) +com! RainbowParenthesesLoadSquare cal rainbow_parentheses#load(1) +com! RainbowParenthesesLoadBraces cal rainbow_parentheses#load(2) +com! RainbowParenthesesLoadChevrons cal rainbow_parentheses#load(3) diff --git a/dot_vim/plugged/rainbow_parentheses.vim/readme.md b/dot_vim/plugged/rainbow_parentheses.vim/readme.md new file mode 100644 index 0000000..ddb8dd9 --- /dev/null +++ b/dot_vim/plugged/rainbow_parentheses.vim/readme.md @@ -0,0 +1,51 @@ +# Better Rainbow Parentheses + +### Options: + +```vim +let g:rbpt_colorpairs = [ + \ ['brown', 'RoyalBlue3'], + \ ['Darkblue', 'SeaGreen3'], + \ ['darkgray', 'DarkOrchid3'], + \ ['darkgreen', 'firebrick3'], + \ ['darkcyan', 'RoyalBlue3'], + \ ['darkred', 'SeaGreen3'], + \ ['darkmagenta', 'DarkOrchid3'], + \ ['brown', 'firebrick3'], + \ ['gray', 'RoyalBlue3'], + \ ['black', 'SeaGreen3'], + \ ['darkmagenta', 'DarkOrchid3'], + \ ['Darkblue', 'firebrick3'], + \ ['darkgreen', 'RoyalBlue3'], + \ ['darkcyan', 'SeaGreen3'], + \ ['darkred', 'DarkOrchid3'], + \ ['red', 'firebrick3'], + \ ] +``` + +```vim +let g:rbpt_max = 16 +``` + +```vim +let g:rbpt_loadcmd_toggle = 0 +``` + +### Commands: + +```vim +:RainbowParenthesesToggle " Toggle it on/off +:RainbowParenthesesLoadRound " (), the default when toggling +:RainbowParenthesesLoadSquare " [] +:RainbowParenthesesLoadBraces " {} +:RainbowParenthesesLoadChevrons " <> +``` + +### Always On: + +```vim +au VimEnter * RainbowParenthesesToggle +au Syntax * RainbowParenthesesLoadRound +au Syntax * RainbowParenthesesLoadSquare +au Syntax * RainbowParenthesesLoadBraces +``` diff --git a/dot_vim/plugged/rust.vim/ISSUE_TEMPLATE.md b/dot_vim/plugged/rust.vim/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..cf8c71b --- /dev/null +++ b/dot_vim/plugged/rust.vim/ISSUE_TEMPLATE.md @@ -0,0 +1,28 @@ + + +* rust.vim version: + +Steps to reproduce: + + +_?_ + +Expected vs. actual behavior: + +_?_ + +Paste debugging info from the Rust Vim plugin via _one_ of the following +commands: `:RustInfo`, `:RustInfoToClipboard`, or `:RustInfoToFile `. + + +_?_ diff --git a/dot_vim/plugged/rust.vim/LICENSE-APACHE b/dot_vim/plugged/rust.vim/LICENSE-APACHE new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/dot_vim/plugged/rust.vim/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dot_vim/plugged/rust.vim/LICENSE-MIT b/dot_vim/plugged/rust.vim/LICENSE-MIT new file mode 100644 index 0000000..e69282e --- /dev/null +++ b/dot_vim/plugged/rust.vim/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2015 The Rust Project Developers + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/dot_vim/plugged/rust.vim/README.md b/dot_vim/plugged/rust.vim/README.md new file mode 100644 index 0000000..c1d428b --- /dev/null +++ b/dot_vim/plugged/rust.vim/README.md @@ -0,0 +1,135 @@ +# rust.vim + +## Description + +This is a Vim plugin that provides [Rust][r] file detection, syntax highlighting, formatting, +[Syntastic][syn] integration, and more. It requires Vim 8 or higher for full functionality. +Some things may not work on earlier versions. + +## Installation + +For activating the full functionality, this plugin requires either the plugin +manager or the `.vimrc` to have the following: + +```vim +syntax enable +filetype plugin indent on +``` + +Most plugin managers don't do this automatically, so these statements are +usually added by users in their `vimrc` _right after_ the plugin manager load +section. + +### [Vim8 packages][vim8pack] + +```sh +git clone https://github.com/rust-lang/rust.vim ~/.vim/pack/plugins/start/rust.vim +``` + +### [Vundle][v] + +```vim +Plugin 'rust-lang/rust.vim' +``` + +### [Pathogen][p] + +```sh +git clone --depth=1 https://github.com/rust-lang/rust.vim.git ~/.vim/bundle/rust.vim +``` + +### [vim-plug][vp] + +```vim +Plug 'rust-lang/rust.vim' +``` + +### [dein.vim][d] + +```vim +call dein#add('rust-lang/rust.vim') +``` + +### [NeoBundle][nb] + +```vim +NeoBundle 'rust-lang/rust.vim' +``` + +## Features + +### Error checking with [Syntastic][syn] + +`rust.vim` automatically registers `cargo` as a syntax checker with +[Syntastic][syn], if nothing else is specified. See `:help rust-syntastic` +for more details. + +### Source browsing with [Tagbar][tgbr] + +The installation of Tagbar along with [Universal Ctags][uctags] is recommended +for a good Tagbar experience. For other kinds of setups, `rust.vim` tries to +configure Tagbar to some degree. + +### Formatting with [rustfmt][rfmt] + +The `:RustFmt` command will format your code with +[rustfmt][rfmt] if installed. `rustfmt` can be installed +via `rustup component add rustfmt`. + +Placing `let g:rustfmt_autosave = 1` in your `~/.vimrc` will +enable automatic running of `:RustFmt` when you save a buffer. + +Do `:help :RustFmt` for further formatting help and customization +options. + +### [Playpen][pp] integration + +*Note:* This feature requires [webapi-vim][wav] to be installed. + +The `:RustPlay` command will send the current selection, or if +nothing is selected the current buffer, to the [Rust playpen][pp]. + +If you set g:rust_clip_command RustPlay will copy the url to the clipboard. + +- Mac: + + let g:rust_clip_command = 'pbcopy' + +- Linux: + + let g:rust_clip_command = 'xclip -selection clipboard' + +### Running a test under cursor + +In a Cargo project, the `:RustTest` command will run the test that is under the cursor. +This is useful when your project is big and running all of the tests takes a long time. + +## Help + +Further help can be found in the documentation with `:Helptags` then `:help rust`. + +Detailed help can be found in the documentation with `:help rust`. +Helptags (`:help helptags`) need to be generated for this plugin +in order to navigate the help. Most plugin managers will do this +automatically, but check their documentation if that is not the case. + +## License + +Like Rust, rust.vim is primarily distributed under the terms of both the MIT +license and the Apache License (Version 2.0). See LICENSE-APACHE and +LICENSE-MIT for details. + +[r]: https://www.rust-lang.org +[v]: https://github.com/gmarik/vundle +[vqs]: https://github.com/gmarik/vundle#quick-start +[p]: https://github.com/tpope/vim-pathogen +[nb]: https://github.com/Shougo/neobundle.vim +[vp]: https://github.com/junegunn/vim-plug +[d]: https://github.com/Shougo/dein.vim +[rfmt]: https://github.com/rust-lang-nursery/rustfmt +[syn]: https://github.com/scrooloose/syntastic +[tgbr]: https://github.com/majutsushi/tagbar +[uctags]: https://ctags.io +[wav]: https://github.com/mattn/webapi-vim +[pp]: https://play.rust-lang.org/ +[vim8pack]: http://vimhelp.appspot.com/repeat.txt.html#packages diff --git a/dot_vim/plugged/rust.vim/after/syntax/rust.vim b/dot_vim/plugged/rust.vim/after/syntax/rust.vim new file mode 100644 index 0000000..62bfc65 --- /dev/null +++ b/dot_vim/plugged/rust.vim/after/syntax/rust.vim @@ -0,0 +1,41 @@ +scriptencoding utf-8 + +if !get(g:, 'rust_conceal', 0) || !has('conceal') || &encoding !=# 'utf-8' + finish +endif + +" For those who don't want to see `::`... +if get(g:, 'rust_conceal_mod_path', 0) + syn match rustNiceOperator "::" conceal cchar=ㆠ+endif + +syn match rustRightArrowHead contained ">" conceal cchar=  +syn match rustRightArrowTail contained "-" conceal cchar=⟶ +syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail + +syn match rustFatRightArrowHead contained ">" conceal cchar=  +syn match rustFatRightArrowTail contained "=" conceal cchar=⟹ +syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrowTail + +syn match rustNiceOperator /\<\@!_\(_*\>\)\@=/ conceal cchar=′ + +" For those who don't want to see `pub`... +if get(g:, 'rust_conceal_pub', 0) + syn match rustPublicSigil contained "pu" conceal cchar=* + syn match rustPublicRest contained "b" conceal cchar=  + syn match rustNiceOperator "pub " contains=rustPublicSigil,rustPublicRest +endif + +hi link rustNiceOperator Operator + +if !get(g:, 'rust_conceal_mod_path', 0) + hi! link Conceal Operator + + augroup rust.vim.after + autocmd! + " And keep it after a colorscheme change + autocmd ColorScheme hi! link Conceal Operator + augroup END +endif + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/cargo.vim b/dot_vim/plugged/rust.vim/autoload/cargo.vim new file mode 100644 index 0000000..a95a57f --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/cargo.vim @@ -0,0 +1,147 @@ +function! cargo#Load() + " Utility call to get this script loaded, for debugging +endfunction + +function! cargo#cmd(args) abort + " Trim trailing spaces. This is necessary since :terminal command parses + " trailing spaces as an empty argument. + let args = substitute(a:args, '\s\+$', '', '') + if exists('g:cargo_shell_command_runner') + let cmd = g:cargo_shell_command_runner + elseif has('terminal') + let cmd = 'terminal' + elseif has('nvim') + let cmd = 'noautocmd new | terminal' + else + let cmd = '!' + endif + execute cmd 'cargo' args +endfunction + +function! s:nearest_cargo(...) abort + " If the second argument is not specified, the first argument determines + " whether we will start from the current directory or the directory of the + " current buffer, otherwise, we start with the provided path on the + " second argument. + + let l:is_getcwd = get(a:, 1, 0) + if l:is_getcwd + let l:starting_path = get(a:, 2, getcwd()) + else + let l:starting_path = get(a:, 2, expand('%:p:h')) + endif + + return findfile('Cargo.toml', l:starting_path . ';') +endfunction + +function! cargo#nearestCargo(is_getcwd) abort + return s:nearest_cargo(a:is_getcwd) +endfunction + +function! cargo#nearestWorkspaceCargo(is_getcwd) abort + let l:nearest = s:nearest_cargo(a:is_getcwd) + while l:nearest !=# '' + for l:line in readfile(l:nearest, '', 0x100) + if l:line =~# '\V[workspace]' + return l:nearest + endif + endfor + let l:next = fnamemodify(l:nearest, ':p:h:h') + let l:nearest = s:nearest_cargo(0, l:next) + endwhile + return '' +endfunction + +function! cargo#nearestRootCargo(is_getcwd) abort + " Try to find a workspace Cargo.toml, and if not found, take the nearest + " regular Cargo.toml + let l:workspace_cargo = cargo#nearestWorkspaceCargo(a:is_getcwd) + if l:workspace_cargo !=# '' + return l:workspace_cargo + endif + return s:nearest_cargo(a:is_getcwd) +endfunction + + +function! cargo#build(args) + call cargo#cmd("build " . a:args) +endfunction + +function! cargo#check(args) + call cargo#cmd("check " . a:args) +endfunction + +function! cargo#clean(args) + call cargo#cmd("clean " . a:args) +endfunction + +function! cargo#doc(args) + call cargo#cmd("doc " . a:args) +endfunction + +function! cargo#new(args) + call cargo#cmd("new " . a:args) + cd `=a:args` +endfunction + +function! cargo#init(args) + call cargo#cmd("init " . a:args) +endfunction + +function! cargo#run(args) + call cargo#cmd("run " . a:args) +endfunction + +function! cargo#test(args) + call cargo#cmd("test " . a:args) +endfunction + +function! cargo#bench(args) + call cargo#cmd("bench " . a:args) +endfunction + +function! cargo#update(args) + call cargo#cmd("update " . a:args) +endfunction + +function! cargo#search(args) + call cargo#cmd("search " . a:args) +endfunction + +function! cargo#publish(args) + call cargo#cmd("publish " . a:args) +endfunction + +function! cargo#install(args) + call cargo#cmd("install " . a:args) +endfunction + +function! cargo#runtarget(args) + let l:filename = expand('%:p') + let l:read_manifest = system('cargo read-manifest') + let l:metadata = json_decode(l:read_manifest) + let l:targets = get(l:metadata, 'targets', []) + let l:did_run = 0 + for l:target in l:targets + let l:src_path = get(l:target, 'src_path', '') + let l:kinds = get(l:target, 'kind', []) + let l:name = get(l:target, 'name', '') + if l:src_path == l:filename + if index(l:kinds, 'example') != -1 + let l:did_run = 1 + call cargo#run("--example " . shellescape(l:name) . " " . a:args) + return + elseif index(l:kinds, 'bin') != -1 + let l:did_run = 1 + call cargo#run("--bin " . shellescape(l:name) . " " . a:args) + return + endif + endif + endfor + if l:did_run != 1 + call cargo#run(a:args) + return + endif +endfunction + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/cargo/quickfix.vim b/dot_vim/plugged/rust.vim/autoload/cargo/quickfix.vim new file mode 100644 index 0000000..fbeb42f --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/cargo/quickfix.vim @@ -0,0 +1,27 @@ +function! cargo#quickfix#CmdPre() abort + if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' && + \ &makeprg =~ '\V\^cargo\ \.\*' + " Preserve the current directory, and 'lcd' to the nearest Cargo file. + let b:rust_compiler_cargo_qf_has_lcd = haslocaldir() + let b:rust_compiler_cargo_qf_prev_cd = getcwd() + let b:rust_compiler_cargo_qf_prev_cd_saved = 1 + let l:nearest = fnamemodify(cargo#nearestRootCargo(0), ':h') + execute 'lchdir! '.l:nearest + else + let b:rust_compiler_cargo_qf_prev_cd_saved = 0 + endif +endfunction + +function! cargo#quickfix#CmdPost() abort + if exists("b:rust_compiler_cargo_qf_prev_cd_saved") && b:rust_compiler_cargo_qf_prev_cd_saved + " Restore the current directory. + if b:rust_compiler_cargo_qf_has_lcd + execute 'lchdir! '.b:rust_compiler_cargo_qf_prev_cd + else + execute 'chdir! '.b:rust_compiler_cargo_qf_prev_cd + endif + let b:rust_compiler_cargo_qf_prev_cd_saved = 0 + endif +endfunction + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/rust.vim b/dot_vim/plugged/rust.vim/autoload/rust.vim new file mode 100644 index 0000000..025949c --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/rust.vim @@ -0,0 +1,570 @@ +" Description: Helper functions for Rust commands/mappings +" Last Modified: May 27, 2014 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +function! rust#Load() + " Utility call to get this script loaded, for debugging +endfunction + +function! rust#GetConfigVar(name, default) + " Local buffer variable with same name takes predeence over global + if has_key(b:, a:name) + return get(b:, a:name) + endif + if has_key(g:, a:name) + return get(g:, a:name) + endif + return a:default +endfunction + +" Include expression {{{1 + +function! rust#IncludeExpr(fname) abort + " Remove leading 'crate::' to deal with 2018 edition style 'use' + " statements + let l:fname = substitute(a:fname, '^crate::', '', '') + + " Remove trailing colons arising from lines like + " + " use foo::{Bar, Baz}; + let l:fname = substitute(l:fname, ':\+$', '', '') + + " Replace '::' with '/' + let l:fname = substitute(l:fname, '::', '/', 'g') + + " When we have + " + " use foo::bar::baz; + " + " we can't tell whether baz is a module or a function; and we can't tell + " which modules correspond to files. + " + " So we work our way up, trying + " + " foo/bar/baz.rs + " foo/bar.rs + " foo.rs + while l:fname !=# '.' + let l:path = findfile(l:fname) + if !empty(l:path) + return l:fname + endif + let l:fname = fnamemodify(l:fname, ':h') + endwhile + return l:fname +endfunction + +" Jump {{{1 + +function! rust#Jump(mode, function) range + let cnt = v:count1 + normal! m' + if a:mode ==# 'v' + norm! gv + endif + let foldenable = &foldenable + set nofoldenable + while cnt > 0 + execute "call Jump_" . a:function . "()" + let cnt = cnt - 1 + endwhile + let &foldenable = foldenable +endfunction + +function! s:Jump_Back() + call search('{', 'b') + keepjumps normal! w99[{ +endfunction + +function! s:Jump_Forward() + normal! j0 + call search('{', 'b') + keepjumps normal! w99[{% + call search('{') +endfunction + +" Run {{{1 + +function! rust#Run(bang, args) + let args = s:ShellTokenize(a:args) + if a:bang + let idx = index(l:args, '--') + if idx != -1 + let rustc_args = idx == 0 ? [] : l:args[:idx-1] + let args = l:args[idx+1:] + else + let rustc_args = l:args + let args = [] + endif + else + let rustc_args = [] + endif + + let b:rust_last_rustc_args = l:rustc_args + let b:rust_last_args = l:args + + call s:WithPath(function("s:Run"), rustc_args, args) +endfunction + +function! s:Run(dict, rustc_args, args) + let exepath = a:dict.tmpdir.'/'.fnamemodify(a:dict.path, ':t:r') + if has('win32') + let exepath .= '.exe' + endif + + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let rustc_args = [relpath, '-o', exepath] + a:rustc_args + + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(rustc_args, 'shellescape(v:val)'))) + if output !=# '' + echohl WarningMsg + echo output + echohl None + endif + if !v:shell_error + exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)')) + endif +endfunction + +" Expand {{{1 + +function! rust#Expand(bang, args) + let args = s:ShellTokenize(a:args) + if a:bang && !empty(l:args) + let pretty = remove(l:args, 0) + else + let pretty = "expanded" + endif + call s:WithPath(function("s:Expand"), pretty, args) +endfunction + +function! s:Expand(dict, pretty, args) + try + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)' + let flag = '--xpretty' + else + let flag = '--pretty' + endif + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)'))) + if v:shell_error + echohl WarningMsg + echo output + echohl None + else + new + silent put =output + 1 + d + setl filetype=rust + setl buftype=nofile + setl bufhidden=hide + setl noswapfile + " give the buffer a nice name + let suffix = 1 + let basename = fnamemodify(a:dict.path, ':t:r') + while 1 + let bufname = basename + if suffix > 1 | let bufname .= ' ('.suffix.')' | endif + let bufname .= '.pretty.rs' + if bufexists(bufname) + let suffix += 1 + continue + endif + exe 'silent noautocmd keepalt file' fnameescape(bufname) + break + endwhile + endif + endtry +endfunction + +function! rust#CompleteExpand(lead, line, pos) + if a:line[: a:pos-1] =~# '^RustExpand!\s*\S*$' + " first argument and it has a ! + let list = ["normal", "expanded", "typed", "expanded,identified", "flowgraph=", "everybody_loops"] + if !empty(a:lead) + call filter(list, "v:val[:len(a:lead)-1] == a:lead") + endif + return list + endif + + return glob(escape(a:lead, "*?[") . '*', 0, 1) +endfunction + +" Emit {{{1 + +function! rust#Emit(type, args) + let args = s:ShellTokenize(a:args) + call s:WithPath(function("s:Emit"), a:type, args) +endfunction + +function! s:Emit(dict, type, args) + try + let output_path = a:dict.tmpdir.'/output' + + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let args = [relpath, '--emit', a:type, '-o', output_path] + a:args + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)'))) + if output !=# '' + echohl WarningMsg + echo output + echohl None + endif + if !v:shell_error + new + exe 'silent keepalt read' fnameescape(output_path) + 1 + d + if a:type ==# "llvm-ir" + setl filetype=llvm + let extension = 'll' + elseif a:type ==# "asm" + setl filetype=asm + let extension = 's' + endif + setl buftype=nofile + setl bufhidden=hide + setl noswapfile + if exists('l:extension') + " give the buffer a nice name + let suffix = 1 + let basename = fnamemodify(a:dict.path, ':t:r') + while 1 + let bufname = basename + if suffix > 1 | let bufname .= ' ('.suffix.')' | endif + let bufname .= '.'.extension + if bufexists(bufname) + let suffix += 1 + continue + endif + exe 'silent noautocmd keepalt file' fnameescape(bufname) + break + endwhile + endif + endif + endtry +endfunction + +" Utility functions {{{1 + +" Invokes func(dict, ...) +" Where {dict} is a dictionary with the following keys: +" 'path' - The path to the file +" 'tmpdir' - The path to a temporary directory that will be deleted when the +" function returns. +" 'istemp' - 1 if the path is a file inside of {dict.tmpdir} or 0 otherwise. +" If {istemp} is 1 then an additional key is provided: +" 'tmpdir_relpath' - The {path} relative to the {tmpdir}. +" +" {dict.path} may be a path to a file inside of {dict.tmpdir} or it may be the +" existing path of the current buffer. If the path is inside of {dict.tmpdir} +" then it is guaranteed to have a '.rs' extension. +function! s:WithPath(func, ...) + let buf = bufnr('') + let saved = {} + let dict = {} + try + let saved.write = &write + set write + let dict.path = expand('%') + let pathisempty = empty(dict.path) + + " Always create a tmpdir in case the wrapped command wants it + let dict.tmpdir = tempname() + call mkdir(dict.tmpdir) + + if pathisempty || !saved.write + let dict.istemp = 1 + " if we're doing this because of nowrite, preserve the filename + if !pathisempty + let filename = expand('%:t:r').".rs" + else + let filename = 'unnamed.rs' + endif + let dict.tmpdir_relpath = filename + let dict.path = dict.tmpdir.'/'.filename + + let saved.mod = &modified + set nomodified + + silent exe 'keepalt write! ' . fnameescape(dict.path) + if pathisempty + silent keepalt 0file + endif + else + let dict.istemp = 0 + update + endif + + call call(a:func, [dict] + a:000) + finally + if bufexists(buf) + for [opt, value] in items(saved) + silent call setbufvar(buf, '&'.opt, value) + unlet value " avoid variable type mismatches + endfor + endif + if has_key(dict, 'tmpdir') | silent call s:RmDir(dict.tmpdir) | endif + endtry +endfunction + +function! rust#AppendCmdLine(text) + call setcmdpos(getcmdpos()) + let cmd = getcmdline() . a:text + return cmd +endfunction + +" Tokenize the string according to sh parsing rules +function! s:ShellTokenize(text) + " states: + " 0: start of word + " 1: unquoted + " 2: unquoted backslash + " 3: double-quote + " 4: double-quoted backslash + " 5: single-quote + let l:state = 0 + let l:current = '' + let l:args = [] + for c in split(a:text, '\zs') + if l:state == 0 || l:state == 1 " unquoted + if l:c ==# ' ' + if l:state == 0 | continue | endif + call add(l:args, l:current) + let l:current = '' + let l:state = 0 + elseif l:c ==# '\' + let l:state = 2 + elseif l:c ==# '"' + let l:state = 3 + elseif l:c ==# "'" + let l:state = 5 + else + let l:current .= l:c + let l:state = 1 + endif + elseif l:state == 2 " unquoted backslash + if l:c !=# "\n" " can it even be \n? + let l:current .= l:c + endif + let l:state = 1 + elseif l:state == 3 " double-quote + if l:c ==# '\' + let l:state = 4 + elseif l:c ==# '"' + let l:state = 1 + else + let l:current .= l:c + endif + elseif l:state == 4 " double-quoted backslash + if stridx('$`"\', l:c) >= 0 + let l:current .= l:c + elseif l:c ==# "\n" " is this even possible? + " skip it + else + let l:current .= '\'.l:c + endif + let l:state = 3 + elseif l:state == 5 " single-quoted + if l:c ==# "'" + let l:state = 1 + else + let l:current .= l:c + endif + endif + endfor + if l:state != 0 + call add(l:args, l:current) + endif + return l:args +endfunction + +function! s:RmDir(path) + " sanity check; make sure it's not empty, /, or $HOME + if empty(a:path) + echoerr 'Attempted to delete empty path' + return 0 + elseif a:path ==# '/' || a:path ==# $HOME + let l:path = expand(a:path) + if l:path ==# '/' || l:path ==# $HOME + echoerr 'Attempted to delete protected path: ' . a:path + return 0 + endif + endif + + if !isdirectory(a:path) + return 0 + endif + + " delete() returns 0 when removing file successfully + return delete(a:path, 'rf') == 0 +endfunction + +" Executes {cmd} with the cwd set to {pwd}, without changing Vim's cwd. +" If {pwd} is the empty string then it doesn't change the cwd. +function! s:system(pwd, cmd) + let cmd = a:cmd + if !empty(a:pwd) + let cmd = 'cd ' . shellescape(a:pwd) . ' && ' . cmd + endif + return system(cmd) +endfunction + +" Playpen Support {{{1 +" Parts of gist.vim by Yasuhiro Matsumoto reused +" gist.vim available under the BSD license, available at +" http://github.com/mattn/gist-vim +function! s:has_webapi() + if !exists("*webapi#http#post") + try + call webapi#http#post() + catch + endtry + endif + return exists("*webapi#http#post") +endfunction + +function! rust#Play(count, line1, line2, ...) abort + redraw + + let l:rust_playpen_url = get(g:, 'rust_playpen_url', 'https://play.rust-lang.org/') + let l:rust_shortener_url = get(g:, 'rust_shortener_url', 'https://is.gd/') + + if !s:has_webapi() + echohl ErrorMsg | echomsg ':RustPlay depends on webapi.vim (https://github.com/mattn/webapi-vim)' | echohl None + return + endif + + let bufname = bufname('%') + if a:count < 1 + let content = join(getline(a:line1, a:line2), "\n") + else + let save_regcont = @" + let save_regtype = getregtype('"') + silent! normal! gvy + let content = @" + call setreg('"', save_regcont, save_regtype) + endif + + let url = l:rust_playpen_url."?code=".webapi#http#encodeURI(content) + + if strlen(url) > 5000 + echohl ErrorMsg | echomsg 'Buffer too large, max 5000 encoded characters ('.strlen(url).')' | echohl None + return + endif + + let payload = "format=simple&url=".webapi#http#encodeURI(url) + let res = webapi#http#post(l:rust_shortener_url.'create.php', payload, {}) + if res.status[0] ==# '2' + let url = res.content + endif + + let footer = '' + if exists('g:rust_clip_command') + call system(g:rust_clip_command, url) + if !v:shell_error + let footer = ' (copied to clipboard)' + endif + endif + redraw | echomsg 'Done: '.url.footer +endfunction + +" Run a test under the cursor or all tests {{{1 + +" Finds a test function name under the cursor. Returns empty string when a +" test function is not found. +function! s:SearchTestFunctionNameUnderCursor() abort + let cursor_line = line('.') + + " Find #[test] attribute + if search('\m\C#\[test\]', 'bcW') is 0 + return '' + endif + + " Move to an opening brace of the test function + let test_func_line = search('\m\C^\s*fn\s\+\h\w*\s*(.\+{$', 'eW') + if test_func_line is 0 + return '' + endif + + " Search the end of test function (closing brace) to ensure that the + " cursor position is within function definition + if maparg('(MatchitNormalForward)') ==# '' + keepjumps normal! % + else + " Prefer matchit.vim official plugin to native % since the plugin + " provides better behavior than original % (#391) + " To load the plugin, run: + " :packadd matchit + execute 'keepjumps' 'normal' "\(MatchitNormalForward)" + endif + if line('.') < cursor_line + return '' + endif + + return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*') +endfunction + +function! rust#Test(mods, winsize, all, options) abort + let manifest = findfile('Cargo.toml', expand('%:p:h') . ';') + if manifest ==# '' + return rust#Run(1, '--test ' . a:options) + endif + + " defaults to 0, but we prefer an empty string + let winsize = a:winsize ? a:winsize : '' + + if has('terminal') + if has('patch-8.0.910') + let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize) + else + let cmd = printf('%s terminal ', a:mods) + endif + elseif has('nvim') + let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize) + else + let cmd = '!' + let manifest = shellescape(manifest) + endif + + if a:all + if a:options ==# '' + execute cmd . 'cargo test --manifest-path' manifest + else + execute cmd . 'cargo test --manifest-path' manifest a:options + endif + return + endif + + let saved = getpos('.') + try + let func_name = s:SearchTestFunctionNameUnderCursor() + finally + call setpos('.', saved) + endtry + if func_name ==# '' + echohl ErrorMsg + echomsg 'No test function was found under the cursor. Please add ! to command if you want to run all tests' + echohl None + return + endif + if a:options ==# '' + execute cmd . 'cargo test --manifest-path' manifest func_name + else + execute cmd . 'cargo test --manifest-path' manifest func_name a:options + endif +endfunction + +" }}}1 + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/rust/debugging.vim b/dot_vim/plugged/rust.vim/autoload/rust/debugging.vim new file mode 100644 index 0000000..b39f687 --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/rust/debugging.vim @@ -0,0 +1,103 @@ +" For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim + +let s:global_variable_list = [ + \ '_rustfmt_autosave_because_of_config', + \ 'ftplugin_rust_source_path', + \ 'loaded_syntastic_rust_cargo_checker', + \ 'loaded_syntastic_rust_filetype', + \ 'loaded_syntastic_rust_rustc_checker', + \ 'rust_bang_comment_leader', + \ 'rust_cargo_avoid_whole_workspace', + \ 'rust_clip_command', + \ 'rust_conceal', + \ 'rust_conceal_mod_path', + \ 'rust_conceal_pub', + \ 'rust_fold', + \ 'rust_last_args', + \ 'rust_last_rustc_args', + \ 'rust_original_delimitMate_excluded_regions', + \ 'rust_playpen_url', + \ 'rust_prev_delimitMate_quotes', + \ 'rust_recent_nearest_cargo_tol', + \ 'rust_recent_root_cargo_toml', + \ 'rust_recommended_style', + \ 'rust_set_conceallevel', + \ 'rust_set_conceallevel=1', + \ 'rust_set_foldmethod', + \ 'rust_set_foldmethod=1', + \ 'rust_shortener_url', + \ 'rustc_makeprg_no_percent', + \ 'rustc_path', + \ 'rustfmt_autosave', + \ 'rustfmt_autosave_if_config_present', + \ 'rustfmt_command', + \ 'rustfmt_emit_files', + \ 'rustfmt_fail_silently', + \ 'rustfmt_options', + \ 'syntastic_extra_filetypes', + \ 'syntastic_rust_cargo_fname', + \] + +function! s:Echo(message) abort + execute 'echo a:message' +endfunction + +function! s:EchoGlobalVariables() abort + for l:key in s:global_variable_list + if l:key !~# '^_' + call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null))) + endif + + if has_key(b:, l:key) + call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key])) + endif + endfor +endfunction + +function! rust#debugging#Info() abort + call cargo#Load() + call rust#Load() + call rustfmt#Load() + call s:Echo('rust.vim Global Variables:') + call s:Echo('') + call s:EchoGlobalVariables() + + silent let l:output = system(g:rustfmt_command . ' --version') + echo l:output + + let l:rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + silent let l:output = system(l:rustc . ' --version') + echo l:output + + silent let l:output = system('cargo --version') + echo l:output + + version + + if exists(":SyntasticInfo") + echo "----" + echo "Info from Syntastic:" + execute "SyntasticInfo" + endif +endfunction + +function! rust#debugging#InfoToClipboard() abort + redir @" + silent call rust#debugging#Info() + redir END + + call s:Echo('RustInfo copied to your clipboard') +endfunction + +function! rust#debugging#InfoToFile(filename) abort + let l:expanded_filename = expand(a:filename) + + redir => l:output + silent call rust#debugging#Info() + redir END + + call writefile(split(l:output, "\n"), l:expanded_filename) + call s:Echo('RustInfo written to ' . l:expanded_filename) +endfunction + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/rust/delimitmate.vim b/dot_vim/plugged/rust.vim/autoload/rust/delimitmate.vim new file mode 100644 index 0000000..7056d53 --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/rust/delimitmate.vim @@ -0,0 +1,44 @@ +let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate' + +" For this buffer, when delimitMate issues the `User delimitMate_map` +" event in the autocommand system, add the above-defined extra excluded +" regions to delimitMate's state, if they have not already been added. +function! rust#delimitmate#onMap() abort + if &filetype !=# 'rust' + return + endif + + if get(b:, "delimitMate_quotes") + let b:rust_prev_delimitMate_quotes = b:delimitMate_quotes + endif + let b:delimitMate_quotes = "\" `" + + if match(delimitMate#Get("excluded_regions"), + \ s:delimitMate_extra_excluded_regions) == -1 + call delimitMate#Set("excluded_regions", + \delimitMate#Get("excluded_regions").s:delimitMate_extra_excluded_regions) + endif +endfunction + +" For this buffer, when delimitMate issues the `User delimitMate_unmap` +" event in the autocommand system, delete the above-defined extra excluded +" regions from delimitMate's state (the deletion being idempotent and +" having no effect if the extra excluded regions are not present in the +" targeted part of delimitMate's state). +function! rust#delimitmate#onUnmap() abort + if &filetype !=# 'rust' + return + endif + + if get(b:, "rust_prev_delimitMate_quotes") + let b:delimitMate_quotes = b:rust_prev_delimitMate_quotes + endif + + call delimitMate#Set("excluded_regions", substitute( + \ delimitMate#Get("excluded_regions"), + \ '\C\V' . s:delimitMate_extra_excluded_regions, + \ '', 'g')) +endfunction + +" vim: set et sw=4 sts=4 ts=8: + diff --git a/dot_vim/plugged/rust.vim/autoload/rust/tags.vim b/dot_vim/plugged/rust.vim/autoload/rust/tags.vim new file mode 100644 index 0000000..0a4cc20 --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/rust/tags.vim @@ -0,0 +1,18 @@ +" Tagbar support code, for the sake of not automatically overriding its +" configuration in case Universal Ctags is detected. + +let s:ctags_is_uctags = 0 +let s:checked_ctags = 0 + +function! rust#tags#IsUCtags() abort + if s:checked_ctags == 0 + let l:ctags_bin = get(g:, 'tagbar_ctags_bin', 'ctags') + if system(l:ctags_bin.' --version') =~? 'universal ctags' + let s:ctags_is_uctags = 1 + endif + let s:checked_ctags = 1 + endif + return s:ctags_is_uctags +endfunction + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/autoload/rustfmt.vim b/dot_vim/plugged/rust.vim/autoload/rustfmt.vim new file mode 100644 index 0000000..59a58e8 --- /dev/null +++ b/dot_vim/plugged/rust.vim/autoload/rustfmt.vim @@ -0,0 +1,260 @@ +" Author: Stephen Sugden +" +" Adapted from https://github.com/fatih/vim-go +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if !exists("g:rustfmt_autosave") + let g:rustfmt_autosave = 0 +endif + +if !exists("g:rustfmt_command") + let g:rustfmt_command = "rustfmt" +endif + +if !exists("g:rustfmt_options") + let g:rustfmt_options = "" +endif + +if !exists("g:rustfmt_fail_silently") + let g:rustfmt_fail_silently = 0 +endif + +function! rustfmt#DetectVersion() + " Save rustfmt '--help' for feature inspection + silent let s:rustfmt_help = system(g:rustfmt_command . " --help") + let s:rustfmt_unstable_features = s:rustfmt_help =~# "--unstable-features" + + " Build a comparable rustfmt version varible out of its `--version` output: + silent let l:rustfmt_version_full = system(g:rustfmt_command . " --version") + let l:rustfmt_version_list = matchlist(l:rustfmt_version_full, + \ '\vrustfmt ([0-9]+[.][0-9]+[.][0-9]+)') + if len(l:rustfmt_version_list) < 3 + let s:rustfmt_version = "0" + else + let s:rustfmt_version = l:rustfmt_version_list[1] + endif + return s:rustfmt_version +endfunction + +call rustfmt#DetectVersion() + +if !exists("g:rustfmt_emit_files") + let g:rustfmt_emit_files = s:rustfmt_version >= "0.8.2" +endif + +if !exists("g:rustfmt_file_lines") + let g:rustfmt_file_lines = s:rustfmt_help =~# "--file-lines JSON" +endif + +let s:got_fmt_error = 0 + +function! rustfmt#Load() + " Utility call to get this script loaded, for debugging +endfunction + +function! s:RustfmtWriteMode() + if g:rustfmt_emit_files + return "--emit=files" + else + return "--write-mode=overwrite" + endif +endfunction + +function! s:RustfmtConfigOptions() + let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';') + if l:rustfmt_toml !=# '' + return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p")) + endif + + let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';') + if l:_rustfmt_toml !=# '' + return '--config-path '.shellescape(fnamemodify(l:_rustfmt_toml, ":p")) + endif + + " Default to edition 2018 in case no rustfmt.toml was found. + return '--edition 2018' +endfunction + +function! s:RustfmtCommandRange(filename, line1, line2) + if g:rustfmt_file_lines == 0 + echo "--file-lines is not supported in the installed `rustfmt` executable" + return + endif + + let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]} + let l:write_mode = s:RustfmtWriteMode() + let l:rustfmt_config = s:RustfmtConfigOptions() + + " FIXME: When --file-lines gets to be stable, add version range checking + " accordingly. + let l:unstable_features = s:rustfmt_unstable_features ? '--unstable-features' : '' + + let l:cmd = printf("%s %s %s %s %s --file-lines '[%s]' %s", g:rustfmt_command, + \ l:write_mode, g:rustfmt_options, + \ l:unstable_features, l:rustfmt_config, + \ json_encode(l:arg), shellescape(a:filename)) + return l:cmd +endfunction + +function! s:RustfmtCommand() + let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display' + let config = s:RustfmtConfigOptions() + return join([g:rustfmt_command, write_mode, config, g:rustfmt_options]) +endfunction + +function! s:DeleteLines(start, end) abort + silent! execute a:start . ',' . a:end . 'delete _' +endfunction + +function! s:RunRustfmt(command, tmpname, from_writepre) + let l:view = winsaveview() + + let l:stderr_tmpname = tempname() + call writefile([], l:stderr_tmpname) + + let l:command = a:command . ' 2> ' . l:stderr_tmpname + + if a:tmpname ==# '' + " Rustfmt in stdin/stdout mode + + " chdir to the directory of the file + let l:has_lcd = haslocaldir() + let l:prev_cd = getcwd() + execute 'lchdir! '.expand('%:h') + + let l:buffer = getline(1, '$') + if exists("*systemlist") + silent let out = systemlist(l:command, l:buffer) + else + silent let out = split(system(l:command, + \ join(l:buffer, "\n")), '\r\?\n') + endif + else + if exists("*systemlist") + silent let out = systemlist(l:command) + else + silent let out = split(system(l:command), '\r\?\n') + endif + endif + + let l:stderr = readfile(l:stderr_tmpname) + + call delete(l:stderr_tmpname) + + let l:open_lwindow = 0 + if v:shell_error == 0 + if a:from_writepre + " remove undo point caused via BufWritePre + try | silent undojoin | catch | endtry + endif + + if a:tmpname ==# '' + let l:content = l:out + else + " take the tmpfile's content, this is better than rename + " because it preserves file modes. + let l:content = readfile(a:tmpname) + endif + + call s:DeleteLines(len(l:content), line('$')) + call setline(1, l:content) + + " only clear location list if it was previously filled to prevent + " clobbering other additions + if s:got_fmt_error + let s:got_fmt_error = 0 + call setloclist(0, []) + let l:open_lwindow = 1 + endif + elseif g:rustfmt_fail_silently == 0 && !a:from_writepre + " otherwise get the errors and put them in the location list + let l:errors = [] + + let l:prev_line = "" + for l:line in l:stderr + " error: expected one of `;` or `as`, found `extern` + " --> src/main.rs:2:1 + let tokens = matchlist(l:line, '^\s\+-->\s\(.\{-}\):\(\d\+\):\(\d\+\)$') + if !empty(tokens) + call add(l:errors, {"filename": @%, + \"lnum": tokens[2], + \"col": tokens[3], + \"text": l:prev_line}) + endif + let l:prev_line = l:line + endfor + + if !empty(l:errors) + call setloclist(0, l:errors, 'r') + echohl Error | echomsg "rustfmt returned error" | echohl None + else + echo "rust.vim: was not able to parse rustfmt messages. Here is the raw output:" + echo "\n" + for l:line in l:stderr + echo l:line + endfor + endif + + let s:got_fmt_error = 1 + let l:open_lwindow = 1 + endif + + " Restore the current directory if needed + if a:tmpname ==# '' + if l:has_lcd + execute 'lchdir! '.l:prev_cd + else + execute 'chdir! '.l:prev_cd + endif + endif + + " Open lwindow after we have changed back to the previous directory + if l:open_lwindow == 1 + lwindow + endif + + call winrestview(l:view) +endfunction + +function! rustfmt#FormatRange(line1, line2) + let l:tmpname = tempname() + call writefile(getline(1, '$'), l:tmpname) + let command = s:RustfmtCommandRange(l:tmpname, a:line1, a:line2) + call s:RunRustfmt(command, l:tmpname, v:false) + call delete(l:tmpname) +endfunction + +function! rustfmt#Format() + call s:RunRustfmt(s:RustfmtCommand(), '', v:false) +endfunction + +function! rustfmt#Cmd() + " Mainly for debugging + return s:RustfmtCommand() +endfunction + +function! rustfmt#PreWrite() + if !filereadable(expand("%@")) + return + endif + if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0) + if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# '' + let b:rustfmt_autosave = 1 + let b:_rustfmt_autosave_because_of_config = 1 + endif + else + if has_key(b:, '_rustfmt_autosave_because_of_config') + unlet b:_rustfmt_autosave_because_of_config + unlet b:rustfmt_autosave + endif + endif + + if !rust#GetConfigVar("rustfmt_autosave", 0) + return + endif + + call s:RunRustfmt(s:RustfmtCommand(), '', v:true) +endfunction + + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/compiler/cargo.vim b/dot_vim/plugged/rust.vim/compiler/cargo.vim new file mode 100644 index 0000000..a511ef6 --- /dev/null +++ b/dot_vim/plugged/rust.vim/compiler/cargo.vim @@ -0,0 +1,51 @@ +" Vim compiler file +" Compiler: Cargo Compiler +" Maintainer: Damien Radtke +" Latest Revision: 2014 Sep 24 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists('current_compiler') + finish +endif +runtime compiler/rustc.vim +let current_compiler = "cargo" + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif + +if exists('g:cargo_makeprg_params') + execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' +else + CompilerSet makeprg=cargo\ $* +endif + +augroup RustCargoQuickFixHooks + autocmd! + autocmd QuickFixCmdPre make call cargo#quickfix#CmdPre() + autocmd QuickFixCmdPost make call cargo#quickfix#CmdPost() +augroup END + +" Ignore general cargo progress messages +CompilerSet errorformat+= + \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Checking%.%#, + \%-G%\\s%#Compiling%.%#, + \%-G%\\s%#Finished%.%#, + \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, + \%-G%\\s%#To\ learn\ more\\,%.%#, + \%-G%\\s%#For\ more\ information\ about\ this\ error\\,%.%#, + \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#, + \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/compiler/rustc.vim b/dot_vim/plugged/rust.vim/compiler/rustc.vim new file mode 100644 index 0000000..9b70732 --- /dev/null +++ b/dot_vim/plugged/rust.vim/compiler/rustc.vim @@ -0,0 +1,57 @@ +" Vim compiler file +" Compiler: Rust Compiler +" Maintainer: Chris Morgan +" Latest Revision: 2013 Jul 12 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("current_compiler") + finish +endif +let current_compiler = "rustc" + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +endif + +if get(g:, 'rustc_makeprg_no_percent', 0) + CompilerSet makeprg=rustc +else + if has('patch-7.4.191') + CompilerSet makeprg=rustc\ \%:S + else + CompilerSet makeprg=rustc\ \"%\" + endif +endif + +" New errorformat (after nightly 2016/08/10) +CompilerSet errorformat= + \%-G, + \%-Gerror:\ aborting\ %.%#, + \%-Gerror:\ Could\ not\ compile\ %.%#, + \%Eerror:\ %m, + \%Eerror[E%n]:\ %m, + \%Wwarning:\ %m, + \%Inote:\ %m, + \%C\ %#-->\ %f:%l:%c, + \%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z + +" Old errorformat (before nightly 2016/08/10) +CompilerSet errorformat+= + \%f:%l:%c:\ %t%*[^:]:\ %m, + \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, + \%-G%f:%l\ %s, + \%-G%*[\ ]^, + \%-G%*[\ ]^%*[~], + \%-G%*[\ ]... + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/ctags/rust.ctags b/dot_vim/plugged/rust.vim/ctags/rust.ctags new file mode 100644 index 0000000..d4f474e --- /dev/null +++ b/dot_vim/plugged/rust.vim/ctags/rust.ctags @@ -0,0 +1,11 @@ +--langdef=Rust +--langmap=Rust:.rs +--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?(static|const)[ \t]+([a-zA-Z0-9_]+)/\3/c,consts,static constants/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\4 \6 \7/i,impls,trait implementations/ +--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ diff --git a/dot_vim/plugged/rust.vim/doc/rust.txt b/dot_vim/plugged/rust.vim/doc/rust.txt new file mode 100644 index 0000000..9d5eb8c --- /dev/null +++ b/dot_vim/plugged/rust.vim/doc/rust.txt @@ -0,0 +1,486 @@ +*ft_rust.txt* Filetype plugin for Rust + +============================================================================== +CONTENTS *rust* + +1. Introduction |rust-intro| +2. Settings |rust-settings| +3. Commands |rust-commands| +4. Mappings |rust-mappings| + +============================================================================== +INTRODUCTION *rust-intro* + +This plugin provides syntax and supporting functionality for the Rust +filetype. It requires Vim 8 or higher for full functionality. Some commands +will not work on earlier versions. + +============================================================================== +SETTINGS *rust-settings* + +This plugin has a few variables you can define in your vimrc that change the +behavior of the plugin. + +Some variables can be set buffer local (`:b` prefix), and the buffer local +will take precedence over the global `g:` counterpart. + + *g:rustc_path* +g:rustc_path~ + Set this option to the path to rustc for use in the |:RustRun| and + |:RustExpand| commands. If unset, "rustc" will be located in $PATH: > + let g:rustc_path = $HOME."/bin/rustc" +< + + *g:rustc_makeprg_no_percent* +g:rustc_makeprg_no_percent~ + Set this option to 1 to have 'makeprg' default to "rustc" instead of + "rustc %": > + let g:rustc_makeprg_no_percent = 1 +< + + *g:rust_conceal* +g:rust_conceal~ + Set this option to turn on the basic |conceal| support: > + let g:rust_conceal = 1 +< + + *g:rust_conceal_mod_path* +g:rust_conceal_mod_path~ + Set this option to turn on |conceal| for the path connecting token + "::": > + let g:rust_conceal_mod_path = 1 +< + + *g:rust_conceal_pub* +g:rust_conceal_pub~ + Set this option to turn on |conceal| for the "pub" token: > + let g:rust_conceal_pub = 1 +< + + *g:rust_recommended_style* +g:rust_recommended_style~ + Set this option to enable vim indentation and textwidth settings to + conform to style conventions of the rust standard library (i.e. use 4 + spaces for indents and sets 'textwidth' to 99). This option is enabled + by default. To disable it: > + let g:rust_recommended_style = 0 +< + + *g:rust_fold* +g:rust_fold~ + Set this option to turn on |folding|: > + let g:rust_fold = 1 +< + Value Effect ~ + 0 No folding + 1 Braced blocks are folded. All folds are open by + default. + 2 Braced blocks are folded. 'foldlevel' is left at the + global value (all folds are closed by default). + + *g:rust_bang_comment_leader* +g:rust_bang_comment_leader~ + Set this option to 1 to preserve the leader on multi-line doc comments + using the /*! syntax: > + let g:rust_bang_comment_leader = 1 +< + + *g:rust_use_custom_ctags_defs* +g:rust_use_custom_ctags_defs~ + Set this option to 1 if you have customized ctags definitions for Rust + and do not wish for those included with rust.vim to be used: > + let g:rust_use_custom_ctags_defs = 1 +< + + NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim + plugin, if you have it installed, AND if Universal Ctags is not + detected. This is because Universal Ctags already has built-in + support for Rust when used with Tagbar. + + Also, note that when using ctags other than Universal Ctags, it is not + automatically used when generating |tags| files that Vim can use to + navigate to definitions across different source files. Feel free to + copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish + to generate |tags| files. + + + *g:ftplugin_rust_source_path* +g:ftplugin_rust_source_path~ + Set this option to a path that should be prepended to 'path' for Rust + source files: > + let g:ftplugin_rust_source_path = $HOME.'/dev/rust' +< + + *g:rustfmt_command* +g:rustfmt_command~ + Set this option to the name of the 'rustfmt' executable in your $PATH. If + not specified it defaults to 'rustfmt' : > + let g:rustfmt_command = 'rustfmt' +< + *g:rustfmt_autosave* +g:rustfmt_autosave~ + Set this option to 1 to run |:RustFmt| automatically when saving a + buffer. If not specified it defaults to 0 : > + let g:rustfmt_autosave = 0 +< + There is also a buffer-local b:rustfmt_autosave that can be set for + the same purpose, and can override the global setting. + + *g:rustfmt_autosave_if_config_present* +g:rustfmt_autosave_if_config_present~ + Set this option to 1 to have *b:rustfmt_autosave* be set automatically + if a `rustfmt.toml` file is present in any parent directly leading to + the file being edited. If not set, default to 0: > + let g:rustfmt_autosave_if_config_present = 0 +< + This is useful to have `rustfmt` only execute on save, on projects + that have `rustfmt.toml` configuration. + + There is also a buffer-local b:rustfmt_autosave_if_config_present + that can be set for the same purpose, which can overrides the global + setting. + *g:rustfmt_fail_silently* +g:rustfmt_fail_silently~ + Set this option to 1 to prevent 'rustfmt' from populating the + |location-list| with errors. If not specified it defaults to 0: > + let g:rustfmt_fail_silently = 0 +< + *g:rustfmt_options* +g:rustfmt_options~ + Set this option to a string of options to pass to 'rustfmt'. The + write-mode is already set to 'overwrite'. If not specified it + defaults to '' : > + let g:rustfmt_options = '' +< + *g:rustfmt_emit_files* +g:rustfmt_emit_files~ + If not specified rust.vim tries to detect the right parameter to + pass to rustfmt based on its reported version. Otherwise, it + determines whether to run rustfmt with '--emit=files' (when 1 is + provided) instead of '--write-mode=overwrite'. > + let g:rustfmt_emit_files = 0 + + + *g:rust_playpen_url* +g:rust_playpen_url~ + Set this option to override the url for the playpen to use: > + let g:rust_playpen_url = 'https://play.rust-lang.org/' +< + + *g:rust_shortener_url* +g:rust_shortener_url~ + Set this option to override the url for the url shortener: > + let g:rust_shortener_url = 'https://is.gd/' +< + + *g:rust_clip_command* +g:rust_clip_command~ + Set this option to the command used in your OS to copy the Rust Play + url to the clipboard: > + let g:rust_clip_command = 'xclip -selection clipboard' +< + + *g:cargo_makeprg_params* +g:cargo_makeprg_params~ + Set this option to the string of parameters to pass to cargo. If not + specified it defaults to '$*' : > + let g:cargo_makeprg_params = 'build' +< + + *g:cargo_shell_command_runner* +g:cargo_shell_command_runner~ + Set this option to change how to run shell commands for cargo commands + |:Cargo|, |:Cbuild|, |:Crun|, ... + By default, |:terminal| is used to run shell command in terminal window + asynchronously. But if you prefer |:!| for running the commands, it can + be specified: > + let g:cargo_shell_command_runner = '!' +< + + +Integration with Syntastic *rust-syntastic* +-------------------------- + +This plugin automatically integrates with the Syntastic checker. There are two +checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to +build code, and the former delivers a single edited '.rs' file as a compilation +target directly to the Rust compiler, `rustc`. + +Because Cargo is almost exclusively being used for building Rust code these +days, 'cargo' is the default checker. > + + let g:syntastic_rust_checkers = ['cargo'] +< +If you would like to change it, you can set `g:syntastic_rust_checkers` to a +different value. + *g:rust_cargo_avoid_whole_workspace* + *b:rust_cargo_avoid_whole_workspace* +g:rust_cargo_avoid_whole_workspace~ + When editing a crate that is part of a Cargo workspace, and this + option is set to 1 (the default), then 'cargo' will be executed + directly in that crate directory instead of in the workspace + directory. Setting 0 prevents this behavior - however be aware that if + you are working in large workspace, Cargo commands may take more time, + plus the Syntastic error list may include all the crates in the + workspace. > + let g:rust_cargo_avoid_whole_workspace = 0 +< + *g:rust_cargo_check_all_targets* + *b:rust_cargo_check_all_targets* +g:rust_cargo_check_all_targets~ + When set to 1, the `--all-targets` option will be passed to cargo when + Syntastic executes it, allowing the linting of all targets under the + package. + The default is 0. + + *g:rust_cargo_check_all_features* + *b:rust_cargo_check_all_features* +g:rust_cargo_check_all_features~ + When set to 1, the `--all-features` option will be passed to cargo when + Syntastic executes it, allowing the linting of all features of the + package. + The default is 0. + + *g:rust_cargo_check_examples* + *b:rust_cargo_check_examples* +g:rust_cargo_check_examples~ + When set to 1, the `--examples` option will be passed to cargo when + Syntastic executes it, to prevent the exclusion of examples from + linting. The examples are normally under the `examples/` directory of + the crate. + The default is 0. + + *g:rust_cargo_check_tests* + *b:rust_cargo_check_tests* +g:rust_cargo_check_tests~ + When set to 1, the `--tests` option will be passed to cargo when + Syntastic executes it, to prevent the exclusion of tests from linting. + The tests are normally under the `tests/` directory of the crate. + The default is 0. + + *g:rust_cargo_check_benches* + *b:rust_cargo_check_benches* +g:rust_cargo_check_benches~ + When set to 1, the `--benches` option will be passed to cargo when + Syntastic executes it. The benches are normally under the `benches/` + directory of the crate. + The default is 0. + +Integration with auto-pairs *rust-auto-pairs* +--------------------------- + +This plugin automatically configures the auto-pairs plugin not to duplicate +single quotes, which are used more often for lifetime annotations than for +single character literals. + + *g:rust_keep_autopairs_default* +g:rust_keep_autopairs_default~ + + Don't override auto-pairs default for the Rust filetype. The default + is 0. + +============================================================================== +COMMANDS *rust-commands* + +Invoking Cargo +-------------- + +This plug defines very simple shortcuts for invoking Cargo from with Vim. + +:Cargo *:Cargo* + Runs 'cargo' with the provided arguments. + +:Cbuild *:Cbuild* + Shortcut for 'cargo build`. + +:Cclean *:Cclean* + Shortcut for 'cargo clean`. + +:Cdoc *:Cdoc* + Shortcut for 'cargo doc`. + +:Cinit *:Cinit* + Shortcut for 'cargo init`. + +:Crun *:Crun* + Shortcut for 'cargo run`. + +:Ctest *:Ctest* + Shortcut for 'cargo test`. + +:Cupdate *:Cupdate* + Shortcut for 'cargo update`. + +:Cbench *:Cbench* + Shortcut for 'cargo bench`. + +:Csearch *:Csearch* + Shortcut for 'cargo search`. + +:Cpublish *:Cpublish* + Shortcut for 'cargo publish`. + +:Cinstall *:Cinstall* + Shortcut for 'cargo install`. + +:Cruntarget *:Cruntarget* + Shortcut for 'cargo run --bin' or 'cargo run --example', + depending on the currently open buffer. + +Formatting +---------- + +:RustFmt *:RustFmt* + Runs |g:rustfmt_command| on the current buffer. If + |g:rustfmt_options| is set then those will be passed to the + executable. + + If |g:rustfmt_fail_silently| is 0 (the default) then it + will populate the |location-list| with the errors from + |g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1 + then it will not populate the |location-list|. + +:RustFmtRange *:RustFmtRange* + Runs |g:rustfmt_command| with selected range. See + |:RustFmt| for any other information. + + +Playpen integration +------------------- + +:RustPlay *:RustPlay* + This command will only work if you have web-api.vim installed + (available at https://github.com/mattn/webapi-vim). It sends the + current selection, or if nothing is selected, the entirety of the + current buffer to the Rust playpen, and emits a message with the + shortened URL to the playpen. + + |g:rust_playpen_url| is the base URL to the playpen, by default + "https://play.rust-lang.org/". + + |g:rust_shortener_url| is the base url for the shorterner, by + default "https://is.gd/" + + |g:rust_clip_command| is the command to run to copy the + playpen url to the clipboard of your system. + + +Evaluation of a single Rust file +-------------------------------- + +NOTE: These commands are useful only when working with standalone Rust files, +which is usually not the case for common Rust development. If you wish to +building Rust crates from with Vim can should use Vim's make, Syntastic, or +functionality from other plugins. + + +:RustRun [args] *:RustRun* +:RustRun! [rustc-args] [--] [args] + Compiles and runs the current file. If it has unsaved changes, + it will be saved first using |:update|. If the current file is + an unnamed buffer, it will be written to a temporary file + first. The compiled binary is always placed in a temporary + directory, but is run from the current directory. + + The arguments given to |:RustRun| will be passed to the + compiled binary. + + If ! is specified, the arguments are passed to rustc instead. + A "--" argument will separate the rustc arguments from the + arguments passed to the binary. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustExpand [args] *:RustExpand* +:RustExpand! [TYPE] [args] + Expands the current file using --pretty and displays the + results in a new split. If the current file has unsaved + changes, it will be saved first using |:update|. If the + current file is an unnamed buffer, it will be written to a + temporary file first. + + The arguments given to |:RustExpand| will be passed to rustc. + This is largely intended for specifying various --cfg + configurations. + + If ! is specified, the first argument is the expansion type to + pass to rustc --pretty. Otherwise it will default to + "expanded". + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustEmitIr [args] *:RustEmitIr* + Compiles the current file to LLVM IR and displays the results + in a new split. If the current file has unsaved changes, it + will be saved first using |:update|. If the current file is an + unnamed buffer, it will be written to a temporary file first. + + The arguments given to |:RustEmitIr| will be passed to rustc. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustEmitAsm [args] *:RustEmitAsm* + Compiles the current file to assembly and displays the results + in a new split. If the current file has unsaved changes, it + will be saved first using |:update|. If the current file is an + unnamed buffer, it will be written to a temporary file first. + + The arguments given to |:RustEmitAsm| will be passed to rustc. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + + +Running test(s) +--------------- + +:[N]RustTest[!] [options] *:RustTest* + Runs a test under the cursor when the current buffer is in a + cargo project with "cargo test" command. If the command did + not find any test function under the cursor, it stops with an + error message. + + When N is given, adjust the size of the new window to N lines + or columns. + + When ! is given, runs all tests regardless of current cursor + position. + + When [options] is given, it is passed to "cargo" command + arguments. + + When the current buffer is outside cargo project, the command + runs "rustc --test" command instead of "cargo test" as + fallback. All tests are run regardless of adding ! since there + is no way to run specific test function with rustc. [options] + is passed to "rustc" command arguments in the case. + + Takes optional modifiers (see ||): > + :tab RustTest + :belowright 16RustTest + :leftabove vert 80RustTest +< +rust.vim Debugging +------------------ + +:RustInfo *:RustInfo* + Emits debugging info of the Vim Rust plugin. + +:RustInfoToClipboard *:RustInfoClipboard* + Saves debugging info of the Vim Rust plugin to the default + register. + +:RustInfoToFile [filename] *:RustInfoToFile* + Saves debugging info of the Vim Rust plugin to the the given + file, overwritting it. + +============================================================================== +MAPPINGS *rust-mappings* + +This plugin defines mappings for |[[| and |]]| to support hanging indents. + +============================================================================== + vim:tw=78:sw=4:noet:ts=8:ft=help:norl: diff --git a/dot_vim/plugged/rust.vim/doc/tags b/dot_vim/plugged/rust.vim/doc/tags new file mode 100644 index 0000000..c7d6ff8 --- /dev/null +++ b/dot_vim/plugged/rust.vim/doc/tags @@ -0,0 +1,66 @@ +:Cargo rust.txt /*:Cargo* +:Cbench rust.txt /*:Cbench* +:Cbuild rust.txt /*:Cbuild* +:Cclean rust.txt /*:Cclean* +:Cdoc rust.txt /*:Cdoc* +:Cinit rust.txt /*:Cinit* +:Cinstall rust.txt /*:Cinstall* +:Cpublish rust.txt /*:Cpublish* +:Crun rust.txt /*:Crun* +:Cruntarget rust.txt /*:Cruntarget* +:Csearch rust.txt /*:Csearch* +:Ctest rust.txt /*:Ctest* +:Cupdate rust.txt /*:Cupdate* +:RustEmitAsm rust.txt /*:RustEmitAsm* +:RustEmitIr rust.txt /*:RustEmitIr* +:RustExpand rust.txt /*:RustExpand* +:RustFmt rust.txt /*:RustFmt* +:RustFmtRange rust.txt /*:RustFmtRange* +:RustInfo rust.txt /*:RustInfo* +:RustInfoClipboard rust.txt /*:RustInfoClipboard* +:RustInfoToFile rust.txt /*:RustInfoToFile* +:RustPlay rust.txt /*:RustPlay* +:RustRun rust.txt /*:RustRun* +:RustTest rust.txt /*:RustTest* +b:rust_cargo_avoid_whole_workspace rust.txt /*b:rust_cargo_avoid_whole_workspace* +b:rust_cargo_check_all_features rust.txt /*b:rust_cargo_check_all_features* +b:rust_cargo_check_all_targets rust.txt /*b:rust_cargo_check_all_targets* +b:rust_cargo_check_benches rust.txt /*b:rust_cargo_check_benches* +b:rust_cargo_check_examples rust.txt /*b:rust_cargo_check_examples* +b:rust_cargo_check_tests rust.txt /*b:rust_cargo_check_tests* +b:rustfmt_autosave rust.txt /*b:rustfmt_autosave* +ft_rust.txt rust.txt /*ft_rust.txt* +g:cargo_makeprg_params rust.txt /*g:cargo_makeprg_params* +g:cargo_shell_command_runner rust.txt /*g:cargo_shell_command_runner* +g:ftplugin_rust_source_path rust.txt /*g:ftplugin_rust_source_path* +g:rust_bang_comment_leader rust.txt /*g:rust_bang_comment_leader* +g:rust_cargo_avoid_whole_workspace rust.txt /*g:rust_cargo_avoid_whole_workspace* +g:rust_cargo_check_all_features rust.txt /*g:rust_cargo_check_all_features* +g:rust_cargo_check_all_targets rust.txt /*g:rust_cargo_check_all_targets* +g:rust_cargo_check_benches rust.txt /*g:rust_cargo_check_benches* +g:rust_cargo_check_examples rust.txt /*g:rust_cargo_check_examples* +g:rust_cargo_check_tests rust.txt /*g:rust_cargo_check_tests* +g:rust_clip_command rust.txt /*g:rust_clip_command* +g:rust_conceal rust.txt /*g:rust_conceal* +g:rust_conceal_mod_path rust.txt /*g:rust_conceal_mod_path* +g:rust_conceal_pub rust.txt /*g:rust_conceal_pub* +g:rust_fold rust.txt /*g:rust_fold* +g:rust_keep_autopairs_default rust.txt /*g:rust_keep_autopairs_default* +g:rust_recommended_style rust.txt /*g:rust_recommended_style* +g:rust_shortener_url rust.txt /*g:rust_shortener_url* +g:rust_use_custom_ctags_defs rust.txt /*g:rust_use_custom_ctags_defs* +g:rustc_makeprg_no_percent rust.txt /*g:rustc_makeprg_no_percent* +g:rustc_path rust.txt /*g:rustc_path* +g:rustfmt_autosave rust.txt /*g:rustfmt_autosave* +g:rustfmt_autosave_if_config_present rust.txt /*g:rustfmt_autosave_if_config_present* +g:rustfmt_command rust.txt /*g:rustfmt_command* +g:rustfmt_emit_files rust.txt /*g:rustfmt_emit_files* +g:rustfmt_fail_silently rust.txt /*g:rustfmt_fail_silently* +g:rustfmt_options rust.txt /*g:rustfmt_options* +rust rust.txt /*rust* +rust-auto-pairs rust.txt /*rust-auto-pairs* +rust-commands rust.txt /*rust-commands* +rust-intro rust.txt /*rust-intro* +rust-mappings rust.txt /*rust-mappings* +rust-settings rust.txt /*rust-settings* +rust-syntastic rust.txt /*rust-syntastic* diff --git a/dot_vim/plugged/rust.vim/dot_git/HEAD b/dot_vim/plugged/rust.vim/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/rust.vim/dot_git/branches/.keep b/dot_vim/plugged/rust.vim/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rust.vim/dot_git/config b/dot_vim/plugged/rust.vim/dot_git/config new file mode 100644 index 0000000..a0a296b --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/rust-lang/rust.vim.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/rust.vim/dot_git/description b/dot_vim/plugged/rust.vim/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/post-update.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-push.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/rust.vim/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/rust.vim/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/rust.vim/dot_git/index b/dot_vim/plugged/rust.vim/dot_git/index new file mode 100644 index 0000000..566d4e3 Binary files /dev/null and b/dot_vim/plugged/rust.vim/dot_git/index differ diff --git a/dot_vim/plugged/rust.vim/dot_git/info/exclude b/dot_vim/plugged/rust.vim/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/rust.vim/dot_git/logs/HEAD b/dot_vim/plugged/rust.vim/dot_git/logs/HEAD new file mode 100644 index 0000000..aeda578 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 889b9a7515db477f4cb6808bef1769e53493c578 LinlyBoi 1676062730 +0200 clone: from https://github.com/rust-lang/rust.vim.git +889b9a7515db477f4cb6808bef1769e53493c578 889b9a7515db477f4cb6808bef1769e53493c578 LinlyBoi 1676062732 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/rust.vim/dot_git/logs/refs/heads/master b/dot_vim/plugged/rust.vim/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..dc3e623 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 889b9a7515db477f4cb6808bef1769e53493c578 LinlyBoi 1676062730 +0200 clone: from https://github.com/rust-lang/rust.vim.git diff --git a/dot_vim/plugged/rust.vim/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/rust.vim/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..dc3e623 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 889b9a7515db477f4cb6808bef1769e53493c578 LinlyBoi 1676062730 +0200 clone: from https://github.com/rust-lang/rust.vim.git diff --git a/dot_vim/plugged/rust.vim/dot_git/objects/info/.keep b/dot_vim/plugged/rust.vim/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.idx b/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.idx new file mode 100644 index 0000000..7206fa9 Binary files /dev/null and b/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.idx differ diff --git a/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.pack b/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.pack new file mode 100644 index 0000000..4a9d9fb Binary files /dev/null and b/dot_vim/plugged/rust.vim/dot_git/objects/pack/readonly_pack-1d9f6fb8d950cde3b5af4822c7163c815fc203aa.pack differ diff --git a/dot_vim/plugged/rust.vim/dot_git/packed-refs b/dot_vim/plugged/rust.vim/dot_git/packed-refs new file mode 100644 index 0000000..67639b1 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/packed-refs @@ -0,0 +1,3 @@ +# pack-refs with: peeled fully-peeled sorted +889b9a7515db477f4cb6808bef1769e53493c578 refs/remotes/origin/master +e24f81c09e9da65f3c7e7afb7fb23063d8bafd10 refs/remotes/origin/rewritten-indent diff --git a/dot_vim/plugged/rust.vim/dot_git/refs/heads/master b/dot_vim/plugged/rust.vim/dot_git/refs/heads/master new file mode 100644 index 0000000..db7bddd --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/refs/heads/master @@ -0,0 +1 @@ +889b9a7515db477f4cb6808bef1769e53493c578 diff --git a/dot_vim/plugged/rust.vim/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/rust.vim/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/rust.vim/dot_git/refs/tags/.keep b/dot_vim/plugged/rust.vim/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rust.vim/dot_git/shallow b/dot_vim/plugged/rust.vim/dot_git/shallow new file mode 100644 index 0000000..3d9223b --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_git/shallow @@ -0,0 +1,2 @@ +889b9a7515db477f4cb6808bef1769e53493c578 +e24f81c09e9da65f3c7e7afb7fb23063d8bafd10 diff --git a/dot_vim/plugged/rust.vim/dot_github/workflows/ci.yml b/dot_vim/plugged/rust.vim/dot_github/workflows/ci.yml new file mode 100644 index 0000000..bd6e226 --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_github/workflows/ci.yml @@ -0,0 +1,9 @@ +on: push +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run tests + run: cd test && ./run-tests + shell: bash diff --git a/dot_vim/plugged/rust.vim/dot_gitignore b/dot_vim/plugged/rust.vim/dot_gitignore new file mode 100644 index 0000000..0a56e3f --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_gitignore @@ -0,0 +1 @@ +/doc/tags diff --git a/dot_vim/plugged/rust.vim/dot_vintrc.yml b/dot_vim/plugged/rust.vim/dot_vintrc.yml new file mode 100644 index 0000000..0914f1b --- /dev/null +++ b/dot_vim/plugged/rust.vim/dot_vintrc.yml @@ -0,0 +1,10 @@ +cmdargs: + # Checking more strictly + severity: style_problem + +policies: + # Disable a violation + ProhibitUnnecessaryDoubleQuote: + enabled: false + ProhibitImplicitScopeVariable: + enabled: false diff --git a/dot_vim/plugged/rust.vim/ftdetect/rust.vim b/dot_vim/plugged/rust.vim/ftdetect/rust.vim new file mode 100644 index 0000000..e095093 --- /dev/null +++ b/dot_vim/plugged/rust.vim/ftdetect/rust.vim @@ -0,0 +1,15 @@ +" vint: -ProhibitAutocmdWithNoGroup + +autocmd BufRead,BufNewFile *.rs call s:set_rust_filetype() + +if has('patch-8.0.613') + autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg +endif + +function! s:set_rust_filetype() abort + if &filetype !=# 'rust' + set filetype=rust + endif +endfunction + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/ftplugin/rust.vim b/dot_vim/plugged/rust.vim/ftplugin/rust.vim new file mode 100644 index 0000000..fb048ca --- /dev/null +++ b/dot_vim/plugged/rust.vim/ftplugin/rust.vim @@ -0,0 +1,200 @@ +" Language: Rust +" Description: Vim ftplugin for Rust +" Maintainer: Chris Morgan +" Last Change: June 08, 2016 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +if get(b:, 'current_compiler', '') ==# '' + if strlen(findfile('Cargo.toml', '.;')) > 0 + compiler cargo + else + compiler rustc + endif +endif + +" Variables {{{1 + +" The rust source code at present seems to typically omit a leader on /*! +" comments, so we'll use that as our default, but make it easy to switch. +" This does not affect indentation at all (I tested it with and without +" leader), merely whether a leader is inserted by default or not. +if get(g:, 'rust_bang_comment_leader', 0) + " Why is the `,s0:/*,mb:\ ,ex:*/` there, you ask? I don't understand why, + " but without it, */ gets indented one space even if there were no + " leaders. I'm fairly sure that's a Vim bug. + setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,:// +else + setlocal comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,:// +endif +setlocal commentstring=//%s +setlocal formatoptions-=t formatoptions+=croqnl +" j was only added in 7.3.541, so stop complaints about its nonexistence +silent! setlocal formatoptions+=j + +" smartindent will be overridden by indentexpr if filetype indent is on, but +" otherwise it's better than nothing. +setlocal smartindent nocindent + +if get(g:, 'rust_recommended_style', 1) + let b:rust_set_style = 1 + setlocal shiftwidth=4 softtabstop=4 expandtab + setlocal textwidth=99 +endif + +setlocal include=\\v^\\s*(pub\\s+)?use\\s+\\zs(\\f\|:)+ +setlocal includeexpr=rust#IncludeExpr(v:fname) + +setlocal suffixesadd=.rs + +if exists("g:ftplugin_rust_source_path") + let &l:path=g:ftplugin_rust_source_path . ',' . &l:path +endif + +if exists("g:loaded_delimitMate") + if exists("b:delimitMate_excluded_regions") + let b:rust_original_delimitMate_excluded_regions = b:delimitMate_excluded_regions + endif + + augroup rust.vim.DelimitMate + autocmd! + + autocmd User delimitMate_map :call rust#delimitmate#onMap() + autocmd User delimitMate_unmap :call rust#delimitmate#onUnmap() + augroup END +endif + +" Integration with auto-pairs (https://github.com/jiangmiao/auto-pairs) +if exists("g:AutoPairsLoaded") && !get(g:, 'rust_keep_autopairs_default', 0) + let b:AutoPairs = {'(':')', '[':']', '{':'}','"':'"', '`':'`'} +endif + +if has("folding") && get(g:, 'rust_fold', 0) + let b:rust_set_foldmethod=1 + setlocal foldmethod=syntax + if g:rust_fold == 2 + setlocal foldlevel< + else + setlocal foldlevel=99 + endif +endif + +if has('conceal') && get(g:, 'rust_conceal', 0) + let b:rust_set_conceallevel=1 + setlocal conceallevel=2 +endif + +" Motion Commands {{{1 + +" Bind motion commands to support hanging indents +nnoremap [[ :call rust#Jump('n', 'Back') +nnoremap ]] :call rust#Jump('n', 'Forward') +xnoremap [[ :call rust#Jump('v', 'Back') +xnoremap ]] :call rust#Jump('v', 'Forward') +onoremap [[ :call rust#Jump('o', 'Back') +onoremap ]] :call rust#Jump('o', 'Forward') + +" Commands {{{1 + +" See |:RustRun| for docs +command! -nargs=* -complete=file -bang -buffer RustRun call rust#Run(0, ) + +" See |:RustExpand| for docs +command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -buffer RustExpand call rust#Expand(0, ) + +" See |:RustEmitIr| for docs +command! -nargs=* -buffer RustEmitIr call rust#Emit("llvm-ir", ) + +" See |:RustEmitAsm| for docs +command! -nargs=* -buffer RustEmitAsm call rust#Emit("asm", ) + +" See |:RustPlay| for docs +command! -range=% RustPlay :call rust#Play(, , , ) + +" See |:RustFmt| for docs +command! -bar -buffer RustFmt call rustfmt#Format() + +" See |:RustFmtRange| for docs +command! -range -buffer RustFmtRange call rustfmt#FormatRange(, ) + +" See |:RustInfo| for docs +command! -bar RustInfo call rust#debugging#Info() + +" See |:RustInfoToClipboard| for docs +command! -bar RustInfoToClipboard call rust#debugging#InfoToClipboard() + +" See |:RustInfoToFile| for docs +command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile() + +" See |:RustTest| for docs +command! -buffer -nargs=* -count -bang RustTest call rust#Test(, , 0, ) + +if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args") + let b:rust_last_rustc_args = [] + let b:rust_last_args = [] +endif + +" Cleanup {{{1 + +let b:undo_ftplugin = " + \ setlocal formatoptions< comments< commentstring< include< includeexpr< suffixesadd< + \|if exists('b:rust_set_style') + \|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth< + \|endif + \|if exists('b:rust_original_delimitMate_excluded_regions') + \|let b:delimitMate_excluded_regions = b:rust_original_delimitMate_excluded_regions + \|unlet b:rust_original_delimitMate_excluded_regions + \|else + \|unlet! b:delimitMate_excluded_regions + \|endif + \|if exists('b:rust_set_foldmethod') + \|setlocal foldmethod< foldlevel< + \|unlet b:rust_set_foldmethod + \|endif + \|if exists('b:rust_set_conceallevel') + \|setlocal conceallevel< + \|unlet b:rust_set_conceallevel + \|endif + \|unlet! b:rust_last_rustc_args b:rust_last_args + \|delcommand RustRun + \|delcommand RustExpand + \|delcommand RustEmitIr + \|delcommand RustEmitAsm + \|delcommand RustPlay + \|nunmap [[ + \|nunmap ]] + \|xunmap [[ + \|xunmap ]] + \|ounmap [[ + \|ounmap ]] + \|setlocal matchpairs-=<:> + \|unlet b:match_skip + \" + +" }}}1 + +" Code formatting on save +augroup rust.vim.PreWrite + autocmd! + autocmd BufWritePre *.rs silent! call rustfmt#PreWrite() +augroup END + +setlocal matchpairs+=<:> +" For matchit.vim (rustArrow stops `Fn() -> X` messing things up) +let b:match_skip = 's:comment\|string\|rustCharacter\|rustArrow' + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/ftplugin/rust/tagbar.vim b/dot_vim/plugged/rust.vim/ftplugin/rust/tagbar.vim new file mode 100644 index 0000000..de8a094 --- /dev/null +++ b/dot_vim/plugged/rust.vim/ftplugin/rust/tagbar.vim @@ -0,0 +1,40 @@ +" +" Support for Tagbar -- https://github.com/majutsushi/tagbar +" +if !exists(':Tagbar') || rust#tags#IsUCtags() + finish +endif + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +if !exists('g:tagbar_type_rust') + let g:tagbar_type_rust = { + \ 'ctagstype' : 'rust', + \ 'kinds' : [ + \'T:types', + \'f:functions', + \'g:enumerations', + \'s:structures', + \'m:modules', + \'c:constants', + \'t:traits', + \'i:trait implementations', + \ ] + \ } +endif + +" In case you've updated/customized your ~/.ctags and prefer to use it. +if !get(g:, 'rust_use_custom_ctags_defs', 0) + let g:tagbar_type_rust.deffile = expand(':p:h:h:h') . '/ctags/rust.ctags' +endif + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/indent/rust.vim b/dot_vim/plugged/rust.vim/indent/rust.vim new file mode 100644 index 0000000..e0c847c --- /dev/null +++ b/dot_vim/plugged/rust.vim/indent/rust.vim @@ -0,0 +1,286 @@ +" Vim indent file +" Language: Rust +" Author: Chris Morgan +" Last Change: 2018 Jan 10 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal cindent +setlocal cinoptions=L0,(s,Ws,J1,j1,m1 +setlocal cinkeys=0{,0},!^F,o,O,0[,0],0(,0) +" Don't think cinwords will actually do anything at all... never mind +setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern,macro + +" Some preliminary settings +setlocal nolisp " Make sure lisp indenting doesn't supersede us +setlocal autoindent " indentexpr isn't much help otherwise +" Also do indentkeys, otherwise # gets shoved to column 0 :-/ +setlocal indentkeys=0{,0},!^F,o,O,0[,0],0(,0) + +setlocal indentexpr=GetRustIndent(v:lnum) + +let b:undo_indent = "setlocal cindent< cinoptions< cinkeys< cinwords< lisp< autoindent< indentkeys< indentexpr<" + +" Only define the function once. +if exists("*GetRustIndent") + finish +endif + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +" Come here when loading the script the first time. + +function! s:get_line_trimmed(lnum) + " Get the line and remove a trailing comment. + " Use syntax highlighting attributes when possible. + " NOTE: this is not accurate; /* */ or a line continuation could trick it + let line = getline(a:lnum) + let line_len = strlen(line) + if has('syntax_items') + " If the last character in the line is a comment, do a binary search for + " the start of the comment. synID() is slow, a linear search would take + " too long on a long line. + if synIDattr(synID(a:lnum, line_len, 1), "name") =~? 'Comment\|Todo' + let min = 1 + let max = line_len + while min < max + let col = (min + max) / 2 + if synIDattr(synID(a:lnum, col, 1), "name") =~? 'Comment\|Todo' + let max = col + else + let min = col + 1 + endif + endwhile + let line = strpart(line, 0, min - 1) + endif + return substitute(line, "\s*$", "", "") + else + " Sorry, this is not complete, nor fully correct (e.g. string "//"). + " Such is life. + return substitute(line, "\s*//.*$", "", "") + endif +endfunction + +function! s:is_string_comment(lnum, col) + if has('syntax_items') + for id in synstack(a:lnum, a:col) + let synname = synIDattr(id, "name") + if synname ==# "rustString" || synname =~# "^rustComment" + return 1 + endif + endfor + else + " without syntax, let's not even try + return 0 + endif +endfunction + +if exists('*shiftwidth') + function! s:shiftwidth() + return shiftwidth() + endfunc +else + function! s:shiftwidth() + return &shiftwidth + endfunc +endif + +function GetRustIndent(lnum) + " Starting assumption: cindent (called at the end) will do it right + " normally. We just want to fix up a few cases. + + let line = getline(a:lnum) + + if has('syntax_items') + let synname = synIDattr(synID(a:lnum, 1, 1), "name") + if synname ==# "rustString" + " If the start of the line is in a string, don't change the indent + return -1 + elseif synname =~? '\(Comment\|Todo\)' + \ && line !~# '^\s*/\*' " not /* opening line + if synname =~? "CommentML" " multi-line + if line !~# '^\s*\*' && getline(a:lnum - 1) =~# '^\s*/\*' + " This is (hopefully) the line after a /*, and it has no + " leader, so the correct indentation is that of the + " previous line. + return GetRustIndent(a:lnum - 1) + endif + endif + " If it's in a comment, let cindent take care of it now. This is + " for cases like "/*" where the next line should start " * ", not + " "* " as the code below would otherwise cause for module scope + " Fun fact: " /*\n*\n*/" takes two calls to get right! + return cindent(a:lnum) + endif + endif + + " cindent gets second and subsequent match patterns/struct members wrong, + " as it treats the comma as indicating an unfinished statement:: + " + " match a { + " b => c, + " d => e, + " f => g, + " }; + + " Search backwards for the previous non-empty line. + let prevlinenum = prevnonblank(a:lnum - 1) + let prevline = s:get_line_trimmed(prevlinenum) + while prevlinenum > 1 && prevline !~# '[^[:blank:]]' + let prevlinenum = prevnonblank(prevlinenum - 1) + let prevline = s:get_line_trimmed(prevlinenum) + endwhile + + " A standalone '{', '}', or 'where' + let l:standalone_open = line =~# '\V\^\s\*{\s\*\$' + let l:standalone_close = line =~# '\V\^\s\*}\s\*\$' + let l:standalone_where = line =~# '\V\^\s\*where\s\*\$' + if l:standalone_open || l:standalone_close || l:standalone_where + " ToDo: we can search for more items than 'fn' and 'if'. + let [l:found_line, l:col, l:submatch] = + \ searchpos('\<\(fn\)\|\(if\)\>', 'bnWp') + if l:found_line !=# 0 + " Now we count the number of '{' and '}' in between the match + " locations and the current line (there is probably a better + " way to compute this). + let l:i = l:found_line + let l:search_line = strpart(getline(l:i), l:col - 1) + let l:opens = 0 + let l:closes = 0 + while l:i < a:lnum + let l:search_line2 = substitute(l:search_line, '\V{', '', 'g') + let l:opens += strlen(l:search_line) - strlen(l:search_line2) + let l:search_line3 = substitute(l:search_line2, '\V}', '', 'g') + let l:closes += strlen(l:search_line2) - strlen(l:search_line3) + let l:i += 1 + let l:search_line = getline(l:i) + endwhile + if l:standalone_open || l:standalone_where + if l:opens ==# l:closes + return indent(l:found_line) + endif + else + " Expect to find just one more close than an open + if l:opens ==# l:closes + 1 + return indent(l:found_line) + endif + endif + endif + endif + + " A standalone 'where' adds a shift. + let l:standalone_prevline_where = prevline =~# '\V\^\s\*where\s\*\$' + if l:standalone_prevline_where + return indent(prevlinenum) + 4 + endif + + " Handle where clauses nicely: subsequent values should line up nicely. + if prevline[len(prevline) - 1] ==# "," + \ && prevline =~# '^\s*where\s' + return indent(prevlinenum) + 6 + endif + + let l:last_prevline_character = prevline[len(prevline) - 1] + + " A line that ends with '.;' is probably an end of a long list + " of method operations. + if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';' + call cursor(a:lnum - 1, 1) + let l:scope_start = searchpair('{\|(', '', '}\|)', 'nbW', + \ 's:is_string_comment(line("."), col("."))') + if l:scope_start != 0 && l:scope_start < a:lnum + return indent(l:scope_start) + 4 + endif + endif + + if l:last_prevline_character ==# "," + \ && s:get_line_trimmed(a:lnum) !~# '^\s*[\[\]{})]' + \ && prevline !~# '^\s*fn\s' + \ && prevline !~# '([^()]\+,$' + \ && s:get_line_trimmed(a:lnum) !~# '^\s*\S\+\s*=>' + " Oh ho! The previous line ended in a comma! I bet cindent will try to + " take this too far... For now, let's normally use the previous line's + " indent. + + " One case where this doesn't work out is where *this* line contains + " square or curly brackets; then we normally *do* want to be indenting + " further. + " + " Another case where we don't want to is one like a function + " definition with arguments spread over multiple lines: + " + " fn foo(baz: Baz, + " baz: Baz) // <-- cindent gets this right by itself + " + " Another case is similar to the previous, except calling a function + " instead of defining it, or any conditional expression that leaves + " an open paren: + " + " foo(baz, + " baz); + " + " if baz && (foo || + " bar) { + " + " Another case is when the current line is a new match arm. + " + " There are probably other cases where we don't want to do this as + " well. Add them as needed. + return indent(prevlinenum) + endif + + if !has("patch-7.4.355") + " cindent before 7.4.355 doesn't do the module scope well at all; e.g.:: + " + " static FOO : &'static [bool] = [ + " true, + " false, + " false, + " true, + " ]; + " + " uh oh, next statement is indented further! + + " Note that this does *not* apply the line continuation pattern properly; + " that's too hard to do correctly for my liking at present, so I'll just + " start with these two main cases (square brackets and not returning to + " column zero) + + call cursor(a:lnum, 1) + if searchpair('{\|(', '', '}\|)', 'nbW', + \ 's:is_string_comment(line("."), col("."))') == 0 + if searchpair('\[', '', '\]', 'nbW', + \ 's:is_string_comment(line("."), col("."))') == 0 + " Global scope, should be zero + return 0 + else + " At the module scope, inside square brackets only + "if getline(a:lnum)[0] == ']' || search('\[', '', '\]', 'nW') == a:lnum + if line =~# "^\\s*]" + " It's the closing line, dedent it + return 0 + else + return &shiftwidth + endif + endif + endif + endif + + " Fall back on cindent, which does it mostly right + return cindent(a:lnum) +endfunction + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/plugin/cargo.vim b/dot_vim/plugged/rust.vim/plugin/cargo.vim new file mode 100644 index 0000000..efc3876 --- /dev/null +++ b/dot_vim/plugged/rust.vim/plugin/cargo.vim @@ -0,0 +1,27 @@ +if exists('g:loaded_rust_vim_plugin_cargo') + finish +endif +let g:loaded_rust_vim_plugin_cargo = 1 +let s:save_cpo = &cpoptions +set cpoptions&vim + +command! -nargs=+ Cargo call cargo#cmd() +command! -nargs=* Cbuild call cargo#build() +command! -nargs=* Ccheck call cargo#check() +command! -nargs=* Cclean call cargo#clean() +command! -nargs=* Cdoc call cargo#doc() +command! -nargs=+ Cnew call cargo#new() +command! -nargs=* Cinit call cargo#init() +command! -nargs=* Crun call cargo#run() +command! -nargs=* Ctest call cargo#test() +command! -nargs=* Cbench call cargo#bench() +command! -nargs=* Cupdate call cargo#update() +command! -nargs=* Csearch call cargo#search() +command! -nargs=* Cpublish call cargo#publish() +command! -nargs=* Cinstall call cargo#install() +command! -nargs=* Cruntarget call cargo#runtarget() + +let &cpoptions = s:save_cpo +unlet s:save_cpo + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/plugin/rust.vim b/dot_vim/plugged/rust.vim/plugin/rust.vim new file mode 100644 index 0000000..5fe77cc --- /dev/null +++ b/dot_vim/plugged/rust.vim/plugin/rust.vim @@ -0,0 +1,28 @@ +" Vim syntastic plugin helper +" Language: Rust +" Maintainer: Andrew Gallant + +if exists('g:loaded_rust_vim') + finish +endif +let g:loaded_rust_vim = 1 +let s:save_cpo = &cpoptions +set cpoptions&vim + +" This is to let Syntastic know about the Rust filetype. +" It enables tab completion for the 'SyntasticInfo' command. +" (This does not actually register the syntax checker.) +if exists('g:syntastic_extra_filetypes') + call add(g:syntastic_extra_filetypes, 'rust') +else + let g:syntastic_extra_filetypes = ['rust'] +endif + +if !exists('g:syntastic_rust_checkers') + let g:syntastic_rust_checkers = ['cargo'] +endif + +let &cpoptions = s:save_cpo +unlet s:save_cpo + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/syntax/rust.vim b/dot_vim/plugged/rust.vim/syntax/rust.vim new file mode 100644 index 0000000..8407b56 --- /dev/null +++ b/dot_vim/plugged/rust.vim/syntax/rust.vim @@ -0,0 +1,387 @@ +" Vim syntax file +" Language: Rust +" Maintainer: Patrick Walton +" Maintainer: Ben Blum +" Maintainer: Chris Morgan +" Last Change: Feb 24, 2016 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Syntax definitions {{{1 +" Basic keywords {{{2 +syn keyword rustConditional match if else +syn keyword rustRepeat loop while +" `:syn match` must be used to prioritize highlighting `for` keyword. +syn match rustRepeat /\/ +" Highlight `for` keyword in `impl ... for ... {}` statement. This line must +" be put after previous `syn match` line to overwrite it. +syn match rustKeyword /\%(\.\+\)\@<=\/ +syn keyword rustRepeat in +syn keyword rustTypedef type nextgroup=rustIdentifier skipwhite skipempty +syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipempty +syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained +syn match rustUnionContextual /\/ +syn keyword rustAwait await +syn match rustKeyword /\!\@!/ display + +syn keyword rustPubScopeCrate crate contained +syn match rustPubScopeDelim /[()]/ contained +syn match rustPubScope /([^()]*)/ contained contains=rustPubScopeDelim,rustPubScopeCrate,rustSuper,rustModPath,rustModPathSep,rustSelf transparent + +syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty +" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting. +syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator +syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty + +syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained +syn match rustFuncName "\%(r#\)\=\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained + +syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end="),\=[*+]" contains=TOP +syn match rustMacroVariable "$\w\+" +syn match rustRawIdent "\(); + +" This is merely a convention; note also the use of [A-Z], restricting it to +" latin identifiers rather than the full Unicode uppercase. I have not used +" [:upper:] as it depends upon 'noignorecase' +"syn match rustCapsIdent display "[A-Z]\w\(\w\)*" + +syn match rustOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?" +" This one isn't *quite* right, as we could have binary-& with a reference +syn match rustSigil display /&\s\+[&~@*][^)= \t\r\n]/he=e-1,me=e-1 +syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1 +" This isn't actually correct; a closure with no arguments can be `|| { }`. +" Last, because the & in && isn't a sigil +syn match rustOperator display "&&\|||" +" This is rustArrowCharacter rather than rustArrow for the sake of matchparen, +" so it skips the ->; see http://stackoverflow.com/a/30309949 for details. +syn match rustArrowCharacter display "->" +syn match rustQuestionMark display "?\([a-zA-Z]\+\)\@!" + +syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic +syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic + +syn match rustEscapeError display contained /\\./ +syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/ +syn match rustEscapeUnicode display contained /\\u{\%(\x_*\)\{1,6}}/ +syn match rustStringContinuation display contained /\\\n\s*/ +syn region rustString matchgroup=rustStringDelimiter start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation +syn region rustString matchgroup=rustStringDelimiter start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell +syn region rustString matchgroup=rustStringDelimiter start='b\?r\z(#*\)"' end='"\z1' contains=@Spell + +" Match attributes with either arbitrary syntax or special highlighting for +" derives. We still highlight strings and comments inside of the attribute. +syn region rustAttribute start="#!\?\[" end="\]" contains=@rustAttributeContents,rustAttributeParenthesizedParens,rustAttributeParenthesizedCurly,rustAttributeParenthesizedBrackets,rustDerive +syn region rustAttributeParenthesizedParens matchgroup=rustAttribute start="\w\%(\w\)*("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents +syn region rustAttributeParenthesizedCurly matchgroup=rustAttribute start="\w\%(\w\)*{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents +syn region rustAttributeParenthesizedBrackets matchgroup=rustAttribute start="\w\%(\w\)*\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents +syn region rustAttributeBalancedParens matchgroup=rustAttribute start="("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents +syn region rustAttributeBalancedCurly matchgroup=rustAttribute start="{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents +syn region rustAttributeBalancedBrackets matchgroup=rustAttribute start="\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents +syn cluster rustAttributeContents contains=rustString,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError +syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait +" This list comes from src/libsyntax/ext/deriving/mod.rs +" Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show). +syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy + +" dyn keyword: It's only a keyword when used inside a type expression, so +" we make effort here to highlight it only when Rust identifiers follow it +" (not minding the case of pre-2018 Rust where a path starting with :: can +" follow). +" +" This is so that uses of dyn variable names such as in 'let &dyn = &2' +" and 'let dyn = 2' will not get highlighted as a keyword. +syn match rustKeyword "\/ contains=rustGenericLifetimeCandidate +syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime + +"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting +syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" +syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:" +syn match rustLabel display "\%(\<\%(break\|continue\)\s*\)\@<=\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" +syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/ +" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII). +syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/ +syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode +syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\%(\x_*\)\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid + +syn match rustShebang /\%^#![^[].*/ +syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell +syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell +syn region rustCommentLineDocError start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell contained +syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell +syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,rustCommentBlockDocRustCode,@Spell +syn region rustCommentBlockDocError matchgroup=rustCommentBlockDocError start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained +syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent +syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent +syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent + +" FIXME: this is a really ugly and not fully correct implementation. Most +" importantly, a case like ``/* */*`` should have the final ``*`` not being in +" a comment, but in practice at present it leaves comments open two levels +" deep. But as long as you stay away from that particular case, I *believe* +" the highlighting is correct. Due to the way Vim's syntax engine works +" (greedy for start matches, unlike Rust's tokeniser which is searching for +" the earliest-starting match, start or end), I believe this cannot be solved. +" Oh you who would fix it, don't bother with things like duplicating the Block +" rules and putting ``\*\@:p:h/rust.vim + unlet b:current_syntax_embed + + " Currently regions marked as ``` will not get + " highlighted at all. In the future, we can do as vim-markdown does and + " highlight with the other syntax. But for now, let's make sure we find + " the closing block marker, because the rules below won't catch it. + syn region rustCommentLinesDocNonRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\).\+$' end='^\z1$' keepend contains=rustCommentLineDoc + + " We borrow the rules from rust’s src/librustdoc/html/markdown.rs, so that + " we only highlight as Rust what it would perceive as Rust (almost; it’s + " possible to trick it if you try hard, and indented code blocks aren’t + " supported because Markdown is a menace to parse and only mad dogs and + " Englishmen would try to handle that case correctly in this syntax file). + syn region rustCommentLinesDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentLineDocLeader + syn region rustCommentBlockDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\%(\s*\*\)\?\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentBlockDocStar + " Strictly, this may or may not be correct; this code, for example, would + " mishighlight: + " + " /** + " ```rust + " println!("{}", 1 + " * 1); + " ``` + " */ + " + " … but I don’t care. Balance of probability, and all that. + syn match rustCommentBlockDocStar /^\s*\*\s\?/ contained + syn match rustCommentLineDocLeader "^\s*//\%(//\@!\|!\)" contained +endif + +" Default highlighting {{{1 +hi def link rustDecNumber rustNumber +hi def link rustHexNumber rustNumber +hi def link rustOctNumber rustNumber +hi def link rustBinNumber rustNumber +hi def link rustIdentifierPrime rustIdentifier +hi def link rustTrait rustType +hi def link rustDeriveTrait rustTrait + +hi def link rustMacroRepeatDelimiters Macro +hi def link rustMacroVariable Define +hi def link rustSigil StorageClass +hi def link rustEscape Special +hi def link rustEscapeUnicode rustEscape +hi def link rustEscapeError Error +hi def link rustStringContinuation Special +hi def link rustString String +hi def link rustStringDelimiter String +hi def link rustCharacterInvalid Error +hi def link rustCharacterInvalidUnicode rustCharacterInvalid +hi def link rustCharacter Character +hi def link rustNumber Number +hi def link rustBoolean Boolean +hi def link rustEnum rustType +hi def link rustEnumVariant rustConstant +hi def link rustConstant Constant +hi def link rustSelf Constant +hi def link rustFloat Float +hi def link rustArrowCharacter rustOperator +hi def link rustOperator Operator +hi def link rustKeyword Keyword +hi def link rustDynKeyword rustKeyword +hi def link rustTypedef Keyword " More precise is Typedef, but it doesn't feel right for Rust +hi def link rustStructure Keyword " More precise is Structure +hi def link rustUnion rustStructure +hi def link rustExistential rustKeyword +hi def link rustPubScopeDelim Delimiter +hi def link rustPubScopeCrate rustKeyword +hi def link rustSuper rustKeyword +hi def link rustUnsafeKeyword Exception +hi def link rustReservedKeyword Error +hi def link rustRepeat Conditional +hi def link rustConditional Conditional +hi def link rustIdentifier Identifier +hi def link rustCapsIdent rustIdentifier +hi def link rustModPath Include +hi def link rustModPathSep Delimiter +hi def link rustFunction Function +hi def link rustFuncName Function +hi def link rustFuncCall Function +hi def link rustShebang Comment +hi def link rustCommentLine Comment +hi def link rustCommentLineDoc SpecialComment +hi def link rustCommentLineDocLeader rustCommentLineDoc +hi def link rustCommentLineDocError Error +hi def link rustCommentBlock rustCommentLine +hi def link rustCommentBlockDoc rustCommentLineDoc +hi def link rustCommentBlockDocStar rustCommentBlockDoc +hi def link rustCommentBlockDocError Error +hi def link rustCommentDocCodeFence rustCommentLineDoc +hi def link rustAssert PreCondit +hi def link rustPanic PreCondit +hi def link rustMacro Macro +hi def link rustType Type +hi def link rustTodo Todo +hi def link rustAttribute PreProc +hi def link rustDerive PreProc +hi def link rustDefault StorageClass +hi def link rustStorage StorageClass +hi def link rustObsoleteStorage Error +hi def link rustLifetime Special +hi def link rustLabel Label +hi def link rustExternCrate rustKeyword +hi def link rustObsoleteExternMod Error +hi def link rustQuestionMark Special +hi def link rustAsync rustKeyword +hi def link rustAwait rustKeyword +hi def link rustAsmDirSpec rustKeyword +hi def link rustAsmSym rustKeyword +hi def link rustAsmOptions rustKeyword +hi def link rustAsmOptionsKey rustAttribute + +" Other Suggestions: +" hi rustAttribute ctermfg=cyan +" hi rustDerive ctermfg=cyan +" hi rustAssert ctermfg=yellow +" hi rustPanic ctermfg=red +" hi rustMacro ctermfg=magenta + +syn sync minlines=200 +syn sync maxlines=500 + +let b:current_syntax = "rust" + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/syntax_checkers/rust/cargo.vim b/dot_vim/plugged/rust.vim/syntax_checkers/rust/cargo.vim new file mode 100644 index 0000000..f7b6953 --- /dev/null +++ b/dot_vim/plugged/rust.vim/syntax_checkers/rust/cargo.vim @@ -0,0 +1,93 @@ +" Vim syntastic plugin +" Language: Rust +" Maintainer: Julien Levesy +" +" See for details on how to add an external Syntastic checker: +" https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide#external + +if exists("g:loaded_syntastic_rust_cargo_checker") + finish +endif + +let g:loaded_syntastic_rust_cargo_checker = 1 + +" Force syntastic to call cargo without a specific file name +let g:syntastic_rust_cargo_fname = "" + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_rust_cargo_IsAvailable() dict + if exists("*syntastic#util#getVersion") + echom "rust.vim: version of Syntastic is too old. Needs to be at least 3.7.0." + return v:false + endif + + return executable(self.getExec()) && + \ syntastic#util#versionIsAtLeast(self.getVersion(), [0, 16, 0]) +endfunction + +function! SyntaxCheckers_rust_cargo_GetLocList() dict + let makeprg = self.makeprgBuild({ "args": "check" }) + let l:root_cargo_toml = cargo#nearestRootCargo(0) + let l:nearest_cargo_toml = cargo#nearestCargo(0) + let b:rust_recent_root_cargo_toml = l:root_cargo_toml + let b:rust_recent_nearest_cargo_toml = l:nearest_cargo_toml + + " All pathname prints are relative to the Cargo.toml of the workspace, if + " there is a workspace, otherwise they are relative to the Cargo.toml of + " the single crate. Where to actually execute under these varying + " circumtances 'cargo' is determined here, and controlled by + " configuration. + + if rust#GetConfigVar('rust_cargo_avoid_whole_workspace', 1) + if l:root_cargo_toml !=# l:nearest_cargo_toml + let makeprg = "cd " . fnamemodify(l:nearest_cargo_toml, ":p:h") + \ . " && " . makeprg + endif + else + let makeprg = "cd " . fnamemodify(l:root_cargo_toml, ":p:h") + \ . " && " . makeprg + endif + + let l:check_all_targets = rust#GetConfigVar('rust_cargo_check_all_targets', 0) + let l:check_all_features = rust#GetConfigVar('rust_cargo_check_all_features', 0) + let l:check_examples = rust#GetConfigVar('rust_cargo_check_examples', 0) + let l:check_tests = rust#GetConfigVar('rust_cargo_check_tests', 0) + let l:check_benches = rust#GetConfigVar('rust_cargo_check_benches', 0) + + let makeprg = makeprg. ' ' + \ . (l:check_all_targets ? ' --all-targets' : '') + \ . (l:check_all_features ? ' --all-features' : '') + \ . (l:check_benches ? ' --benches' : '') + \ . (l:check_examples ? ' --examples' : '') + \ . (l:check_tests ? ' --tests' : '') + + " Ignored patterns, and blank lines + let errorformat = + \ '%-G,' . + \ '%-Gerror: aborting %.%#,' . + \ '%-Gerror: Could not compile %.%#,' + + " Meaningful lines (errors, notes, warnings, contextual information) + let errorformat .= + \ '%Eerror: %m,' . + \ '%Eerror[E%n]: %m,' . + \ '%Wwarning: %m,' . + \ '%Inote: %m,' . + \ '%C %#--> %f:%l:%c' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'cwd': fnamemodify(l:root_cargo_toml, ":p:h:."), + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rust', + \ 'name': 'cargo'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/syntax_checkers/rust/rustc.vim b/dot_vim/plugged/rust.vim/syntax_checkers/rust/rustc.vim new file mode 100644 index 0000000..d60a3d3 --- /dev/null +++ b/dot_vim/plugged/rust.vim/syntax_checkers/rust/rustc.vim @@ -0,0 +1,54 @@ +" Vim syntastic plugin +" Language: Rust +" Maintainer: Andrew Gallant +" +" See for details on how to add an external Syntastic checker: +" https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide#external + +if exists("g:loaded_syntastic_rust_rustc_checker") + finish +endif +let g:loaded_syntastic_rust_rustc_checker = 1 + +" vint: -ProhibitAbbreviationOption +let s:save_cpo = &cpo +set cpo&vim +" vint: +ProhibitAbbreviationOption + +function! SyntaxCheckers_rust_rustc_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + " Old errorformat (before nightly 2016/08/10) + let errorformat = + \ '%E%f:%l:%c: %\d%#:%\d%# %.%\{-}error:%.%\{-} %m,' . + \ '%W%f:%l:%c: %\d%#:%\d%# %.%\{-}warning:%.%\{-} %m,' . + \ '%C%f:%l %m' + + " New errorformat (after nightly 2016/08/10) + let errorformat .= + \ ',' . + \ '%-G,' . + \ '%-Gerror: aborting %.%#,' . + \ '%-Gerror: Could not compile %.%#,' . + \ '%Eerror: %m,' . + \ '%Eerror[E%n]: %m,' . + \ '%-Gwarning: the option `Z` is unstable %.%#,' . + \ '%Wwarning: %m,' . + \ '%Inote: %m,' . + \ '%C %#--> %f:%l:%c' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rust', + \ 'name': 'rustc'}) + +" vint: -ProhibitAbbreviationOption +let &cpo = s:save_cpo +unlet s:save_cpo +" vint: +ProhibitAbbreviationOption + +" vim: set et sw=4 sts=4 ts=8: diff --git a/dot_vim/plugged/rust.vim/test/Dockerfile b/dot_vim/plugged/rust.vim/test/Dockerfile new file mode 100644 index 0000000..c84c49e --- /dev/null +++ b/dot_vim/plugged/rust.vim/test/Dockerfile @@ -0,0 +1,34 @@ +# This is brought as reference, to be able to reproduce a new image + +FROM alonid/vim-testbed:10 + +RUN install_vim -tag v7.4.052 -name vim74-trusty -build \ + -tag v8.0.1850 -name vim80 -build \ + -tag v8.1.0105 -name vim81 -build \ + -tag neovim:v0.1.7 -build \ + -tag neovim:v0.2.2 -build + +ENV PACKAGES="\ + bash \ + git \ + python \ + python2-pip \ + curl \ +" + +RUN dnf install -y $PACKAGES + +RUN pip install vim-vint==0.3.19 + +RUN export HOME=/rust ; mkdir $HOME ; curl https://sh.rustup.rs -sSf | sh -s -- -y + +RUN chown vimtest.vimtest -R /rust + +RUN (dnf remove -y gcc \*-devel ; \ + dnf install -y gpm msgpack libvterm libtermkey unibilium ) || true +RUN dnf clean all + +RUN echo "export PATH=~/.cargo/bin:$PATH" >> ~/.bashrc + +RUN git clone https://github.com/da-x/vader.vim vader && \ + cd vader && git checkout v2017-12-26 diff --git a/dot_vim/plugged/rust.vim/test/coverage.vader b/dot_vim/plugged/rust.vim/test/coverage.vader new file mode 100644 index 0000000..84734e7 --- /dev/null +++ b/dot_vim/plugged/rust.vim/test/coverage.vader @@ -0,0 +1,24 @@ +Given rust (Some Rust code): + fn main() { + println!("Hello World\n") + } + +Execute (RustInfo - call it to see that it works): + redir => m + silent RustInfo + redir END + Log m + +Execute (RustEmitAsm - see that we actually get assembly output): + silent! w test.rs + silent! e! test.rs + redir => m + silent! RustEmitAsm + redir END + AssertEqual 'asm', &filetype + normal! ggVGy:q + AssertEqual 1,(@" =~# '\V.section') + bd + call delete('test.rs') + +# TODO: a lot more tests diff --git a/dot_vim/plugged/rust.vim/test/empty_dot_gitignore b/dot_vim/plugged/rust.vim/test/empty_dot_gitignore new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rust.vim/test/empty_sample.rs b/dot_vim/plugged/rust.vim/test/empty_sample.rs new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/rust.vim/test/executable_run-tests b/dot_vim/plugged/rust.vim/test/executable_run-tests new file mode 100644 index 0000000..9e11ba5 --- /dev/null +++ b/dot_vim/plugged/rust.vim/test/executable_run-tests @@ -0,0 +1,105 @@ +#!/usr/bin/env python + +import os +import sys + +REPO = "alonid/vim-testbed" +TAG = "10-rust.vim" +IMAGE = "%s:%s" % (REPO, TAG) + +class Error(Exception): + pass + +def system(cmd, capture=False, ok_fail=False): + if capture: + f = os.popen(cmd) + d = f.read() + return d + + res = os.system(cmd) + if res != 0: + if ok_fail: + return res + + raise Error("Error executing: %s" % (cmd, )) + return 0 + +def root(): + return os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + +def prep(): + d = os.path.join(root(), "test") + for i in [".cargo", ".rustup", ".multirust"]: + l = os.path.join(d, i) + if not os.path.lexists(l): + os.symlink("/rust/" + i, l) + + l = os.path.join(root(), "test/.vimrc") + if not os.path.lexists(l): + os.symlink("vimrc", l) + + if not os.path.exists(os.path.join(d, ".profile")): + f = open(os.path.join(d, ".profile"), "w") + f.write('export PATH="$HOME/.cargo/bin:$PATH"\n') + f.close() + +def docker_run(cmd, interactive=False, ok_fail=False): + prep() + d = root() + params = "-v %s:/testplugin -v %s/test:/home/vimtest" % (d, d) + params += " -e HOME=/home/vimtest" + if not interactive: + params += " -a stderr" + params += " -e VADER_OUTPUT_FILE=/dev/stderr" + params += " -u %s" % (os.getuid(), ) + params += " -w /testplugin" + if interactive: + interactive_str = "-it" + else: + interactive_str = "" + return system("docker run %s --rm %s %s %s" % (interactive_str, params, IMAGE, cmd), + ok_fail=ok_fail) + +def image_exists(): + r = system("docker images -q %s" % (IMAGE, ), capture=True) + return len(r.strip().splitlines()) >= 1 + +def tests_on_docker(): + res = docker_run("bash -lc 'python /home/vimtest/run-tests inside-docker'", ok_fail=True) + if res == 0: + print("Tests OK") + else: + print("Tests Failed") + sys.exit(1) + +def inside_docker(): + res = system("/vim-build/bin/vim80 --not-a-term '+Vader! test/*.vader'", ok_fail=True) + if res != 0: + sys.exit(1) + +def run_with_vimrc(vimrc): + res = system("vim -u %s --not-a-term '+Vader! test/*.vader'" % (vimrc, ), ok_fail=True) + if res != 0: + sys.exit(1) + +def main(): + if sys.argv[1:] == ["inside-docker"]: + inside_docker() + return + + if sys.argv[1:2] == ["run-with-vimrc"]: + run_with_vimrc(sys.argv[2]) + return + + if not image_exists(): + print("Need to take image from remote") + system("docker pull %s" % (IMAGE, )) + + if "-i" in sys.argv[1:]: + docker_run("bash -l", interactive=True) + return + + tests_on_docker() + +if __name__ == "__main__": + main() diff --git a/dot_vim/plugged/rust.vim/test/indent.vader b/dot_vim/plugged/rust.vim/test/indent.vader new file mode 100644 index 0000000..91f6580 --- /dev/null +++ b/dot_vim/plugged/rust.vim/test/indent.vader @@ -0,0 +1,292 @@ +Given rust: + fn main() { + let a = 2; + println!("Hello World\n") + } + +Do: + vip= + +Expect rust (very basic indentation result): + fn main() { + let a = 2; + println!("Hello World\n") + } + +############################################ +# Issue #195 + +Given rust: + fn main() { + let paths: Vec<_> = ({ + fs::read_dir("test_data") + .unwrap() + .cloned() + }) + .collect(); + + println!("Hello World\n"); + } + +Do: + /collect\ + ostatement();\\ + +Expect rust (issue #195): + fn main() { + let paths: Vec<_> = ({ + fs::read_dir("test_data") + .unwrap() + .cloned() + }) + .collect(); + statement(); + + println!("Hello World\n"); + } + +############################################ +# Issue #189 + +Given rust: + impl X for { + pub fn get(&self, key: &Q) -> Option> + where + K: Borrow, + Q: Ord + ?Sized, + { + self.inner.get(key).map(Entry::new) + } + } + +Do: + vip= + +Expect rust (issue #189): + impl X for { + pub fn get(&self, key: &Q) -> Option> + where + K: Borrow, + Q: Ord + ?Sized, + { + self.inner.get(key).map(Entry::new) + } + } + +############################################ +# Issue #189b + +Given rust: + impl X for { + pub fn get(&self, key: &Q) -> Option> + where + K: Borrow, + Q: Ord + ?Sized + { + self.inner.get(key).map(Entry::new) + } + } + +Do: + vip= + +Expect rust (issue #189b): + impl X for { + pub fn get(&self, key: &Q) -> Option> + where + K: Borrow, + Q: Ord + ?Sized + { + self.inner.get(key).map(Entry::new) + } + } + +############################################ +# Issue #189c + +Given rust: + impl X for { + pub fn get(&self, key: &Q) -> Option> + where K: Borrow, Q: Ord + ?Sized + { + self.inner.get(key).map(Entry::new) + } + } + +Do: + vip= + +Expect rust (issue #189b): + impl X for { + pub fn get(&self, key: &Q) -> Option> + where K: Borrow, Q: Ord + ?Sized + { + self.inner.get(key).map(Entry::new) + } + } + + +############################################ +# Issue #149 + +Given rust: + fn test() { + let t = "a + wah"; + } + +Do: + /wah\ + i#\\ + /;\o + statement();\\ + +# Disabled +# Expect rust (issue #149): + fn test() { + let t = "a + #wah"; + statement(); + } + + +############################################ +# Issue #77 + +Given rust: + fn test() { + } + +Do: + of(x, y,\z);\ + f((x, y),\z);\ + +# Disabled +# Expect rust (issue #77): + fn test() { + f(x, y, + z); + f((x, y), + z); + + } + +############################################ +# Issue #44 + +Given rust: + fn main() { + a + + let philosophers = vec![ + Philosopher::new("Judith Butler"), + Philosopher::new("Gilles Deleuze"), + Philosopher::new("Karl Marx"), + Philosopher::new("Emma Goldman"), + Philosopher::new("Michel Foucault"), + ]; + } + +Do: + /let\ + vip= + +# Disabled +# Expect rust (issue #44): + fn main() { + a + + let philosophers = vec![ + Philosopher::new("Judith Butler"), + Philosopher::new("Gilles Deleuze"), + Philosopher::new("Karl Marx"), + Philosopher::new("Emma Goldman"), + Philosopher::new("Michel Foucault"), + ]; + } + +############################################ +# Issue #5 + +Given rust: + fn f() { + if x && + y { + } + } + +Do: + vip= + +Expect rust (issue #5): + fn f() { + if x && + y { + } + } + +############################################ +# Issue #366 + +Given rust: + fn f() { + g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Do: + vip= + +Expect rust (issue #366): + fn f() { + g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Given rust: + fn f() { + let a = g(|_| { + h(); + }) + .unwrap(); + h(); + } + +Do: + vip= + +Expect rust (issue #366, variation #2): + fn f() { + let a = g(|_| { + h(); + }) + .unwrap(); + h(); + } + +############################################ + +Given rust: + fn f() { + let mut state = State::new( + backend, + header.clone(), + ).expect("Something"); + } + +Do: + vip= + +Expect rust (Trailing comma in call): + fn f() { + let mut state = State::new( + backend, + header.clone(), + ).expect("Something"); + } diff --git a/dot_vim/plugged/rust.vim/test/vimrc b/dot_vim/plugged/rust.vim/test/vimrc new file mode 100644 index 0000000..f7f1533 --- /dev/null +++ b/dot_vim/plugged/rust.vim/test/vimrc @@ -0,0 +1,30 @@ +" vint: -ProhibitSetNoCompatible +" + +set nocompatible +filetype off + +" This script is currently designed to be run from within Docker, the +" following paths are intrinsic to the container: +source /rtp.vim + +" Paths need prepending (instead of what is originally done +" in vim-testbed) in order to supersede the rust.vim that is +" supplied with Vim. +exec 'set runtimepath=/vader,/testplugin,' . &runtimepath +cd /testplugin + +filetype plugin indent on +syntax on + +set nocompatible +set tabstop=8 +set softtabstop=4 +set shiftwidth=4 +set expandtab +set backspace=2 +set nofoldenable +set foldmethod=syntax +set foldlevelstart=10 +set foldnestmax=10 +set ttimeoutlen=0 diff --git a/dot_vim/plugged/rust.vim/triagebot.toml b/dot_vim/plugged/rust.vim/triagebot.toml new file mode 100644 index 0000000..fa0824a --- /dev/null +++ b/dot_vim/plugged/rust.vim/triagebot.toml @@ -0,0 +1 @@ +[assign] diff --git a/dot_vim/plugged/semantic-highlight.vim/README.md b/dot_vim/plugged/semantic-highlight.vim/README.md new file mode 100644 index 0000000..7327eaf --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/README.md @@ -0,0 +1,105 @@ +# Semantic-Highlight.vim + +Where every variable is a different color, an idea popularized by Evan Brooks' blog post. + + + +## Install + +Vundle or Neobundle: + +``` +Plugin 'jaxbot/semantic-highlight.vim' +``` + +Pathogen: + +``` +git clone https://github.com/jaxbot/semantic-highlight.vim.git +``` + +## Usage + +In a file, run `:SemanticHighlight` to convert variables into colors. Run `:SemanticHighlightRevert` to revert. + +You can also map `:SemanticHighlightToggle` to a shortcut to toggle the effect on and off: + +``` +:nnoremap s :SemanticHighlightToggle +``` + +## Customization + +Set `g:semanticTermColors` and/or `g:semanticGUIColors` to a list of colors, then run `RebuildSemanticColors` to flush the cache. The color lists look like: + +``` +let s:semanticGUIColors = [ '#72d572', '#c5e1a5', '#e6ee9c', '#fff59d', '#ffe082', '#ffcc80', '#ffab91', '#bcaaa4', '#b0bec5', '#ffa726', '#ff8a65', '#f9bdbb', '#f9bdbb', '#f8bbd0', '#e1bee7', '#d1c4e9', '#ffe0b2', '#c5cae9', '#d0d9ff', '#b3e5fc', '#b2ebf2', '#b2dfdb', '#a3e9a4', '#dcedc8' , '#f0f4c3', '#ffb74d' ] +``` +or + +``` +let g:semanticTermColors = [28,1,2,3,4,5,6,7,25,9,10,34,12,13,14,15,16,125,124,19] +``` + +Either list can also be set in your vimrc + +## Language support + +This plugin is language agnostic, meaning it will work on any language with words. However, some languages have been tweaked by default to disable highlighting of language keywords. + +Current language support with keyword blacklists: + +* C +* C++ +* CoffeeScript +* Go +* Java +* JavaScript +* PHP +* Python +* Ruby +* Rust +* Scala +* TypeScript + +This can be customized locally by populating `g:semanticBlacklistOverride` like so: + +``` +let g:semanticBlacklistOverride = { + \ 'javascript': [ + \ 'setTimeout', + \ 'break', + \ 'dance', + \ ] +\ } +``` + +If you want to add language support to the plugin itself, feel free to edit autoload/blacklist.vim and submit a pull request with your changes. Help is appreciated! + +## Adding characters to be included in highlights + +Some languages, such as PHP and JavaScript, allow special characters to be used in variable names. + +Consider the following: + +```JS +var $someObject = '1231'; +var someObject = 1231; +``` + +Without the `autocommand` outlined below, only the `someObject` portion of the variable would be semantically highlighted, and highlighted the same colour as the `$`-free variable. To have the preceding `$` included in the semantic highlight, use the following snippet in your vimrc: + +``` +autocmd FileType javascript setlocal iskeyword+=$ +``` + +## Kudos + +Big thanks to John Leimon, whose [Semantic C/C++ Vimscript](http://www.vim.org/scripts/script.php?script_id=4945) was inspirational in the construction of this one. + +Also big thanks to everyone who submitted bugs, suggestions, and pull requests! + +## About me + +I'm Jonathan. I like to hack around with Vim, Node.js, embedded hardware, and Glass. If any of that sounds interesting, [follow me!](https://github.com/jaxbot) + diff --git a/dot_vim/plugged/semantic-highlight.vim/autoload/blacklist.vim b/dot_vim/plugged/semantic-highlight.vim/autoload/blacklist.vim new file mode 100644 index 0000000..5cbfc94 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/autoload/blacklist.vim @@ -0,0 +1,641 @@ +let s:blacklist = { + \ 'javascript': [ + \ 'render', + \ 'constructor', + \ 'console', + \ 'log', + \ 'await', + \ 'window', + \ 'break', + \ 'case', + \ 'catch', + \ 'class', + \ 'const', + \ 'continue', + \ 'debugger', + \ 'default', + \ 'delete', + \ 'do', + \ 'else', + \ 'enum', + \ 'export', + \ 'extends', + \ 'false', + \ 'finally', + \ 'for', + \ 'function', + \ 'if', + \ 'implements', + \ 'import', + \ 'in', + \ 'instanceof', + \ 'interface', + \ 'let', + \ 'new', + \ 'null', + \ 'package', + \ 'private', + \ 'protected', + \ 'public', + \ 'return', + \ 'static', + \ 'super', + \ 'switch', + \ 'this', + \ 'throw', + \ 'true', + \ 'try', + \ 'typeof', + \ 'require', + \ 'from', + \ 'props', + \ 'state', + \ 'bind', + \ 'var', + \ 'void', + \ 'while', + \ 'with', + \ ], + \ 'typescript': [ + \ 'await', + \ 'break', + \ 'case', + \ 'catch', + \ 'class', + \ 'const', + \ 'continue', + \ 'debugger', + \ 'default', + \ 'delete', + \ 'do', + \ 'else', + \ 'enum', + \ 'export', + \ 'extends', + \ 'false', + \ 'finally', + \ 'for', + \ 'function', + \ 'if', + \ 'implements', + \ 'import', + \ 'in', + \ 'instanceof', + \ 'interface', + \ 'let', + \ 'new', + \ 'null', + \ 'package', + \ 'private', + \ 'protected', + \ 'public', + \ 'return', + \ 'static', + \ 'super', + \ 'switch', + \ 'this', + \ 'throw', + \ 'true', + \ 'try', + \ 'typeof', + \ 'var', + \ 'void', + \ 'while', + \ 'with', + \ 'boolean', + \ 'number', + \ 'string', + \ 'Array', + \ 'Object', + \ 'any', + \ 'module', + \ ], + \ 'ruby': [ + \ 'BEGIN', + \ 'do', + \ '?', + \ 'END', + \ '__FILE__', + \ '__LINE__', + \ 'alias', + \ 'and', + \ 'begin', + \ 'break', + \ 'case', + \ 'class', + \ 'def', + \ 'defined', + \ 'else', + \ 'elsif', + \ 'end', + \ 'ensure', + \ 'false', + \ 'for', + \ 'if', + \ 'in', + \ 'module', + \ 'next', + \ 'nil', + \ 'not', + \ 'or', + \ 'redo', + \ 'rescue', + \ 'retry', + \ 'return', + \ 'self', + \ 'super', + \ 'then', + \ 'true', + \ 'undef', + \ 'unless', + \ 'until', + \ 'when', + \ 'while', + \ 'while', + \ ], + \ 'php': [ + \ '__CLASS__', + \ '__DIR__', + \ '__FILE__', + \ '__FUNCTION__', + \ '__LINE__', + \ '__METHOD__', + \ '__NAMESPACE__', + \ '__TRAIT__', + \ '__halt_compiler', + \ 'abstract', + \ 'and', + \ 'array', + \ 'as', + \ 'break', + \ 'callable', + \ 'case', + \ 'catch', + \ 'class', + \ 'clone', + \ 'const', + \ 'continue', + \ 'declare', + \ 'default', + \ 'die', + \ 'do', + \ 'echo', + \ 'else', + \ 'elseif', + \ 'empty', + \ 'enddeclare', + \ 'endfor', + \ 'endforeach', + \ 'endif', + \ 'endswitch', + \ 'endwhile', + \ 'eval', + \ 'exit', + \ 'extends', + \ 'final', + \ 'for', + \ 'foreach', + \ 'function', + \ 'global', + \ 'goto', + \ 'if', + \ 'implements', + \ 'include', + \ 'include_once', + \ 'instanceof', + \ 'insteadof', + \ 'interface', + \ 'isset', + \ 'list', + \ 'namespace', + \ 'new', + \ 'or', + \ 'print', + \ 'private', + \ 'protected', + \ 'public', + \ 'require', + \ 'require_once', + \ 'return', + \ 'static', + \ 'switch', + \ 'throw', + \ 'trait', + \ 'try', + \ 'unset', + \ 'use', + \ 'var', + \ 'while', + \ 'xor', + \ ], + \ 'python': [ + \ 'True', + \ 'False', + \ 'None', + \ 'and', + \ 'as', + \ 'assert', + \ 'break', + \ 'class', + \ 'continue', + \ 'def', + \ 'del', + \ 'elif', + \ 'else', + \ 'except', + \ 'exec', + \ 'finally', + \ 'for', + \ 'from', + \ 'global', + \ 'if', + \ 'import', + \ 'in', + \ 'is', + \ 'lambda', + \ 'not', + \ 'or', + \ 'pass', + \ 'print', + \ 'raise', + \ 'return', + \ 'try', + \ 'while', + \ 'with', + \ 'yield', + \ ], + \ 'coffee': [ + \ 'true', + \ 'false', + \ 'null', + \ 'this', + \ 'new', + \ 'delete', + \ 'typeof', + \ 'in', + \ 'instanceof', + \ 'return', + \ 'throw', + \ 'break', + \ 'continue', + \ 'debugger', + \ 'if', + \ 'else', + \ 'switch', + \ 'for', + \ 'while', + \ 'do', + \ 'try', + \ 'catch', + \ 'finally', + \ 'class', + \ 'extends', + \ 'super', + \ 'undefined', + \ 'then', + \ 'unless', + \ 'until', + \ 'loop', + \ 'of', + \ 'by', + \ 'when', + \ ], + \ 'c': [ + \ 'auto', + \ 'break', + \ 'bool', + \ 'case', + \ 'char', + \ 'const', + \ 'continue', + \ 'default', + \ 'define', + \ 'defined', + \ 'do', + \ 'double', + \ 'elif', + \ 'else', + \ 'endif', + \ 'enum', + \ 'extern', + \ 'float', + \ 'for', + \ 'goto', + \ 'if', + \ 'ifdef', + \ 'int', + \ 'int8_t', + \ 'int16_t', + \ 'int32_t', + \ 'long', + \ 'register', + \ 'return', + \ 'short', + \ 'signed', + \ 'sizeof', + \ 'static', + \ 'struct', + \ 'switch', + \ 'typedef', + \ 'uint8_t', + \ 'uint16_t', + \ 'uint32_t', + \ 'union', + \ 'unsigned', + \ 'void', + \ 'volatile', + \ 'while', + \ ], + \ 'cpp': [ + \ 'auto', + \ 'alignas', + \ 'alignof', + \ 'break', + \ 'bool', + \ 'case', + \ 'char', + \ 'char16_t', + \ 'char32_t', + \ 'const', + \ 'constexpr', + \ 'const_cast', + \ 'continue', + \ 'class', + \ 'default', + \ 'define', + \ 'decltype', + \ 'delete', + \ 'do', + \ 'double', + \ 'dynamic_cast', + \ 'else', + \ 'enum', + \ 'error', + \ 'extern', + \ 'explicit', + \ 'float', + \ 'false', + \ 'friend', + \ 'final', + \ 'for', + \ 'goto', + \ 'if', + \ 'inline', + \ 'int', + \ 'int8_t', + \ 'int16_t', + \ 'int32_t', + \ 'long', + \ 'line', + \ 'mutable', + \ 'namespace', + \ 'new', + \ 'noexcept', + \ 'nullptr', + \ 'operator', + \ 'override', + \ 'private', + \ 'pragma', + \ 'protected', + \ 'public', + \ 'register', + \ 'reinterpret_cast', + \ 'return', + \ 'short', + \ 'signed', + \ 'sizeof', + \ 'static', + \ 'static_assert', + \ 'static_cast', + \ 'struct', + \ 'switch', + \ 'template', + \ 'this', + \ 'thread_local', + \ 'throw', + \ 'true', + \ 'try', + \ 'typedef', + \ 'typeid', + \ 'typename', + \ 'uint8_t', + \ 'uint16_t', + \ 'uint32_t', + \ 'union', + \ 'unsigned', + \ 'undef', + \ 'using', + \ 'virtual', + \ 'void', + \ 'volatile', + \ 'wchar_t', + \ 'while', + \ ], + \ 'java': [ + \ 'abstract', + \ 'continue', + \ 'for', + \ 'new', + \ 'switch', + \ 'assert', + \ 'default', + \ 'goto', + \ 'package', + \ 'synchronized', + \ 'boolean', + \ 'do', + \ 'if', + \ 'private', + \ 'this', + \ 'break', + \ 'double', + \ 'implements', + \ 'protected', + \ 'throw', + \ 'byte', + \ 'else', + \ 'import', + \ 'public', + \ 'throws', + \ 'case', + \ 'enum', + \ 'instanceof', + \ 'return', + \ 'transient', + \ 'catch', + \ 'extends', + \ 'int', + \ 'short', + \ 'try', + \ 'char', + \ 'final', + \ 'interface', + \ 'static', + \ 'void', + \ 'class', + \ 'finally', + \ 'long', + \ 'strictfp', + \ 'volatile', + \ 'const', + \ 'float', + \ 'native', + \ 'super', + \ 'while' + \ ], + \ 'rust': [ + \ 'Self', + \ 'as', + \ 'bool', + \ 'box', + \ 'break', + \ 'char', + \ 'const', + \ 'continue', + \ 'crate', + \ 'else', + \ 'enum', + \ 'extern', + \ 'f32', + \ 'f64', + \ 'fn', + \ 'for', + \ 'i16', + \ 'i32', + \ 'i64', + \ 'i8', + \ 'if', + \ 'impl', + \ 'isize', + \ 'let', + \ 'loop', + \ 'match', + \ 'mod', + \ 'move', + \ 'mut', + \ 'pub', + \ 'return', + \ 'ref', + \ 'self', + \ 'static', + \ 'str', + \ 'struct', + \ 'super', + \ 'trait', + \ 'type', + \ 'u16', + \ 'u32', + \ 'u64', + \ 'u8', + \ 'unsafe', + \ 'use', + \ 'usize', + \ 'where', + \ 'while', + \ ], + \ 'go': [ + \ 'break', + \ 'case', + \ 'chan', + \ 'const', + \ 'continue', + \ 'default', + \ 'defer', + \ 'else', + \ 'fallthrough', + \ 'for', + \ 'func', + \ 'go', + \ 'goto', + \ 'if', + \ 'import', + \ 'interface', + \ 'map', + \ 'package', + \ 'range', + \ 'return', + \ 'select', + \ 'struct', + \ 'switch', + \ 'type', + \ 'var', + \ 'string', + \ 'bool', + \ 'error', + \ 'true', + \ 'false', + \ 'int8', + \ 'int16', + \ 'int32', + \ 'int64', + \ 'uint8', + \ 'uint16', + \ 'uint32', + \ 'uint64', + \ 'float32', + \ 'float64', + \ 'complex64', + \ 'complex128', + \ 'byte', + \ ], + \ 'scala': [ + \ 'abstract', + \ 'case', + \ 'catch', + \ 'class', + \ 'def', + \ 'do', + \ 'else', + \ 'extends', + \ 'false', + \ 'final', + \ 'finally', + \ 'for', + \ 'forSome', + \ 'if', + \ 'implicit', + \ 'import', + \ 'lazy', + \ 'macro', + \ 'match', + \ 'new', + \ 'null', + \ 'object', + \ 'override', + \ 'package', + \ 'private', + \ 'protected', + \ 'return', + \ 'sealed', + \ 'super', + \ 'this', + \ 'throw', + \ 'trait', + \ 'try', + \ 'true', + \ 'type', + \ 'val', + \ 'var', + \ 'while', + \ 'with', + \ 'yield', + \ '_', + \ ':', + \ '=', + \ '=>', + \ '<-', + \ '<:', + \ '<%', + \ '>:', + \ '#', + \ '@', + \ ], + \ } + +if (exists('g:semanticBlacklistOverride')) + let s:blacklist = extend(s:blacklist, g:semanticBlacklistOverride) +endif + +function! blacklist#GetBlacklist() + return s:blacklist +endfunction diff --git a/dot_vim/plugged/semantic-highlight.vim/autoload/containedinlist.vim b/dot_vim/plugged/semantic-highlight.vim/autoload/containedinlist.vim new file mode 100644 index 0000000..8b3be1d --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/autoload/containedinlist.vim @@ -0,0 +1,11 @@ +let s:containedinlist = { + \ 'php': 'phpBracketInString,phpVarSelector,phpClExpressions,phpIdentifier', + \ } + +if (exists('g:semanticContainedlistOverride')) + let s:containedinlist = extend(s:containedinlist, g:semanticContainedlistOverride) +endif + +function! containedinlist#GetContainedinlist() + return s:containedinlist +endfunction diff --git a/dot_vim/plugged/semantic-highlight.vim/doc/semantic-highlight.txt b/dot_vim/plugged/semantic-highlight.vim/doc/semantic-highlight.txt new file mode 100644 index 0000000..0f42e96 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/doc/semantic-highlight.txt @@ -0,0 +1,87 @@ +*semantic-highlight.txt* + *semantic-highlight* + +============================================================================== +CONTENTS *semantic-highlight-contents* + +Variables |semantic-highlight-variables| + +------------------------------------------------------------------------------ +VARIABLES *semantic-highlight-variables* + +g:semanticGUIColors *g:semanticGUIColors* + +Override this with an array of hex values to change the list of colors the +plugin will use when in GUI mode. + +let g:semanticGUIColors = ['#FFF', '#000'] + +g:semanticTermColors *g:semanticTermColors* + +Override this with an array of numeric values to change the list of colors the +plugin will use when in CLI mode. + +let g:semanticGUIColors = [1, 2] + +g:semanticUseCache *g:semanticUseCache* + +By default the plugin will cache color values in order to provide a more +consistent coloration across files. + +To turn this off, set this to 0 + +let g:semanticUseCache = 0 + +g:semanticEnableBlacklist *g:semanticEnableBlacklist* + +By default the plugin will use an internal blacklist to ensure language +keywords are not colored. + +To disable this behaviour, set this to 0 + +let g:semanticEnableBlacklist = 0 + +g:semanticBlacklistOverride *g:semanticBlacklistOverride* + +The plugin uses an internal object to load keywords for various languages. +Languages currently configured are PHP, JavaScript and Ruby. + +To add a language or replace the keyword list for a configured language, +provide an override object as below: + +let g:semanticBlacklistOverride = { 'javascript': ['this', 'that', 'the_other'] } + +g:semanticEnableFileTypes *g:semanticEnableFileTypes* + +The plugin can be configured to activate automatically for certain filetypes. + +There are three possible behaviours, off, filetype only and filetype + +cursorhold. + +filetype: + +This will automatically start the plugin when entering a file of the given +filetypes. + +let g:semanticEnableFileTypes = ['javascript', 'vim'] + +filetype + cursorhold: + +This will automatically start the plugin when entering a file of the given +filetypes, and re-render on cursorhold for the same filetypes. + +let g:semanticEnableFileTypes = { 'javascript': 'js', 'vim': 'vim' } + +g:semanticPersistCache *g:semanticPersistCache* + +Set this to 1 to allow persistent color values across vim sessions + +Default value is 0 + +g:semanticPersistCacheLocation *g:semanticPersistCacheLocation* + +The location of the persisted color values. + +Default is $HOME/.semantic-highlight-cache + +vim:tw=78:ts=8:ft=help:norl: diff --git a/dot_vim/plugged/semantic-highlight.vim/doc/tags b/dot_vim/plugged/semantic-highlight.vim/doc/tags new file mode 100644 index 0000000..9f9c164 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/doc/tags @@ -0,0 +1,12 @@ +g:semanticBlacklistOverride semantic-highlight.txt /*g:semanticBlacklistOverride* +g:semanticEnableBlacklist semantic-highlight.txt /*g:semanticEnableBlacklist* +g:semanticEnableFileTypes semantic-highlight.txt /*g:semanticEnableFileTypes* +g:semanticGUIColors semantic-highlight.txt /*g:semanticGUIColors* +g:semanticPersistCache semantic-highlight.txt /*g:semanticPersistCache* +g:semanticPersistCacheLocation semantic-highlight.txt /*g:semanticPersistCacheLocation* +g:semanticTermColors semantic-highlight.txt /*g:semanticTermColors* +g:semanticUseCache semantic-highlight.txt /*g:semanticUseCache* +semantic-highlight semantic-highlight.txt /*semantic-highlight* +semantic-highlight-contents semantic-highlight.txt /*semantic-highlight-contents* +semantic-highlight-variables semantic-highlight.txt /*semantic-highlight-variables* +semantic-highlight.txt semantic-highlight.txt /*semantic-highlight.txt* diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/HEAD b/dot_vim/plugged/semantic-highlight.vim/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/branches/.keep b/dot_vim/plugged/semantic-highlight.vim/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/config b/dot_vim/plugged/semantic-highlight.vim/dot_git/config new file mode 100644 index 0000000..8990e3f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/jaxbot/semantic-highlight.vim.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/description b/dot_vim/plugged/semantic-highlight.vim/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/post-update.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-push.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/index b/dot_vim/plugged/semantic-highlight.vim/dot_git/index new file mode 100644 index 0000000..b26e2e7 Binary files /dev/null and b/dot_vim/plugged/semantic-highlight.vim/dot_git/index differ diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/info/exclude b/dot_vim/plugged/semantic-highlight.vim/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/HEAD b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/HEAD new file mode 100644 index 0000000..0986a0f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 7e141c2b7be0f2600276004fd2e7382a3fa0f690 LinlyBoi 1673460162 +0200 clone: from https://github.com/jaxbot/semantic-highlight.vim.git +7e141c2b7be0f2600276004fd2e7382a3fa0f690 7e141c2b7be0f2600276004fd2e7382a3fa0f690 LinlyBoi 1673460166 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/heads/master b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..45e5b8f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 7e141c2b7be0f2600276004fd2e7382a3fa0f690 LinlyBoi 1673460162 +0200 clone: from https://github.com/jaxbot/semantic-highlight.vim.git diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..45e5b8f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 7e141c2b7be0f2600276004fd2e7382a3fa0f690 LinlyBoi 1673460162 +0200 clone: from https://github.com/jaxbot/semantic-highlight.vim.git diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/info/.keep b/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.idx b/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.idx new file mode 100644 index 0000000..1bc91e7 Binary files /dev/null and b/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.idx differ diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.pack b/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.pack new file mode 100644 index 0000000..8bbdb13 Binary files /dev/null and b/dot_vim/plugged/semantic-highlight.vim/dot_git/objects/pack/readonly_pack-a6c371a82cbf80d59118029f75eadf7d8f4024bd.pack differ diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/packed-refs b/dot_vim/plugged/semantic-highlight.vim/dot_git/packed-refs new file mode 100644 index 0000000..a389bfa --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/packed-refs @@ -0,0 +1,5 @@ +# pack-refs with: peeled fully-peeled sorted +7e141c2b7be0f2600276004fd2e7382a3fa0f690 refs/remotes/origin/master +e840c16462387f4e8c5ae3434fad178cbc1dad7f refs/remotes/origin/revert-43-master +2f180a2860dc36d3fff44cd8348da5061651970e refs/remotes/origin/revert-56-master +7ba913ab99432f1fb55ae46240bfa61bab330f1a refs/remotes/origin/revert-77-scala diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/heads/master b/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/heads/master new file mode 100644 index 0000000..dd8c1a3 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/heads/master @@ -0,0 +1 @@ +7e141c2b7be0f2600276004fd2e7382a3fa0f690 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/tags/.keep b/dot_vim/plugged/semantic-highlight.vim/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/semantic-highlight.vim/dot_git/shallow b/dot_vim/plugged/semantic-highlight.vim/dot_git/shallow new file mode 100644 index 0000000..733bebf --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/dot_git/shallow @@ -0,0 +1,4 @@ +2f180a2860dc36d3fff44cd8348da5061651970e +7ba913ab99432f1fb55ae46240bfa61bab330f1a +7e141c2b7be0f2600276004fd2e7382a3fa0f690 +e840c16462387f4e8c5ae3434fad178cbc1dad7f diff --git a/dot_vim/plugged/semantic-highlight.vim/plugin/semhl.vim b/dot_vim/plugged/semantic-highlight.vim/plugin/semhl.vim new file mode 100644 index 0000000..9968132 --- /dev/null +++ b/dot_vim/plugged/semantic-highlight.vim/plugin/semhl.vim @@ -0,0 +1,185 @@ +" A special thanks goes out to John Leimon +" for his more complete C/C++ version, +" which served as a great basis for understanding +" regex matching in Vim + +" Allow users to configure the plugin to auto start for certain filetypes +if (exists('g:semanticEnableFileTypes')) + if type(g:semanticEnableFileTypes) == type([]) + execute 'autocmd FileType ' . join(g:semanticEnableFileTypes, ',') . ' call s:enableHighlight()' + elseif type(g:semanticEnableFileTypes) == type({}) + execute 'autocmd FileType ' . join(keys(g:semanticEnableFileTypes), ',') . ' call s:enableHighlight()' + execute 'autocmd CursorHold ' . join(map(values(g:semanticEnableFileTypes), '"*." . v:val'), ',') . ' call s:semHighlight()' + endif +endif + +" Set defaults for colors +let s:semanticGUIColors = ["#9CD8F7", "#F5FA1D", "#F97C65", "#35D27F", "#EB75D6", "#E5D180", "#8997F5", "#D49DA5", "#7FEC35", "#F6B223", "#B4F1C3", "#99B730", "#F67C1B", "#3AC6BE", "#EAAFF1", "#DE9A4E", "#BBEA87", "#EEF06D", "#8FB272", "#EAA481", "#F58AAE", "#80B09B", "#5DE866", "#B5A5C5", "#88ADE6", "#4DAABD", "#EDD528", "#FA6BB2", "#47F2D4", "#F47F86", "#2ED8FF", "#B8E01C", "#C5A127", "#74BB46", "#D386F1", "#97DFD6", "#B1A96F", "#66BB75", "#97AA49", "#EF874A", "#48EDF0", "#C0AE50", "#89AAB6", "#D7D1EB", "#5EB894", "#57F0AC", "#B5AF1B", "#B7A5F0", "#8BE289", "#D38AC6", "#C8EE63", "#ED9C36", "#85BA5F", "#9DEA74", "#85C52D", "#40B7E5", "#EEA3C2", "#7CE9B6", "#8CEC58", "#D8A66C", "#51C03B", "#C4CE64", "#45E648", "#4DC15E", "#63A5F3", "#EA8C66", "#D2D43E", "#E5BCE8", "#E4B7CB", "#B092F4", "#44C58C", "#D1E998", "#76E4F2", "#E19392", "#A8E5A4", "#BF9FD6", "#E8C25B", "#58F596", "#6BAEAC", "#94C291", "#7EF1DB", "#E8D65C", "#A7EA38", "#D38AE0", "#ECF453", "#5CD8B8", "#B6BF6B", "#BEE1F1", "#B1D43E", "#EBE77B", "#84A5CD", "#CFEF7A", "#A3C557", "#E4BB34", "#ECB151", "#BDC9F2", "#5EB0E9", "#E09764", "#9BE3C8", "#B3ADDC", "#B2AC36", "#C8CD4F", "#C797AF", "#DCDB26", "#BCA85E", "#E495A5", "#F37DB8", "#70C0B1", "#5AED7D", "#E49482", "#8AA1F0", "#B3EDEE", "#DAEE34", "#EBD646", "#ECA2D2", "#A0A7E6", "#3EBFD3", "#C098BF", "#F1882E", "#77BFDF", "#7FBFC7", "#D4951F", "#A5C0D0", "#B892DE", "#F8CB31", "#75D0D9", "#A6A0B4", "#EA98E4", "#F38BE6", "#DC83A4"] +let s:semanticTermColors = range(20) + +" The user can change the GUI/Term colors, but cannot directly access the list of colors we use +" If the user overrode the default in their vimrc, use that +let g:semanticGUIColors = exists('g:semanticGUIColors') ? g:semanticGUIColors : s:semanticGUIColors +let g:semanticTermColors = exists('g:semanticTermColors') ? g:semanticTermColors : s:semanticTermColors + +" Allow the user to turn cache off +let g:semanticUseCache = exists('g:semanticUseCache') ? g:semanticUseCache : 1 +let g:semanticPersistCache = exists('g:semanticPersistCache') ? g:semanticPersistCache : 1 +let g:semanticPersistCacheLocation = exists('g:semanticPersistCacheLocation') ? g:semanticPersistCacheLocation : $HOME . '/.semantic-highlight-cache' + +" Allow the user to override blacklists +let g:semanticEnableBlacklist = exists('g:semanticEnableBlacklist') ? g:semanticEnableBlacklist : 1 + +let s:blacklist = {} +if g:semanticEnableBlacklist + let s:blacklist = blacklist#GetBlacklist() +endif + +let s:containedinlist = containedinlist#GetContainedinlist() + +let g:semanticUseBackground = 0 +let s:hasBuiltColors = 0 + +command! SemanticHighlight call s:semHighlight() +command! SemanticHighlightRevert call s:disableHighlight() +command! SemanticHighlightToggle call s:toggleHighlight() +command! RebuildSemanticColors call s:buildColors() + +function! s:readCache() abort + if !filereadable(g:semanticPersistCacheLocation) + return [] + endif + + let l:localCache = {} + let s:cacheList = readfile(g:semanticPersistCacheLocation) + for s:cacheListItem in s:cacheList + let s:cacheListItemList = eval(s:cacheListItem) + let l:localCache[s:cacheListItemList[0]] = s:cacheListItemList[1] + endfor + + if exists("s:cacheListItem") + unlet s:cacheListItem s:cacheList + endif + + return l:localCache +endfunction + +let s:cache = {} +let b:cache_defined = {} +if g:semanticPersistCache && filereadable(g:semanticPersistCacheLocation) + let s:cache = s:readCache() +endif + +autocmd VimLeave * call s:persistCache() + +function! s:persistCache() + let l:cacheList = [] + let l:mergedCache = extend(s:readCache(), s:cache) + for [match,color] in items(l:mergedCache) + call add(l:cacheList, string([match, color])) + unlet match color + endfor + call writefile(l:cacheList, g:semanticPersistCacheLocation) +endfunction + +function! s:getCachedColor(current_color, match) + if !g:semanticUseCache + return a:current_color + endif + + if (has_key(s:cache, a:match)) + return s:cache[a:match] + endif + + let s:cache[a:match] = a:current_color + return a:current_color +endfunction + +function! s:semHighlight() + if s:hasBuiltColors == 0 + call s:buildColors() + endif + + let b:cache_defined = {} + + let buflen = line('$') + let pattern = '\<[\$@]*[a-zA-Z\_][a-zA-Z0-9\_]*\>' + let colorLen = len(s:semanticColors) + let cur_color = str2nr(matchstr(reltimestr(reltime()), '\v\.@<=\d+')[1:]) % colorLen " found on https://stackoverflow.com/questions/12737977/native-vim-random-number-script + + while buflen + let curline = getline(buflen) + let index = 0 + while 1 + let match = matchstr(curline, pattern, index) + + if (empty(match)) + break + endif + + let l:no_blacklist_exists_for_filetype = empty(s:blacklist) || !has_key(s:blacklist, &filetype) + if ((l:no_blacklist_exists_for_filetype || index(s:blacklist[&filetype], match) == -1) && !has_key(b:cache_defined, match)) + let b:cache_defined[match] = 1 + let l:containedin = '' + if (!empty(s:containedinlist) && has_key(s:containedinlist, &filetype)) + let l:containedin = ' containedin=' . s:containedinlist[&filetype] + endif + + execute 'syn keyword _semantic' . s:getCachedColor(cur_color, match) . l:containedin . ' ' . match + let cur_color = (cur_color + 1) % colorLen + endif + + let index += len(match) + 1 + endwhile + let buflen -= 1 + endwhile +endfunction + +function! s:buildColors() + if (g:semanticUseBackground) + let type = 'bg' + else + let type = 'fg' + endif + if $NVIM_TUI_ENABLE_TRUE_COLOR || has('gui_running') || (exists('&guicolors') && &guicolors) || (exists('&termguicolors') && &termguicolors) + let colorType = 'gui' + " Update color list in case the user made any changes + let s:semanticColors = g:semanticGUIColors + else + let colorType = 'cterm' + " Update color list in case the user made any changes + let s:semanticColors = g:semanticTermColors + endif + + let semIndex = 0 + for semCol in s:semanticColors + execute 'hi! def _semantic'.semIndex.' ' . colorType . type . '='.semCol + let semIndex += 1 + endfor + let s:hasBuiltColors = 1 +endfunction + +function! s:disableHighlight() + let b:semanticOn = 0 + for key in range(len(s:semanticColors)) + execute 'syn clear _semantic'.key + endfor + + let b:cache_defined = {} +endfunction + +function! s:enableHighlight() + let b:cache_defined = {} + call s:semHighlight() + let b:semanticOn = 1 +endfunction + +function! s:toggleHighlight() + if (exists('b:semanticOn') && b:semanticOn == 1) + call s:disableHighlight() + else + call s:semHighlight() + let b:semanticOn = 1 + endif +endfunction + diff --git a/dot_vim/plugged/semantic-highlight.vim/semantic-highlight.png b/dot_vim/plugged/semantic-highlight.vim/semantic-highlight.png new file mode 100644 index 0000000..9ebe9ab Binary files /dev/null and b/dot_vim/plugged/semantic-highlight.vim/semantic-highlight.png differ diff --git a/dot_vim/plugged/vim-airline-themes/LICENSE b/dot_vim/plugged/vim-airline-themes/LICENSE new file mode 100644 index 0000000..7802547 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2021 Bailey Ling & Contributors. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dot_vim/plugged/vim-airline-themes/README.md b/dot_vim/plugged/vim-airline-themes/README.md new file mode 100644 index 0000000..4a37cb0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/README.md @@ -0,0 +1,62 @@ +# vim-airline-themes [![Build Status](https://travis-ci.org/vim-airline/vim-airline-themes.svg?branch=master)](https://travis-ci.org/vim-airline/vim-airline-themes) [![reviewdog](https://github.com/vim-airline/vim-airline-themes/workflows/reviewdog/badge.svg?branch=master&event=push)](https://github.com/vim-airline/vim-airline-themes/actions?query=workflow%3Areviewdog+event%3Apush+branch%3Amaster) + +This is the official theme repository for [vim-airline][11] + +# Installation + +This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: + +| Plugin Manager | Install with... | +| ------------- | ------------- | +| [Pathogen][4] | `git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes`
Remember to run `:Helptags` to generate help tags | +| [NeoBundle][5] | `NeoBundle 'vim-airline/vim-airline-themes'` | +| [Vundle][6] | `Plugin 'vim-airline/vim-airline-themes'` | +| [Plug][7] | `Plug 'vim-airline/vim-airline-themes'` | +| [VAM][8] | `call vam#ActivateAddons([ 'vim-airline-themes' ])` | +| [Dein][9] | `call dein#add('vim-airline/vim-airline-themes')` | +| [minpac][10] | `call minpac#add('vim-airline/vim-airline-themes')` | +| pack feature (native Vim 8 package feature)| `git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/pack/dist/start/vim-airline-themes`
Remember to run `:helptags ~/.vim/pack/dist/start/vim-airline-themes/doc` to generate help tags | +| manual | copy all of the files into your `~/.vim` directory | + +# Using a Theme + +Once installed, use `:AirlineTheme ` to set the theme, e.g. `:AirlineTheme simple` + +To set in .vimrc, use `let g:airline_theme=''`, e.g. `let g:airline_theme='simple'` + +**Note:** The command `:AirlineTheme` is only available, if you have also cloned and installed the main [vim-airline][11] repository. + +# Contribution Guidelines + +## New themes + +* Pull requests for new themes are welcome. Please be sure to include a screenshot. You can paste an image into issue [#1](https://github.com/vim-airline/vim-airline-themes/issues/1), and then editing the post to reveal the uploaded image URL. Please don't forgot to update the documentation. + +## Modifications to existing themes + +* Themes are subjective, so if you are going to make modifications to an existing theme, please expose a configurable variable to allow users to choose how the theme will react. + +# Screenshots + +Screenshots are in the process of being migrated here. In the meantime you can find screenshots in the existing repository's [Wiki](https://github.com/vim-airline/vim-airline/wiki/Screenshots). + +# Maintenance + +If you are interested in becoming the official maintainer of this project, please contact [**@bling**][1], [**@chrisbra**][2], or [**@mhartington**][3]. + +# License + +MIT License. Copyright (c) 2013-2021 Bailey Ling & Contributors. + + +[1]: https://github.com/bling +[2]: https://github.com/chrisbra +[3]: https://github.com/mhartington +[4]: https://github.com/tpope/vim-pathogen +[5]: https://github.com/Shougo/neobundle.vim +[6]: https://github.com/VundleVim/Vundle.vim +[7]: https://github.com/junegunn/vim-plug +[8]: https://github.com/MarcWeber/vim-addon-manager +[9]: https://github.com/Shougo/dein.vim +[10]: https://github.com/k-takata/minpac/ +[11]: https://github.com/vim-airline/vim-airline diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim new file mode 100644 index 0000000..dd14603 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/alduin.vim @@ -0,0 +1,97 @@ +" Author: Danilo Augusto +" Script: Alduin (vim-airline version) +" License: MIT + +let s:gui00 = "#1c1c1c" " ANSI Black +let s:gui01 = "#af8787" " ANSI Red +let s:gui02 = "#dfaf87" " ANSI Green +let s:gui03 = "#878787" " ANSI Yellow +let s:gui04 = "#af5f5f" " ANSI Blue +let s:gui05 = "#875f5f" " ANSI Magenta +let s:gui06 = "#87afaf" " ANSI Cyan +let s:gui07 = "#ffdf87" " ANSI White +let s:gui08 = "#87875f" +let s:gui09 = "#af1600" +let s:gui0A = "#af875f" +let s:gui0B = "#878787" +let s:gui0C = "#af5f00" +let s:gui0D = "#5f5f87" +let s:gui0E = "#afd7d7" +let s:gui0F = "#dfdfaf" + +let s:cterm00 = "234" +let s:cterm01 = "138" +let s:cterm02 = "180" +let s:cterm03 = "102" +let s:cterm04 = "131" +let s:cterm05 = "95" +let s:cterm06 = "109" +let s:cterm07 = "222" +let s:cterm08 = "101" +let s:cterm09 = "138" +let s:cterm0A = "180" +let s:cterm0B = "102" +let s:cterm0C = "130" +let s:cterm0D = "60" +let s:cterm0E = "152" +let s:cterm0F = "187" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:guiDarkGray = "#545454" +let s:guiAlmostBlack = "#2a2a2a" +let s:ctermWhite = "231" +let s:ctermGray = "243" +let s:ctermDarkGray = "240" +let s:ctermAlmostBlack = "235" + +let g:airline#themes#alduin#palette = {} +let s:modified = { 'airline_c': [s:gui07, '', s:cterm07, '', ''] } + +" Normal mode +let s:N1 = [s:gui07, s:gui0D, s:cterm07, s:cterm0D] +let s:N2 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:N3 = [s:gui02, s:guiDarkGray, s:cterm02, s:ctermDarkGray] +let g:airline#themes#alduin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#alduin#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [s:guiWhite, s:gui0B, s:ctermWhite, s:cterm0B] +let s:I2 = s:N2 +let s:I3 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let g:airline#themes#alduin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#alduin#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [s:guiWhite, s:gui08, s:ctermWhite, s:cterm08] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#alduin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#alduin#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [s:gui08, s:gui00, s:cterm08, s:cterm00] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#alduin#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#alduin#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [s:guiGray, s:gui01, s:ctermGray, s:cterm01] +let s:IN2 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let s:IN3 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let g:airline#themes#alduin#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#alduin#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:CP2 = [s:guiWhite, s:gui03, s:ctermWhite, s:cterm01] +let s:CP3 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] +let g:airline#themes#alduin#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ s:CP1, + \ s:CP2, + \ s:CP3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim new file mode 100644 index 0000000..df00add --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/angr.vim @@ -0,0 +1,109 @@ +" Color palette +let s:gui_dark_gray = '#303030' +let s:cterm_dark_gray = 236 +let s:gui_med_gray_hi = '#444444' +let s:cterm_med_gray_hi = 238 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#b2b2b2' +let s:cterm_light_gray = 249 +let s:gui_green = '#005f87' +let s:cterm_green = 150 +let s:gui_blue = '#87afd7' +let s:cterm_blue = 110 +let s:gui_purple = '#afafd7' +let s:cterm_purple = 146 +let s:gui_orange = '#ffaf87' +let s:cterm_orange = 216 +let s:gui_red = '#d78787' +let s:cterm_red = 174 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +let g:airline#themes#angr#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] +let s:N3 = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi] " inside text +let g:airline#themes#angr#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#angr#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] " inside text +let g:airline#themes#angr#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) +let g:airline#themes#angr#palette.insert_modified = copy(g:airline#themes#angr#palette.normal_modified) +let g:airline#themes#angr#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + +" Replace mode +let g:airline#themes#angr#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } +let g:airline#themes#angr#palette.replace_modified = copy(g:airline#themes#angr#palette.insert_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] +let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] +let g:airline#themes#angr#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) +let g:airline#themes#angr#palette.visual_modified = copy(g:airline#themes#angr#palette.insert_modified) + +" Inactive window +let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] +let g:airline#themes#angr#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#angr#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } + +" Warnings +let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') +let g:airline#themes#angr#palette.normal.airline_warning = [ + \ s:ER[1], s:ER[0], s:ER[3], s:ER[2] + \ ] +let g:airline#themes#angr#palette.normal_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.insert.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.insert_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.visual.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.visual_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.replace.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning +let g:airline#themes#angr#palette.replace_modified.airline_warning = +\ g:airline#themes#angr#palette.normal.airline_warning + +" Errors +let g:airline#themes#angr#palette.normal.airline_error = [ + \ s:ER[1], s:ER[0], s:ER[3], s:ER[2] + \ ] +let g:airline#themes#angr#palette.normal_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.insert.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.insert_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.visual.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.visual_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.replace.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error +let g:airline#themes#angr#palette.replace_modified.airline_error = +\ g:airline#themes#angr#palette.normal.airline_error + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#angr#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , + \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , + \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/apprentice.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/apprentice.vim new file mode 100644 index 0000000..5eca56d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/apprentice.vim @@ -0,0 +1,84 @@ +" vim-airline theme for Apprentice +" +" Author: pt307 (based on work by romainl) +" License: MIT License + +let s:almost_black = [ '#1c1c1c', 234 ] +let s:darker_grey = [ '#262626', 235 ] +let s:medium_grey = [ '#585858', 240 ] +let s:lighter_grey = [ '#bcbcbc', 250 ] +let s:light_purple = [ '#8787af', 103 ] +let s:light_green = [ '#87af87', 108 ] +let s:green = [ '#5f875f', 65 ] +let s:light_blue = [ '#87afd7', 110 ] +let s:red = [ '#af5f5f', 131 ] +let s:orange = [ '#ff8700', 208 ] +let s:ocre = [ '#87875f', 101 ] +let s:yellow = [ '#ffffaf', 229 ] + +function! s:color_list(fg, bg) abort + return [a:fg[0], a:bg[0], a:fg[1], a:bg[1]] +endfunction + +let g:airline#themes#apprentice#palette = {} + +let s:modified = { + \ 'airline_c': s:color_list(s:orange, '') + \ } +let s:warning = s:color_list(s:darker_grey, s:orange) +let s:error = s:color_list(s:darker_grey, s:red) + +let s:airline_a_normal = s:color_list(s:darker_grey, s:ocre) +let s:airline_b_normal = s:color_list(s:darker_grey, s:medium_grey) +let s:airline_c_normal = s:color_list(s:lighter_grey, s:darker_grey) +let g:airline#themes#apprentice#palette.normal = airline#themes#generate_color_map(s:airline_a_normal, s:airline_b_normal, s:airline_c_normal) +let g:airline#themes#apprentice#palette.normal_modified = s:modified +let g:airline#themes#apprentice#palette.normal.airline_warning = s:warning +let g:airline#themes#apprentice#palette.normal_modified.airline_warning = s:warning +let g:airline#themes#apprentice#palette.normal.airline_error = s:error +let g:airline#themes#apprentice#palette.normal_modified.airline_error = s:error + +let s:airline_a_insert = s:color_list(s:darker_grey, s:green) +let s:airline_b_insert = s:airline_b_normal +let s:airline_c_insert = s:airline_c_normal +let g:airline#themes#apprentice#palette.insert = airline#themes#generate_color_map(s:airline_a_insert, s:airline_b_insert, s:airline_c_insert) +let g:airline#themes#apprentice#palette.insert_modified = s:modified +let g:airline#themes#apprentice#palette.insert.airline_warning = s:warning +let g:airline#themes#apprentice#palette.insert_modified.airline_warning = s:warning +let g:airline#themes#apprentice#palette.insert.airline_error = s:error +let g:airline#themes#apprentice#palette.insert_modified.airline_error = s:error + +let s:airline_a_replace = s:color_list(s:darker_grey, s:red) +let s:airline_b_replace = s:airline_b_normal +let s:airline_c_replace = s:airline_c_normal +let g:airline#themes#apprentice#palette.replace = airline#themes#generate_color_map(s:airline_a_replace, s:airline_b_replace, s:airline_c_replace) +let g:airline#themes#apprentice#palette.replace_modified = s:modified +let g:airline#themes#apprentice#palette.replace.airline_warning = s:warning +let g:airline#themes#apprentice#palette.replace_modified.airline_warning = s:warning +let g:airline#themes#apprentice#palette.replace.airline_error = s:error +let g:airline#themes#apprentice#palette.replace_modified.airline_error = s:error + +let s:airline_a_visual = s:color_list(s:darker_grey, s:yellow) +let s:airline_b_visual = s:airline_b_normal +let s:airline_c_visual = s:airline_c_normal +let g:airline#themes#apprentice#palette.visual = airline#themes#generate_color_map(s:airline_a_visual, s:airline_b_visual, s:airline_c_visual) +let g:airline#themes#apprentice#palette.visual_modified = s:modified +let g:airline#themes#apprentice#palette.visual.airline_warning = s:warning +let g:airline#themes#apprentice#palette.visual_modified.airline_warning = s:warning +let g:airline#themes#apprentice#palette.visual.airline_error = s:error +let g:airline#themes#apprentice#palette.visual_modified.airline_error = s:error + +let s:airline_a_inactive = s:color_list(s:darker_grey, s:medium_grey) +let s:airline_b_inactive = s:color_list(s:medium_grey, s:darker_grey) +let s:airline_c_inactive = s:airline_b_inactive +let g:airline#themes#apprentice#palette.inactive = airline#themes#generate_color_map(s:airline_a_inactive, s:airline_b_inactive, s:airline_c_inactive) +let g:airline#themes#apprentice#palette.inactive_modified = s:modified + +let g:airline#themes#apprentice#palette.accents = { + \ 'orange': s:color_list(s:orange, ''), + \ 'blue': s:color_list(s:light_blue, ''), + \ 'green': s:color_list(s:light_green, ''), + \ 'purple': s:color_list(s:light_purple, ''), + \ 'yellow': s:color_list(s:yellow, ''), + \ 'red': s:color_list(s:red, '') + \ } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim new file mode 100644 index 0000000..58c3ee7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/atomic.vim @@ -0,0 +1,77 @@ +"---------------------------------------------------------------- +" ___ __ _ +" / | / /_____ ____ ___ (_)____ +" / /| |/ __/ __ \/ __ `__ \/ / ___/ +" / ___ / /_/ /_/ / / / / / / / /__ +" /_/ |_\__/\____/_/ /_/ /_/_/\___/ +" +"---------------------------------------------------------------- +" Theme : Atomic +" Version : 2.1.0 +" License : MIT +" Author : Gerard Bajona +" URL : https://github.com/gerardbm/atomic +" ---------------------------------------------------------------- +" Colors will be adapted to the current colorscheme. For better +" contrast use the atomic colorscheme: it has ten color palettes +" with sixteen colors selected procedurally (algorithms). +" +" Atomic colorscheme: https://github.com/gerardbm/vim-atomic +" ---------------------------------------------------------------- + +let g:airline#themes#atomic#palette = {} + +function! airline#themes#atomic#refresh() + + let s:N1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['ModeMsg', 'fg'], 'none') + let s:N2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:N3 = airline#themes#get_highlight2(['ModeMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let s:I1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['Question', 'fg'], 'none') + let s:I2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:I3 = airline#themes#get_highlight2(['Question', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + + let s:R1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['ErrorMsg', 'fg'], 'none') + let s:R2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:R3 = airline#themes#get_highlight2(['ErrorMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + + let s:V1 = airline#themes#get_highlight2(['LineNr', 'bg'], ['WarningMsg', 'fg'], 'none') + let s:V2 = airline#themes#get_highlight2(['LineNr', 'bg'], ['LineNr', 'fg'], 'none') + let s:V3 = airline#themes#get_highlight2(['WarningMsg', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + + let s:IA1 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let s:IA2 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let s:IA3 = airline#themes#get_highlight2(['LineNr', 'fg'], ['StatusLine', 'bg'], 'none') + let g:airline#themes#atomic#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + + " Accent color + " It helps to remove the bold typography into modes section + let g:airline#themes#atomic#palette.accents = {'black' : airline#themes#get_highlight2(['LineNr', 'bg'], ['ModeMsg', 'fg'], 'none')} + + " Mode map + let g:airline_mode_map = { + \ '__' : '--', + \ 'n' : 'N', + \ 'i' : 'I', + \ 'R' : 'R', + \ 'c' : 'C', + \ 'v' : 'V', + \ 'V' : 'V-L', + \ '' : 'V-B', + \ 's' : 'S', + \ 'S' : 'S-L', + \ '' : 'S-B', + \ 't' : 'T', + \ } + + " Settings + let g:airline_symbols.paste = 'Ξ' + let g:airline_symbols.spell = 'S' + +endfunction + +call airline#themes#atomic#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_dark.vim new file mode 100644 index 0000000..a8d83ab --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_dark.vim @@ -0,0 +1,34 @@ +" Normal mode +" (Dark) +let s:N1 = [ '#3D424D' , '#C2D94C' , 59 , 149 ] " guifg guibg ctermfg ctermbg +let s:N2 = [ '#C2D94C' , '#304357' , 149 , 59 ] " guifg guibg ctermfg ctermbg +let s:N3 = [ '#B3B1AD' , '#0A0E14' , 145 , 16 ] " guifg guibg ctermfg ctermbg + +" Insert mode +let s:I1 = [ '#3D424D' , '#39BAE6' , 59 , 74 ] " guifg guibg ctermfg ctermbg +let s:I2 = [ '#39BAE6' , '#304357' , 74 , 59 ] " guifg guibg ctermfg ctermbg +let s:I3 = [ '#B3B1AD' , '#0A0E14' , 145 , 16 ] " guifg guibg ctermfg ctermbg + +" Visual mode +let s:V1 = [ '#3D424D' , '#FF8F40' , 59 , 209 ] " guifg guibg ctermfg ctermbg +let s:V2 = [ '#FF8F40' , '#304357' , 209 , 59 ] " guifg guibg ctermfg ctermbg +let s:V3 = [ '#B3B1AD' , '#0A0E14' , 145 , 16 ] " guifg guibg ctermfg ctermbg + +" Replace mode +let s:RE = [ '#3D424D' , '#FF3333' , 59 , 203 ] " guifg guibg ctermfg ctermbg + +let g:airline#themes#ayu_dark#palette = {} + +let g:airline#themes#ayu_dark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#ayu_dark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ayu_dark#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#ayu_dark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let g:airline#themes#ayu_dark#palette.replace = copy(g:airline#themes#ayu_dark#palette.normal) +let g:airline#themes#ayu_dark#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#ayu_dark#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_light.vim new file mode 100644 index 0000000..bd3b695 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_light.vim @@ -0,0 +1,34 @@ +" Normal mode +" (Dark) +let s:N1 = [ '#6C7680' , '#86B300' , 66 , 106 ] " guifg guibg ctermfg ctermbg +let s:N2 = [ '#86B300' , '#6C7680' , 106 , 66 ] " guifg guibg ctermfg ctermbg +let s:N3 = [ '#6C7680' , '#FAFAFA' , 66 , 231 ] " guifg guibg ctermfg ctermbg + +" Insert mode +let s:I1 = [ '#6C7680' , '#55B4D4' , 66 , 74 ] " guifg guibg ctermfg ctermbg +let s:I2 = [ '#55B4D4' , '#6C7680' , 74 , 66 ] " guifg guibg ctermfg ctermbg +let s:I3 = [ '#6C7680' , '#FAFAFA' , 66 , 231 ] " guifg guibg ctermfg ctermbg + +" Visual mode +let s:V1 = [ '#6C7680' , '#FA8D3E' , 66 , 209 ] " guifg guibg ctermfg ctermbg +let s:V2 = [ '#FA8D3E' , '#6C7680' , 209 , 66 ] " guifg guibg ctermfg ctermbg +let s:V3 = [ '#6C7680' , '#FAFAFA' , 66 , 231 ] " guifg guibg ctermfg ctermbg + +" Replace mode +let s:RE = [ '#6C7680' , '#F51818' , 66 , 196 ] " guifg guibg ctermfg ctermbg + +let g:airline#themes#ayu_light#palette = {} + +let g:airline#themes#ayu_light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#ayu_light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ayu_light#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#ayu_light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let g:airline#themes#ayu_light#palette.replace = copy(g:airline#themes#ayu_light#palette.normal) +let g:airline#themes#ayu_light#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#ayu_light#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_mirage.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_mirage.vim new file mode 100644 index 0000000..bb93a92 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ayu_mirage.vim @@ -0,0 +1,34 @@ +" Normal mode +" (Dark) +let s:N1 = [ '#212733' , '#BBE67E' , 0 , 114 ] " guifg guibg ctermfg ctermbg +let s:N2 = [ '#BBE67E' , '#212733' , 114 , 0 ] " guifg guibg ctermfg ctermbg +let s:N3 = [ '#E6E1CF' , '#212733' , 15 , 0 ] " guifg guibg ctermfg ctermbg + +" Insert mode +let s:I1 = [ '#212733' , '#80D4FF' , 0 , 80 ] " guifg guibg ctermfg ctermbg +let s:I2 = [ '#80D4FF' , '#212733' , 80 , 0 ] " guifg guibg ctermfg ctermbg +let s:I3 = [ '#E6E1CF' , '#212733' , 15 , 0 ] " guifg guibg ctermfg ctermbg + +" Visual mode +let s:V1 = [ '#212733' , '#FFAE57' , 0 , 173 ] " guifg guibg ctermfg ctermbg +let s:V2 = [ '#FFAE57' , '#212733' , 173 , 0 ] " guifg guibg ctermfg ctermbg +let s:V3 = [ '#E6E1CF' , '#212733' , 15 , 0 ] " guifg guibg ctermfg ctermbg + +" Replace mode +let s:RE = [ '#212733' , '#F07178' , 0 , 167 ] " guifg guibg ctermfg ctermbg + +let g:airline#themes#ayu_mirage#palette = {} + +let g:airline#themes#ayu_mirage#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#ayu_mirage#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ayu_mirage#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#ayu_mirage#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let g:airline#themes#ayu_mirage#palette.replace = copy(g:airline#themes#ayu_mirage#palette.normal) +let g:airline#themes#ayu_mirage#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#ayu_mirage#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim new file mode 100644 index 0000000..7f954f4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/badwolf.vim @@ -0,0 +1,56 @@ +let s:N1 = [ '#141413' , '#aeee00' , 232 , 154 ] " blackestgravel & lime +let s:N2 = [ '#f4cf86' , '#45413b' , 222 , 238 ] " dirtyblonde & deepgravel +let s:N3 = [ '#8cffba' , '#242321' , 121 , 235 ] " saltwatertaffy & darkgravel +let s:N4 = [ '#666462' , 241 ] " mediumgravel + +let s:I1 = [ '#141413' , '#0a9dff' , 232 , 39 ] " blackestgravel & tardis +let s:I2 = [ '#f4cf86' , '#005fff' , 222 , 27 ] " dirtyblonde & facebook +let s:I3 = [ '#0a9dff' , '#242321' , 39 , 235 ] " tardis & darkgravel + +let s:V1 = [ '#141413' , '#ffa724' , 232 , 214 ] " blackestgravel & orange +let s:V2 = [ '#000000' , '#fade3e' , 16 , 221 ] " coal & dalespale +let s:V3 = [ '#000000' , '#b88853' , 16 , 137 ] " coal & toffee +let s:V4 = [ '#c7915b' , 173 ] " coffee + +let s:PA = [ '#f4cf86' , 222 ] " dirtyblonde +let s:RE = [ '#ff9eb8' , 211 ] " dress + +let s:IA = [ s:N3[1] , s:N2[1] , s:N3[3] , s:N2[3] , '' ] + +let g:airline#themes#badwolf#palette = {} + +let g:airline#themes#badwolf#palette.accents = { + \ 'red': [ '#ff2c4b' , '' , 196 , '' , '' ] + \ } + +let g:airline#themes#badwolf#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#badwolf#palette.normal_modified = { + \ 'airline_b': [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , + \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } + + +let g:airline#themes#badwolf#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#badwolf#palette.insert_modified = { + \ 'airline_c': [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } +let g:airline#themes#badwolf#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } + + +let g:airline#themes#badwolf#palette.replace = copy(airline#themes#badwolf#palette.insert) +let g:airline#themes#badwolf#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] +let g:airline#themes#badwolf#palette.replace_modified = g:airline#themes#badwolf#palette.insert_modified + + +let g:airline#themes#badwolf#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#badwolf#palette.visual_modified = { + \ 'airline_c': [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } + + +let g:airline#themes#badwolf#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#badwolf#palette.inactive_modified = { + \ 'airline_c': [ s:V1[1] , '' , s:V1[3] , '' , '' ] } + +let g:airline#themes#badwolf#palette.terminal = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#badwolf#palette.normal_modified.airline_term = s:N3 +let g:airline#themes#badwolf#palette.terminal.airline_term = s:I3 +let g:airline#themes#badwolf#palette.visual_modified.airline_term = s:V2 diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim new file mode 100644 index 0000000..e967ed1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16.vim @@ -0,0 +1,181 @@ +let s:improved_contrast = get(g:, 'airline_base16_improved_contrast', 0) + +" Color palette +let s:gui_dark_gray = '#202020' +let s:cterm_dark_gray = 234 +let s:gui_med_gray_hi = '#303030' +let s:cterm_med_gray_hi = 236 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#505050' +let s:cterm_light_gray = 239 +let s:gui_lightlight_gray = '#8A8A8A' +let s:cterm_lightlight_gray = 245 +let s:gui_green = '#99cc99' +let s:cterm_green = 151 +let s:gui_blue = '#6a9fb5' +let s:cterm_blue = 67 +let s:gui_purple = '#aa759f' +let s:cterm_purple = 139 +let s:gui_orange = '#d28445' +let s:cterm_orange = 173 +let s:gui_red = '#ac4142' +let s:cterm_red = 131 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +if get(g:, 'airline#themes#base16#constant', 0) + let g:airline#themes#base16#palette = {} + + " Normal mode + let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] + if s:improved_contrast + let s:N2 = [s:gui_lightlight_gray, s:gui_med_gray_lo, s:cterm_lightlight_gray, s:cterm_med_gray_lo] + else + + let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] + endif + let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#base16#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + + " Insert mode + let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] + let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) + let g:airline#themes#base16#palette.insert_modified = copy(g:airline#themes#base16#palette.normal_modified) + let g:airline#themes#base16#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + + " Replace mode + let g:airline#themes#base16#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } + let g:airline#themes#base16#palette.replace_modified = copy(g:airline#themes#base16#palette.insert_modified) + + " Visual mode + let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] + let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] + let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) + let g:airline#themes#base16#palette.visual_modified = copy(g:airline#themes#base16#palette.insert_modified) + + " Inactive window + if s:improved_contrast + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_lightlight_gray, s:cterm_med_gray_hi, ''] + else + let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] + endif + let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#base16#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } +else + function! airline#themes#base16#refresh() + let g:airline#themes#base16#palette = {} + + let g:airline#themes#base16#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffText', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight2(['Visual', 'fg'], ['Visual', 'bg']) + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('Statement') + let g:airline#themes#base16#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffAdded', 'fg'], 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#base16#palette.insert_modified = g:airline#themes#base16#palette.normal_modified + + let s:R1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['WarningMsg', 'fg'], 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#base16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#base16#palette.replace_modified = g:airline#themes#base16#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['Constant', 'fg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#base16#palette.visual_modified = g:airline#themes#base16#palette.normal_modified + + " Use VertSplit's bg and default fg (reversed) for inactive statusline. + let s:VS = airline#themes#get_highlight('VertSplit') + if s:improved_contrast + let s:IA = [ s:VS[1], 'NONE', s:VS[2], s:cterm_lightlight_gray, 'reverse'] + else + let s:IA = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] + endif + let g:airline#themes#base16#palette.inactive = + \ airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:IA, s:IA, s:IA) + let s:IM = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] + let g:airline#themes#base16#palette.inactive_modified = + \ airline#themes#generate_color_map(s:IM, s:IM, s:IM, s:IM, s:IM, s:IM) + + " Warnings + let s:WI = airline#themes#get_highlight2(['WarningMsg', 'bg'], ['WarningMsg', 'fg'], 'bold') + let g:airline#themes#base16#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + + let g:airline#themes#base16#palette.normal_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.insert.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.insert_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.visual.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.visual_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.replace.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + let g:airline#themes#base16#palette.replace_modified.airline_warning = + \ g:airline#themes#base16#palette.normal.airline_warning + + " Errors + let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') + let g:airline#themes#base16#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + + let g:airline#themes#base16#palette.normal_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.insert.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.insert_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.visual.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.visual_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.replace.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + let g:airline#themes#base16#palette.replace_modified.airline_error = + \ g:airline#themes#base16#palette.normal.airline_error + + endfunction + call airline#themes#base16#refresh() +endif diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim new file mode 100644 index 0000000..f4e318a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_3024.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 3024 Scheme by Jan T. Sott (http://github.com/idleberg) +let g:airline#themes#base16_3024#palette = {} +let s:gui00 = "#090300" +let s:gui01 = "#3a3432" +let s:gui02 = "#4a4543" +let s:gui03 = "#5c5855" +let s:gui04 = "#807d7c" +let s:gui05 = "#a5a2a2" +let s:gui06 = "#d6d5d4" +let s:gui07 = "#f7f7f7" +let s:gui08 = "#db2d20" +let s:gui09 = "#e8bbd0" +let s:gui0A = "#fded02" +let s:gui0B = "#01a252" +let s:gui0C = "#b5e4f4" +let s:gui0D = "#01a0e4" +let s:gui0E = "#a16a94" +let s:gui0F = "#cdab53" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 182 +let s:cterm0A = 11 +let s:cterm0B = 35 +let s:cterm0C = 153 +let s:cterm0D = 38 +let s:cterm0E = 132 +let s:cterm0F = 179 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_3024#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_3024#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_3024#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_adwaita.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_adwaita.vim new file mode 100644 index 0000000..ab89658 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_adwaita.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Adwaita Scheme by Rory Bradford (https://github.com/roryrjb) +let g:airline#themes#base16_adwaita#palette = {} +let s:gui00 = "#2D3234" +let s:gui01 = "#33393B" +let s:gui02 = "#4B5356" +let s:gui03 = "#566164" +let s:gui04 = "#919494" +let s:gui05 = "#C5C6C5" +let s:gui06 = "#D3D4D5" +let s:gui07 = "#EEEEEC" +let s:gui08 = "#FFA500" +let s:gui09 = "#FFFF60" +let s:gui0A = "#91EE6F" +let s:gui0B = "#6FEE91" +let s:gui0C = "#6F91B4" +let s:gui0D = "#916FB4" +let s:gui0E = "#EE6F91" +let s:gui0F = "#EE6F6F" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 180 +let s:cterm09 = 186 +let s:cterm0A = 150 +let s:cterm0B = 115 +let s:cterm0C = 110 +let s:cterm0D = 140 +let s:cterm0E = 175 +let s:cterm0F = 174 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_adwaita#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_adwaita#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_adwaita#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_adwaita#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_adwaita#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_adwaita#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim new file mode 100644 index 0000000..85a9584 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_apathy.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Apathy Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_apathy#palette = {} +let s:gui00 = "#031A16" +let s:gui01 = "#0B342D" +let s:gui02 = "#184E45" +let s:gui03 = "#2B685E" +let s:gui04 = "#5F9C92" +let s:gui05 = "#81B5AC" +let s:gui06 = "#A7CEC8" +let s:gui07 = "#D2E7E4" +let s:gui08 = "#3E9688" +let s:gui09 = "#3E7996" +let s:gui0A = "#3E4C96" +let s:gui0B = "#883E96" +let s:gui0C = "#963E4C" +let s:gui0D = "#96883E" +let s:gui0E = "#4C963E" +let s:gui0F = "#3E965B" + +let s:cterm00 = 0 +let s:cterm01 = 22 +let s:cterm02 = 23 +let s:cterm03 = 23 +let s:cterm04 = 72 +let s:cterm05 = 109 +let s:cterm06 = 152 +let s:cterm07 = 188 +let s:cterm08 = 66 +let s:cterm09 = 66 +let s:cterm0A = 60 +let s:cterm0B = 96 +let s:cterm0C = 95 +let s:cterm0D = 101 +let s:cterm0E = 65 +let s:cterm0F = 65 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_apathy#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_apathy#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim new file mode 100644 index 0000000..a162c67 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ashes.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Ashes Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_ashes#palette = {} +let s:gui00 = "#1C2023" +let s:gui01 = "#393F45" +let s:gui02 = "#565E65" +let s:gui03 = "#747C84" +let s:gui04 = "#ADB3BA" +let s:gui05 = "#C7CCD1" +let s:gui06 = "#DFE2E5" +let s:gui07 = "#F3F4F5" +let s:gui08 = "#C7AE95" +let s:gui09 = "#C7C795" +let s:gui0A = "#AEC795" +let s:gui0B = "#95C7AE" +let s:gui0C = "#95AEC7" +let s:gui0D = "#AE95C7" +let s:gui0E = "#C795AE" +let s:gui0F = "#C79595" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 180 +let s:cterm09 = 186 +let s:cterm0A = 150 +let s:cterm0B = 115 +let s:cterm0C = 110 +let s:cterm0D = 140 +let s:cterm0E = 175 +let s:cterm0F = 174 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_ashes#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_ashes#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave.vim new file mode 100644 index 0000000..2da3d60 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Cave vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-cave", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#19171c' +let s:gui01 = '#26232a' +let s:gui02 = '#585260' +let s:gui03 = '#655f6d' +let s:gui04 = '#7e7887' +let s:gui05 = '#8b8792' +let s:gui06 = '#e2dfe7' +let s:gui07 = '#efecf4' +let s:gui08 = '#be4678' +let s:gui09 = '#aa573c' +let s:gui0A = '#a06e3b' +let s:gui0B = '#2a9292' +let s:gui0C = '#398bc6' +let s:gui0D = '#576ddb' +let s:gui0E = '#955ae7' +let s:gui0F = '#bf40bf' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave_light.vim new file mode 100644 index 0000000..3066f5e --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_cave_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Cave Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-cave-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#efecf4' +let s:gui01 = '#e2dfe7' +let s:gui02 = '#8b8792' +let s:gui03 = '#7e7887' +let s:gui04 = '#655f6d' +let s:gui05 = '#585260' +let s:gui06 = '#26232a' +let s:gui07 = '#19171c' +let s:gui08 = '#be4678' +let s:gui09 = '#aa573c' +let s:gui0A = '#a06e3b' +let s:gui0B = '#2a9292' +let s:gui0C = '#398bc6' +let s:gui0D = '#576ddb' +let s:gui0E = '#955ae7' +let s:gui0F = '#bf40bf' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune.vim new file mode 100644 index 0000000..54941f9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Dune vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-dune", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#20201d' +let s:gui01 = '#292824' +let s:gui02 = '#6e6b5e' +let s:gui03 = '#7d7a68' +let s:gui04 = '#999580' +let s:gui05 = '#a6a28c' +let s:gui06 = '#e8e4cf' +let s:gui07 = '#fefbec' +let s:gui08 = '#d73737' +let s:gui09 = '#b65611' +let s:gui0A = '#ae9513' +let s:gui0B = '#60ac39' +let s:gui0C = '#1fad83' +let s:gui0D = '#6684e1' +let s:gui0E = '#b854d4' +let s:gui0F = '#d43552' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune_light.vim new file mode 100644 index 0000000..4f724fc --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_dune_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Dune Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-dune-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fefbec' +let s:gui01 = '#e8e4cf' +let s:gui02 = '#a6a28c' +let s:gui03 = '#999580' +let s:gui04 = '#7d7a68' +let s:gui05 = '#6e6b5e' +let s:gui06 = '#292824' +let s:gui07 = '#20201d' +let s:gui08 = '#d73737' +let s:gui09 = '#b65611' +let s:gui0A = '#ae9513' +let s:gui0B = '#60ac39' +let s:gui0C = '#1fad83' +let s:gui0D = '#6684e1' +let s:gui0E = '#b854d4' +let s:gui0F = '#d43552' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary.vim new file mode 100644 index 0000000..9ab570c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Estuary vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-estuary", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#22221b' +let s:gui01 = '#302f27' +let s:gui02 = '#5f5e4e' +let s:gui03 = '#6c6b5a' +let s:gui04 = '#878573' +let s:gui05 = '#929181' +let s:gui06 = '#e7e6df' +let s:gui07 = '#f4f3ec' +let s:gui08 = '#ba6236' +let s:gui09 = '#ae7313' +let s:gui0A = '#a5980d' +let s:gui0B = '#7d9726' +let s:gui0C = '#5b9d48' +let s:gui0D = '#36a166' +let s:gui0E = '#5f9182' +let s:gui0F = '#9d6c7c' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary_light.vim new file mode 100644 index 0000000..2b85f4d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_estuary_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Estuary Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-estuary-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f4f3ec' +let s:gui01 = '#e7e6df' +let s:gui02 = '#929181' +let s:gui03 = '#878573' +let s:gui04 = '#6c6b5a' +let s:gui05 = '#5f5e4e' +let s:gui06 = '#302f27' +let s:gui07 = '#22221b' +let s:gui08 = '#ba6236' +let s:gui09 = '#ae7313' +let s:gui0A = '#a5980d' +let s:gui0B = '#7d9726' +let s:gui0C = '#5b9d48' +let s:gui0D = '#36a166' +let s:gui0E = '#5f9182' +let s:gui0F = '#9d6c7c' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest.vim new file mode 100644 index 0000000..d8bbe26 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Forest vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-forest", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1b1918' +let s:gui01 = '#2c2421' +let s:gui02 = '#68615e' +let s:gui03 = '#766e6b' +let s:gui04 = '#9c9491' +let s:gui05 = '#a8a19f' +let s:gui06 = '#e6e2e0' +let s:gui07 = '#f1efee' +let s:gui08 = '#f22c40' +let s:gui09 = '#df5320' +let s:gui0A = '#c38418' +let s:gui0B = '#7b9726' +let s:gui0C = '#3d97b8' +let s:gui0D = '#407ee7' +let s:gui0E = '#6666ea' +let s:gui0F = '#c33ff3' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest_light.vim new file mode 100644 index 0000000..d86af1c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_forest_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Forest Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-forest-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f1efee' +let s:gui01 = '#e6e2e0' +let s:gui02 = '#a8a19f' +let s:gui03 = '#9c9491' +let s:gui04 = '#766e6b' +let s:gui05 = '#68615e' +let s:gui06 = '#2c2421' +let s:gui07 = '#1b1918' +let s:gui08 = '#f22c40' +let s:gui09 = '#df5320' +let s:gui0A = '#c38418' +let s:gui0B = '#7b9726' +let s:gui0C = '#3d97b8' +let s:gui0D = '#407ee7' +let s:gui0E = '#6666ea' +let s:gui0F = '#c33ff3' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath.vim new file mode 100644 index 0000000..ca21708 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Heath vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-heath", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1b181b' +let s:gui01 = '#292329' +let s:gui02 = '#695d69' +let s:gui03 = '#776977' +let s:gui04 = '#9e8f9e' +let s:gui05 = '#ab9bab' +let s:gui06 = '#d8cad8' +let s:gui07 = '#f7f3f7' +let s:gui08 = '#ca402b' +let s:gui09 = '#a65926' +let s:gui0A = '#bb8a35' +let s:gui0B = '#918b3b' +let s:gui0C = '#159393' +let s:gui0D = '#516aec' +let s:gui0E = '#7b59c0' +let s:gui0F = '#cc33cc' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath_light.vim new file mode 100644 index 0000000..d616a79 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_heath_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Heath Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-heath-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f7f3f7' +let s:gui01 = '#d8cad8' +let s:gui02 = '#ab9bab' +let s:gui03 = '#9e8f9e' +let s:gui04 = '#776977' +let s:gui05 = '#695d69' +let s:gui06 = '#292329' +let s:gui07 = '#1b181b' +let s:gui08 = '#ca402b' +let s:gui09 = '#a65926' +let s:gui0A = '#bb8a35' +let s:gui0B = '#918b3b' +let s:gui0C = '#159393' +let s:gui0D = '#516aec' +let s:gui0E = '#7b59c0' +let s:gui0F = '#cc33cc' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside.vim new file mode 100644 index 0000000..76e196c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Lakeside vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-lakeside", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#161b1d' +let s:gui01 = '#1f292e' +let s:gui02 = '#516d7b' +let s:gui03 = '#5a7b8c' +let s:gui04 = '#7195a8' +let s:gui05 = '#7ea2b4' +let s:gui06 = '#c1e4f6' +let s:gui07 = '#ebf8ff' +let s:gui08 = '#d22d72' +let s:gui09 = '#935c25' +let s:gui0A = '#8a8a0f' +let s:gui0B = '#568c3b' +let s:gui0C = '#2d8f6f' +let s:gui0D = '#257fad' +let s:gui0E = '#6b6bb8' +let s:gui0F = '#b72dd2' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside_light.vim new file mode 100644 index 0000000..ed58b0b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_lakeside_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Lakeside Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-lakeside-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ebf8ff' +let s:gui01 = '#c1e4f6' +let s:gui02 = '#7ea2b4' +let s:gui03 = '#7195a8' +let s:gui04 = '#5a7b8c' +let s:gui05 = '#516d7b' +let s:gui06 = '#1f292e' +let s:gui07 = '#161b1d' +let s:gui08 = '#d22d72' +let s:gui09 = '#935c25' +let s:gui0A = '#8a8a0f' +let s:gui0B = '#568c3b' +let s:gui0C = '#2d8f6f' +let s:gui0D = '#257fad' +let s:gui0E = '#6b6bb8' +let s:gui0F = '#b72dd2' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau.vim new file mode 100644 index 0000000..1ce85ff --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Plateau vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-plateau", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1b1818' +let s:gui01 = '#292424' +let s:gui02 = '#585050' +let s:gui03 = '#655d5d' +let s:gui04 = '#7e7777' +let s:gui05 = '#8a8585' +let s:gui06 = '#e7dfdf' +let s:gui07 = '#f4ecec' +let s:gui08 = '#ca4949' +let s:gui09 = '#b45a3c' +let s:gui0A = '#a06e3b' +let s:gui0B = '#4b8b8b' +let s:gui0C = '#5485b6' +let s:gui0D = '#7272ca' +let s:gui0E = '#8464c4' +let s:gui0F = '#bd5187' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau_light.vim new file mode 100644 index 0000000..a6f8350 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_plateau_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Plateau Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-plateau-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f4ecec' +let s:gui01 = '#e7dfdf' +let s:gui02 = '#8a8585' +let s:gui03 = '#7e7777' +let s:gui04 = '#655d5d' +let s:gui05 = '#585050' +let s:gui06 = '#292424' +let s:gui07 = '#1b1818' +let s:gui08 = '#ca4949' +let s:gui09 = '#b45a3c' +let s:gui0A = '#a06e3b' +let s:gui0B = '#4b8b8b' +let s:gui0C = '#5485b6' +let s:gui0D = '#7272ca' +let s:gui0E = '#8464c4' +let s:gui0F = '#bd5187' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna.vim new file mode 100644 index 0000000..c6a6597 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Savanna vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-savanna", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#171c19' +let s:gui01 = '#232a25' +let s:gui02 = '#526057' +let s:gui03 = '#5f6d64' +let s:gui04 = '#78877d' +let s:gui05 = '#87928a' +let s:gui06 = '#dfe7e2' +let s:gui07 = '#ecf4ee' +let s:gui08 = '#b16139' +let s:gui09 = '#9f713c' +let s:gui0A = '#a07e3b' +let s:gui0B = '#489963' +let s:gui0C = '#1c9aa0' +let s:gui0D = '#478c90' +let s:gui0E = '#55859b' +let s:gui0F = '#867469' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna_light.vim new file mode 100644 index 0000000..f98bbc8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_savanna_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Savanna Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-savanna-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ecf4ee' +let s:gui01 = '#dfe7e2' +let s:gui02 = '#87928a' +let s:gui03 = '#78877d' +let s:gui04 = '#5f6d64' +let s:gui05 = '#526057' +let s:gui06 = '#232a25' +let s:gui07 = '#171c19' +let s:gui08 = '#b16139' +let s:gui09 = '#9f713c' +let s:gui0A = '#a07e3b' +let s:gui0B = '#489963' +let s:gui0C = '#1c9aa0' +let s:gui0D = '#478c90' +let s:gui0E = '#55859b' +let s:gui0F = '#867469' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside.vim new file mode 100644 index 0000000..61b19e0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Seaside vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-seaside", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#131513' +let s:gui01 = '#242924' +let s:gui02 = '#5e6e5e' +let s:gui03 = '#687d68' +let s:gui04 = '#809980' +let s:gui05 = '#8ca68c' +let s:gui06 = '#cfe8cf' +let s:gui07 = '#f4fbf4' +let s:gui08 = '#e6193c' +let s:gui09 = '#87711d' +let s:gui0A = '#98981b' +let s:gui0B = '#29a329' +let s:gui0C = '#1999b3' +let s:gui0D = '#3d62f5' +let s:gui0E = '#ad2bee' +let s:gui0F = '#e619c3' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside_light.vim new file mode 100644 index 0000000..fc8a933 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_seaside_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Seaside Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-seaside-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f4fbf4' +let s:gui01 = '#cfe8cf' +let s:gui02 = '#8ca68c' +let s:gui03 = '#809980' +let s:gui04 = '#687d68' +let s:gui05 = '#5e6e5e' +let s:gui06 = '#242924' +let s:gui07 = '#131513' +let s:gui08 = '#e6193c' +let s:gui09 = '#87711d' +let s:gui0A = '#98981b' +let s:gui0B = '#29a329' +let s:gui0C = '#1999b3' +let s:gui0D = '#3d62f5' +let s:gui0E = '#ad2bee' +let s:gui0F = '#e619c3' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool.vim new file mode 100644 index 0000000..90aff17 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Sulphurpool vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-sulphurpool", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#202746' +let s:gui01 = '#293256' +let s:gui02 = '#5e6687' +let s:gui03 = '#6b7394' +let s:gui04 = '#898ea4' +let s:gui05 = '#979db4' +let s:gui06 = '#dfe2f1' +let s:gui07 = '#f5f7ff' +let s:gui08 = '#c94922' +let s:gui09 = '#c76b29' +let s:gui0A = '#c08b30' +let s:gui0B = '#ac9739' +let s:gui0C = '#22a2c9' +let s:gui0D = '#3d8fd1' +let s:gui0E = '#6679cc' +let s:gui0F = '#9c637a' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool_light.vim new file mode 100644 index 0000000..8169547 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelier_sulphurpool_light.vim @@ -0,0 +1,85 @@ +" Base16 Atelier Sulphurpool Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Bram de Haan (http://atelierbramdehaan.nl) + +let s:scheme_slug = substitute("atelier-sulphurpool-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f5f7ff' +let s:gui01 = '#dfe2f1' +let s:gui02 = '#979db4' +let s:gui03 = '#898ea4' +let s:gui04 = '#6b7394' +let s:gui05 = '#5e6687' +let s:gui06 = '#293256' +let s:gui07 = '#202746' +let s:gui08 = '#c94922' +let s:gui09 = '#c76b29' +let s:gui0A = '#c08b30' +let s:gui0B = '#ac9739' +let s:gui0C = '#22a2c9' +let s:gui0D = '#3d8fd1' +let s:gui0E = '#6679cc' +let s:gui0F = '#9c637a' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim new file mode 100644 index 0000000..c3d54c6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierdune.vim @@ -0,0 +1,89 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Dune Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) +let g:airline#themes#base16_atelierdune#palette = {} + +let s:gui00 = "#20201d" +let s:gui01 = "#292824" +let s:gui02 = "#6e6b5e" +let s:gui03 = "#7d7a68" +let s:gui04 = "#999580" +let s:gui05 = "#a6a28c" +let s:gui06 = "#e8e4cf" +let s:gui07 = "#fefbec" +let s:gui08 = "#d73737" +let s:gui09 = "#b65611" +let s:gui0A = "#cfb017" +let s:gui0B = "#60ac39" +let s:gui0C = "#1fad83" +let s:gui0D = "#6684e1" +let s:gui0E = "#b854d4" +let s:gui0F = "#d43552" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 101 +let s:cterm04 = 102 +let s:cterm05 = 144 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 182 +let s:cterm0B = 71 +let s:cterm0C = 36 +let s:cterm0D = 68 +let s:cterm0E = 134 +" those two are not used +let s:cterm0A = 178 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierdune#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Warning info +let s:WARNING = [ s:gui01, s:gui0A, s:cterm0C, s:cterm06 ] +let s:ERROR = [ s:gui07, s:gui08, s:cterm07, s:cterm08 ] + +let g:airline#themes#base16_atelierdune#palette.normal.airline_warning = s:WARNING +let g:airline#themes#base16_atelierdune#palette.insert.airline_warning = s:WARNING +let g:airline#themes#base16_atelierdune#palette.visual.airline_warning = s:WARNING +let g:airline#themes#base16_atelierdune#palette.replace.airline_warning = s:WARNING + +let g:airline#themes#base16_atelierdune#palette.normal.airline_error = s:ERROR +let g:airline#themes#base16_atelierdune#palette.insert.airline_error = s:ERROR +let g:airline#themes#base16_atelierdune#palette.visual.airline_error = s:ERROR +let g:airline#themes#base16_atelierdune#palette.replace.airline_error = s:ERROR + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierdune#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim new file mode 100644 index 0000000..70c23de --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierforest.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Forest Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) +let g:airline#themes#base16_atelierforest#palette = {} +let s:gui00 = "#1b1918" +let s:gui01 = "#2c2421" +let s:gui02 = "#68615e" +let s:gui03 = "#766e6b" +let s:gui04 = "#9c9491" +let s:gui05 = "#a8a19f" +let s:gui06 = "#e6e2e0" +let s:gui07 = "#f1efee" +let s:gui08 = "#f22c40" +let s:gui09 = "#df5320" +let s:gui0A = "#d5911a" +let s:gui0B = "#5ab738" +let s:gui0C = "#00ad9c" +let s:gui0D = "#407ee7" +let s:gui0E = "#6666ea" +let s:gui0F = "#c33ff3" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 138 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 197 +let s:cterm09 = 166 +let s:cterm0A = 172 +let s:cterm0B = 71 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 62 +let s:cterm0F = 135 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierforest#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierforest#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim new file mode 100644 index 0000000..20179c7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierheath.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Heath Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) +let g:airline#themes#base16_atelierheath#palette = {} +let s:gui00 = "#1b181b" +let s:gui01 = "#292329" +let s:gui02 = "#695d69" +let s:gui03 = "#776977" +let s:gui04 = "#9e8f9e" +let s:gui05 = "#ab9bab" +let s:gui06 = "#d8cad8" +let s:gui07 = "#f7f3f7" +let s:gui08 = "#ca402b" +let s:gui09 = "#a65926" +let s:gui0A = "#bb8a35" +let s:gui0B = "#379a37" +let s:gui0C = "#159393" +let s:gui0D = "#516aec" +let s:gui0E = "#7b59c0" +let s:gui0F = "#cc33cc" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 96 +let s:cterm04 = 139 +let s:cterm05 = 139 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 130 +let s:cterm0A = 137 +let s:cterm0B = 65 +let s:cterm0C = 30 +let s:cterm0D = 12 +let s:cterm0E = 97 +let s:cterm0F = 170 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierheath#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierheath#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim new file mode 100644 index 0000000..0d1e758 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierlakeside.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Lakeside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) +let g:airline#themes#base16_atelierlakeside#palette = {} +let s:gui00 = "#161b1d" +let s:gui01 = "#1f292e" +let s:gui02 = "#516d7b" +let s:gui03 = "#5a7b8c" +let s:gui04 = "#7195a8" +let s:gui05 = "#7ea2b4" +let s:gui06 = "#c1e4f6" +let s:gui07 = "#ebf8ff" +let s:gui08 = "#d22d72" +let s:gui09 = "#935c25" +let s:gui0A = "#8a8a0f" +let s:gui0B = "#568c3b" +let s:gui0C = "#2d8f6f" +let s:gui0D = "#257fad" +let s:gui0E = "#5d5db1" +let s:gui0F = "#b72dd2" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 67 +let s:cterm05 = 109 +let s:cterm06 = 153 +let s:cterm07 = 195 +let s:cterm08 = 161 +let s:cterm09 = 94 +let s:cterm0A = 100 +let s:cterm0B = 65 +let s:cterm0C = 29 +let s:cterm0D = 31 +let s:cterm0E = 61 +let s:cterm0F = 5 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierlakeside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierlakeside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim new file mode 100644 index 0000000..0314ea2 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atelierseaside.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Atelier Seaside Scheme by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) +let g:airline#themes#base16_atelierseaside#palette = {} +let s:gui00 = "#131513" +let s:gui01 = "#242924" +let s:gui02 = "#5e6e5e" +let s:gui03 = "#687d68" +let s:gui04 = "#809980" +let s:gui05 = "#8ca68c" +let s:gui06 = "#cfe8cf" +let s:gui07 = "#f0fff0" +let s:gui08 = "#e6193c" +let s:gui09 = "#87711d" +let s:gui0A = "#c3c322" +let s:gui0B = "#29a329" +let s:gui0C = "#1999b3" +let s:gui0D = "#3d62f5" +let s:gui0E = "#ad2bee" +let s:gui0F = "#e619c3" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 65 +let s:cterm04 = 102 +let s:cterm05 = 108 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 161 +let s:cterm09 = 94 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 31 +let s:cterm0D = 12 +let s:cterm0E = 129 +let s:cterm0F = 5 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_atelierseaside#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_atelierseaside#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atlas.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atlas.vim new file mode 100644 index 0000000..cb4f9f0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_atlas.vim @@ -0,0 +1,85 @@ +" Base16 Atlas vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alex Lende (https://ajlende.com) + +let s:scheme_slug = substitute("atlas", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#002635' +let s:gui01 = '#00384d' +let s:gui02 = '#517F8D' +let s:gui03 = '#6C8B91' +let s:gui04 = '#869696' +let s:gui05 = '#a1a19a' +let s:gui06 = '#e6e6dc' +let s:gui07 = '#fafaf8' +let s:gui08 = '#ff5a67' +let s:gui09 = '#f08e48' +let s:gui0A = '#ffcc1b' +let s:gui0B = '#7fc06e' +let s:gui0C = '#14747e' +let s:gui0D = '#5dd7b9' +let s:gui0E = '#9a70a4' +let s:gui0F = '#c43060' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim new file mode 100644 index 0000000..b4f3523 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bespin.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Bespin Scheme by Jan T. Sott +let g:airline#themes#base16_bespin#palette = {} +let s:gui00 = "#28211c" +let s:gui01 = "#36312e" +let s:gui02 = "#5e5d5c" +let s:gui03 = "#666666" +let s:gui04 = "#797977" +let s:gui05 = "#8a8986" +let s:gui06 = "#9d9b97" +let s:gui07 = "#baae9e" +let s:gui08 = "#cf6a4c" +let s:gui09 = "#cf7d34" +let s:gui0A = "#f9ee98" +let s:gui0B = "#54be0d" +let s:gui0C = "#afc4db" +let s:gui0D = "#5ea6ea" +let s:gui0E = "#9b859d" +let s:gui0F = "#937121" + +let s:cterm00 = 0 +let s:cterm01 = 58 +let s:cterm02 = 59 +let s:cterm03 = 241 +let s:cterm04 = 102 +let s:cterm05 = 102 +let s:cterm06 = 138 +let s:cterm07 = 145 +let s:cterm08 = 167 +let s:cterm09 = 173 +let s:cterm0A = 228 +let s:cterm0B = 70 +let s:cterm0C = 152 +let s:cterm0D = 74 +let s:cterm0E = 103 +let s:cterm0F = 94 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_bespin#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_bespin#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal.vim new file mode 100644 index 0000000..dccb2bc --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#a06666' +let s:gui0B = '#dd9999' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_bathory.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_bathory.vim new file mode 100644 index 0000000..c8c403f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_bathory.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Bathory) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-bathory", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#e78a53' +let s:gui0B = '#fbcb97' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_burzum.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_burzum.vim new file mode 100644 index 0000000..1d292d9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_burzum.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Burzum) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-burzum", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#99bbaa' +let s:gui0B = '#ddeecc' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_dark_funeral.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_dark_funeral.vim new file mode 100644 index 0000000..9d39565 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_dark_funeral.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Dark Funeral) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-dark-funeral", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#5f81a5' +let s:gui0B = '#d0dfee' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_gorgoroth.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_gorgoroth.vim new file mode 100644 index 0000000..ab9bda4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_gorgoroth.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Gorgoroth) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-gorgoroth", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#8c7f70' +let s:gui0B = '#9b8d7f' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_immortal.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_immortal.vim new file mode 100644 index 0000000..97779d6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_immortal.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Immortal) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-immortal", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#556677' +let s:gui0B = '#7799bb' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_khold.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_khold.vim new file mode 100644 index 0000000..65e909f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_khold.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Khold) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-khold", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#974b46' +let s:gui0B = '#eceee3' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_marduk.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_marduk.vim new file mode 100644 index 0000000..25773e8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_marduk.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Marduk) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-marduk", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#626b67' +let s:gui0B = '#a5aaa7' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_mayhem.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_mayhem.vim new file mode 100644 index 0000000..28ffa24 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_mayhem.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Mayhem) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-mayhem", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#eecc6c' +let s:gui0B = '#f3ecd4' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_nile.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_nile.vim new file mode 100644 index 0000000..fc013de --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_nile.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Nile) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-nile", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#777755' +let s:gui0B = '#aa9988' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_venom.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_venom.vim new file mode 100644 index 0000000..f18117a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_black_metal_venom.vim @@ -0,0 +1,85 @@ +" Base16 Black Metal (Venom) vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By metalelf0 (https://github.com/metalelf0) + +let s:scheme_slug = substitute("black-metal-venom", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#121212' +let s:gui02 = '#222222' +let s:gui03 = '#333333' +let s:gui04 = '#999999' +let s:gui05 = '#c1c1c1' +let s:gui06 = '#999999' +let s:gui07 = '#c1c1c1' +let s:gui08 = '#5f8787' +let s:gui09 = '#aaaaaa' +let s:gui0A = '#79241f' +let s:gui0B = '#f8f7f2' +let s:gui0C = '#aaaaaa' +let s:gui0D = '#888888' +let s:gui0E = '#999999' +let s:gui0F = '#444444' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim new file mode 100644 index 0000000..0164677 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brewer.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Brewer Scheme by Timothée Poisot (http://github.com/tpoisot) +let g:airline#themes#base16_brewer#palette = {} +let s:gui00 = "#0c0d0e" +let s:gui01 = "#2e2f30" +let s:gui02 = "#515253" +let s:gui03 = "#737475" +let s:gui04 = "#959697" +let s:gui05 = "#b7b8b9" +let s:gui06 = "#dadbdc" +let s:gui07 = "#fcfdfe" +let s:gui08 = "#e31a1c" +let s:gui09 = "#e6550d" +let s:gui0A = "#dca060" +let s:gui0B = "#31a354" +let s:gui0C = "#80b1d3" +let s:gui0D = "#3182bd" +let s:gui0E = "#756bb1" +let s:gui0F = "#b15928" + +let s:cterm00 = 0 +let s:cterm01 = 17 +let s:cterm02 = 59 +let s:cterm03 = 66 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 166 +let s:cterm0A = 179 +let s:cterm0B = 71 +let s:cterm0C = 110 +let s:cterm0D = 67 +let s:cterm0E = 97 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_brewer#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_brewer#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim new file mode 100644 index 0000000..23c7432 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_bright.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Bright Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_bright#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#303030" +let s:gui02 = "#505050" +let s:gui03 = "#b0b0b0" +let s:gui04 = "#d0d0d0" +let s:gui05 = "#e0e0e0" +let s:gui06 = "#f5f5f5" +let s:gui07 = "#ffffff" +let s:gui08 = "#fb0120" +let s:gui09 = "#fc6d24" +let s:gui0A = "#fda331" +let s:gui0B = "#a1c659" +let s:gui0C = "#76c7b7" +let s:gui0D = "#6fb3d2" +let s:gui0E = "#d381c3" +let s:gui0F = "#be643c" + +let s:cterm00 = 0 +let s:cterm01 = 236 +let s:cterm02 = 239 +let s:cterm03 = 249 +let s:cterm04 = 252 +let s:cterm05 = 253 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 9 +let s:cterm09 = 202 +let s:cterm0A = 215 +let s:cterm0B = 149 +let s:cterm0C = 115 +let s:cterm0D = 74 +let s:cterm0E = 175 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_bright#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_bright#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_bright#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brogrammer.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brogrammer.vim new file mode 100644 index 0000000..2acba36 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brogrammer.vim @@ -0,0 +1,85 @@ +" Base16 Brogrammer vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Vik Ramanujam (http://github.com/piggyslasher) + +let s:scheme_slug = substitute("brogrammer", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1f1f1f' +let s:gui01 = '#f81118' +let s:gui02 = '#2dc55e' +let s:gui03 = '#ecba0f' +let s:gui04 = '#2a84d2' +let s:gui05 = '#4e5ab7' +let s:gui06 = '#1081d6' +let s:gui07 = '#d6dbe5' +let s:gui08 = '#d6dbe5' +let s:gui09 = '#de352e' +let s:gui0A = '#1dd361' +let s:gui0B = '#f3bd09' +let s:gui0C = '#1081d6' +let s:gui0D = '#5350b9' +let s:gui0E = '#0f7ddb' +let s:gui0F = '#ffffff' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees.vim new file mode 100644 index 0000000..3c21950 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees.vim @@ -0,0 +1,85 @@ +" Base16 Brush Trees vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Abraham White <abelincoln.white@gmail.com> + +let s:scheme_slug = substitute("brushtrees", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#E3EFEF' +let s:gui01 = '#C9DBDC' +let s:gui02 = '#B0C5C8' +let s:gui03 = '#98AFB5' +let s:gui04 = '#8299A1' +let s:gui05 = '#6D828E' +let s:gui06 = '#5A6D7A' +let s:gui07 = '#485867' +let s:gui08 = '#b38686' +let s:gui09 = '#d8bba2' +let s:gui0A = '#aab386' +let s:gui0B = '#87b386' +let s:gui0C = '#86b3b3' +let s:gui0D = '#868cb3' +let s:gui0E = '#b386b2' +let s:gui0F = '#b39f9f' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees_dark.vim new file mode 100644 index 0000000..1c3127a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_brushtrees_dark.vim @@ -0,0 +1,85 @@ +" Base16 Brush Trees Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Abraham White <abelincoln.white@gmail.com> + +let s:scheme_slug = substitute("brushtrees-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#485867' +let s:gui01 = '#5A6D7A' +let s:gui02 = '#6D828E' +let s:gui03 = '#8299A1' +let s:gui04 = '#98AFB5' +let s:gui05 = '#B0C5C8' +let s:gui06 = '#C9DBDC' +let s:gui07 = '#E3EFEF' +let s:gui08 = '#b38686' +let s:gui09 = '#d8bba2' +let s:gui0A = '#aab386' +let s:gui0B = '#87b386' +let s:gui0C = '#86b3b3' +let s:gui0D = '#868cb3' +let s:gui0E = '#b386b2' +let s:gui0F = '#b39f9f' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim new file mode 100644 index 0000000..d0345a9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_chalk.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Chalk Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_chalk#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#b0b0b0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#f5f5f5" +let s:gui08 = "#fb9fb1" +let s:gui09 = "#eda987" +let s:gui0A = "#ddb26f" +let s:gui0B = "#acc267" +let s:gui0C = "#12cfc0" +let s:gui0D = "#6fc2ef" +let s:gui0E = "#e1a3ee" +let s:gui0F = "#deaf8f" + +let s:cterm00 = 233 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 217 +let s:cterm09 = 216 +let s:cterm0A = 179 +let s:cterm0B = 143 +let s:cterm0C = 6 +let s:cterm0D = 75 +let s:cterm0E = 183 +let s:cterm0F = 180 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_chalk#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_chalk#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_circus.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_circus.vim new file mode 100644 index 0000000..82d58d0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_circus.vim @@ -0,0 +1,85 @@ +" Base16 Circus vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Stephan Boyer (https://github.com/stepchowfun) and Esther Wang (https://github.com/ewang12) + +let s:scheme_slug = substitute("circus", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#191919' +let s:gui01 = '#202020' +let s:gui02 = '#303030' +let s:gui03 = '#5f5a60' +let s:gui04 = '#505050' +let s:gui05 = '#a7a7a7' +let s:gui06 = '#808080' +let s:gui07 = '#ffffff' +let s:gui08 = '#dc657d' +let s:gui09 = '#4bb1a7' +let s:gui0A = '#c3ba63' +let s:gui0B = '#84b97c' +let s:gui0C = '#4bb1a7' +let s:gui0D = '#639ee4' +let s:gui0E = '#b888e2' +let s:gui0F = '#b888e2' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim new file mode 100644 index 0000000..ac37123 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Classic Scheme by Jason Heeris (http://heeris.id.au) +let g:airline#themes#base16_classic#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#B0B0B0" +let s:gui05 = "#D0D0D0" +let s:gui06 = "#E0E0E0" +let s:gui07 = "#F5F5F5" +let s:gui08 = "#AC4142" +let s:gui09 = "#D28445" +let s:gui0A = "#F4BF75" +let s:gui0B = "#90A959" +let s:gui0C = "#75B5AA" +let s:gui0D = "#6A9FB5" +let s:gui0E = "#AA759F" +let s:gui0F = "#8F5536" + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_classic#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_classic#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_classic#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_dark.vim new file mode 100644 index 0000000..5a8dc5e --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_dark.vim @@ -0,0 +1,85 @@ +" Base16 Classic Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jason Heeris (http://heeris.id.au) + +let s:scheme_slug = substitute("classic-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#151515' +let s:gui01 = '#202020' +let s:gui02 = '#303030' +let s:gui03 = '#505050' +let s:gui04 = '#B0B0B0' +let s:gui05 = '#D0D0D0' +let s:gui06 = '#E0E0E0' +let s:gui07 = '#F5F5F5' +let s:gui08 = '#AC4142' +let s:gui09 = '#D28445' +let s:gui0A = '#F4BF75' +let s:gui0B = '#90A959' +let s:gui0C = '#75B5AA' +let s:gui0D = '#6A9FB5' +let s:gui0E = '#AA759F' +let s:gui0F = '#8F5536' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_light.vim new file mode 100644 index 0000000..62102b8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_classic_light.vim @@ -0,0 +1,85 @@ +" Base16 Classic Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jason Heeris (http://heeris.id.au) + +let s:scheme_slug = substitute("classic-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#F5F5F5' +let s:gui01 = '#E0E0E0' +let s:gui02 = '#D0D0D0' +let s:gui03 = '#B0B0B0' +let s:gui04 = '#505050' +let s:gui05 = '#303030' +let s:gui06 = '#202020' +let s:gui07 = '#151515' +let s:gui08 = '#AC4142' +let s:gui09 = '#D28445' +let s:gui0A = '#F4BF75' +let s:gui0B = '#90A959' +let s:gui0C = '#75B5AA' +let s:gui0D = '#6A9FB5' +let s:gui0E = '#AA759F' +let s:gui0F = '#8F5536' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim new file mode 100644 index 0000000..f9cf956 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_codeschool.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Codeschool Scheme by brettof86 +let g:airline#themes#base16_codeschool#palette = {} +let s:gui00 = "#232c31" +let s:gui01 = "#1c3657" +let s:gui02 = "#2a343a" +let s:gui03 = "#3f4944" +let s:gui04 = "#84898c" +let s:gui05 = "#9ea7a6" +let s:gui06 = "#a7cfa3" +let s:gui07 = "#b5d8f6" +let s:gui08 = "#2a5491" +let s:gui09 = "#43820d" +let s:gui0A = "#a03b1e" +let s:gui0B = "#237986" +let s:gui0C = "#b02f30" +let s:gui0D = "#484d79" +let s:gui0E = "#c59820" +let s:gui0F = "#c98344" + +let s:cterm00 = 17 +let s:cterm01 = 23 +let s:cterm02 = 23 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 151 +let s:cterm07 = 153 +let s:cterm08 = 24 +let s:cterm09 = 64 +let s:cterm0A = 130 +let s:cterm0B = 30 +let s:cterm0C = 125 +let s:cterm0D = 60 +let s:cterm0E = 172 +let s:cterm0F = 173 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_codeschool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_codeschool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim new file mode 100644 index 0000000..d65442d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_colors.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Colors Scheme by mrmrs (http://clrs.cc) +let g:airline#themes#base16_colors#palette = {} +let s:gui00 = "#111111" +let s:gui01 = "#333333" +let s:gui02 = "#555555" +let s:gui03 = "#777777" +let s:gui04 = "#999999" +let s:gui05 = "#bbbbbb" +let s:gui06 = "#dddddd" +let s:gui07 = "#ffffff" +let s:gui08 = "#ff4136" +let s:gui09 = "#ff851b" +let s:gui0A = "#ffdc00" +let s:gui0B = "#2ecc40" +let s:gui0C = "#7fdbff" +let s:gui0D = "#0074d9" +let s:gui0E = "#b10dc9" +let s:gui0F = "#85144b" + +let s:cterm00 = 233 +let s:cterm01 = 236 +let s:cterm02 = 240 +let s:cterm03 = 243 +let s:cterm04 = 246 +let s:cterm05 = 250 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 203 +let s:cterm09 = 208 +let s:cterm0A = 220 +let s:cterm0B = 41 +let s:cterm0C = 117 +let s:cterm0D = 32 +let s:cterm0E = 128 +let s:cterm0F = 89 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_colors#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_colors#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_colors#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupcake.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupcake.vim new file mode 100644 index 0000000..5c7167a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupcake.vim @@ -0,0 +1,85 @@ +" Base16 Cupcake vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chris Kempson (http://chriskempson.com) + +let s:scheme_slug = substitute("cupcake", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fbf1f2' +let s:gui01 = '#f2f1f4' +let s:gui02 = '#d8d5dd' +let s:gui03 = '#bfb9c6' +let s:gui04 = '#a59daf' +let s:gui05 = '#8b8198' +let s:gui06 = '#72677E' +let s:gui07 = '#585062' +let s:gui08 = '#D57E85' +let s:gui09 = '#EBB790' +let s:gui0A = '#DCB16C' +let s:gui0B = '#A3B367' +let s:gui0C = '#69A9A7' +let s:gui0D = '#7297B9' +let s:gui0E = '#BB99B4' +let s:gui0F = '#BAA58C' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupertino.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupertino.vim new file mode 100644 index 0000000..1b4622b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_cupertino.vim @@ -0,0 +1,85 @@ +" Base16 Cupertino vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Defman21 + +let s:scheme_slug = substitute("cupertino", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ffffff' +let s:gui01 = '#c0c0c0' +let s:gui02 = '#c0c0c0' +let s:gui03 = '#808080' +let s:gui04 = '#808080' +let s:gui05 = '#404040' +let s:gui06 = '#404040' +let s:gui07 = '#5e5e5e' +let s:gui08 = '#c41a15' +let s:gui09 = '#eb8500' +let s:gui0A = '#826b28' +let s:gui0B = '#007400' +let s:gui0C = '#318495' +let s:gui0D = '#0000ff' +let s:gui0E = '#a90d91' +let s:gui0F = '#826b28' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_darktooth.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_darktooth.vim new file mode 100644 index 0000000..862b98f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_darktooth.vim @@ -0,0 +1,85 @@ +" Base16 Darktooth vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jason Milkins (https://github.com/jasonm23) + +let s:scheme_slug = substitute("darktooth", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1D2021' +let s:gui01 = '#32302F' +let s:gui02 = '#504945' +let s:gui03 = '#665C54' +let s:gui04 = '#928374' +let s:gui05 = '#A89984' +let s:gui06 = '#D5C4A1' +let s:gui07 = '#FDF4C1' +let s:gui08 = '#FB543F' +let s:gui09 = '#FE8625' +let s:gui0A = '#FAC03B' +let s:gui0B = '#95C085' +let s:gui0C = '#8BA59B' +let s:gui0D = '#0D6678' +let s:gui0E = '#8F4673' +let s:gui0F = '#A87322' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_decaf.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_decaf.vim new file mode 100644 index 0000000..748b70b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_decaf.vim @@ -0,0 +1,85 @@ +" Base16 Decaf vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alex Mirrington (https://github.com/alexmirrington) + +let s:scheme_slug = substitute("decaf", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#2d2d2d' +let s:gui01 = '#393939' +let s:gui02 = '#515151' +let s:gui03 = '#777777' +let s:gui04 = '#b4b7b4' +let s:gui05 = '#cccccc' +let s:gui06 = '#e0e0e0' +let s:gui07 = '#ffffff' +let s:gui08 = '#ff7f7b' +let s:gui09 = '#ffbf70' +let s:gui0A = '#ffd67c' +let s:gui0B = '#beda78' +let s:gui0C = '#bed6ff' +let s:gui0D = '#90bee1' +let s:gui0E = '#efb3f7' +let s:gui0F = '#ff93b3' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim new file mode 100644 index 0000000..841c12e --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Default Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_default#palette = {} +let s:gui00 = "#181818" +let s:gui01 = "#282828" +let s:gui02 = "#383838" +let s:gui03 = "#585858" +let s:gui04 = "#b8b8b8" +let s:gui05 = "#d8d8d8" +let s:gui06 = "#e8e8e8" +let s:gui07 = "#f8f8f8" +let s:gui08 = "#ab4642" +let s:gui09 = "#dc9656" +let s:gui0A = "#f7ca88" +let s:gui0B = "#a1b56c" +let s:gui0C = "#86c1b9" +let s:gui0D = "#7cafc2" +let s:gui0E = "#ba8baf" +let s:gui0F = "#a16946" + +let s:cterm00 = 233 +let s:cterm01 = 235 +let s:cterm02 = 237 +let s:cterm03 = 240 +let s:cterm04 = 249 +let s:cterm05 = 253 +let s:cterm06 = 254 +let s:cterm07 = 15 +let s:cterm08 = 131 +let s:cterm09 = 173 +let s:cterm0A = 222 +let s:cterm0B = 143 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_default#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_default#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_default#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_dark.vim new file mode 100644 index 0000000..96ccbe3 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_dark.vim @@ -0,0 +1,85 @@ +" Base16 Default Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chris Kempson (http://chriskempson.com) + +let s:scheme_slug = substitute("default-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#181818' +let s:gui01 = '#282828' +let s:gui02 = '#383838' +let s:gui03 = '#585858' +let s:gui04 = '#b8b8b8' +let s:gui05 = '#d8d8d8' +let s:gui06 = '#e8e8e8' +let s:gui07 = '#f8f8f8' +let s:gui08 = '#ab4642' +let s:gui09 = '#dc9656' +let s:gui0A = '#f7ca88' +let s:gui0B = '#a1b56c' +let s:gui0C = '#86c1b9' +let s:gui0D = '#7cafc2' +let s:gui0E = '#ba8baf' +let s:gui0F = '#a16946' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_light.vim new file mode 100644 index 0000000..dfeb2e4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_default_light.vim @@ -0,0 +1,85 @@ +" Base16 Default Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chris Kempson (http://chriskempson.com) + +let s:scheme_slug = substitute("default-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f8f8f8' +let s:gui01 = '#e8e8e8' +let s:gui02 = '#d8d8d8' +let s:gui03 = '#b8b8b8' +let s:gui04 = '#585858' +let s:gui05 = '#383838' +let s:gui06 = '#282828' +let s:gui07 = '#181818' +let s:gui08 = '#ab4642' +let s:gui09 = '#dc9656' +let s:gui0A = '#f7ca88' +let s:gui0B = '#a1b56c' +let s:gui0C = '#86c1b9' +let s:gui0D = '#7cafc2' +let s:gui0E = '#ba8baf' +let s:gui0F = '#a16946' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_dracula.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_dracula.vim new file mode 100644 index 0000000..1cfdbca --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_dracula.vim @@ -0,0 +1,85 @@ +" Base16 Dracula vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula) + +let s:scheme_slug = substitute("dracula", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#282936' +let s:gui01 = '#3a3c4e' +let s:gui02 = '#4d4f68' +let s:gui03 = '#626483' +let s:gui04 = '#62d6e8' +let s:gui05 = '#e9e9f4' +let s:gui06 = '#f1f2f8' +let s:gui07 = '#f7f7fb' +let s:gui08 = '#ea51b2' +let s:gui09 = '#b45bcf' +let s:gui0A = '#00f769' +let s:gui0B = '#ebff87' +let s:gui0C = '#a1efe4' +let s:gui0D = '#62d6e8' +let s:gui0E = '#b45bcf' +let s:gui0F = '#00f769' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_dark.vim new file mode 100644 index 0000000..11e1c8b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_dark.vim @@ -0,0 +1,85 @@ +" Base16 Edge Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Sainnhepark (https://github.com/sainnhe) + +let s:scheme_slug = substitute("edge-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#262729' +let s:gui01 = '#88909f' +let s:gui02 = '#b7bec9' +let s:gui03 = '#3e4249' +let s:gui04 = '#73b3e7' +let s:gui05 = '#b7bec9' +let s:gui06 = '#d390e7' +let s:gui07 = '#3e4249' +let s:gui08 = '#e77171' +let s:gui09 = '#e77171' +let s:gui0A = '#dbb774' +let s:gui0B = '#a1bf78' +let s:gui0C = '#5ebaa5' +let s:gui0D = '#73b3e7' +let s:gui0E = '#d390e7' +let s:gui0F = '#5ebaa5' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_light.vim new file mode 100644 index 0000000..fc664ba --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_edge_light.vim @@ -0,0 +1,85 @@ +" Base16 Edge Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Sainnhepark (https://github.com/sainnhe) + +let s:scheme_slug = substitute("edge-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fafafa' +let s:gui01 = '#7c9f4b' +let s:gui02 = '#d69822' +let s:gui03 = '#5e646f' +let s:gui04 = '#6587bf' +let s:gui05 = '#5e646f' +let s:gui06 = '#b870ce' +let s:gui07 = '#5e646f' +let s:gui08 = '#db7070' +let s:gui09 = '#db7070' +let s:gui0A = '#d69822' +let s:gui0B = '#7c9f4b' +let s:gui0C = '#509c93' +let s:gui0D = '#6587bf' +let s:gui0E = '#b870ce' +let s:gui0F = '#509c93' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim new file mode 100644 index 0000000..7161e39 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_eighties.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Eighties Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_eighties#palette = {} +let s:gui00 = "#2d2d2d" +let s:gui01 = "#393939" +let s:gui02 = "#515151" +let s:gui03 = "#747369" +let s:gui04 = "#a09f93" +let s:gui05 = "#d3d0c8" +let s:gui06 = "#e8e6df" +let s:gui07 = "#f2f0ec" +let s:gui08 = "#f2777a" +let s:gui09 = "#f99157" +let s:gui0A = "#ffcc66" +let s:gui0B = "#99cc99" +let s:gui0C = "#66cccc" +let s:gui0D = "#6699cc" +let s:gui0E = "#cc99cc" +let s:gui0F = "#d27b53" + +let s:cterm00 = 236 +let s:cterm01 = 237 +let s:cterm02 = 239 +let s:cterm03 = 95 +let s:cterm04 = 144 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 210 +let s:cterm09 = 209 +let s:cterm0A = 221 +let s:cterm0B = 114 +let s:cterm0C = 80 +let s:cterm0D = 68 +let s:cterm0E = 176 +let s:cterm0F = 173 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_eighties#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_eighties#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim new file mode 100644 index 0000000..0c26076 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_embers.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Embers Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_embers#palette = {} +let s:gui00 = "#16130F" +let s:gui01 = "#2C2620" +let s:gui02 = "#433B32" +let s:gui03 = "#5A5047" +let s:gui04 = "#8A8075" +let s:gui05 = "#A39A90" +let s:gui06 = "#BEB6AE" +let s:gui07 = "#DBD6D1" +let s:gui08 = "#826D57" +let s:gui09 = "#828257" +let s:gui0A = "#6D8257" +let s:gui0B = "#57826D" +let s:gui0C = "#576D82" +let s:gui0D = "#6D5782" +let s:gui0E = "#82576D" +let s:gui0F = "#825757" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 138 +let s:cterm06 = 145 +let s:cterm07 = 188 +let s:cterm08 = 95 +let s:cterm09 = 101 +let s:cterm0A = 65 +let s:cterm0B = 65 +let s:cterm0C = 60 +let s:cterm0D = 60 +let s:cterm0E = 95 +let s:cterm0F = 95 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_embers#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_embers#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_embers#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_espresso.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_espresso.vim new file mode 100644 index 0000000..55843a7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_espresso.vim @@ -0,0 +1,85 @@ +" Base16 Espresso vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alex Mirrington (https://github.com/alexmirrington) + +let s:scheme_slug = substitute("espresso", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#2d2d2d' +let s:gui01 = '#393939' +let s:gui02 = '#515151' +let s:gui03 = '#777777' +let s:gui04 = '#b4b7b4' +let s:gui05 = '#cccccc' +let s:gui06 = '#e0e0e0' +let s:gui07 = '#ffffff' +let s:gui08 = '#d25252' +let s:gui09 = '#f9a959' +let s:gui0A = '#ffc66d' +let s:gui0B = '#a5c261' +let s:gui0C = '#bed6ff' +let s:gui0D = '#6c99bb' +let s:gui0E = '#d197d9' +let s:gui0F = '#f97394' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim new file mode 100644 index 0000000..aa4f5cf --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_flat.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Flat Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_flat#palette = {} +let s:gui00 = "#2C3E50" +let s:gui01 = "#34495E" +let s:gui02 = "#7F8C8D" +let s:gui03 = "#95A5A6" +let s:gui04 = "#BDC3C7" +let s:gui05 = "#e0e0e0" +let s:gui06 = "#f5f5f5" +let s:gui07 = "#ECF0F1" +let s:gui08 = "#E74C3C" +let s:gui09 = "#E67E22" +let s:gui0A = "#F1C40F" +let s:gui0B = "#2ECC71" +let s:gui0C = "#1ABC9C" +let s:gui0D = "#3498DB" +let s:gui0E = "#9B59B6" +let s:gui0F = "#be643c" + +let s:cterm00 = 23 +let s:cterm01 = 59 +let s:cterm02 = 102 +let s:cterm03 = 109 +let s:cterm04 = 146 +let s:cterm05 = 253 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 172 +let s:cterm0A = 220 +let s:cterm0B = 41 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 97 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_flat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_flat#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_flat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_framer.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_framer.vim new file mode 100644 index 0000000..338c624 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_framer.vim @@ -0,0 +1,85 @@ +" Base16 Framer vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Framer (Maintained by Jesse Hoyos) + +let s:scheme_slug = substitute("framer", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#181818' +let s:gui01 = '#151515' +let s:gui02 = '#464646' +let s:gui03 = '#747474' +let s:gui04 = '#B9B9B9' +let s:gui05 = '#D0D0D0' +let s:gui06 = '#E8E8E8' +let s:gui07 = '#EEEEEE' +let s:gui08 = '#FD886B' +let s:gui09 = '#FC4769' +let s:gui0A = '#FECB6E' +let s:gui0B = '#32CCDC' +let s:gui0C = '#ACDDFD' +let s:gui0D = '#20BCFC' +let s:gui0E = '#BA8CFC' +let s:gui0F = '#B15F4A' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_fruit_soda.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_fruit_soda.vim new file mode 100644 index 0000000..6074b49 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_fruit_soda.vim @@ -0,0 +1,85 @@ +" Base16 Fruit Soda vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By jozip + +let s:scheme_slug = substitute("fruit-soda", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f1ecf1' +let s:gui01 = '#e0dee0' +let s:gui02 = '#d8d5d5' +let s:gui03 = '#b5b4b6' +let s:gui04 = '#979598' +let s:gui05 = '#515151' +let s:gui06 = '#474545' +let s:gui07 = '#2d2c2c' +let s:gui08 = '#fe3e31' +let s:gui09 = '#fe6d08' +let s:gui0A = '#f7e203' +let s:gui0B = '#47f74c' +let s:gui0C = '#0f9cfd' +let s:gui0D = '#2931df' +let s:gui0E = '#611fce' +let s:gui0F = '#b16f40' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gigavolt.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gigavolt.vim new file mode 100644 index 0000000..6ee8651 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gigavolt.vim @@ -0,0 +1,85 @@ +" Base16 Gigavolt vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Aidan Swope (http://github.com/Whillikers) + +let s:scheme_slug = substitute("gigavolt", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#202126' +let s:gui01 = '#2d303d' +let s:gui02 = '#5a576e' +let s:gui03 = '#a1d2e6' +let s:gui04 = '#cad3ff' +let s:gui05 = '#e9e7e1' +let s:gui06 = '#eff0f9' +let s:gui07 = '#f2fbff' +let s:gui08 = '#ff661a' +let s:gui09 = '#19f988' +let s:gui0A = '#ffdc2d' +let s:gui0B = '#f2e6a9' +let s:gui0C = '#fb6acb' +let s:gui0D = '#40bfff' +let s:gui0E = '#ae94f9' +let s:gui0F = '#6187ff' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_github.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_github.vim new file mode 100644 index 0000000..03e9ce0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_github.vim @@ -0,0 +1,85 @@ +" Base16 Github vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Defman21 + +let s:scheme_slug = substitute("github", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ffffff' +let s:gui01 = '#f5f5f5' +let s:gui02 = '#c8c8fa' +let s:gui03 = '#969896' +let s:gui04 = '#e8e8e8' +let s:gui05 = '#333333' +let s:gui06 = '#ffffff' +let s:gui07 = '#ffffff' +let s:gui08 = '#ed6a43' +let s:gui09 = '#0086b3' +let s:gui0A = '#795da3' +let s:gui0B = '#183691' +let s:gui0C = '#183691' +let s:gui0D = '#795da3' +let s:gui0E = '#a71d5d' +let s:gui0F = '#333333' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim new file mode 100644 index 0000000..f20da8c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Google Scheme by Seth Wright (http://sethawright.com) +let g:airline#themes#base16_google#palette = {} +let s:gui00 = "#1d1f21" +let s:gui01 = "#282a2e" +let s:gui02 = "#373b41" +let s:gui03 = "#969896" +let s:gui04 = "#b4b7b4" +let s:gui05 = "#c5c8c6" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#CC342B" +let s:gui09 = "#F96A38" +let s:gui0A = "#FBA922" +let s:gui0B = "#198844" +let s:gui0C = "#3971ED" +let s:gui0D = "#3971ED" +let s:gui0E = "#A36AC7" +let s:gui0F = "#3971ED" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 203 +let s:cterm0A = 214 +let s:cterm0B = 29 +let s:cterm0C = 12 +let s:cterm0D = 12 +let s:cterm0E = 134 +let s:cterm0F = 12 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_google#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_google#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_google#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_dark.vim new file mode 100644 index 0000000..e710b8a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_dark.vim @@ -0,0 +1,85 @@ +" Base16 Google Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Seth Wright (http://sethawright.com) + +let s:scheme_slug = substitute("google-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1d1f21' +let s:gui01 = '#282a2e' +let s:gui02 = '#373b41' +let s:gui03 = '#969896' +let s:gui04 = '#b4b7b4' +let s:gui05 = '#c5c8c6' +let s:gui06 = '#e0e0e0' +let s:gui07 = '#ffffff' +let s:gui08 = '#CC342B' +let s:gui09 = '#F96A38' +let s:gui0A = '#FBA922' +let s:gui0B = '#198844' +let s:gui0C = '#3971ED' +let s:gui0D = '#3971ED' +let s:gui0E = '#A36AC7' +let s:gui0F = '#3971ED' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_light.vim new file mode 100644 index 0000000..08080c8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_google_light.vim @@ -0,0 +1,85 @@ +" Base16 Google Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Seth Wright (http://sethawright.com) + +let s:scheme_slug = substitute("google-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ffffff' +let s:gui01 = '#e0e0e0' +let s:gui02 = '#c5c8c6' +let s:gui03 = '#b4b7b4' +let s:gui04 = '#969896' +let s:gui05 = '#373b41' +let s:gui06 = '#282a2e' +let s:gui07 = '#1d1f21' +let s:gui08 = '#CC342B' +let s:gui09 = '#F96A38' +let s:gui0A = '#FBA922' +let s:gui0B = '#198844' +let s:gui0C = '#3971ED' +let s:gui0D = '#3971ED' +let s:gui0E = '#A36AC7' +let s:gui0F = '#3971ED' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim new file mode 100644 index 0000000..bf60eb3 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Grayscale Scheme by Alexandre Gavioli (https://github.com/Alexx2/) +let g:airline#themes#base16_grayscale#palette = {} +let s:gui00 = "#101010" +let s:gui01 = "#252525" +let s:gui02 = "#464646" +let s:gui03 = "#525252" +let s:gui04 = "#ababab" +let s:gui05 = "#b9b9b9" +let s:gui06 = "#e3e3e3" +let s:gui07 = "#f7f7f7" +let s:gui08 = "#7c7c7c" +let s:gui09 = "#999999" +let s:gui0A = "#a0a0a0" +let s:gui0B = "#8e8e8e" +let s:gui0C = "#868686" +let s:gui0D = "#686868" +let s:gui0E = "#747474" +let s:gui0F = "#5e5e5e" + +let s:cterm00 = 233 +let s:cterm01 = 235 +let s:cterm02 = 238 +let s:cterm03 = 239 +let s:cterm04 = 248 +let s:cterm05 = 250 +let s:cterm06 = 254 +let s:cterm07 = 15 +let s:cterm08 = 243 +let s:cterm09 = 246 +let s:cterm0A = 247 +let s:cterm0B = 245 +let s:cterm0C = 244 +let s:cterm0D = 241 +let s:cterm0E = 243 +let s:cterm0F = 240 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_grayscale#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_grayscale#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_dark.vim new file mode 100644 index 0000000..ac9fd37 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_dark.vim @@ -0,0 +1,85 @@ +" Base16 Grayscale Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alexandre Gavioli (https://github.com/Alexx2/) + +let s:scheme_slug = substitute("grayscale-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#101010' +let s:gui01 = '#252525' +let s:gui02 = '#464646' +let s:gui03 = '#525252' +let s:gui04 = '#ababab' +let s:gui05 = '#b9b9b9' +let s:gui06 = '#e3e3e3' +let s:gui07 = '#f7f7f7' +let s:gui08 = '#7c7c7c' +let s:gui09 = '#999999' +let s:gui0A = '#a0a0a0' +let s:gui0B = '#8e8e8e' +let s:gui0C = '#868686' +let s:gui0D = '#686868' +let s:gui0E = '#747474' +let s:gui0F = '#5e5e5e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_light.vim new file mode 100644 index 0000000..bac4eab --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_grayscale_light.vim @@ -0,0 +1,85 @@ +" Base16 Grayscale Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alexandre Gavioli (https://github.com/Alexx2/) + +let s:scheme_slug = substitute("grayscale-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f7f7f7' +let s:gui01 = '#e3e3e3' +let s:gui02 = '#b9b9b9' +let s:gui03 = '#ababab' +let s:gui04 = '#525252' +let s:gui05 = '#464646' +let s:gui06 = '#252525' +let s:gui07 = '#101010' +let s:gui08 = '#7c7c7c' +let s:gui09 = '#999999' +let s:gui0A = '#a0a0a0' +let s:gui0B = '#8e8e8e' +let s:gui0C = '#868686' +let s:gui0D = '#686868' +let s:gui0E = '#747474' +let s:gui0F = '#5e5e5e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim new file mode 100644 index 0000000..b460449 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_greenscreen.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Green Screen Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_greenscreen#palette = {} +let s:gui00 = "#001100" +let s:gui01 = "#003300" +let s:gui02 = "#005500" +let s:gui03 = "#007700" +let s:gui04 = "#009900" +let s:gui05 = "#00bb00" +let s:gui06 = "#00dd00" +let s:gui07 = "#00ff00" +let s:gui08 = "#007700" +let s:gui09 = "#009900" +let s:gui0A = "#007700" +let s:gui0B = "#00bb00" +let s:gui0C = "#005500" +let s:gui0D = "#009900" +let s:gui0E = "#00bb00" +let s:gui0F = "#005500" + +let s:cterm00 = 0 +let s:cterm01 = 22 +let s:cterm02 = 22 +let s:cterm03 = 28 +let s:cterm04 = 28 +let s:cterm05 = 34 +let s:cterm06 = 40 +let s:cterm07 = 10 +let s:cterm08 = 28 +let s:cterm09 = 28 +let s:cterm0A = 28 +let s:cterm0B = 34 +let s:cterm0C = 22 +let s:cterm0D = 28 +let s:cterm0E = 34 +let s:cterm0F = 22 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_greenscreen#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_greenscreen#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_hard.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_hard.vim new file mode 100644 index 0000000..1880f10 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_hard.vim @@ -0,0 +1,78 @@ +" vim-airline template by ronald2wing (https://github.com/ronald2wing) +" Base 16 Gruvbox Dark Hard Scheme by Dawid Kurek (https://github.com/dawikur) +let g:airline#themes#base16_gruvbox_dark_hard#palette = {} +let s:gui00 = "#1d2021" +let s:gui01 = "#3c3836" +let s:gui02 = "#504945" +let s:gui03 = "#665c54" +let s:gui04 = "#bdae93" +let s:gui05 = "#d5c4a1" +let s:gui06 = "#ebdbb2" +let s:gui07 = "#fbf1c7" +let s:gui08 = "#fb4934" +let s:gui09 = "#fe8019" +let s:gui0A = "#fabd2f" +let s:gui0B = "#b8bb26" +let s:gui0C = "#8ec07c" +let s:gui0D = "#83a598" +let s:gui0E = "#d3869b" +let s:gui0F = "#d65d0e" + +let s:cterm00 = 234 +let s:cterm01 = 235 +let s:cterm02 = 236 +let s:cterm03 = 240 +let s:cterm04 = 143 +let s:cterm05 = 187 +let s:cterm06 = 223 +let s:cterm07 = 230 +let s:cterm08 = 203 +let s:cterm09 = 208 +let s:cterm0A = 214 +let s:cterm0B = 142 +let s:cterm0C = 108 +let s:cterm0D = 108 +let s:cterm0E = 175 +let s:cterm0F = 166 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_gruvbox_dark_hard#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_gruvbox_dark_hard#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_gruvbox_dark_hard#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_gruvbox_dark_hard#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_gruvbox_dark_hard#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +let g:airline#themes#base16_gruvbox_dark_hard#palette.terminal = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#base16_gruvbox_dark_hard#palette.normal.airline_term = s:N3 +let g:airline#themes#base16_gruvbox_dark_hard#palette.terminal.airline_term = s:N3 +let g:airline#themes#base16_gruvbox_dark_hard#palette.visual.airline_term = s:N3 + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_gruvbox_dark_hard#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_medium.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_medium.vim new file mode 100644 index 0000000..6be0083 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_medium.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox dark, medium vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-dark-medium", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#282828' +let s:gui01 = '#3c3836' +let s:gui02 = '#504945' +let s:gui03 = '#665c54' +let s:gui04 = '#bdae93' +let s:gui05 = '#d5c4a1' +let s:gui06 = '#ebdbb2' +let s:gui07 = '#fbf1c7' +let s:gui08 = '#fb4934' +let s:gui09 = '#fe8019' +let s:gui0A = '#fabd2f' +let s:gui0B = '#b8bb26' +let s:gui0C = '#8ec07c' +let s:gui0D = '#83a598' +let s:gui0E = '#d3869b' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_pale.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_pale.vim new file mode 100644 index 0000000..12b9eaa --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_pale.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox dark, pale vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-dark-pale", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#262626' +let s:gui01 = '#3a3a3a' +let s:gui02 = '#4e4e4e' +let s:gui03 = '#8a8a8a' +let s:gui04 = '#949494' +let s:gui05 = '#dab997' +let s:gui06 = '#d5c4a1' +let s:gui07 = '#ebdbb2' +let s:gui08 = '#d75f5f' +let s:gui09 = '#ff8700' +let s:gui0A = '#ffaf00' +let s:gui0B = '#afaf00' +let s:gui0C = '#85ad85' +let s:gui0D = '#83adad' +let s:gui0E = '#d485ad' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_soft.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_soft.vim new file mode 100644 index 0000000..c118190 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_dark_soft.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox dark, soft vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-dark-soft", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#32302f' +let s:gui01 = '#3c3836' +let s:gui02 = '#504945' +let s:gui03 = '#665c54' +let s:gui04 = '#bdae93' +let s:gui05 = '#d5c4a1' +let s:gui06 = '#ebdbb2' +let s:gui07 = '#fbf1c7' +let s:gui08 = '#fb4934' +let s:gui09 = '#fe8019' +let s:gui0A = '#fabd2f' +let s:gui0B = '#b8bb26' +let s:gui0C = '#8ec07c' +let s:gui0D = '#83a598' +let s:gui0E = '#d3869b' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_hard.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_hard.vim new file mode 100644 index 0000000..82c65af --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_hard.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox light, hard vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-light-hard", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f9f5d7' +let s:gui01 = '#ebdbb2' +let s:gui02 = '#d5c4a1' +let s:gui03 = '#bdae93' +let s:gui04 = '#665c54' +let s:gui05 = '#504945' +let s:gui06 = '#3c3836' +let s:gui07 = '#282828' +let s:gui08 = '#9d0006' +let s:gui09 = '#af3a03' +let s:gui0A = '#b57614' +let s:gui0B = '#79740e' +let s:gui0C = '#427b58' +let s:gui0D = '#076678' +let s:gui0E = '#8f3f71' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_medium.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_medium.vim new file mode 100644 index 0000000..f63ab3a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_medium.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox light, medium vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-light-medium", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fbf1c7' +let s:gui01 = '#ebdbb2' +let s:gui02 = '#d5c4a1' +let s:gui03 = '#bdae93' +let s:gui04 = '#665c54' +let s:gui05 = '#504945' +let s:gui06 = '#3c3836' +let s:gui07 = '#282828' +let s:gui08 = '#9d0006' +let s:gui09 = '#af3a03' +let s:gui0A = '#b57614' +let s:gui0B = '#79740e' +let s:gui0C = '#427b58' +let s:gui0D = '#076678' +let s:gui0E = '#8f3f71' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_soft.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_soft.vim new file mode 100644 index 0000000..f50e6c5 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_gruvbox_light_soft.vim @@ -0,0 +1,85 @@ +" Base16 Gruvbox light, soft vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +let s:scheme_slug = substitute("gruvbox-light-soft", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f2e5bc' +let s:gui01 = '#ebdbb2' +let s:gui02 = '#d5c4a1' +let s:gui03 = '#bdae93' +let s:gui04 = '#665c54' +let s:gui05 = '#504945' +let s:gui06 = '#3c3836' +let s:gui07 = '#282828' +let s:gui08 = '#9d0006' +let s:gui09 = '#af3a03' +let s:gui0A = '#b57614' +let s:gui0B = '#79740e' +let s:gui0C = '#427b58' +let s:gui0D = '#076678' +let s:gui0E = '#8f3f71' +let s:gui0F = '#d65d0e' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim new file mode 100644 index 0000000..9700a04 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic16.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 harmonic16 Scheme by Jannik Siebert (https://github.com/janniks) +let g:airline#themes#base16_harmonic16#palette = {} +let s:gui00 = "#0b1c2c" +let s:gui01 = "#223b54" +let s:gui02 = "#405c79" +let s:gui03 = "#627e99" +let s:gui04 = "#aabcce" +let s:gui05 = "#cbd6e2" +let s:gui06 = "#e5ebf1" +let s:gui07 = "#f7f9fb" +let s:gui08 = "#bf8b56" +let s:gui09 = "#bfbf56" +let s:gui0A = "#8bbf56" +let s:gui0B = "#56bf8b" +let s:gui0C = "#568bbf" +let s:gui0D = "#8b56bf" +let s:gui0E = "#bf568b" +let s:gui0F = "#bf5656" + +let s:cterm00 = 0 +let s:cterm01 = 23 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 146 +let s:cterm05 = 188 +let s:cterm06 = 189 +let s:cterm07 = 15 +let s:cterm08 = 137 +let s:cterm09 = 143 +let s:cterm0A = 107 +let s:cterm0B = 72 +let s:cterm0C = 67 +let s:cterm0D = 97 +let s:cterm0E = 132 +let s:cterm0F = 131 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_harmonic16#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_harmonic16#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_dark.vim new file mode 100644 index 0000000..c5799e7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_dark.vim @@ -0,0 +1,85 @@ +" Base16 Harmonic16 Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jannik Siebert (https://github.com/janniks) + +let s:scheme_slug = substitute("harmonic-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#0b1c2c' +let s:gui01 = '#223b54' +let s:gui02 = '#405c79' +let s:gui03 = '#627e99' +let s:gui04 = '#aabcce' +let s:gui05 = '#cbd6e2' +let s:gui06 = '#e5ebf1' +let s:gui07 = '#f7f9fb' +let s:gui08 = '#bf8b56' +let s:gui09 = '#bfbf56' +let s:gui0A = '#8bbf56' +let s:gui0B = '#56bf8b' +let s:gui0C = '#568bbf' +let s:gui0D = '#8b56bf' +let s:gui0E = '#bf568b' +let s:gui0F = '#bf5656' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_light.vim new file mode 100644 index 0000000..1cb5c6f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_harmonic_light.vim @@ -0,0 +1,85 @@ +" Base16 Harmonic16 Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jannik Siebert (https://github.com/janniks) + +let s:scheme_slug = substitute("harmonic-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f7f9fb' +let s:gui01 = '#e5ebf1' +let s:gui02 = '#cbd6e2' +let s:gui03 = '#aabcce' +let s:gui04 = '#627e99' +let s:gui05 = '#405c79' +let s:gui06 = '#223b54' +let s:gui07 = '#0b1c2c' +let s:gui08 = '#bf8b56' +let s:gui09 = '#bfbf56' +let s:gui0A = '#8bbf56' +let s:gui0B = '#56bf8b' +let s:gui0C = '#568bbf' +let s:gui0D = '#8b56bf' +let s:gui0E = '#bf568b' +let s:gui0F = '#bf5656' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch.vim new file mode 100644 index 0000000..954bb17 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch.vim @@ -0,0 +1,85 @@ +" Base16 Heetch Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Geoffrey Teale (tealeg@gmail.com) + +let s:scheme_slug = substitute("heetch", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#190134' +let s:gui01 = '#392551' +let s:gui02 = '#5A496E' +let s:gui03 = '#7B6D8B' +let s:gui04 = '#9C92A8' +let s:gui05 = '#BDB6C5' +let s:gui06 = '#DEDAE2' +let s:gui07 = '#FEFFFF' +let s:gui08 = '#27D9D5' +let s:gui09 = '#5BA2B6' +let s:gui0A = '#8F6C97' +let s:gui0B = '#C33678' +let s:gui0C = '#F80059' +let s:gui0D = '#BD0152' +let s:gui0E = '#82034C' +let s:gui0F = '#470546' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch_light.vim new file mode 100644 index 0000000..bf18ad6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_heetch_light.vim @@ -0,0 +1,85 @@ +" Base16 Heetch Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Geoffrey Teale (tealeg@gmail.com) + +let s:scheme_slug = substitute("heetch-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#feffff' +let s:gui01 = '#392551' +let s:gui02 = '#7b6d8b' +let s:gui03 = '#9c92a8' +let s:gui04 = '#ddd6e5' +let s:gui05 = '#5a496e' +let s:gui06 = '#470546' +let s:gui07 = '#190134' +let s:gui08 = '#27d9d5' +let s:gui09 = '#bdb6c5' +let s:gui0A = '#5ba2b6' +let s:gui0B = '#f80059' +let s:gui0C = '#c33678' +let s:gui0D = '#47f9f5' +let s:gui0E = '#bd0152' +let s:gui0F = '#dedae2' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_helios.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_helios.vim new file mode 100644 index 0000000..7aae995 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_helios.vim @@ -0,0 +1,85 @@ +" Base16 Helios vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Alex Meyer (https://github.com/reyemxela) + +let s:scheme_slug = substitute("helios", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1d2021' +let s:gui01 = '#383c3e' +let s:gui02 = '#53585b' +let s:gui03 = '#6f7579' +let s:gui04 = '#cdcdcd' +let s:gui05 = '#d5d5d5' +let s:gui06 = '#dddddd' +let s:gui07 = '#e5e5e5' +let s:gui08 = '#d72638' +let s:gui09 = '#eb8413' +let s:gui0A = '#f19d1a' +let s:gui0B = '#88b92d' +let s:gui0C = '#1ba595' +let s:gui0D = '#1e8bac' +let s:gui0E = '#be4264' +let s:gui0F = '#c85e0d' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim new file mode 100644 index 0000000..0e78688 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_hopscotch.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Hopscotch Scheme by Jan T. Sott +let g:airline#themes#base16_hopscotch#palette = {} +let s:gui00 = "#322931" +let s:gui01 = "#433b42" +let s:gui02 = "#5c545b" +let s:gui03 = "#797379" +let s:gui04 = "#989498" +let s:gui05 = "#b9b5b8" +let s:gui06 = "#d5d3d5" +let s:gui07 = "#ffffff" +let s:gui08 = "#dd464c" +let s:gui09 = "#fd8b19" +let s:gui0A = "#fdcc59" +let s:gui0B = "#8fc13e" +let s:gui0C = "#149b93" +let s:gui0D = "#1290bf" +let s:gui0E = "#c85e7c" +let s:gui0F = "#b33508" + +let s:cterm00 = 53 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 96 +let s:cterm04 = 102 +let s:cterm05 = 145 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 208 +let s:cterm0A = 221 +let s:cterm0B = 107 +let s:cterm0C = 30 +let s:cterm0D = 31 +let s:cterm0E = 168 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_hopscotch#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_hopscotch#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_dark.vim new file mode 100644 index 0000000..a96f222 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_dark.vim @@ -0,0 +1,85 @@ +" Base16 Horizon Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Michaël Ball (http://github.com/michael-ball/) + +let s:scheme_slug = substitute("horizon-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1C1E26' +let s:gui01 = '#232530' +let s:gui02 = '#2E303E' +let s:gui03 = '#6F6F70' +let s:gui04 = '#9DA0A2' +let s:gui05 = '#CBCED0' +let s:gui06 = '#DCDFE4' +let s:gui07 = '#E3E6EE' +let s:gui08 = '#E93C58' +let s:gui09 = '#E58D7D' +let s:gui0A = '#EFB993' +let s:gui0B = '#EFAF8E' +let s:gui0C = '#24A8B4' +let s:gui0D = '#DF5273' +let s:gui0E = '#B072D1' +let s:gui0F = '#E4A382' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_light.vim new file mode 100644 index 0000000..a0a7311 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_light.vim @@ -0,0 +1,85 @@ +" Base16 Horizon Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Michaël Ball (http://github.com/michael-ball/) + +let s:scheme_slug = substitute("horizon-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#FDF0ED' +let s:gui01 = '#FADAD1' +let s:gui02 = '#F9CBBE' +let s:gui03 = '#BDB3B1' +let s:gui04 = '#948C8A' +let s:gui05 = '#403C3D' +let s:gui06 = '#302C2D' +let s:gui07 = '#201C1D' +let s:gui08 = '#F7939B' +let s:gui09 = '#F6661E' +let s:gui0A = '#FBE0D9' +let s:gui0B = '#94E1B0' +let s:gui0C = '#DC3318' +let s:gui0D = '#DA103F' +let s:gui0E = '#1D8991' +let s:gui0F = '#E58C92' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_dark.vim new file mode 100644 index 0000000..8de0c41 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_dark.vim @@ -0,0 +1,85 @@ +" Base16 Horizon Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Michaël Ball (http://github.com/michael-ball/) + +let s:scheme_slug = substitute("horizon-terminal-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1C1E26' +let s:gui01 = '#232530' +let s:gui02 = '#2E303E' +let s:gui03 = '#6F6F70' +let s:gui04 = '#9DA0A2' +let s:gui05 = '#CBCED0' +let s:gui06 = '#DCDFE4' +let s:gui07 = '#E3E6EE' +let s:gui08 = '#E95678' +let s:gui09 = '#FAB795' +let s:gui0A = '#FAC29A' +let s:gui0B = '#29D398' +let s:gui0C = '#59E1E3' +let s:gui0D = '#26BBD9' +let s:gui0E = '#EE64AC' +let s:gui0F = '#F09383' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_light.vim new file mode 100644 index 0000000..164571a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_horizon_terminal_light.vim @@ -0,0 +1,85 @@ +" Base16 Horizon Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Michaël Ball (http://github.com/michael-ball/) + +let s:scheme_slug = substitute("horizon-terminal-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#FDF0ED' +let s:gui01 = '#FADAD1' +let s:gui02 = '#F9CBBE' +let s:gui03 = '#BDB3B1' +let s:gui04 = '#948C8A' +let s:gui05 = '#403C3D' +let s:gui06 = '#302C2D' +let s:gui07 = '#201C1D' +let s:gui08 = '#E95678' +let s:gui09 = '#F9CEC3' +let s:gui0A = '#FADAD1' +let s:gui0B = '#29D398' +let s:gui0C = '#59E1E3' +let s:gui0D = '#26BBD9' +let s:gui0E = '#EE64AC' +let s:gui0F = '#F9CBBE' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_dark.vim new file mode 100644 index 0000000..b334ed0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_dark.vim @@ -0,0 +1,85 @@ +" Base16 iA Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By iA Inc. (modified by aramisgithub) + +let s:scheme_slug = substitute("ia-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1a1a1a' +let s:gui01 = '#222222' +let s:gui02 = '#1d414d' +let s:gui03 = '#767676' +let s:gui04 = '#b8b8b8' +let s:gui05 = '#cccccc' +let s:gui06 = '#e8e8e8' +let s:gui07 = '#f8f8f8' +let s:gui08 = '#d88568' +let s:gui09 = '#d86868' +let s:gui0A = '#b99353' +let s:gui0B = '#83a471' +let s:gui0C = '#7c9cae' +let s:gui0D = '#8eccdd' +let s:gui0E = '#b98eb2' +let s:gui0F = '#8b6c37' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_light.vim new file mode 100644 index 0000000..f029181 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ia_light.vim @@ -0,0 +1,85 @@ +" Base16 iA Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By iA Inc. (modified by aramisgithub) + +let s:scheme_slug = substitute("ia-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f6f6f6' +let s:gui01 = '#dedede' +let s:gui02 = '#bde5f2' +let s:gui03 = '#898989' +let s:gui04 = '#767676' +let s:gui05 = '#181818' +let s:gui06 = '#e8e8e8' +let s:gui07 = '#f8f8f8' +let s:gui08 = '#9c5a02' +let s:gui09 = '#c43e18' +let s:gui0A = '#c48218' +let s:gui0B = '#38781c' +let s:gui0C = '#2d6bb1' +let s:gui0D = '#48bac2' +let s:gui0E = '#a94598' +let s:gui0F = '#8b6c37' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_icy.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_icy.vim new file mode 100644 index 0000000..825f405 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_icy.vim @@ -0,0 +1,85 @@ +" Base16 Icy Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By icyphox (https://icyphox.ga) + +let s:scheme_slug = substitute("icy", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#021012' +let s:gui01 = '#031619' +let s:gui02 = '#041f23' +let s:gui03 = '#052e34' +let s:gui04 = '#064048' +let s:gui05 = '#095b67' +let s:gui06 = '#0c7c8c' +let s:gui07 = '#109cb0' +let s:gui08 = '#16c1d9' +let s:gui09 = '#b3ebf2' +let s:gui0A = '#80deea' +let s:gui0B = '#4dd0e1' +let s:gui0C = '#26c6da' +let s:gui0D = '#00bcd4' +let s:gui0E = '#00acc1' +let s:gui0F = '#0097a7' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_irblack.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_irblack.vim new file mode 100644 index 0000000..4500850 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_irblack.vim @@ -0,0 +1,85 @@ +" Base16 IR Black vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Timothée Poisot (http://timotheepoisot.fr) + +let s:scheme_slug = substitute("irblack", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#242422' +let s:gui02 = '#484844' +let s:gui03 = '#6c6c66' +let s:gui04 = '#918f88' +let s:gui05 = '#b5b3aa' +let s:gui06 = '#d9d7cc' +let s:gui07 = '#fdfbee' +let s:gui08 = '#ff6c60' +let s:gui09 = '#e9c062' +let s:gui0A = '#ffffb6' +let s:gui0B = '#a8ff60' +let s:gui0C = '#c6c5fe' +let s:gui0D = '#96cbfe' +let s:gui0E = '#ff73fd' +let s:gui0F = '#b18a3d' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim new file mode 100644 index 0000000..aa5e0bd --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_isotope.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Isotope Scheme by Jan T. Sott +let g:airline#themes#base16_isotope#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#404040" +let s:gui02 = "#606060" +let s:gui03 = "#808080" +let s:gui04 = "#c0c0c0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#ff0000" +let s:gui09 = "#ff9900" +let s:gui0A = "#ff0099" +let s:gui0B = "#33ff00" +let s:gui0C = "#00ffff" +let s:gui0D = "#0066ff" +let s:gui0E = "#cc00ff" +let s:gui0F = "#3300ff" + +let s:cterm00 = 0 +let s:cterm01 = 237 +let s:cterm02 = 241 +let s:cterm03 = 244 +let s:cterm04 = 250 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 9 +let s:cterm09 = 208 +let s:cterm0A = 198 +let s:cterm0B = 82 +let s:cterm0C = 14 +let s:cterm0D = 27 +let s:cterm0E = 165 +let s:cterm0F = 57 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_isotope#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_isotope#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim new file mode 100644 index 0000000..b228e23 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_londontube.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 London Tube Scheme by Jan T. Sott +let g:airline#themes#base16_londontube#palette = {} +let s:gui00 = "#231f20" +let s:gui01 = "#1c3f95" +let s:gui02 = "#5a5758" +let s:gui03 = "#737171" +let s:gui04 = "#959ca1" +let s:gui05 = "#d9d8d8" +let s:gui06 = "#e7e7e8" +let s:gui07 = "#ffffff" +let s:gui08 = "#ee2e24" +let s:gui09 = "#f386a1" +let s:gui0A = "#ffd204" +let s:gui0B = "#00853e" +let s:gui0C = "#85cebc" +let s:gui0D = "#009ddc" +let s:gui0E = "#98005d" +let s:gui0F = "#b06110" + +let s:cterm00 = 0 +let s:cterm01 = 24 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 109 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 211 +let s:cterm0A = 220 +let s:cterm0B = 29 +let s:cterm0C = 115 +let s:cterm0D = 38 +let s:cterm0E = 89 +let s:cterm0F = 130 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_londontube#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_londontube#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_macintosh.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_macintosh.vim new file mode 100644 index 0000000..4801995 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_macintosh.vim @@ -0,0 +1,85 @@ +" Base16 Macintosh vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Rebecca Bettencourt (http://www.kreativekorp.com) + +let s:scheme_slug = substitute("macintosh", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#404040' +let s:gui02 = '#404040' +let s:gui03 = '#808080' +let s:gui04 = '#808080' +let s:gui05 = '#c0c0c0' +let s:gui06 = '#c0c0c0' +let s:gui07 = '#ffffff' +let s:gui08 = '#dd0907' +let s:gui09 = '#ff6403' +let s:gui0A = '#fbf305' +let s:gui0B = '#1fb714' +let s:gui0C = '#02abea' +let s:gui0D = '#0000d3' +let s:gui0E = '#4700a5' +let s:gui0F = '#90713a' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim new file mode 100644 index 0000000..e6cd459 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_marrakesh.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Marrakesh Scheme by Alexandre Gavioli (http://github.com/Alexx2/) +let g:airline#themes#base16_marrakesh#palette = {} +let s:gui00 = "#201602" +let s:gui01 = "#302e00" +let s:gui02 = "#5f5b17" +let s:gui03 = "#6c6823" +let s:gui04 = "#86813b" +let s:gui05 = "#948e48" +let s:gui06 = "#ccc37a" +let s:gui07 = "#faf0a5" +let s:gui08 = "#c35359" +let s:gui09 = "#b36144" +let s:gui0A = "#a88339" +let s:gui0B = "#18974e" +let s:gui0C = "#75a738" +let s:gui0D = "#477ca1" +let s:gui0E = "#8868b3" +let s:gui0F = "#b3588e" + +let s:cterm00 = 0 +let s:cterm01 = 52 +let s:cterm02 = 58 +let s:cterm03 = 58 +let s:cterm04 = 101 +let s:cterm05 = 101 +let s:cterm06 = 180 +let s:cterm07 = 229 +let s:cterm08 = 131 +let s:cterm09 = 131 +let s:cterm0A = 137 +let s:cterm0B = 29 +let s:cterm0C = 107 +let s:cterm0D = 67 +let s:cterm0E = 97 +let s:cterm0F = 132 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_marrakesh#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_marrakesh#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_materia.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_materia.vim new file mode 100644 index 0000000..259e63c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_materia.vim @@ -0,0 +1,85 @@ +" Base16 Materia vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Defman21 + +let s:scheme_slug = substitute("materia", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#263238' +let s:gui01 = '#2C393F' +let s:gui02 = '#37474F' +let s:gui03 = '#707880' +let s:gui04 = '#C9CCD3' +let s:gui05 = '#CDD3DE' +let s:gui06 = '#D5DBE5' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#EC5F67' +let s:gui09 = '#EA9560' +let s:gui0A = '#FFCC00' +let s:gui0B = '#8BD649' +let s:gui0C = '#80CBC4' +let s:gui0D = '#89DDFF' +let s:gui0E = '#82AAFF' +let s:gui0F = '#EC5F67' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material.vim new file mode 100644 index 0000000..8fe1aea --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material.vim @@ -0,0 +1,85 @@ +" Base16 Material vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Nate Peterson + +let s:scheme_slug = substitute("material", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#263238' +let s:gui01 = '#2E3C43' +let s:gui02 = '#314549' +let s:gui03 = '#546E7A' +let s:gui04 = '#B2CCD6' +let s:gui05 = '#EEFFFF' +let s:gui06 = '#EEFFFF' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#F07178' +let s:gui09 = '#F78C6C' +let s:gui0A = '#FFCB6B' +let s:gui0B = '#C3E88D' +let s:gui0C = '#89DDFF' +let s:gui0D = '#82AAFF' +let s:gui0E = '#C792EA' +let s:gui0F = '#FF5370' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_darker.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_darker.vim new file mode 100644 index 0000000..3693a84 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_darker.vim @@ -0,0 +1,85 @@ +" Base16 Material Darker vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Nate Peterson + +let s:scheme_slug = substitute("material-darker", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#212121' +let s:gui01 = '#303030' +let s:gui02 = '#353535' +let s:gui03 = '#4A4A4A' +let s:gui04 = '#B2CCD6' +let s:gui05 = '#EEFFFF' +let s:gui06 = '#EEFFFF' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#F07178' +let s:gui09 = '#F78C6C' +let s:gui0A = '#FFCB6B' +let s:gui0B = '#C3E88D' +let s:gui0C = '#89DDFF' +let s:gui0D = '#82AAFF' +let s:gui0E = '#C792EA' +let s:gui0F = '#FF5370' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_lighter.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_lighter.vim new file mode 100644 index 0000000..0b6f374 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_lighter.vim @@ -0,0 +1,85 @@ +" Base16 Material Lighter vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Nate Peterson + +let s:scheme_slug = substitute("material-lighter", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#FAFAFA' +let s:gui01 = '#E7EAEC' +let s:gui02 = '#CCEAE7' +let s:gui03 = '#CCD7DA' +let s:gui04 = '#8796B0' +let s:gui05 = '#80CBC4' +let s:gui06 = '#80CBC4' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#FF5370' +let s:gui09 = '#F76D47' +let s:gui0A = '#FFB62C' +let s:gui0B = '#91B859' +let s:gui0C = '#39ADB5' +let s:gui0D = '#6182B8' +let s:gui0E = '#7C4DFF' +let s:gui0F = '#E53935' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_palenight.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_palenight.vim new file mode 100644 index 0000000..c581651 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_palenight.vim @@ -0,0 +1,85 @@ +" Base16 Material Palenight vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Nate Peterson + +let s:scheme_slug = substitute("material-palenight", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#292D3E' +let s:gui01 = '#444267' +let s:gui02 = '#32374D' +let s:gui03 = '#676E95' +let s:gui04 = '#8796B0' +let s:gui05 = '#959DCB' +let s:gui06 = '#959DCB' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#F07178' +let s:gui09 = '#F78C6C' +let s:gui0A = '#FFCB6B' +let s:gui0B = '#C3E88D' +let s:gui0C = '#89DDFF' +let s:gui0D = '#82AAFF' +let s:gui0E = '#C792EA' +let s:gui0F = '#FF5370' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_vivid.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_vivid.vim new file mode 100644 index 0000000..5bc3c15 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_material_vivid.vim @@ -0,0 +1,85 @@ +" Base16 Material Vivid vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By joshyrobot + +let s:scheme_slug = substitute("material-vivid", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#202124' +let s:gui01 = '#27292c' +let s:gui02 = '#323639' +let s:gui03 = '#44464d' +let s:gui04 = '#676c71' +let s:gui05 = '#80868b' +let s:gui06 = '#9e9e9e' +let s:gui07 = '#ffffff' +let s:gui08 = '#f44336' +let s:gui09 = '#ff9800' +let s:gui0A = '#ffeb3b' +let s:gui0B = '#00e676' +let s:gui0C = '#00bcd4' +let s:gui0D = '#2196f3' +let s:gui0E = '#673ab7' +let s:gui0F = '#8d6e63' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mellow_purple.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mellow_purple.vim new file mode 100644 index 0000000..d0c7a3b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mellow_purple.vim @@ -0,0 +1,85 @@ +" Base16 Mellow Purple vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By gidsi + +let s:scheme_slug = substitute("mellow-purple", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1e0528' +let s:gui01 = '#1A092D' +let s:gui02 = '#331354' +let s:gui03 = '#320f55' +let s:gui04 = '#873582' +let s:gui05 = '#ffeeff' +let s:gui06 = '#ffeeff' +let s:gui07 = '#f8c0ff' +let s:gui08 = '#00d9e9' +let s:gui09 = '#aa00a3' +let s:gui0A = '#955ae7' +let s:gui0B = '#05cb0d' +let s:gui0C = '#b900b1' +let s:gui0D = '#550068' +let s:gui0E = '#8991bb' +let s:gui0F = '#4d6fff' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mexico_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mexico_light.vim new file mode 100644 index 0000000..78354fb --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mexico_light.vim @@ -0,0 +1,85 @@ +" Base16 Mexico Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Sheldon Johnson + +let s:scheme_slug = substitute("mexico-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#f8f8f8' +let s:gui01 = '#e8e8e8' +let s:gui02 = '#d8d8d8' +let s:gui03 = '#b8b8b8' +let s:gui04 = '#585858' +let s:gui05 = '#383838' +let s:gui06 = '#282828' +let s:gui07 = '#181818' +let s:gui08 = '#ab4642' +let s:gui09 = '#dc9656' +let s:gui0A = '#f79a0e' +let s:gui0B = '#538947' +let s:gui0C = '#4b8093' +let s:gui0D = '#7cafc2' +let s:gui0E = '#96609e' +let s:gui0F = '#a16946' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim new file mode 100644 index 0000000..1097c95 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_mocha.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Mocha Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_mocha#palette = {} +let s:gui00 = "#3B3228" +let s:gui01 = "#534636" +let s:gui02 = "#645240" +let s:gui03 = "#7e705a" +let s:gui04 = "#b8afad" +let s:gui05 = "#d0c8c6" +let s:gui06 = "#e9e1dd" +let s:gui07 = "#f5eeeb" +let s:gui08 = "#cb6077" +let s:gui09 = "#d28b71" +let s:gui0A = "#f4bc87" +let s:gui0B = "#beb55b" +let s:gui0C = "#7bbda4" +let s:gui0D = "#8ab3b5" +let s:gui0E = "#a89bb9" +let s:gui0F = "#bb9584" + +let s:cterm00 = 58 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 188 +let s:cterm07 = 230 +let s:cterm08 = 168 +let s:cterm09 = 173 +let s:cterm0A = 216 +let s:cterm0B = 143 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 138 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_mocha#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_mocha#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim new file mode 100644 index 0000000..fe1b774 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_monokai.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Monokai Scheme by Wimer Hazenberg (http://www.monokai.nl) +let g:airline#themes#base16_monokai#palette = {} +let s:gui00 = "#272822" +let s:gui01 = "#383830" +let s:gui02 = "#49483e" +let s:gui03 = "#75715e" +let s:gui04 = "#a59f85" +let s:gui05 = "#f8f8f2" +let s:gui06 = "#f5f4f1" +let s:gui07 = "#f9f8f5" +let s:gui08 = "#f92672" +let s:gui09 = "#fd971f" +let s:gui0A = "#f4bf75" +let s:gui0B = "#a6e22e" +let s:gui0C = "#a1efe4" +let s:gui0D = "#66d9ef" +let s:gui0E = "#ae81ff" +let s:gui0F = "#cc6633" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 144 +let s:cterm05 = 15 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 197 +let s:cterm09 = 208 +let s:cterm0A = 216 +let s:cterm0B = 3 +let s:cterm0C = 158 +let s:cterm0D = 81 +let s:cterm0E = 141 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_monokai#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_monokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nord.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nord.vim new file mode 100644 index 0000000..78e8c11 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nord.vim @@ -0,0 +1,75 @@ +" vim-airline theme by gretzky (https://github.com/gretzky) +" nord scheme by arcticstudio +" (https://github.com/arcticicestudio/nord) +" base 16 from (https://github.com/ada-lovecraft/base16-nord-scheme/blob/master/nord.yaml) +let g:airline#themes#base16_nord#palette = {} +let s:gui00 = "#2e3440" +let s:gui01 = "#3b4252" +let s:gui02 = "#434c5e" +let s:gui03 = "#4c566a" +let s:gui04 = "#d8dee9" +let s:gui05 = "#e5e9f0" +let s:gui06 = "#eceff4" +let s:gui07 = "#8fbcbb" +let s:gui08 = "#88c0d0" +let s:gui09 = "#81a1c1" +let s:gui0A = "#5e81ac" +let s:gui0B = "#bf616a" +let s:gui0C = "#d08770" +let s:gui0D = "#ebcb8b" +let s:gui0E = "#a3be8c" +let s:gui0F = "#b48ead" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 203 +let s:cterm0A = 214 +let s:cterm0B = 29 +let s:cterm0C = 12 +let s:cterm0D = 12 +let s:cterm0E = 134 +let s:cterm0F = 12 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_nord#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_nord#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_nord#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_nord#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_nord#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_nord#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nova.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nova.vim new file mode 100644 index 0000000..c1e5f86 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_nova.vim @@ -0,0 +1,85 @@ +" Base16 Nova vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By George Essig (https://github.com/gessig), Trevor D. Miller (https://trevordmiller.com) + +let s:scheme_slug = substitute("nova", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#3C4C55' +let s:gui01 = '#556873' +let s:gui02 = '#6A7D89' +let s:gui03 = '#899BA6' +let s:gui04 = '#899BA6' +let s:gui05 = '#C5D4DD' +let s:gui06 = '#899BA6' +let s:gui07 = '#556873' +let s:gui08 = '#83AFE5' +let s:gui09 = '#7FC1CA' +let s:gui0A = '#A8CE93' +let s:gui0B = '#7FC1CA' +let s:gui0C = '#F2C38F' +let s:gui0D = '#83AFE5' +let s:gui0E = '#9A93E1' +let s:gui0F = '#F2C38F' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim new file mode 100644 index 0000000..b1a76dd --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_ocean.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Ocean Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_ocean#palette = {} +let s:gui00 = "#2b303b" +let s:gui01 = "#343d46" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#dfe1e8" +let s:gui07 = "#eff1f5" +let s:gui08 = "#bf616a" +let s:gui09 = "#d08770" +let s:gui0A = "#ebcb8b" +let s:gui0B = "#a3be8c" +let s:gui0C = "#96b5b4" +let s:gui0D = "#8fa1b3" +let s:gui0E = "#b48ead" +let s:gui0F = "#ab7967" + +let s:cterm00 = 23 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 60 +let s:cterm04 = 145 +let s:cterm05 = 152 +let s:cterm06 = 188 +let s:cterm07 = 15 +let s:cterm08 = 131 +let s:cterm09 = 173 +let s:cterm0A = 186 +let s:cterm0B = 144 +let s:cterm0C = 109 +let s:cterm0D = 109 +let s:cterm0E = 139 +let s:cterm0F = 137 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_ocean#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_ocean#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim new file mode 100644 index 0000000..c5e9edf --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_oceanicnext.vim @@ -0,0 +1,83 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Oceanic Next Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_oceanicnext#palette = {} +let s:gui00 = "#1b2b34" +let s:gui01 = "#343d46" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#ec5f67" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#99c794" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#6699cc" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +" Terminal color definitions +let s:cterm00 = 00 +let s:cterm03 = 08 +let s:cterm05 = 07 +let s:cterm07 = 15 +let s:cterm08 = 01 +let s:cterm0A = 03 +let s:cterm0B = 02 +let s:cterm0C = 06 +let s:cterm0D = 04 +let s:cterm0E = 05 +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = 18 + let s:cterm02 = 19 + let s:cterm04 = 20 + let s:cterm06 = 21 + let s:cterm09 = 16 + let s:cterm0F = 17 +else + let s:cterm01 = 10 + let s:cterm02 = 11 + let s:cterm04 = 12 + let s:cterm06 = 13 + let s:cterm09 = 09 + let s:cterm0F = 14 +endif + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_oceanicnext#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_oceanicnext#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_one_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_one_light.vim new file mode 100644 index 0000000..dfe46c6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_one_light.vim @@ -0,0 +1,85 @@ +" Base16 One Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Daniel Pfeifer (http://github.com/purpleKarrot) + +let s:scheme_slug = substitute("one-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fafafa' +let s:gui01 = '#f0f0f1' +let s:gui02 = '#e5e5e6' +let s:gui03 = '#a0a1a7' +let s:gui04 = '#696c77' +let s:gui05 = '#383a42' +let s:gui06 = '#202227' +let s:gui07 = '#090a0b' +let s:gui08 = '#ca1243' +let s:gui09 = '#d75f00' +let s:gui0A = '#c18401' +let s:gui0B = '#50a14f' +let s:gui0C = '#0184bc' +let s:gui0D = '#4078f2' +let s:gui0E = '#a626a4' +let s:gui0F = '#986801' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_onedark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_onedark.vim new file mode 100644 index 0000000..8543031 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_onedark.vim @@ -0,0 +1,85 @@ +" Base16 OneDark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Lalit Magant (http://github.com/tilal6991) + +let s:scheme_slug = substitute("onedark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#282c34' +let s:gui01 = '#353b45' +let s:gui02 = '#3e4451' +let s:gui03 = '#545862' +let s:gui04 = '#565c64' +let s:gui05 = '#abb2bf' +let s:gui06 = '#b6bdca' +let s:gui07 = '#c8ccd4' +let s:gui08 = '#e06c75' +let s:gui09 = '#d19a66' +let s:gui0A = '#e5c07b' +let s:gui0B = '#98c379' +let s:gui0C = '#56b6c2' +let s:gui0D = '#61afef' +let s:gui0E = '#c678dd' +let s:gui0F = '#be5046' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_outrun_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_outrun_dark.vim new file mode 100644 index 0000000..405b5d8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_outrun_dark.vim @@ -0,0 +1,85 @@ +" Base16 Outrun Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Hugo Delahousse (http://github.com/hugodelahousse/) + +let s:scheme_slug = substitute("outrun-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#00002A' +let s:gui01 = '#20204A' +let s:gui02 = '#30305A' +let s:gui03 = '#50507A' +let s:gui04 = '#B0B0DA' +let s:gui05 = '#D0D0FA' +let s:gui06 = '#E0E0FF' +let s:gui07 = '#F5F5FF' +let s:gui08 = '#FF4242' +let s:gui09 = '#FC8D28' +let s:gui0A = '#F3E877' +let s:gui0B = '#59F176' +let s:gui0C = '#0EF0F0' +let s:gui0D = '#66B0FF' +let s:gui0E = '#F10596' +let s:gui0F = '#F003EF' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_dark.vim new file mode 100644 index 0000000..9230677 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_dark.vim @@ -0,0 +1,85 @@ +" Base16 PaperColor Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jon Leopard (http://github.com/jonleopard) based on PaperColor Theme (https://github.com/NLKNguyen/papercolor-theme) + +let s:scheme_slug = substitute("papercolor-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1c1c1c' +let s:gui01 = '#af005f' +let s:gui02 = '#5faf00' +let s:gui03 = '#d7af5f' +let s:gui04 = '#5fafd7' +let s:gui05 = '#808080' +let s:gui06 = '#d7875f' +let s:gui07 = '#d0d0d0' +let s:gui08 = '#585858' +let s:gui09 = '#5faf5f' +let s:gui0A = '#afd700' +let s:gui0B = '#af87d7' +let s:gui0C = '#ffaf00' +let s:gui0D = '#ff5faf' +let s:gui0E = '#00afaf' +let s:gui0F = '#5f8787' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_light.vim new file mode 100644 index 0000000..3d7f3ac --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_papercolor_light.vim @@ -0,0 +1,85 @@ +" Base16 PaperColor Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jon Leopard (http://github.com/jonleopard) based on PaperColor Theme (https://github.com/NLKNguyen/papercolor-theme) + +let s:scheme_slug = substitute("papercolor-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#eeeeee' +let s:gui01 = '#af0000' +let s:gui02 = '#008700' +let s:gui03 = '#5f8700' +let s:gui04 = '#0087af' +let s:gui05 = '#878787' +let s:gui06 = '#005f87' +let s:gui07 = '#444444' +let s:gui08 = '#bcbcbc' +let s:gui09 = '#d70000' +let s:gui0A = '#d70087' +let s:gui0B = '#8700af' +let s:gui0C = '#d75f00' +let s:gui0D = '#d75f00' +let s:gui0E = '#005faf' +let s:gui0F = '#005f87' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim new file mode 100644 index 0000000..1277b31 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_paraiso.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Paraiso Scheme by Jan T. Sott +let g:airline#themes#base16_paraiso#palette = {} +let s:gui00 = "#2f1e2e" +let s:gui01 = "#41323f" +let s:gui02 = "#4f424c" +let s:gui03 = "#776e71" +let s:gui04 = "#8d8687" +let s:gui05 = "#a39e9b" +let s:gui06 = "#b9b6b0" +let s:gui07 = "#e7e9db" +let s:gui08 = "#ef6155" +let s:gui09 = "#f99b15" +let s:gui0A = "#fec418" +let s:gui0B = "#48b685" +let s:gui0C = "#5bc4bf" +let s:gui0D = "#06b6ef" +let s:gui0E = "#815ba4" +let s:gui0F = "#e96ba8" + +let s:cterm00 = 0 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 95 +let s:cterm04 = 102 +let s:cterm05 = 144 +let s:cterm06 = 145 +let s:cterm07 = 188 +let s:cterm08 = 203 +let s:cterm09 = 208 +let s:cterm0A = 220 +let s:cterm0B = 72 +let s:cterm0C = 79 +let s:cterm0D = 39 +let s:cterm0E = 97 +let s:cterm0F = 169 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_paraiso#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_paraiso#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_phd.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_phd.vim new file mode 100644 index 0000000..f72b5c7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_phd.vim @@ -0,0 +1,85 @@ +" Base16 PhD vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Hennig Hasemann (http://leetless.de/vim.html) + +let s:scheme_slug = substitute("phd", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#061229' +let s:gui01 = '#2a3448' +let s:gui02 = '#4d5666' +let s:gui03 = '#717885' +let s:gui04 = '#9a99a3' +let s:gui05 = '#b8bbc2' +let s:gui06 = '#dbdde0' +let s:gui07 = '#ffffff' +let s:gui08 = '#d07346' +let s:gui09 = '#f0a000' +let s:gui0A = '#fbd461' +let s:gui0B = '#99bf52' +let s:gui0C = '#72b9bf' +let s:gui0D = '#5299bf' +let s:gui0E = '#9989cc' +let s:gui0F = '#b08060' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pico.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pico.vim new file mode 100644 index 0000000..2ad8dde --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pico.vim @@ -0,0 +1,85 @@ +" Base16 Pico vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By PICO-8 (http://www.lexaloffle.com/pico-8.php) + +let s:scheme_slug = substitute("pico", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#000000' +let s:gui01 = '#1d2b53' +let s:gui02 = '#7e2553' +let s:gui03 = '#008751' +let s:gui04 = '#ab5236' +let s:gui05 = '#5f574f' +let s:gui06 = '#c2c3c7' +let s:gui07 = '#fff1e8' +let s:gui08 = '#ff004d' +let s:gui09 = '#ffa300' +let s:gui0A = '#fff024' +let s:gui0B = '#00e756' +let s:gui0C = '#29adff' +let s:gui0D = '#83769c' +let s:gui0E = '#ff77a8' +let s:gui0F = '#ffccaa' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim new file mode 100644 index 0000000..0888703 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_pop.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Pop Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_pop#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#b0b0b0" +let s:gui05 = "#d0d0d0" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#eb008a" +let s:gui09 = "#f29333" +let s:gui0A = "#f8ca12" +let s:gui0B = "#37b349" +let s:gui0C = "#00aabb" +let s:gui0D = "#0e5a94" +let s:gui0E = "#b31e8d" +let s:gui0F = "#7a2d00" + +let s:cterm00 = 0 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 162 +let s:cterm09 = 209 +let s:cterm0A = 220 +let s:cterm0B = 71 +let s:cterm0C = 37 +let s:cterm0D = 24 +let s:cterm0E = 126 +let s:cterm0F = 88 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_pop#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_pop#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_pop#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_porple.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_porple.vim new file mode 100644 index 0000000..7e05abc --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_porple.vim @@ -0,0 +1,85 @@ +" Base16 Porple vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Niek den Breeje (https://github.com/AuditeMarlow) + +let s:scheme_slug = substitute("porple", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#292c36' +let s:gui01 = '#333344' +let s:gui02 = '#474160' +let s:gui03 = '#65568a' +let s:gui04 = '#b8b8b8' +let s:gui05 = '#d8d8d8' +let s:gui06 = '#e8e8e8' +let s:gui07 = '#f8f8f8' +let s:gui08 = '#f84547' +let s:gui09 = '#d28e5d' +let s:gui0A = '#efa16b' +let s:gui0B = '#95c76f' +let s:gui0C = '#64878f' +let s:gui0D = '#8485ce' +let s:gui0E = '#b74989' +let s:gui0F = '#986841' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim new file mode 100644 index 0000000..771a5b1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_railscasts.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Railscasts Scheme by Ryan Bates (http://railscasts.com) +let g:airline#themes#base16_railscasts#palette = {} +let s:gui00 = "#2b2b2b" +let s:gui01 = "#272935" +let s:gui02 = "#3a4055" +let s:gui03 = "#5a647e" +let s:gui04 = "#d4cfc9" +let s:gui05 = "#e6e1dc" +let s:gui06 = "#f4f1ed" +let s:gui07 = "#f9f7f3" +let s:gui08 = "#da4939" +let s:gui09 = "#cc7833" +let s:gui0A = "#ffc66d" +let s:gui0B = "#a5c261" +let s:gui0C = "#519f50" +let s:gui0D = "#6d9cbe" +let s:gui0E = "#b6b3eb" +let s:gui0F = "#bc9458" + +let s:cterm00 = 235 +let s:cterm01 = 17 +let s:cterm02 = 59 +let s:cterm03 = 60 +let s:cterm04 = 188 +let s:cterm05 = 188 +let s:cterm06 = 15 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 173 +let s:cterm0A = 221 +let s:cterm0B = 143 +let s:cterm0C = 71 +let s:cterm0D = 73 +let s:cterm0E = 146 +let s:cterm0F = 137 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_railscasts#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_railscasts#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_rebecca.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_rebecca.vim new file mode 100644 index 0000000..6872851 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_rebecca.vim @@ -0,0 +1,85 @@ +" Base16 Rebecca vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Victor Borja (http://github.com/vic) based on Rebecca Theme (http://github.com/vic/rebecca-theme) + +let s:scheme_slug = substitute("rebecca", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#292a44' +let s:gui01 = '#663399' +let s:gui02 = '#383a62' +let s:gui03 = '#666699' +let s:gui04 = '#a0a0c5' +let s:gui05 = '#f1eff8' +let s:gui06 = '#ccccff' +let s:gui07 = '#53495d' +let s:gui08 = '#a0a0c5' +let s:gui09 = '#efe4a1' +let s:gui0A = '#ae81ff' +let s:gui0B = '#6dfedf' +let s:gui0C = '#8eaee0' +let s:gui0D = '#2de0a7' +let s:gui0E = '#7aa5ff' +let s:gui0F = '#ff79c6' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_sandcastle.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_sandcastle.vim new file mode 100644 index 0000000..daaf7f6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_sandcastle.vim @@ -0,0 +1,85 @@ +" Base16 Sandcastle vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By George Essig (https://github.com/gessig) + +let s:scheme_slug = substitute("sandcastle", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#282c34' +let s:gui01 = '#2c323b' +let s:gui02 = '#3e4451' +let s:gui03 = '#665c54' +let s:gui04 = '#928374' +let s:gui05 = '#a89984' +let s:gui06 = '#d5c4a1' +let s:gui07 = '#fdf4c1' +let s:gui08 = '#83a598' +let s:gui09 = '#a07e3b' +let s:gui0A = '#a07e3b' +let s:gui0B = '#528b8b' +let s:gui0C = '#83a598' +let s:gui0D = '#83a598' +let s:gui0E = '#d75f5f' +let s:gui0F = '#a87322' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim new file mode 100644 index 0000000..5d7af21 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_seti.vim @@ -0,0 +1,77 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base16 Seti UI by + +let g:airline#themes#base16_seti#palette = {} +let s:gui00 = "#151718" +let s:gui01 = "#282a2b" +let s:gui02 = "#3B758C" +let s:gui03 = "#41535B" +let s:gui04 = "#43a5d5" +let s:gui05 = "#d6d6d6" +let s:gui06 = "#eeeeee" +let s:gui07 = "#ffffff" +let s:gui08 = "#Cd3f45" +let s:gui09 = "#db7b55" +let s:gui0A = "#e6cd69" +let s:gui0B = "#9fca56" +let s:gui0C = "#55dbbe" +let s:gui0D = "#55b5db" +let s:gui0E = "#a074c4" +let s:gui0F = "#8a553f" + + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_seti#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_seti#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_seti#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim new file mode 100644 index 0000000..a518265 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shapeshifter.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 shapeshifter Scheme by Tyler Benziger (http://tybenz.com) +let g:airline#themes#base16_shapeshifter#palette = {} +let s:gui00 = "#000000" +let s:gui01 = "#040404" +let s:gui02 = "#102015" +let s:gui03 = "#343434" +let s:gui04 = "#555555" +let s:gui05 = "#ababab" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#f9f9f9" +let s:gui08 = "#e92f2f" +let s:gui09 = "#e09448" +let s:gui0A = "#dddd13" +let s:gui0B = "#0ed839" +let s:gui0C = "#23edda" +let s:gui0D = "#3b48e3" +let s:gui0E = "#f996e2" +let s:gui0F = "#69542d" + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 0 +let s:cterm03 = 236 +let s:cterm04 = 240 +let s:cterm05 = 248 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 173 +let s:cterm0A = 3 +let s:cterm0B = 41 +let s:cterm0C = 50 +let s:cterm0D = 12 +let s:cterm0E = 212 +let s:cterm0F = 58 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_shapeshifter#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_shapeshifter#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim new file mode 100644 index 0000000..fdcb7f1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_shell.vim @@ -0,0 +1,10 @@ +" This theme has been improved and renamed to base16_vim. The following is +" provided for backward compatibility. + +function! airline#themes#base16_shell#refresh() + call airline#themes#base16_vim#refresh() + let g:airline#themes#base16_shell#palette + \ = g:airline#themes#base16_vim#palette +endfunction + +call airline#themes#base16_shell#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_snazzy.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_snazzy.vim new file mode 100644 index 0000000..76704ed --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_snazzy.vim @@ -0,0 +1,121 @@ +" base16-snazzy +" theme format modified from wombat +" colors from sindresorhus/hyper-snazzy & h404bi/base16-snazzy-scheme/ +" Made by Ayush Shenoy (masala-man) +" +" BASE16-SNAZZY XTERM +let s:base00 = '#282a36' "236 +let s:base01 = '#34353e' "237 +let s:base02 = '#43454f' "238 +let s:base03 = '#78787e' "244 +let s:base04 = '#a5a5a9' "248 +let s:base05 = '#e2e4e5' "254 +let s:base06 = '#eff0eb' "255 +let s:base07 = '#f1f1f0' "15 +let s:base08 = '#ff5c57' "203 +let s:base09 = '#ff9f43' "215 +let s:base0A = '#f3f99d' "229 +let s:base0B = '#5af78e' "84 +let s:base0C = '#9aedfe' "123 +let s:base0D = '#57c7ff' "81 +let s:base0E = '#ff6ac1' "205 +let s:base0F = '#b2643c' "131 + +" Normal mode +" [ guifg , guibg , ctermfg , ctermbg , opts ] +let s:N1 = [ s:base00 , s:base0D , 235 , 81 ] " [ color of body and line-info ] +let s:N2 = [ s:base0D , s:base00 , 81 , 235 ] " [ diffcount and file-info ] +let s:N3 = [ s:base0D , s:base00 , 81 , 235 ] " [ filename ] +let s:N4 = [ s:base0D , 81 ] " [ buffer modified ] + +" Insert mode +let s:I1 = [ s:base00 , s:base0B , 235 , 84 ] +let s:I2 = [ s:base0B , s:base00 , 84 , 235 ] +let s:I3 = [ s:base0B , s:base00 , 84 , 235 ] +let s:I4 = [ s:base0B , 84 ] + +" Visual mode +let s:V1 = [ s:base00 , s:base0A , 235 , 229 ] +let s:V2 = [ s:base0A , s:base00 , 229 , 235 ] +let s:V3 = [ s:base0A , s:base00 , 229 , 235 ] +let s:V4 = [ s:base0A , 229 ] + +" Replace mode +let s:R1 = [ s:base00 , s:base08 , 235 , 203 ] +let s:R2 = [ s:base08 , s:base00 , 203 , 235 ] +let s:R3 = [ s:base08 , s:base00 , 203 , 235 ] +let s:R4 = [ s:base08 , 203 ] + +" Paste mode +let s:PA = [ s:base0B , 84 ] + +" Info modified +let s:IM = [ s:base00 , 235 ] + +" Inactive mode +let s:IA = [ '' , s:N3[1] , 244 , 235 , '' ] " [ color of bar on inactive splits ] + +let g:airline#themes#base16_snazzy#palette = {} + +let g:airline#themes#base16_snazzy#palette.accents = { + \ 'red': [ s:base08 , '' , 203 , '' , '' ] + \ } + +let ER = [ s:base00 , s:base08 , 235 , 203 ] " [ error color ] +let WI = [ s:base00 , s:base0A , 235 , 229 ] " [ warning color ] + +let g:airline#themes#base16_snazzy#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#base16_snazzy#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + +let g:airline#themes#base16_snazzy#palette.normal.airline_error = ER +let g:airline#themes#base16_snazzy#palette.normal.airline_warning = WI +let g:airline#themes#base16_snazzy#palette.normal_modified.airline_error = ER +let g:airline#themes#base16_snazzy#palette.normal_modified.airline_warning = WI + +let g:airline#themes#base16_snazzy#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#base16_snazzy#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + +let g:airline#themes#base16_snazzy#palette.insert.airline_error = ER +let g:airline#themes#base16_snazzy#palette.insert.airline_warning = WI +let g:airline#themes#base16_snazzy#palette.insert_modified.airline_error = ER +let g:airline#themes#base16_snazzy#palette.insert_modified.airline_warning = WI + +let g:airline#themes#base16_snazzy#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#base16_snazzy#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + +let g:airline#themes#base16_snazzy#palette.visual.airline_error = ER +let g:airline#themes#base16_snazzy#palette.visual.airline_warning = WI +let g:airline#themes#base16_snazzy#palette.visual_modified.airline_error = ER +let g:airline#themes#base16_snazzy#palette.visual_modified.airline_warning = WI + +let g:airline#themes#base16_snazzy#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#base16_snazzy#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + +let g:airline#themes#base16_snazzy#palette.replace.airline_error = ER +let g:airline#themes#base16_snazzy#palette.replace.airline_warning = WI +let g:airline#themes#base16_snazzy#palette.replace_modified.airline_error = ER +let g:airline#themes#base16_snazzy#palette.replace_modified.airline_warning = WI + +let g:airline#themes#base16_snazzy#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + +let g:airline#themes#base16_snazzy#palette.insert_paste.airline_error = ER +let g:airline#themes#base16_snazzy#palette.insert_paste.airline_warning = WI + +let g:airline#themes#base16_snazzy#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#base16_snazzy#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarflare.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarflare.vim new file mode 100644 index 0000000..47e20ef --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarflare.vim @@ -0,0 +1,85 @@ +" Base16 Solar Flare vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chuck Harmston (https://chuck.harmston.ch) + +let s:scheme_slug = substitute("solarflare", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#18262F' +let s:gui01 = '#222E38' +let s:gui02 = '#586875' +let s:gui03 = '#667581' +let s:gui04 = '#85939E' +let s:gui05 = '#A6AFB8' +let s:gui06 = '#E8E9ED' +let s:gui07 = '#F5F7FA' +let s:gui08 = '#EF5253' +let s:gui09 = '#E66B2B' +let s:gui0A = '#E4B51C' +let s:gui0B = '#7CC844' +let s:gui0C = '#52CBB0' +let s:gui0D = '#33B5E1' +let s:gui0E = '#A363D5' +let s:gui0F = '#D73C9A' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim new file mode 100644 index 0000000..81edd56 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Solarized Scheme by Ethan Schoonover (http://ethanschoonover.com/solarized) +let g:airline#themes#base16_solarized#palette = {} +let s:gui00 = "#002b36" +let s:gui01 = "#073642" +let s:gui02 = "#586e75" +let s:gui03 = "#657b83" +let s:gui04 = "#839496" +let s:gui05 = "#93a1a1" +let s:gui06 = "#eee8d5" +let s:gui07 = "#fdf6e3" +let s:gui08 = "#dc322f" +let s:gui09 = "#cb4b16" +let s:gui0A = "#b58900" +let s:gui0B = "#859900" +let s:gui0C = "#2aa198" +let s:gui0D = "#268bd2" +let s:gui0E = "#6c71c4" +let s:gui0F = "#d33682" + +let s:cterm00 = 17 +let s:cterm01 = 23 +let s:cterm02 = 60 +let s:cterm03 = 66 +let s:cterm04 = 102 +let s:cterm05 = 109 +let s:cterm06 = 224 +let s:cterm07 = 230 +let s:cterm08 = 166 +let s:cterm09 = 166 +let s:cterm0A = 136 +let s:cterm0B = 100 +let s:cterm0C = 36 +let s:cterm0D = 32 +let s:cterm0E = 12 +let s:cterm0F = 168 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_solarized#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_solarized#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_dark.vim new file mode 100644 index 0000000..bbf1560 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_dark.vim @@ -0,0 +1,85 @@ +" Base16 Solarized Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Ethan Schoonover (modified by aramisgithub) + +let s:scheme_slug = substitute("solarized-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#002b36' +let s:gui01 = '#073642' +let s:gui02 = '#586e75' +let s:gui03 = '#657b83' +let s:gui04 = '#839496' +let s:gui05 = '#93a1a1' +let s:gui06 = '#eee8d5' +let s:gui07 = '#fdf6e3' +let s:gui08 = '#dc322f' +let s:gui09 = '#cb4b16' +let s:gui0A = '#b58900' +let s:gui0B = '#859900' +let s:gui0C = '#2aa198' +let s:gui0D = '#268bd2' +let s:gui0E = '#6c71c4' +let s:gui0F = '#d33682' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_light.vim new file mode 100644 index 0000000..9d28664 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_solarized_light.vim @@ -0,0 +1,85 @@ +" Base16 Solarized Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Ethan Schoonover (modified by aramisgithub) + +let s:scheme_slug = substitute("solarized-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#fdf6e3' +let s:gui01 = '#eee8d5' +let s:gui02 = '#93a1a1' +let s:gui03 = '#839496' +let s:gui04 = '#657b83' +let s:gui05 = '#586e75' +let s:gui06 = '#073642' +let s:gui07 = '#002b36' +let s:gui08 = '#dc322f' +let s:gui09 = '#cb4b16' +let s:gui0A = '#b58900' +let s:gui0B = '#859900' +let s:gui0C = '#2aa198' +let s:gui0D = '#268bd2' +let s:gui0E = '#6c71c4' +let s:gui0F = '#d33682' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim new file mode 100644 index 0000000..4c04bd1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_spacemacs.vim @@ -0,0 +1,191 @@ +" vim-airline base16-spacemacs theme by Peter Meehan (http://github.com/22a) +" Base16 Spacemacs by Chris Kempson (http://chriskempson.com) +" Spacemacs scheme by Nasser Alshammari (https://github.com/nashamri/spacemacs-theme) + +let s:gui00 = "#1f2022" +let s:gui01 = "#282828" +let s:gui02 = "#444155" +let s:gui03 = "#585858" +let s:gui04 = "#b8b8b8" +let s:gui05 = "#a3a3a3" +let s:gui06 = "#e8e8e8" +let s:gui07 = "#f8f8f8" +let s:gui08 = "#f2241f" +let s:gui09 = "#ffa500" +let s:gui0A = "#b1951d" +let s:gui0B = "#67b11d" +let s:gui0C = "#2d9574" +let s:gui0D = "#4f97d7" +let s:gui0E = "#a31db1" +let s:gui0F = "#b03060" + +let s:cterm00 = 0 +let s:cterm01 = 18 +let s:cterm02 = 19 +let s:cterm03 = 8 +let s:cterm04 = 20 +let s:cterm05 = 7 +let s:cterm06 = 21 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm09 = 16 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +let s:cterm0F = 17 + +let g:airline#themes#base16_spacemacs#palette = {} + +" Background for branch and file format blocks +let s:cterm_termbg = s:cterm02 +let s:gui_termbg = s:gui02 +" Foreground for branch and file format blocks +let s:cterm_termfg = s:cterm06 +let s:gui_termfg = s:gui06 + + +" Background for middle block +let s:cterm_termbg2 = s:cterm00 +let s:gui_termbg2 = s:gui00 +" Foreground for middle block +let s:cterm_termfg2 = s:cterm06 +let s:gui_termfg2 = s:gui06 + + +" Background for normal mode and file position blocks +let s:cterm_normalbg = s:cterm0D +let s:gui_normalbg = s:gui0D +" Foreground for normal mode and file position blocks +let s:cterm_normalfg = s:cterm07 +let s:gui_normalfg = s:gui07 + + +" Background for insert mode and file position blocks +let s:cterm_insertbg = s:cterm0B +let s:gui_insertbg = s:gui0B +" Foreground for insert mode and file position blocks +let s:cterm_insertfg = s:cterm07 +let s:gui_insertfg = s:gui07 + + +" Background for visual mode and file position blocks +let s:cterm_visualbg = s:cterm09 +let s:gui_visualbg = s:gui09 +" Foreground for visual mode and file position blocks +let s:cterm_visualfg = s:cterm07 +let s:gui_visualfg = s:gui07 + + +" Background for replace mode and file position blocks +let s:cterm_replacebg = s:cterm08 +let s:gui_replacebg = s:gui08 +" Foreground for replace mode and file position blocks +let s:cterm_replacefg = s:cterm07 +let s:gui_replacefg = s:gui07 + + +" Background for inactive mode +let s:cterm_inactivebg = s:cterm02 +let s:gui_inactivebg = s:gui02 +" Foreground for inactive mode +let s:cterm_inactivefg = s:cterm04 +let s:gui_inactivefg = s:gui04 + + +" Branch and file format +let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks + +" Normal mode +let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode +let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2) +let g:airline#themes#base16_spacemacs#palette.normal_modified = g:airline#themes#base16_spacemacs#palette.normal + +" Insert mode +let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode +let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2) +let g:airline#themes#base16_spacemacs#palette.insert_modified = g:airline#themes#base16_spacemacs#palette.insert + +" Replace mode +let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode +let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2) +let g:airline#themes#base16_spacemacs#palette.replace_modified = g:airline#themes#base16_spacemacs#palette.replace + +" Visual mode +let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode +let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block +let g:airline#themes#base16_spacemacs#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2) +let g:airline#themes#base16_spacemacs#palette.visual_modified = g:airline#themes#base16_spacemacs#palette.visual + +" Inactive mode +let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let g:airline#themes#base16_spacemacs#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Warnings +let s:WI = [s:gui07, s:gui09, s:cterm07, s:cterm09] +let g:airline#themes#base16_spacemacs#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#base16_spacemacs#palette.normal_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.insert.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.insert_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.visual.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.visual_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.replace.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +let g:airline#themes#base16_spacemacs#palette.replace_modified.airline_warning = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_warning + +" Errors +let s:ER = [s:gui07, s:gui08, s:cterm07, s:cterm08] +let g:airline#themes#base16_spacemacs#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + +let g:airline#themes#base16_spacemacs#palette.normal_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.insert.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.insert_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.visual.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.visual_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.replace.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +let g:airline#themes#base16_spacemacs#palette.replace_modified.airline_error = + \ g:airline#themes#base16_spacemacs#palette.normal.airline_error + +" CtrlP plugin colors +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_spacemacs#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''], + \ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''], + \ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold']) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim new file mode 100644 index 0000000..4bafd59 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Summerfruit Scheme by Christopher Corley (http://cscorley.github.io/) +let g:airline#themes#base16_summerfruit#palette = {} +let s:gui00 = "#151515" +let s:gui01 = "#202020" +let s:gui02 = "#303030" +let s:gui03 = "#505050" +let s:gui04 = "#B0B0B0" +let s:gui05 = "#D0D0D0" +let s:gui06 = "#E0E0E0" +let s:gui07 = "#FFFFFF" +let s:gui08 = "#FF0086" +let s:gui09 = "#FD8900" +let s:gui0A = "#ABA800" +let s:gui0B = "#00C918" +let s:gui0C = "#1faaaa" +let s:gui0D = "#3777E6" +let s:gui0E = "#AD00A1" +let s:gui0F = "#cc6633" + +let s:cterm00 = 233 +let s:cterm01 = 234 +let s:cterm02 = 236 +let s:cterm03 = 239 +let s:cterm04 = 249 +let s:cterm05 = 252 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 198 +let s:cterm09 = 208 +let s:cterm0A = 142 +let s:cterm0B = 2 +let s:cterm0C = 37 +let s:cterm0D = 68 +let s:cterm0E = 127 +let s:cterm0F = 167 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_summerfruit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_summerfruit#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_dark.vim new file mode 100644 index 0000000..9a4a8d3 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_dark.vim @@ -0,0 +1,85 @@ +" Base16 Summerfruit Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Christopher Corley (http://christop.club/) + +let s:scheme_slug = substitute("summerfruit-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#151515' +let s:gui01 = '#202020' +let s:gui02 = '#303030' +let s:gui03 = '#505050' +let s:gui04 = '#B0B0B0' +let s:gui05 = '#D0D0D0' +let s:gui06 = '#E0E0E0' +let s:gui07 = '#FFFFFF' +let s:gui08 = '#FF0086' +let s:gui09 = '#FD8900' +let s:gui0A = '#ABA800' +let s:gui0B = '#00C918' +let s:gui0C = '#1FAAAA' +let s:gui0D = '#3777E6' +let s:gui0E = '#AD00A1' +let s:gui0F = '#CC6633' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_light.vim new file mode 100644 index 0000000..c7b3ba0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_summerfruit_light.vim @@ -0,0 +1,85 @@ +" Base16 Summerfruit Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Christopher Corley (http://christop.club/) + +let s:scheme_slug = substitute("summerfruit-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#FFFFFF' +let s:gui01 = '#E0E0E0' +let s:gui02 = '#D0D0D0' +let s:gui03 = '#B0B0B0' +let s:gui04 = '#000000' +let s:gui05 = '#101010' +let s:gui06 = '#151515' +let s:gui07 = '#202020' +let s:gui08 = '#FF0086' +let s:gui09 = '#FD8900' +let s:gui0A = '#ABA800' +let s:gui0B = '#00C918' +let s:gui0C = '#1FAAAA' +let s:gui0D = '#3777E6' +let s:gui0E = '#AD00A1' +let s:gui0F = '#CC6633' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_synth_midnight_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_synth_midnight_dark.vim new file mode 100644 index 0000000..5d6a269 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_synth_midnight_dark.vim @@ -0,0 +1,85 @@ +" Base16 Synth Midnight Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Michaël Ball (http://github.com/michael-ball/) + +let s:scheme_slug = substitute("synth-midnight-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#040404' +let s:gui01 = '#141414' +let s:gui02 = '#242424' +let s:gui03 = '#61507A' +let s:gui04 = '#BFBBBF' +let s:gui05 = '#DFDBDF' +let s:gui06 = '#EFEBEF' +let s:gui07 = '#FFFBFF' +let s:gui08 = '#B53B50' +let s:gui09 = '#E4600E' +let s:gui0A = '#DAE84D' +let s:gui0B = '#06EA61' +let s:gui0C = '#7CEDE9' +let s:gui0D = '#03AEFF' +let s:gui0E = '#EA5CE2' +let s:gui0F = '#9D4D0E' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim new file mode 100644 index 0000000..c35a450 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow.vim @@ -0,0 +1,82 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Tomorrow Scheme by Chris Kempson (http://chriskempson.com) +let g:airline#themes#base16_tomorrow#palette = {} +let s:gui00 = "#1d1f21" +let s:gui01 = "#282a2e" +let s:gui02 = "#373b41" +let s:gui03 = "#969896" +let s:gui04 = "#b4b7b4" +let s:gui05 = "#c5c8c6" +let s:gui06 = "#e0e0e0" +let s:gui07 = "#ffffff" +let s:gui08 = "#cc6666" +let s:gui09 = "#de935f" +let s:gui0A = "#f0c674" +let s:gui0B = "#b5bd68" +let s:gui0C = "#8abeb7" +let s:gui0D = "#81a2be" +let s:gui0E = "#b294bb" +let s:gui0F = "#a3685a" + +let s:cterm00 = 0 +let s:cterm03 = 8 +let s:cterm05 = 7 +let s:cterm07 = 15 +let s:cterm08 = 1 +let s:cterm0A = 3 +let s:cterm0B = 2 +let s:cterm0C = 6 +let s:cterm0D = 4 +let s:cterm0E = 5 +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = 18 + let s:cterm02 = 19 + let s:cterm04 = 20 + let s:cterm06 = 21 + let s:cterm09 = 16 + let s:cterm0F = 17 +else + let s:cterm01 = 10 + let s:cterm02 = 11 + let s:cterm04 = 12 + let s:cterm06 = 13 + let s:cterm09 = 9 + let s:cterm0F = 14 +endif + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_tomorrow#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night.vim new file mode 100644 index 0000000..9831db7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night.vim @@ -0,0 +1,85 @@ +" Base16 Tomorrow Night vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chris Kempson (http://chriskempson.com) + +let s:scheme_slug = substitute("tomorrow-night", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#1d1f21' +let s:gui01 = '#282a2e' +let s:gui02 = '#373b41' +let s:gui03 = '#969896' +let s:gui04 = '#b4b7b4' +let s:gui05 = '#c5c8c6' +let s:gui06 = '#e0e0e0' +let s:gui07 = '#ffffff' +let s:gui08 = '#cc6666' +let s:gui09 = '#de935f' +let s:gui0A = '#f0c674' +let s:gui0B = '#b5bd68' +let s:gui0C = '#8abeb7' +let s:gui0D = '#81a2be' +let s:gui0E = '#b294bb' +let s:gui0F = '#a3685a' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night_eighties.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night_eighties.vim new file mode 100644 index 0000000..d93aaf7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tomorrow_night_eighties.vim @@ -0,0 +1,85 @@ +" Base16 Tomorrow Night vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Chris Kempson (http://chriskempson.com) + +let s:scheme_slug = substitute("tomorrow-night-eighties", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#2d2d2d' +let s:gui01 = '#393939' +let s:gui02 = '#515151' +let s:gui03 = '#999999' +let s:gui04 = '#b4b7b4' +let s:gui05 = '#cccccc' +let s:gui06 = '#e0e0e0' +let s:gui07 = '#ffffff' +let s:gui08 = '#f2777a' +let s:gui09 = '#f99157' +let s:gui0A = '#ffcc66' +let s:gui0B = '#99cc99' +let s:gui0C = '#66cccc' +let s:gui0D = '#6699cc' +let s:gui0E = '#cc99cc' +let s:gui0F = '#a3685a' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tube.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tube.vim new file mode 100644 index 0000000..44cc328 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_tube.vim @@ -0,0 +1,85 @@ +" Base16 London Tube vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jan T. Sott + +let s:scheme_slug = substitute("tube", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#231f20' +let s:gui01 = '#1c3f95' +let s:gui02 = '#5a5758' +let s:gui03 = '#737171' +let s:gui04 = '#959ca1' +let s:gui05 = '#d9d8d8' +let s:gui06 = '#e7e7e8' +let s:gui07 = '#ffffff' +let s:gui08 = '#ee2e24' +let s:gui09 = '#f386a1' +let s:gui0A = '#ffd204' +let s:gui0B = '#00853e' +let s:gui0C = '#85cebc' +let s:gui0D = '#009ddc' +let s:gui0E = '#98005d' +let s:gui0F = '#b06110' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim new file mode 100644 index 0000000..fa82418 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_twilight.vim @@ -0,0 +1,73 @@ +" vim-airline template by chartoin (http://github.com/chartoin) +" Base 16 Twilight Scheme by David Hart (http://hart-dev.com) +let g:airline#themes#base16_twilight#palette = {} +let s:gui00 = "#1e1e1e" +let s:gui01 = "#323537" +let s:gui02 = "#464b50" +let s:gui03 = "#5f5a60" +let s:gui04 = "#838184" +let s:gui05 = "#a7a7a7" +let s:gui06 = "#c3c3c3" +let s:gui07 = "#ffffff" +let s:gui08 = "#cf6a4c" +let s:gui09 = "#cda869" +let s:gui0A = "#f9ee98" +let s:gui0B = "#8f9d6a" +let s:gui0C = "#afc4db" +let s:gui0D = "#7587a6" +let s:gui0E = "#9b859d" +let s:gui0F = "#9b703f" + +let s:cterm00 = 234 +let s:cterm01 = 59 +let s:cterm02 = 59 +let s:cterm03 = 59 +let s:cterm04 = 102 +let s:cterm05 = 248 +let s:cterm06 = 251 +let s:cterm07 = 15 +let s:cterm08 = 167 +let s:cterm09 = 179 +let s:cterm0A = 228 +let s:cterm0B = 107 +let s:cterm0C = 152 +let s:cterm0D = 103 +let s:cterm0E = 103 +let s:cterm0F = 95 + +let s:N1 = [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ] +let s:N2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui01, s:gui0D, s:cterm01, s:cterm0D ] +let s:I2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui01, s:gui08, s:cterm01, s:cterm08 ] +let s:R2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ] +let s:V2 = [ s:gui06, s:gui02, s:cterm06, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui01, s:cterm09, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA2 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let s:IA3 = [ s:gui05, s:gui01, s:cterm05, s:cterm01 ] +let g:airline#themes#base16_twilight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#base16_twilight#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui07, s:gui02, s:cterm07, s:cterm02, '' ], + \ [ s:gui07, s:gui04, s:cterm07, s:cterm04, '' ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01, 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_dark.vim new file mode 100644 index 0000000..a0fd198 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_dark.vim @@ -0,0 +1,85 @@ +" Base16 Unikitty Dark vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Josh W Lewis (@joshwlewis) + +let s:scheme_slug = substitute("unikitty-dark", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#2e2a31' +let s:gui01 = '#4a464d' +let s:gui02 = '#666369' +let s:gui03 = '#838085' +let s:gui04 = '#9f9da2' +let s:gui05 = '#bcbabe' +let s:gui06 = '#d8d7da' +let s:gui07 = '#f5f4f7' +let s:gui08 = '#d8137f' +let s:gui09 = '#d65407' +let s:gui0A = '#dc8a0e' +let s:gui0B = '#17ad98' +let s:gui0C = '#149bda' +let s:gui0D = '#796af5' +let s:gui0E = '#bb60ea' +let s:gui0F = '#c720ca' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_light.vim new file mode 100644 index 0000000..c65ea76 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_unikitty_light.vim @@ -0,0 +1,85 @@ +" Base16 Unikitty Light vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Josh W Lewis (@joshwlewis) + +let s:scheme_slug = substitute("unikitty-light", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#ffffff' +let s:gui01 = '#e1e1e2' +let s:gui02 = '#c4c3c5' +let s:gui03 = '#a7a5a8' +let s:gui04 = '#89878b' +let s:gui05 = '#6c696e' +let s:gui06 = '#4f4b51' +let s:gui07 = '#322d34' +let s:gui08 = '#d8137f' +let s:gui09 = '#d65407' +let s:gui0A = '#dc8a0e' +let s:gui0B = '#17ad98' +let s:gui0C = '#149bda' +let s:gui0D = '#775dff' +let s:gui0E = '#aa17e6' +let s:gui0F = '#e013d0' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_vim.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_vim.vim new file mode 100644 index 0000000..b92abcb --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_vim.vim @@ -0,0 +1,172 @@ +let g:airline#themes#base16_vim#palette = {} + +function! airline#themes#base16_vim#refresh() + let s:improved_contrast = get(g:, 'airline_base16_improved_contrast', 0) + let s:monotone = get(g:, 'airline_base16_monotone', 0) + \ || get(g:, 'airline_base16_solarized', 0) + + if exists('g:base16_gui00') + " base16-vim provides values that we can load dynamically + + " Base16 term color palette + let s:base00 = g:base16_cterm00 " black + let s:base01 = g:base16_cterm01 + let s:base02 = g:base16_cterm02 + let s:base03 = g:base16_cterm03 " brblack + let s:base04 = g:base16_cterm04 + let s:base05 = g:base16_cterm05 " white + let s:base06 = g:base16_cterm06 + let s:base07 = g:base16_cterm07 + let s:base08 = g:base16_cterm08 " red + let s:base09 = g:base16_cterm09 + let s:base0A = g:base16_cterm0A " yellow + let s:base0B = g:base16_cterm0B " green + let s:base0C = g:base16_cterm0C " cyan + let s:base0D = g:base16_cterm0D " blue + let s:base0E = g:base16_cterm0E " magenta + let s:base0F = g:base16_cterm0F + + " Gui color palette + let s:gui00 = "#" . g:base16_gui00 + let s:gui01 = "#" . g:base16_gui01 + let s:gui02 = "#" . g:base16_gui02 + let s:gui03 = "#" . g:base16_gui03 + let s:gui04 = "#" . g:base16_gui04 + let s:gui05 = "#" . g:base16_gui05 + let s:gui06 = "#" . g:base16_gui06 + let s:gui07 = "#" . g:base16_gui07 + let s:gui08 = "#" . g:base16_gui08 + let s:gui09 = "#" . g:base16_gui09 + let s:gui0A = "#" . g:base16_gui0A + let s:gui0B = "#" . g:base16_gui0B + let s:gui0C = "#" . g:base16_gui0C + let s:gui0D = "#" . g:base16_gui0D + let s:gui0E = "#" . g:base16_gui0E + let s:gui0F = "#" . g:base16_gui0F + else + " Fallback: term colors should still be correct, but gui colors must be + " hardcoded to a particular scheme. + + " Base16 term color palette + let s:base00 = "00" " black + let s:base03 = "08" " brblack + let s:base05 = "07" " white + let s:base07 = "15" + let s:base08 = "01" " red + let s:base0A = "03" " yellow + let s:base0B = "02" " green + let s:base0C = "06" " cyan + let s:base0D = "04" " blue + let s:base0E = "05" " magenta + if exists('g:base16colorspace') && g:base16colorspace == "256" + let s:base01 = "18" + let s:base02 = "19" + let s:base04 = "20" + let s:base06 = "21" + let s:base09 = "16" + let s:base0F = "17" + else + let s:base01 = "10" + let s:base02 = "11" + let s:base04 = "12" + let s:base06 = "13" + let s:base09 = "09" + let s:base0F = "14" + endif + + " Gui color palette (base16-default-dark) + let s:gui00 = "#181818" + let s:gui01 = "#282828" + let s:gui02 = "#383838" + let s:gui03 = "#585858" + let s:gui04 = "#b8b8b8" + let s:gui05 = "#d8d8d8" + let s:gui06 = "#e8e8e8" + let s:gui07 = "#f8f8f8" + let s:gui08 = "#ab4642" + let s:gui09 = "#dc9656" + let s:gui0A = "#f7ca88" + let s:gui0B = "#a1b56c" + let s:gui0C = "#86c1b9" + let s:gui0D = "#7cafc2" + let s:gui0E = "#ba8baf" + let s:gui0F = "#a16946" + endif + + " Normal mode + let s:N1 = [s:gui00, s:gui0B, s:base00, s:base0B] + let s:N2 = [s:gui04, s:gui02, s:base04, s:base02] + let s:N3 = [s:gui0B, s:gui01, s:base0B, s:base01] + + if s:improved_contrast + let s:N2 = [s:gui05, s:gui02, s:base05, s:base02] + endif + + if s:monotone + let s:N1 = [s:gui01, s:gui04, s:base01, s:base04] + let s:N2 = [s:gui00, s:gui02, s:base00, s:base02] + let s:N3 = [s:gui04, s:gui01, s:base04, s:base01] + endif + + let g:airline#themes#base16_vim#palette.normal + \ = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#base16_vim#palette.normal_modified = { + \ 'airline_c': [s:gui09, s:gui01, s:base09, s:base01, ''], + \ } + + " Insert mode + let s:I1 = [s:gui01, s:gui0D, s:base01, s:base0D] + let s:I3 = [s:gui0D, s:gui01, s:base0D, s:base01] + let g:airline#themes#base16_vim#palette.insert + \ = airline#themes#generate_color_map(s:I1, s:N2, s:I3) + + if s:monotone + let s:I1 = [s:gui01, s:gui0A, s:base01, s:base0A] + let g:airline#themes#base16_vim#palette.insert + \ = airline#themes#generate_color_map(s:I1, s:N2, s:N3) + endif + + let g:airline#themes#base16_vim#palette.insert_modified + \ = copy(g:airline#themes#base16_vim#palette.normal_modified) + + " Replace mode + let s:R1 = [s:gui01, s:gui08, s:base01, s:base08] + let s:R3 = [s:gui08, s:gui01, s:base08, s:base01] + let g:airline#themes#base16_vim#palette.replace + \ = airline#themes#generate_color_map(s:R1, s:N2, s:R3) + + if s:monotone + let s:R1 = [s:gui01, s:gui09, s:base01, s:base09] + let g:airline#themes#base16_vim#palette.replace + \ = airline#themes#generate_color_map(s:R1, s:N2, s:N3) + endif + + let g:airline#themes#base16_vim#palette.replace_modified + \ = copy(g:airline#themes#base16_vim#palette.normal_modified) + + " Visual mode + let s:V1 = [s:gui01, s:gui0E, s:base01, s:base0E] + let s:V3 = [s:gui0E, s:gui01, s:base0E, s:base01] + let g:airline#themes#base16_vim#palette.visual + \ = airline#themes#generate_color_map(s:V1, s:N2, s:V3) + + if s:monotone + let s:V1 = [s:gui01, s:gui0F, s:base01, s:base0F] + let g:airline#themes#base16_vim#palette.visual + \ = airline#themes#generate_color_map(s:V1, s:N2, s:N3) + endif + + " Inactive window + if s:improved_contrast + let s:IA = [s:gui04, s:gui01, s:base04, s:base01, ''] + else + let s:IA = [s:gui03, s:gui01, s:base03, s:base01, ''] + endif + let g:airline#themes#base16_vim#palette.inactive + \ = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#base16_vim#palette.inactive_modified = { + \ 'airline_c': [s:gui09, '', s:base09, '', ''], + \ } +endfunction + +call airline#themes#base16_vim#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_woodland.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_woodland.vim new file mode 100644 index 0000000..e493f78 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_woodland.vim @@ -0,0 +1,85 @@ +" Base16 Woodland vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Jay Cornwall (https://jcornwall.com) + +let s:scheme_slug = substitute("woodland", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#231e18' +let s:gui01 = '#302b25' +let s:gui02 = '#48413a' +let s:gui03 = '#9d8b70' +let s:gui04 = '#b4a490' +let s:gui05 = '#cabcb1' +let s:gui06 = '#d7c8bc' +let s:gui07 = '#e4d4c8' +let s:gui08 = '#d35c5c' +let s:gui09 = '#ca7f32' +let s:gui0A = '#e0ac16' +let s:gui0B = '#b7ba53' +let s:gui0C = '#6eb958' +let s:gui0D = '#88a4d3' +let s:gui0E = '#bb90e2' +let s:gui0F = '#b49368' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_xcode_dusk.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_xcode_dusk.vim new file mode 100644 index 0000000..666f25a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_xcode_dusk.vim @@ -0,0 +1,85 @@ +" Base16 XCode Dusk vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By Elsa Gonsiorowski (https://github.com/gonsie) + +let s:scheme_slug = substitute("xcode-dusk", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#282B35' +let s:gui01 = '#3D4048' +let s:gui02 = '#53555D' +let s:gui03 = '#686A71' +let s:gui04 = '#7E8086' +let s:gui05 = '#939599' +let s:gui06 = '#A9AAAE' +let s:gui07 = '#BEBFC2' +let s:gui08 = '#B21889' +let s:gui09 = '#786DC5' +let s:gui0A = '#438288' +let s:gui0B = '#DF0002' +let s:gui0C = '#00A0BE' +let s:gui0D = '#790EAD' +let s:gui0E = '#B21889' +let s:gui0F = '#C77C48' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_zenburn.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_zenburn.vim new file mode 100644 index 0000000..2e716d8 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16_zenburn.vim @@ -0,0 +1,85 @@ +" Base16 Zenburn vim-airline-theme (https://github.com/dawikur/base16-vim-airline-themes) +" For vim-airline (https://github.com/vim-airline/vim-airline) +" By elnawe + +let s:scheme_slug = substitute("zenburn", "-", "_", "g") + +let g:airline#themes#base16_{s:scheme_slug}#palette = {} + +" GUI color definitions +let s:gui00 = '#383838' +let s:gui01 = '#404040' +let s:gui02 = '#606060' +let s:gui03 = '#6f6f6f' +let s:gui04 = '#808080' +let s:gui05 = '#dcdccc' +let s:gui06 = '#c0c0c0' +let s:gui07 = '#ffffff' +let s:gui08 = '#dca3a3' +let s:gui09 = '#dfaf8f' +let s:gui0A = '#e0cf9f' +let s:gui0B = '#5f7f5f' +let s:gui0C = '#93e0e3' +let s:gui0D = '#7cb8bb' +let s:gui0E = '#dc8cc3' +let s:gui0F = '#000000' + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists("base16colorspace") && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +let g:airline#themes#base16_{s:scheme_slug}#palette.normal = airline#themes#generate_color_map( + \ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.normal_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.insert = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.insert_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.replace = airline#themes#generate_color_map( + \ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.replace_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.visual = airline#themes#generate_color_map( + \ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ], + \ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ]) +let g:airline#themes#base16_{s:scheme_slug}#palette.visual_modified = { + \ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]} + +let g:airline#themes#base16_{s:scheme_slug}#palette.inactive = airline#themes#generate_color_map( + \ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ], + \ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ], + \ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim new file mode 100644 index 0000000..6c0a1d7 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/base16color.vim @@ -0,0 +1,77 @@ +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 'green' ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 'green' , 235 ] " info +let s:N3 = [ '#CAE682' , '#242424' , 'green' , 234 ] " statusline +let s:N4 = [ '#86CD74' , 'DarkGreen' ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 'yellow' ] +let s:I2 = [ '#FDE76E' , '#32322F' , 'yellow' , 235 ] +let s:I3 = [ '#FDE76E' , '#242424' , 'yellow' , 234 ] +let s:I4 = [ '#FADE3E' , 'yellow' ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 'blue' ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 'blue' , 235 ] +let s:V3 = [ '#B5D3F3' , '#242424' , 'blue' , 234 ] +let s:V4 = [ '#7CB0E6' , 'blue' ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 'red' ] +let s:R2 = [ '#E5786D' , '#32322F' , 'red' , 235 ] +let s:R3 = [ '#E5786D' , '#242424' , 'red' , 234 ] +let s:R4 = [ '#E55345' , 'red' ] + +" Paste mode +let s:PA = [ '#94E42C' , 005 ] + +" Info modified +let s:IM = [ '#40403C' , 236 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#base16color#palette = {} + +let g:airline#themes#base16color#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#base16color#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#base16color#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#base16color#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#base16color#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#base16color#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#base16color#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#base16color#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim new file mode 100644 index 0000000..77f551c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/behelit.vim @@ -0,0 +1,58 @@ +let g:airline#themes#behelit#palette = {} + +" Normal mode +let s:N1 = [ '#121212', '#5f87ff', 233, 69 ] +let s:N2 = [ '#5f87ff', '#262626', 69 , 235 ] +let s:N3 = [ '#5f87ff', '#1c1c1c', 69 , 234, 'bold' ] +let g:airline#themes#behelit#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#behelit#palette.normal_modified = { + \ 'airline_c': [ '#d7005f', '#1c1c1c', 161, 234, 'bold' ], + \ } + +" Insert mode +let s:I1 = [ '#121212', '#00ff87', 233, 48 ] +let s:I2 = s:N2 +let s:I3 = s:N3 +let g:airline#themes#behelit#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#behelit#palette.insert_modified = g:airline#themes#behelit#palette.normal_modified +let g:airline#themes#behelit#palette.insert_paste = { + \ 'airline_a': [ "#121212", "#5f5faf", 233, 61, '' ], + \ } + +" Replace mode +let g:airline#themes#behelit#palette.replace = copy(g:airline#themes#behelit#palette.insert) +let g:airline#themes#behelit#palette.replace.airline_a = [ s:I1[0], '#d70057', s:I1[2], 161, '' ] +let g:airline#themes#behelit#palette.replace_modified = g:airline#themes#behelit#palette.insert_modified + +" Visual mode +let s:V1 = [ '#121212', '#5fff5f', 233, 83 ] +let s:V2 = s:N2 +let s:V3 = s:N3 +let g:airline#themes#behelit#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#behelit#palette.visual_modified = g:airline#themes#behelit#palette.normal_modified + +" Inactive window +let s:IA1 = [ '#4e4e4e', '#1c1c1c', 239, 234, '' ] +let s:IA2 = [ '#4e4e4e', '#262626', 239, 235, '' ] +let s:IA3 = [ '#4e4e4e', '#1c1c1c', 239, 234, 'bold' ] +let g:airline#themes#behelit#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#behelit#palette.inactive_modified = { + \ 'airline_c': [ '#5f5f87', '#1c1c1c', 60, 234, 'bold' ], + \ } + +" Accents +let g:airline#themes#behelit#palette.accents = { + \ 'red': [ '#d7005f', '', 161, '' ] + \ } + +" Warnings +let s:WI = [ '#121212', '#d7005f', 233, 161 ] +let g:airline#themes#behelit#palette.normal.airline_warning = s:WI +let g:airline#themes#behelit#palette.normal_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.insert_paste.airline_warning = s:WI +let g:airline#themes#behelit#palette.visual.airline_warning = s:WI +let g:airline#themes#behelit#palette.visual_modified.airline_warning = s:WI +let g:airline#themes#behelit#palette.replace.airline_warning = s:WI +let g:airline#themes#behelit#palette.replace_modified.airline_warning = s:WI diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim new file mode 100644 index 0000000..6a310c9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/biogoo.vim @@ -0,0 +1,58 @@ +" Name: biogoo (vim-airline version) +" Author: Benjamin Esham (https://esham.io) +" Last Change: 2017-10-20 +" +" You can find more information on the Biogoo theme at . + +let g:airline#themes#biogoo#palette = {} + +function! airline#themes#biogoo#refresh() + let g:airline#themes#biogoo#palette.accents = { + \ 'red': airline#themes#get_highlight('String'), + \ } + + let s:N1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['Include', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight2(['Include', 'fg'], ['Folded', 'bg'], 'bold') + let s:N3 = airline#themes#get_highlight2(['Include', 'fg'], ['VertSplit', 'bg'], 'bold') + let g:airline#themes#biogoo#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let s:Term = airline#themes#get_highlight2(['StatusLineTerm', 'fg'], ['StatusLineTerm', 'bg'], 'NONE') + let g:airline#themes#biogoo#palette.normal.airline_term = s:Term + + let s:Nmod = airline#themes#get_highlight2(['MatchParen', 'bg'], ['VertSplit', 'bg']) + let g:airline#themes#biogoo#palette.normal_modified = {'airline_c': s:Nmod} + let g:airline#themes#biogoo#palette.normal_modified.airline_term = s:Term + + let s:I1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['MatchParen', 'bg'], 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#biogoo#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#biogoo#palette.insert.airline_term = s:Term + let g:airline#themes#biogoo#palette.insert_modified = g:airline#themes#biogoo#palette.normal_modified + let g:airline#themes#biogoo#palette.insert_modified.airline_term = s:Term + + let s:R1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['String', 'fg'], 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#biogoo#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#biogoo#palette.replace.airline_term = s:Term + let g:airline#themes#biogoo#palette.replace_modified = g:airline#themes#biogoo#palette.normal_modified + let g:airline#themes#biogoo#palette.replace_modified.airline_term = s:Term + + let s:V1 = airline#themes#get_highlight2(['VertSplit', 'bg'], ['Number', 'fg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#biogoo#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#biogoo#palette.visual.airline_term = s:Term + let g:airline#themes#biogoo#palette.visual_modified = g:airline#themes#biogoo#palette.normal_modified + let g:airline#themes#biogoo#palette.visual_modified.airline_term = s:Term + + let s:IA1 = airline#themes#get_highlight2(['VertSplit', 'fg'], ['VertSplit', 'bg']) + let s:IA2 = s:IA1 + let s:IA3 = airline#themes#get_highlight2(['VertSplit', 'fg'], ['VertSplit', 'bg'], 'NONE') + let g:airline#themes#biogoo#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + let g:airline#themes#biogoo#palette.inactive.airline_term = s:Term + let g:airline#themes#biogoo#palette.inactive_modified = g:airline#themes#biogoo#palette.normal_modified + let g:airline#themes#biogoo#palette.inactive_modified.airline_term = s:Term +endfunction + +call airline#themes#biogoo#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/blood_red.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/blood_red.vim new file mode 100644 index 0000000..3d022f5 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/blood_red.vim @@ -0,0 +1,35 @@ + +" Normal mode +let s:N1 = [ '#bcbcbc' , '#d62929' , 250 , 97 ] +let s:N2 = [ '#ffffff' , '#8b0000' , 170 , 239 ] +let s:N3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Insert mode +let s:I1 = [ '#fffdfa' , '#8b0000' , 253 , 35 ] +let s:I2 = [ '#ffffff' , '#c50000' , 170 , 239 ] +let s:I3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Visual mode +let s:V1 = [ '#fffdfa' , '#d62962' , 253 , 35 ] +let s:V2 = [ '#fffdfa' , '#c50000' , 001 , 44] +let s:V3 = [ '#c6c6c6' , '#3a3a3a' , 250 , 97] + +" Replace mode +let s:RE = [ '#c6c6c6' , '#d62962' , 251, 168 ] + +let g:airline#themes#blood_red#palette = {} + +let g:airline#themes#blood_red#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#blood_red#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#blood_red#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#blood_red#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#blood_red#palette.replace = copy(g:airline#themes#blood_red#palette.normal) +let g:airline#themes#blood_red#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#blood_red#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim new file mode 100644 index 0000000..f2378ce --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/bubblegum.vim @@ -0,0 +1,70 @@ +" Color palette +let s:gui_dark_gray = '#303030' +let s:cterm_dark_gray = 236 +let s:gui_med_gray_hi = '#444444' +let s:cterm_med_gray_hi = 238 +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 +let s:gui_light_gray = '#b2b2b2' +let s:cterm_light_gray = 249 +let s:gui_green = '#afd787' +let s:cterm_green = 150 +let s:gui_blue = '#87afd7' +let s:cterm_blue = 110 +let s:gui_purple = '#afafd7' +let s:cterm_purple = 146 +let s:gui_orange = '#d7af5f' +let s:cterm_orange = 179 +let s:gui_red = '#d78787' +let s:cterm_red = 174 +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +let g:airline#themes#bubblegum#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] +let s:N3 = [s:gui_green, s:gui_med_gray_hi, s:cterm_green, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#bubblegum#palette.normal_modified = { + \ 'airline_c': [s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) +let g:airline#themes#bubblegum#palette.insert_modified = copy(g:airline#themes#bubblegum#palette.normal_modified) +let g:airline#themes#bubblegum#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + +" Replace mode +let g:airline#themes#bubblegum#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, s:gui_red, s:cterm_dark_gray, s:cterm_red, ''], + \ 'airline_c': [s:gui_red, s:gui_med_gray_hi, s:cterm_red, s:cterm_med_gray_hi, ''], + \ } +let g:airline#themes#bubblegum#palette.replace_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, s:gui_pink, s:cterm_dark_gray, s:cterm_pink] +let s:V3 = [s:gui_pink, s:gui_med_gray_hi, s:cterm_pink, s:cterm_med_gray_hi] +let g:airline#themes#bubblegum#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) +let g:airline#themes#bubblegum#palette.visual_modified = copy(g:airline#themes#bubblegum#palette.insert_modified) + +" Inactive window +let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] +let g:airline#themes#bubblegum#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#bubblegum#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#bubblegum#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , + \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , + \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim new file mode 100644 index 0000000..b156924 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cobalt2.vim @@ -0,0 +1,100 @@ + + +" vim-airline cobalt2 replication +" (https://github.com/g-kanoufi/vim-airline-cobalt2) + +let g:airline#themes#cobalt2#palette = {} + +let g:airline#themes#cobalt2#palette.accents = { + \ 'red': [ '#b42839' , '' , 231 , '' , '' ], + \ } + + +let s:N1 = [ '#ffffff' , '#1f7ad8' , 231 , 36 ] +let s:N2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:N3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#cobalt2#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#1f7ad8' , 231 , 52 , '' ] , + \ } + + +let s:I1 = [ '#666d51' , '#fee533' , 231 , 106 ] +let s:I2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:I3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#cobalt2#palette.insert_modified = { + \ 'airline_c': [ '#666d51' , '#fee533' , 255 , 52 , '' ] , + \ } +let g:airline#themes#cobalt2#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#fee533' , s:I1[2] , 106 , '' ] , + \ } + + +let s:R1 = [ '#ffffff' , '#ea9299' , 231 , 106 ] +let s:R2 = [ '#ffffff' , '#8cc2fd' , 88 , 29 ] +let s:R3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#cobalt2#palette.replace_modified = { + \ 'airline_c': [ '#ffffff' , '#ea9299' , 231 , 52 , '' ] , + \ } + +let s:V1 = [ '#ffff9a' , '#ff9d00' , 222 , 208 ] +let s:V2 = [ '#ffffff' , '#8cc2fd' , 231 , 29 ] +let s:V3 = [ '#ffffff' , '#204458' , 231 , 23 ] +let g:airline#themes#cobalt2#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#cobalt2#palette.visual_modified = { + \ 'airline_c': [ '#ffff9a' , '#ff9d00' , 231 , 52 , '' ] , + \ } + +let s:IA = [ '#4e4e4e' , '#204458' , 59 , 23 , '' ] +let g:airline#themes#cobalt2#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#cobalt2#palette.inactive_modified = { + \ 'airline_c': [ '#b42839' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#cobalt2#palette.tabline = { + \ 'airline_tab': ['#1780e9', '#1a3548', 231, 29, ''], + \ 'airline_tabsel': ['#ffffff', '#46dd3c', 231, 36, ''], + \ 'airline_tabtype': ['#ffffff', '#1f7ad8', 231, 36, ''], + \ 'airline_tabfill': ['#ffffff', '#204458', 231, 23, ''], + \ 'airline_tabmod': ['#666d51', '#fee533', 231, 88, ''], + \ } + +let s:WI = [ '#204458', '#ffffff', 231, 88 ] +let g:airline#themes#cobalt2#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#cobalt2#palette.normal_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.insert.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.insert_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.visual.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.visual_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.replace.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + +let g:airline#themes#cobalt2#palette.replace_modified.airline_warning = + \ g:airline#themes#cobalt2#palette.normal.airline_warning + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#cobalt2#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#ffffff' , '#204458' , 231 , 23 , '' ] , + \ [ '#ffffff' , '#1f7ad8' , 231 , 36 , '' ] , + \ [ '#666d51' , '#fee533' , 231 , 95 , '' ] ) + + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim new file mode 100644 index 0000000..148122b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cool.vim @@ -0,0 +1,70 @@ +let g:airline#themes#cool#palette = {} + +" NORMAL +let s:N1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:N2 = [ '#E4E4E4' , '#0087AF' , 188 , 31 ] +let s:N3 = [ '#EEEEEE' , '#005F87' , 231 , 24] +let g:airline#themes#cool#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +"let g:airline#themes#cool#palette.normal_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } + +" INSERT +let s:I1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:I2 = [ '#E4E4E4' , '#47AF00' , 188 , 70 ] +let s:I3 = [ '#EEEEEE' , '#2E8700' , 231 , 28 ] +let g:airline#themes#cool#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +"let g:airline#themes#cool#palette.insert_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } +"let g:airline#themes#cool#palette.insert_paste = { + "\ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + "\ } + +" REPLACE +let s:R1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:R2 = [ '#E4E4E4' , '#AF5F00' , 188 , 130 ] +let s:R3 = [ '#EEEEEE' , '#875300' , 231 , 94 ] +let g:airline#themes#cool#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +"let g:airline#themes#cool#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] +"let g:airline#themes#cool#palette.replace_modified = g:airline#themes#cool#palette.insert_modified + +" VISUAL +let s:V1 = [ '#585858' , '#E4E4E4' , 59 , 188 ] +let s:V2 = [ '#E4E4E4' , '#AF2800' , 188 , 124 ] +let s:V3 = [ '#EEEEEE' , '#872800' , 231 , 88 ] +let g:airline#themes#cool#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +"let g:airline#themes#cool#palette.visual_modified = { + "\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + "\ } + +" INACTIVE +let s:IA1 = [ '#585858' , '#E4E4E4' , 59 , 188 , '' ] +let s:IA2 = [ '#E4E4E4' , '#466D79' , 188 , 60 , '' ] +let s:IA3 = [ '#EEEEEE' , '#324E59' , 231 , 59 , '' ] +let g:airline#themes#cool#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +"let g:airline#themes#cool#palette.inactive_modified = { + "\ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + "\ } + +" TERMINAL +let g:airline#themes#cool#palette.terminal = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#cool#palette.normal.airline_term = s:N3 +let g:airline#themes#cool#palette.terminal.airline_term = s:I3 +let g:airline#themes#cool#palette.visual.airline_term = s:V3 + +let g:airline#themes#cool#palette.accents = { + \ 'red': [ '#ff0000' , '' , 196 , '' ] + \ } + +" CTRLP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#cool#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#E4E4E4' , '#00AFA2' , 188 , 37 , '' ], + \ [ '#EEEEEE' , '#008787' , 231 , 30 , '' ], + \ [ '#585858' , '#E4E4E4' , 59 , 188 , '' ]) + + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cyberpunk.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cyberpunk.vim new file mode 100644 index 0000000..13357dd --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/cyberpunk.vim @@ -0,0 +1,113 @@ +" vim-airline template by danrneal (http://github.com/danrneal) +" Cyberpunk by Tai Groot + +let g:airline#themes#cyberpunk#palette = {} + +" Define the true colors +let s:AQUA = '#0EEAFA' +let s:BEIGE = '#CDB1AD' +let s:BLACK = '#191919' +let s:BLUE = '#0197DD' +let s:DGREY = '#414C3B' +let s:GREEN = '#408000' +let s:LGREY = '#666666' +let s:LIME = '#87F025' +let s:MAGENTA = '#800080' +let s:PINK = '#FE1BF0' +let s:PURPLE = '#0C35BF' +let s:RED = '#FF0000' +let s:WHITE = '#FFFFFF' +let s:YELLOW = '#FFD302' + +" Define the 256-color fallbacks +let s:TERM_AQUA = 14 +let s:BEIGE = 224 +let s:TERM_BLACK = 233 +let s:TERM_BLUE = 75 +let s:TERM_DGREY = 240 +let s:TERM_GREEN = 70 +let s:TERM_LGREY = 246 +let s:TERM_LIME = 82 +let s:TERM_MAGENTA = 90 +let s:TERM_PINK = 199 +let s:TERM_PURPLE = 54 +let s:TERM_RED = 9 +let s:TERM_WHITE = 231 +let s:TERM_YELLOW = 226 + +" Some default text colors for readability +let s:GREY0 = s:WHITE +let s:GREY1 = s:LGREY +let s:GREY2 = s:DGREY +let s:BG = s:BLACK + +" 256-color fallbacks for text +let s:TERM_GREY0 = s:TERM_WHITE +let s:TERM_GREY1 = s:TERM_LGREY +let s:TERM_GREY2 = s:TERM_DGREY +let s:TERM_BG = s:TERM_BLACK + +let s:unmodified = [ s:GREY1, s:GREY2, s:TERM_GREY1, s:TERM_GREY2 ] +let s:modified = { + \ 'airline_b': [ s:AQUA, s:BG, s:TERM_AQUA, s:TERM_BG, '' ], + \ 'airline_y': [ s:AQUA, s:BG, s:TERM_AQUA, s:TERM_BG, '' ], + \ } + +let s:W = [ s:LIME, s:PURPLE, s:TERM_LIME, s:TERM_PURPLE ] +let s:E = [ s:RED, s:PURPLE, s:TERM_RED, s:TERM_PURPLE ] + +let s:modified.airline_warning = s:W +let s:modified.airline_error = s:E + +" Normal mode settings +let s:N1 = [ s:BLUE, s:YELLOW, s:TERM_YELLOW, s:TERM_BLUE ] +let s:N2 = s:unmodified +let s:N3 = s:N1 +let g:airline#themes#cyberpunk#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#cyberpunk#palette.normal.airline_warning = s:W +let g:airline#themes#cyberpunk#palette.normal.airline_error = s:E +let g:airline#themes#cyberpunk#palette.normal_modified = s:modified + +" Insert mode settings +let s:I1 = [ s:YELLOW, s:BLUE, s:TERM_BLUE, s:TERM_YELLOW ] +let s:I2 = s:unmodified +let s:I3 = s:I1 +let g:airline#themes#cyberpunk#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#cyberpunk#palette.insert.airline_warning = s:W +let g:airline#themes#cyberpunk#palette.insert.airline_error = s:E +let g:airline#themes#cyberpunk#palette.insert_modified = s:modified + +" Replace mode settings +let s:R1 = [ s:BG, s:RED, s:TERM_BG, s:TERM_RED ] +let s:R2 = s:unmodified +let s:R3 = s:R1 +let g:airline#themes#cyberpunk#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#cyberpunk#palette.replace.airline_warning = s:W +let g:airline#themes#cyberpunk#palette.replace.airline_error = s:E +let g:airline#themes#cyberpunk#palette.replace_modified = s:modified + +" Commandline mode settings +let s:C1 = [ s:BG, s:RED, s:TERM_BG, s:TERM_RED ] +let s:C2 = s:unmodified +let s:C3 = s:C1 +let g:airline#themes#cyberpunk#palette.commandline = airline#themes#generate_color_map(s:C1, s:C2, s:C3) +let g:airline#themes#cyberpunk#palette.commandline.airline_warning = s:W +let g:airline#themes#cyberpunk#palette.commandline.airline_error = s:E +let g:airline#themes#cyberpunk#palette.commandline_modified = s:modified + +" Visual mode settings +let s:V1 = [ s:BG, s:GREEN, s:TERM_BG, s:TERM_GREEN ] +let s:V2 = s:unmodified +let s:V3 = s:V1 +let g:airline#themes#cyberpunk#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#cyberpunk#palette.visual.airline_warning = s:W +let g:airline#themes#cyberpunk#palette.visual.airline_error = s:E +let g:airline#themes#cyberpunk#palette.visual_modified = s:modified + +" Inactive settings +let s:IA1 = [ s:BG, s:GREY2, s:TERM_BG, s:TERM_GREY2 ] +let s:IA2 = s:unmodified +let s:IA3 = [ s:GREY2, s:BG, s:TERM_GREY2, s:TERM_BG ] +let g:airline#themes#cyberpunk#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#cyberpunk#palette.inactive_modified = s:modified + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim new file mode 100644 index 0000000..6c08628 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/dark_minimal.vim @@ -0,0 +1,63 @@ +scriptencoding utf-8 + +" This is a copy of the dark.vim theme, however it does not change colors in +" the different modes, so should bring some performance improvements because +" airline does not have to redefine highlighting groups after they have been +" setup once. + +" Each theme is contained in its own file and declares variables scoped to the +" file. These variables represent the possible "modes" that airline can +" detect. The mode is the return value of mode(), which gets converted to a +" readable string. The following is a list currently supported modes: normal, +" insert, replace, visual, and inactive. +" +" Each mode can also have overrides. These are small changes to the mode that +" don't require a completely different look. "modified" and "paste" are two +" such supported overrides. These are simply suffixed to the major mode, +" separated by an underscore. For example, "normal_modified" would be normal +" mode where the current buffer is modified. +" +" The theming algorithm is a 2-pass system where the mode will draw over all +" parts of the statusline, and then the override is applied after. This means +" it is possible to specify a subset of the theme in overrides, as it will +" simply overwrite the previous colors. If you want simultaneous overrides, +" then they will need to change different parts of the statusline so they do +" not conflict with each other. +" +" First, let's define an empty dictionary and assign it to the "palette" +" variable. The # is a separator that maps with the directory structure. If +" you get this wrong, Vim will complain loudly. +let g:airline#themes#dark_minimal#palette = {} + +" First let's define some arrays. The s: is just a VimL thing for scoping the +" variables to the current script. Without this, these variables would be +" declared globally. Now let's declare some colors for normal mode and add it +" to the dictionary. The array is in the format: +" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid +" values for the "opt" value. +let s:N1 = [ '#00005f' , '#dfff00' , 17 , 190 ] +let s:N2 = [ '#ffffff' , '#444444' , 255 , 238 ] +let s:N3 = [ '#9cffd3' , '#202020' , 85 , 234 ] +let g:airline#themes#dark_minimal#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Accents are used to give parts within a section a slightly different look or +" color. Here we are defining a "red" accent, which is used by the 'readonly' +" part by default. Only the foreground colors are specified, so the background +" colors are automatically extracted from the underlying section colors. What +" this means is that regardless of which section the part is defined in, it +" will be red instead of the section's foreground color. You can also have +" multiple parts with accents within a section. +let g:airline#themes#dark_minimal#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + +let pal = g:airline#themes#dark_minimal#palette +for item in ['insert', 'replace', 'visual', 'inactive', 'ctrlp'] + " why doesn't this work? + " get E713: cannot use empty key for dictionary + "let pal.{item} = pal.normal + exe "let pal.".item." = pal.normal" + for suffix in ['_modified', '_paste'] + exe "let pal.".item.suffix. " = pal.normal" + endfor +endfor diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/desertink.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/desertink.vim new file mode 100644 index 0000000..951cf3d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/desertink.vim @@ -0,0 +1,68 @@ +" Based on powerlinish +" +" Theme to mimic the default colorscheme of powerline +" Not 100% the same so it's powerline... ish. +" +" Differences from default powerline: +" * Paste indicator isn't colored different +" * Far right hand section matches the color of the mode indicator +" +" Differences from other airline themes: +" * No color differences when you're in a modified buffer +" * Visual mode only changes the mode section. Otherwise +" it appears the same as normal mode + +" Normal mode +let s:N1 = [ '#005f00' , '#afd700' , 22 , 148, '' ] +let s:N2 = [ '#bbbbbb' , '#444444' , 250 , 238, '' ] +let s:N3 = [ '#ffffff' , '#303030' , 231 , 235, 'bold' ] + +" Insert mode +let s:I1 = [ '#ffffff' , '#004866' , 231 , 24 ] +let s:I2 = [ '#99DDFF' , '#0087af' , 74 , 31 ] +let s:I3 = [ '#B2E5FF' , '#005f87' , 117 , 24 ] + +" Visual mode +let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] + +" Replace mode +let s:RE = [ '#ffffff' , '#d74444' , 231 , 9 ] + +" Inactive mode +let s:IA1 = [ '#777777' , '#4a4a4a' , 240 , 237 , '' ] +let s:IA2 = [ '#777777' , '#3a3a3a' , 242 , 236 , '' ] +let s:IA3 = [ '#999999' , s:N3[1] , 244 , s:N3[3] , '' ] + +" Tabline +let s:TN = s:N2 " normal buffers +let s:TM = [ '#870000', '#ff8700', 88, 208, 'bold' ] " modified buffers +let s:TMU = [ '#ff8700', '#870000', 208, 88, 'bold' ] " modified unselected buffers +let s:TH = [ s:N1[1], s:N1[0], s:N1[3], s:N1[2] ] " hidden buffers + +let g:airline#themes#desertink#palette = {} + +let g:airline#themes#desertink#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#desertink#palette.normal_modified = { + \ 'airline_a': s:TM, + \ 'airline_z': s:TM } + +let g:airline#themes#desertink#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:N3) +let g:airline#themes#desertink#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ], + \ 'airline_z': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#desertink#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ], + \ 'airline_z': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#desertink#palette.replace = copy(airline#themes#desertink#palette.normal) +let g:airline#themes#desertink#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] +let g:airline#themes#desertink#palette.replace.airline_z = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let g:airline#themes#desertink#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +let g:airline#themes#desertink#palette.tabline = { + \ 'airline_tab': s:TH, + \ 'airline_tabmod': s:TM, + \ 'airline_tabmod_unsel': s:TMU, + \ 'airline_tabhid': s:TN } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim new file mode 100644 index 0000000..5e946ea --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/deus.vim @@ -0,0 +1,117 @@ +if get(g:, 'deus_termcolors', 256) == 16 + let s:term_red = 1 + let s:term_green = 2 + let s:term_yellow = 3 + let s:term_blue = 4 + let s:term_purple = 5 + let s:term_white = 7 + let s:term_black = 0 + let s:term_grey = 8 +else + let s:term_red = 204 + let s:term_green = 114 + let s:term_yellow = 180 + let s:term_blue = 39 + let s:term_purple = 170 + let s:term_white = 145 + let s:term_black = 235 + let s:term_grey = 236 +endif + +let g:airline#themes#deus#palette = {} + +let g:airline#themes#deus#palette.accents = { + \ 'red': [ '#E06C75', '', s:term_red, 0 ] + \ } + +let s:N1 = [ '#282C34', '#98C379', s:term_black, s:term_green ] +let s:N2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] +let s:N3 = [ '#98C379', '#282C34', s:term_green, '' ] +let g:airline#themes#deus#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let group = airline#themes#get_highlight('vimCommand') +let g:airline#themes#deus#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + +let s:I1 = [ '#282C34', '#61AFEF', s:term_black, s:term_blue ] +let s:I2 = s:N2 +let s:I3 = [ '#61AFEF', '#282C34', s:term_blue, '' ] +let g:airline#themes#deus#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#deus#palette.insert_modified = g:airline#themes#deus#palette.normal_modified + +let s:R1 = [ '#282C34', '#E06C75', s:term_black, s:term_red ] +let s:R2 = s:N2 +let s:R3 = [ '#E06C75', '#282C34', s:term_red, '' ] +let g:airline#themes#deus#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#deus#palette.replace_modified = g:airline#themes#deus#palette.normal_modified + +let s:V1 = [ '#282C34', '#C678DD', s:term_black, s:term_purple ] +let s:V2 = s:N2 +let s:V3 = [ '#C678DD', '#282C34', s:term_purple, '' ] +let g:airline#themes#deus#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#deus#palette.visual_modified = g:airline#themes#deus#palette.normal_modified + +let s:IA1 = [ '#282C34', '#ABB2BF', s:term_black, s:term_white ] +let s:IA2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] +let s:IA3 = s:N2 +let g:airline#themes#deus#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#deus#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + +" Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim) + +" Warnings +let s:WI = [ '#282C34', '#E5C07B', s:term_black, s:term_yellow ] +let g:airline#themes#deus#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#deus#palette.normal_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.insert.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.insert_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.visual.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.visual_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.replace.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +let g:airline#themes#deus#palette.replace_modified.airline_warning = + \ g:airline#themes#deus#palette.normal.airline_warning + +" Errors +let s:ER = [ '#282C34', '#E06C75', s:term_black, s:term_red ] +let g:airline#themes#deus#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + +let g:airline#themes#deus#palette.normal_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.insert.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.insert_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.visual.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.visual_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.replace.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error + +let g:airline#themes#deus#palette.replace_modified.airline_error = + \ g:airline#themes#deus#palette.normal.airline_error diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim new file mode 100644 index 0000000..0d65f4c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/distinguished.vim @@ -0,0 +1,59 @@ +" vim-airline companion theme of distinguished +" (https://github.com/Lokaltog/vim-distinguished) +" I have nothing to do with the original +" distinguished theme other than being a big fan. +" this theme was shamelessly created by modifying +" the Ubaryd airline theme. + +let s:gray = [245, '#8a8a8a'] +let s:golden = [143, '#afaf5f'] +let s:pink = [131, '#af5f5f'] +let s:blue = [ 67, '#5f87af'] +let s:orange = [166, '#d75f00'] +let s:outerfg = [ 16, '#000000'] +let s:innerbg = [234, '#1c1c1c'] +let s:middle = ['#bcbcbc', '#444444', 250, 238] + +" Normal mode +let s:N1 = [s:outerfg[1], s:gray[1], s:outerfg[0], s:gray[0]] +let s:N3 = [s:gray[1], s:innerbg[1], s:gray[0], s:innerbg[0]] + +" Insert mode +let s:I1 = [s:outerfg[1], s:golden[1], s:outerfg[0], s:golden[0]] +let s:I3 = [s:golden[1], s:innerbg[1], s:golden[0], s:innerbg[0]] + +" Visual mode +let s:V1 = [s:outerfg[1], s:pink[1], s:outerfg[0], s:pink[0]] +let s:V3 = [s:pink[1], s:innerbg[1], s:pink[0], s:innerbg[0]] + +" Replace mode +let s:R1 = [s:outerfg[1], s:blue[1], s:outerfg[0], s:blue[0]] +let s:R3 = [s:blue[1], s:innerbg[1], s:blue[0], s:innerbg[0]] + +" Inactive pane +let s:IA = [s:middle[1], s:innerbg[1], s:middle[3], s:innerbg[0]] + +let g:airline#themes#distinguished#palette = {} +let g:airline#themes#distinguished#palette.accents = { + \ 'red': ['#d70000', '', 160, '', '']} + +let g:airline#themes#distinguished#palette.inactive = { + \ 'airline_a': s:IA, + \ 'airline_b': s:IA, + \ 'airline_c': s:IA} + +let g:airline#themes#distinguished#palette.normal = airline#themes#generate_color_map(s:N1, s:middle, s:N3) +let g:airline#themes#distinguished#palette.normal_modified = { + \ 'airline_a': ['', s:orange[1], '', s:orange[0], ''], + \ 'airline_c': [s:orange[1], '', s:orange[0], '', ''], + \ 'airline_x': [s:orange[1], '', s:orange[0], '', ''], + \ 'airline_z': ['', s:orange[1], '', s:orange[0], '']} + +let g:airline#themes#distinguished#palette.insert = airline#themes#generate_color_map(s:I1, s:middle, s:I3) +let g:airline#themes#distinguished#palette.insert_modified = {} + +let g:airline#themes#distinguished#palette.replace = airline#themes#generate_color_map(s:R1, s:middle, s:R3) +let g:airline#themes#distinguished#palette.replace_modified = {} + +let g:airline#themes#distinguished#palette.visual = airline#themes#generate_color_map(s:V1, s:middle, s:V3) +let g:airline#themes#distinguished#palette.visual_modified = {} diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim new file mode 100644 index 0000000..cb844d4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/durant.vim @@ -0,0 +1,62 @@ +let g:airline#themes#durant#palette = {} + + +let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] +let s:N2 = [ '#93a1a1' , '#586e75' , 245 , 240 ] +let s:N3 = [ '#93a1a1' , '#073642' , 240 , 233 ] +let g:airline#themes#durant#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + +let g:airline#themes#durant#normal_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + + +let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] +let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] +let g:airline#themes#durant#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#durant#palette.insert_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } +let g:airline#themes#durant#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#durant#palette.replace = copy(g:airline#themes#durant#palette.insert) +let g:airline#themes#durant#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] + +let g:airline#themes#durant#palette.replace_modified = g:airline#themes#durant#palette.insert_modified + +let s:V1 = [ '#1a1a18' , '#ffffff' , 232 , 255 ] +let s:V2 = [ '#ffffff' , '#44403a' , 255, 238 ] +let s:V3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] +let g:airline#themes#durant#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#durant#palette.visual_modified = { + \ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] , + \ } + + +let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] +let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] +let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] +let g:airline#themes#durant#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#durant#palette.inactive_modified = { + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + \ } + + +let g:airline#themes#durant#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + let g:airline#themes#durant#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], + \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/executable_ouo.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/executable_ouo.vim new file mode 100644 index 0000000..2c05b7a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/executable_ouo.vim @@ -0,0 +1,135 @@ +" Author: Huang Po-Hsuan +" Filename: ouo.vim +" Last Modified: 2018-10-21 19:59:41 +" Vim: enc=utf-8 + +" ouo palette +" inspired by murmur and fresh + +let g:airline#themes#ouo#palette = {} + +" Color palette +let s:cterm_termbg = 237 " Background for branch and file format blocks +let s:gui_termbg = '#3A3A3A' +let s:cterm_termfg = 144 " Foreground for branch and file format blocks +let s:gui_termfg = '#AFAF87' + +let s:cterm_termbg2 = 234 " Background for middle block +let s:gui_termbg2 = '#1C1C1C' +let s:cterm_termfg2 = 39 " Foreground for middle block +let s:gui_termfg2 = '#00AFFF' + +let s:cterm_normalbg = 27 " Background for normal mode and file position blocks +let s:gui_normalbg = '#005FFF' +let s:cterm_normalfg = 15 " Foreground for normal mode and file position blocks +let s:gui_normalfg = '#FFFFFF' + +let s:cterm_insertbg = 70 " Background for insert mode and file position blocks +let s:gui_insertbg = '#5FAF00' +let s:cterm_insertfg = 15 " Foreground for insert mode and file position blocks +let s:gui_insertfg = '#FFFFFF' + +let s:cterm_visualbg = 166 " Background for visual mode and file position blocks +let s:gui_visualbg = '#D75F00' +let s:cterm_visualfg = 15 " Foreground for visual mode and file position blocks +let s:gui_visualfg = '#FFFFFF' + +let s:cterm_replacebg = 160 " Background for replace mode and file position blocks +let s:gui_replacebg = '#D70000' +let s:cterm_replacefg = 15 " Foreground for replace mode and file position blocks +let s:gui_replacefg = '#FFFFFF' + +let s:cterm_alert = 124 " Modified file alert color +let s:gui_alert = '#AF0000' + +let s:cterm_warningbg = 166 " Background for warning blocks +let s:gui_warningbg = '#D75F00' +let s:cterm_warningfg = 15 " Foreground for warning blocks +let s:gui_warningfg = '#FFFFFF' + +let s:cterm_errorbg = 160 " Background for error blocks +let s:gui_errorbg = '#D70000' +let s:cterm_errorfg = 15 " Foreground for error blocks +let s:gui_errorfg = '#FFFFFF' + +let s:cterm_inactivebg = 234 " Background for inactive mode +let s:gui_inactivebg = '#1C1C1C' +let s:cterm_inactivefg = 239 " Foreground for inactive mode +let s:gui_inactivefg = '#4E4E4E' + +" Branch and file format +let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] + +" Warning and error format +let s:W = [s:gui_warningfg, s:gui_warningbg, s:cterm_warningfg, s:cterm_warningbg, 'bold'] +let s:E = [s:gui_errorfg, s:gui_errorbg, s:cterm_errorfg, s:cterm_errorbg, 'bold'] + +" NORMAL mode +" Outside blocks in normal mode +let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] +let s:N2 = s:BB +" Middle block +let s:N3 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] +let g:airline#themes#ouo#palette.normal = + \ airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#ouo#palette.normal.airline_warning = s:W +let g:airline#themes#ouo#palette.normal.airline_error = s:E +let g:airline#themes#ouo#palette.normal_modified = { + \ 'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'], + \ 'airline_warning': s:W, + \ 'airline_error': s:E + \ } + +" INSERT mode +" Outside blocks in insert mode +let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] +let s:I2 = s:BB +" Middle block +let s:I3 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] +let g:airline#themes#ouo#palette.insert = + \ airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ouo#palette.insert.airline_warning = s:W +let g:airline#themes#ouo#palette.insert.airline_error = s:E +let g:airline#themes#ouo#palette.insert_modified = + \ g:airline#themes#ouo#palette.normal_modified + +" REPLACE mode +" Outside blocks in replace mode +let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] +let s:R2 = s:BB +" Middle block +let s:R3 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] +let g:airline#themes#ouo#palette.replace = + \ airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#ouo#palette.replace.airline_warning = s:W +let g:airline#themes#ouo#palette.replace.airline_error = s:E +let g:airline#themes#ouo#palette.replace_modified = + \ g:airline#themes#ouo#palette.normal_modified + +" VISAUL mode +" Outside blocks in visual mode +let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] +let s:V2 = s:BB +" Middle block +let s:V3 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] +let g:airline#themes#ouo#palette.visual = + \ airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#ouo#palette.visual.airline_warning = s:W +let g:airline#themes#ouo#palette.visual.airline_error = s:E +let g:airline#themes#ouo#palette.visual_modified = + \ g:airline#themes#ouo#palette.normal_modified + +" INACTIVE mode +let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let g:airline#themes#ouo#palette.inactive = + \ airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#ouo#palette.inactive.airline_warning = s:IA2 +let g:airline#themes#ouo#palette.inactive.airline_error = s:IA2 +let g:airline#themes#ouo#palette.inactive_modified = + \ g:airline#themes#ouo#palette.normal_modified + +let g:airline#themes#ouo#palette.accents = { + \ 'red': [ '#FF0000' , '' , 160 , '' ] + \ } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim new file mode 100644 index 0000000..a822c41 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fairyfloss.vim @@ -0,0 +1,88 @@ +" Color palette +let s:guiShadow = "#3b3a32" " shadow +let s:guiDarkGray = "#49483e" " dark gray +let s:guiBgPurple = "#8076aa" " background purple +let s:guiGray = "#49483e" " gray +let s:guiViolet = "#63588d" " violet +let s:guiDustyLilac = "#efe6ff" "dusty-lilac +let s:guiSeafoam = "#c2ffdf" "seafoam +let s:guiSilver = "#f8f8f0" "silver +let s:guiFuschia = "#f92672" "fuschia +let s:guiPeach = "#ff857f" "peach +let s:guiGold = "#e6c000" "gold +let s:guiDarkSeafoam = "#80ffbd" "dark-seafoam +let s:guiLilac = "#c5a3ff" "lilac +let s:guiLavender = "#ae81ff" "lavender +let s:guiRose = "#ffb8d1" "rose +let s:guiGoldenrod = "#fffea0" "goldenrod + +let s:ctermShadow = "233" +let s:ctermDarkGray = "235" +let s:ctermBgPurple = "59" +let s:cterm03 = "66" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:ctermSilver = "189" +let s:ctermFuschia = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:ctermDarkSeafoam = "22" +let s:cterm0C = "73" +let s:ctermLavender = "25" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#f8f8f0" +let s:guiGray = "#8076aa" +let s:ctermWhite = "231" +let s:ctermGray = "243" + +let g:airline#themes#fairyfloss#palette = {} +let s:modified = { 'airline_c': [ s:guiRose, '', 215, '', '' ] } + +" Normal mode +let s:N1 = [ s:guiSilver , s:guiLavender , s:ctermSilver , s:ctermLavender ] +let s:N2 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermDarkGray ] +let s:N3 = [ s:guiShadow , s:guiLavender , s:ctermBgPurple , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#fairyfloss#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [ s:guiDarkGray , s:guiDarkSeafoam , s:ctermWhite , s:ctermDarkSeafoam ] +let s:I2 = s:N2 +let s:I3 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#fairyfloss#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [ s:guiWhite , s:guiFuschia , s:ctermWhite , s:ctermFuschia ] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#fairyfloss#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#fairyfloss#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [ s:guiFuschia , s:guiDarkGray , s:ctermFuschia, s:ctermShadow ] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#fairyfloss#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#fairyfloss#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [ s:guiGray , s:guiDarkGray , s:ctermGray , s:ctermDarkGray ] +let s:IN2 = [ s:guiBgPurple , s:guiShadow , s:ctermBgPurple , s:ctermShadow ] +let s:IN3 = [ s:guiBgPurple , s:guiShadow , s:ctermBgPurple , s:ctermShadow ] +let g:airline#themes#fairyfloss#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#fairyfloss#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:guiDarkGray , s:ctermWhite , s:ctermDarkGray ] +let s:CP2 = [ s:guiWhite , s:guiGray , s:ctermWhite , s:ctermDarkGray ] +let s:CP3 = [ s:guiWhite , s:guiLavender , s:ctermWhite , s:ctermLavender ] + +let g:airline#themes#fairyfloss#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fruit_punch.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fruit_punch.vim new file mode 100644 index 0000000..02ba8a9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/fruit_punch.vim @@ -0,0 +1,80 @@ +" Fruitpunch - A fruity airline theme! +" vim: tw=80 et sw=2 ts=2 + +" Colors {{{ +let s:dark_gray = ['#303030', 236] +let s:med_gray_hi = ['#444444', 238] +let s:med_gray_lo = ['#3a3a3a', 237] +let s:light_gray = ['#b2b2b2', 249] +let s:pretty_pink = ['#f29db4', 217] +let s:banana_smoothie = ['#fce78d', 222] +let s:faded_red = ['#f97070', 203] +let s:icy_sky = ['#79e5e0', 116] +let s:orangarine = ['#e8a15a', 179] +"}}} + +" Init {{{ +" Translate color defs to airline format +fun! s:gen_def(fg, bg) + return [a:fg[0], a:bg[0], a:fg[1], a:bg[1]] +endfun +let s:bar_main = s:gen_def(s:light_gray, s:med_gray_lo) + [''] +let g:airline#themes#fruit_punch#palette = {} +"}}} + +" Normal mode {{{ +let s:airline_a_normal = s:gen_def(s:dark_gray, s:pretty_pink) +let s:airline_c_normal = s:gen_def(s:pretty_pink, s:med_gray_hi) +let g:airline#themes#fruit_punch#palette.normal = + \ airline#themes#generate_color_map(s:airline_a_normal + \ , s:bar_main, s:airline_c_normal) +"}}} + +" Insert mode {{{ +let s:airline_a_insert = s:gen_def(s:dark_gray, s:banana_smoothie) +let s:airline_c_insert = s:gen_def(s:banana_smoothie, s:med_gray_hi) +let g:airline#themes#fruit_punch#palette.insert = + \ airline#themes#generate_color_map(s:airline_a_insert + \ , s:bar_main, s:airline_c_insert) +"}}} + +" Visual mode {{{ +let s:airline_a_visual = s:gen_def(s:dark_gray, s:icy_sky) +let s:airline_c_visual = s:gen_def(s:icy_sky, s:med_gray_hi) +let g:airline#themes#fruit_punch#palette.visual = + \ airline#themes#generate_color_map(s:airline_a_visual + \ , s:bar_main, s:airline_c_visual) +"}}} + +" Replace mode {{{ +let s:airline_a_replace = s:gen_def(s:dark_gray, s:faded_red) +let s:airline_c_replace = s:gen_def(s:faded_red, s:med_gray_hi) +let g:airline#themes#fruit_punch#palette.replace = + \ airline#themes#generate_color_map(s:airline_a_replace + \ , s:bar_main, s:airline_c_replace) +"}}} + +" Inactive color {{{ +let s:airline_inactive = s:gen_def(s:light_gray, s:med_gray_hi) +let g:airline#themes#fruit_punch#palette.inactive = + \ airline#themes#generate_color_map(s:airline_inactive + \ , s:airline_inactive, s:airline_inactive) +"}}} + +" Global colors {{{ +let s:tmp = {'normal_modified': {}, 'insert_modified': {} + \, 'visual_modified': {}, 'replace_modified': {}} + +for mode in keys(s:tmp) + let s:tmp[mode]['airline_c'] = s:airline_c_insert +endfor +call extend(g:airline#themes#fruit_punch#palette, s:tmp) + +let s:warning = s:gen_def(s:dark_gray, s:orangarine) +for mode in keys(g:airline#themes#fruit_punch#palette) + if mode == 'accents' + continue + endif + let g:airline#themes#fruit_punch#palette[mode]['airline_warning'] = s:warning +endfor +"}}} diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_dark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_dark.vim new file mode 100644 index 0000000..08e7bcf --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_dark.vim @@ -0,0 +1,64 @@ +" vim-airline template by danrneal (http://github.com/danrneal) +" Google Scheme by Lisie Michel (https://github.com/google/vim-colorscheme-primary/) + +let g:airline#themes#google_dark#palette = {} + +let s:RED = '#EA4335' +let s:GREEN = '#34A853' +let s:YELLOW = '#FBBC04' +let s:BLUE = '#4285F4' +let s:BLACK = '#202124' +let s:DGREY = '#5F6368' +let s:LGREY = '#E8EAED' +let s:WHITE = '#FFFFFF' + +let s:TERM_RED = 167 +let s:TERM_GREEN = 71 +let s:TERM_YELLOW = 214 +let s:TERM_BLUE = 69 +let s:TERM_BLACK = 16 +let s:TERM_DGREY = 59 +let s:TERM_LGREY = 189 +let s:TERM_WHITE = 231 + +let s:GREY0 = s:WHITE +let s:GREY1 = s:LGREY +let s:GREY2 = s:DGREY +let s:BG = s:BLACK + +let s:TERM_GREY0 = s:TERM_WHITE +let s:TERM_GREY1 = s:TERM_LGREY +let s:TERM_GREY2 = s:TERM_DGREY +let s:TERM_BG = s:TERM_BLACK + +let s:N1 = [ s:BG, s:GREEN, s:TERM_BG, s:TERM_GREEN ] +let s:N2 = [ s:GREY1, s:GREY2, s:TERM_GREY1, s:TERM_GREY2 ] +let s:N3 = [ s:GREEN, s:BG, s:TERM_GREEN, s:TERM_BG ] +let g:airline#themes#google_dark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#google_dark#palette.normal_modified = { + \ 'airline_c': [ s:GREY0, s:BG, s:TERM_GREY0, s:TERM_BG, '' ], + \ } + +let s:I1 = [ s:BG, s:BLUE, s:TERM_BG, s:TERM_BLUE ] +let s:I2 = s:N2 +let s:I3 = [ s:BLUE, s:BG, s:TERM_BLUE, s:TERM_BG ] +let g:airline#themes#google_dark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#google_dark#palette.insert_modified = g:airline#themes#google_dark#palette.normal_modified + +let s:R1 = [ s:BG, s:RED, s:TERM_BG, s:TERM_RED ] +let s:R2 = s:N2 +let s:R3 = [ s:RED, s:BG, s:TERM_RED, s:TERM_BG ] +let g:airline#themes#google_dark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#google_dark#palette.replace_modified = g:airline#themes#google_dark#palette.normal_modified + +let s:V1 = [ s:BG, s:YELLOW, s:TERM_BG, s:TERM_YELLOW ] +let s:V2 = s:N2 +let s:V3 = [ s:YELLOW, s:BG, s:TERM_YELLOW, s:TERM_BG ] +let g:airline#themes#google_dark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#google_dark#palette.visual_modified = g:airline#themes#google_dark#palette.normal_modified + +let s:IA1 = [ s:BG, s:GREY2, s:TERM_BG, s:TERM_GREY2 ] +let s:IA2 = s:N2 +let s:IA3 = [ s:GREY2, s:BG, s:TERM_GREY2, s:TERM_BG ] +let g:airline#themes#google_dark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#google_dark#palette.inactive_modified = g:airline#themes#google_dark#palette.normal_modified diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_light.vim new file mode 100644 index 0000000..a01f695 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/google_light.vim @@ -0,0 +1,64 @@ +" vim-airline template by danrneal (http://github.com/danrneal) +" Google Scheme by Lisie Michel (https://github.com/google/vim-colorscheme-primary/) + +let g:airline#themes#google_light#palette = {} + +let s:RED = '#EA4335' +let s:GREEN = '#34A853' +let s:YELLOW = '#FBBC04' +let s:BLUE = '#4285F4' +let s:BLACK = '#202124' +let s:DGREY = '#5F6368' +let s:LGREY = '#E8EAED' +let s:WHITE = '#FFFFFF' + +let s:TERM_RED = 167 +let s:TERM_GREEN = 71 +let s:TERM_YELLOW = 214 +let s:TERM_BLUE = 69 +let s:TERM_BLACK = 16 +let s:TERM_DGREY = 59 +let s:TERM_LGREY = 189 +let s:TERM_WHITE = 231 + +let s:GREY0 = s:BLACK +let s:GREY1 = s:DGREY +let s:GREY2 = s:LGREY +let s:BG = s:WHITE + +let s:TERM_GREY0 = s:TERM_BLACK +let s:TERM_GREY1 = s:TERM_DGREY +let s:TERM_GREY2 = s:TERM_LGREY +let s:TERM_BG = s:TERM_WHITE + +let s:N1 = [ s:BG, s:GREEN, s:TERM_BG, s:TERM_GREEN ] +let s:N2 = [ s:GREY1, s:GREY2, s:TERM_GREY1, s:TERM_GREY2 ] +let s:N3 = [ s:GREEN, s:BG, s:TERM_GREEN, s:TERM_BG ] +let g:airline#themes#google_light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#google_light#palette.normal_modified = { + \ 'airline_c': [ s:GREY0, s:BG, s:TERM_GREY0, s:TERM_BG, '' ], + \ } + +let s:I1 = [ s:BG, s:BLUE, s:TERM_BG, s:TERM_BLUE ] +let s:I2 = s:N2 +let s:I3 = [ s:BLUE, s:BG, s:TERM_BLUE, s:TERM_BG ] +let g:airline#themes#google_light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#google_light#palette.insert_modified = g:airline#themes#google_light#palette.normal_modified + +let s:R1 = [ s:BG, s:RED, s:TERM_BG, s:TERM_RED ] +let s:R2 = s:N2 +let s:R3 = [ s:RED, s:BG, s:TERM_RED, s:TERM_BG ] +let g:airline#themes#google_light#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#google_light#palette.replace_modified = g:airline#themes#google_light#palette.normal_modified + +let s:V1 = [ s:BG, s:YELLOW, s:TERM_BG, s:TERM_YELLOW ] +let s:V2 = s:N2 +let s:V3 = [ s:YELLOW, s:BG, s:TERM_YELLOW, s:TERM_BG ] +let g:airline#themes#google_light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#google_light#palette.visual_modified = g:airline#themes#google_light#palette.normal_modified + +let s:IA1 = [ s:BG, s:GREY2, s:TERM_BG, s:TERM_GREY2 ] +let s:IA2 = s:N2 +let s:IA3 = [ s:GREY2, s:BG, s:TERM_GREY2, s:TERM_BG ] +let g:airline#themes#google_light#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#google_light#palette.inactive_modified = g:airline#themes#google_light#palette.normal_modified diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim new file mode 100644 index 0000000..b9bd20b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybrid.vim @@ -0,0 +1,52 @@ +" vim-airline companion theme of Hybrid +" (https://github.com/w0ng/vim-hybrid) + +let g:airline#themes#hybrid#palette = {} + +function! airline#themes#hybrid#refresh() + let s:N1 = airline#themes#get_highlight('DiffAdd') + let s:N2 = airline#themes#get_highlight('CursorLine') + let s:N3 = airline#themes#get_highlight('PMenu') + let g:airline#themes#hybrid#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#hybrid#palette.normal_modified = {} + + let warning_group = airline#themes#get_highlight('SpellRare') + let g:airline#themes#hybrid#palette.normal.airline_warning = warning_group + let g:airline#themes#hybrid#palette.normal_modified.airline_warning = warning_group + + let s:I1 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffText', 'bg'], 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#hybrid#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#hybrid#palette.insert_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.insert.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.insert_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning + + let s:R1 = airline#themes#get_highlight('DiffChange') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#hybrid#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let replace_group = airline#themes#get_highlight('SpellRare') + let g:airline#themes#hybrid#palette.replace_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.replace.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.replace_modified.airline_warning = g:airline#themes#hybrid#palette.replace_modified.airline_warning + + let s:V1 = airline#themes#get_highlight2(['Text', 'fg'], ['DiffDelete', 'bg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#hybrid#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#hybrid#palette.visual_modified = g:airline#themes#hybrid#palette.normal_modified + let g:airline#themes#hybrid#palette.visual.airline_warning = g:airline#themes#hybrid#palette.normal.airline_warning + let g:airline#themes#hybrid#palette.visual_modified.airline_warning = g:airline#themes#hybrid#palette.normal_modified.airline_warning + + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#hybrid#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#hybrid#palette.inactive_modified = g:airline#themes#hybrid#palette.normal_modified + + let g:airline#themes#hybrid#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + +endfunction + +call airline#themes#hybrid#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim new file mode 100644 index 0000000..84729c1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/hybridline.vim @@ -0,0 +1,34 @@ +" vim-airline theme based on vim-hybrid and powerline +" (https://github.com/w0ng/vim-hybrid) +" (https://github.com/Lokaltog/powerline) + +let g:airline#themes#hybridline#palette = {} + +let s:N1 = [ '#282a2e' , '#c5c8c6' , 'black' , 15 ] +let s:N2 = [ '#c5c8c6' , '#373b41' , 15 , 8 ] +let s:N3 = [ '#ffffff' , '#282a2e' , 255 , 'black' ] +let g:airline#themes#hybridline#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.normal.airline_a = ['#005f00', '#b5bd68', 22, 10, ''] + +let s:I1 = [ '#005f5f' , '#8abeb7' , 23 , 14 ] +let s:I2 = [ '#c5c8c6' , '#0087af' , 15 , 31 ] +let s:I3 = [ '#ffffff' , '#005f87' , 255 , 24 ] +let g:airline#themes#hybridline#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#hybridline#palette.insert_paste = { + \ 'airline_a': ['#000000', '#ac4142', 16 , 1, ''] , + \ } + +let g:airline#themes#hybridline#palette.replace = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.replace.airline_a = ['#000000', '#CC6666', 16, 9] + +let g:airline#themes#hybridline#palette.visual = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#hybridline#palette.visual.airline_a = ['#000000', '#de935f', 16, 3] + +let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] +let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] +let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] +let g:airline#themes#hybridline#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +let g:airline#themes#hybridline#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim new file mode 100644 index 0000000..5e7ece6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jellybeans.vim @@ -0,0 +1,88 @@ +" Color palette +let s:gui00 = "#151515" +let s:gui01 = "#262626" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#870000" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#437019" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#0d61ac" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +let s:cterm00 = "233" +let s:cterm01 = "235" +let s:cterm02 = "59" +let s:cterm03 = "66" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:cterm07 = "189" +let s:cterm08 = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:cterm0B = "22" +let s:cterm0C = "73" +let s:cterm0D = "25" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:ctermWhite = "231" +let s:ctermGray = "243" + +let g:airline#themes#jellybeans#palette = {} +let s:modified = { 'airline_c': [ '#ffb964', '', 215, '', '' ] } + +" Normal mode +let s:N1 = [ s:gui07 , s:gui0D , s:cterm07 , s:cterm0D ] +let s:N2 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:N3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jellybeans#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#jellybeans#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [ s:guiWhite , s:gui0B , s:ctermWhite , s:cterm0B ] +let s:I2 = s:N2 +let s:I3 = [ s:guiWhite , s:gui00 , s:ctermWhite , s:cterm00 ] +let g:airline#themes#jellybeans#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#jellybeans#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [ s:guiWhite , s:gui08 , s:ctermWhite , s:cterm08 ] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#jellybeans#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#jellybeans#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [ s:gui08 , s:gui00 , s:cterm08, s:cterm00 ] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#jellybeans#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#jellybeans#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [ s:guiGray , s:gui01 , s:ctermGray , s:cterm01 ] +let s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jellybeans#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#jellybeans#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01 ] +let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D ] + +let g:airline#themes#jellybeans#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim new file mode 100644 index 0000000..87d98e2 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/jet.vim @@ -0,0 +1,98 @@ +"Originally based on Jellybeans theme. +" Modified to resemble the orclord colorscheme. + +" Color palette +let s:gui00 = "#151515" +let s:gui01 = "#262626" +let s:gui02 = "#4f5b66" +let s:gui03 = "#65737e" +let s:gui04 = "#a7adba" +let s:gui05 = "#c0c5ce" +let s:gui06 = "#cdd3de" +let s:gui07 = "#d8dee9" +let s:gui08 = "#870000" +let s:gui09 = "#f99157" +let s:gui0A = "#fac863" +let s:gui0B = "#437019" +let s:gui0C = "#5fb3b3" +let s:gui0D = "#0d61ac" +let s:gui0E = "#c594c5" +let s:gui0F = "#ab7967" + +let s:cterm00 = "234" +let s:cterm01 = "235" +let s:cterm02 = "239" +let s:cterm03 = "59" +let s:cterm04 = "145" +let s:cterm05 = "152" +let s:cterm06 = "188" +let s:cterm07 = "15" +let s:cterm08 = "88" +let s:cterm09 = "209" +let s:cterm0A = "221" +let s:cterm0B = "28" +let s:cterm0C = "73" +let s:cterm0D = "04" +let s:cterm0E = "176" +let s:cterm0F = "137" + +let s:guiWhite = "#ffffff" +let s:ctermBlack = "00" +let s:ctermRed = "01" +let s:ctermGreen = "02" +let s:ctermPurple = "05" +let s:ctermGrey = "08" +let s:ctermIron = "242" +let s:ctermBrightRed = "09" +let s:ctermWhite = "15" +let s:ctermBlood = "88" +let s:ctermCongealing = "52" +let s:ctermOrange = "166" +let s:ctermBrown = "94" +let s:ctermAsh = "234" +let s:ctermPoison = "58" +let s:ctermBruise = "53" +let s:ctermWinter = "30" + +let g:airline#themes#jet#palette = {} + +" Normal mode +let s:N1 = [ s:gui07 , s:gui0D , s:ctermAsh , s:ctermBlood ] +let s:N2 = [ s:guiWhite , s:gui01 , s:ctermIron , s:ctermCongealing ] +let s:N3 = [ s:gui02 , s:gui00 , s:ctermRed , s:ctermBlack ] +let g:airline#themes#jet#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Insert mode +let s:I1 = [ s:guiWhite , s:gui0B , s:ctermOrange , s:ctermAsh ] +let s:I2 = [ s:gui02 , s:gui01 , s:ctermAsh , s:ctermOrange ] +let s:I3 = [ s:guiWhite , s:gui01 , s:ctermOrange , s:ctermBlack ] +let g:airline#themes#jet#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +" Visual mode +let s:V1 = [ s:guiWhite , s:gui08 , s:ctermAsh , s:ctermWinter ] +let s:V2 = [ s:gui02 , s:gui01 , s:ctermWinter , s:ctermAsh ] +let s:V3 = [ s:guiWhite , s:gui01 , s:ctermWinter , s:ctermBlack ] +let g:airline#themes#jet#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +" Replace mode +let s:R1 = [ s:gui08 , s:gui01 , s:ctermBlood, s:ctermBlack ] +let s:R2 = [ s:gui02 , s:gui01 , s:ctermRed , s:ctermBlack ] +let s:R3 = [ s:guiWhite , s:gui01 , s:ctermIron , s:ctermBlack ] +let g:airline#themes#jet#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +" Inactive mode +let s:IN1 = [ s:gui00 , s:gui01 , s:cterm00 , s:cterm01 ] +let s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ] +let g:airline#themes#jet#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ] +let s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01 ] +let s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D ] + +let g:airline#themes#jet#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim new file mode 100644 index 0000000..78504fa --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kalisi.vim @@ -0,0 +1,70 @@ +" +" Colorscheme: Kalisi for airline. Inspired by powerline. +" Arthur Jaron +" hifreeo@gmail.com +" 24.10.2014 + +" Visual mode +let s:V1 = [ '#0087ff' , '#ffffff','33','231'] +let s:V2 = [ '#005faf' , '#5fafff','25','75'] +let s:V3 = [ '#87d7ff' , '#005faf','117','25'] + +" Replace mode +let s:R1 = [ '#d75fff' , '#ffffff','171','231'] +let s:R2 = [ '#5f005f' , '#d75fff','53','171'] +let s:R3 = [ '#ff87ff' , '#8700af','213','91'] + +let g:airline#themes#kalisi#palette = {} + + +function! airline#themes#kalisi#refresh() + + let s:StatusLine = airline#themes#get_highlight('StatusLine') + let s:StatusLineNC = airline#themes#get_highlight('StatusLineNC') + + " Insert mode + let s:I1 = [ '#ffffff' , '#e80000','231','160'] + let s:I2 = [ '#ff0000' , '#5f0000','196','52'] + let s:I3 = s:StatusLine + + " Normal mode + let s:N1 = [ '#005f00' , '#afd700','22','148'] + let s:N2 = [ '#afd700' , '#005f00','148','22'] + let s:N3 = s:StatusLine + + " Tabline Plugin + let g:airline#themes#kalisi#palette.tabline = { + \ 'airline_tab': ['#bcbcbc', '#005f00','250','22'], + \ 'airline_tabsel': ['#404042', '#A6DB29','238','148'], + \ 'airline_tabtype':['#afd700', '#204d20','148','22'], + \ 'airline_tabfill': s:StatusLine, + \ 'airline_tabhid': ['#c5c5c5', '#404042','251','238'], + \ 'airline_tabmod': ['#d7ff00', '#afd700','190','148'], + \ 'airline_tabmod_unsel': ['#d7ff00', '#005f00','190','22'] + \ } + + let g:airline#themes#kalisi#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#kalisi#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#kalisi#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#kalisi#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + + " Inactive Mode + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#kalisi#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#kalisi#palette.inactive_modified = { + \ 'airline_c': ['#d7ff00', s:IA[1],'190',s:IA[3]], + \ } + +endfunction + +call airline#themes#kalisi#refresh() + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#kalisi#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ s:StatusLine, + \ ['#afd700', '#005f00','148','22'], + \ [ '#005f00' , '#afd700' , '22','148'] + \) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim new file mode 100644 index 0000000..e61f56f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/kolor.vim @@ -0,0 +1,59 @@ +let g:airline#themes#kolor#palette = {} + +let s:N1 = [ '#e2e2e2' , '#4f3598' , 254 , 56 ] +let s:N2 = [ '#ff5fd7' , '#242322' , 206 , 234 ] +let s:N3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] + +let g:airline#themes#kolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#kolor#palette.normal_modified = { + \ 'airline_c': [ '#e2e2e2' , '#4f3598' , 254 , 56 , '' ] , + \ } + + +let s:I1 = [ '#242322' , '#7eaefd' , 234 , 111 ] +let s:I2 = [ '#75d7d8' , '#242322' , 80 , 234 ] +let s:I3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] +let g:airline#themes#kolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#kolor#palette.insert_modified = { + \ 'airline_c': [ '#242322' , '#7eaefd' , 234 , 111 , '' ] , + \ } + + +let g:airline#themes#kolor#palette.replace = copy(g:airline#themes#kolor#palette.insert) +let g:airline#themes#kolor#palette.replace.airline_a = [ s:I2[0] , '#005154' , s:I2[2] , 23 , '' ] +let g:airline#themes#kolor#palette.replace_modified = { + \ 'airline_c': [ '#e2e2e2' , '#005154' , 254 , 23 , '' ] , + \ } + + +let s:V1 = [ '#242322' , '#e6987a' , 234 , 180 ] +let s:V2 = [ '#dbc570' , '#242322' , 186 , 234 ] +let s:V3 = [ '#e2e2e2' , '#4a4a4a' , 254 , 238 ] +let g:airline#themes#kolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#kolor#palette.visual_modified = { + \ 'airline_c': [ '#242322' , '#e6987a' , 234 , 180 , '' ] , + \ } + + +let s:IA1 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] +let s:IA2 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 ] +let s:IA3 = [ '#b2b2b2' , '#4a4a4a' , 247 , 238 , '' ] +let g:airline#themes#kolor#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#kolor#palette.inactive_modified = { + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , + \ } + + +let g:airline#themes#kolor#palette.accents = { + \ 'red': [ '#d96e8a' , '' , 168 , '' ] + \ } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#kolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#e2e2e2' , '#4a4a4a' , 254 , 238 , '' ], + \ [ '#e2e2e2' , '#242322' , 254 , 234 , '' ], + \ [ '#e2e2e2' , '#4f3598' , 254 , 56 , 'bold' ]) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim new file mode 100644 index 0000000..0c714d9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/laederon.vim @@ -0,0 +1,87 @@ +" vim-airline companion theme of Laederon +" (https://github.com/Donearm/Laederon) +" +" Author: Gianluca fiore +" Version: 1.12 +" License: MIT + +" Normal mode +" +let s:N1 = [ '#081c8c' , '#f8f6f2','18','15'] +let s:N2 = [ '#1693a5' , '#f8f6f2','62','15'] +let s:N3 = [ '#90a680' , '#2e2d2a' , 64, 235 ] +let s:N4 = [ '#081c8c' , 18 ] + +" Insert mode +let s:I1 = [ '#f8f6f2', '#ab3e5b','15','161'] +let s:I2 = [ '#242321', '#ab3e5b','235','161'] +let s:I3 = [ '#1693a5', '#f8f6f2', '62', '15'] +let s:I4 = [ '#1693a5' , 62 ] + +" Visual mode +let s:V1 = [ '#005f00', '#f8f6f2','22','15'] +let s:V2 = [ '#f8f6f2', '#005f00','15','22'] +let s:V3 = [ '#594512', '#f8f6f2','64','15'] +let s:V4 = [ '#594512' , 64 ] + +" Replace mode +let s:R1 = [ '#90a680' , '#f8f6f2','66','15'] +let s:R2 = [ '#90a680' , '#242321','66','235'] +let s:R3 = [ '#f8f6f2' , '#90a680','15','66'] +let s:R4 = [ '#90a680' , 66 ] + +" Paste mode +let s:PA = [ '#ab3e5d' , 161 ] + +" Info modified +let s:IM = [ '#242321' , 235 ] + +" Inactive mode +let s:IA = [ s:N2[1], s:N3[1], s:N2[3], s:N3[3], '' ] + +let g:airline#themes#laederon#palette = {} + +let g:airline#themes#laederon#palette.accents = { + \ 'red': [ '#ef393d' , '' , 196 , '' , '' ], + \ } + +let g:airline#themes#laederon#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#laederon#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#laederon#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#laederon#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#laederon#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#laederon#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#laederon#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#laederon#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#laederon#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#laederon#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#laederon#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lessnoise.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lessnoise.vim new file mode 100644 index 0000000..1a3913f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lessnoise.vim @@ -0,0 +1,182 @@ +" vim: et:ts=2:sts:sw=2 +" Author: @bekcpear +" https://gist.github.com/bekcpear/41fb86e0817dfb6620b757daf1e2aab0 + +scriptencoding utf-8 + +let g:airline#themes#lessnoise#palette = {} +"" +" Statusline sections: |a|b|c -- x|y|z|others +" COLOR DEFINE +let s:rac = ['#D75F5F', 167] " red accent fg +let s:nfg = ['#121212', 233] " normal fg; for a section +let s:ifg = s:nfg " insert fg; for a section +let s:rfg = s:nfg " replace fg; for a section +let s:vfg = s:nfg " visual fg; for a&z sections +let s:cfg = s:nfg " commandline fg; for all sections +let s:nbg = ['#AFFFFF', 159] " normal bg; for a section +let s:ibg = ['#FFAFD7', 218] " insert bg; for a section +let s:rbg = ['#FF5F5F', 203] " replace bg; for a section +let s:vbg = ['#FFFFAF', 229] " visual bg; for a&z sections +let s:cbg = ['#AFFFFF', 159] " commandline bg; for all sections + +let s:fg = ['#6C6C6C', 242] " other fg +let s:bg = ['#303030', 236] " other bg + +" tabline colors defined below + +let s:palt = { + \ 'airline_a': [ s:nfg[0], s:nbg[0], s:nfg[1], s:nbg[1], 'bold' ], + \ 'airline_b': [ '#EEEEEE', s:bg[0], 255, s:bg[1], 'NONE' ], + \ 'airline_c': [ '#9E9E9E', s:bg[0], 247, s:bg[1], 'italic' ], + \ 'airline_x': [ s:fg[0], s:bg[0], s:fg[1], s:bg[1], 'NONE' ], + \ 'airline_y': [ s:fg[0], s:bg[0], s:fg[1], s:bg[1], 'NONE' ], + \ 'airline_z': [ s:fg[0], s:bg[0], s:fg[1], s:bg[1], 'NONE' ] + \ } +let s:palt_m = { + \ 'airline_c': [ '#B2B2B2', s:bg[0], 249, s:bg[1], 'italic' ], + \ } +" get around vim-airline issue#2298 +" https://github.com/vim-airline/vim-airline/issues/2298 + if has('gui_running') + let s:palt.airline_y[2] = s:bg[1] + else + let s:palt.airline_y[0] = s:bg[0] + endif + +"" +" NORMAL +let g:airline#themes#lessnoise#palette.normal = s:palt +let g:airline#themes#lessnoise#palette.normal_modified = s:palt_m + +"" +" INSERT +let s:palt_i = deepcopy(s:palt) +let s:palt_i_m = deepcopy(s:palt_m) + +let s:palt_i.airline_a[0] = s:ifg[0] +let s:palt_i.airline_a[2] = s:ifg[1] +let s:palt_i.airline_a[1] = s:ibg[0] +let s:palt_i.airline_a[3] = s:ibg[1] + +let g:airline#themes#lessnoise#palette.insert = s:palt_i +let g:airline#themes#lessnoise#palette.insert_modified = s:palt_i_m + "let g:airline#themes#lessnoise#palette.insert_paste = {} + +"" +" TERMINAL +let g:airline#themes#lessnoise#palette.terminal = s:palt + +"" +" REPLACE +let s:palt_r = deepcopy(s:palt) +let s:palt_r_m = deepcopy(s:palt_m) + +let s:palt_r.airline_a[0] = s:rfg[0] +let s:palt_r.airline_a[2] = s:rfg[1] +let s:palt_r.airline_a[1] = s:rbg[0] +let s:palt_r.airline_a[3] = s:rbg[1] + +let g:airline#themes#lessnoise#palette.replace = s:palt_r +let g:airline#themes#lessnoise#palette.replace_modified = s:palt_r_m + +" +" VISUAL +let s:palt_v = deepcopy(s:palt) +let s:palt_v_m = deepcopy(s:palt_m) + +let s:palt_v.airline_a[0] = s:vfg[0] +let s:palt_v.airline_a[2] = s:vfg[1] +let s:palt_v.airline_a[1] = s:vbg[0] +let s:palt_v.airline_a[3] = s:vbg[1] +let s:palt_v.airline_z[0] = s:vfg[0] +let s:palt_v.airline_z[2] = s:vfg[1] +let s:palt_v.airline_z[1] = s:vbg[0] +let s:palt_v.airline_z[3] = s:vbg[1] + +let g:airline#themes#lessnoise#palette.visual = s:palt_v +let g:airline#themes#lessnoise#palette.visual_modified = s:palt_v_m + +" +" INACTIVE +let s:palt_d = deepcopy(s:palt) +let s:palt_d_m = deepcopy(s:palt_m) + +let s:palt_d.airline_a[0] = s:fg[0] +let s:palt_d.airline_a[1] = s:bg[0] +let s:palt_d.airline_a[2] = s:fg[1] +let s:palt_d.airline_a[3] = s:bg[1] +let s:palt_d.airline_b[0] = s:fg[0] +let s:palt_d.airline_b[2] = s:fg[1] +let s:palt_d.airline_c[0] = s:fg[0] +let s:palt_d.airline_c[2] = s:fg[1] +let s:palt_d.airline_c[4] = 'NONE' + +let g:airline#themes#lessnoise#palette.inactive = s:palt_d +let g:airline#themes#lessnoise#palette.inactive_modified = s:palt_d_m + +" +" COMMANDLINE +let s:palt_c = deepcopy(s:palt) + +for pk in keys(s:palt_c) + let s:palt_c[pk][0] = s:cfg[0] + let s:palt_c[pk][2] = s:cfg[1] + let s:palt_c[pk][1] = s:cbg[0] + let s:palt_c[pk][3] = s:cbg[1] +endfor +" get around vim-airline issue#2298 +" https://github.com/vim-airline/vim-airline/issues/2298 + if has('gui_running') + let s:palt_c.airline_b[2] = s:cbg[1] + let s:palt_c.airline_y[2] = s:cbg[1] + else + let s:palt_c.airline_b[0] = s:cbg[0] + let s:palt_c.airline_y[0] = s:cbg[0] + endif + +let g:airline#themes#lessnoise#palette.commandline = s:palt_c + +" +" READONLY Accent, red +let g:airline#themes#lessnoise#palette.accents = { + \ 'red': [s:rac[0], '', s:rac[1], ''] + \ } + +" +" TABLINE +let s:atbg = ['#080808', 232] +let s:atl = ['#444444', s:atbg[0], 238, s:atbg[1], 'NONE'] +let s:ats = ['#D0D0D0', '#1C1C1C', 252, 234, 'NONE'] +let s:atf = s:atl +let s:at = deepcopy(s:atl) +let s:at[0] = '#6C6C6C' +let s:at[2] = 242 +let s:atm = deepcopy(s:ats) +let s:atu = deepcopy(s:at) +let s:atm[4] = 'italic,bold' +let s:atu[4] = 'italic,bold' " according to issue#2298, this attribute may be invalid +let g:airline#themes#lessnoise#palette.tabline = { + \ 'airline_tablabel' : s:atl, + \ 'airline_tab' : s:at, + \ 'airline_tabsel' : s:ats, + \ 'airline_tabfill' : s:atf, + \ 'airline_tabmod' : s:atm, + \ 'airline_tabhid' : s:at, + \ 'airline_tabmod_unsel' : s:atu, + \ 'airline_tab_right' : s:at, + \ 'airline_tabsel_right' : s:ats, + \ 'airline_tabfill_right' : s:atf, + \ 'airline_tabmod_right' : s:atm, + \ 'airline_tabhid_right' : s:at, + \ 'airline_tabmod_unsel_right': s:atu + \ } + +" +" CtrlP +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#lessnoise#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#AFD7FF', '#5F87FF', 153, 69, 'NONE'], + \ [ '#FFFFFF', '#87AFFF', 231, 111, 'NONE'], + \ [ '#5F87FF', '#FFFFFF', 69, 231, 'bold']) +endif diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim new file mode 100644 index 0000000..70e3eec --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/light.vim @@ -0,0 +1,47 @@ +let g:airline#themes#light#palette = {} + +let s:N1 = [ '#ffffff' , '#005fff' , 255 , 27 ] +let s:N2 = [ '#000087' , '#00dfff' , 18 , 45 ] +let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] +let g:airline#themes#light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#light#palette.normal['airline_term'] = g:airline#themes#light#palette.normal['airline_c'] +let g:airline#themes#light#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ 'airline_term': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:I1 = [ '#ffffff' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#005f00' , '#00df87' , 22 , 42 ] +let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] +let g:airline#themes#light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#light#palette.insert_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } +let g:airline#themes#light#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#light#palette.replace = copy(g:airline#themes#light#palette.insert) +let g:airline#themes#light#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] +let g:airline#themes#light#palette.replace_modified = g:airline#themes#light#palette.insert_modified + + +let s:V1 = [ '#ffffff' , '#ff5f00' , 255 , 202 ] +let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] +let s:V3 = [ '#df5f00' , '#ffff87' , 166 , 228 ] +let g:airline#themes#light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#light#palette.visual_modified = { + \ 'airline_c': [ '#df0000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:IA1 = [ '#666666' , '#b2b2b2' , 242 , 249 , '' ] +let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] +let s:IA3 = [ '#a8a8a8' , '#ffffff' , 248 , 255 , '' ] +let g:airline#themes#light#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#light#palette.inactive_modified = { + \ 'airline_c': [ '#df0000' , '' , 160 , '' , '' ] , + \ } + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lighthaus.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lighthaus.vim new file mode 100644 index 0000000..f3cbf79 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lighthaus.vim @@ -0,0 +1,132 @@ +" Lighthaus Color theme for Vim Airline +" GIT: https://github.com/lighthaus-theme/vim +" Author: Adhiraj Sirohi (https://github.com/brutuski) +" Vasundhara Sharma (https://github.com/vasundhasauras) + +" Copyright © 2020-Present Lighthaus Theme +" Copyright © 2020-Present Adhiraj Sirohi +" Copyright © 2020-Present Vasundhara Sharma + + +let s:lighthaus_vim_v='1.0.2' + + +" COLOR PALETTE + +let s:lh_gui1='#21252D' +let s:lh_gui2='#00BFA4' +let s:lh_gui3='#FFFADE' +let s:lh_gui4='#090B26' +let s:lh_gui5='#50C16E' +let s:lh_gui6='#ED722E' +let s:lh_gui7='#FF5050' +let s:lh_gui8='#CCCCCC' +let s:lh_gui9='#FC2929' +let s:lh_gui10='#D68EB2' +let s:lh_gui11='#E25600' +let s:lh_gui12='#FF4D00' +let s:lh_gui13='#FFFF00' + + +let s:lh_cterm1='234' +let s:lh_cterm2='43' +let s:lh_cterm3='230' +let s:lh_cterm4='233' +let s:lh_cterm5='71' +let s:lh_cterm6='208' +let s:lh_cterm7='203' +let s:lh_cterm8='188' +let s:lh_cterm9='196' +let s:lh_cterm10='175' +let s:lh_cterm11='166' +let s:lh_cterm12='202' +let s:lh_cterm13='226' + +let g:airline#themes#lighthaus#palette = {} + + +" NORMAL MODE +let s:N1 = [ s:lh_gui1 , s:lh_gui2 , s:lh_cterm1, s:lh_cterm2 ] +let s:N2 = [ s:lh_gui3 , s:lh_gui4 , s:lh_cterm3, s:lh_cterm4 ] +let s:N3 = [ s:lh_gui2 , s:lh_gui1 , s:lh_cterm2, s:lh_cterm1 ] +let g:airline#themes#lighthaus#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + +" INSERT MODE +let s:I1 = [ s:lh_gui1 , s:lh_gui5 , s:lh_cterm1, s:lh_cterm5 ] +let s:I2 = [ s:lh_gui3 , s:lh_gui4 , s:lh_cterm3, s:lh_cterm4 ] +let s:I3 = [ s:lh_gui5 , s:lh_gui1 , s:lh_cterm5, s:lh_cterm1 ] +let g:airline#themes#lighthaus#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + + +" VISUAL MODE +let s:V1 = [ s:lh_gui1 , s:lh_gui6 , s:lh_cterm1, s:lh_cterm6 ] +let s:V2 = [ s:lh_gui3 , s:lh_gui4 , s:lh_cterm3, s:lh_cterm4 ] +let s:V3 = [ s:lh_gui6 , s:lh_gui1 , s:lh_cterm6, s:lh_cterm1 ] +let g:airline#themes#lighthaus#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + + +" REPLACE MODE +let s:R1 = [ s:lh_gui1 , s:lh_gui7 , s:lh_cterm1, s:lh_cterm7 ] +let s:R2 = [ s:lh_gui3 , s:lh_gui4 , s:lh_cterm3, s:lh_cterm4 ] +let s:R3 = [ s:lh_gui7 , s:lh_gui1 , s:lh_cterm7, s:lh_cterm1 ] +let g:airline#themes#lighthaus#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + + +" INACTIVE MODE +let s:IN1 = [ s:lh_gui8 , s:lh_gui1 , s:lh_cterm8, s:lh_cterm1 ] +let s:IN2 = [ s:lh_gui8 , s:lh_gui1 , s:lh_cterm8, s:lh_cterm1 ] +let s:IN3 = [ s:lh_gui8 , s:lh_gui1 , s:lh_cterm8, s:lh_cterm1 ] +let g:airline#themes#lighthaus#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) + + +" ACCENTS +let g:airline#themes#lighthaus#palette.accents = { + \ 'red': [ s:lh_gui9 , '' , s:lh_cterm9 , '' ] + \ } + + +" WARNING +let g:airline#themes#lighthaus#palette.normal_modified = { + \ 'airline_c': [ s:lh_gui10 , s:lh_gui1 , s:lh_cterm10 , s:lh_cterm1 , '' ] , + \ } + +let g:airline#themes#lighthaus#palette.insert_modified = { + \ 'airline_c': [ s:lh_gui11 , s:lh_gui1 , s:lh_cterm11 , s:lh_cterm1 , '' ] , + \ } + +let g:airline#themes#lighthaus#palette.visual_modified = { + \ 'airline_c': [ s:lh_gui12 , s:lh_gui1 , s:lh_cterm12 , s:lh_cterm1 , '' ] , + \ } + +let g:airline#themes#lighthaus#palette.replace_modified = { + \ 'airline_c': [ s:lh_gui13 , s:lh_gui1 , s:lh_cterm13 , s:lh_cterm1 , '' ] , + \ } + + +" ERROR +let g:airline#themes#lighthaus#palette.normal_error = { + \ 'airline_c': [ s:lh_gui9 , s:lh_gui1 , s:lh_cterm9 , s:lh_cterm1 , '' ] , + \ } + +let g:airline#themes#lighthaus#palette.insert_error = { + \ 'airline_c': [ s:lh_gui9 , s:lh_gui1 , s:lh_cterm9 , s:lh_cterm1 , '' ] , + \ } + + +" SETTINGS +let g:airline_symbols.paste = 'P' +let g:airline_symbols.spell = 'S' +let g:airline_section_z = airline#section#create(['%1p%% — ', + \ '%l%#__restore__#', ':%c']) + + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [ s:lh_gui1 , s:lh_gui7 , s:lh_cterm1, s:lh_cterm7 ] +let s:CP2 = [ s:lh_gui1 , s:lh_gui2 , s:lh_cterm1, s:lh_cterm2 ] +let s:CP3 = [ s:lh_gui1 , s:lh_gui5 , s:lh_cterm1, s:lh_cterm5 ] +let g:airline#themes#lighthaus#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim new file mode 100644 index 0000000..9cb4d07 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/lucius.vim @@ -0,0 +1,71 @@ +let g:airline#themes#lucius#palette = {} + +function! airline#themes#lucius#refresh() + + let s:N1 = airline#themes#get_highlight('StatusLine') + let s:N2 = airline#themes#get_highlight('Folded') + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#lucius#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let modified_group = airline#themes#get_highlight('Statement') + let g:airline#themes#lucius#palette.normal_modified = { + \ 'airline_c': [modified_group[0], '', modified_group[2], '', ''] + \ } + + let warning_group = airline#themes#get_highlight('DiffChange') + let g:airline#themes#lucius#palette.normal.airline_warning = warning_group + let g:airline#themes#lucius#palette.normal_modified.airline_warning = warning_group + + let error_group = airline#themes#get_highlight('DiffDelete') + let g:airline#themes#lucius#palette.normal.airline_error = error_group + let g:airline#themes#lucius#palette.normal_modified.airline_error = error_group + + let s:I1 = airline#themes#get_highlight('DiffAdd') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#lucius#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#lucius#palette.insert_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.insert.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.insert_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + let g:airline#themes#lucius#palette.insert.airline_error = g:airline#themes#lucius#palette.normal.airline_error + let g:airline#themes#lucius#palette.insert_modified.airline_error = g:airline#themes#lucius#palette.normal_modified.airline_error + + let s:R1 = airline#themes#get_highlight('DiffChange') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#lucius#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#lucius#palette.replace_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.replace.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.replace_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + let g:airline#themes#lucius#palette.replace.airline_error = g:airline#themes#lucius#palette.normal.airline_error + let g:airline#themes#lucius#palette.replace_modified.airline_error = g:airline#themes#lucius#palette.normal_modified.airline_error + + let s:V1 = airline#themes#get_highlight('Cursor') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#lucius#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#lucius#palette.visual_modified = g:airline#themes#lucius#palette.normal_modified + let g:airline#themes#lucius#palette.visual.airline_warning = g:airline#themes#lucius#palette.normal.airline_warning + let g:airline#themes#lucius#palette.visual_modified.airline_warning = g:airline#themes#lucius#palette.normal_modified.airline_warning + let g:airline#themes#lucius#palette.visual.airline_error = g:airline#themes#lucius#palette.normal.airline_error + let g:airline#themes#lucius#palette.visual_modified.airline_error = g:airline#themes#lucius#palette.normal_modified.airline_error + + let s:IA = airline#themes#get_highlight('StatusLineNC') + let g:airline#themes#lucius#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#lucius#palette.inactive_modified = { + \ 'airline_c': [ modified_group[0], '', modified_group[2], '', '' ] + \ } + + let g:airline#themes#lucius#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + " Extra tabline colors + let s:TS = airline#themes#get_highlight('TabLineSel') + let g:airline#themes#lucius#palette.tabline = {} + let g:airline#themes#lucius#palette.tabline.airline_tabsel = s:TS + let g:airline#themes#lucius#palette.tabline.airline_tabsel_right = s:TS + +endfunction + +call airline#themes#lucius#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim new file mode 100644 index 0000000..879d862 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/luna.vim @@ -0,0 +1,92 @@ +" vim-airline companion theme of Luna +" (https://github.com/Pychimp/vim-luna) + +let g:airline#themes#luna#palette = {} + +let g:airline#themes#luna#palette.accents = { + \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], + \ } + + +let s:N1 = [ '#ffffff' , '#005252' , 231 , 36 ] +let s:N2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:N3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#luna#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , + \ } + + +let s:I1 = [ '#ffffff' , '#789f00' , 231 , 106 ] +let s:I2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:I3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#luna#palette.insert_modified = { + \ 'airline_c': [ '#ffffff' , '#005e5e' , 255 , 52 , '' ] , + \ } +let g:airline#themes#luna#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#789f00' , s:I1[2] , 106 , '' ] , + \ } + + +let g:airline#themes#luna#palette.replace = copy(g:airline#themes#luna#palette.insert) +let g:airline#themes#luna#palette.replace.airline_a = [ s:I2[0] , '#920000' , s:I2[2] , 88 , '' ] +let g:airline#themes#luna#palette.replace_modified = g:airline#themes#luna#palette.insert_modified + +let s:V1 = [ '#ffff9a' , '#ff8036' , 222 , 208 ] +let s:V2 = [ '#ffffff' , '#003f3f' , 231 , 29 ] +let s:V3 = [ '#ffffff' , '#002b2b' , 231 , 23 ] +let g:airline#themes#luna#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#luna#palette.visual_modified = { + \ 'airline_c': [ '#ffffff' , '#450000' , 231 , 52 , '' ] , + \ } + +let s:IA = [ '#4e4e4e' , '#002b2b' , 59 , 23 , '' ] +let g:airline#themes#luna#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#luna#palette.inactive_modified = { + \ 'airline_c': [ '#e20000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#luna#palette.tabline = { + \ 'airline_tab': ['#2aa198', '#003f3f', 231, 29, ''], + \ 'airline_tabsel': ['#ffffff', '#2e8b57', 231, 36, ''], + \ 'airline_tabtype': ['#ffffff', '#005252', 231, 36, ''], + \ 'airline_tabfill': ['#ffffff', '#002b2b', 231, 23, ''], + \ 'airline_tabmod': ['#ffffff', '#780000', 231, 88, ''], + \ } + +let s:WI = [ '#ffffff', '#5f0000', 231, 88 ] +let g:airline#themes#luna#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#luna#palette.normal_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.insert.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.insert_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.visual.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.visual_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.replace.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + +let g:airline#themes#luna#palette.replace_modified.airline_warning = + \ g:airline#themes#luna#palette.normal.airline_warning + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#luna#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#ffffff' , '#002b2b' , 231 , 23 , '' ] , + \ [ '#ffffff' , '#005252' , 231 , 36 , '' ] , + \ [ '#ffffff' , '#973d45' , 231 , 95 , '' ] ) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim new file mode 100644 index 0000000..74abe3c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/minimalist.vim @@ -0,0 +1,81 @@ +" Minimalist Airline - A Material Color Scheme +" +" Author: Diki Ananta +" Repository: https://github.com/dikiaap/minimalist +" Version: 2.0 +" License: MIT + +let s:theme = 'minimalist' + +" To highlight when the buffer is modified: +" let g:airline_minimalist_showmod = 1 +let s:want_showmod = get(g:, 'airline_minimalist_showmod', 0) + +function! airline#themes#{s:theme}#refresh() + if &background == "dark" + " Normal + let N1 = [ '#E4E4E4', '#3A3A3A', 254, 237 ] + let N2 = [ '#E4E4E4', '#4E4E4E', 254, 239 ] + let N3 = [ '#EEEEEE', '#262626', 255, 235 ] + + " Inactive + let IA = [ '#666666', N3[1], 242, N3[3] ] + + " Error + let ER = [ '#1C1C1C', '#D75F5F', 234, 167 ] + + " Warning + let WI = [ ER[0], '#FFAF5F', ER[2], 215 ] + else + " Normal + let N1 = [ 'gray30', 'gray70', 235, 249 ] + let N2 = [ 'gray20', 'gray60', 233, 246 ] + let N3 = [ 'gray20', 'gray80', 233, 251 ] + + " Inactive + let IA = [ 'gray15', N3[1], 244, N3[3] ] + + " Error + let ER = [ '#1C1C1C', '#D75F5F', 234, 167 ] + + " Warning + let WI = [ ER[0], '#FFAF5F', ER[2], 215 ] + endif + + " Terminal + let TE = [ ER[0], N1[1], N1[2], N1[3] ] + + " Reverse + let NR = [ N2[1], N2[0], N2[3], N2[2], 'bold' ] + + + let palette = {} + + let palette.normal = airline#themes#generate_color_map(N1, N2, N3) + let palette.normal.airline_error = ER + let palette.normal.airline_warning = WI + let palette.normal.airline_term = TE + + let palette.insert = palette.normal + let palette.replace = palette.normal + let palette.visual = palette.normal + let palette.inactive = airline#themes#generate_color_map(IA, IA, IA) + + if s:want_showmod + let palette.normal_modified = { 'airline_a': NR, 'airline_z': NR } + endif + + " Accents + let palette.accents = { + \ 'red': [ ER[1], '', ER[3], '' ] + \ } + + " CtrlP + if get(g:, 'loaded_ctrlp', 0) + let palette.ctrlp = airline#extensions#ctrlp#generate_color_map(N3, N2, NR) + endif + + let g:airline#themes#{s:theme}#palette = palette +endfunction + +call airline#themes#{s:theme}#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim new file mode 100644 index 0000000..5c3b820 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/molokai.vim @@ -0,0 +1,76 @@ +let g:airline#themes#molokai#palette = {} +let g:airline#themes#molokai#palette.accents = { + \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], + \ } + +" Normal mode +let s:N1 = [ '#080808' , '#e6db74' , 232 , 144 ] " mode +if get(g:, 'airline_molokai_bright', 0) + let s:N2 = [ '#f8f8f0' , '#232526' , 253 , 208 ] " info +else + let s:N2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] " info +endif +let s:N3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] " statusline + +let g:airline#themes#molokai#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#molokai#palette.normal_modified = { + \ 'airline_c': [ '#080808' , '#e6db74' , 232 , 144 , '' ] , + \ } + +" Insert mode +let s:I1 = [ '#080808' , '#66d9ef' , 232 , 81 ] +if get(g:, 'airline_molokai_bright', 0) + let s:I2 = [ '#f8f8f0' , '#232526' , 253 , 208 ] +else + let s:I2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +endif +let s:I3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#molokai#palette.insert_modified = { + \ 'airline_c': [ '#080808' , '#66d9ef' , 232 , 81 , '' ] , + \ } + +" Replace mode +let s:R1 = [ '#080808' , '#f92672' , 232 , 161 ] +if get(g:, 'airline_molokai_bright', 0) + let s:R2 = [ '#f8f8f0' , '#232526' , 253 , 208 ] +else + let s:R2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +endif +let s:R3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#molokai#palette.replace_modified = { + \ 'airline_c': [ '#080808' , '#f92672' , 232 , 161 , '' ] , + \ } + +" Visual mode +let s:V1 = [ '#080808' , '#a6e22e' , 232 , 118 ] +if get(g:, 'airline_molokai_bright', 0) + let s:V2 = [ '#f8f8f0' , '#232526' , 253 , 208 ] +else + let s:V2 = [ '#f8f8f0' , '#232526' , 253 , 16 ] +endif +let s:V3 = [ '#f8f8f0' , '#465457' , 253 , 67 ] + +let g:airline#themes#molokai#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#molokai#palette.visual_modified = { + \ 'airline_c': [ '#080808' , '#a6e22e' , 232 , 118 , '' ] , + \ } + +" Inactive +let s:IA = [ '#1b1d1e' , '#465457' , 233 , 67 , '' ] +let g:airline#themes#molokai#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#molokai#palette.inactive_modified = { + \ 'airline_c': [ '#f8f8f0' , '' , 253 , '' , '' ] , + \ } + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#molokai#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#f8f8f0' , '#465457' , 253 , 67 , '' ] , + \ [ '#f8f8f0' , '#232526' , 253 , 16 , '' ] , + \ [ '#080808' , '#e6db74' , 232 , 144 , 'bold' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim new file mode 100644 index 0000000..3d8c2e9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/monochrome.vim @@ -0,0 +1,18 @@ +let g:airline#themes#monochrome#palette = {} + +function! airline#themes#monochrome#refresh() + let s:SL = airline#themes#get_highlight('StatusLine') + let s:SLNC = airline#themes#get_highlight('StatusLineNC') + + let g:airline#themes#monochrome#palette.normal = airline#themes#generate_color_map(s:SL, s:SL, s:SL) + let g:airline#themes#monochrome#palette.insert = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.replace = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.visual = g:airline#themes#monochrome#palette.normal + let g:airline#themes#monochrome#palette.normal.airline_error = s:SLNC + let g:airline#themes#monochrome#palette.normal.airline_warning = s:SLNC + let g:airline#themes#monochrome#palette.normal.airline_term = s:SL + + let g:airline#themes#monochrome#palette.inactive = airline#themes#generate_color_map(s:SLNC, s:SLNC, s:SLNC) +endfunction + +call airline#themes#monochrome#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim new file mode 100644 index 0000000..08e4757 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/murmur.vim @@ -0,0 +1,82 @@ +let g:airline#themes#murmur#palette = {} + +" Color palette +let s:cterm_termbg = 237 " Background for branch and file format blocks +let s:gui_termbg = '#5F5F5F' +let s:cterm_termfg = 144 " Foreground for branch and file format blocks +let s:gui_termfg = '#AFAF87' + +let s:cterm_termbg2 = 234 " Background for middle block +let s:gui_termbg2 = '#1C1C1C' +let s:cterm_termfg2 = 39 " Foreground for middle block +let s:gui_termfg2 = '#F5F5F5' + +let s:cterm_normalbg = 27 " Background for normal mode and file position blocks +let s:gui_normalbg = '#5F87FF' +let s:cterm_normalfg = 15 " Foreground for normal mode and file position blocks +let s:gui_normalfg = '#FFFFFF' + +let s:cterm_insertbg = 70 " Background for insert mode and file position blocks +let s:gui_insertbg = '#87AF5F' +let s:cterm_insertfg = 15 " Foreground for insert mode and file position blocks +let s:gui_insertfg = '#FFFFFF' + +let s:cterm_visualbg = 166 " Background for visual mode and file position blocks +let s:gui_visualbg = '#ff8c00' +let s:cterm_visualfg = 15 " Foreground for visual mode and file position blocks +let s:gui_visualfg = '#FFFFFF' + +let s:cterm_replacebg = 88 " Background for replace mode and file position blocks +let s:gui_replacebg = '#870000' +let s:cterm_replacefg = 15 " Foreground for replace mode and file position blocks +let s:gui_replacefg = '#FFFFFF' + +let s:cterm_alert = 88 " Modified file alert color +let s:gui_alert = '#870000' + +let s:cterm_inactivebg = 234 " Background for inactive mode +let s:gui_inactivebg = '#1C1C1C' +let s:cterm_inactivefg = 239 " Foreground for inactive mode +let s:gui_inactivefg = '#4E4E4E' + +" Branch and file format +let s:BB = [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg] " Branch and file format blocks + +" Normal mode +let s:N1 = [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg] " Outside blocks in normal mode +let s:N2 = [s:gui_termfg2, s:gui_termbg2, s:cterm_normalbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.normal = airline#themes#generate_color_map(s:N1, s:BB, s:N2) +let g:airline#themes#murmur#palette.normal_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Insert mode +let s:I1 = [s:gui_insertfg, s:gui_insertbg, s:cterm_insertfg, s:cterm_insertbg] " Outside blocks in insert mode +let s:I2 = [s:gui_insertbg, s:gui_termbg2, s:cterm_insertbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.insert = airline#themes#generate_color_map(s:I1, s:BB, s:I2) +let g:airline#themes#murmur#palette.insert_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Replace mode +let s:R1 = [s:gui_replacefg, s:gui_replacebg, s:cterm_replacefg, s:cterm_replacebg] " Outside blocks in replace mode +let s:R2 = [s:gui_termfg, s:gui_termbg2, s:cterm_termfg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.replace = airline#themes#generate_color_map(s:R1, s:BB, s:R2) +let g:airline#themes#murmur#palette.replace_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Visual mode +let s:V1 = [s:gui_visualfg, s:gui_visualbg, s:cterm_visualfg, s:cterm_visualbg] " Outside blocks in visual mode +let s:V2 = [s:gui_visualbg, s:gui_termbg2, s:cterm_visualbg, s:cterm_termbg2] " Middle block +let g:airline#themes#murmur#palette.visual = airline#themes#generate_color_map(s:V1, s:BB, s:V2) +let g:airline#themes#murmur#palette.visual_modified = {'airline_c': [s:gui_alert, s:gui_termbg2, s:cterm_alert, s:cterm_termbg2, 'bold'] ,} + +" Inactive mode +let s:IA1 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA2 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let s:IA3 = [s:gui_inactivefg, s:gui_inactivebg, s:cterm_inactivefg, s:cterm_inactivebg, ''] +let g:airline#themes#murmur#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + +" CtrlP plugin colors +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#murmur#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [s:gui_normalfg, s:gui_normalbg, s:cterm_normalfg, s:cterm_normalbg, ''], + \ [s:gui_termfg, s:gui_termbg, s:cterm_termfg, s:cterm_termbg, ''], + \ [s:gui_termfg2, s:gui_termbg2, s:cterm_termfg2, s:cterm_termbg2, 'bold']) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/night_owl.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/night_owl.vim new file mode 100644 index 0000000..7350f43 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/night_owl.vim @@ -0,0 +1,60 @@ +" Port/inspired from https://github.com/sdras/night-owl-vscode-theme +" Jared Ramirez + +let s:gui_black = "#282C34" +let s:cterm_black = 16 + +let s:gui_purple = "#C792EA" +let s:cterm_purple = 176 +let s:gui_purple_offset = "#9f74bb" +let s:cterm_purple_offset = 139 + +let s:gui_yellow = "#FFD787" +let s:cterm_yellow = 222 +let s:gui_yellow_offset = "#ccac6c" +let s:cterm_yellow_offset = 179 + +let s:gui_blue = "#81AAFF" +let s:cterm_blue = 111 +let s:gui_blue_offset = "#6788cc" +let s:cterm_blue_offset = 68 + +let s:gui_cyan = "#83DCC8" +let s:cterm_cyan = 116 +let s:gui_cyan_offset = "#68b0a0" +let s:cterm_cyan_offset = 73 + +let s:gui_green = "#AFD75F" +let s:cterm_green = 149 +let s:gui_green_offset = "#8cac4c" +let s:cterm_green_offset = 107 + +let s:gui_white = "#FFFFFF" +let s:cterm_white = 255 + +let g:airline#themes#night_owl#palette = {} + +let s:N1 = [ s:gui_black, s:gui_cyan, s:cterm_black, s:cterm_cyan ] +let s:N2 = [ s:gui_black, s:gui_cyan_offset, s:cterm_black, s:cterm_cyan_offset ] +let s:N3 = [ s:gui_cyan, s:gui_black, s:cterm_cyan, s:cterm_black ] +let g:airline#themes#night_owl#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui_black, s:gui_green, s:cterm_black, s:cterm_green ] +let s:I2 = [ s:gui_black, s:gui_green_offset, s:cterm_black, s:cterm_green_offset ] +let s:I3 = [ s:gui_green, s:gui_black, s:cterm_green, s:cterm_black ] +let g:airline#themes#night_owl#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:V1 = [ s:gui_black, s:gui_blue, s:cterm_black, s:cterm_blue ] +let s:V2 = [ s:gui_black, s:gui_blue_offset, s:cterm_black, s:cterm_blue_offset ] +let s:V3 = [ s:gui_blue, s:gui_black, s:cterm_blue, s:cterm_black ] +let g:airline#themes#night_owl#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:R1 = [ s:gui_black, s:gui_yellow, s:cterm_black, s:cterm_yellow ] +let s:R2 = [ s:gui_black, s:gui_yellow_offset, s:cterm_black, s:cterm_yellow_offset ] +let s:R3 = [ s:gui_yellow, s:gui_black, s:cterm_yellow, s:cterm_black ] +let g:airline#themes#night_owl#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:IA1 = [ s:gui_black, s:gui_purple, s:cterm_black, s:cterm_purple ] +let s:IA2 = [ s:gui_purple, s:gui_black, s:cterm_purple, s:cterm_black ] +let s:IA3 = [ s:gui_purple, s:gui_black, s:cterm_purple, s:cterm_black ] +let g:airline#themes#night_owl#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/nord_minimal.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/nord_minimal.vim new file mode 100644 index 0000000..4b60b92 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/nord_minimal.vim @@ -0,0 +1,60 @@ +let g:airline#themes#nord_minimal#palette = {} +let s:gui00 = '#2e3440' +let s:gui01 = '#3b4252' +let s:gui02 = '#434c5e' +let s:gui03 = '#4c566a' +let s:gui04 = '#d8dee9' +let s:gui05 = '#e5e9f0' +let s:gui06 = '#eceff4' +let s:gui07 = '#8fbcbb' +let s:gui08 = '#88c0d0' +let s:gui09 = '#81a1c1' +let s:gui0A = '#5e81ac' +let s:gui0B = '#bf616a' +let s:gui0C = '#d08770' +let s:gui0D = '#ebcb8b' +let s:gui0E = '#a3be8c' +let s:gui0F = '#b48ead' + +let s:cterm00 = 0 +let s:cterm01 = 0 +let s:cterm02 = 59 +let s:cterm03 = 102 +let s:cterm04 = 145 +let s:cterm05 = 188 +let s:cterm06 = 253 +let s:cterm07 = 15 +let s:cterm08 = 166 +let s:cterm09 = 203 +let s:cterm0A = 214 +let s:cterm0B = 29 +let s:cterm0C = 12 +let s:cterm0D = 12 +let s:cterm0E = 134 +let s:cterm0F = 12 + +let s:N1 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:N2 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:N3 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let g:airline#themes#nord_minimal#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let s:I1 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:I2 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:I3 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let g:airline#themes#nord_minimal#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + +let s:R1 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:R2 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:R3 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let g:airline#themes#nord_minimal#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + +let s:V1 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:V2 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:V3 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let g:airline#themes#nord_minimal#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + +let s:IA1 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:IA2 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let s:IA3 = [ s:gui09, s:gui02, s:cterm09, s:cterm02 ] +let g:airline#themes#nord_minimal#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim new file mode 100644 index 0000000..7bb054b --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/onedark.vim @@ -0,0 +1,140 @@ +" [onedark.vim](https://github.com/joshdick/onedark.vim/) + +" This is a [vim-airline](https://github.com/vim-airline/vim-airline) theme for use with +" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme. + +" It is based on vim-airline's ["tomorrow" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/tomorrow.vim). +function! airline#themes#onedark#refresh() + + if get(g:, 'onedark_termcolors', 256) == 16 + let s:term_red = 1 + let s:term_green = 2 + let s:term_yellow = 3 + let s:term_blue = 4 + let s:term_purple = 5 + let s:term_white = 7 + let s:term_black = 0 + let s:term_grey = 8 + else + let s:term_red = 204 + let s:term_green = 114 + let s:term_yellow = 180 + let s:term_blue = 39 + let s:term_purple = 170 + let s:term_white = 145 + let s:term_black = 235 + let s:term_grey = 236 + endif + + let g:airline#themes#onedark#palette = {} + + let g:airline#themes#onedark#palette.accents = { + \ 'red': [ '#E06C75', '', s:term_red, 0 ] + \ } + + let s:N1 = [ '#282C34', '#98C379', s:term_black, s:term_green ] + let s:N2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] + let s:N3 = [ '#98C379', '#282C34', s:term_green, s:term_grey ] + let g:airline#themes#onedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('vimCommand') + let g:airline#themes#onedark#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = [ '#282C34', '#61AFEF', s:term_black, s:term_blue ] + let s:I2 = s:N2 + let s:I3 = [ '#61AFEF', '#282C34', s:term_blue, s:term_grey ] + let g:airline#themes#onedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#onedark#palette.insert_modified = g:airline#themes#onedark#palette.normal_modified + + let s:R1 = [ '#282C34', '#E06C75', s:term_black, s:term_red ] + let s:R2 = s:N2 + let s:R3 = [ '#E06C75', '#282C34', s:term_red, s:term_grey ] + let g:airline#themes#onedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#onedark#palette.replace_modified = g:airline#themes#onedark#palette.normal_modified + + let s:V1 = [ '#282C34', '#C678DD', s:term_black, s:term_purple ] + let s:V2 = s:N2 + let s:V3 = [ '#C678DD', '#282C34', s:term_purple, '' ] + let g:airline#themes#onedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#onedark#palette.visual_modified = g:airline#themes#onedark#palette.normal_modified + + let s:IA1 = [ '#282C34', '#ABB2BF', s:term_black, s:term_white ] + let s:IA2 = [ '#ABB2BF', '#3E4452', s:term_white, s:term_grey ] + let s:IA3 = s:N2 + let g:airline#themes#onedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) + let g:airline#themes#onedark#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + " Match :term colors + let g:airline#themes#onedark#palette.terminal = + \ airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#onedark#palette.terminal.airline_term = s:I3 + let g:airline#themes#onedark#palette.normal.airline_term = s:N3 + let g:airline#themes#onedark#palette.normal_modified.airline_term = s:N3 + let g:airline#themes#onedark#palette.visual.airline_term = s:V3 + let g:airline#themes#onedark#palette.visual_modified.airline_term = s:V3 + let g:airline#themes#onedark#palette.inactive.airline_term = s:IA2 + let g:airline#themes#onedark#palette.inactive_modified.airline_term = s:IA2 + + " Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim) + + " Warnings + let s:WI = [ '#282C34', '#E5C07B', s:term_black, s:term_yellow ] + let g:airline#themes#onedark#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + + let g:airline#themes#onedark#palette.normal_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.insert.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.insert_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.visual.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.visual_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.replace.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + let g:airline#themes#onedark#palette.replace_modified.airline_warning = + \ g:airline#themes#onedark#palette.normal.airline_warning + + " Errors + let s:ER = [ '#282C34', '#E06C75', s:term_black, s:term_red ] + let g:airline#themes#onedark#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] + + let g:airline#themes#onedark#palette.normal_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.insert.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.insert_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.visual.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.visual_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.replace.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + + let g:airline#themes#onedark#palette.replace_modified.airline_error = + \ g:airline#themes#onedark#palette.normal.airline_error + +endfunction + +call airline#themes#onedark#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/owo.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/owo.vim new file mode 100644 index 0000000..792a4c0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/owo.vim @@ -0,0 +1,85 @@ +let s:gui_dark_gray = '#303030' +let s:cterm_dark_gray = 236 + +let s:gui_med_gray_hi = '#444444' +let s:cterm_med_gray_hi = 238 + +let s:gui_med_gray_lo = '#3a3a3a' +let s:cterm_med_gray_lo = 237 + +let s:gui_light_gray = '#b2b2b2' +let s:cterm_light_gray = 249 + +let s:gui_deep_green = '#5faf00' +let s:cterm_deep_green = 70 + +let s:gui_green = '#afd787' +let s:cterm_green = 150 + +let s:gui_light_blue = '#00afff' +let s:cterm_light_blue = 39 + +let s:gui_blue = '#87afd7' +let s:cterm_blue = 110 + +let s:gui_sky_blue = '#87afff' +let s:cterm_sky_blue = 111 + +let s:gui_purple = '#afafd7' +let s:cterm_purple = 146 + +let s:gui_orange = '#d7af5f' +let s:cterm_orange = 179 + +let s:gui_red = '#d78787' +let s:cterm_red = 174 + +let s:gui_pink = '#d7afd7' +let s:cterm_pink = 182 + +let g:airline#themes#owo#palette = {} + +" Normal mode +let s:N1 = [s:gui_dark_gray, '#87d7ff', s:cterm_dark_gray, 117] +let s:N2 = [s:gui_light_gray, s:gui_med_gray_lo, s:cterm_light_gray, s:cterm_med_gray_lo] +let s:N3 = ['#87d7ff', s:gui_med_gray_hi, 117, s:cterm_med_gray_hi] +let g:airline#themes#owo#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#owo#palette.normal_modified = { + \ 'airline_c': [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi, ''], + \ } + +" Insert mode +let s:I1 = [s:gui_med_gray_hi, s:gui_blue, s:cterm_med_gray_hi, s:cterm_blue] +let s:I3 = [s:gui_blue, s:gui_med_gray_hi, s:cterm_blue, s:cterm_med_gray_hi] +let g:airline#themes#owo#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:I3) +let g:airline#themes#owo#palette.insert_modified = copy(g:airline#themes#owo#palette.normal_modified) +let g:airline#themes#owo#palette.insert_paste = { + \ 'airline_a': [s:gui_dark_gray, s:gui_orange, s:cterm_dark_gray, s:cterm_orange, ''], + \ } + +" Replace mode +let g:airline#themes#owo#palette.replace = { + \ 'airline_a': [s:gui_dark_gray, '#8787ff', s:cterm_dark_gray, 105, ''], + \ 'airline_c': ['#8787ff', s:gui_med_gray_hi, 105, s:cterm_med_gray_hi, ''], + \ } +let g:airline#themes#owo#palette.replace_modified = copy(g:airline#themes#owo#palette.insert_modified) + +" Visual mode +let s:V1 = [s:gui_dark_gray, '#87d787', s:cterm_dark_gray, 114] +let s:V3 = ['#87d787', s:gui_med_gray_hi, 114, s:cterm_med_gray_hi] +let g:airline#themes#owo#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:V3) +let g:airline#themes#owo#palette.visual_modified = copy(g:airline#themes#owo#palette.insert_modified) + +" Inactive window +let s:IA = [s:gui_light_gray, s:gui_med_gray_hi, s:cterm_light_gray, s:cterm_med_gray_hi, ''] +let g:airline#themes#owo#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#owo#palette.inactive_modified = copy(g:airline#themes#owo#palette.normal_modified) + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#owo#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ s:gui_orange, s:gui_med_gray_hi, s:cterm_orange, s:cterm_med_gray_hi, '' ] , + \ [ s:gui_orange, s:gui_med_gray_lo, s:cterm_orange, s:cterm_med_gray_lo, '' ] , + \ [ s:gui_dark_gray, s:gui_green, s:cterm_dark_gray, s:cterm_green, 'bold' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim new file mode 100644 index 0000000..a5d73ac --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/papercolor.vim @@ -0,0 +1,66 @@ +let g:airline#themes#papercolor#palette = {} + +let g:airline#themes#papercolor#palette.accents = { + \ 'red': [ '#66d9ef' , '' , 81 , '' , '' ], + \ } + +" Normal Mode: +let s:N1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode +let s:N2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info +let s:N3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine + + +let g:airline#themes#papercolor#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#papercolor#palette.normal_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Insert Mode: +let s:I1 = [ '#585858' , '#e4e4e4' , 240 , 254 ] " Mode +let s:I2 = [ '#e4e4e4' , '#0087af' , 254 , 31 ] " Info +let s:I3 = [ '#eeeeee' , '#005f87' , 255 , 24 ] " StatusLine + + +let g:airline#themes#papercolor#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#papercolor#palette.insert_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Replace Mode: +let g:airline#themes#papercolor#palette.replace = copy(g:airline#themes#papercolor#palette.insert) +let g:airline#themes#papercolor#palette.replace.airline_a = [ '#d7005f' , '#e4e4e4' , 161 , 254, '' ] +let g:airline#themes#papercolor#palette.replace_modified = { + \ 'airline_c': [ '#eeeeee' , '#005f87' , 255 , 24 , '' ] , + \ } + + +" Visual Mode: +let s:V1 = [ '#005f87', '#e4e4e4', 24, 254 ] +let s:V2 = [ '', '#0087af', '', 31 ] +let s:V3 = [ '#e4e4e4', '#005f87', 254, 24 ] + +let g:airline#themes#papercolor#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#papercolor#palette.visual_modified = { + \ 'airline_c': [ '#e4e4e4', '#005f87', 254, 24 ] , + \ } + +" Inactive: +let s:IA = [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] +let g:airline#themes#papercolor#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#papercolor#palette.inactive.airline_c = s:N2 +let g:airline#themes#papercolor#palette.inactive_modified = { + \ 'airline_c': [ '#585858' , '#e4e4e4' , 240 , 254 , '' ] , + \ } + + +" CtrlP: +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#papercolor#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#e4e4e4' , '#005f87' , 254 , 24 , '' ] , + \ [ '#e4e4e4' , '#0087af' , 254 , 31 , '' ] , + \ [ '#585858' , '#e4e4e4' , 240 , 254 , 'bold' ] ) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/peaksea.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/peaksea.vim new file mode 100644 index 0000000..3ba5ff4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/peaksea.vim @@ -0,0 +1,75 @@ +" peaksea Airline theme +" +" Author: Jonathan Dion +" Version: 1.0 +" License: MIT + +" Normal Mode +let s:N1 = [ '#3A3A3A' , '#C0D8F8' , 254 , 237 ] +let s:N2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:N3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Insert Mode +let s:I1 = [ '#3A3A3A' , '#60F080' , 254 , 237 ] +let s:I2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:I3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Visual Mode +let s:V1 = [ '#3A3A3A' , '#F0C0F0' , 254 , 237 ] +let s:V2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:V3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Replace Mode +let s:R1 = [ '#3A3A3A' , '#D0D090' , 254 , 237 ] +let s:R2 = [ '#E4E4E4' , '#4E4E4E' , 254 , 239 ] +let s:R3 = [ '#EEEEEE' , '#262626' , 255 , 235 ] + +" Inactive Mode +let s:IA = [ '#666666' , '#262626' , 242 , 235 , '' ] + +let g:airline#themes#peaksea#palette = {} +let g:airline#themes#peaksea#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#peaksea#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#peaksea#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#peaksea#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#peaksea#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + +" Warning Mode +let s:WI = [ '#1C1C1C' , '#E0C060' , 234 , 215 , '' ] +let g:airline#themes#peaksea#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] +let g:airline#themes#peaksea#palette.insert.airline_warning = g:airline#themes#peaksea#palette.normal.airline_warning +let g:airline#themes#peaksea#palette.visual.airline_warning = g:airline#themes#peaksea#palette.normal.airline_warning +let g:airline#themes#peaksea#palette.replace.airline_warning = g:airline#themes#peaksea#palette.normal.airline_warning + +" Error Mode +let s:ER = [ '#1C1C1C' , '' , 234 , 167 , '' ] +let g:airline#themes#peaksea#palette.normal.airline_error = [ + \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] + \ ] +let g:airline#themes#peaksea#palette.insert.airline_error = g:airline#themes#peaksea#palette.normal.airline_error +let g:airline#themes#peaksea#palette.visual.airline_error = g:airline#themes#peaksea#palette.normal.airline_error +let g:airline#themes#peaksea#palette.replace.airline_error = g:airline#themes#peaksea#palette.normal.airline_error + +" Terminal +let s:TE = [ '#1C1C1C' , '#3A3A3A' , 254 , 237 , '' ] +let g:airline#themes#peaksea#palette.normal.airline_term = [ + \ s:TE[0], s:TE[1], s:TE[2], s:TE[3] + \ ] +let g:airline#themes#peaksea#palette.insert.airline_term = g:airline#themes#peaksea#palette.normal.airline_term +let g:airline#themes#peaksea#palette.visual.airline_term = g:airline#themes#peaksea#palette.normal.airline_term +let g:airline#themes#peaksea#palette.replace.airline_term = g:airline#themes#peaksea#palette.normal.airline_term + +" Accents +let g:airline#themes#peaksea#palette.accents = { + \ 'red': [ '#D75F5F' , '' , 167 , '' ] + \ } + +" CtrlP +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#peaksea#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#E4E4E4' , '#262626' , 254 , 235 , '' ], + \ [ '#E4E4E4' , '#4E4E4E' , 254 , 239 , '' ], + \ [ '#585858' , '#E4E4E4' , 240 , 254 , 'bold' ]) +endif diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim new file mode 100644 index 0000000..3d3f6a0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/powerlineish.vim @@ -0,0 +1,49 @@ +" Theme to mimic the default colorscheme of powerline +" Not 100% the same so it's powerline... ish. +" +" Differences from default powerline: +" * Paste indicator isn't colored different +" * Far right hand section matches the color of the mode indicator +" +" Differences from other airline themes: +" * No color differences when you're in a modified buffer +" * Visual mode only changes the mode section. Otherwise +" it appears the same as normal mode + +" Normal mode " fg & bg +let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ] " darkestgreen & brightgreen +let s:N2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] " gray8 & gray2 +let s:N3 = [ '#ffffff' , '#121212' , 231 , 233 ] " white & gray4 + +" Insert mode " fg & bg +let s:I1 = [ '#005f5f' , '#ffffff' , 23 , 231 ] " darkestcyan & white +let s:I2 = [ '#5fafd7' , '#0087af' , 74 , 31 ] " darkcyan & darkblue +let s:I3 = [ '#87d7ff' , '#005f87' , 117 , 24 ] " mediumcyan & darkestblue + +" Visual mode " fg & bg +let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] " gray3 & brightestorange + +" Replace mode " fg & bg +let s:RE = [ '#ffffff' , '#d70000' , 231 , 160 ] " white & brightred + +let g:airline#themes#powerlineish#palette = {} + +let g:airline#themes#powerlineish#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#powerlineish#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#powerlineish#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ], + \ 'airline_z': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#powerlineish#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ], + \ 'airline_z': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#powerlineish#palette.replace = copy(airline#themes#powerlineish#palette.normal) +let g:airline#themes#powerlineish#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] +let g:airline#themes#powerlineish#palette.replace.airline_z = g:airline#themes#powerlineish#palette.replace.airline_a + + +let s:IA = [ s:N2[0] , s:N3[1] , s:N2[2] , s:N3[3] , '' ] +let g:airline#themes#powerlineish#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim new file mode 100644 index 0000000..c028aca --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/qwq.vim @@ -0,0 +1,61 @@ +" github: https://github.com/LuciusChen +scriptencoding utf-8 + +let g:airline#themes#qwq#palette = {} + +" normalmode +let s:N1 = [ '#0E3B4F' , '#FFEEE5' , 17 , 190 ] +let s:N2 = [ '#0E3B4F' , '#FFD3CB' , 255 , 238 ] +let s:N3 = [ '#ffffff' , '#F7846E' , 85 , 234 ] +let s:N4 = [ '#ffffff' , '#FF5D4F' , 255 , 53 ] +let g:airline#themes#qwq#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#qwq#palette.normal_modified = { 'airline_c': [ s:N4[0], s:N4[1], s:N4[2], s:N4[3], '' ], } + +" insertmode +let s:I1 = [ '#0E3B4F' , '#FFF5D9' , 17 , 45 ] +let s:I2 = [ '#0E3B4F' , '#DDE58E' , 255 , 27 ] +let s:I3 = [ '#ffffff' , '#9ED47B' , 15 , 17 ] +let s:I4 = [ '#ffffff' , '#6BAD3F' , 255 , 53 ] +let s:I5 = [ '#ffffff' , '#6BAD3F' , 17 , 172 ] +let g:airline#themes#qwq#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#qwq#palette.insert_modified = { 'airline_c': [ s:I4[0], s:I4[1], s:I4[2], s:I4[3], '' ], } +let g:airline#themes#qwq#palette.insert_paste = { 'airline_a': [ s:I5[0], s:I5[2], s:I5[2], s:I5[3], '' ], } + +" replacemode +let s:R1 = [ '#0E3B4F' , '#C1F9CD' , 17 , 45 ] +let s:R2 = [ '#0E3B4F' , '#8BEFC7' , 255 , 27 ] +let s:R3 = [ '#ffffff' , '#04BEC3' , 15 , 17 ] +let s:R4 = [ '#ffffff' , '#008492' , 255 , 53 ] +let g:airline#themes#qwq#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#qwq#palette.replace.airline_a = [ s:R1[0], s:R1[1], s:R2[2], 124, ''] +let g:airline#themes#qwq#palette.replace_modified = { 'airline_c': [ s:R4[0], s:R4[1], s:R4[2], s:R4[3], '' ], } + + +" visualmode +let s:V1 = [ '#0E3B4F' , '#FFEEE5' , 232 , 214 ] +let s:V2 = [ '#0E3B4F' , '#FF9DA5' , 232 , 202 ] +let s:V3 = [ '#ffffff' , '#FF5B6F' , 15 , 52 ] +let s:V4 = [ '#ffffff' , '#FF003F' , 255 , 53 ] +let g:airline#themes#qwq#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#qwq#palette.visual_modified = { 'airline_c': [ s:V4[0], s:V4[1], s:V4[2], s:V4[3], '' ], } + +" inactive +let s:IA1 = [ '#0E3B4F' , '#FEFCF9' , 239 , 234 , '' ] +let s:IA2 = [ '#0E3B4F' , '#DDC6AF' , 239 , 235 , '' ] +let s:IA3 = [ '#ffffff' , '#A28E79' , 239 , 236 , '' ] +let g:airline#themes#qwq#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#qwq#palette.inactive_modified = { 'airline_c': [ '#ffffff', '', 97, '', '' ], } + +let g:airline#themes#qwq#palette.accents = { 'red': [ '#ffffff', '', 160, '' ] } + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let s:C1 = [ '#0E3B4F' , '#FEFCF9' , 189 , 55 , '' ] +let s:C2 = [ '#0E3B4F' , '#DDC6AF' , 231 , 98 , '' ] +let s:C3 = [ '#ffffff' , '#B9A695' , 55 , 231 , '' ] +let g:airline#themes#qwq#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:C1, s:C2, s:C3) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim new file mode 100644 index 0000000..02bfd73 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/raven.vim @@ -0,0 +1,85 @@ +let g:airline#themes#raven#palette = {} + +let g:airline#themes#raven#palette.accents = { + \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], + \ } + +let s:N1 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let s:N2 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] +let g:airline#themes#raven#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#raven#palette.normal_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } + +let s:I1 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let s:I2 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let s:I3 = [ '#11c279' , '#2e2e2e' , 36 , 235 ] +let g:airline#themes#raven#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#raven#palette.insert_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } +let g:airline#themes#raven#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#2e2e2e' , s:I1[2] , 235 , '' ] , + \ } + +let g:airline#themes#raven#palette.replace = copy(g:airline#themes#raven#palette.insert) +let g:airline#themes#raven#palette.replace.airline_a = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] +let g:airline#themes#raven#palette.replace.airline_z = [ '#e60000' , s:I1[1] , 160 , s:I1[3] , '' ] +let g:airline#themes#raven#palette.replace_modified = g:airline#themes#raven#palette.insert_modified + +let s:V1 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let s:V2 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let s:V3 = [ '#6565ff' , '#2e2e2e' , 63 , 235 ] +let g:airline#themes#raven#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#raven#palette.visual_modified = { + \ 'airline_c': [ '#e25000' , '#2e2e2e' , 166 , 235 , '' ] , + \ } + +let s:IA = [ '#5e5e5e' , '#222222' , 59 , 235 , '' ] +let g:airline#themes#raven#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#raven#palette.inactive_modified = { + \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#raven#palette.tabline = { + \ 'airline_tab': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabsel': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], + \ 'airline_tabtype': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabfill': ['#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ], + \ 'airline_tabmod': ['#2e2e2e' , '#a4c639' , 235 , 149 , '' ], + \ } + +let s:WI = [ '#ff0000', '#2e2e2e', 196, 235 ] +let g:airline#themes#raven#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#raven#palette.normal_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.insert.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.insert_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.visual.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.visual_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.replace.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +let g:airline#themes#raven#palette.replace_modified.airline_warning = + \ g:airline#themes#raven#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#raven#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , + \ [ '#c8c8c8' , '#2e2e2e' , 188 , 235 , '' ] , + \ [ '#2e2e2e' , '#a4c639' , 235 , 149 , '' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim new file mode 100644 index 0000000..0f244ca --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ravenpower.vim @@ -0,0 +1,36 @@ +" Pretty much powerlineish clone, and some +" of the hex colours was borrowed from raven + +" Normal mode " fg & bg +let s:N1 = [ '#005f00' , '#1d1f21' , 7 , 8 ] " darkestgreen & brightgreen +let s:N2 = [ '#9e9e9e' , '#303030' , 247 , 236 ] " gray8 & gray2 +let s:N3 = [ '#c8c8c8' , '#2e2e2e' , 188 , 235 ] " white & gray4 + +" Insert mode " fg & bg +"let s:I1 = [ '#005f5f' , '#ffffff' , 23 , 231 ] " darkestcyan & white +"let s:I2 = [ '#5fafd7' , '#0087af' , 74 , 31 ] " darkcyan & darkblue +let s:I1 = [ '#87d7ff' , '#1d1f21' , 7 , 24 ] " mediumcyan & darkestblue + +" Visual mode " fg & bg +let s:V1 = [ '#080808' , '#ffaf00' , 232 , 214 ] " gray3 & brightestorange + +" Replace mode " fg & bg +let s:RE = [ '#ffffff' , '#d70000' , 231 , 160 ] " white & brightred + +let g:airline#themes#ravenpower#palette = {} + +let g:airline#themes#ravenpower#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#ravenpower#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:N3) +let g:airline#themes#ravenpower#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#ravenpower#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#ravenpower#palette.replace = copy(airline#themes#ravenpower#palette.normal) +let g:airline#themes#ravenpower#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + + +let s:IA = [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] +let g:airline#themes#ravenpower#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seagull.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seagull.vim new file mode 100644 index 0000000..7fa0a0a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seagull.vim @@ -0,0 +1,189 @@ +" Airline theme for Seabird/Seagull: +" https://github.com/nightsense/seabird/blob/master/colors/seagull.vim +" +" Based on Solarized theme code: +" https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/solarized.vim +let g:airline#themes#seagull#palette = {} + +function! airline#themes#seagull#refresh() + """""""""""""""""""""""""""""""""""""""""""""""" + " Options + """""""""""""""""""""""""""""""""""""""""""""""" + let s:background = get(g:, 'airline_seagull_bg', &background) + let s:ansi_colors = get(g:, 'seagull_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0 + let s:use_green = get(g:, 'airline_seagull_normal_green', 0) + let s:dark_inactive_border = get(g:, 'airline_seagull_dark_inactive_border', 0) + let s:tty = &t_Co == 8 + + """""""""""""""""""""""""""""""""""""""""""""""" + " Colors + """""""""""""""""""""""""""""""""""""""""""""""" + " Base colors + let s:base03 = {'t': 234, 'g': '#0b141a'} + let s:base02 = {'t': 235, 'g': '#1d252b'} + let s:base01 = {'t': 240, 'g': '#61707a'} + let s:base00 = {'t': 241, 'g': '#6d767d'} + let s:base0 = {'t': 244, 'g': '#787e82'} + let s:base1 = {'t': 245, 'g': '#808487'} + let s:base2 = {'t': 254, 'g': '#e6eaed'} + let s:base3 = {'t': 230, 'g': '#ffffff'} + let s:yellow = {'t': 136, 'g': '#bf8c00'} + let s:orange = {'t': 166, 'g': '#ff6200'} + let s:red = {'t': 160, 'g': '#ff4053'} + let s:magenta = {'t': 125, 'g': '#ff549b'} + let s:violet = {'t': 61, 'g': '#9854ff'} + let s:blue = {'t': 33, 'g': '#0099ff'} + let s:cyan = {'t': 37, 'g': '#00a5ab'} + let s:green = {'t': 64, 'g': '#11ab00'} + + """""""""""""""""""""""""""""""""""""""""""""""" + " Simple mappings + " NOTE: These are easily tweakable mappings. The actual mappings get + " the specific gui and terminal colors from the base color dicts. + """""""""""""""""""""""""""""""""""""""""""""""" + " Normal mode + if s:background == 'dark' + let s:N1 = [s:base3, (s:use_green ? s:green : s:base1), 'bold'] + let s:N2 = [s:base2, (s:tty ? s:base01 : s:base00), ''] + let s:N3 = [s:base01, s:base02, ''] + else + let s:N1 = [s:base2, (s:use_green ? s:green : s:base00), 'bold'] + let s:N2 = [(s:tty ? s:base01 : s:base2), s:base1, ''] + let s:N3 = [s:base1, s:base2, ''] + endif + let s:NF = [s:orange, s:N3[1], ''] + let s:NW = [s:base3, s:orange, ''] + if s:background == 'dark' + let s:NM = [s:base1, s:N3[1], ''] + let s:NMi = [s:base2, s:N3[1], ''] + else + let s:NM = [s:base01, s:N3[1], ''] + let s:NMi = [s:base02, s:N3[1], ''] + endif + + " Insert mode + let s:I1 = [s:N1[0], s:cyan, 'bold'] + let s:I2 = s:N2 + let s:I3 = s:N3 + let s:IF = s:NF + let s:IM = s:NM + + " Visual mode + let s:V1 = [s:N1[0], s:green, 'bold'] + let s:V2 = s:N2 + let s:V3 = s:N3 + let s:VF = s:NF + let s:VM = s:NM + + " Replace mode + let s:R1 = [s:N1[0], s:red, ''] + let s:R2 = s:N2 + let s:R3 = s:N3 + let s:RM = s:NM + let s:RF = s:NF + + " Inactive, according to VertSplit in seagull + " (bg dark: base00; bg light: base0) + if s:background == 'dark' + if s:dark_inactive_border + let s:IA = [s:base01, s:base02, ''] + else + let s:IA = [s:base02, s:base00, ''] + endif + else + let s:IA = [s:base2, s:base0, ''] + endif + + """""""""""""""""""""""""""""""""""""""""""""""" + " Actual mappings + " WARNING: Don't modify this section unless necessary. + """""""""""""""""""""""""""""""""""""""""""""""" + let s:NFa = [s:NF[0].g, s:NF[1].g, s:NF[0].t, s:NF[1].t, s:NF[2]] + let s:IFa = [s:IF[0].g, s:IF[1].g, s:IF[0].t, s:IF[1].t, s:IF[2]] + let s:VFa = [s:VF[0].g, s:VF[1].g, s:VF[0].t, s:VF[1].t, s:VF[2]] + let s:RFa = [s:RF[0].g, s:RF[1].g, s:RF[0].t, s:RF[1].t, s:RF[2]] + + let g:airline#themes#seagull#palette.accents = { + \ 'red': s:NFa, + \ } + + let g:airline#themes#seagull#palette.inactive = airline#themes#generate_color_map( + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]]) + let g:airline#themes#seagull#palette.inactive_modified = { + \ 'airline_c': [s:NMi[0].g, '', s:NMi[0].t, '', s:NMi[2]]} + + let g:airline#themes#seagull#palette.normal = airline#themes#generate_color_map( + \ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]], + \ [s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]], + \ [s:N3[0].g, s:N3[1].g, s:N3[0].t, s:N3[1].t, s:N3[2]]) + + let g:airline#themes#seagull#palette.normal.airline_warning = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#seagull#palette.normal.airline_error = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#seagull#palette.normal_modified = { + \ 'airline_c': [s:NM[0].g, s:NM[1].g, + \ s:NM[0].t, s:NM[1].t, s:NM[2]]} + + let g:airline#themes#seagull#palette.normal_modified.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.insert = airline#themes#generate_color_map( + \ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]], + \ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]], + \ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]]) + + let g:airline#themes#seagull#palette.insert.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.insert_modified = { + \ 'airline_c': [s:IM[0].g, s:IM[1].g, + \ s:IM[0].t, s:IM[1].t, s:IM[2]]} + + let g:airline#themes#seagull#palette.insert_modified.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.visual = airline#themes#generate_color_map( + \ [s:V1[0].g, s:V1[1].g, s:V1[0].t, s:V1[1].t, s:V1[2]], + \ [s:V2[0].g, s:V2[1].g, s:V2[0].t, s:V2[1].t, s:V2[2]], + \ [s:V3[0].g, s:V3[1].g, s:V3[0].t, s:V3[1].t, s:V3[2]]) + + let g:airline#themes#seagull#palette.visual.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.visual_modified = { + \ 'airline_c': [s:VM[0].g, s:VM[1].g, + \ s:VM[0].t, s:VM[1].t, s:VM[2]]} + + let g:airline#themes#seagull#palette.visual_modified.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.replace = airline#themes#generate_color_map( + \ [s:R1[0].g, s:R1[1].g, s:R1[0].t, s:R1[1].t, s:R1[2]], + \ [s:R2[0].g, s:R2[1].g, s:R2[0].t, s:R2[1].t, s:R2[2]], + \ [s:R3[0].g, s:R3[1].g, s:R3[0].t, s:R3[1].t, s:R3[2]]) + + let g:airline#themes#seagull#palette.replace.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.replace_modified = { + \ 'airline_c': [s:RM[0].g, s:RM[1].g, + \ s:RM[0].t, s:RM[1].t, s:RM[2]]} + + let g:airline#themes#seagull#palette.replace_modified.airline_warning = + \ g:airline#themes#seagull#palette.normal.airline_warning + + let g:airline#themes#seagull#palette.tabline = {} + + let g:airline#themes#seagull#palette.tabline.airline_tab = [ + \ s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]] + + let g:airline#themes#seagull#palette.tabline.airline_tabtype = [ + \ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]] +endfunction + +call airline#themes#seagull#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized.vim new file mode 100644 index 0000000..6a60ad4 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized.vim @@ -0,0 +1,136 @@ +" MIT License. Copyright (c) 2021 novenary +" vim: et ts=2 sts=2 sw=2 tw=80 + +scriptencoding utf-8 + +let s:term_bg_0 = 'NONE' +let s:term_bg_1 = 0 +let s:term_bg_2 = 8 +let s:term_dim_0 = 7 +let s:term_fg_0 = 'NONE' +let s:term_fg_1 = 15 + +let s:term_red = 1 +let s:term_green = 2 +let s:term_yellow = 3 +let s:term_blue = 4 +let s:term_magenta = 5 +let s:term_cyan = 6 +let s:term_orange = s:term_yellow +let s:term_violet = s:term_magenta + +let s:term_br_red = 9 +let s:term_br_green = 10 +let s:term_br_yellow = 11 +let s:term_br_blue = 12 +let s:term_br_magenta = 13 +let s:term_br_cyan = 14 +let s:term_br_orange = s:term_br_yellow +let s:term_br_violet = s:term_br_magenta + +if &background ==# 'dark' + let s:bg_0 = '#112e38' + let s:bg_1 = '#163945' + let s:bg_2 = '#254a57' + let s:dim_0 = '#61777c' + let s:fg_0 = '#9faeae' + let s:fg_1 = '#bfd0d0' + + let s:red = '#f13c3e' + let s:green = '#69ad21' + let s:yellow = '#d1a416' + let s:blue = '#3a82f8' + let s:magenta = '#e75bb3' + let s:cyan = '#42bdaa' + let s:orange = '#e26f35' + let s:violet = '#9b72e9' + + let s:br_red = '#ff4b49' + let s:br_green = '#78be2e' + let s:br_yellow = '#e4b424' + let s:br_blue = '#4a91ff' + let s:br_magenta = '#fb69c4' + let s:br_cyan = '#50cfba' + let s:br_orange = '#f67e41' + let s:br_violet = '#ab80fc' +else + let s:bg_0 = '#faf0d2' + let s:bg_1 = '#e7ddc0' + let s:bg_2 = '#cbc2a6' + let s:dim_0 = '#7e8783' + let s:fg_0 = '#43545a' + let s:fg_1 = '#2d3c42' + + let s:red = '#c00221' + let s:green = '#3f8100' + let s:yellow = '#9b7600' + let s:blue = '#005dcc' + let s:magenta = '#b73088' + let s:cyan = '#038d7c' + let s:orange = '#b04713' + let s:violet = '#714cbc' + + let s:br_red = '#b9001e' + let s:br_green = '#3a7b00' + let s:br_yellow = '#957000' + let s:br_blue = '#0059c6' + let s:br_magenta = '#b12b82' + let s:br_cyan = '#008777' + let s:br_orange = '#a9430f' + let s:br_violet = '#6b47b6' +endif + +let g:airline#themes#selenized#palette = {} + +let s:NA = [ s:bg_1, s:green, s:term_bg_1, s:term_green ] +let s:NB = [ s:fg_0, s:bg_2, s:term_fg_0, s:term_bg_2 ] +let s:NC = [ s:dim_0, s:bg_1, s:term_dim_0, s:term_bg_1 ] +let s:NC_modified = [ s:yellow, s:NC[1], s:term_yellow, s:NC[3] ] +let g:airline#themes#selenized#palette.normal = airline#themes#generate_color_map(s:NA, s:NB, s:NC) +let g:airline#themes#selenized#palette.normal_modified = { + \ 'airline_c': s:NC_modified, + \ } + +let s:IA = [ s:bg_1, s:blue, s:term_bg_1, s:term_blue ] +let g:airline#themes#selenized#palette.insert = airline#themes#generate_color_map(s:IA, s:NB, s:NC) +let g:airline#themes#selenized#palette.terminal = airline#themes#generate_color_map(s:IA, s:NB, s:NC) +let g:airline#themes#selenized#palette.insert_modified = copy(g:airline#themes#selenized#palette.normal_modified) + +let s:RA = [ s:bg_1, s:red, s:term_bg_1, s:term_red ] +let g:airline#themes#selenized#palette.replace = airline#themes#generate_color_map(s:RA, s:NB, s:NC) +let g:airline#themes#selenized#palette.replace_modified = copy(g:airline#themes#selenized#palette.normal_modified) + +let s:VA = [ s:bg_1, s:violet, s:term_bg_1, s:term_violet ] +let g:airline#themes#selenized#palette.visual = airline#themes#generate_color_map(s:VA, s:NB, s:NC) +let g:airline#themes#selenized#palette.visual_modified = copy(g:airline#themes#selenized#palette.normal_modified) + +let s:INACTIVE = [ s:dim_0, s:bg_2, s:term_dim_0, s:term_bg_2 ] +let s:INACTIVE_modified = [ s:yellow, s:INACTIVE[1], s:term_yellow, s:INACTIVE[3] ] +let g:airline#themes#selenized#palette.inactive = airline#themes#generate_color_map(s:INACTIVE, s:INACTIVE, s:INACTIVE) +let g:airline#themes#selenized#palette.inactive_modified = { + \ 'airline_c': s:INACTIVE_modified, + \ } + +let s:WARNING = [ s:bg_1, s:br_yellow, s:term_bg_1, s:term_br_yellow ] +let g:airline#themes#selenized#palette.normal.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.normal_modified.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.insert.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.insert_modified.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.replace.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.replace_modified.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.visual.airline_warning = s:WARNING +let g:airline#themes#selenized#palette.visual_modified.airline_warning = s:WARNING + +let s:ERROR = [ s:bg_1, s:br_red, s:term_bg_1, s:term_br_red ] +let g:airline#themes#selenized#palette.normal.airline_error = s:ERROR +let g:airline#themes#selenized#palette.normal_modified.airline_error = s:ERROR +let g:airline#themes#selenized#palette.insert.airline_error = s:ERROR +let g:airline#themes#selenized#palette.insert_modified.airline_error = s:ERROR +let g:airline#themes#selenized#palette.replace.airline_error = s:ERROR +let g:airline#themes#selenized#palette.replace_modified.airline_error = s:ERROR +let g:airline#themes#selenized#palette.visual.airline_error = s:ERROR +let g:airline#themes#selenized#palette.visual_modified.airline_error = s:ERROR + +let g:airline#themes#selenized#palette.accents = { + \ 'red': [ s:red, '', s:term_red, '' ] + \ } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized_bw.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized_bw.vim new file mode 100644 index 0000000..b34f3af --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/selenized_bw.vim @@ -0,0 +1,136 @@ +" MIT License. Copyright (c) 2021 novenary +" vim: et ts=2 sts=2 sw=2 tw=80 + +scriptencoding utf-8 + +let s:term_bg_0 = 'NONE' +let s:term_bg_1 = 0 +let s:term_bg_2 = 8 +let s:term_dim_0 = 7 +let s:term_fg_0 = 'NONE' +let s:term_fg_1 = 15 + +let s:term_red = 1 +let s:term_green = 2 +let s:term_yellow = 3 +let s:term_blue = 4 +let s:term_magenta = 5 +let s:term_cyan = 6 +let s:term_orange = s:term_yellow +let s:term_violet = s:term_magenta + +let s:term_br_red = 9 +let s:term_br_green = 10 +let s:term_br_yellow = 11 +let s:term_br_blue = 12 +let s:term_br_magenta = 13 +let s:term_br_cyan = 14 +let s:term_br_orange = s:term_br_yellow +let s:term_br_violet = s:term_br_magenta + +if &background ==# 'dark' + let s:bg_0 = '#181818' + let s:bg_1 = '#252525' + let s:bg_2 = '#3b3b3b' + let s:dim_0 = '#777777' + let s:fg_0 = '#b9b9b9' + let s:fg_1 = '#dedede' + + let s:red = '#ed4a46' + let s:green = '#70b433' + let s:yellow = '#dbb32d' + let s:blue = '#368aeb' + let s:magenta = '#eb6eb7' + let s:cyan = '#3fc5b7' + let s:orange = '#e67f43' + let s:violet = '#a580e2' + + let s:br_red = '#ff5e56' + let s:br_green = '#83c746' + let s:br_yellow = '#efc541' + let s:br_blue = '#4f9cfe' + let s:br_magenta = '#ff81ca' + let s:br_cyan = '#56d8c9' + let s:br_orange = '#fa9153' + let s:br_violet = '#b891f5' +else + let s:bg_0 = '#ffffff' + let s:bg_1 = '#ebebeb' + let s:bg_2 = '#cdcdcd' + let s:dim_0 = '#878787' + let s:fg_0 = '#474747' + let s:fg_1 = '#282828' + + let s:red = '#d6000c' + let s:green = '#1d9700' + let s:yellow = '#c49700' + let s:blue = '#0064e4' + let s:magenta = '#dd0f9d' + let s:cyan = '#00ad9c' + let s:orange = '#d04a00' + let s:violet = '#7f51d6' + + let s:br_red = '#bf0000' + let s:br_green = '#008400' + let s:br_yellow = '#af8500' + let s:br_blue = '#0054cf' + let s:br_magenta = '#c7008b' + let s:br_cyan = '#009a8a' + let s:br_orange = '#ba3700' + let s:br_violet = '#6b40c3' +endif + +let g:airline#themes#selenized_bw#palette = {} + +let s:NA = [ s:bg_1, s:green, s:term_bg_1, s:term_green ] +let s:NB = [ s:fg_0, s:bg_2, s:term_fg_0, s:term_bg_2 ] +let s:NC = [ s:dim_0, s:bg_1, s:term_dim_0, s:term_bg_1 ] +let s:NC_modified = [ s:yellow, s:NC[1], s:term_yellow, s:NC[3] ] +let g:airline#themes#selenized_bw#palette.normal = airline#themes#generate_color_map(s:NA, s:NB, s:NC) +let g:airline#themes#selenized_bw#palette.normal_modified = { + \ 'airline_c': s:NC_modified, + \ } + +let s:IA = [ s:bg_1, s:blue, s:term_bg_1, s:term_blue ] +let g:airline#themes#selenized_bw#palette.insert = airline#themes#generate_color_map(s:IA, s:NB, s:NC) +let g:airline#themes#selenized_bw#palette.terminal = airline#themes#generate_color_map(s:IA, s:NB, s:NC) +let g:airline#themes#selenized_bw#palette.insert_modified = copy(g:airline#themes#selenized_bw#palette.normal_modified) + +let s:RA = [ s:bg_1, s:red, s:term_bg_1, s:term_red ] +let g:airline#themes#selenized_bw#palette.replace = airline#themes#generate_color_map(s:RA, s:NB, s:NC) +let g:airline#themes#selenized_bw#palette.replace_modified = copy(g:airline#themes#selenized_bw#palette.normal_modified) + +let s:VA = [ s:bg_1, s:violet, s:term_bg_1, s:term_violet ] +let g:airline#themes#selenized_bw#palette.visual = airline#themes#generate_color_map(s:VA, s:NB, s:NC) +let g:airline#themes#selenized_bw#palette.visual_modified = copy(g:airline#themes#selenized_bw#palette.normal_modified) + +let s:INACTIVE = [ s:dim_0, s:bg_2, s:term_dim_0, s:term_bg_2 ] +let s:INACTIVE_modified = [ s:yellow, s:INACTIVE[1], s:term_yellow, s:INACTIVE[3] ] +let g:airline#themes#selenized_bw#palette.inactive = airline#themes#generate_color_map(s:INACTIVE, s:INACTIVE, s:INACTIVE) +let g:airline#themes#selenized_bw#palette.inactive_modified = { + \ 'airline_c': s:INACTIVE_modified, + \ } + +let s:WARNING = [ s:bg_1, s:br_yellow, s:term_bg_1, s:term_br_yellow ] +let g:airline#themes#selenized_bw#palette.normal.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.normal_modified.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.insert.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.insert_modified.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.replace.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.replace_modified.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.visual.airline_warning = s:WARNING +let g:airline#themes#selenized_bw#palette.visual_modified.airline_warning = s:WARNING + +let s:ERROR = [ s:bg_1, s:br_red, s:term_bg_1, s:term_br_red ] +let g:airline#themes#selenized_bw#palette.normal.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.normal_modified.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.insert.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.insert_modified.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.replace.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.replace_modified.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.visual.airline_error = s:ERROR +let g:airline#themes#selenized_bw#palette.visual_modified.airline_error = s:ERROR + +let g:airline#themes#selenized_bw#palette.accents = { + \ 'red': [ s:red, '', s:term_red, '' ] + \ } diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seoul256.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seoul256.vim new file mode 100644 index 0000000..fe5888d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/seoul256.vim @@ -0,0 +1,63 @@ +" Created by JB Kopecky (https://github.com/jbkopecky), based on seoul256 themed +" by Junegunn Choi (https://github.com/junegunn/seoul256.vim) + +let g:airline#themes#seoul256#palette = {} + +function! airline#themes#seoul256#refresh() abort + let M0 = airline#themes#get_highlight('Special') + let accents_group = airline#themes#get_highlight('Special') + let modified_group = [M0[0], '', M0[2], '', ''] + let warning_group = airline#themes#get_highlight2(['airline_warning', 'bg'], ['airline_warning', 'fg']) + + let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLine', 'fg']) + let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['StatusLineNC', 'fg']) + let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg']) + let g:airline#themes#seoul256#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#seoul256#palette.normal_modified = { 'airline_c': modified_group } + let g:airline#themes#seoul256#palette.normal.airline_warning = warning_group + let g:airline#themes#seoul256#palette.normal_modified.airline_warning = warning_group + + let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLineSel', 'bg']) + let s:I2 = s:N2 + let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['StatusLineNC', 'fg']) + let g:airline#themes#seoul256#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#seoul256#palette.insert_modified = g:airline#themes#seoul256#palette.normal_modified + let g:airline#themes#seoul256#palette.insert.airline_warning = g:airline#themes#seoul256#palette.normal.airline_warning + let g:airline#themes#seoul256#palette.insert_modified.airline_warning = g:airline#themes#seoul256#palette.normal_modified.airline_warning + + let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg']) + let s:R2 = s:I2 + let s:R3 = s:I3 + let g:airline#themes#seoul256#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#seoul256#palette.replace_modified = g:airline#themes#seoul256#palette.normal_modified + let g:airline#themes#seoul256#palette.replace.airline_warning = g:airline#themes#seoul256#palette.normal.airline_warning + let g:airline#themes#seoul256#palette.replace_modified.airline_warning = g:airline#themes#seoul256#palette.normal_modified.airline_warning + + let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['ErrorMsg', 'bg']) + let s:V2 = s:N2 + let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg']) + let g:airline#themes#seoul256#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#seoul256#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] } + let g:airline#themes#seoul256#palette.visual.airline_warning = g:airline#themes#seoul256#palette.normal.airline_warning + let g:airline#themes#seoul256#palette.visual_modified.airline_warning = g:airline#themes#seoul256#palette.normal_modified.airline_warning + + let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg']) + let g:airline#themes#seoul256#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#seoul256#palette.inactive_modified = { 'airline_c': modified_group } + + let g:airline#themes#seoul256#palette.accents = { 'red': accents_group } + + let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg']) + let g:airline#themes#seoul256#palette.tabline = { + \ 'airline_tab': s:N2, + \ 'airline_tabsel': s:N1, + \ 'airline_tabtype': s:V1, + \ 'airline_tabfill': s:TF, + \ 'airline_tabhid': s:IA, + \ 'airline_tabmod': s:I1 + \ } +endfunction + +call airline#themes#seoul256#refresh() + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim new file mode 100644 index 0000000..9191c07 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/serene.vim @@ -0,0 +1,41 @@ +let g:airline#themes#serene#palette = {} + +let s:guibg = '#080808' +let s:termbg = 232 +let s:termsep = 236 +let s:guisep = '#303030' + +let s:N1 = [ '#00dfff' , s:guibg , 45 , s:termbg ] +let s:N2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:N3 = [ '#767676' , s:guibg , 7 , s:termbg ] + +let g:airline#themes#serene#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#serene#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , + \ } + +let s:I1 = [ '#5fff00' , s:guibg , 82 , s:termbg ] +let s:I2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:I3 = [ '#767676' , s:guibg , 7 , s:termbg ] +let g:airline#themes#serene#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#serene#palette.insert_modified = copy(g:airline#themes#serene#palette.normal_modified) +let g:airline#themes#serene#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + +let g:airline#themes#serene#palette.replace = { + \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , + \ } +let g:airline#themes#serene#palette.replace_modified = copy(g:airline#themes#serene#palette.normal_modified) + +let s:V1 = [ '#dfdf00' , s:guibg , 184 , s:termbg ] +let s:V2 = [ '#ff5f00' , s:guibg , 202 , s:termbg ] +let s:V3 = [ '#767676' , s:guibg , 7 , s:termbg ] +let g:airline#themes#serene#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#serene#palette.visual_modified = copy(g:airline#themes#serene#palette.normal_modified) + +let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] +let s:IA2 = [ '#4e4e4e' , s:guisep , 239 , s:termsep , '' ] +let g:airline#themes#serene#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) +let g:airline#themes#serene#palette.inactive_modified = copy(g:airline#themes#serene#palette.normal_modified) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim new file mode 100644 index 0000000..d736459 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sierra.vim @@ -0,0 +1,94 @@ +" File: sierra.vim +" Author: Danilo Augusto +" Date: 2017-02-26 +" License: MIT + +let s:gui00 = "#303030" " ANSI Black +let s:gui01 = "#af5f5f" " ANSI Red +let s:gui02 = "#d75f5f" " ANSI Green +let s:gui03 = "#afd7d7" " ANSI Yellow +let s:gui04 = "#af8787" " ANSI Blue +let s:gui05 = "#dfaf87" " ANSI Magenta +let s:gui06 = "#ffafaf" " ANSI Cyan +let s:gui07 = "#f7e4c0" " ANSI White +let s:gui08 = "#686868" +let s:gui09 = "#af5f5f" +let s:gui0A = "#d75f5f" +let s:gui0B = "#afd7d7" +let s:gui0C = "#af8787" +let s:gui0D = "#dfaf87" +let s:gui0E = "#ffb2af" +let s:gui0F = "#ffffff" + +let s:cterm00 = "236" +let s:cterm01 = "131" +let s:cterm02 = "167" +let s:cterm03 = "152" +let s:cterm04 = "138" +let s:cterm05 = "180" +let s:cterm06 = "217" +let s:cterm07 = "222" +let s:cterm08 = "242" +let s:cterm09 = "131" +let s:cterm0A = "167" +let s:cterm0B = "152" +let s:cterm0C = "138" +let s:cterm0D = "180" +let s:cterm0E = "217" +let s:cterm0F = "231" + +let s:guiWhite = "#ffffff" +let s:guiGray = "#666666" +let s:guiDarkGray = "#545454" +let s:guiAlmostBlack = "#2a2a2a" +let s:ctermWhite = "231" +let s:ctermGray = "243" +let s:ctermDarkGray = "240" +let s:ctermAlmostBlack = "235" + +let g:airline#themes#sierra#palette = {} +let s:modified = { 'airline_c': [s:gui07, '', s:cterm07, '', ''] } + +" Normal mode +let s:N1 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] +let s:N2 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:N3 = [s:gui02, s:guiDarkGray, s:cterm02, s:ctermDarkGray] +let g:airline#themes#sierra#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#sierra#palette.normal_modified = s:modified + +" Insert mode +let s:I1 = [s:guiWhite, s:gui0B, s:ctermWhite, s:cterm0B] +let s:I2 = s:N2 +let s:I3 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let g:airline#themes#sierra#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#sierra#palette.insert_modified = s:modified + +" Visual mode +let s:V1 = [s:guiWhite, s:gui08, s:ctermWhite, s:cterm08] +let s:V2 = s:N2 +let s:V3 = s:I3 +let g:airline#themes#sierra#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#sierra#palette.visual_modified = s:modified + +" Replace mode +let s:R1 = [s:gui08, s:gui00, s:cterm08, s:cterm00] +let s:R2 = s:N2 +let s:R3 = s:I3 +let g:airline#themes#sierra#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#sierra#palette.replace_modified = s:modified + +" Inactive mode +let s:IN1 = [s:guiGray, s:gui01, s:ctermGray, s:cterm01] +let s:IN2 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let s:IN3 = [s:gui02, s:guiAlmostBlack, s:cterm02, s:ctermAlmostBlack] +let g:airline#themes#sierra#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3) +let g:airline#themes#sierra#palette.inactive_modified = s:modified + +" CtrlP +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:CP1 = [s:guiWhite, s:gui01, s:ctermWhite, s:cterm01] +let s:CP2 = [s:guiWhite, s:gui03, s:ctermWhite, s:cterm01] +let s:CP3 = [s:guiWhite, s:gui0D, s:ctermWhite, s:cterm0D] diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim new file mode 100644 index 0000000..fd85edb --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/silver.vim @@ -0,0 +1,85 @@ +let g:airline#themes#silver#palette = {} + +let g:airline#themes#silver#palette.accents = { + \ 'red': [ '#ff2121' , '' , 196 , '' , '' ], + \ } + +let s:N1 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let s:N2 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let s:N3 = [ '#414141' , '#e1e1e1' , 59 , 188 ] +let g:airline#themes#silver#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#silver#palette.normal_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } + +let s:I1 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let s:I2 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let s:I3 = [ '#0d935c' , '#e1e1e1' , 29 , 188 ] +let g:airline#themes#silver#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#silver#palette.insert_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } +let g:airline#themes#silver#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#e1e1e1' , s:I1[2] , 188 , '' ] , + \ } + +let g:airline#themes#silver#palette.replace = copy(g:airline#themes#silver#palette.insert) +let g:airline#themes#silver#palette.replace.airline_a = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] +let g:airline#themes#silver#palette.replace.airline_z = [ '#b30000' , s:I1[1] , 124 , s:I1[3] , '' ] +let g:airline#themes#silver#palette.replace_modified = g:airline#themes#silver#palette.insert_modified + +let s:V1 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let s:V2 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let s:V3 = [ '#0000b3' , '#e1e1e1' , 19 , 188 ] +let g:airline#themes#silver#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#silver#palette.visual_modified = { + \ 'airline_c': [ '#e25000' , '#e1e1e1' , 166 , 188 , '' ] , + \ } + +let s:IA = [ '#a1a1a1' , '#dddddd' , 145 , 188 , '' ] +let g:airline#themes#silver#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#silver#palette.inactive_modified = { + \ 'airline_c': [ '#e25000' , '' , 166 , '' , '' ] , + \ } + +let g:airline#themes#silver#palette.tabline = { + \ 'airline_tab': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabsel': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], + \ 'airline_tabtype': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabfill': ['#414141' , '#e1e1e1' , 59 , 188 , '' ], + \ 'airline_tabmod': ['#e1e1e1' , '#007599' , 188 , 30 , '' ], + \ } + +let s:WI = [ '#ff0000', '#e1e1e1', 196, 188 ] +let g:airline#themes#silver#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#silver#palette.normal_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.insert.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.insert_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.visual.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.visual_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.replace.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +let g:airline#themes#silver#palette.replace_modified.airline_warning = + \ g:airline#themes#silver#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#silver#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , + \ [ '#414141' , '#e1e1e1' , 59 , 188 , '' ] , + \ [ '#e1e1e1' , '#007599' , 188 , 30 , '' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim new file mode 100644 index 0000000..a111a1c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/simple.vim @@ -0,0 +1,46 @@ +let g:airline#themes#simple#palette = {} + +let s:guibg = '#080808' +let s:guibg2 = '#1c1c1c' +let s:termbg = 232 +let s:termbg2= 234 + +let s:N1 = [ s:guibg , '#00dfff' , s:termbg , 45 ] +let s:N2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:N3 = [ '#767676' , s:guibg, 243 , s:termbg] +let g:airline#themes#simple#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#simple#palette.normal_modified = { + \ 'airline_c': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] , + \ } + + +let s:I1 = [ s:guibg, '#5fff00' , s:termbg , 82 ] +let s:I2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:I3 = [ '#767676' , s:guibg, 243 , s:termbg ] +let g:airline#themes#simple#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#simple#palette.insert_modified = copy(g:airline#themes#simple#palette.normal_modified) +let g:airline#themes#simple#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#simple#palette.replace = { + \ 'airline_a': [ s:I1[0] , '#af0000' , s:I1[2] , 124 , '' ] , + \ } +let g:airline#themes#simple#palette.replace_modified = copy(g:airline#themes#simple#palette.normal_modified) + + +let s:V1 = [ s:guibg, '#dfdf00' , s:termbg , 184 ] +let s:V2 = [ '#ff5f00' , s:guibg2, 202 , s:termbg2 ] +let s:V3 = [ '#767676' , s:guibg, 243 , s:termbg ] +let g:airline#themes#simple#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#simple#palette.visual_modified = copy(g:airline#themes#simple#palette.normal_modified) + + +let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] +let s:IA2 = [ '#4e4e4e' , s:guibg2 , 239 , s:termbg2 , '' ] +let g:airline#themes#simple#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2) +let g:airline#themes#simple#palette.inactive_modified = { + \ 'airline_c': [ '#df0000', '', 160, '', '' ] , + \ } + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim new file mode 100644 index 0000000..582adc5 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/soda.vim @@ -0,0 +1,33 @@ +let g:airline#themes#soda#palette = {} + +let g:airline#themes#soda#palette.normal = airline#themes#generate_color_map( + \['#ffffff', '#875faf', 255, 97], + \['#ffffff', '#875f87', 255, 91], + \['#ffffff', '#5f0087', 255, 54]) + +let g:airline#themes#soda#palette.insert = airline#themes#generate_color_map( + \['#ffffff', '#005f00', 255, 22], + \['#ffffff', '#008700', 255, 28], + \['#ffffff', '#00af00', 255, 34]) + +let g:airline#themes#soda#palette.replace = {'airline_a': ['#767676', '#ffff5f', 243, 227]} + +let g:airline#themes#soda#palette.visual = airline#themes#generate_color_map( + \['#767676', '#ffff5f', 243, 227], + \['#767676', '#ffd75f', 243, 221], + \['#767676', '#ffaf5f', 243, 215]) + +let g:airline#themes#soda#palette.inactive = airline#themes#generate_color_map( + \['#767676', '#ffffff', 243, 255], + \['#767676', '#ffffff', 243, 255], + \['#767676', '#ffffff', 243, 255]) + +let g:airline#themes#soda#palette.inactive_modified = {'airline_c': ['#ffffff', '#df0000', 255, 160]} + +let g:airline#themes#soda#palette.tabline = { + \'airline_tab': ['#ffffff', '#5f0087', 255, 54], + \'airline_tabsel': ['#ffffff', '#875faf', 255, 97], + \'airline_tabtype': ['#ffffff', '#00af00', 255, 34], + \'airline_tabfill': ['#767676', '#ffffff', 243, 255], + \'airline_tabmod': ['#ffffff', '#767676', 255, 243]} + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim new file mode 100644 index 0000000..89ea505 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/sol.vim @@ -0,0 +1,90 @@ +" vim-airline companion theme of Sol +" (https://github.com/Pychimp/vim-sol) + +let g:airline#themes#sol#palette = {} + +let g:airline#themes#sol#palette.accents = { + \ 'red': [ '#ffffff' , '' , 231 , '' , '' ], + \ } + +let s:N1 = [ '#343434' , '#a0a0a0' , 237 , 248 ] +let s:N2 = [ '#343434' , '#b3b3b3' , 237 , 250 ] +let s:N3 = [ '#343434' , '#c7c7c7' , 237 , 252 ] +let g:airline#themes#sol#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#sol#palette.normal_modified = { + \ 'airline_c': [ '#ffffff' , '#ff6868' , 237 , 209 , '' ] , + \ } + + +let s:I1 = [ '#eeeeee' , '#09643f' , 255 , 30 ] +let s:I2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] +let s:I3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] +let g:airline#themes#sol#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#sol#palette.insert_modified = { + \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , + \ } +let g:airline#themes#sol#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#09643f' , s:I1[2] , 30 , '' ] , + \ } + + +let g:airline#themes#sol#palette.replace = copy(g:airline#themes#sol#palette.insert) +let g:airline#themes#sol#palette.replace.airline_a = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] +let g:airline#themes#sol#palette.replace.airline_z = [ s:I1[0] , '#ff2121' , s:I1[2] , 196 , '' ] +let g:airline#themes#sol#palette.replace_modified = g:airline#themes#sol#palette.insert_modified + +let s:V1 = [ '#ffff9a' , '#ff6003' , 222 , 202 ] +let s:V2 = [ '#343434' , '#a3a3a3' , 237 , 249 ] +let s:V3 = [ '#343434' , '#b0b0b0' , 237 , 250 ] +let g:airline#themes#sol#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#sol#palette.visual_modified = { + \ 'airline_c': [ '#343434' , '#ffdbc7' , 237 , 216 , '' ] , + \ } + +let s:IA = [ '#777777' , '#c7c7c7' , 244 , 251 , '' ] +let g:airline#themes#sol#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#sol#palette.inactive_modified = { + \ 'airline_c': [ '#ff3535' , '' , 203 , '' , '' ] , + \ } + +let g:airline#themes#sol#palette.tabline = { + \ 'airline_tab': ['#343434', '#b3b3b3', 237, 250, ''], + \ 'airline_tabsel': ['#ffffff', '#004b9a', 231, 31 , ''], + \ 'airline_tabtype': ['#343434', '#a0a0a0', 237, 248, ''], + \ 'airline_tabfill': ['#343434', '#c7c7c7', 237, 251, ''], + \ 'airline_tabmod': ['#343434', '#ffdbc7', 237, 216, ''], + \ } + +let s:WI = [ '#eeeeee', '#e33900', 255, 166 ] +let g:airline#themes#sol#palette.normal.airline_warning = [ + \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] + \ ] + +let g:airline#themes#sol#palette.normal_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.insert.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.insert_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.visual.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.visual_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.replace.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +let g:airline#themes#sol#palette.replace_modified.airline_warning = + \ g:airline#themes#sol#palette.normal.airline_warning + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#sol#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#343434' , '#c7c7c7' , 237 , 251 , '' ] , + \ [ '#343434' , '#b3b3b3' , 237 , 250 , '' ] , + \ [ '#eeeeee' , '#007fff' , 255 , 27 , '' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim new file mode 100644 index 0000000..4f47265 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized.vim @@ -0,0 +1,234 @@ +let g:airline#themes#solarized#palette = {} + +function! airline#themes#solarized#refresh() + """""""""""""""""""""""""""""""""""""""""""""""" + " Options + """""""""""""""""""""""""""""""""""""""""""""""" + let s:background = get(g:, 'airline_solarized_bg', &background) + let s:ansi_colors = get(g:, 'solarized_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0 + let s:use_green = get(g:, 'airline_solarized_normal_green', 0) + let s:dark_inactive_tab = get(g:, 'airline_solarized_dark_inactive_background', 0) + let s:dark_text = get(g:, 'airline_solarized_dark_text', 0) + let s:dark_inactive_border = get(g:, 'airline_solarized_dark_inactive_border', 0) + let s:enable_command_color = get(g:, 'airline_solarized_enable_command_color', 0) + let s:tty = &t_Co == 8 + + """""""""""""""""""""""""""""""""""""""""""""""" + " Colors + """""""""""""""""""""""""""""""""""""""""""""""" + " Base colors + " Extended base16 support by @cuviper. + " Via https://github.com/blueyed/vim-colors-solarized/commit/92f2f994 / + " https://github.com/cuviper/vim-colors-solarized. + if s:ansi_colors && get(g:, 'solarized_base16', 0) + let s:base03 = {'t': 0, 'g': "#002b36"} " Base 00 + let s:base02 = {'t': 18, 'g': "#073642"} " Base 01 + let s:base01 = {'t': 19, 'g': "#586e75"} " Base 02 + let s:base00 = {'t': 8, 'g': "#657b83"} " Base 03 + let s:base0 = {'t': 20, 'g': "#839496"} " Base 04 + let s:base1 = {'t': 7, 'g': "#93a1a1"} " Base 05 + let s:base2 = {'t': 21, 'g': "#eee8d5"} " Base 06 + let s:base3 = {'t': 15, 'g': "#fdf6e3"} " Base 07 + let s:yellow = {'t': 3, 'g': "#dc322f"} " Base 0A + let s:orange = {'t': 16, 'g': "#cb4b16"} " Base 09 + let s:red = {'t': 1, 'g': "#b58900"} " Base 08 + let s:magenta = {'t': 17, 'g': "#859900"} " Base 0F + let s:violet = {'t': 5, 'g': "#2aa198"} " Base 0E + let s:blue = {'t': 4, 'g': "#268bd2"} " Base 0D + let s:cyan = {'t': 6, 'g': "#6c71c4"} " Base 0C + let s:green = {'t': 2, 'g': "#d33682"} " Base 0B + else + let s:base03 = {'t': s:ansi_colors ? 8 : (s:tty ? '0' : 234), 'g': '#002b36'} + let s:base02 = {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 235), 'g': '#073642'} + let s:base01 = {'t': s:ansi_colors ? 10 : (s:tty ? '0' : 240), 'g': '#586e75'} + let s:base00 = {'t': s:ansi_colors ? 11 : (s:tty ? '7' : 241), 'g': '#657b83'} + let s:base0 = {'t': s:ansi_colors ? 12 : (s:tty ? '7' : 244), 'g': '#839496'} + let s:base1 = {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 245), 'g': '#93a1a1'} + let s:base2 = {'t': s:ansi_colors ? 7 : (s:tty ? '7' : 254), 'g': '#eee8d5'} + let s:base3 = {'t': s:ansi_colors ? 15 : (s:tty ? '7' : 230), 'g': '#fdf6e3'} + let s:yellow = {'t': s:ansi_colors ? 3 : (s:tty ? '3' : 136), 'g': '#b58900'} + let s:orange = {'t': s:ansi_colors ? 9 : (s:tty ? '1' : 166), 'g': '#cb4b16'} + let s:red = {'t': s:ansi_colors ? 1 : (s:tty ? '1' : 160), 'g': '#dc322f'} + let s:magenta = {'t': s:ansi_colors ? 5 : (s:tty ? '5' : 125), 'g': '#d33682'} + let s:violet = {'t': s:ansi_colors ? 13 : (s:tty ? '5' : 61 ), 'g': '#6c71c4'} + let s:blue = {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 33 ), 'g': '#268bd2'} + let s:cyan = {'t': s:ansi_colors ? 6 : (s:tty ? '6' : 37 ), 'g': '#2aa198'} + let s:green = {'t': s:ansi_colors ? 2 : (s:tty ? '2' : 64 ), 'g': '#859900'} + endif + + """""""""""""""""""""""""""""""""""""""""""""""" + " Simple mappings + " NOTE: These are easily tweakable mappings. The actual mappings get + " the specific gui and terminal colors from the base color dicts. + """""""""""""""""""""""""""""""""""""""""""""""" + " Normal mode + if s:background == 'dark' + let s:N1 = [(s:dark_text ? s:base03 : s:base3), (s:use_green ? s:green : s:base1), 'bold'] + let s:N2 = [s:base2, (s:tty ? s:base01 : s:base00), ''] + let s:N3 = [s:base01, s:base02, ''] + else + let s:N1 = [(s:dark_text ? s:base03 : s:base2), (s:use_green ? s:green : s:base00), 'bold'] + let s:N2 = [(s:tty ? s:base01 : s:base2), s:base1, ''] + let s:N3 = [s:base1, s:base2, ''] + endif + let s:NF = [s:orange, s:N3[1], ''] + let s:NW = [s:base3, s:orange, ''] + if s:background == 'dark' + let s:NM = [s:base1, s:N3[1], ''] + let s:NMi = [s:base2, s:N3[1], ''] + else + let s:NM = [s:base01, s:N3[1], ''] + let s:NMi = [s:base02, s:N3[1], ''] + endif + + " Insert mode + let s:I1 = [s:N1[0], s:yellow, 'bold'] + let s:I2 = s:N2 + let s:I3 = s:N3 + let s:IF = s:NF + let s:IM = s:NM + + " Visual mode + let s:V1 = [s:N1[0], s:magenta, 'bold'] + let s:V2 = s:N2 + let s:V3 = s:N3 + let s:VF = s:NF + let s:VM = s:NM + + " Replace mode + let s:R1 = [s:N1[0], s:red, ''] + let s:R2 = s:N2 + let s:R3 = s:N3 + let s:RM = s:NM + let s:RF = s:NF + + " Command mode + let s:C1 = [s:N1[0], s:violet, ''] + let s:C2 = s:N2 + let s:C3 = s:N3 + let s:CF = s:NF + let s:CM = s:NM + + " Inactive, according to VertSplit in solarized + " (bg dark: base00; bg light: base0) + if s:background == 'dark' + if s:dark_inactive_border + let s:IA = [s:base01, s:base02, ''] + else + let s:IA = [s:base02, s:base00, ''] + endif + else + let s:IA = [s:base2, s:base0, ''] + endif + + """""""""""""""""""""""""""""""""""""""""""""""" + " Actual mappings + " WARNING: Don't modify this section unless necessary. + """""""""""""""""""""""""""""""""""""""""""""""" + let s:NFa = [s:NF[0].g, s:NF[1].g, s:NF[0].t, s:NF[1].t, s:NF[2]] + let s:IFa = [s:IF[0].g, s:IF[1].g, s:IF[0].t, s:IF[1].t, s:IF[2]] + let s:VFa = [s:VF[0].g, s:VF[1].g, s:VF[0].t, s:VF[1].t, s:VF[2]] + let s:RFa = [s:RF[0].g, s:RF[1].g, s:RF[0].t, s:RF[1].t, s:RF[2]] + + let g:airline#themes#solarized#palette.accents = { + \ 'red': s:NFa, + \ } + + let g:airline#themes#solarized#palette.inactive = airline#themes#generate_color_map( + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], + \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]]) + let g:airline#themes#solarized#palette.inactive_modified = { + \ 'airline_c': [s:NMi[0].g, '', s:NMi[0].t, '', s:NMi[2]]} + + let g:airline#themes#solarized#palette.normal = airline#themes#generate_color_map( + \ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]], + \ [s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]], + \ [s:N3[0].g, s:N3[1].g, s:N3[0].t, s:N3[1].t, s:N3[2]]) + + let g:airline#themes#solarized#palette.normal.airline_warning = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#solarized#palette.normal.airline_error = [ + \ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]] + + let g:airline#themes#solarized#palette.normal_modified = { + \ 'airline_c': [s:NM[0].g, s:NM[1].g, + \ s:NM[0].t, s:NM[1].t, s:NM[2]]} + + let g:airline#themes#solarized#palette.normal_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.insert = airline#themes#generate_color_map( + \ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]], + \ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]], + \ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]]) + + let g:airline#themes#solarized#palette.insert.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.insert_modified = { + \ 'airline_c': [s:IM[0].g, s:IM[1].g, + \ s:IM[0].t, s:IM[1].t, s:IM[2]]} + + let g:airline#themes#solarized#palette.insert_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.visual = airline#themes#generate_color_map( + \ [s:V1[0].g, s:V1[1].g, s:V1[0].t, s:V1[1].t, s:V1[2]], + \ [s:V2[0].g, s:V2[1].g, s:V2[0].t, s:V2[1].t, s:V2[2]], + \ [s:V3[0].g, s:V3[1].g, s:V3[0].t, s:V3[1].t, s:V3[2]]) + + let g:airline#themes#solarized#palette.visual.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.visual_modified = { + \ 'airline_c': [s:VM[0].g, s:VM[1].g, + \ s:VM[0].t, s:VM[1].t, s:VM[2]]} + + let g:airline#themes#solarized#palette.visual_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.replace = airline#themes#generate_color_map( + \ [s:R1[0].g, s:R1[1].g, s:R1[0].t, s:R1[1].t, s:R1[2]], + \ [s:R2[0].g, s:R2[1].g, s:R2[0].t, s:R2[1].t, s:R2[2]], + \ [s:R3[0].g, s:R3[1].g, s:R3[0].t, s:R3[1].t, s:R3[2]]) + + let g:airline#themes#solarized#palette.replace.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.replace_modified = { + \ 'airline_c': [s:RM[0].g, s:RM[1].g, + \ s:RM[0].t, s:RM[1].t, s:RM[2]]} + + let g:airline#themes#solarized#palette.replace_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.replace_modified.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + if s:enable_command_color + let g:airline#themes#solarized#palette.commandline = airline#themes#generate_color_map( + \ [s:C1[0].g, s:C1[1].g, s:C1[0].t, s:C1[1].t, s:C1[2]], + \ [s:C2[0].g, s:C2[1].g, s:C2[0].t, s:C2[1].t, s:C2[2]], + \ [s:C3[0].g, s:C3[1].g, s:C3[0].t, s:C3[1].t, s:C3[2]]) + + let g:airline#themes#solarized#palette.commandline.airline_warning = + \ g:airline#themes#solarized#palette.normal.airline_warning + + let g:airline#themes#solarized#palette.commandline_modified = { + \ 'airline_c': [s:RM[0].g, s:RM[1].g, + \ s:RM[0].t, s:RM[1].t, s:RM[2]]} + endif + + let g:airline#themes#solarized#palette.tabline = {} + + let g:airline#themes#solarized#palette.tabline.airline_tab = [ + \ s:I2[0].g, s:I2[1].g, s:I2[0].t, (s:dark_inactive_tab ? s:I3[0].t : s:I2[1].t), s:I2[2]] + + let g:airline#themes#solarized#palette.tabline.airline_tabtype = [ + \ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]] +endfunction + +call airline#themes#solarized#refresh() + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized_flood.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized_flood.vim new file mode 100644 index 0000000..cefe469 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/solarized_flood.vim @@ -0,0 +1,174 @@ +" Name: Solarized Flood +" Changed: June 3 2018 +" Maintainer: https://github.com/Neur1n +" Description: +" A vim-airline theme made based on and tested with the Solarized colorscheme +" (https://github.com/frankier/neovim-colors-solarized-truecolor-only) in +" Windows 10 OS and GVim 8.1. +" +" This script is based on the 'dark' theme. The 'inactive' and 'ctrlp' parts +" were not changed. +" +" It is call 'flood' since the statusline and the tabline will be highlighted +" with the 'base03' color in Solarized (dark). If you use the dark Solarized +" colorscheme for Vim and, in Windows, set 'Personalization-Colors-Choose +" your color - Custom color' to be '#002B36' (*), then most parts of the GVim +" window will be 'flooded' with the color. +" NOTE: This will make some components of the airline less distinguishable +" from the others. If anyone has better ideas, I will be happy to take +" a conversation with you. :) + +" (*): Your PC may not support the exact color but it will pick the nearest +" color for you and it should work fine. + + +scriptencoding utf-8 + +" The following color definitions: +" 'hex': originated from official solarized (dark) colors +" 'term': calculated by 'x256' package of Python +" '*': 'term' value that is different with solarized official definition +" '#': picked manually +let s:base03 = {'hex': '#002B36', 'term': 234} " 0, 43, 54 +let s:base02 = {'hex': '#073642', 'term': 235} " 7, 54, 66 +let s:base01 = {'hex': '#586E75', 'term': 242} " 88, 110, 117 * +let s:base00 = {'hex': '#657B83', 'term': 66} " 101, 123, 131 * + +let s:base0 = {'hex': '#839496', 'term': 246} " 131, 148, 150 * +let s:base1 = {'hex': '#93A1A1', 'term': 247} " 147, 161, 161 * +let s:base2 = {'hex': '#EEE8D5', 'term': 254} " 238, 232, 213 +let s:base3 = {'hex': '#FDF6E3', 'term': 230} " 253, 246, 227 + +let s:yellow = {'hex': '#B58900', 'term': 136} " 181, 137, 0 +let s:orange = {'hex': '#CB4B16', 'term': 166} " 203, 75, 22 +let s:red = {'hex': '#DC322F', 'term': 160} " 220, 50, 47 * +let s:magenta = {'hex': '#D33682', 'term': 168} " 211, 54, 130 * +let s:violet = {'hex': '#6C71C4', 'term': 62} " 108, 113, 196 * +let s:blue = {'hex': '#268BD2', 'term': 32} " 38, 139, 210 * +let s:cyan = {'hex': '#2AA198', 'term': 36} " 42, 161, 152 * +let s:green = {'hex': '#859900', 'term': 106} " 133, 153, 0 # + +let g:airline#themes#solarized_flood#palette = {} + + +" ***************************************************************************** +" Normal Mode +" ***************************************************************************** +let s:airline_a_normal = [s:base03['hex'], s:green['hex'], + \ s:base03['term'], s:green['term'], 'italic'] + +let s:airline_b_normal = [s:base1['hex'], s:base03['hex'], + \ s:base1['term'], s:base03['term'], 'italic'] + +let s:airline_c_normal = [s:cyan['hex'], s:base03['hex'], + \ s:cyan['term'], s:base03['term'], 'italic'] + +let g:airline#themes#solarized_flood#palette.normal = + \ airline#themes#generate_color_map(s:airline_a_normal, + \ s:airline_b_normal, + \ s:airline_c_normal) + +let g:airline#themes#solarized_flood#palette.normal['airline_z'] = + \ [s:green['hex'], s:base03['hex'], s:green['term'], s:base03['term'], + \ 'italic'] + +let g:airline#themes#solarized_flood#palette.normal_modified = { + \ 'airline_c': [s:magenta['hex'], s:base03['hex'], + \ s:magenta['term'], s:base03['term'], 'italic'], + \ } + +" ***************************************************************************** +" Insert Mode +" ***************************************************************************** +let s:airline_a_insert = [s:base03['hex'] , s:cyan['hex'], + \ s:base03['term'], s:cyan['term'], 'bold'] + +let s:airline_b_insert = [s:base1['hex'], s:base03['hex'], + \ s:base1['term'], s:base03['term'], 'bold'] + +let s:airline_c_insert = [s:blue['hex'], s:base03['hex'], + \ s:blue['term'], s:base03['term'], 'bold'] + +let g:airline#themes#solarized_flood#palette.insert = + \ airline#themes#generate_color_map(s:airline_a_insert, + \ s:airline_b_insert, + \ s:airline_c_insert) + +let g:airline#themes#solarized_flood#palette.insert['airline_z'] = + \ [s:cyan['hex'], s:base03['hex'], s:cyan['term'], s:base03['term'], + \ 'bold'] + +let g:airline#themes#solarized_flood#palette.insert_modified = { + \ 'airline_c': [s:magenta['hex'], s:base03['hex'], + \ s:magenta['term'], s:base03['term'], 'bold'], + \ } + +let g:airline#themes#solarized_flood#palette.insert_paste = { + \ 'airline_a': [s:base03['hex'], s:orange['hex'], + \ s:base03['term'], s:orange['term'], 'bold'], + \ } + +" ***************************************************************************** +" Replace Mode +" ***************************************************************************** +let g:airline#themes#solarized_flood#palette.replace = + \ copy(g:airline#themes#solarized_flood#palette.insert) + +let g:airline#themes#solarized_flood#palette.replace.airline_a = + \ [s:base03['hex'], s:red['hex'], s:base03['term'], s:red['term'], 'bold'] + +let g:airline#themes#solarized_flood#palette.replace_modified = + \ g:airline#themes#solarized_flood#palette.insert_modified + +" ***************************************************************************** +" Visual Mode +" ***************************************************************************** +let s:airline_a_visual = [s:base03['hex'], s:yellow['hex'], + \ s:base03['term'], s:yellow['term'], 'italic'] + +let s:airline_b_visual = [s:base1['hex'], s:base03['hex'], + \ s:base1['term'], s:base03['term'], 'italic'] + +let s:airline_c_visual = [s:red['hex'], s:base03['hex'], + \ s:red['term'], s:base03['term'], 'italic'] + +let g:airline#themes#solarized_flood#palette.visual = + \ airline#themes#generate_color_map(s:airline_a_visual, + \ s:airline_b_visual, + \ s:airline_c_visual) + +let g:airline#themes#solarized_flood#palette.visual['airline_z'] = + \ [s:yellow['hex'], s:base03['hex'], s:yellow['term'], s:base03['term'], + \ 'italic'] + +let g:airline#themes#solarized_flood#palette.visual_modified = { + \ 'airline_c': [s:magenta['hex'], s:base03['hex'], + \ s:magenta['term'], s:base03['term'], 'italic'], + \ } + +" ***************************************************************************** +" Inactive Mode +" ***************************************************************************** +let s:airline_a_inactive = ['#4e4e4e', '#1c1c1c', 239, 234, ''] +let s:airline_b_inactive = ['#4e4e4e', '#262626', 239, 235, ''] +let s:airline_c_inactive = ['#4e4e4e', '#303030', 239, 236, ''] +let g:airline#themes#solarized_flood#palette.inactive = + \ airline#themes#generate_color_map(s:airline_a_inactive, + \ s:airline_b_inactive, + \ s:airline_c_inactive) +let g:airline#themes#solarized_flood#palette.inactive_modified = { + \ 'airline_c': ['#875faf', '', 97, '', ''] , + \ } + + +let g:airline#themes#solarized_flood#palette.accents = { + \ 'red': [s:red['hex'], '', s:red['term'], ''] + \ } + + +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#solarized_flood#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff', '#5f00af', 189, 55 , '' ], + \ [ '#ffffff', '#875fd7', 231, 98 , '' ], + \ [ '#5f00af', '#ffffff', 55 , 231, 'bold']) +endif diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/supernova.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/supernova.vim new file mode 100644 index 0000000..d1751cc --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/supernova.vim @@ -0,0 +1,62 @@ +let g:airline#themes#supernova#palette = {} +let g:airline#themes#supernova#palette.accents = { + \ 'red': [ '#5FD7FF' , '' , 81 , '' , '' ], + \ } + +" Normal Mode: +let s:N1 = [ '#262626' , '#5FAFAF' , 235 , 73 ] " Mode +let s:N2 = [ '#D0D0D0' , '#585858' , 252 , 240 ] " Info +let s:N3 = [ '#A8A8A8' , '#262626' , 248 , 235 ] " StatusLine + +let g:airline#themes#supernova#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#supernova#palette.normal_modified = { + \ 'airline_c': [ '#EEEEEE' , '#262626' , 255 , 235 , '' ] , + \ } + +" Insert Mode: +let s:I1 = [ '#E4E4E4' , '#5F0087' , 254 , 54 ] " Mode +let s:I2 = [ '#D0D0D0' , '#585858' , 252 , 240 ] " Info +let s:I3 = [ '#A8A8A8' , '#262626' , 248 , 235 ] " StatusLine + +let g:airline#themes#supernova#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#supernova#palette.insert_modified = { + \ 'airline_c': [ '#EEEEEE' , '#262626' , 255 , 235 , '' ] , + \ } + +" Replace Mode: +let s:R1 = [ '#E4E4E4' , '#87005F' , 254 , 89 ] " Mode +let s:R2 = [ '#D0D0D0' , '#585858' , 252 , 240 ] " Info +let s:R3 = [ '#A8A8A8' , '#262626' , 248 , 235 ] " StatusLine + +let g:airline#themes#supernova#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#supernova#palette.replace.airline_a = [ '#E4E4E4' , '#87005F' , 254 , 89, '' ] +let g:airline#themes#supernova#palette.replace_modified = { + \ 'airline_c': [ '#EEEEEE' , '#262626' , 255 , 235 , '' ] , + \ } + +" Visual Mode: +let s:V1 = [ '#262626', '#0087D7', 235, 32 ] +let s:V2 = [ '', '#585858', '', 240 ] +let s:V3 = [ '#A8A8A8', '#262626', 248, 235 ] + +let g:airline#themes#supernova#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#supernova#palette.visual_modified = { + \ 'airline_c': [ '#EEEEEE', '#262626', 255, 235 ] , + \ } + +" Inactive: +let s:IA = [ '#D0D0D0' , '#444444' , 252 , 238 , '' ] +let g:airline#themes#supernova#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#supernova#palette.inactive.airline_c = s:N2 +let g:airline#themes#supernova#palette.inactive_modified = { + \ 'airline_c': [ '#EEEEEE' , '#444444' , 255 , 238 , '' ] , + \ } + +" CtrlP: +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#supernova#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#262626' , '#5F5F87' , 235 , 60 , '' ] , + \ [ '#E4E4E4' , '#585858' , 254 , 240 , '' ] , + \ [ '#A8A8A8' , '#262626' , 248 , 235 , 'bold' ] ) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim new file mode 100644 index 0000000..9845a44 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term.vim @@ -0,0 +1,92 @@ + +" vim-airline 'term' theme +" it is using current terminal colorscheme +" and in gvim i left colors from 'wombat' theme but i am not using it anyway + +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 2 ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 2 , 'black' ] " info +let s:N3 = [ '#CAE682' , '#242424' , 2 , 233 ] " statusline +let s:N4 = [ '#86CD74' , 10 ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 3 ] +let s:I2 = [ '#FDE76E' , '#32322F' , 3 , 'black' ] +let s:I3 = [ '#FDE76E' , '#242424' , 3 , 233 ] +let s:I4 = [ '#FADE3E' , 11 ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 4 ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 4 , 'black' ] +let s:V3 = [ '#B5D3F3' , '#242424' , 4 , 233 ] +let s:V4 = [ '#7CB0E6' , 12 ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 1 ] +let s:R2 = [ '#E5786D' , '#32322F' , 1 , 'black' ] +let s:R3 = [ '#E5786D' , '#242424' , 1 , 233 ] +let s:R4 = [ '#E55345' , 9 ] + +" Paste mode +let s:PA = [ '#94E42C' , 6 ] + +" Info modified +let s:IM = [ '#40403C' , 7 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#term#palette = {} + +let g:airline#themes#term#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#term#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#term#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#term#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#term#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#term#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#term#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#term#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , + \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , + \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term_light.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term_light.vim new file mode 100644 index 0000000..c4c3100 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/term_light.vim @@ -0,0 +1,92 @@ + +" vim-airline 'term_light' theme +" it is using current terminal colorscheme +" and in gvim i left colors from 'wombat' theme but i am not using it anyway + +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#f0f0f0' , '#86CD74' , 15, 2 ] " mode +let s:N2 = [ '#86CD74' , '#deded9' , 2, 8 ] " info +let s:N3 = [ '#86CD74' , '#888a85' , 2, 15 ] " statusline +let s:N4 = [ '#CAE682' , '#141413' , 10, 0 ] " mode modified + +" Insert mode +let s:I1 = [ '#f0f0f0' , '#FADE3E' , 15, 3 ] +let s:I2 = [ '#FADE3E' , '#deded9' , 3, 8 ] +let s:I3 = [ '#FADE3E' , '#888a85' , 3, 15 ] +let s:I4 = [ '#FDE76E' , '#141413' , 11, 0 ] + +" Visual mode +let s:V1 = [ '#f0f0f0' , '#7CB0E6' , 15, 4 ] +let s:V2 = [ '#7CB0E6' , '#deded9' , 4, 8 ] +let s:V3 = [ '#7CB0E6' , '#888a85' , 4, 15 ] +let s:V4 = [ '#B5D3F3' , '#141413' , 12, 0 ] + +" Replace mode +let s:R1 = [ '#f0f0f0' , '#E55345' , 15, 1 ] +let s:R2 = [ '#E55345' , '#deded9' , 1, 8 ] +let s:R3 = [ '#E55345' , '#888a85' , 1, 15 ] +let s:R4 = [ '#E5786D' , '#141413' , 9, 0 ] + +" Paste mode +let s:PA = [ '#94E42C' , 6 ] + +" Info modified +let s:IM = [ '#40403C' , 7 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#term_light#palette = {} + +let g:airline#themes#term_light#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#term_light#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#term_light#palette.normal_modified = { + \ 'airline_a': [ s:N4[1] , s:N4[0] , s:N4[3] , s:N4[2] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[2] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[2] , s:N3[3] , '' ] } + + +let g:airline#themes#term_light#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#term_light#palette.insert_modified = { + \ 'airline_a': [ s:I4[1] , s:I4[0] , s:I4[3] , s:I4[2] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[2] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[2] , s:N3[3] , '' ] } + + +let g:airline#themes#term_light#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#term_light#palette.visual_modified = { + \ 'airline_a': [ s:V4[1] , s:V4[0] , s:V4[3] , s:V4[2] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[2] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[2] , s:N3[3] , '' ] } + + +let g:airline#themes#term_light#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#term_light#palette.replace_modified = { + \ 'airline_a': [ s:R4[1] , s:R4[0] , s:R4[3] , s:R4[2] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[2] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[2] , s:N3[3] , '' ] } + + +let g:airline#themes#term_light#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#term_light#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#term_light#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[2] , '' , '' ] } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#term_light#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , + \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , + \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim new file mode 100644 index 0000000..f382fc1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/tomorrow.vim @@ -0,0 +1,44 @@ +let g:airline#themes#tomorrow#palette = {} + +function! airline#themes#tomorrow#refresh() + let g:airline#themes#tomorrow#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Directory', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight('Pmenu') + let s:N3 = airline#themes#get_highlight('CursorLine') + let g:airline#themes#tomorrow#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + + let group = airline#themes#get_highlight('vimCommand') + let g:airline#themes#tomorrow#palette.normal_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } + + let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['MoreMsg', 'fg'], 'bold') + let s:I2 = airline#themes#get_highlight2(['MoreMsg', 'fg'], ['Normal', 'bg']) + let s:I3 = s:N3 + let g:airline#themes#tomorrow#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#tomorrow#palette.insert_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:R1 = airline#themes#get_highlight('Error', 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#tomorrow#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#tomorrow#palette.replace_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Constant', 'fg'], 'bold') + let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) + let s:V3 = s:N3 + let g:airline#themes#tomorrow#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#tomorrow#palette.visual_modified = g:airline#themes#tomorrow#palette.normal_modified + + let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) + let g:airline#themes#tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#tomorrow#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } +endfunction + +call airline#themes#tomorrow#refresh() + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/transparent.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/transparent.vim new file mode 100644 index 0000000..f48f21a --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/transparent.vim @@ -0,0 +1,155 @@ +"FROM https://github.com/khatiba + +" Colors +let s:gray = [245, '#3f4b59'] +let s:darkgray = [245, '#1d1f21'] +let s:golden = [143, '#BBE67E'] +let s:pink = [131, '#F07178'] +let s:blue = [ 67, '#D4BFFF'] +let s:orange = [166, '#ffae57'] +let s:outerfg = [ 16, '#8d96a1'] +let s:outerfgi = [ 16, '#2f3d4d'] + +" Backgrounds +let s:outerbg = [ 16, 'NONE'] +let s:innerbg = [234, 'NONE'] + +" Normal mode +let s:N1 = [s:outerfg[1], s:outerbg[1], s:outerfg[0], s:gray[0]] +let s:N3 = [s:gray[1] , s:innerbg[1], s:gray[0] , s:innerbg[0]] + +" Normal mode - modified +let s:NM1 = [s:darkgray[1], s:orange[1], s:darkgray[0], s:orange[0]] +let s:NM3 = [s:orange[1] , s:outerbg[1], s:orange[0], s:darkgray[0]] + +" Insert mode +let s:I1 = [s:darkgray[1], s:golden[1], s:outerfg[0], s:golden[0]] +let s:I3 = [s:golden[1] , s:innerbg[1], s:golden[0], s:innerbg[0]] + +" Visual mode +let s:V1 = [s:darkgray[1], s:pink[1], s:outerfg[0], s:pink[0]] +let s:V3 = [s:pink[1] , s:innerbg[1], s:pink[0], s:innerbg[0]] + +" Replace mode +let s:R1 = [s:darkgray[1], s:blue[1], s:outerfg[0], s:blue[0]] +let s:R3 = [s:blue[1], s:innerbg[1], s:blue[0], s:innerbg[0]] + +" Inactive pane +let s:IA = [s:darkgray[1], s:outerbg[1], s:innerbg[0], s:innerbg[0]] +let s:IAc = [s:gray[1], s:outerbg[1], s:outerbg[0], s:outerbg[0]] + +let g:airline#themes#transparent#palette = {} +let g:airline#themes#transparent#palette.accents = { + \ 'red': ['#d70000', '', 160, '', '']} + +let g:airline#themes#transparent#palette.inactive = { + \ 'airline_a': s:IA, + \ 'airline_b': s:IA, + \ 'airline_c': s:IAc, + \ 'airline_x': s:IA, + \ 'airline_y': s:IA, + \ 'airline_z': s:IA} + +let g:airline#themes#transparent#palette.inactive_modified = { + \ 'airline_a': s:IA, + \ 'airline_b': s:IA, + \ 'airline_c': s:NM3, + \ 'airline_x': s:IA, + \ 'airline_y': s:IA, + \ 'airline_z': s:IA} + +let g:airline#themes#transparent#palette.normal = { + \ 'airline_a': s:N1, + \ 'airline_b': s:N3, + \ 'airline_c': s:N3, + \ 'airline_x': s:N3, + \ 'airline_y': s:N3, + \ 'airline_z': s:N3} + +let g:airline#themes#transparent#palette.normal_modified = { + \ 'airline_a': s:NM1, + \ 'airline_b': s:N3, + \ 'airline_c': s:N3, + \ 'airline_x': s:N3, + \ 'airline_y': s:N3, + \ 'airline_z': s:NM3} + +let g:airline#themes#transparent#palette.insert = { + \ 'airline_a': s:I1, + \ 'airline_b': s:N3, + \ 'airline_c': s:N3, + \ 'airline_x': s:N3, + \ 'airline_y': s:N3, + \ 'airline_z': s:I3} +let g:airline#themes#transparent#palette.insert_modified = {} + +let g:airline#themes#transparent#palette.replace = { + \ 'airline_a': s:R1, + \ 'airline_b': s:N3, + \ 'airline_c': s:N3, + \ 'airline_x': s:N3, + \ 'airline_y': s:N3, + \ 'airline_z': s:R3} +let g:airline#themes#transparent#palette.replace_modified = {} + +let g:airline#themes#transparent#palette.visual = { + \ 'airline_a': s:V1, + \ 'airline_b': s:N3, + \ 'airline_c': s:N3, + \ 'airline_x': s:N3, + \ 'airline_y': s:N3, + \ 'airline_z': s:V3} +let g:airline#themes#transparent#palette.visual_modified = {} + + +" Warnings +let g:airline#themes#transparent#palette.normal.airline_warning = s:NM1 + +let g:airline#themes#transparent#palette.normal_modified.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.insert.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.insert_modified.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.visual.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.visual_modified.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.replace.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + +let g:airline#themes#transparent#palette.replace_modified.airline_warning = + \ g:airline#themes#transparent#palette.normal.airline_warning + + +" Errors +let g:airline#themes#transparent#palette.normal.airline_error = s:V1 + +let g:airline#themes#transparent#palette.normal_modified.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.insert.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.insert_modified.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.insert_modified.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.visual.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.visual_modified.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.replace.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error + +let g:airline#themes#transparent#palette.replace_modified.airline_error = + \ g:airline#themes#transparent#palette.normal.airline_error diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim new file mode 100644 index 0000000..9ee9ed0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/ubaryd.vim @@ -0,0 +1,87 @@ +" vim-airline companion theme of Ubaryd +" (https://github.com/Donearm/Ubaryd) +" +" Author: Gianluca fiore +" Version: 1.12 +" License: MIT + +" Normal mode +" +let s:N1 = [ '#005f00' , '#f8f6f2','22','15'] +let s:N2 = [ '#f8f6f2' , '#005f00','15','22'] +let s:N3 = [ '#b88853' , '#242321' , 137, 235 ] +let s:N4 = [ '#005f00' , 22 ] + +" Insert mode +let s:I1 = [ '#f8f6f2', '#e25a74','15','161'] +let s:I2 = [ '#242321', '#c14c3d','235','160'] +let s:I3 = [ '#f4cf86' , '#242321' , 222 , 235 ] +let s:I4 = [ '#f4cf86' , 222 ] + +" Visual mode +let s:V1 = [ '#416389', '#f8f6f2','18','15'] +let s:V2 = [ '#416389', '#f4cf86','18','222'] +let s:V3 = [ '#9a4820' , '#f8f6f2','88','15'] +let s:V4 = [ '#9a4820' , 88 ] + +" Replace mode +let s:R1 = [ '#242321' , '#f8f6f2','235','15'] +let s:R2 = [ '#ffa724' , '#666462','214','241'] +let s:R3 = [ '#f8f6f2' , '#ff7400','15','215'] +let s:R4 = [ '#ffa724' , 214 ] + +" Paste mode +let s:PA = [ '#f9ef6d' , 154 ] + +" Info modified +let s:IM = [ '#242321' , 235 ] + +" Inactive mode +let s:IA = [ s:N2[1], s:N3[1], s:N2[3], s:N3[3], '' ] + +let g:airline#themes#ubaryd#palette = {} + +let g:airline#themes#ubaryd#palette.accents = { + \ 'red': [ '#ff7400' , '' , 202 , '' , '' ], + \ } + +let g:airline#themes#ubaryd#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#ubaryd#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#ubaryd#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#ubaryd#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#ubaryd#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#ubaryd#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#ubaryd#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim new file mode 100644 index 0000000..b3e7917 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/understated.vim @@ -0,0 +1,43 @@ +let g:airline#themes#understated#palette = {} + +let s:N1 = ['#FFFFFF', '#5F87FF', 15, 69] " Outside blocks in normal mode (mode and file position) +let s:N2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) +let s:N3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block + +let g:airline#themes#understated#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#understated#palette.normal_modified = {'airline_c': ['#ffffff', '#5f005f', 144, 59, 'bold'] ,} + +let s:I1 = ['#FFFFFF', '#87AF5F', 15, 107] " Outside blocks in normal mode (mode and file position) +let s:I2 = ['#AFAF87', '#5F5F5F', 144, 59] " Next blocks inside (branch and file format) +let s:I3 = ['#AFAF87', '#5F5F5F', 144, 59] " The middle block +let g:airline#themes#understated#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#understated#palette.insert_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} +let g:airline#themes#understated#palette.insert_paste = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, ''] ,} + +let g:airline#themes#understated#palette.replace = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#understated#palette.replace.airline_a = ['#FFFFFF', '#870000', 15, 88, ''] +let g:airline#themes#understated#palette.replace_modified = {'airline_c': ['#AFAF87', '#5F5F5F', 144, 59, 'bold'] ,} + +let s:V1 = ['#FFFFFF', '#AF5F00', 15, 130] +let s:V2 = ['#AFAF87', '#5F5F5F', 144, 59] +let s:V3 = ['#AFAF87', '#5F5F5F', 144, 59] +let g:airline#themes#understated#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#understated#palette.visual_modified = {'airline_c': [ '#AFAF87', '#5f005f', 144, 59, 'bold'] ,} + +let s:V1 = ['#080808', '#FFAF00', 232, 214] +let s:IA1 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let s:IA2 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let s:IA3 = ['#4E4E4E', '#1C1C1C', 239, 234, ''] +let g:airline#themes#understated#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#understated#palette.inactive_modified = {'airline_c': ['#4E4E4E', '', 239, '', 'bold'] ,} + +let g:airline#themes#understated#palette.accents = {'red': ['#FF0000', '', 88, '']} + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#understated#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ ['#FFFFFF', '#1C1C1C', 15, 234, '' ], + \ ['#FFFFFF', '#262626', 15, 235, '' ], + \ ['#FFFFFF', '#303030', 15, 236, 'bold']) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim new file mode 100644 index 0000000..94199a0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/violet.vim @@ -0,0 +1,32 @@ +" Normal mode " guifg guibg ctermfg ctermbg +let s:N1 = [ '#bcbcbc' , '#875faf' , 250 , 97 ] +let s:N2 = [ '#d75fd7' , '#4e4e4e' , 170 , 239 ] +let s:N3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Insert mode +let s:I1 = [ '#CACFD2' , '#009966' , 253 , 35 ] +let s:I2 = [ '#d75fd7' , '#4e4e4e' , 170 , 239 ] +let s:I3 = [ '#c6c6c6' , '#3a3a3a' , 251 , 237 ] + +" Visual mode +let s:V1 = [ '#5f0000' , '#ff5faf' , 52 , 205 ] + +" Replace mode +let s:RE = [ '#c6c6c6' , '#ce537a' , 251, 168 ] + +let g:airline#themes#violet#palette = {} + +let g:airline#themes#violet#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +let g:airline#themes#violet#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#violet#palette.insert_replace = { + \ 'airline_a': [ s:RE[0] , s:I1[1] , s:RE[1] , s:I1[3] , '' ] } + +let g:airline#themes#violet#palette.visual = { + \ 'airline_a': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , '' ] } + +let g:airline#themes#violet#palette.replace = copy(g:airline#themes#violet#palette.normal) +let g:airline#themes#violet#palette.replace.airline_a = [ s:RE[0] , s:RE[1] , s:RE[2] , s:RE[3] , '' ] + +let s:IA = [ s:N1[1] , s:N3[1] , s:N1[3] , s:N3[3] , '' ] +let g:airline#themes#violet#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim new file mode 100644 index 0000000..622683f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/wombat.vim @@ -0,0 +1,90 @@ +" vim-airline companion theme of Wombat +" looks great with wombat256 vim colorscheme + +" Normal mode +" [ guifg, guibg, ctermfg, ctermbg, opts ] +let s:N1 = [ '#141413' , '#CAE682' , 232 , 192 ] " mode +let s:N2 = [ '#CAE682' , '#32322F' , 192 , 238 ] " info +let s:N3 = [ '#CAE682' , '#242424' , 192 , 235 ] " statusline +let s:N4 = [ '#86CD74' , 113 ] " mode modified + +" Insert mode +let s:I1 = [ '#141413' , '#FDE76E' , 232 , 227 ] +let s:I2 = [ '#FDE76E' , '#32322F' , 227 , 238 ] +let s:I3 = [ '#FDE76E' , '#242424' , 227 , 235 ] +let s:I4 = [ '#FADE3E' , 221 ] + +" Visual mode +let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 153 ] +let s:V2 = [ '#B5D3F3' , '#32322F' , 153 , 238 ] +let s:V3 = [ '#B5D3F3' , '#242424' , 153 , 235 ] +let s:V4 = [ '#7CB0E6' , 111 ] + +" Replace mode +let s:R1 = [ '#141413' , '#E5786D' , 232 , 173 ] +let s:R2 = [ '#E5786D' , '#32322F' , 173 , 238 ] +let s:R3 = [ '#E5786D' , '#242424' , 173 , 235 ] +let s:R4 = [ '#E55345' , 203 ] + +" Paste mode +let s:PA = [ '#94E42C' , 47 ] + +" Info modified +let s:IM = [ '#40403C' , 238 ] + +" Inactive mode +let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ] + +let g:airline#themes#wombat#palette = {} + +let g:airline#themes#wombat#palette.accents = { + \ 'red': [ '#E5786D' , '' , 203 , '' , '' ], + \ } + +let g:airline#themes#wombat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#wombat#palette.normal_modified = { + \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] , + \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#wombat#palette.insert_modified = { + \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] , + \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#wombat#palette.visual_modified = { + \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] , + \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) +let g:airline#themes#wombat#palette.replace_modified = { + \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] , + \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] , + \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] , + \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] } + + +let g:airline#themes#wombat#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) +let g:airline#themes#wombat#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } + + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#wombat#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#DADADA' , '#242424' , 253 , 234 , '' ] , + \ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] , + \ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] ) + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim new file mode 100644 index 0000000..21d349e --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/xtermlight.vim @@ -0,0 +1,45 @@ +let g:airline#themes#xtermlight#palette = {} + +let s:N1 = [ '#eeeeee' , '#005fff' , 255 , 27 ] +let s:N2 = [ '#000087' , '#00d7ff' , 18 , 45 ] +let s:N3 = [ '#005fff' , '#afffff' , 27 , 159 ] +let g:airline#themes#xtermlight#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) +let g:airline#themes#xtermlight#palette.normal_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:I1 = [ '#eeeeee' , '#00875f' , 255 , 29 ] +let s:I2 = [ '#005f00' , '#00d787' , 22 , 42 ] +let s:I3 = [ '#005f5f' , '#afff87' , 23 , 156 ] +let g:airline#themes#xtermlight#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#xtermlight#palette.insert_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } +let g:airline#themes#xtermlight#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#d78700' , s:I1[2] , 172 , '' ] , + \ } + + +let g:airline#themes#xtermlight#palette.replace = copy(g:airline#themes#xtermlight#palette.insert) +let g:airline#themes#xtermlight#palette.replace.airline_a = [ s:I2[0] , '#ff0000' , s:I1[2] , 196 , '' ] +let g:airline#themes#xtermlight#palette.replace_modified = g:airline#themes#xtermlight#palette.insert_modified + + +let s:V1 = [ '#eeeeee' , '#ff5f00' , 255 , 202 ] +let s:V2 = [ '#5f0000' , '#ffaf00' , 52 , 214 ] +let s:V3 = [ '#d75f00' , '#ffff87' , 166 , 228 ] +let g:airline#themes#xtermlight#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#xtermlight#palette.visual_modified = { + \ 'airline_c': [ '#d70000' , '#ffdfdf' , 160 , 224 , '' ] , + \ } + + +let s:IA1 = [ '#6c6c6c' , '#b2b2b2' , 242 , 249 , '' ] +let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] +let s:IA3 = [ '#a8a8a8' , '#eeeeee' , 248 , 255 , '' ] +let g:airline#themes#xtermlight#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#xtermlight#palette.inactive_modified = { + \ 'airline_c': [ '#d70000' , '' , 160 , '' , '' ] , + \ } + diff --git a/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim new file mode 100644 index 0000000..58fae81 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/autoload/airline/themes/zenburn.vim @@ -0,0 +1,45 @@ +let g:airline#themes#zenburn#palette = {} + +function! airline#themes#zenburn#refresh() + let g:airline#themes#zenburn#palette.accents = { + \ 'red': airline#themes#get_highlight('Constant'), + \ } + + let s:N1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Folded', 'fg'], 'bold') + let s:N2 = airline#themes#get_highlight('Folded') + let s:N3 = airline#themes#get_highlight('NonText') + let s:Nmod = airline#themes#get_highlight('Comment') + + let g:airline#themes#zenburn#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + let g:airline#themes#zenburn#palette.normal.airline_c = s:Nmod + let g:airline#themes#zenburn#palette.normal_modified = { + \ 'airline_c': s:Nmod + \ } + + let s:I1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['String', 'fg'], 'bold') + let s:I2 = airline#themes#get_highlight2(['String', 'fg'], ['Folded', 'bg']) + let s:I3 = s:N3 + let g:airline#themes#zenburn#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) + let g:airline#themes#zenburn#palette.insert.airline_c = s:Nmod + let g:airline#themes#zenburn#palette.insert_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:R1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Comment', 'fg'], 'bold') + let s:R2 = airline#themes#get_highlight2(['Comment', 'fg'], ['Folded', 'bg']) + let s:R3 = s:N3 + let g:airline#themes#zenburn#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) + let g:airline#themes#zenburn#palette.replace_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:V1 = airline#themes#get_highlight2(['DbgCurrent', 'bg'], ['Identifier', 'fg'], 'bold') + let s:V2 = airline#themes#get_highlight2(['Identifier', 'fg'], ['Folded', 'bg']) + let s:V3 = s:N3 + let g:airline#themes#zenburn#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) + let g:airline#themes#zenburn#palette.visual_modified = g:airline#themes#zenburn#palette.normal_modified + + let s:IA = airline#themes#get_highlight('NonText') + let g:airline#themes#zenburn#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) + let g:airline#themes#zenburn#palette.inactive_modified = { + \ 'airline_c': s:Nmod + \ } +endfunction + +call airline#themes#zenburn#refresh() diff --git a/dot_vim/plugged/vim-airline-themes/doc/airline-themes.txt b/dot_vim/plugged/vim-airline-themes/doc/airline-themes.txt new file mode 100644 index 0000000..9824284 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/doc/airline-themes.txt @@ -0,0 +1,442 @@ +*airline-themes.txt* Themes for vim-airline + _ _ _ _ ~ + __ _(_)_ __ ___ __ _(_)_ __| (_)_ __ ___ ~ + \ \ / / | '_ ` _ \ _____ / _` | | '__| | | '_ \ / _ \ ~ + \ V /| | | | | | |_____| (_| | | | | | | | | | __/ ~ + \_/ |_|_| |_| |_| \__,_|_|_| |_|_|_| |_|\___| ~ + ~ +============================================================================== +CONTENTS *airline-theme-contents* + + 01. Intro ........................................ |airline-themes-intro| + 02. Features ........................................... |airline-themes| + 03. Configuration ........................ |airline-themes-configuration| + 04. Contributions ........................ |airline-themes-contributions| + 05. License .................................... |airline-themes-license| + +============================================================================== +INTRODUCTION *airline-themes-intro* + +This is a plugin for vim-airline and provides several themes to be used in +conjunction with |vim-airline| + +============================================================================== +FEATURES *airline-themes-list* + +Currently this repository contains the following themes: + + + * alduin + * angr + * apprentice + * atomic + * ayu_light + * ayu_mirage + * ayu_dark + * badwolf + * base16 (|airline-theme-base16|) + * base16_vim (|airline-theme-base16_vim|) + * base16_shell (|airline-theme-base16_shell|) + * base16_3024 + * base16_adwaita + * base16_apathy + * base16_ashes + * base16_atelier_cave + * base16_atelier_cave_light + * base16_atelier_dune + * base16_atelier_dune_light + * base16_atelier_estuary + * base16_atelier_estuary_light + * base16_atelier_forest + * base16_atelier_forest_light + * base16_atelier_heath + * base16_atelier_heath_light + * base16_atelier_lakeside + * base16_atelier_lakeside_light + * base16_atelier_plateau + * base16_atelier_plateau_light + * base16_atelier_savanna + * base16_atelier_savanna_light + * base16_atelier_seaside + * base16_atelier_seaside_light + * base16_atelier_sulphurpool + * base16_atelier_sulphurpool_light + * base16_atelierdune + * base16_atelierforest + * base16_atelierheath + * base16_atelierlakeside + * base16_atelierseaside + * base16_atlas + * base16_bespin + * base16_black_metal + * base16_black_metal_bathory + * base16_black_metal_burzum + * base16_black_metal_dark_funeral + * base16_black_metal_gorgoroth + * base16_black_metal_immortal + * base16_black_metal_khold + * base16_black_metal_marduk + * base16_black_metal_mayhem + * base16_black_metal_nile + * base16_black_metal_venom + * base16_brewer + * base16_bright + * base16_brogrammer + * base16_brushtrees + * base16_brushtrees_dark + * base16_chalk + * base16_circus + * base16_classic + * base16_classic_dark + * base16_classic_light + * base16_codeschool + * base16_colors + * base16_cupcake + * base16_cupertino + * base16_darktooth + * base16_decaf + * base16_default + * base16_default_dark + * base16_default_light + * base16_dracula + * base16_edge_dark + * base16_edge_light + * base16_eighties + * base16_embers + * base16_espresso + * base16_flat + * base16_framer + * base16_fruit_soda + * base16_gigavolt + * base16_github + * base16_google + * base16_google_dark + * base16_google_light + * base16_grayscale + * base16_grayscale_dark + * base16_grayscale_light + * base16_greenscreen + * base16_gruvbox_dark_hard + * base16_gruvbox_dark_medium + * base16_gruvbox_dark_pale + * base16_gruvbox_dark_soft + * base16_gruvbox_light_hard + * base16_gruvbox_light_medium + * base16_gruvbox_light_soft + * base16_harmonic16 + * base16_harmonic_dark + * base16_harmonic_light + * base16_heetch + * base16_heetch_light + * base16_helios + * base16_hopscotch + * base16_horizon_dark + * base16_horizon_light + * base16_horizon_terminal_dark + * base16_horizon_terminal_light + * base16_ia_dark + * base16_ia_light + * base16_icy + * base16_irblack + * base16_isotope + * base16_londontube + * base16_macintosh + * base16_marrakesh + * base16_materia + * base16_material + * base16_material_darker + * base16_material_lighter + * base16_material_palenight + * base16_material_vivid + * base16_mellow_purple + * base16_mexico_light + * base16_mocha + * base16_monokai + * base16_nord + * base16_nova + * base16_ocean + * base16_oceanicnext + * base16_one_light + * base16_onedark + * base16_outrun_dark + * base16_papercolor_dark + * base16_papercolor_light + * base16_paraiso + * base16_phd + * base16_pico + * base16_pop + * base16_porple + * base16_railscasts + * base16_rebecca + * base16_sandcastle + * base16_seti + * base16_shapeshifter + * base16_snazzy + * base16_solarflare + * base16_solarized + * base16_solarized_dark + * base16_solarized_light + * base16_spacemacs + * base16_summerfruit + * base16_summerfruit_dark + * base16_summerfruit_light + * base16_synth_midnight_dark + * base16_tomorrow + * base16_tomorrow_night + * base16_tomorrow_night_eighties + * base16_tube + * base16_twilight + * base16_vim + * base16_unikitty_dark + * base16_unikitty_light + * base16_woodland + * base16_xcode_dusk + * base16_zenburn + * base16color + * behelit + * biogoo + * bubblegum + * blood_red + * cobalt2 + * cool + * cyberpunk + * dark + * dark_minimal + * desertink + * deus + * distinguished + * durant + * faryfloss + * fruit_punch + * google_dark + * google_light + * hybrid + * hybridline + * jay + * jellybeans + * jet + * kalisi + * kolor + * laederon + * lessnoise + * light + * lighthaus + * lucius + * luna + * minimalist (|airline-theme-minimalist|) + * molokai + * monochrome + * murmur + * night_owl + * nord-minimal + * onedark (|airline-theme-onedark|) + * ouo + * owo + * papercolor + * peaksea + * powerlineish + * qwq + * raven + * ravenpower + * seagull + * selenized + * selenized_bw + * seoul256 + * serene + * sierra + * silver + * simple + * soda + * sol + * solarized (|airline-theme-solarized|) + * solarized_flood + * supernova + * term + * term_light + * tomorrow + * ubaryd + * understated + * violet + * wombat + * xtermlight + * zenburn + * transparent + +============================================================================== +NAME *airline-themes-configuration* + + *g:airline_theme* + +To define a theme to be used by vim-airline you can set the variable +g:airline_theme in your |.vimrc| like this: > + :let g:airline_theme='dark' +< +*airline-theme-base16_vim* +*airline-theme-base16_shell* +------------------------------------------------------------------------------ +Base16 is an extensive collection of colorschemes built on a common +architecture by Chris Kempson (http://chriskempson.com/projects/base16/). The +base16_vim airline theme integrates with the base16-vim plugin +(https://github.com/chriskempson/base16-vim) to match the currently selected +colorscheme. This works with all modes of using base16-vim: running vim in +a terminal configured with base16-shell +(https://github.com/chriskempson/base16-shell), running vim with +'termguicolors' set, or running gvim. + +The alias base16_shell is provided for backward compatibility. + +This theme provides two options: + + *g:airline_base16_improved_contrast* + +Improve the contrast for the inactive statusline. > + let g:airline_base16_improved_contrast = 1 +Default: 0 + *g:airline_base16_monotone* + *g:airline_base16_solarized* + +Adjust the theme for a more monotonic look. This option is designed with the +base16-solarized-(light|dark) colorschemes in mind, but work well with the +other base16 colorshemes as well. > + let g:airline_base16_monotone = 1 +or, > + let g:airline_base16_solarized = 1 " retained for backward compatibility +Default: 0 + +*airline-theme-base16* +------------------------------------------------------------------------------ +This theme matches base16 colorschemes by extracting colors from highlight +groups, and also provides a static option. + + *airline#themes#base16#constant* + +Use a predefined palette instead of guessing values from highlight groups. To +enable: > + let g:airline#themes#base16#constant = 1 +Default: 0 + +A number of static themes that match particular base16 colorschemes are also +available, see |airline-themes-list|. + +*airline-theme-dark_minimal* +------------------------------------------------------------------------------ +This is a copy of the dark.vim theme, however it does not change colors in +the different modes, so should bring some performance improvements because +airline does not have to redefine highlighting groups after they have been +setup once. However, it won't change colors if e.g. the mode changes. + +*airline-theme-deus* +------------------------------------------------------------------------------ + *g:deus_termcolors* + +Set to 256 for 256-color mode (the default), or 16 for 16-color mode. +Has no effect if using true/24-bit color. To enable 16-color mode: > + let g:deus_termcolors = 16 + +*airline-theme-minimalist* +------------------------------------------------------------------------------ + *g:airline_minimalist_showmod* + +Highlight when the buffer is modified. > + let g:airline_minimalist_showmod = 1 +< +*airline-theme-onedark* +------------------------------------------------------------------------------ + *g:onedark_termcolors* + +Set to 256 for 256-color mode (the default), or 16 for 16-color mode. +Has no effect if using true/24-bit color. To enable 16-color mode: > + let g:onedark_termcolors = 16 +< +16-color mode is intended to be used with specific terminal colors as +described in the installation notes for the joshdick/onedark.vim colorscheme: +(https://github.com/joshdick/onedark.vim#installation) + +*airline-theme-molokai* +------------------------------------------------------------------------------ +Enable brighter molokai theme. Mainly, the branch and filetype sections will +be shown in a nice orange. > + let g:airline_molokai_bright = 1 +< +*airline-theme-solarized* +------------------------------------------------------------------------------ + *g:airline_solarized_normal_green* + +Turns the outer-most section of the statusline Solarized green, making it +look more like classic powerline in normal mode. To enable it: > + let g:airline_solarized_normal_green = 1 +< + *airline_solarized_dark_inactive_background* + +For buffer(s) in the tabline that are displayed in an inactive window pane, +use a darker background for the buffer display in the tabline. To enable it: > + let g:airline_solarized_dark_inactive_background = 1 +< + *g:airline_solarized_dark_text* + +Turns the text color of the outer-most sections of the statusline to be dark. +To enable it: > + let g:airline_solarized_dark_text = 1 +< + *g:airline_solarized_dark_inactive_border* + +Changes inactive window panes to have a dark bottom border instead +of light by default. To enable it: > + let g:airline_solarized_dark_inactive_border = 1 +< + *g:airline_solarized_enable_command_color* + +In command mode, set the status line to its own color (violet). To enable it: > + let airline_solarized_enable_command_color = 1 +< + *g:solarized_base16* + +Base16 has a Solarized theme with the usual colors, but mapped in the +terminal differently. The main difference is that the bright colors, +Ansi 9-15, are left the same as their Ansi 1-7 counterparts. The +remaining solarized colors are mapped into higher indexes by using +Base16 Shell. To enable it: > + let g:solarized_base16 = 1 +< +See also https://github.com/blueyed/vim-colors-solarized/commit/92f2f994. + +*airline-theme-zenburn* +------------------------------------------------------------------------------ + *g:zenburn_high_Contrast* + +Enable higher contrast colors for the zenburn colorscheme and the +corresponding airline theme. Must be set before switching to the zenburn +colorscheme > + let g:zenburn_high_Contrast = 1 + +The zenburn colorscheme also supports a couple of other configuration +variables, that possibly also influence the colors in the zenburn airline +theme. Please check the zenburn color scheme on how to configure it. +============================================================================== +Base16 Themes Generation *airline-themes-base16-generation* + +Base16 is a curated list of themes you can find here: +https://github.com/chriskempson/base16. + +Each theme defines 16 colors, and each editor creates a template .mustache +file to create the themes for their application. + +You can find the .mustache files for vim-airline themes here: +https://github.com/dawikur/base16-vim-airline-themes. +If the .mustache file is given to a Base16 builder, +it will generate every included base16 theme. + +These themes were generated using the Python builder which is available here: +https://github.com/InspectorMustache/base16-builder-python + +============================================================================== +CONTRIBUTIONS *airline-themes-contributions* + +Contributions and pull requests are welcome. + +============================================================================== +LICENSE *airline-themes-license* + +MIT License. Copyright © 2013-2020 Bailey Ling, et al + + vim:tw=78:ts=8:ft=help:norl: diff --git a/dot_vim/plugged/vim-airline-themes/doc/tags b/dot_vim/plugged/vim-airline-themes/doc/tags new file mode 100644 index 0000000..bf25aad --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/doc/tags @@ -0,0 +1,33 @@ +airline#themes#base16#constant airline-themes.txt /*airline#themes#base16#constant* +airline-theme-base16 airline-themes.txt /*airline-theme-base16* +airline-theme-base16_shell airline-themes.txt /*airline-theme-base16_shell* +airline-theme-base16_vim airline-themes.txt /*airline-theme-base16_vim* +airline-theme-contents airline-themes.txt /*airline-theme-contents* +airline-theme-dark_minimal airline-themes.txt /*airline-theme-dark_minimal* +airline-theme-deus airline-themes.txt /*airline-theme-deus* +airline-theme-minimalist airline-themes.txt /*airline-theme-minimalist* +airline-theme-molokai airline-themes.txt /*airline-theme-molokai* +airline-theme-onedark airline-themes.txt /*airline-theme-onedark* +airline-theme-solarized airline-themes.txt /*airline-theme-solarized* +airline-theme-zenburn airline-themes.txt /*airline-theme-zenburn* +airline-themes-base16-generation airline-themes.txt /*airline-themes-base16-generation* +airline-themes-configuration airline-themes.txt /*airline-themes-configuration* +airline-themes-contributions airline-themes.txt /*airline-themes-contributions* +airline-themes-intro airline-themes.txt /*airline-themes-intro* +airline-themes-license airline-themes.txt /*airline-themes-license* +airline-themes-list airline-themes.txt /*airline-themes-list* +airline-themes.txt airline-themes.txt /*airline-themes.txt* +airline_solarized_dark_inactive_background airline-themes.txt /*airline_solarized_dark_inactive_background* +g:airline_base16_improved_contrast airline-themes.txt /*g:airline_base16_improved_contrast* +g:airline_base16_monotone airline-themes.txt /*g:airline_base16_monotone* +g:airline_base16_solarized airline-themes.txt /*g:airline_base16_solarized* +g:airline_minimalist_showmod airline-themes.txt /*g:airline_minimalist_showmod* +g:airline_solarized_dark_inactive_border airline-themes.txt /*g:airline_solarized_dark_inactive_border* +g:airline_solarized_dark_text airline-themes.txt /*g:airline_solarized_dark_text* +g:airline_solarized_enable_command_color airline-themes.txt /*g:airline_solarized_enable_command_color* +g:airline_solarized_normal_green airline-themes.txt /*g:airline_solarized_normal_green* +g:airline_theme airline-themes.txt /*g:airline_theme* +g:deus_termcolors airline-themes.txt /*g:deus_termcolors* +g:onedark_termcolors airline-themes.txt /*g:onedark_termcolors* +g:solarized_base16 airline-themes.txt /*g:solarized_base16* +g:zenburn_high_Contrast airline-themes.txt /*g:zenburn_high_Contrast* diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/HEAD b/dot_vim/plugged/vim-airline-themes/dot_git/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/branches/.keep b/dot_vim/plugged/vim-airline-themes/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/config b/dot_vim/plugged/vim-airline-themes/dot_git/config new file mode 100644 index 0000000..2e56037 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/vim-airline/vim-airline-themes.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/description b/dot_vim/plugged/vim-airline-themes/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/post-update.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-push.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/index b/dot_vim/plugged/vim-airline-themes/dot_git/index new file mode 100644 index 0000000..7ac3414 Binary files /dev/null and b/dot_vim/plugged/vim-airline-themes/dot_git/index differ diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/info/exclude b/dot_vim/plugged/vim-airline-themes/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/logs/HEAD b/dot_vim/plugged/vim-airline-themes/dot_git/logs/HEAD new file mode 100644 index 0000000..4648293 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 dd81554c2231e438f6d0e8056ea38fd0e80ac02a LinlyBoi 1676062731 +0200 clone: from https://github.com/vim-airline/vim-airline-themes.git +dd81554c2231e438f6d0e8056ea38fd0e80ac02a dd81554c2231e438f6d0e8056ea38fd0e80ac02a LinlyBoi 1676062732 +0200 checkout: moving from master to master diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/heads/master b/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/heads/master new file mode 100644 index 0000000..d69deaa --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 dd81554c2231e438f6d0e8056ea38fd0e80ac02a LinlyBoi 1676062731 +0200 clone: from https://github.com/vim-airline/vim-airline-themes.git diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..d69deaa --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 dd81554c2231e438f6d0e8056ea38fd0e80ac02a LinlyBoi 1676062731 +0200 clone: from https://github.com/vim-airline/vim-airline-themes.git diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/objects/info/.keep b/dot_vim/plugged/vim-airline-themes/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.idx b/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.idx new file mode 100644 index 0000000..b452335 Binary files /dev/null and b/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.idx differ diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.pack b/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.pack new file mode 100644 index 0000000..680b365 Binary files /dev/null and b/dot_vim/plugged/vim-airline-themes/dot_git/objects/pack/readonly_pack-f0c90ec387856bdc94b1b6a4d9fdaa1db01bf0d1.pack differ diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/packed-refs b/dot_vim/plugged/vim-airline-themes/dot_git/packed-refs new file mode 100644 index 0000000..e755181 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/packed-refs @@ -0,0 +1,4 @@ +# pack-refs with: peeled fully-peeled sorted +91721e3c0d86f44c7831a54f2609959b8edf57cc refs/remotes/origin/jellybeans-refactor +dd81554c2231e438f6d0e8056ea38fd0e80ac02a refs/remotes/origin/master +79a3beecfe04baedfe72b85b1bdd1d9521b7210e refs/remotes/origin/replace-testing-framework diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/refs/heads/master b/dot_vim/plugged/vim-airline-themes/dot_git/refs/heads/master new file mode 100644 index 0000000..de183b6 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/refs/heads/master @@ -0,0 +1 @@ +dd81554c2231e438f6d0e8056ea38fd0e80ac02a diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/vim-airline-themes/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..6efe28f --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/refs/tags/.keep b/dot_vim/plugged/vim-airline-themes/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vim-airline-themes/dot_git/shallow b/dot_vim/plugged/vim-airline-themes/dot_git/shallow new file mode 100644 index 0000000..99e4ef9 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_git/shallow @@ -0,0 +1,3 @@ +79a3beecfe04baedfe72b85b1bdd1d9521b7210e +91721e3c0d86f44c7831a54f2609959b8edf57cc +dd81554c2231e438f6d0e8056ea38fd0e80ac02a diff --git a/dot_vim/plugged/vim-airline-themes/dot_github/ISSUE_TEMPLATE.md b/dot_vim/plugged/vim-airline-themes/dot_github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..fb8d575 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_github/ISSUE_TEMPLATE.md @@ -0,0 +1,24 @@ +#### environment + +- vim: ???? +- vim-airline: ???? +- colorscheme: ???? +- OS: ???? +- Have you reproduced with a minimal vimrc: ??? +- What is your airline configuration: ??? +if you are using terminal: +- terminal: ???? +- $TERM variable: ??? +- color configuration (:set t_Co?): +if you are using Neovim: +- does it happen in Vim: ??? + +#### actual behavior + +???? + +#### expected behavior + +???? + +#### screen shot (if possible) diff --git a/dot_vim/plugged/vim-airline-themes/dot_github/workflows/ci.yml b/dot_vim/plugged/vim-airline-themes/dot_github/workflows/ci.yml new file mode 100644 index 0000000..ea54c54 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_github/workflows/ci.yml @@ -0,0 +1,44 @@ +on: + push: + branches: + - master + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + vim: + - v8.2.2000 + - v8.2.1000 + - v8.2.0000 + - v8.1.0000 + - v8.0.0000 + + steps: + - name: Checkout code + uses: actions/checkout@main + + - name: Setup Vim + uses: rhysd/action-setup-vim@v1 + with: + version: ${{ matrix.vim }} + + - name: Install Dependencies + run: | + git clone https://github.com/junegunn/vader.vim.git + git clone https://github.com/vim-airline/vim-airline + find $PWD/autoload/airline/themes -name "*.vim" > themes.txt + - name: Run Test + run: | + vim --not-a-term -Nu <(cat << VIMRC + filetype off + set rtp+=vader.vim + set rtp+=vim-airline + set rtp+=. + set rtp+=after + filetype plugin indent on + syntax enable + VIMRC) -c 'Vader! test/*' > /dev/null diff --git a/dot_vim/plugged/vim-airline-themes/dot_github/workflows/reviewdog.yml b/dot_vim/plugged/vim-airline-themes/dot_github/workflows/reviewdog.yml new file mode 100644 index 0000000..1e0d8df --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_github/workflows/reviewdog.yml @@ -0,0 +1,22 @@ +name: reviewdog + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + vint: + name: runner / vint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: vint + uses: reviewdog/action-vint@v1 + with: + github_token: ${{ secrets.github_token }} + level: error + reporter: github-pr-check diff --git a/dot_vim/plugged/vim-airline-themes/dot_gitignore b/dot_vim/plugged/vim-airline-themes/dot_gitignore new file mode 100644 index 0000000..17402e5 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/dot_gitignore @@ -0,0 +1,2 @@ +.DS_Store +doc/tags diff --git a/dot_vim/plugged/vim-airline-themes/plugin/airline-themes.vim b/dot_vim/plugged/vim-airline-themes/plugin/airline-themes.vim new file mode 100644 index 0000000..1e4a4f2 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/plugin/airline-themes.vim @@ -0,0 +1,15 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling & Contributors. +" vim: et ts=2 sts=2 sw=2 + +let s:save_cpo = &cpo +set cpo&vim + +scriptencoding utf-8 + +if &cp || v:version < 702 || (exists('g:loaded_airline_themes') && g:loaded_airline_themes) + finish +endif +let g:loaded_airline_themes = 1 + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/dot_vim/plugged/vim-airline-themes/test/airline-themes.vader b/dot_vim/plugged/vim-airline-themes/test/airline-themes.vader new file mode 100644 index 0000000..253ef36 --- /dev/null +++ b/dot_vim/plugged/vim-airline-themes/test/airline-themes.vader @@ -0,0 +1,38 @@ +# Make sure that theme and 5 basic modes don't throw an error +# Get list of all included themes +Execute (validate themes): + let themes = readfile('themes.txt') + call sort(themes) + + let err_proc = v:false + try + + for themePath in themes + + " Check all the basic modes and their modified counterparts + " This test only fails on exceptional cases + let theme = fnamemodify(themePath, ':t:r') + Log theme + execute('AirlineTheme ' . theme) + execute('source ' . themePath) + normal! i + normal! : + normal! R + normal! v + setlocal mod + normal! i + normal! : + normal! R + normal! v + setlocal nomod + + endfor + + catch + let err_proc = v:true + Log "Failed validation testing with exception:" + Log string(v:exception) + endtry + AirlineRefresh + + Assert !err_proc diff --git a/dot_vim/plugged/vim-airline/CHANGELOG.md b/dot_vim/plugged/vim-airline/CHANGELOG.md new file mode 100644 index 0000000..e2fc5c3 --- /dev/null +++ b/dot_vim/plugged/vim-airline/CHANGELOG.md @@ -0,0 +1,251 @@ +# Change Log + +This is the Changelog for the vim-airline project. + +## [0.12] - Unreleased +- New features + - Extensions: + - [poetv](https://github.com/petobens/poet-v) support + - [vim-lsp](https://github.com/prabirshrestha/vim-lsp) support + - [zoomwintab](https://github.com/troydm/zoomwintab.vim) support + - [Vaffle](https://github.com/cocopon/vaffle.vim) support + - [vim-dirvish](https://github.com/justinmk/vim-dirvish) support + - [fzf.vim](https://github.com/junegunn/fzf.vim) support + - [OmniSharp](https://github.com/OmniSharp/omnisharp-vim) support + - [searchcount](https://vim-jp.org/vimdoc-en/eval.html#searchcount()) support + - [fern.vim](https://github.com/lambdalisue/fern.vim) support + - [Vim-CMake](https://github.com/cdelledonne/vim-cmake) support + - [battery.vim](https://github.com/lambdalisue/battery.vim) support + - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) support + - [gen_tags.vim](https://github.com/jsfaint/gen_tags.vim) support + - Ascii Scrollbar support +- Improvements + - git branch can also be displayed using [gina.vim](https://github.com/lambdalisue/gina.vim) + - coc extensions can also show additional status messages as well as the current function + - [coc-git](https://github.com/neoclide/coc-git) extension integrated into hunks extension + - rewrote parts using Vim9 Script for performance improvements +- Other + - Changed CI from travis-ci.org to GitHub Actions + - Introduce Vim script static analysis using [reviewdog](https://github.com/reviewdog/action-vint) + - Added multiple Vim versions to unit tests using Travis CI + - Added option to show short paths in the status line + +## [0.11] - 2019-11-10 +- New features + - Extensions: + - [Coc](https://github.com/neoclide/coc.nvim) support + - [Defx](https://github.com/Shougo/defx.nvim) support + - [gina](https://github.com/lambdalisue/gina.vim) support + - [vim-bookmark](https://github.com/MattesGroeger/vim-bookmarks) support + - [vista.vim](https://github.com/liuchengxu/vista.vim) support + - [tabws](https://github.com/s1341/vim-tabws) support for the tabline +- Improvements + - The statusline can be configured to be shown on top (in the tabline) + Set the `g:airline_statusline_ontop` to enable this experimental feature. + - If `buffer_idx_mode=2`, up to 89 mappings will be exposed to access more + buffers directly (issue [#1823](https://github.com/vim-airline/vim-airline/issues/1823)) + - Allow to use `random` as special theme name, which will switch to a random + airline theme (at least if a random number can be generated :() + - The branch extensions now also displays whether the repository is in a clean state + (will append a ! or ⚡if the repository is considered dirty). + - The whitespace extensions will also check for conflict markers + - `:AirlineRefresh` command now takes an additional `!` attribute, that **skips** + recreating the highlighting groups (which might have a serious performance + impact if done very often, as might be the case when the configuration variable + `airline_skip_empty_sections` is active). + - airline can now also detect multiple cursor mode (issue [#1933](https://github.com/vim-airline/vim-airline/issues/1933)) + - expose hunks output using the function `airline#extensions#hunks#get_raw_hunks()` to the outside [#1877](https://github.com/vim-airline/vim-airline/pull/1877) + - expose wordcount affected filetype list to the public using the `airline#extensions#wordcount#filetypes` variable [#1887](https://github.com/vim-airline/vim-airline/pull/1887) + - for the `:AirlineExtension` command, indicate whether the extension has been loaded from an external source [#1890](https://github.com/vim-airline/vim-airline/issues/1890) + - correctly load custom wordcount formatters [#1896](https://github.com/vim-airline/vim-airline/issues/1896) + - add a new short_path formatter for the tabline [#1898](https://github.com/vim-airline/vim-airline/pull/1898) + - several improvements to the branch, denite and tabline extension, as well as the async code for Vim and Neovim + - the term extension supports [neoterm](https://github.com/kassio/neoterm) vim plugin + +## [0.10] - 2018-12-15 +- New features + - Extensions: + - [LanguageClient](https://github.com/autozimu/LanguageClient-neovim) + - [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags) + - [vim-localsearch](https://github.com/mox-mox/vim-localsearch) + - [xtabline](https://github.com/mg979/vim-xtabline) + - [vim-grepper](https://github.com/mhinz/vim-grepper) + - Add custom AirlineModeChanged autocommand, allowing to call user defined commands + whenever airline displays a different mode + - New :AirlineExtensions command, to show which extensions have been loaded + - Detect several new modes (e.g. completion, virtual replace, etc) +- Improvements + - Various performance improvements, should Vim keep responsive, even when + many highlighting groups need to be re-created + - Rework tabline extension + - Refactor [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) extension + - Refactor the wordcount extension + - Reworked the po extension + - Allow to disable line numbers for the [Ale Extension](https://github.com/w0rp/ale) + - [fugitive](https://github.com/tpope/vim-fugitive) plugin has been refactored + causing adjustments for vim-airline, also uses Fugitives new API calls + - some improvements to Vims terminal mode + - Allow to use alternative seperators for inactive windows ([#1236](https://github.com/vim-airline/vim-airline/issues/1236)) + - Statusline can be set to inactive, whenever Vim loses focus (using FocusLost autocommand) + +## [0.9] - 2018-01-15 +- Changes + - Look of default Airline Symbols has been improved [#1397](https://github.com/vim-airline/vim-airline/issues/1397) + - Airline does now set `laststatus=2` if needed + - Syntastic extension now displays warnings and errors separately + - Updates on Resize and SessionLoad events + - Add `maxlinenr` symbol to `airline_section_z` + - Add quickfix title to inactive windows +- Improvements + - Many performance improvements (using caching and async feature when possible) + - Cache changes to highlighting groups if `g:airline_highlighting_cache = 1` is set + - Allow to skip empty sections by setting `g:airline_skip_empty_sections` variable + - Make use of improved Vim Script API, if available (e.g. getwininfo()) + - Support for Vims terminal feature (very experimental since it hasn't been stabilized yet) + - More configuration for the tabline extension (with clickable buffers for Neovim) + - Works better on smaller window sizes + - Make airline aware of git worktrees + - Improvements to the fugitive extension [#1603](https://github.com/vim-airline/vim-airline/issues/1603) + - Allows for configurable fileformat output if `g:airline#parts#ffenc#skip_expected_string` is set + - Improvements to the documentation +- New features + - Full async support for Vim 8 and Neovim + - Extensions: + - [vim-bufmru](https://github.com/mildred/vim-bufmru) + - [xkb-switch](https://github.com/ierton/xkb-switch) + - [input-source-switcher](https://github.com/vovkasm/input-source-switcher) + - [vimagit](https://github.com/jreybert/vimagit) + - [denite](https://github.com/Shougo/denite.nvim) + - [dein](https://github.com/Shougo/dein.vim) + - [vimtex](https://github.com/lervag/vimtex) + - [minpac](https://github.com/k-takata/minpac/) + - [vim-cursormode](https://github.com/vheon/vim-cursormode) + - [Neomake](https://github.com/neomake/neomake) + - [Ale](https://github.com/w0rp/ale) + - [vim-obsession](https://github.com/tpope/vim-obsession) + - spell (can also display Spell language) + - keymap + - Formatters: + - Formatters for JavaScript [#1617](https://github.com/vim-airline/vim-airline/issues/1617) + - Tabline: Allow for custom formatter for `tab_nr_type` [#1418](https://github.com/vim-airline/vim-airline/issues/1418) + - Customizable wordcount formatter [#1584](https://github.com/vim-airline/vim-airline/issues/1584) + - Add User autocommand for Theme changing [#1226](https://github.com/vim-airline/vim-airline/issues/1226) + - Shows mercurial mq status if hg mq extension is enabled + +## [0.8] - 2016-03-09 +- Changes + - Airline converted to an organization and moved to new [repository](https://github.com/vim-airline/vim-airline) + - Themes have been split into an separate repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) +- Improvements + - Extensions + - branch: support Git and Mercurial simultaneously, untracked files + - whitespace: new mixed-indent rule + - Windows support + - Many bug fixes + - Support for Neovim +- New features + - Many new themes + - Extensions/integration + - [taboo](https://github.com/gcmt/taboo.vim) + - [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) + - [quickfixsigns](https://github.com/tomtom/quickfixsigns_vim) + - [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe) + - [po.vim](http://www.vim.org/scripts/script.php?script_id=695) + - [unicode.vim](https://github.com/chrisbra/unicode.vim) + - wordcount + - crypt indicator + - byte order mark indicator + - Tabline's tab mode can display splits simultaneously + +## [0.7] - 2014-12-10 +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.6] - 2013-10-08 + +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.5] - 2013-09-13 + +- New features + - smart tabline extension which displays all buffers when only one tab is visible + - automatic section truncation when the window resizes + - support for a declarative style of configuration, allowing parts to contain metadata such as minimum window width or conditional visibility + - themes: zenburn, serene +- Other + - a sizable chunk of vim-airline is now running through a unit testing suite, automated via Travis CI + +## [0.4] - 2013-08-26 + + - New features + - integration with csv.vim and vim-virtualenv + - hunks extension for vim-gitgutter and vim-signify + - automatic theme switching with matching colorschemes + - commands: AirlineToggle + - themes: base16 (all variants) + - Improvements + - integration with undotree, tagbar, and unite + - Other + - refactored core and exposed statusline builder and pipeline + - all extension related g:airline_variables have been deprecated in favor of g:airline#extensions# variables + - extensions found in the runtimepath outside of the default distribution will be automatically loaded + +## [0.3] - 2013-08-12 + +- New features + - first-class integration with tagbar + - white space detection for trailing spaces and mixed indentation + - introduced warning section for syntastic and white space detection + - improved ctrlp integration: colors are automatically selected based on the current airline theme + - new themes: molokai, bubblegum, jellybeans, tomorrow +- Bug fixes + - improved handling of eventignore used by other plugins +- Other + - code cleaned up for clearer separation between core functionality and extensions + - introduced color extraction from highlight groups, allowing themes to be generated off of the active colorscheme (e.g. jellybeans and tomorrow) + - License changed to MIT + +## [0.2] - 2013-07-28 + +- New features + - iminsert detection + - integration with vimshell, vimfiler, commandt, lawrencium + - enhanced bufferline theming + - support for ctrlp theming + - support for custom window excludes +- New themes + - luna and wombat +- Bug fixes + - refresh branch name after switching with a shell command + +## [0.1] - 2013-07-17 + +- Initial release + - integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp + - support for themes: 8 included + +[0.12]: https://github.com/vim-airline/vim-airline/compare/v0.11...HEAD +[0.11]: https://github.com/vim-airline/vim-airline/compare/v0.10...v0.11 +[0.10]: https://github.com/vim-airline/vim-airline/compare/v0.9...v0.10 +[0.9]: https://github.com/vim-airline/vim-airline/compare/v0.8...v0.9 +[0.8]: https://github.com/vim-airline/vim-airline/compare/v0.7...v0.8 +[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7 +[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6 +[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5 +[0.4]: https://github.com/vim-airline/vim-airline/compare/v0.3...v0.4 +[0.3]: https://github.com/vim-airline/vim-airline/compare/v0.2...v0.3 +[0.2]: https://github.com/vim-airline/vim-airline/compare/v0.1...v0.2 +[0.1]: https://github.com/vim-airline/vim-airline/releases/tag/v0.1 diff --git a/dot_vim/plugged/vim-airline/CONTRIBUTING.md b/dot_vim/plugged/vim-airline/CONTRIBUTING.md new file mode 100644 index 0000000..b5df7e2 --- /dev/null +++ b/dot_vim/plugged/vim-airline/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributions + +Contributions and pull requests are welcome. Please take note of the following guidelines: + +* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords. +* Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend. +* Any changes to the core should be tested against Vim 7.4. + +# Testing + +Contributors should install [thinca/vim-themis](https://github.com/thinca/vim-themis) to run tests before sending a PR if they applied some modification to the code. PRs which do not pass tests won't be accepted. + +## 1. Installation + +``` +$ cd /path/to/vim-airline +$ git submodule add https://github.com/thinca/vim-themis ./.themis-bin +``` + +## 2. Running tests + +``` +$ ./path/to/themis-bin/bin/themis path/to/vim-airline/test --reporter spec +``` + +# Bugs + +Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following: + +* the `:version` of vim +* the commit of vim-airline you're using +* the OS that you're using, including terminal emulator, GUI vs non-GUI + +# Themes + +* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14]. +* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used. + +# Maintenance + +If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43]. + + +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer diff --git a/dot_vim/plugged/vim-airline/LICENSE b/dot_vim/plugged/vim-airline/LICENSE new file mode 100644 index 0000000..25c5db7 --- /dev/null +++ b/dot_vim/plugged/vim-airline/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2021 Bailey Ling, Christian Brabandt, et al. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dot_vim/plugged/vim-airline/README.md b/dot_vim/plugged/vim-airline/README.md new file mode 100644 index 0000000..89dc995 --- /dev/null +++ b/dot_vim/plugged/vim-airline/README.md @@ -0,0 +1,372 @@ +# vim-airline + +[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/cb%40256bit.org) +[![reviewdog](https://github.com/vim-airline/vim-airline/workflows/reviewdog/badge.svg?branch=master&event=push)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3Areviewdog+event%3Apush+branch%3Amaster) +[![CI](https://github.com/vim-airline/vim-airline/workflows/CI/badge.svg)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3ACI) + +Lean & mean status/tabline for vim that's light as air. + +![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) + +When the plugin is correctly loaded, there will be a nice statusline at the +bottom of each vim window. + +That line consists of several sections, each one displaying some piece of +information. By default (without configuration) this line will look like this: + +``` ++-----------------------------------------------------------------------------+ +|~ | +|~ | +|~ VIM - Vi IMproved | +|~ | +|~ version 8.2 | +|~ by Bram Moolenaar et al. | +|~ Vim is open source and freely distributable | +|~ | +|~ type :h :q to exit | +|~ type :help or for on-line help | +|~ type :help version8 for version info | +|~ | +|~ | ++-----------------------------------------------------------------------------+ +| A | B | C X | Y | Z | [...] | ++-----------------------------------------------------------------------------+ +``` + +The statusline is the colored line at the bottom, which contains the sections +(possibly in different colors): + +section|meaning (example) +-------|------------------ + A | displays the mode + additional flags like crypt/spell/paste (INSERT) + B | Environment status (VCS information - branch, hunk summary (master), [battery][61] level) + C | filename + read-only flag (~/.vim/vimrc RO) + X | filetype (vim) + Y | file encoding[fileformat] (utf-8[unix]) + Z | current position in the file + [...] | additional sections (warning/errors/statistics) from external plugins (e.g. YCM, syntastic, ...) + +The information in Section Z looks like this: + +`10% ☰ 10/100 ln : 20` + +This means: +``` +10% - 10 percent down the top of the file +☰ 10 - current line 10 +/100 ln - of 100 lines +: 20 - current column 20 +``` + +For a better look, those sections can be colored differently, depending on various conditions +(e.g. the mode or whether the current file is 'modified') + +# Features + +* Tiny core written with extensibility in mind ([open/closed principle][8]). +* Integrates with a variety of plugins, including: [vim-bufferline][6], + [fugitive][4], [flog][62], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], + [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], + [vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34], + [lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37], + [ctrlspace][38], [vim-bufmru][47], [vimagit][50], [denite][51], + [vim.battery][61] and more. +* Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. +* Optimized for speed - loads in under a millisecond. +* Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others. + Note these are now external to this plugin. More details can be found in the [themes repository][46]. +* Supports 7.2 as the minimum Vim version. +* The master branch tries to be as stable as possible, and new features are merged in only after they have gone through a [full regression test][33]. +* Unit testing suite. + +## Straightforward customization + +If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift. + +![image](https://f.cloud.github.com/assets/306502/1009429/d69306da-0b38-11e3-94bf-7c6e3eef41e9.png) + +## Themes + +Themes have moved to +another repository as of [this commit][45]. + +Install the themes as you would this plugin (Vundle example): + +```vim +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +``` + +See [vim-airline-themes][46] for more. + +## Automatic truncation + +Sections and parts within sections can be configured to automatically hide when the window size shrinks. + +![image](https://f.cloud.github.com/assets/306502/1060831/05c08aac-11bc-11e3-8470-a506a3037f45.png) + +## Smarter tab line + +Automatically displays all buffers when there's only one tab open. + +![tabline](https://f.cloud.github.com/assets/306502/1072623/44c292a0-1495-11e3-9ce6-dcada3f1c536.gif) + +This is disabled by default; add the following to your vimrc to enable the extension: + + let g:airline#extensions#tabline#enabled = 1 + +Separators can be configured independently for the tabline, so here is how you can define "straight" tabs: + + let g:airline#extensions#tabline#left_sep = ' ' + let g:airline#extensions#tabline#left_alt_sep = '|' + +In addition, you can also choose which path formatter airline uses. This affects how file paths are +displayed in each individual tab as well as the current buffer indicator in the upper right. +To do so, set the `formatter` field with: + + let g:airline#extensions#tabline#formatter = 'default' + +Here is a complete list of formatters with screenshots: + +#### `default` +![image](https://user-images.githubusercontent.com/2652762/34422844-1d005efa-ebe6-11e7-8053-c784c0da7ba7.png) + +#### `jsformatter` +![image](https://user-images.githubusercontent.com/2652762/34422843-1cf6a4d2-ebe6-11e7-810a-07e6eb08de24.png) + +#### `unique_tail` +![image](https://user-images.githubusercontent.com/2652762/34422841-1ce5b4ec-ebe6-11e7-86e9-3d45c876068b.png) + +#### `unique_tail_improved` +![image](https://user-images.githubusercontent.com/2652762/34422842-1cee23f2-ebe6-11e7-962d-97e068873077.png) + +## Seamless integration + +vim-airline integrates with a variety of plugins out of the box. These extensions will be lazily loaded if and only if you have the other plugins installed (and of course you can turn them off). + +#### [ctrlp.vim][10] +![image](https://f.cloud.github.com/assets/306502/962258/7345a224-04ec-11e3-8b5a-f11724a47437.png) + +#### [unite.vim][9] +![image](https://f.cloud.github.com/assets/306502/962319/4d7d3a7e-04ed-11e3-9d59-ab29cb310ff8.png) + +#### [denite.nvim][51] +![image](https://cloud.githubusercontent.com/assets/246230/23939717/f65bce6e-099c-11e7-85c3-918dbc839392.png) + +#### [tagbar][19] +![image](https://f.cloud.github.com/assets/306502/962150/7e7bfae6-04ea-11e3-9e28-32af206aed80.png) + +#### [csv.vim][28] +![image](https://f.cloud.github.com/assets/306502/962204/cfc1210a-04eb-11e3-8a93-42e6bcd21efa.png) + +#### [syntastic][5] +![image](https://f.cloud.github.com/assets/306502/962864/9824c484-04f7-11e3-9928-da94f8c7da5a.png) + +#### hunks ([vim-gitgutter][29], [vim-signify][30], [coc-git][59] & [gitsigns.nvim][63]) +![image](https://f.cloud.github.com/assets/306502/995185/73fc7054-09b9-11e3-9d45-618406c6ed98.png) + +#### [vimagit][50] +![vim-airline-vimagit-demo](https://cloud.githubusercontent.com/assets/533068/22107273/2ea85ba0-de4d-11e6-9fa8-331103b88df4.gif) + +#### [flog][62] +![vim-flog-airline-demo](https://user-images.githubusercontent.com/5008897/120819897-4e820280-c554-11eb-963e-6c08a1bbae09.png) + +#### [virtualenv][31] +![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png) + +#### [tmuxline][35] +![image](https://f.cloud.github.com/assets/1532071/1559276/4c28fbac-4fc7-11e3-90ef-7e833d980f98.gif) + +#### [promptline][36] +![airline-promptline-sc](https://f.cloud.github.com/assets/1532071/1871900/7d4b28a0-789d-11e3-90e4-16f37269981b.gif) + +#### [ctrlspace][38] +![papercolor_with_ctrlspace](https://cloud.githubusercontent.com/assets/493242/12912041/7fc3c6ec-cf16-11e5-8775-8492b9c64ebf.png) + +#### [xkb-switch][48]/[xkb-layout][49] +![image](https://cloud.githubusercontent.com/assets/5715281/22061422/347e7842-ddb8-11e6-8bdb-7abbd418653c.gif) + +#### [vimtex][53] +![image](https://cloud.githubusercontent.com/assets/1798172/25799740/e77d5c2e-33ee-11e7-8660-d34ce4c5f13f.png) + +#### [localsearch][54] +![image](https://raw.githubusercontent.com/mox-mox/vim-localsearch/master/vim-airline-localsearch-indicator.png) + +#### [LanguageClient][57] +![image](https://user-images.githubusercontent.com/9622/45275524-52f45c00-b48b-11e8-8b83-a66240b10747.gif) + +#### [Vim-CMake][60] +![image](https://user-images.githubusercontent.com/24732205/87788512-c876a380-c83d-11ea-9ee3-5f639f986a8f.png) + +#### [vim.battery][61] +![image](https://user-images.githubusercontent.com/1969470/94561399-368b0e00-0264-11eb-94a0-f6b67c73d422.png) + +## Extras + +vim-airline also supplies some supplementary stand-alone extensions. In addition to the tabline extension mentioned earlier, there is also: + +#### whitespace +![image](https://f.cloud.github.com/assets/306502/962401/2a75385e-04ef-11e3-935c-e3b9f0e954cc.png) + +### statusline on top +The statusline can alternatively be drawn on top, making room for other plugins to use the statusline: +The example shows a custom statusline setting, that imitates Vims default statusline, while allowing +to call custom functions. Use `:let g:airline_statusline_ontop=1` to enable it. + +![image](https://i.imgur.com/tW1lMRU.png) + +## Configurable and extensible + +#### Fine-tuned configuration + +Every section is composed of parts, and you can reorder and reconfigure them at will. + +![image](https://f.cloud.github.com/assets/306502/1073278/f291dd4c-14a3-11e3-8a83-268e2753f97d.png) + +Sections can contain accents, which allows for very granular control of visuals (see configuration [here](https://github.com/vim-airline/vim-airline/issues/299#issuecomment-25772886)). + +![image](https://f.cloud.github.com/assets/306502/1195815/4bfa38d0-249d-11e3-823e-773cfc2ca894.png) + +#### Extensible pipeline + +Completely transform the statusline to your liking. Build out the statusline as you see fit by extracting colors from the current colorscheme's highlight groups. + +![allyourbase](https://f.cloud.github.com/assets/306502/1022714/e150034a-0da7-11e3-94a5-ca9d58a297e8.png) + +# Rationale + +There's already [powerline][2], why yet another statusline? + +* 100% vimscript; no python needed. + +What about [vim-powerline][1]? + +* vim-powerline has been deprecated in favor of the newer, unifying powerline, which is under active development; the new version is written in python at the core and exposes various bindings such that it can style statuslines not only in vim, but also tmux, bash, zsh, and others. + +# Where did the name come from? + +I wrote the initial version on an airplane, and since it's light as air it turned out to be a good name. Thanks for flying vim! + +# Installation + +This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: + +| Plugin Manager | Install with... | +| ------------- | ------------- | +| [Pathogen][11] | `git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline`
Remember to run `:Helptags` to generate help tags | +| [NeoBundle][12] | `NeoBundle 'vim-airline/vim-airline'` | +| [Vundle][13] | `Plugin 'vim-airline/vim-airline'` | +| [Plug][40] | `Plug 'vim-airline/vim-airline'` | +| [VAM][22] | `call vam#ActivateAddons([ 'vim-airline' ])` | +| [Dein][52] | `call dein#add('vim-airline/vim-airline')` | +| [minpac][55] | `call minpac#add('vim-airline/vim-airline')` | +| pack feature (native Vim 8 package feature)| `git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/dist/start/vim-airline`
Remember to run `:helptags ~/.vim/pack/dist/start/vim-airline/doc` to generate help tags | +| manual | copy all of the files into your `~/.vim` directory | + +# Documentation + +`:help airline` + +# Integrating with powerline fonts + +For the nice looking powerline symbols to appear, you will need to install a patched font. Instructions can be found in the official powerline [documentation][20]. Prepatched fonts can be found in the [powerline-fonts][3] repository. + +Finally, you can add the convenience variable `let g:airline_powerline_fonts = 1` to your vimrc which will automatically populate the `g:airline_symbols` dictionary with the powerline symbols. + +# FAQ + +Solutions to common problems can be found in the [Wiki][27]. + +# Performance + +Whoa! Everything got slow all of a sudden... + +vim-airline strives to make it easy to use out of the box, which means that by default it will look for all compatible plugins that you have installed and enable the relevant extension. + +Many optimizations have been made such that the majority of users will not see any performance degradation, but it can still happen. For example, users who routinely open very large files may want to disable the `tagbar` extension, as it can be very expensive to scan for the name of the current function. + +The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. + +If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions (e.g. `:let g:airline_extensions = []`). + +Also, you can enable caching of the various syntax highlighting groups. This will try to prevent some of the more expensive `:hi` calls in Vim, which seem to be expensive in the Vim core at the expense of possibly not being one hundred percent correct all the time (especially if you often change highlighting groups yourself using `:hi` commands). To set this up do `:let g:airline_highlighting_cache = 1`. A `:AirlineRefresh` will however clear the cache. + +In addition you might want to check out the [dark_minimal theme][56], which does not change highlighting groups once they are defined. Also please check the [FAQ][27] for more information on how to diagnose and fix the problem. + +# Screenshots + +A full list of screenshots for various themes can be found in the [Wiki][14]. + +# Maintainers + +The project is currently being maintained by [Christian Brabandt][42] and [Bailey Ling][41]. + +If you are interested in becoming a maintainer (we always welcome more maintainers), please [go here][43]. + +# License + +[MIT License][58]. Copyright (c) 2013-2021 Bailey Ling & Contributors. + +[1]: https://github.com/Lokaltog/vim-powerline +[2]: https://github.com/powerline/powerline +[3]: https://github.com/Lokaltog/powerline-fonts +[4]: https://github.com/tpope/vim-fugitive +[5]: https://github.com/scrooloose/syntastic +[6]: https://github.com/bling/vim-bufferline +[7]: https://github.com/bling/minivimrc +[8]: http://en.wikipedia.org/wiki/Open/closed_principle +[9]: https://github.com/Shougo/unite.vim +[10]: https://github.com/ctrlpvim/ctrlp.vim +[11]: https://github.com/tpope/vim-pathogen +[12]: https://github.com/Shougo/neobundle.vim +[13]: https://github.com/VundleVim/Vundle.vim +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[15]: https://github.com/techlivezheng/vim-plugin-minibufexpl +[16]: https://github.com/sjl/gundo.vim +[17]: https://github.com/mbbill/undotree +[18]: https://github.com/preservim/nerdtree +[19]: https://github.com/majutsushi/tagbar +[20]: https://powerline.readthedocs.org/en/master/installation.html#patched-fonts +[21]: https://github.com/ludovicchabant/vim-lawrencium +[22]: https://github.com/MarcWeber/vim-addon-manager +[23]: https://github.com/altercation/solarized +[24]: https://github.com/chriskempson/tomorrow-theme +[25]: https://github.com/tomasr/molokai +[26]: https://github.com/nanotech/jellybeans.vim +[27]: https://github.com/vim-airline/vim-airline/wiki/FAQ +[28]: https://github.com/chrisbra/csv.vim +[29]: https://github.com/airblade/vim-gitgutter +[30]: https://github.com/mhinz/vim-signify +[31]: https://github.com/jmcantrell/vim-virtualenv +[32]: https://github.com/chriskempson/base16-vim +[33]: https://github.com/vim-airline/vim-airline/wiki/Test-Plan +[34]: http://eclim.org +[35]: https://github.com/edkolev/tmuxline.vim +[36]: https://github.com/edkolev/promptline.vim +[37]: https://github.com/gcmt/taboo.vim +[38]: https://github.com/vim-ctrlspace/vim-ctrlspace +[39]: https://github.com/tomtom/quickfixsigns_vim +[40]: https://github.com/junegunn/vim-plug +[41]: https://github.com/bling +[42]: https://github.com/chrisbra +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer +[45]: https://github.com/vim-airline/vim-airline/commit/d7fd8ca649e441b3865551a325b10504cdf0711b +[46]: https://github.com/vim-airline/vim-airline-themes#vim-airline-themes-- +[47]: https://github.com/mildred/vim-bufmru +[48]: https://github.com/ierton/xkb-switch +[49]: https://github.com/vovkasm/input-source-switcher +[50]: https://github.com/jreybert/vimagit +[51]: https://github.com/Shougo/denite.nvim +[52]: https://github.com/Shougo/dein.vim +[53]: https://github.com/lervag/vimtex +[54]: https://github.com/mox-mox/vim-localsearch +[55]: https://github.com/k-takata/minpac/ +[56]: https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/dark_minimal.vim +[57]: https://github.com/autozimu/LanguageClient-neovim +[58]: https://github.com/vim-airline/vim-airline/blob/master/LICENSE +[59]: https://github.com/neoclide/coc-git +[60]: https://github.com/cdelledonne/vim-cmake +[61]: http://github.com/lambdalisue/battery.vim/ +[62]: http://github.com/rbong/vim-flog/ +[63]: https://github.com/lewis6991/gitsigns.nvim diff --git a/dot_vim/plugged/vim-airline/autoload/airline.vim b/dot_vim/plugged/vim-airline/autoload/airline.vim new file mode 100644 index 0000000..a544d37 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline.vim @@ -0,0 +1,313 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', []) +let g:airline_inactive_funcrefs = get(g:, 'airline_inactive_statusline_funcrefs', []) + +let s:sections = ['a','b','c','gutter','x','y','z', 'error', 'warning'] +let s:contexts = {} +let s:core_funcrefs = [ + \ function('airline#extensions#apply'), + \ function('airline#extensions#default#apply') ] + + +function! airline#add_statusline_func(name, ...) + let warn = get(a:, 1, 1) + call airline#add_statusline_funcref(function(a:name), warn) +endfunction + +function! airline#add_inactive_statusline_func(name, ...) + let warn = get(a:, 1, 1) + call airline#add_inactive_statusline_funcref(function(a:name), warn) +endfunction + + +function! airline#add_statusline_funcref(function, ...) + if index(g:airline_statusline_funcrefs, a:function) >= 0 + let warn = get(a:, 1, 1) + if warn > 0 + call airline#util#warning(printf('The airline statusline funcref "%s" has already been added.', string(a:function))) + endif + return + endif + call add(g:airline_statusline_funcrefs, a:function) +endfunction + +function! airline#remove_statusline_func(name) + let i = index(g:airline_statusline_funcrefs, function(a:name)) + if i > -1 + call remove(g:airline_statusline_funcrefs, i) + endif +endfunction + +function! airline#add_inactive_statusline_funcref(function, ...) + if index(g:airline_inactive_funcrefs, a:function) >= 0 + let warn = get(a:, 1, 1) + if warn > 0 + call airline#util#warning(printf('The airline inactive statusline funcref "%s" has already been added.', string(a:function))) + endif + return + endif + call add(g:airline_inactive_funcrefs, a:function) +endfunction + +function! airline#load_theme() + let g:airline_theme = get(g:, 'airline_theme', 'dark') + if exists('*airline#themes#{g:airline_theme}#refresh') + call airline#themes#{g:airline_theme}#refresh() + endif + + let palette = g:airline#themes#{g:airline_theme}#palette + call airline#themes#patch(palette) + + if exists('g:airline_theme_patch_func') + let Fn = function(g:airline_theme_patch_func) + call Fn(palette) + endif + + call airline#highlighter#load_theme() + call airline#extensions#load_theme() + call airline#update_statusline() + + call airline#util#doautocmd('AirlineAfterTheme') +endfunction + +" Load an airline theme +function! airline#switch_theme(name, ...) + let silent = get(a:000, '0', 0) + " get all available themes + let themes = airline#util#themes('') + let err = 0 + try + if index(themes, a:name) == -1 + " Theme not available + if !silent + call airline#util#warning(printf('The specified theme "%s" cannot be found.', a:name)) + endif + throw "not-found" + let err = 1 + else + exe "ru autoload/airline/themes/". a:name. ".vim" + let g:airline_theme = a:name + endif + catch /^Vim/ + " catch only Vim errors, not "not-found" + call airline#util#warning(printf('There is an error in theme "%s".', a:name)) + if &vbs + call airline#util#warning(v:exception) + endif + let err = 1 + endtry + + if err + if exists('g:airline_theme') + return + else + let g:airline_theme = 'dark' + endif + endif + + unlet! w:airline_lastmode + call airline#load_theme() + + " this is required to prevent clobbering the startup info message, i don't know why... + call airline#check_mode(winnr()) +endfunction + +" Try to load the right theme for the current colorscheme +function! airline#switch_matching_theme() + if exists('g:colors_name') + let existing = g:airline_theme + let theme = tr(tolower(g:colors_name), '-', '_') + try + call airline#switch_theme(theme, 1) + return 1 + catch + for map in items(g:airline_theme_map) + if match(g:colors_name, map[0]) > -1 + try + call airline#switch_theme(map[1], 1) + catch + call airline#switch_theme(existing) + endtry + return 1 + endif + endfor + endtry + endif + return 0 +endfunction + +" Update the statusline +function! airline#update_statusline() + if airline#util#stl_disabled(winnr()) || airline#util#is_popup_window(winnr()) + return + endif + " TODO: need to ignore popup windows here as well? + let range = filter(range(1, winnr('$')), 'v:val != winnr()') + " create inactive statusline + call airline#update_statusline_inactive(range) + + unlet! w:airline_render_left w:airline_render_right + exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') + + " Now create the active statusline + let w:airline_active = 1 + let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } + try + call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) + catch /^Vim\%((\a\+)\)\=:E48:/ + " Catch: Sandbox mode + " no-op + endtry +endfunction + +" Function to be called to make all statuslines inactive +" Triggered on FocusLost autocommand +function! airline#update_statusline_focuslost() + if get(g:, 'airline_focuslost_inactive', 0) + let bufnr=bufnr('%') + call airline#highlighter#highlight_modified_inactive(bufnr) + call airline#highlighter#highlight(['inactive'], bufnr) + call airline#update_statusline_inactive(range(1, winnr('$'))) + endif +endfunction + +" Function to draw inactive statuslines for inactive windows +function! airline#update_statusline_inactive(range) + if airline#util#stl_disabled(winnr()) + return + endif + for nr in a:range + if airline#util#stl_disabled(nr) + continue + endif + call setwinvar(nr, 'airline_active', 0) + let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } + if get(g:, 'airline_inactive_alt_sep', 0) + call extend(context, { + \ 'left_sep': g:airline_left_alt_sep, + \ 'right_sep': g:airline_right_alt_sep }, 'keep') + endif + try + call s:invoke_funcrefs(context, g:airline_inactive_funcrefs) + catch /^Vim\%((\a\+)\)\=:E48:/ + " Catch: Sandbox mode + " no-op + endtry + endfor +endfunction + +" Gather output from all funcrefs which will later be returned by the +" airline#statusline() function +function! s:invoke_funcrefs(context, funcrefs) + let builder = airline#builder#new(a:context) + let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) + if err == 1 + let a:context.line = builder.build() + let s:contexts[a:context.winnr] = a:context + let option = get(g:, 'airline_statusline_ontop', 0) ? '&tabline' : '&statusline' + call setwinvar(a:context.winnr, option, '%!airline#statusline('.a:context.winnr.')') + endif +endfunction + +" Main statusline function per window +" will be set to the statusline option +function! airline#statusline(winnr) + if has_key(s:contexts, a:winnr) + return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line + endif + " in rare circumstances this happens...see #276 + return '' +endfunction + +" Check if mode has changed +function! airline#check_mode(winnr) + if !has_key(s:contexts, a:winnr) + return '' + endif + let context = s:contexts[a:winnr] + + if get(w:, 'airline_active', 1) + let m = mode(1) + " Refer :help mode() to see the list of modes + " NB: 'let mode' here refers to the display colour _groups_, + " not the literal mode's code (i.e., m). E.g., Select modes + " v, S and ^V use 'visual' since they are of similar ilk. + " Some modes do not get recognised for status line purposes: + " no, nov, noV, no^V, !, cv, and ce. + " Mode name displayed is handled in init.vim (g:airline_mode_map). + " + if m[0] ==# "i" + let mode = ['insert'] " Insert modes + submodes (i, ic, ix) + elseif m[0] == "R" + let mode = ['replace'] " Replace modes + submodes (R, Rc, Rv, Rx) (NB: case sensitive as 'r' is a mode) + elseif m[0] =~ '\v(v|V||s|S|)' + let mode = ['visual'] " Visual and Select modes (v, V, ^V, s, S, ^S)) + elseif m ==# "t" + let mode = ['terminal'] " Terminal mode (only has one mode (t)) + elseif m[0] =~ '\v(c|r|!)' + let mode = ['commandline'] " c, cv, ce, r, rm, r? (NB: cv and ce stay showing as mode entered from) + else + let mode = ['normal'] " Normal mode + submodes (n, niI, niR, niV; plus operator pendings no, nov, noV, no^V) + endif + if exists("*VMInfos") && !empty(VMInfos()) + " Vim plugin Multiple Cursors https://github.com/mg979/vim-visual-multi + let m = 'multi' + endif + " Adjust to handle additional modes, which don't display correctly otherwise + if index(['niI', 'niR', 'niV', 'ic', 'ix', 'Rc', 'Rv', 'Rx', 'multi'], m) == -1 + let m = m[0] + endif + let w:airline_current_mode = get(g:airline_mode_map, m, m) + else + let mode = ['inactive'] + let w:airline_current_mode = get(g:airline_mode_map, '__') + endif + + if g:airline_detect_modified && &modified + call add(mode, 'modified') + endif + + if g:airline_detect_paste && &paste + call add(mode, 'paste') + endif + + if g:airline_detect_crypt && exists("+key") && !empty(&key) + call add(mode, 'crypt') + endif + + if g:airline_detect_spell && &spell + call add(mode, 'spell') + endif + + if &readonly || ! &modifiable + call add(mode, 'readonly') + endif + + let mode_string = join(mode) + if get(w:, 'airline_lastmode', '') != mode_string + call airline#highlighter#highlight_modified_inactive(context.bufnr) + call airline#highlighter#highlight(mode, string(context.bufnr)) + call airline#util#doautocmd('AirlineModeChanged') + let w:airline_lastmode = mode_string + endif + + return '' +endfunction + +function! airline#update_tabline() + if get(g:, 'airline_statusline_ontop', 0) + call airline#extensions#tabline#redraw() + endif +endfunction + +function! airline#mode_changed() + " airline#visual_active + " Boolean: for when to get visual wordcount + " needed for the wordcount extension + let g:airline#visual_active = (mode() =~? '[vs]') + call airline#update_tabline() +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/async.vim b/dot_vim/plugged/vim-airline/autoload/airline/async.vim new file mode 100644 index 0000000..459a725 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/async.vim @@ -0,0 +1,382 @@ +" MIT License. Copyright (c) 2013-2021 Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:untracked_jobs = {} +let s:mq_jobs = {} +let s:po_jobs = {} +let s:clean_jobs = {} + +" Generic functions handling on exit event of the various async functions +function! s:untracked_output(dict, buf) + if a:buf =~? ('^'. a:dict.cfg['untracked_mark']) + let a:dict.cfg.untracked[a:dict.file] = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) + else + let a:dict.cfg.untracked[a:dict.file] = '' + endif +endfunction + +" also called from branch extension (for non-async vims) +function! airline#async#mq_output(buf, file) + let buf=a:buf + if !empty(a:buf) + if a:buf =~# 'no patches applied' || + \ a:buf =~# "unknown command 'qtop'" || + \ a:buf =~# "abort" + let buf = '' + elseif exists("b:mq") && b:mq isnot# buf + " make sure, statusline is updated + unlet! b:airline_head + endif + let b:mq = buf + endif + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif +endfunction + +function! s:po_output(buf, file) + if !empty(a:buf) + let b:airline_po_stats = printf("%s", a:buf) + else + let b:airline_po_stats = '' + endif + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif +endfunction + +function! s:valid_dir(dir) + if empty(a:dir) || !isdirectory(a:dir) + return getcwd() + endif + return a:dir +endfunction + +function! airline#async#vcs_untracked(config, file, vcs) + if g:airline#init#vim_async + " Vim 8 with async support + noa call airline#async#vim_vcs_untracked(a:config, a:file) + else + " nvim async or vim without job-feature + noa call airline#async#nvim_vcs_untracked(a:config, a:file, a:vcs) + endif +endfunction + +function! s:set_clean_variables(file, vcs, val) + let var=getbufvar(fnameescape(a:file), 'buffer_vcs_config', {}) + if has_key(var, a:vcs) && has_key(var[a:vcs], 'dirty') && + \ type(getbufvar(fnameescape(a:file), 'buffer_vcs_config')) == type({}) + let var[a:vcs].dirty=a:val + try + call setbufvar(fnameescape(a:file), 'buffer_vcs_config', var) + unlet! b:airline_head + catch + endtry + endif +endfunction + +function! s:set_clean_jobs_variable(vcs, file, id) + if !has_key(s:clean_jobs, a:vcs) + let s:clean_jobs[a:vcs] = {} + endif + let s:clean_jobs[a:vcs][a:file]=a:id +endfunction + +function! s:on_exit_clean(...) dict abort + let buf=self.buf + call s:set_clean_variables(self.file, self.vcs, !empty(buf)) + if has_key(get(s:clean_jobs, self.vcs, {}), self.file) + call remove(s:clean_jobs[self.vcs], self.file) + endif +endfunction + +function! airline#async#vcs_clean(cmd, file, vcs) + if g:airline#init#vim_async + " Vim 8 with async support + noa call airline#async#vim_vcs_clean(a:cmd, a:file, a:vcs) + elseif has("nvim") + " nvim async + noa call airline#async#nvim_vcs_clean(a:cmd, a:file, a:vcs) + else + " Vim pre 8 using system() + call airline#async#vim7_vcs_clean(a:cmd, a:file, a:vcs) + endif +endfunction + +if v:version >= 800 && has("job") + " Vim 8.0 with Job feature + " TODO: Check if we need the cwd option for the job_start() functions + " (only works starting with Vim 8.0.0902) + + function! s:on_stdout(channel, msg) dict abort + let self.buf .= a:msg + endfunction + + function! s:on_exit_mq(channel) dict abort + call airline#async#mq_output(self.buf, self.file) + endfunction + + function! s:on_exit_untracked(channel) dict abort + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endfunction + + function! s:on_exit_po(channel) dict abort + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endfunction + + function! airline#async#get_mq_async(cmd, file) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + let options = {'cmd': a:cmd, 'buf': '', 'file': a:file} + if has_key(s:mq_jobs, a:file) + if job_status(get(s:mq_jobs, a:file)) == 'run' + return + elseif has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_mq', options)}) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#get_msgfmt_stat(cmd, file) + if !executable('msgfmt') + " no msgfmt + return + endif + if g:airline#init#is_windows + let cmd = 'cmd /C ' . a:cmd. shellescape(a:file) + else + let cmd = ['sh', '-c', a:cmd. shellescape(a:file)] + endif + + let options = {'buf': '', 'file': a:file} + if has_key(s:po_jobs, a:file) + if job_status(get(s:po_jobs, a:file)) == 'run' + return + elseif has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_po', options)}) + let s:po_jobs[a:file] = id + endfunction + + function! airline#async#vim_vcs_clean(cmd, file, vcs) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + let options = {'buf': '', 'vcs': a:vcs, 'file': a:file} + let jobs = get(s:clean_jobs, a:vcs, {}) + if has_key(jobs, a:file) + if job_status(get(jobs, a:file)) == 'run' + return + elseif has_key(jobs, a:file) + " still running + return + " jobs dict should be cleaned on exit, so not needed here + " call remove(jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'null', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_clean', options)}) + call s:set_clean_jobs_variable(a:vcs, a:file, id) + endfunction + + function! airline#async#vim_vcs_untracked(config, file) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:config['cmd'] . shellescape(a:file) + else + let cmd = [&shell, &shellcmdflag, a:config['cmd'] . shellescape(a:file)] + endif + + let options = {'cfg': a:config, 'buf': '', 'file': a:file} + if has_key(s:untracked_jobs, a:file) + if job_status(get(s:untracked_jobs, a:file)) == 'run' + return + elseif has_key(s:untracked_jobs, a:file) + call remove(s:untracked_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_untracked', options)}) + let s:untracked_jobs[a:file] = id + endfunction + +elseif has("nvim") + " NVim specific functions + + function! s:nvim_output_handler(job_id, data, event) dict + if a:event == 'stdout' || a:event == 'stderr' + let self.buf .= join(a:data) + endif + endfunction + + function! s:nvim_untracked_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endif + endfunction + + function! s:nvim_mq_job_handler(job_id, data, event) dict + if a:event == 'exit' + call airline#async#mq_output(self.buf, self.file) + endif + endfunction + + function! s:nvim_po_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endif + endfunction + + function! airline#async#nvim_get_mq_async(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_mq_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#nvim_get_msgfmt_stat(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_po_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + " no msgfmt on windows? + return + else + let cmd = [&shell, &shellcmdflag, a:cmd. shellescape(a:file)] + endif + + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:po_jobs[a:file] = id + endfunction + + function! airline#async#nvim_vcs_clean(cmd, file, vcs) + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:on_exit_clean')} + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + if !has_key(s:clean_jobs, a:vcs) + let s:clean_jobs[a:vcs] = {} + endif + if has_key(s:clean_jobs[a:vcs], a:file) + " still running + return + " jobs dict should be cleaned on exit, so not needed here + " call remove(s:clean_jobs[a:vcs], a:file) + endif + let id = jobstart(cmd, config) + call s:set_clean_jobs_variable(a:vcs, a:file, id) + endfunction + +endif + +" Should work in either Vim pre 8 or Nvim +function! airline#async#nvim_vcs_untracked(cfg, file, vcs) + let cmd = a:cfg.cmd . shellescape(a:file) + let id = -1 + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'cfg': a:cfg, + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')) + \ } + if has("nvim") + call extend(config, { + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_untracked_job_handler')}) + if has_key(s:untracked_jobs, config.file) + " still running + return + endif + try + let id = jobstart(cmd, config) + catch + " catch-all, jobstart() failed, fall back to system() + let id=-1 + endtry + let s:untracked_jobs[a:file] = id + endif + " vim without job feature or nvim jobstart failed + if id < 1 + let output=system(cmd) + call s:untracked_output(config, output) + call airline#extensions#branch#update_untracked_config(a:file, a:vcs) + endif +endfunction + +function! airline#async#vim7_vcs_clean(cmd, file, vcs) + " Vim pre 8, fallback using system() + " don't want to to see error messages + if g:airline#init#is_windows && &shell =~ 'cmd' + let cmd = a:cmd .' 2>nul' + elseif g:airline#init#is_windows && &shell =~ 'powerline' + let cmd = a:cmd .' 2> $null' + else + let cmd = a:cmd .' 2>/dev/null' + endif + let output=system(cmd) + call s:set_clean_variables(a:file, a:vcs, !empty(output)) +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/builder.vim b/dot_vim/plugged/vim-airline/autoload/airline/builder.vim new file mode 100644 index 0000000..ad2d838 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/builder.vim @@ -0,0 +1,246 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +function! s:prototype.split(...) dict + call add(self._sections, ['|', a:0 ? a:1 : '%=']) +endfunction + +function! s:prototype.add_section_spaced(group, contents) dict + let spc = empty(a:contents) ? '' : g:airline_symbols.space + call self.add_section(a:group, spc.a:contents.spc) +endfunction + +function! s:prototype.add_section(group, contents) dict + call add(self._sections, [a:group, a:contents]) +endfunction + +function! s:prototype.add_raw(text) dict + call add(self._sections, ['', a:text]) +endfunction + +function! s:prototype.insert_section(group, contents, position) dict + call insert(self._sections, [a:group, a:contents], a:position) +endfunction + +function! s:prototype.insert_raw(text, position) dict + call insert(self._sections, ['', a:text], a:position) +endfunction + +function! s:prototype.get_position() dict + return len(self._sections) +endfunction + +function! airline#builder#get_prev_group(sections, i) + let x = a:i - 1 + while x >= 0 + let group = a:sections[x][0] + if group != '' && group != '|' + return group + endif + let x = x - 1 + endwhile + return '' +endfunction + +function! airline#builder#get_next_group(sections, i) + let x = a:i + 1 + let l = len(a:sections) + while x < l + let group = a:sections[x][0] + if group != '' && group != '|' + return group + endif + let x = x + 1 + endwhile + return '' +endfunction + +function! s:prototype.build() dict + let side = 1 + let line = '' + let i = 0 + let length = len(self._sections) + let split = 0 + let is_empty = 0 + let prev_group = '' + + while i < length + let section = self._sections[i] + let group = section[0] + let contents = section[1] + let pgroup = prev_group + let prev_group = airline#builder#get_prev_group(self._sections, i) + if group ==# 'airline_c' && &buftype ==# 'terminal' && self._context.active + let group = 'airline_term' + elseif group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let group = 'airline_c'. self._context.bufnr + elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let prev_group = 'airline_c'. self._context.bufnr + endif + if is_empty + let prev_group = pgroup + endif + let is_empty = s:section_is_empty(self, contents) + + if is_empty + " need to fix highlighting groups, since we + " have skipped a section, we actually need + " the previous previous group and so the + " separator goes from the previous previous group + " to the current group + let pgroup = group + endif + + if group == '' + let line .= contents + elseif group == '|' + let side = 0 + let line .= contents + let split = 1 + else + if prev_group == '' + let line .= '%#'.group.'#' + elseif split + if !is_empty + let line .= s:get_transitioned_separator(self, prev_group, group, side) + endif + let split = 0 + else + if !is_empty + let line .= s:get_separator(self, prev_group, group, side) + endif + endif + let line .= is_empty ? '' : s:get_accented_line(self, group, contents) + endif + + let i = i + 1 + endwhile + + if !self._context.active + "let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') + let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') + endif + return line +endfunction + +function! airline#builder#should_change_group(group1, group2) + if a:group1 == a:group2 + return 0 + endif + let color1 = airline#highlighter#get_highlight(a:group1) + let color2 = airline#highlighter#get_highlight(a:group2) + return color1[1] != color2[1] || color1[0] != color2[0] + \ || color1[2] != color2[2] || color1[3] != color2[3] +endfunction + +function! s:get_transitioned_separator(self, prev_group, group, side) + let line = '' + if get(a:self._context, 'tabline', 0) && get(g:, 'airline#extensions#tabline#alt_sep', 0) && a:group ==# 'airline_tabsel' && a:side + call airline#highlighter#add_separator(a:prev_group, a:group, 0) + let line .= '%#'.a:prev_group.'_to_'.a:group.'#' + let line .= a:self._context.right_sep.'%#'.a:group.'#' + else + call airline#highlighter#add_separator(a:prev_group, a:group, a:side) + let line .= '%#'.a:prev_group.'_to_'.a:group.'#' + let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep + let line .= '%#'.a:group.'#' + endif + return line +endfunction + +function! s:get_separator(self, prev_group, group, side) + if airline#builder#should_change_group(a:prev_group, a:group) + return s:get_transitioned_separator(a:self, a:prev_group, a:group, a:side) + else + return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep + endif +endfunction + +function! s:get_accented_line(self, group, contents) + if a:self._context.active + " active window + let contents = [] + let content_parts = split(a:contents, '__accent') + for cpart in content_parts + let accent = matchstr(cpart, '_\zs[^#]*\ze') + call add(contents, cpart) + endfor + let line = join(contents, a:group) + let line = substitute(line, '__restore__', a:group, 'g') + else + " inactive window + let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') + let line = substitute(line, '%#__restore__#', '', 'g') + endif + return line +endfunction + +function! s:section_is_empty(self, content) + let start=1 + + " do not check for inactive windows or the tabline + if a:self._context.active == 0 + return 0 + elseif get(a:self._context, 'tabline', 0) + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(g:, 'airline_skip_empty_sections', 0) == 0 + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(w:, 'airline_skip_empty_sections', -1) == 0 + return 0 + endif + + " special case: When the content is %=, that is the + " separation marker, which switches between left- and + " right-aligned content. + " Consider that to be empty, so that the previous previous + " group is correctly remembered in the builder() function + if empty(a:content) || a:content is# '%=' + return 1 + endif + + let stripped = substitute(a:content, + \ '\(%{.*}\|%#__accent_[^#]*#\|%#__restore__#\|%( \| %)\)', '', 'g') + + if !empty(stripped) + return 0 " There is content in the statusline + endif + + let exprlist = [] + call substitute(a:content, '%{\([^}]*\)}', '\=add(exprlist, submatch(1))', 'g') + + for expr in exprlist + try + " catch all exceptions, just in case + if !empty(eval(expr)) + return 0 + endif + catch + return 0 + endtry + endfor + return 1 +endfunction + +function! airline#builder#new(context) + let builder = copy(s:prototype) + let builder._context = a:context + let builder._sections = [] + + call extend(builder._context, { + \ 'left_sep': g:airline_left_sep, + \ 'left_alt_sep': g:airline_left_alt_sep, + \ 'right_sep': g:airline_right_sep, + \ 'right_alt_sep': g:airline_right_alt_sep, + \ }, 'keep') + return builder +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/debug.vim b/dot_vim/plugged/vim-airline/autoload/airline/debug.vim new file mode 100644 index 0000000..f04b296 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/debug.vim @@ -0,0 +1,51 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#debug#profile1() + profile start airline-profile-switch.log + profile func * + profile file * + split + for i in range(1, 1000) + wincmd w + redrawstatus + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile2() + profile start airline-profile-cursor.log + profile func * + profile file * + edit blank + call setline(1, 'all your base are belong to us') + call setline(2, 'all your base are belong to us') + let positions = [[1,2], [2,2], [1,2], [1,1]] + for i in range(1, 1000) + for pos in positions + call cursor(pos[0], pos[1]) + redrawstatus + endfor + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile3() + profile start airline-profile-mode.log + profile func * + profile file * + + for i in range(1000) + startinsert + redrawstatus + stopinsert + redrawstatus + endfor + + profile pause + noautocmd qall! +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions.vim new file mode 100644 index 0000000..99eba2f --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions.vim @@ -0,0 +1,523 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:loaded_ext = [] +let s:ext = {} +let s:ext._theme_funcrefs = [] + +function! s:ext.add_statusline_func(name) dict + call airline#add_statusline_func(a:name) +endfunction +function! s:ext.add_statusline_funcref(function) dict + call airline#add_statusline_funcref(a:function) +endfunction +function! s:ext.add_inactive_statusline_func(name) dict + call airline#add_inactive_statusline_func(a:name) +endfunction +function! s:ext.add_theme_func(name) dict + call add(self._theme_funcrefs, function(a:name)) +endfunction + +let s:script_path = tolower(resolve(expand(':p:h'))) + +let s:filetype_overrides = { + \ 'coc-explorer': [ 'CoC Explorer', '' ], + \ 'defx': ['defx', '%{b:defx.paths[0]}'], + \ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'], + \ 'floggraph': [ 'Flog', '%{get(b:, "flog_status_summary", "")}' ], + \ 'gundo': [ 'Gundo', '' ], + \ 'help': [ 'Help', '%f' ], + \ 'minibufexpl': [ 'MiniBufExplorer', '' ], + \ 'startify': [ 'startify', '' ], + \ 'vim-plug': [ 'Plugins', '' ], + \ 'vimfiler': [ 'vimfiler', '%{vimfiler#get_status_string()}' ], + \ 'vimshell': ['vimshell','%{vimshell#get_status_string()}'], + \ 'vaffle' : [ 'Vaffle', '%{b:vaffle.dir}' ], + \ } + +if get(g:, 'airline#extensions#nerdtree_statusline', 1) + let s:filetype_overrides['nerdtree'] = [ get(g:, 'NERDTreeStatusline', 'NERD'), '' ] +else + let s:filetype_overrides['nerdtree'] = ['NERDTree', ''] +endif + +let s:filetype_regex_overrides = {} + +function! s:check_defined_section(name) + if !exists('w:airline_section_{a:name}') + let w:airline_section_{a:name} = g:airline_section_{a:name} + endif +endfunction + +function! airline#extensions#append_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} .= a:value +endfunction + +function! airline#extensions#prepend_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} = a:value . w:airline_section_{a:name} +endfunction + +function! airline#extensions#apply_left_override(section1, section2) + let w:airline_section_a = a:section1 + let w:airline_section_b = a:section2 + let w:airline_section_c = airline#section#create(['readonly']) + let w:airline_render_left = 1 + let w:airline_render_right = 0 +endfunction + +function! airline#extensions#apply(...) + let filetype_overrides = get(s:, 'filetype_overrides', {}) + call extend(filetype_overrides, get(g:, 'airline_filetype_overrides', {}), 'force') + + if s:is_excluded_window() + return -1 + endif + + if &buftype == 'terminal' + let w:airline_section_x = '' + let w:airline_section_y = '' + endif + + if &previewwindow && empty(get(w:, 'airline_section_a', '')) + let w:airline_section_a = 'Preview' + let w:airline_section_b = '' + let w:airline_section_c = bufname(winbufnr(winnr())) + endif + + if has_key(filetype_overrides, &ft) && + \ ((&filetype == 'help' && &buftype == 'help') || &filetype !~ 'help') + " for help files only override it, if the buftype is also of type 'help', + " else it would trigger when editing Vim help files + let args = filetype_overrides[&ft] + call airline#extensions#apply_left_override(args[0], args[1]) + endif + + if &buftype == 'help' + let w:airline_section_x = '' + let w:airline_section_y = '' + let w:airline_render_right = 1 + endif + + for item in items(s:filetype_regex_overrides) + if match(&ft, item[0]) >= 0 + call airline#extensions#apply_left_override(item[1][0], item[1][1]) + endif + endfor +endfunction + +function! s:is_excluded_window() + for matchft in g:airline_exclude_filetypes + if matchft ==# &ft + return 1 + endif + endfor + + for matchw in g:airline_exclude_filenames + if matchstr(expand('%'), matchw) ==# matchw + return 1 + endif + endfor + + if g:airline_exclude_preview && &previewwindow + return 1 + endif + + return 0 +endfunction + +function! airline#extensions#load_theme() + call airline#util#exec_funcrefs(s:ext._theme_funcrefs, g:airline#themes#{g:airline_theme}#palette) +endfunction + +function! airline#extensions#load() + let s:loaded_ext = [] + + if exists('g:airline_extensions') + for ext in g:airline_extensions + try + call airline#extensions#{ext}#init(s:ext) + catch /^Vim\%((\a\+)\)\=:E117/ " E117, function does not exist + call airline#util#warning("Extension '".ext."' not installed, ignoring!") + continue + endtry + call add(s:loaded_ext, ext) + endfor + return + endif + + call airline#extensions#quickfix#init(s:ext) + call add(s:loaded_ext, 'quickfix') + + if get(g:, 'loaded_unite', 0) && get(g:, 'airline#extensions#unite#enabled', 1) + call airline#extensions#unite#init(s:ext) + call add(s:loaded_ext, 'unite') + endif + + if get(g:, 'loaded_denite', 0) && get(g:, 'airline#extensions#denite#enabled', 1) + call airline#extensions#denite#init(s:ext) + call add(s:loaded_ext, 'denite') + endif + + if get(g:, 'loaded_gina', 0) && get(g:, 'airline#extensions#gina#enabled', 1) + call airline#extensions#gina#init(s:ext) + call add(s:loaded_ext, 'gina') + endif + + if get(g:, 'loaded_fern', 0) && get(g:, 'airline#extensions#fern#enabled', 1) + call airline#extensions#fern#init(s:ext) + call add(s:loaded_ext, 'fern') + endif + + if exists(':NetrwSettings') + call airline#extensions#netrw#init(s:ext) + call add(s:loaded_ext, 'netrw') + endif + + " fzf buffers are also terminal buffers, so this must be above term. + if exists(':FZF') && get(g:, 'airline#extensions#fzf#enabled', 1) + call airline#extensions#fzf#init(s:ext) + call add(s:loaded_ext, 'fzf') + endif + + " Vim-CMake buffers are also terminal buffers, so this must be above term. + if get(g:, 'loaded_cmake', 0) && get(g:, 'airline#extensions#vimcmake#enabled', 1) + call airline#extensions#vimcmake#init(s:ext) + call add(s:loaded_ext, 'vimcmake') + endif + + if (has("terminal") || has('nvim')) && + \ get(g:, 'airline#extensions#term#enabled', 1) + call airline#extensions#term#init(s:ext) + call add(s:loaded_ext, 'term') + endif + + if get(g:, 'airline#extensions#ycm#enabled', 0) && exists('g:loaded_youcompleteme') + call airline#extensions#ycm#init(s:ext) + call add(s:loaded_ext, 'ycm') + endif + + if get(g:, 'loaded_vimfiler', 0) + let g:vimfiler_force_overwrite_statusline = 0 + endif + + if get(g:, 'loaded_ctrlp', 0) + call airline#extensions#ctrlp#init(s:ext) + call add(s:loaded_ext, 'ctrlp') + endif + + if get(g:, 'loaded_localsearch', 0) + call airline#extensions#localsearch#init(s:ext) + call add(s:loaded_ext, 'localsearch') + endif + + if get(g:, 'CtrlSpaceLoaded', 0) + call airline#extensions#ctrlspace#init(s:ext) + call add(s:loaded_ext, 'ctrlspace') + endif + + if get(g:, 'command_t_loaded', 0) + call airline#extensions#commandt#init(s:ext) + call add(s:loaded_ext, 'commandt') + endif + + if exists(':UndotreeToggle') + call airline#extensions#undotree#init(s:ext) + call add(s:loaded_ext, 'undotree') + endif + + if get(g:, 'airline#extensions#hunks#enabled', 1) + \ && (exists('g:loaded_signify') + \ || exists('g:loaded_gitgutter') + \ || exists('g:loaded_changes') + \ || exists('g:loaded_quickfixsigns') + \ || exists(':Gitsigns') + \ || exists(':CocCommand')) + call airline#extensions#hunks#init(s:ext) + call add(s:loaded_ext, 'hunks') + endif + + if get(g:, 'airline#extensions#vimagit#enabled', 1) + \ && (exists('g:loaded_magit')) + call airline#extensions#vimagit#init(s:ext) + call add(s:loaded_ext, 'vimagit') + endif + + if get(g:, 'airline#extensions#tagbar#enabled', 1) + \ && exists(':TagbarToggle') + call airline#extensions#tagbar#init(s:ext) + call add(s:loaded_ext, 'tagbar') + endif + if get(g:, 'airline#extensions#taglist#enabled', 1) && exists(':TlistShowTag') + call airline#extensions#taglist#init(s:ext) + call add(s:loaded_ext, 'taglist') + endif + + if get(g:, 'airline#extensions#vista#enabled', 1) + \ && exists(':Vista') + call airline#extensions#vista#init(s:ext) + call add(s:loaded_ext, 'vista') + endif + + if get(g:, 'airline#extensions#bookmark#enabled', 1) + \ && exists(':BookmarkToggle') + call airline#extensions#bookmark#init(s:ext) + call add(s:loaded_ext, 'bookmark') + endif + + if get(g:, 'airline#extensions#scrollbar#enabled', 0) + call airline#extensions#scrollbar#init(s:ext) + call add(s:loaded_ext, 'scrollbar') + endif + + if get(g:, 'airline#extensions#csv#enabled', 1) + \ && (get(g:, 'loaded_csv', 0) || exists(':Table')) + call airline#extensions#csv#init(s:ext) + call add(s:loaded_ext, 'csv') + endif + + if get(g:, 'airline#extensions#zoomwintab#enabled', 0) + call airline#extensions#zoomwintab#init(s:ext) + call add(s:loaded_ext, 'zoomwintab') + endif + + if exists(':VimShell') + let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}'] + endif + + if get(g:, 'airline#extensions#branch#enabled', 1) && ( + \ airline#util#has_fugitive() || + \ airline#util#has_gina() || + \ airline#util#has_lawrencium() || + \ airline#util#has_vcscommand() || + \ airline#util#has_custom_scm()) + call airline#extensions#branch#init(s:ext) + call add(s:loaded_ext, 'branch') + endif + + if get(g:, 'airline#extensions#bufferline#enabled', 1) + \ && exists('*bufferline#get_status_string') + call airline#extensions#bufferline#init(s:ext) + call add(s:loaded_ext, 'bufferline') + endif + + if get(g:, 'airline#extensions#fugitiveline#enabled', 1) + \ && airline#util#has_fugitive() + \ && index(s:loaded_ext, 'bufferline') == -1 + call airline#extensions#fugitiveline#init(s:ext) + call add(s:loaded_ext, 'fugitiveline') + endif + + " NOTE: This means that if both virtualenv and poetv are enabled and + " available, poetv silently takes precedence and the virtualenv + " extension won't be initialized. Since both extensions currently just + " add a virtualenv identifier section to the airline, this seems + " acceptable. + if (get(g:, 'airline#extensions#poetv#enabled', 0) && (exists(':PoetvActivate'))) + call airline#extensions#poetv#init(s:ext) + call add(s:loaded_ext, 'poetv') + elseif (get(g:, 'airline#extensions#virtualenv#enabled', 0) && (exists(':VirtualEnvList'))) + call airline#extensions#virtualenv#init(s:ext) + call add(s:loaded_ext, 'virtualenv') + elseif (get(g:, 'airline#extensions#poetv#enabled', 0) && (isdirectory($VIRTUAL_ENV))) + call airline#extensions#poetv#init(s:ext) + call add(s:loaded_ext, 'poetv') + endif + + if (get(g:, 'airline#extensions#eclim#enabled', 1) && exists(':ProjectCreate')) + call airline#extensions#eclim#init(s:ext) + call add(s:loaded_ext, 'eclim') + endif + + if get(g:, 'airline#extensions#syntastic#enabled', 1) + \ && exists(':SyntasticCheck') + call airline#extensions#syntastic#init(s:ext) + call add(s:loaded_ext, 'syntastic') + endif + + if (get(g:, 'airline#extensions#ale#enabled', 1) && exists(':ALELint')) + call airline#extensions#ale#init(s:ext) + call add(s:loaded_ext, 'ale') + endif + + if (get(g:, 'airline#extensions#lsp#enabled', 1) && exists(':LspDeclaration')) + call airline#extensions#lsp#init(s:ext) + call add(s:loaded_ext, 'lsp') + endif + + if (get(g:, 'airline#extensions#nvimlsp#enabled', 1) + \ && has('nvim') + \ && luaeval('vim.lsp ~= nil')) + call airline#extensions#nvimlsp#init(s:ext) + call add(s:loaded_ext, 'nvimlsp') + endif + + if (get(g:, 'airline#extensions#coc#enabled', 1) && exists(':CocCommand')) + call airline#extensions#coc#init(s:ext) + call add(s:loaded_ext, 'coc') + endif + + if (get(g:, 'airline#extensions#languageclient#enabled', 1) && exists(':LanguageClientStart')) + call airline#extensions#languageclient#init(s:ext) + call add(s:loaded_ext, 'languageclient') + endif + + if get(g:, 'airline#extensions#whitespace#enabled', 1) + call airline#extensions#whitespace#init(s:ext) + call add(s:loaded_ext, 'whitespace') + endif + + if (get(g:, 'airline#extensions#neomake#enabled', 1) && exists(':Neomake')) + call airline#extensions#neomake#init(s:ext) + call add(s:loaded_ext, 'neomake') + endif + + if get(g:, 'airline#extensions#po#enabled', 1) && executable('msgfmt') + call airline#extensions#po#init(s:ext) + call add(s:loaded_ext, 'po') + endif + + if get(g:, 'airline#extensions#wordcount#enabled', 1) + call airline#extensions#wordcount#init(s:ext) + call add(s:loaded_ext, 'wordcount') + endif + + if get(g:, 'airline#extensions#tabline#enabled', 0) + call airline#extensions#tabline#init(s:ext) + call add(s:loaded_ext, 'tabline') + endif + + if get(g:, 'airline#extensions#tmuxline#enabled', 1) && exists(':Tmuxline') + call airline#extensions#tmuxline#init(s:ext) + call add(s:loaded_ext, 'tmuxline') + endif + + if get(g:, 'airline#extensions#promptline#enabled', 1) && exists(':PromptlineSnapshot') && len(get(g:, 'airline#extensions#promptline#snapshot_file', '')) + call airline#extensions#promptline#init(s:ext) + call add(s:loaded_ext, 'promptline') + endif + + if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && get(g:, 'loaded_nrrw_rgn', 0) + call airline#extensions#nrrwrgn#init(s:ext) + call add(s:loaded_ext, 'nrrwrgn') + endif + + if get(g:, 'airline#extensions#unicode#enabled', 1) && exists(':UnicodeTable') == 2 + call airline#extensions#unicode#init(s:ext) + call add(s:loaded_ext, 'unicode') + endif + + if (get(g:, 'airline#extensions#capslock#enabled', 1) && exists('*CapsLockStatusline')) + call airline#extensions#capslock#init(s:ext) + call add(s:loaded_ext, 'capslock') + endif + + if (get(g:, 'airline#extensions#gutentags#enabled', 1) && get(g:, 'loaded_gutentags', 0)) + call airline#extensions#gutentags#init(s:ext) + call add(s:loaded_ext, 'gutentags') + endif + + if get(g:, 'airline#extensions#gen_tags#enabled', 1) && (get(g:, 'loaded_gentags#gtags', 0) || get(g:, 'loaded_gentags#ctags', 0)) + call airline#extensions#gen_tags#init(s:ext) + call add(s:loaded_ext, 'gen_tags') + endif + + if (get(g:, 'airline#extensions#grepper#enabled', 1) && get(g:, 'loaded_grepper', 0)) + call airline#extensions#grepper#init(s:ext) + call add(s:loaded_ext, 'grepper') + endif + + if get(g:, 'airline#extensions#xkblayout#enabled', 1) && (exists('g:XkbSwitchLib') || exists('*FcitxCurrentIM')) + call airline#extensions#xkblayout#init(s:ext) + call add(s:loaded_ext, 'xkblayout') + endif + + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + call airline#extensions#keymap#init(s:ext) + call add(s:loaded_ext, 'keymap') + endif + + if (get(g:, 'airline#extensions#windowswap#enabled', 1) && get(g:, 'loaded_windowswap', 0)) + call airline#extensions#windowswap#init(s:ext) + call add(s:loaded_ext, 'windowswap') + endif + + if (get(g:, 'airline#extensions#obsession#enabled', 1) && exists('*ObsessionStatus')) + call airline#extensions#obsession#init(s:ext) + call add(s:loaded_ext, 'obsession') + endif + + if get(g:, 'airline#extensions#vimtex#enabled', 1) + runtime autoload/vimtex.vim + if exists('*vimtex#init') + call airline#extensions#vimtex#init(s:ext) + call add(s:loaded_ext, 'vimtex') + endif + endif + + if (get(g:, 'airline#extensions#cursormode#enabled', 0)) + call airline#extensions#cursormode#init(s:ext) + call add(s:loaded_ext, 'cursormode') + endif + + if get(g:, 'airline#extensions#searchcount#enabled', 1) && exists('*searchcount') + call airline#extensions#searchcount#init(s:ext) + call add(s:loaded_ext, 'searchcount') + endif + + if get(g:, 'loaded_battery', 0) && get(g:, 'airline#extensions#battery#enabled', 0) + call airline#extensions#battery#init(s:ext) + call add(s:loaded_ext, 'battery') + endif + + if (get(g:, 'airline#extensions#vim9lsp#enabled', 1) && exists('*lsp#lsp#ErrorCount')) + call airline#extensions#vim9lsp#init(s:ext) + call add(s:loaded_ext, 'vim9lsp') + endif + + if !get(g:, 'airline#extensions#disable_rtp_load', 0) + " load all other extensions, which are not part of the default distribution. + " (autoload/airline/extensions/*.vim outside of our s:script_path). + for file in split(globpath(&rtp, 'autoload/airline/extensions/*.vim', 1), "\n") + " we have to check both resolved and unresolved paths, since it's possible + " that they might not get resolved properly (see #187) + if stridx(tolower(resolve(fnamemodify(file, ':p'))), s:script_path) < 0 + \ && stridx(tolower(fnamemodify(file, ':p')), s:script_path) < 0 + let name = fnamemodify(file, ':t:r') + if !get(g:, 'airline#extensions#'.name.'#enabled', 1) || + \ index(s:loaded_ext, name.'*') > -1 + continue + endif + try + call airline#extensions#{name}#init(s:ext) + " mark as external + call add(s:loaded_ext, name.'*') + catch + endtry + endif + endfor + endif + + if exists(':Dirvish') && get(g:, 'airline#extensions#dirvish#enabled', 1) + call airline#extensions#dirvish#init(s:ext) + call add(s:loaded_ext, 'dirvish') + endif + + if (get(g:, 'airline#extensions#omnisharp#enabled', 1) && get(g:, 'OmniSharp_loaded', 0)) + call airline#extensions#omnisharp#init(s:ext) + call add(s:loaded_ext, 'omnisharp') + endif + + if (get(g:, 'airline#extensions#rufo#enabled', 0) && get(g:, 'rufo_loaded', 0)) + call airline#extensions#rufo#init(s:ext) + call add(s:loaded_ext, 'rufo') + endif + +endfunction + +function! airline#extensions#get_loaded_extensions() + return s:loaded_ext +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/ale.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ale.vim new file mode 100644 index 0000000..0948ae6 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ale.vim @@ -0,0 +1,138 @@ +" MIT License. Copyright (c) 2013-2021 Bjorn Neergaard, w0rp et al. +" Plugin: https://github.com/dense-analysis/ale +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_ale_dont_use_this_in_other_plugins_please', 0) + finish +endif + +function! s:airline_ale_count(cnt, symbol) + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:legacy_airline_ale_get_line_number(cnt, type) abort + " Before ALE introduced the FirstProblem API function, this is how + " airline would get the line numbers: + " 1. Get the whole loclist; 2. Filter it for the desired problem type. + " 3. Return the line number of the first element in the filtered list. + if a:cnt == 0 + return '' + endif + + let buffer = bufnr('') + let problem_type = (a:type ==# 'error') ? 'E' : 'W' + let problems = copy(ale#engine#GetLoclist(buffer)) + + call filter(problems, 'v:val.bufnr is buffer && v:val.type is# problem_type') + + if empty(problems) + return '' + endif + + let open_lnum_symbol = get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L') + let close_lnum_symbol = get(g:, 'airline#extensions#ale#close_lnum_symbol', ')') + + return open_lnum_symbol . problems[0].lnum . close_lnum_symbol +endfunction + +function! s:new_airline_ale_get_line_number(cnt, type) abort + " The FirstProblem call in ALE is a far more efficient way + " of obtaining line number data. If the installed ALE supports + " it, we should use this method of getting line data. + if a:cnt == 0 + return '' + endif + let l:buffer = bufnr('') + + " Try to get the first error from ALE. + let l:result = ale#statusline#FirstProblem(l:buffer, a:type) + if empty(l:result) + " If there are no errors then try and check for style errors. + let l:result = ale#statusline#FirstProblem(l:buffer, 'style_' . a:type) + endif + + if empty(l:result) + return '' + endif + + let l:open_lnum_symbol = + \ get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L') + let l:close_lnum_symbol = + \ get(g:, 'airline#extensions#ale#close_lnum_symbol', ')') + + return open_lnum_symbol . l:result.lnum . close_lnum_symbol +endfunction + +function! s:airline_ale_get_line_number(cnt, type) abort + " Use the new ALE statusline API function if it is available. + if exists("*ale#statusline#FirstProblem") + return s:new_airline_ale_get_line_number(a:cnt, a:type) + endif + + return s:legacy_airline_ale_get_line_number(a:cnt, a:type) +endfunction + +function! airline#extensions#ale#get(type) + if !exists(':ALELint') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:') + let checking_symbol = get(g:, 'airline#extensions#ale#checking_symbol', '...') + let show_line_numbers = get(g:, 'airline#extensions#ale#show_line_numbers', 1) + + let is_err = a:type ==# 'error' + + if ale#engine#IsCheckingBuffer(bufnr('')) == 1 + return is_err ? '' : checking_symbol + endif + + let symbol = is_err ? error_symbol : warning_symbol + + let counts = ale#statusline#Count(bufnr('')) + if type(counts) == type({}) && has_key(counts, 'error') + " Use the current Dictionary format. + let errors = counts.error + counts.style_error + let num = is_err ? errors : counts.total - errors + else + " Use the old List format. + let num = is_err ? counts[0] : counts[1] + endif + + if show_line_numbers == 1 + return s:airline_ale_count(num, symbol) . airline_ale_get_line_number(num, a:type) + else + return s:airline_ale_count(num, symbol) + endif +endfunction + +function! airline#extensions#ale#get_warning() + return airline#extensions#ale#get('warning') +endfunction + +function! airline#extensions#ale#get_error() + return airline#extensions#ale#get('error') +endfunction + +function! airline#extensions#ale#init(ext) + call airline#parts#define_function('ale_error_count', 'airline#extensions#ale#get_error') + call airline#parts#define_function('ale_warning_count', 'airline#extensions#ale#get_warning') + augroup airline_ale + autocmd! + autocmd CursorHold,BufWritePost * call ale_refresh() + autocmd User ALEJobStarted,ALELintPost call ale_refresh() + augroup END +endfunction + +function! s:ale_refresh() + if !exists('#airline') + " airline disabled + return + endif + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh!' + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/battery.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/battery.vim new file mode 100644 index 0000000..baeb764 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/battery.vim @@ -0,0 +1,23 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/lambdalisue/battery.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:loaded_battery') + finish +endif + +function! airline#extensions#battery#status(...) abort + if !exists('g:battery#update_statusline') + let g:battery#update_statusline = 1 + call battery#update() + endif + + let bat = battery#component() + return bat +endfunction + +function! airline#extensions#battery#init(ext) abort + call airline#parts#define_function('battery', 'airline#extensions#battery#status') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/bookmark.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/bookmark.vim new file mode 100644 index 0000000..dde28f9 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/bookmark.vim @@ -0,0 +1,30 @@ +" MIT License. Copyright (c) 2021 Bjoern Petri +" Plugin: https://github.com/MattesGroeger/vim-bookmarks +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':BookmarkToggle') + finish +endif + +function! airline#extensions#bookmark#currentbookmark() abort + if get(w:, 'airline_active', 0) + let file = expand('%:p') + if file ==# '' + return + endif + + let current_line = line('.') + let has_bm = bm#has_bookmark_at_line(file, current_line) + let bm = has_bm ? bm#get_bookmark_by_line(file, current_line) : 0 + let annotation = has_bm ? bm['annotation'] : '' + + return annotation + endif + return '' +endfunction + +function! airline#extensions#bookmark#init(ext) abort + call airline#parts#define_function('bookmark', 'airline#extensions#bookmark#currentbookmark') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/branch.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/branch.vim new file mode 100644 index 0000000..49c1ffd --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/branch.vim @@ -0,0 +1,369 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: fugitive, gina, lawrencium and vcscommand +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" s:vcs_config contains static configuration of VCSes and their status relative +" to the active file. +" 'branch' - The name of currently active branch. This field is empty iff it +" has not been initialized yet or the current file is not in +" an active branch. +" 'untracked' - Cache of untracked files represented as a dictionary with files +" as keys. A file has a not exists symbol set as its value if it +" is untracked. A file is present in this dictionary iff its +" status is considered up to date. +" 'untracked_mark' - used as regexp to test against the output of 'cmd' +let s:vcs_config = { +\ 'git': { +\ 'exe': 'git', +\ 'cmd': 'git status --porcelain -- ', +\ 'dirty': 'git status -uno --porcelain --ignore-submodules', +\ 'untracked_mark': '??', +\ 'exclude': '\.git', +\ 'update_branch': 's:update_git_branch', +\ 'display_branch': 's:display_git_branch', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\ 'mercurial': { +\ 'exe': 'hg', +\ 'cmd': 'hg status -u -- ', +\ 'dirty': 'hg status -mard', +\ 'untracked_mark': '?', +\ 'exclude': '\.hg', +\ 'update_branch': 's:update_hg_branch', +\ 'display_branch': 's:display_hg_branch', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\} + +" Initializes b:buffer_vcs_config. b:buffer_vcs_config caches the branch and +" untracked status of the file in the buffer. Caching those fields is necessary, +" because s:vcs_config may be updated asynchronously and s:vcs_config fields may +" be invalid during those updates. b:buffer_vcs_config fields are updated +" whenever corresponding fields in s:vcs_config are updated or an inconsistency +" is detected during update_* operation. +" +" b:airline_head caches the head string it is empty iff it needs to be +" recalculated. b:airline_head is recalculated based on b:buffer_vcs_config. +function! s:init_buffer() + let b:buffer_vcs_config = {} + for vcs in keys(s:vcs_config) + let b:buffer_vcs_config[vcs] = { + \ 'branch': '', + \ 'untracked': '', + \ 'dirty': 0, + \ } + endfor + unlet! b:airline_head +endfunction + +let s:head_format = get(g:, 'airline#extensions#branch#format', 0) +if s:head_format == 1 + function! s:format_name(name) + return fnamemodify(a:name, ':t') + endfunction +elseif s:head_format == 2 + function! s:format_name(name) + return pathshorten(a:name) + endfunction +elseif type(s:head_format) == type('') + function! s:format_name(name) + return call(s:head_format, [a:name]) + endfunction +else + function! s:format_name(name) + return a:name + endfunction +endif + + +" Fugitive special revisions. call '0' "staging" ? +let s:names = {'0': 'index', '1': 'orig', '2':'fetch', '3':'merge'} +let s:sha1size = get(g:, 'airline#extensions#branch#sha1_len', 7) + +function! s:update_git_branch() + call airline#util#ignore_next_focusgain() + if airline#util#has_fugitive() + call s:config_fugitive_branch() + elseif airline#util#has_gina() + call s:config_gina_branch() + else + let s:vcs_config['git'].branch = '' + return + endif +endfunction + +function! s:config_fugitive_branch() abort + let s:vcs_config['git'].branch = FugitiveHead(s:sha1size) + if s:vcs_config['git'].branch is# 'master' && + \ airline#util#winwidth() < 81 + " Shorten default a bit + let s:vcs_config['git'].branch='mas' + endif +endfunction + +function! s:config_gina_branch() abort + try + let g:gina#component#repo#commit_length = s:sha1size + let s:vcs_config['git'].branch = gina#component#repo#branch() + catch + endtry + if s:vcs_config['git'].branch is# 'master' && + \ airline#util#winwidth() < 81 + " Shorten default a bit + let s:vcs_config['git'].branch='mas' + endif +endfunction + +function! s:display_git_branch() + let name = b:buffer_vcs_config['git'].branch + try + let commit = matchstr(FugitiveParse()[0], '^\x\+') + + if has_key(s:names, commit) + let name = get(s:names, commit)."(".name.")" + elseif !empty(commit) + if exists('*FugitiveExecute') + let ref = FugitiveExecute(['describe', '--all', '--exact-match', commit], bufnr('')).stdout[0] + else + noautocmd let ref = fugitive#repo().git_chomp('describe', '--all', '--exact-match', commit) + if ref =~# ':' + let ref = '' + endif + endif + if !empty(ref) + let name = s:format_name(substitute(ref, '\v\C^%(heads/|remotes/|tags/)=','',''))."(".name.")" + else + let name = matchstr(commit, '.\{'.s:sha1size.'}')."(".name.")" + endif + endif + catch + endtry + return name +endfunction + +function! s:update_hg_branch() + if airline#util#has_lawrencium() + let cmd='LC_ALL=C hg qtop' + let stl=lawrencium#statusline() + let file=expand('%:p') + if !empty(stl) && get(b:, 'airline_do_mq_check', 1) + if g:airline#init#vim_async + noa call airline#async#get_mq_async(cmd, file) + elseif has("nvim") + noa call airline#async#nvim_get_mq_async(cmd, file) + else + " remove \n at the end of the command + let output=system(cmd)[0:-2] + noa call airline#async#mq_output(output, file) + endif + endif + " do not do mq check anymore + let b:airline_do_mq_check = 0 + if exists("b:mq") && !empty(b:mq) + if stl is# 'default' + " Shorten default a bit + let stl='def' + endif + let stl.=' ['.b:mq.']' + endif + let s:vcs_config['mercurial'].branch = stl + else + let s:vcs_config['mercurial'].branch = '' + endif +endfunction + +function! s:display_hg_branch() + return b:buffer_vcs_config['mercurial'].branch +endfunction + +function! s:update_branch() + for vcs in keys(s:vcs_config) + call {s:vcs_config[vcs].update_branch}() + if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch + let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch + unlet! b:airline_head + endif + endfor +endfunction + +function! airline#extensions#branch#update_untracked_config(file, vcs) + if !has_key(s:vcs_config[a:vcs].untracked, a:file) + return + elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked + let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file] + unlet! b:airline_head + endif +endfunction + +function! s:update_untracked() + let file = expand("%:p") + if empty(file) || isdirectory(file) || !empty(&buftype) + return + endif + + let needs_update = 1 + let vcs_checks = get(g:, "airline#extensions#branch#vcs_checks", ["untracked", "dirty"]) + for vcs in keys(s:vcs_config) + if file =~ s:vcs_config[vcs].exclude + " Skip check for files that live in the exclude directory + let needs_update = 0 + endif + if has_key(s:vcs_config[vcs].untracked, file) + let needs_update = 0 + call airline#extensions#branch#update_untracked_config(file, vcs) + endif + endfor + + if !needs_update + return + endif + + for vcs in keys(s:vcs_config) + " only check, for git, if fugitive is installed + " and for 'hg' if lawrencium is installed, else skip + if vcs is# 'git' && (!airline#util#has_fugitive() && !airline#util#has_gina()) + continue + elseif vcs is# 'mercurial' && !airline#util#has_lawrencium() + continue + endif + let config = s:vcs_config[vcs] + " Note that asynchronous update updates s:vcs_config only, and only + " s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is + " invalidated again before s:update_untracked is called, then we lose the + " result of the previous call, i.e. the head string is not updated. It + " doesn't happen often in practice, so we let it be. + if index(vcs_checks, 'untracked') > -1 + call airline#async#vcs_untracked(config, file, vcs) + endif + " Check clean state of repo + if index(vcs_checks, 'dirty') > -1 + call airline#async#vcs_clean(config.dirty, file, vcs) + endif + endfor +endfunction + +function! airline#extensions#branch#head() + if !exists('b:buffer_vcs_config') + call s:init_buffer() + endif + + call s:update_branch() + call s:update_untracked() + + if exists('b:airline_head') && !empty(b:airline_head) + return b:airline_head + endif + + let b:airline_head = '' + let vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) + + let heads = [] + for vcs in vcs_priority + if !empty(b:buffer_vcs_config[vcs].branch) + let heads += [vcs] + endif + endfor + + for vcs in heads + if !empty(b:airline_head) + let b:airline_head .= ' | ' + endif + if len(heads) > 1 + let b:airline_head .= s:vcs_config[vcs].exe .':' + endif + let b:airline_head .= s:format_name({s:vcs_config[vcs].display_branch}()) + let additional = b:buffer_vcs_config[vcs].untracked + if empty(additional) && + \ has_key(b:buffer_vcs_config[vcs], 'dirty') && + \ b:buffer_vcs_config[vcs].dirty + let additional = g:airline_symbols['dirty'] + endif + let b:airline_head .= additional + endfor + + if empty(heads) + if airline#util#has_vcscommand() + noa call VCSCommandEnableBufferSetup() + if exists('b:VCSCommandBufferInfo') + let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, '')) + endif + endif + endif + + if empty(heads) + if airline#util#has_custom_scm() + try + let Fn = function(g:airline#extensions#branch#custom_head) + let b:airline_head = Fn() + endtry + endif + endif + + if exists("g:airline#extensions#branch#displayed_head_limit") + let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit + if strwidth(b:airline_head) > w:displayed_head_limit - 1 + let b:airline_head = + \ airline#util#strcharpart(b:airline_head, 0, w:displayed_head_limit - 1) + \ . (&encoding ==? 'utf-8' ? '…' : '.') + endif + endif + + return b:airline_head +endfunction + +function! airline#extensions#branch#get_head() + let head = airline#extensions#branch#head() + let winwidth = get(airline#parts#get('branch'), 'minwidth', 120) + let minwidth = empty(get(b:, 'airline_hunks', '')) ? 14 : 7 + let head = airline#util#shorten(head, winwidth, minwidth) + let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) + return empty(head) + \ ? get(g:, 'airline#extensions#branch#empty_message', '') + \ : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) +endfunction + +function! s:reset_untracked_cache(shellcmdpost) + " shellcmdpost - whether function was called as a result of ShellCmdPost hook + if !exists('#airline') + " airline disabled + return + endif + if !g:airline#init#vim_async && !has('nvim') + if a:shellcmdpost + " Clear cache only if there was no error or the script uses an + " asynchronous interface. Otherwise, cache clearing would overwrite + " v:shell_error with a system() call inside get_*_untracked. + if v:shell_error + return + endif + endif + endif + + let file = expand("%:p") + for vcs in keys(s:vcs_config) + " Dump the value of the cache for the current file. Partially mitigates the + " issue of cache invalidation happening before a call to + " s:update_untracked() + call airline#extensions#branch#update_untracked_config(file, vcs) + let s:vcs_config[vcs].untracked = {} + endfor +endfunction + +function! s:sh_autocmd_handler() + if exists('#airline') + unlet! b:airline_head b:airline_do_mq_check + endif +endfunction + +function! airline#extensions#branch#init(ext) + call airline#parts#define_function('branch', 'airline#extensions#branch#get_head') + + autocmd ShellCmdPost,CmdwinLeave * call s:sh_autocmd_handler() + autocmd User AirlineBeforeRefresh call s:sh_autocmd_handler() + autocmd BufWritePost * call s:reset_untracked_cache(0) + autocmd ShellCmdPost * call s:reset_untracked_cache(1) +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim new file mode 100644 index 0000000..3d6e2eb --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/bufferline.vim @@ -0,0 +1,28 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/bling/vim-bufferline +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*bufferline#get_status_string') + finish +endif + +function! airline#extensions#bufferline#init(ext) + if get(g:, 'airline#extensions#bufferline#overwrite_variables', 1) + highlight bufferline_selected gui=bold cterm=bold term=bold + highlight link bufferline_selected_inactive airline_c_inactive + let g:bufferline_inactive_highlight = 'airline_c' + let g:bufferline_active_highlight = 'bufferline_selected' + let g:bufferline_active_buffer_left = '' + let g:bufferline_active_buffer_right = '' + let g:bufferline_separator = g:airline_symbols.space + endif + + if exists("+autochdir") && &autochdir == 1 + " if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well + call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + else + call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim new file mode 100644 index 0000000..4d6e453 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/capslock.vim @@ -0,0 +1,17 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/tpope/vim-capslock +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*CapsLockStatusline') + finish +endif + +function! airline#extensions#capslock#status() + return tolower(CapsLockStatusline()) ==# '[caps]' ? get(g:, 'airline#extensions#capslock#symbol', 'CAPS') : '' +endfunction + +function! airline#extensions#capslock#init(ext) + call airline#parts#define_function('capslock', 'airline#extensions#capslock#status') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/coc.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/coc.vim new file mode 100644 index 0000000..3825964 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/coc.vim @@ -0,0 +1,54 @@ +" MIT License. Copyright (c) 2019-2021 Peng Guanwen et al. +" vim: et ts=2 sts=2 sw=2 +" Plugin: https://github.com/neoclide/coc + +scriptencoding utf-8 + +let s:show_coc_status = get(g:, 'airline#extensions#coc#show_coc_status', 1) + +function! airline#extensions#coc#get_warning() abort + return airline#extensions#coc#get('warning') +endfunction + +function! airline#extensions#coc#get_error() abort + return airline#extensions#coc#get('error') +endfunction + +function! airline#extensions#coc#get(type) abort + if !exists(':CocCommand') | return '' | endif + + let is_err = (a:type is# 'error') + let info = get(b:, 'coc_diagnostic_info', {}) + if empty(info) | return '' | endif + + let cnt = get(info, a:type, 0) + if empty(cnt) | return '' | endif + + let error_symbol = get(g:, 'airline#extensions#coc#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#coc#warning_symbol', 'W:') + let error_format = get(g:, 'airline#extensions#coc#stl_format_err', '%C(L%L)') + let warning_format = get(g:, 'airline#extensions#coc#stl_format_warn', '%C(L%L)') + + " replace %C with error count and %L with line number + return (is_err ? error_symbol : warning_symbol) . + \ substitute(substitute(is_err ? error_format : warning_format, + \ '%C', cnt, 'g'), + \ '%L', (info.lnums)[is_err ? 0 : 1], 'g') +endfunction + +function! airline#extensions#coc#get_status() abort + " Shorten text for windows < 91 characters + let status = airline#util#shorten(get(g:, 'coc_status', ''), 91, 9) + return (s:show_coc_status ? status : '') +endfunction + +function! airline#extensions#coc#get_current_function() abort + return get(b:, 'coc_current_function', '') +endfunction + +function! airline#extensions#coc#init(ext) abort + call airline#parts#define_function('coc_error_count', 'airline#extensions#coc#get_error') + call airline#parts#define_function('coc_warning_count', 'airline#extensions#coc#get_warning') + call airline#parts#define_function('coc_status', 'airline#extensions#coc#get_status') + call airline#parts#define_function('coc_current_function', 'airline#extensions#coc#get_current_function') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim new file mode 100644 index 0000000..1183bcf --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/commandt.vim @@ -0,0 +1,19 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/wincent/command-t +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'command_t_loaded', 0) + finish +endif + +function! airline#extensions#commandt#apply(...) + if bufname('%') ==# 'GoToFile' + call airline#extensions#apply_left_override('CommandT', '') + endif +endfunction + +function! airline#extensions#commandt#init(ext) + call a:ext.add_statusline_func('airline#extensions#commandt#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/csv.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/csv.vim new file mode 100644 index 0000000..694bc8b --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/csv.vim @@ -0,0 +1,33 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" Plugin: https://github.com/chrisbra/csv.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_csv', 0) && !exists(':Table') + finish +endif + +let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number') + +function! airline#extensions#csv#get_column() + if exists('*CSV_WCol') + if s:column_display ==# 'Name' + return '['.CSV_WCol('Name').CSV_WCol().']' + else + return '['.CSV_WCol().']' + endif + endif + return '' +endfunction + +function! airline#extensions#csv#apply(...) + if &ft ==# "csv" + call airline#extensions#prepend_to_section('gutter', + \ g:airline_left_alt_sep.' %{airline#extensions#csv#get_column()}') + endif +endfunction + +function! airline#extensions#csv#init(ext) + call a:ext.add_statusline_func('airline#extensions#csv#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim new file mode 100644 index 0000000..136c348 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim @@ -0,0 +1,82 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/ctrlpvim/ctrlp.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert') + +function! airline#extensions#ctrlp#generate_color_map(dark, light, white) + return { + \ 'CtrlPdark' : a:dark, + \ 'CtrlPlight' : a:light, + \ 'CtrlPwhite' : a:white, + \ 'CtrlParrow1' : [ a:light[1] , a:white[1] , a:light[3] , a:white[3] , '' ] , + \ 'CtrlParrow2' : [ a:white[1] , a:light[1] , a:white[3] , a:light[3] , '' ] , + \ 'CtrlParrow3' : [ a:light[1] , a:dark[1] , a:light[3] , a:dark[3] , '' ] , + \ } +endfunction + +function! airline#extensions#ctrlp#load_theme(palette) + if exists('a:palette.ctrlp') + let theme = a:palette.ctrlp + else + let s:color_template = has_key(a:palette, s:color_template) ? s:color_template : 'insert' + let theme = airline#extensions#ctrlp#generate_color_map( + \ a:palette[s:color_template]['airline_c'], + \ a:palette[s:color_template]['airline_b'], + \ a:palette[s:color_template]['airline_a']) + endif + for key in keys(theme) + call airline#highlighter#exec(key, theme[key]) + endfor +endfunction + +" Arguments: focus, byfname, regexp, prv, item, nxt, marked +function! airline#extensions#ctrlp#ctrlp_airline(...) + let b = airline#builder#new({'active': 1}) + if a:2 == 'file' + call b.add_section_spaced('CtrlPlight', 'by fname') + endif + if a:3 + call b.add_section_spaced('CtrlPlight', 'regex') + endif + if get(g:, 'airline#extensions#ctrlp#show_adjacent_modes', 1) + call b.add_section_spaced('CtrlPlight', a:4) + call b.add_section_spaced('CtrlPwhite', a:5) + call b.add_section_spaced('CtrlPlight', a:6) + else + call b.add_section_spaced('CtrlPwhite', a:5) + endif + call b.add_section_spaced('CtrlPdark', a:7) + call b.split() + call b.add_section_spaced('CtrlPdark', a:1) + call b.add_section_spaced('CtrlPdark', a:2) + call b.add_section_spaced('CtrlPlight', '%{getcwd()}') + return b.build() +endfunction + +" Argument: len +function! airline#extensions#ctrlp#ctrlp_airline_status(...) + let len = '%#CtrlPdark# '.a:1 + let dir = '%=%<%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*' + return len.dir +endfunction + +function! airline#extensions#ctrlp#apply(...) + " disable statusline overwrite if ctrlp already did it + return match(&statusline, 'CtrlPwhite') >= 0 ? -1 : 0 +endfunction + +function! airline#extensions#ctrlp#init(ext) + let g:ctrlp_status_func = { + \ 'main': 'airline#extensions#ctrlp#ctrlp_airline', + \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', + \ } + call a:ext.add_statusline_func('airline#extensions#ctrlp#apply') + call a:ext.add_theme_func('airline#extensions#ctrlp#load_theme') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim new file mode 100644 index 0000000..54800e1 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/ctrlspace.vim @@ -0,0 +1,21 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/szw/vim-ctrlspace +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#ctrlspace#statusline(...) abort + let spc = g:airline_symbols.space + let l:padding = spc . spc . spc + let cs = ctrlspace#context#Configuration().Symbols.CS + + let b = airline#builder#new({ 'active': 1 }) + call b.add_section('airline_b', cs . l:padding . ctrlspace#api#StatuslineModeSegment(l:padding)) + call b.split() + call b.add_section('airline_x', spc . ctrlspace#api#StatuslineTabSegment() . spc) + return b.build() +endfunction + +function! airline#extensions#ctrlspace#init(ext) abort + let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/cursormode.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/cursormode.vim new file mode 100644 index 0000000..7b25799 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/cursormode.vim @@ -0,0 +1,126 @@ +" MIT Licsense. +" Plugin: https://github.com/vheon/vim-cursormode +" Copyright (C) 2014 Andrea Cedraro , +" Copyright (C) 2017 Eduardo Suarez-Santana + +scriptencoding utf-8 + +if exists('g:loaded_cursormode') + finish +endif + +let g:loaded_cursormode = 1 + +let s:is_win = has('win32') || has('win64') +let s:is_iTerm = exists('$TERM_PROGRAM') && $TERM_PROGRAM =~# 'iTerm.app' +let s:is_AppleTerminal = exists('$TERM_PROGRAM') && $TERM_PROGRAM =~# 'Apple_Terminal' + +let s:is_good = !has('gui_running') && !s:is_win && !s:is_AppleTerminal + +let s:last_mode = '' + +if !exists('g:cursormode_exit_mode') + let g:cursormode_exit_mode='n' +endif + +function! airline#extensions#cursormode#tmux_escape(escape) + return '\033Ptmux;'.substitute(a:escape, '\\033', '\\033\\033', 'g').'\033\\' +endfunction + +let s:iTerm_escape_template = '\033]Pl%s\033\\' +let s:xterm_escape_template = '\033]12;%s\007' + +function! s:get_mode() + return call(get(g:, 'cursormode_mode_func', 'mode'), []) +endfunction + +function! airline#extensions#cursormode#set(...) + let mode = s:get_mode() + if mode !=# s:last_mode + let s:last_mode = mode + call s:set_cursor_color_for(mode) + endif + return '' +endfunction + +function! s:set_cursor_color_for(mode) + let mode = a:mode + for mode in [a:mode, a:mode.&background] + if has_key(s:color_map, mode) + try + let save_eventignore = &eventignore + set eventignore=all + let save_shelltemp = &shelltemp + set noshelltemp + + silent call system(s:build_command(s:color_map[mode])) + return + finally + let &shelltemp = save_shelltemp + let &eventignore = save_eventignore + endtry + endif + endfor +endfunction + +function! s:build_command(color) + if s:is_iTerm + let color = substitute(a:color, '^#', '', '') + let escape_template = s:iTerm_escape_template + else + let color = a:color + let escape_template = s:xterm_escape_template + endif + + let escape = printf(escape_template, color) + if exists('$TMUX') + let escape = airline#extensions#cursormode#tmux_escape(escape) + endif + return "printf '".escape."' > /dev/tty" +endfunction + +function! s:get_color_map() + if exists('g:cursormode_color_map') + return g:cursormode_color_map + endif + + try + let map = g:cursormode#{g:colors_name}#color_map + return map + catch + return { + \ "nlight": "#000000", + \ "ndark": "#BBBBBB", + \ "i": "#0000BB", + \ "v": "#FF5555", + \ "V": "#BBBB00", + \ "\": "#BB00BB", + \ } + endtry +endfunction + +augroup airline#extensions#cursormode + autocmd! + autocmd VimLeave * nested call s:set_cursor_color_for(g:cursormode_exit_mode) + " autocmd VimEnter * call airline#extensions#cursormode#activate() + autocmd Colorscheme * call airline#extensions#cursormode#activate() +augroup END + +function! airline#extensions#cursormode#activate() + if !exists('#airline') + " airline disabled + return + endif + let s:color_map = s:get_color_map() + call airline#extensions#cursormode#set() +endfunction + +function! airline#extensions#cursormode#apply(...) + let w:airline_section_a = get(w:, 'airline_section_a', g:airline_section_a) + let w:airline_section_a .= '%{airline#extensions#cursormode#set()}' +endfunction + +function! airline#extensions#cursormode#init(ext) + let s:color_map = s:get_color_map() + call a:ext.add_statusline_func('airline#extensions#cursormode#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/default.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/default.vim new file mode 100644 index 0000000..7bfaf21 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/default.vim @@ -0,0 +1,97 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:section_use_groups = get(g:, 'airline#extensions#default#section_use_groupitems', 1) +let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', { + \ 'b': 79, + \ 'x': 60, + \ 'y': 80, + \ 'z': 45, + \ 'warning': 80, + \ 'error': 80, + \ }) +let s:layout = get(g:, 'airline#extensions#default#layout', [ + \ [ 'a', 'b', 'c' ], + \ [ 'x', 'y', 'z', 'warning', 'error' ] + \ ]) + +function! s:get_section(winnr, key, ...) + if has_key(s:section_truncate_width, a:key) + if airline#util#winwidth(a:winnr) < s:section_truncate_width[a:key] + return '' + endif + endif + let spc = g:airline_symbols.space + if !exists('g:airline_section_{a:key}') + return '' + endif + let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) + let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] + return empty(text) ? '' : prefix.text.suffix +endfunction + +function! s:build_sections(builder, context, keys) + for key in a:keys + if (key == 'warning' || key == 'error') && !a:context.active + continue + endif + call s:add_section(a:builder, a:context, key) + endfor +endfunction + +" There still is a highlighting bug when using groups %(%) in the statusline, +" deactivate it, unless it is fixed (7.4.1511) +if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81'))) + function! s:add_section(builder, context, key) + let condition = (a:key is# "warning" || a:key is# "error") && + \ (v:version == 704 && !has("patch1511")) + " i have no idea why the warning section needs special treatment, but it's + " needed to prevent separators from showing up + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if condition + call a:builder.add_raw('%(') + endif + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + if condition + call a:builder.add_raw('%)') + endif + endfunction +else + " older version don't like the use of %(%) + function! s:add_section(builder, context, key) + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if a:key == 'warning' + call a:builder.add_raw('%#airline_warning#'.s:get_section(a:context.winnr, a:key)) + elseif a:key == 'error' + call a:builder.add_raw('%#airline_error#'.s:get_section(a:context.winnr, a:key)) + else + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + endif + endfunction +endif + +function! airline#extensions#default#apply(builder, context) abort + let winnr = a:context.winnr + let active = a:context.active + + if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) + call s:build_sections(a:builder, a:context, s:layout[0]) + else + let text = !empty(s:get_section(winnr, 'c')) ? s:get_section(winnr, 'c') : ' %f%m ' + call a:builder.add_section('airline_c'.(a:context.bufnr), text) + endif + + call a:builder.split(s:get_section(winnr, 'gutter', '', '')) + + if airline#util#getwinvar(winnr, 'airline_render_right', 1) + call s:build_sections(a:builder, a:context, s:layout[1]) + endif + + return 1 +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/denite.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/denite.vim new file mode 100644 index 0000000..014709d --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/denite.vim @@ -0,0 +1,55 @@ +" MIT License. Copyright (c) 2017-2021 Thomas Dy et al. +" Plugin: https://github.com/Shougo/denite.nvim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_denite', 0) + finish +endif + +let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3) +" Denite does not use vim's built-in modal editing but has a custom prompt +" that implements its own insert/normal mode so we have to handle changing the +" highlight +function! airline#extensions#denite#check_denite_mode(bufnr) abort + if &filetype !=# 'denite' && &filetype !=# 'denite-filter' + return '' + endif + + if s:denite_ver == 3 + let mode = split(denite#get_status("mode"), ' ') + else + let mode = split(denite#get_status_mode(), ' ') + endif + let mode = tolower(get(mode, 1, '')) + if !exists('b:denite_mode_cache') || mode != b:denite_mode_cache + call airline#highlighter#highlight([mode], a:bufnr) + let b:denite_mode_cache = mode + endif + return '' +endfunction + +function! airline#extensions#denite#apply(...) abort + if &filetype ==# 'denite' || &filetype ==# 'denite-filter' + let w:airline_skip_empty_sections = 0 + call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}') + if s:denite_ver == 3 + call a:1.add_section('airline_c', ' %{denite#get_status("sources")}') + call a:1.split() + call a:1.add_section('airline_y', ' %{denite#get_status("path")} ') + call a:1.add_section('airline_z', ' %{denite#get_status("linenr")} ') + else + call a:1.add_section('airline_c', ' %{denite#get_status_sources()}') + call a:1.split() + call a:1.add_section('airline_y', ' %{denite#get_status_path()} ') + call a:1.add_section('airline_z', ' %{denite#get_status_linenr()} ') + endif + return 1 + endif +endfunction + +function! airline#extensions#denite#init(ext) abort + call denite#custom#option('_', 'statusline', 0) + call a:ext.add_statusline_func('airline#extensions#denite#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/dirvish.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/dirvish.vim new file mode 100644 index 0000000..e1ef0c0 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/dirvish.vim @@ -0,0 +1,36 @@ +" MIT Licsense +" Plugin: https://github.com/justinmk/vim-dirvish +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_dirvish', 0) + finish +endif + +let s:spc = g:airline_symbols.space + +function! airline#extensions#dirvish#init(ext) abort + call a:ext.add_statusline_func('airline#extensions#dirvish#apply') +endfunction + +function! airline#extensions#dirvish#apply(...) abort + if &filetype ==# 'dirvish' && exists('b:dirvish') + let w:airline_section_a = 'Dirvish' + + let w:airline_section_b = exists('*airline#extensions#branch#get_head') + \ ? '%{airline#extensions#branch#get_head()}' + \ : '' + + let w:airline_section_c = '%{b:dirvish._dir}' + + let w:airline_section_x = '' + let w:airline_section_y = '' + + let current_column_regex = ':%\dv' + let w:airline_section_z = join(filter( + \ split(get(w:, 'airline_section_z', g:airline_section_z)), + \ 'v:val !~ current_column_regex' + \ )) + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim new file mode 100644 index 0000000..b1e0cde --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/eclim.vim @@ -0,0 +1,62 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" PLugin: https://eclim.org +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':ProjectCreate') + finish +endif + +function! airline#extensions#eclim#creat_line(...) + if &filetype == "tree" + let builder = a:1 + call builder.add_section('airline_a', ' Project ') + call builder.add_section('airline_b', ' %f ') + call builder.add_section('airline_c', '') + return 1 + endif +endfunction + +function! airline#extensions#eclim#get_warnings() + " Cache vavlues, so that it isn't called too often + if exists("s:eclim_errors") && + \ get(b:, 'airline_changenr', 0) == changenr() + return s:eclim_errors + endif + let eclimList = eclim#display#signs#GetExisting() + let s:eclim_errors = '' + + if !empty(eclimList) + " Remove any non-eclim signs (see eclim#display#signs#Update) + " First check for just errors since they are more important. + " If there are no errors, then check for warnings. + let errorList = filter(copy(eclimList), 'v:val.name =~ "^\\(qf_\\)\\?\\(error\\)$"') + + if (empty(errorList)) + " use the warnings + call filter(eclimList, 'v:val.name =~ "^\\(qf_\\)\\?\\(warning\\)$"') + let type = 'W' + else + " Use the errors + let eclimList = errorList + let type = 'E' + endif + + if !empty(eclimList) + let errorsLine = eclimList[0]['line'] + let errorsNumber = len(eclimList) + let errors = "[Eclim:" . type . " line:".string(errorsLine)." (".string(errorsNumber).")]" + if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == '' + let s:eclim_errors = errors.(g:airline_symbols.space) + endif + endif + endif + let b:airline_changenr = changenr() + return s:eclim_errors +endfunction + +function! airline#extensions#eclim#init(ext) + call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') + call a:ext.add_statusline_func('airline#extensions#eclim#creat_line') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/example.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/example.vim new file mode 100644 index 0000000..f78c3ea --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/example.vim @@ -0,0 +1,55 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" we don't actually want this loaded :P +finish + +" Due to some potential rendering issues, the use of the `space` variable is +" recommended. +let s:spc = g:airline_symbols.space + +" Extension specific variables can be defined the usual fashion. +if !exists('g:airline#extensions#example#number_of_cats') + let g:airline#extensions#example#number_of_cats = 42 +endif + +" First we define an init function that will be invoked from extensions.vim +function! airline#extensions#example#init(ext) + + " Here we define a new part for the plugin. This allows users to place this + " extension in arbitrary locations. + call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}') + + " Next up we add a funcref so that we can run some code prior to the + " statusline getting modified. + call a:ext.add_statusline_func('airline#extensions#example#apply') + + " You can also add a funcref for inactive statuslines. + " call a:ext.add_inactive_statusline_func('airline#extensions#example#unapply') +endfunction + +" This function will be invoked just prior to the statusline getting modified. +function! airline#extensions#example#apply(...) + " First we check for the filetype. + if &filetype == "nyancat" + + " Let's say we want to append to section_c, first we check if there's + " already a window-local override, and if not, create it off of the global + " section_c. + let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c) + + " Then we just append this extension to it, optionally using separators. + let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}' + endif +endfunction + +" Finally, this function will be invoked from the statusline. +function! airline#extensions#example#get_cats() + let cats = '' + for i in range(1, g:airline#extensions#example#number_of_cats) + let cats .= ' (,,,)=(^.^)=(,,,) ' + endfor + return cats +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/fern.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fern.vim new file mode 100644 index 0000000..8b5562a --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fern.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 +" Plugin: https://github.com/lambdalisue/fern.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 +if !get(g:, 'loaded_fern', 0) + finish +endif + +function! airline#extensions#fern#apply(...) abort + if (&ft =~# 'fern') + let spc = g:airline_symbols.space + let fri = fern#fri#parse(expand('%f')) + + call a:1.add_section('airline_a', spc.'fern'.spc) + if exists('*airline#extensions#branch#get_head') + call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) + else + call a:1.add_section('airline_b', '') + endif + if !(fri.authority =~# '^drawer') + let abspath = substitute(fri.path, 'file://', '', '') + call a:1.add_section('airline_c', spc.fnamemodify(abspath, ':~')) + call a:1.split() + if len(get(g:, 'fern#comparators', {})) + call a:1.add_section('airline_y', spc.'%{fern#comparator}'.spc) + endif + endif + return 1 + endif +endfunction + +function! airline#extensions#fern#init(ext) abort + let g:fern_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#fern#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/fugitiveline.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fugitiveline.vim new file mode 100644 index 0000000..8f1c4cb --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fugitiveline.vim @@ -0,0 +1,61 @@ +" MIT License. Copyright (c) 2017-2021 Cimbali et al +" Plugin: https://github.com/tpope/vim-fugitive +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !airline#util#has_fugitive() + finish +endif + +let s:has_percent_eval = v:version > 802 || (v:version == 802 && has("patch2854")) + +function! airline#extensions#fugitiveline#bufname() abort + if !exists('b:fugitive_name') + let b:fugitive_name = '' + try + if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal') + let b:fugitive_name = FugitiveReal(bufname('%')) + endif + catch + endtry + endif + + let fmod = (exists("+autochdir") && &autochdir) ? ':p' : ':.' + let result='' + if empty(b:fugitive_name) + if empty(bufname('%')) + return &buftype ==# 'nofile' ? '[Scratch]' : '[No Name]' + endif + return s:has_percent_eval ? '%f' : fnamemodify(bufname('%'), fmod) + else + return s:has_percent_eval ? '%f [git]' : (fnamemodify(b:fugitive_name, fmod). " [git]") + endif +endfunction + +function! s:sh_autocmd_handler() + if exists('#airline') + unlet! b:fugitive_name + endif +endfunction + +function! airline#extensions#fugitiveline#init(ext) abort + let prct = s:has_percent_eval ? '%' : '' + + if exists("+autochdir") && &autochdir + " if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well + if get(g:, 'airline_stl_path_style', 'default') ==# 'short' + call airline#parts#define_raw('path', '%<%{'. prct. 'pathshorten(airline#extensions#fugitiveline#bufname())' . prct . '}%m') + else + call airline#parts#define_raw('path', '%<%{' . prct . 'airline#extensions#fugitiveline#bufname()' . prct . '}%m') + endif + else + if get(g:, 'airline_stl_path_style', 'default') ==# 'short' + call airline#parts#define_raw('file', '%<%{' . prct . 'pathshorten(airline#extensions#fugitiveline#bufname())' . prct . '}%m') + else + call airline#parts#define_raw('file', '%<%{' . prct . 'airline#extensions#fugitiveline#bufname()' . prct . '}%m') + endif + endif + autocmd ShellCmdPost,CmdwinLeave * call s:sh_autocmd_handler() + autocmd User AirlineBeforeRefresh call s:sh_autocmd_handler() +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/fzf.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fzf.vim new file mode 100644 index 0000000..760a1cc --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/fzf.vim @@ -0,0 +1,44 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/junegunn/fzf, https://github.com/junegunn/fzf.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#fzf#init(ext) abort + " Remove the custom statusline that fzf.vim sets by removing its `FileType + " fzf` autocmd. Ideally we'd use `let g:fzf_statusline = 0`, but this + " variable is checked *before* airline#extensions#init() is called. + augroup _fzf_statusline + autocmd! + augroup END + + call a:ext.add_statusline_func('airline#extensions#fzf#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#fzf#inactive_apply') +endfunction + +function! airline#extensions#fzf#statusline(...) abort + let spc = g:airline_symbols.space + + let builder = airline#builder#new({ 'active': 1 }) + call builder.add_section('airline_a', spc.'FZF'.spc) + call builder.add_section('airline_c', '') + return builder.build() +endfunction + +function! airline#extensions#fzf#apply(...) abort + if &filetype ==# 'fzf' + let spc = g:airline_symbols.space + call a:1.add_section('airline_a', spc.'FZF'.spc) + call a:1.add_section('airline_c', '') + return 1 + endif +endfunction + +function! airline#extensions#fzf#inactive_apply(...) abort + if getbufvar(a:2.bufnr, '&filetype') ==# 'fzf' + let spc = g:airline_symbols.space + call a:1.add_section('airline_a', spc.'FZF'.spc) + call a:1.add_section('airline_c', '') + return 1 + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/gen_tags.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gen_tags.vim new file mode 100644 index 0000000..ff788bc --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gen_tags.vim @@ -0,0 +1,19 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Written by Kamil Cukrowski 2020 +" Plugin: https://github.com/jsfaint/gen_tags.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !(get(g:, 'loaded_gentags#gtags', 0) || get(g:, 'loaded_gentags#ctags', 0)) + finish +endif + +function! airline#extensions#gen_tags#status(...) abort + return gen_tags#job#is_running() != 0 ? 'Gen. gen_tags' : '' +endfunction + +function! airline#extensions#gen_tags#init(ext) abort + call airline#parts#define_function('gen_tags', 'airline#extensions#gen_tags#status') +endfunction + diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/gina.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gina.vim new file mode 100644 index 0000000..58a636a --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gina.vim @@ -0,0 +1,28 @@ +" MIT License. Copyright (c) 2013-2021 +" Plugin: https://github.com/lambdalisue/gina.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 +if !get(g:, 'loaded_gina', 0) + finish +endif + +function! airline#extensions#gina#apply(...) abort + " gina.vim seems to set b:gina_initialized = 1 in diff buffers it open, + " where get(b:, 'gina_initialized', 0) returns 1. + " In diff buffers not opened by gina.vim b:gina_initialized is not set, + " so get(b:, 'gina_initialized', 0) returns 0. + if (&ft =~# 'gina' && &ft !~# 'blame') || (&ft ==# 'diff' && get(b:, 'gina_initialized', 0)) + call a:1.add_section('airline_a', ' gina ') + call a:1.add_section('airline_b', ' %{gina#component#repo#branch()} ') + call a:1.split() + call a:1.add_section('airline_y', ' staged %{gina#component#status#staged()} ') + call a:1.add_section('airline_z', ' unstaged %{gina#component#status#unstaged()} ') + return 1 + endif +endfunction + +function! airline#extensions#gina#init(ext) abort + let g:gina_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#gina#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/grepper.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/grepper.vim new file mode 100644 index 0000000..2f1d4b3 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/grepper.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/mhinz/vim-grepper +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_grepper', 0) + finish +endif + +function! airline#extensions#grepper#status() + let msg = grepper#statusline() + return empty(msg) ? '' : 'grepper' +endfunction + +function! airline#extensions#grepper#init(ext) + call airline#parts#define_function('grepper', 'airline#extensions#grepper#status') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/gutentags.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gutentags.vim new file mode 100644 index 0000000..a2a78c7 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/gutentags.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/ludovicchabant/vim-gutentags +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_gutentags', 0) + finish +endif + +function! airline#extensions#gutentags#status() + let msg = gutentags#statusline() + return empty(msg) ? '' : 'Gen. ' . msg +endfunction + +function! airline#extensions#gutentags#init(ext) + call airline#parts#define_function('gutentags', 'airline#extensions#gutentags#status') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim new file mode 100644 index 0000000..29af880 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim @@ -0,0 +1,149 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: vim-gitgutter, vim-signify, changesPlugin, quickfixsigns, coc-git, +" gitsigns.nvim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_signify', 0) + \ && !get(g:, 'loaded_gitgutter', 0) + \ && !get(g:, 'loaded_changes', 0) + \ && !get(g:, 'loaded_quickfixsigns', 0) + \ && !exists(':Gitsigns') + \ && !exists("*CocAction") + finish +endif + +let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0) +let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-']) + +function! s:coc_git_enabled() abort + if !exists("*CocAction") || + \ !get(g:, 'airline#extensions#hunks#coc_git', 0) + " coc-git extension is disabled by default + " unless specifically being enabled by the user + " (as requested from coc maintainer) + return 0 + endif + return 1 +endfunction + +function! s:parse_hunk_status_dict(hunks) abort + let result = [0, 0, 0] + let result[0] = get(a:hunks, 'added', 0) + let result[1] = get(a:hunks, 'changed', 0) + let result[2] = get(a:hunks, 'removed', 0) + return result +endfunction + +function! s:parse_hunk_status_decorated(hunks) abort + if empty(a:hunks) + return [] + endif + let result = [0, 0, 0] + for val in split(a:hunks) + if val[0] is# '+' + let result[0] = val[1:] + 0 + elseif val[0] is# '~' + let result[1] = val[1:] + 0 + elseif val[0] is# '-' + let result[2] = val[1:] + 0 + endif + endfor + return result +endfunction + +function! s:get_hunks_signify() abort + let hunks = sy#repo#get_stats() + if hunks[0] >= 0 + return hunks + endif + return [] +endfunction + +function! s:get_hunks_gitgutter() abort + let hunks = GitGutterGetHunkSummary() + return hunks == [0, 0, 0] ? [] : hunks +endfunction + +function! s:get_hunks_changes() abort + let hunks = changes#GetStats() + return hunks == [0, 0, 0] ? [] : hunks +endfunction + +function! s:get_hunks_gitsigns() abort + let hunks = get(b:, 'gitsigns_status_dict', {}) + return s:parse_hunk_status_dict(hunks) +endfunction + +function! s:get_hunks_coc() abort + let hunks = get(b:, 'coc_git_status', '') + return s:parse_hunk_status_decorated(hunks) +endfunction + +function! s:get_hunks_empty() abort + return '' +endfunction + +function! airline#extensions#hunks#get_raw_hunks() abort + if !exists('b:source_func') || get(b:, 'source_func', '') is# 's:get_hunks_empty' + if get(g:, 'loaded_signify') && sy#buffer_is_active() + let b:source_func = 's:get_hunks_signify' + elseif exists('*GitGutterGetHunkSummary') && get(g:, 'gitgutter_enabled') + let b:source_func = 's:get_hunks_gitgutter' + elseif exists('*changes#GetStats') + let b:source_func = 's:get_hunks_changes' + elseif exists('*quickfixsigns#vcsdiff#GetHunkSummary') + let b:source_func = 'quickfixsigns#vcsdiff#GetHunkSummary' + elseif exists(':Gitsigns') + let b:source_func = 's:get_hunks_gitsigns' + elseif s:coc_git_enabled() + let b:source_func = 's:get_hunks_coc' + else + let b:source_func = 's:get_hunks_empty' + endif + endif + return {b:source_func}() +endfunction + +function! airline#extensions#hunks#get_hunks() abort + if !get(w:, 'airline_active', 0) + return '' + endif + " Cache values, so that it isn't called too often + if exists("b:airline_hunks") && + \ get(b:, 'airline_changenr', 0) == b:changedtick && + \ airline#util#winwidth() == get(s:, 'airline_winwidth', 0) && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_signify' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitgutter' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_empty' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_changes' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitsigns' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_coc' + return b:airline_hunks + endif + let hunks = airline#extensions#hunks#get_raw_hunks() + let string = '' + let winwidth = get(airline#parts#get('hunks'), 'minwidth', 100) + if !empty(hunks) + " hunks should contain [added, changed, deleted] + for i in [0, 1, 2] + if (s:non_zero_only == 0 && airline#util#winwidth() > winwidth) || hunks[i] > 0 + let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i]) + endif + endfor + endif + if index(airline#extensions#get_loaded_extensions(), 'branch') == -1 && string[-1:] == ' ' + " branch extension not loaded, skip trailing whitespace + let string = string[0:-2] + endif + + let b:airline_hunks = string + let b:airline_changenr = b:changedtick + let s:airline_winwidth = airline#util#winwidth() + return string +endfunction + +function! airline#extensions#hunks#init(ext) abort + call airline#parts#define_function('hunks', 'airline#extensions#hunks#get_hunks') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim new file mode 100644 index 0000000..c37584a --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim @@ -0,0 +1,31 @@ +" MIT License. Copyright (c) 2013-2021 Doron Behar, C.Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !has('keymap') + finish +endif + +function! airline#extensions#keymap#status() + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + let short_codes = get(g:, 'airline#extensions#keymap#short_codes', {}) + let label = get(g:, 'airline#extensions#keymap#label', g:airline_symbols.keymap) + let default = get(g:, 'airline#extensions#keymap#default', '') + if (label !=# '') + let label .= ' ' + endif + let keymap = &keymap + if has_key(short_codes, keymap) + let keymap = short_codes[keymap] + endif + return printf('%s', (!empty(keymap) && &iminsert ? (label . keymap) : + \ (!empty(default) ? label . default : default))) + else + return '' + endif +endfunction + +function! airline#extensions#keymap#init(ext) + call airline#parts#define_function('keymap', 'airline#extensions#keymap#status') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/languageclient.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/languageclient.vim new file mode 100644 index 0000000..c6c13f3 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/languageclient.vim @@ -0,0 +1,113 @@ +" MIT License. Copyright (c) 2013-2021 Bjorn Neergaard, hallettj et al. +" Plugin: https://github.com/autozimu/LanguageClient-neovim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:error_symbol = get(g:, 'airline#extensions#languageclient#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#languageclient#warning_symbol', 'W:') +let s:show_line_numbers = get(g:, 'airline#extensions#languageclient#show_line_numbers', 1) + +" Severity codes from the LSP spec +let s:severity_error = 1 +let s:severity_warning = 2 +let s:severity_info = 3 +let s:severity_hint = 4 + +" After each LanguageClient state change `s:diagnostics` will be populated with +" a map from file names to lists of errors, warnings, informational messages, +" and hints. +let s:diagnostics = {} + +function! s:languageclient_refresh() + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh!' + endif +endfunction + +function! s:record_diagnostics(state) + " The returned message might not have the 'result' key + if has_key(a:state, 'result') + let result = json_decode(a:state.result) + let s:diagnostics = result.diagnostics + endif + call s:languageclient_refresh() +endfunction + +function! s:get_diagnostics() + if !exists('#airline') + " airline disabled + return + endif + call LanguageClient#getState(function("s:record_diagnostics")) +endfunction + +function! s:diagnostics_for_buffer() + return get(s:diagnostics, expand('%:p'), []) +endfunction + +function! s:airline_languageclient_count(cnt, symbol) + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:airline_languageclient_get_line_number(type) abort + let linenumber_of_first_problem = 0 + for d in s:diagnostics_for_buffer() + if has_key(d, 'severity') && d.severity == a:type + let linenumber_of_first_problem = d.range.start.line + break + endif + endfor + + if linenumber_of_first_problem == 0 + return '' + endif + + let open_lnum_symbol = get(g:, 'airline#extensions#languageclient#open_lnum_symbol', '(L') + let close_lnum_symbol = get(g:, 'airline#extensions#languageclient#close_lnum_symbol', ')') + + return open_lnum_symbol . linenumber_of_first_problem . close_lnum_symbol +endfunction + +function! airline#extensions#languageclient#get(type) + if get(b:, 'LanguageClient_isServerRunning', 0) ==# 0 + return '' + endif + + let is_err = a:type == s:severity_error + let symbol = is_err ? s:error_symbol : s:warning_symbol + + let cnt = 0 + for d in s:diagnostics_for_buffer() + if has_key(d, 'severity') && d.severity == a:type + let cnt += 1 + endif + endfor + + if cnt == 0 + return '' + endif + + if s:show_line_numbers == 1 + return s:airline_languageclient_count(cnt, symbol) . airline_languageclient_get_line_number(a:type) + else + return s:airline_languageclient_count(cnt, symbol) + endif +endfunction + +function! airline#extensions#languageclient#get_warning() + return airline#extensions#languageclient#get(s:severity_warning) +endfunction + +function! airline#extensions#languageclient#get_error() + return airline#extensions#languageclient#get(s:severity_error) +endfunction + +function! airline#extensions#languageclient#init(ext) + call airline#parts#define_function('languageclient_error_count', 'airline#extensions#languageclient#get_error') + call airline#parts#define_function('languageclient_warning_count', 'airline#extensions#languageclient#get_warning') + augroup airline_languageclient + autocmd! + autocmd User LanguageClientDiagnosticsChanged call get_diagnostics() + augroup END +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/localsearch.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/localsearch.vim new file mode 100644 index 0000000..d20b7da --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/localsearch.vim @@ -0,0 +1,41 @@ +" MIT License. Copyright (c) 2018-2021 mox et al. +" Plugin: https://github.com/mox-mox/vim-localsearch +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:enabled = get(g:, 'airline#extensions#localsearch#enabled', 1) +if !get(g:, 'loaded_localsearch', 0) || !s:enabled || get(g:, 'airline#extensions#localsearch#loaded', 0) + finish +endif +let g:airline#extensions#localsearch#loaded = 001 + +let s:spc = g:airline_symbols.space + +let g:airline#extensions#localsearch#inverted = get(g:, 'airline#extensions#localsearch#inverted', 0) + +function! airline#extensions#localsearch#load_theme(palette) abort + call airline#highlighter#exec('localsearch_dark', [ '#ffffff' , '#000000' , 15 , 1 , '']) +endfunction + + +function! airline#extensions#localsearch#init(ext) abort + call a:ext.add_theme_func('airline#extensions#localsearch#load_theme') + call a:ext.add_statusline_func('airline#extensions#localsearch#apply') +endfunction + + +function! airline#extensions#localsearch#apply(...) abort + " first variable is the statusline builder + let builder = a:1 + + """"" WARNING: the API for the builder is not finalized and may change + if exists('#localsearch#WinEnter') && !g:airline#extensions#localsearch#inverted " If localsearch mode is enabled and 'invert' option is false + call builder.add_section('localsearch_dark', s:spc.airline#section#create('LS').s:spc) + endif + if !exists('#localsearch#WinEnter') && g:airline#extensions#localsearch#inverted " If localsearch mode is disabled and 'invert' option is true + call builder.add_section('localsearch_dark', s:spc.airline#section#create('GS').s:spc) + endif + return 0 +endfunction + diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/lsp.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/lsp.vim new file mode 100644 index 0000000..f275ddb --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/lsp.vim @@ -0,0 +1,111 @@ +" MIT License. Copyright (c) 2013-2021 François-Xavier Carton et al. +" Plugin: https://github.com/prabirshrestha/vim-lsp +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'lsp_loaded', 0) + finish +endif + +function! s:airline_lsp_count(cnt, symbol) abort + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:airline_lsp_get_line_number(cnt, type) abort + let result = '' + + if a:type ==# 'error' + let result = lsp#get_buffer_first_error_line() + endif + + if empty(result) + return '' + endif + + let open_lnum_symbol = + \ get(g:, 'airline#extensions#lsp#open_lnum_symbol', '(L') + let close_lnum_symbol = + \ get(g:, 'airline#extensions#lsp#close_lnum_symbol', ')') + + return open_lnum_symbol . result . close_lnum_symbol +endfunction + +function! airline#extensions#lsp#get(type) abort + if !exists(':LspDeclaration') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#lsp#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#lsp#warning_symbol', 'W:') + let show_line_numbers = get(g:, 'airline#extensions#lsp#show_line_numbers', 1) + + let is_err = a:type ==# 'error' + + let symbol = is_err ? error_symbol : warning_symbol + + let num = lsp#get_buffer_diagnostics_counts()[a:type] + + if show_line_numbers == 1 + return s:airline_lsp_count(num, symbol) . airline_lsp_get_line_number(num, a:type) + else + return s:airline_lsp_count(num, symbol) + endif +endfunction + +function! airline#extensions#lsp#get_warning() abort + return airline#extensions#lsp#get('warning') +endfunction + +function! airline#extensions#lsp#get_error() abort + return airline#extensions#lsp#get('error') +endfunction + +let s:lsp_progress = [] +function! airline#extensions#lsp#progress() abort + if get(w:, 'airline_active', 0) + if exists('*lsp#get_progress') + let s:lsp_progress = lsp#get_progress() + + if len(s:lsp_progress) == 0 | return '' | endif + + " show only most new progress + let s:lsp_progress = s:lsp_progress[0] + if s:lsp_progress['message'] !=# '' + let percent = '' + if has_key(s:lsp_progress, 'percentage') && s:lsp_progress['percentage'] >= 0 + let percent = ' ' . string(s:lsp_progress['percentage']) . '%' + endif + let s:title = s:lsp_progress['title'] + let message = airline#util#shorten(s:lsp_progress['message'] . percent, 91, 9) + return s:lsp_progress['server'] . ': ' . s:title . ' ' . message + endif + endif + endif + return '' +endfunction + +let s:timer = 0 +let s:ignore_time = 0 +function! airline#extensions#lsp#update() abort + if !exists('#airline') + " airline disabled + return + endif + if reltimefloat(reltime()) - s:ignore_time >= + \ get(g:, 'airline#extensions#lsp#progress_skip_time', 0.3) + \ || len(s:lsp_progress) == 0 + call airline#update_statusline() + let s:ignore_time = reltimefloat(reltime()) + endif +endfunction + +function! airline#extensions#lsp#init(ext) abort + call airline#parts#define_function('lsp_error_count', 'airline#extensions#lsp#get_error') + call airline#parts#define_function('lsp_warning_count', 'airline#extensions#lsp#get_warning') + call airline#parts#define_function('lsp_progress', 'airline#extensions#lsp#progress') + augroup airline_lsp_progress + autocmd! + autocmd User lsp_progress_updated call airline#extensions#lsp#update() + augroup END +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim new file mode 100644 index 0000000..cf9125f --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/neomake.vim @@ -0,0 +1,37 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/neomake/neomake +" vim: et ts=2 sts=2 sw=2 + +if !exists(':Neomake') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#neomake#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#neomake#warning_symbol', 'W:') + +function! s:get_counts() + let l:counts = neomake#statusline#LoclistCounts() + + if empty(l:counts) + return neomake#statusline#QflistCounts() + else + return l:counts + endif +endfunction + +function! airline#extensions#neomake#get_warnings() + let counts = s:get_counts() + let warnings = get(counts, 'W', 0) + return warnings ? s:warning_symbol.warnings : '' +endfunction + +function! airline#extensions#neomake#get_errors() + let counts = s:get_counts() + let errors = get(counts, 'E', 0) + return errors ? s:error_symbol.errors : '' +endfunction + +function! airline#extensions#neomake#init(ext) + call airline#parts#define_function('neomake_warning_count', 'airline#extensions#neomake#get_warnings') + call airline#parts#define_function('neomake_error_count', 'airline#extensions#neomake#get_errors') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim new file mode 100644 index 0000000..830cb88 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim @@ -0,0 +1,35 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: http://www.drchip.org/astronaut/vim/#NETRW +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':NetrwSettings') + finish +endif + +function! airline#extensions#netrw#apply(...) + if &ft == 'netrw' + let spc = g:airline_symbols.space + + call a:1.add_section('airline_a', spc.'netrw'.spc) + if exists('*airline#extensions#branch#get_head') + call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) + endif + call a:1.add_section('airline_c', spc.'%f'.spc) + call a:1.split() + call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) + return 1 + endif +endfunction + +function! airline#extensions#netrw#init(ext) + let g:netrw_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#netrw#apply') +endfunction + + +function! airline#extensions#netrw#sortstring() + let order = (get(g:, 'netrw_sort_direction', 'n') =~ 'n') ? '+' : '-' + return get(g:, 'netrw_sort_by', '') . (g:airline_symbols.space) . '[' . order . ']' +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim new file mode 100644 index 0000000..45d1a6e --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/nrrwrgn.vim @@ -0,0 +1,58 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" Plugin: https://github.com/chrisbra/NrrwRgn +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_nrrw_rgn', 0) + finish +endif + +function! airline#extensions#nrrwrgn#apply(...) + if exists(":WidenRegion") == 2 + let spc = g:airline_symbols.space + if !exists("*nrrwrgn#NrrwRgnStatus()") || empty(nrrwrgn#NrrwRgnStatus()) + call a:1.add_section('airline_a', printf('%s[Narrowed%s#%d]', spc, spc, b:nrrw_instn)) + let bufname=(get(b:, 'orig_buf', 0) ? bufname(b:orig_buf) : substitute(bufname('%'), '^Nrrwrgn_\zs.*\ze_\d\+$', submatch(0), '')) + call a:1.add_section('airline_c', spc.bufname.spc) + call a:1.split() + else + let dict=nrrwrgn#NrrwRgnStatus() + let vmode = { 'v': 'Char ', 'V': 'Line ', '': 'Block '} + let mode = dict.visual ? vmode[dict.visual] : vmode['V'] + let winwidth = airline#util#winwidth() + if winwidth < 80 + let mode = mode[0] + endif + let title = (winwidth < 80 ? "Nrrw" : "Narrowed ") + let multi = (winwidth < 80 ? 'M' : 'Multi') + call a:1.add_section('airline_a', printf('[%s%s%s#%d]%s', (dict.multi ? multi : ""), + \ title, mode, b:nrrw_instn, spc)) + let name = dict.fullname + if name !=# '[No Name]' + if winwidth > 100 + " need some space + let name = fnamemodify(dict.fullname, ':~') + if strlen(name) > 8 + " shorten name + let name = substitute(name, '\(.\)[^/\\]*\([/\\]\)', '\1\2', 'g') + endif + else + let name = fnamemodify(dict.fullname, ':t') + endif + endif + let range=(dict.multi ? '' : printf("[%d-%d]", dict.start[1], dict.end[1])) + call a:1.add_section('airline_c', printf("%s %s %s", name, range, + \ dict.enabled ? (&encoding ==? 'utf-8' ? "\u2713" : '') : '!')) + call a:1.split() + call a:1.add_section('airline_x', get(g:, 'airline_section_x').spc) + call a:1.add_section('airline_y', spc.get(g:, 'airline_section_y').spc) + call a:1.add_section('airline_z', spc.get(g:, 'airline_section_z')) + endif + return 1 + endif +endfunction + +function! airline#extensions#nrrwrgn#init(ext) + call a:ext.add_statusline_func('airline#extensions#nrrwrgn#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/nvimlsp.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/nvimlsp.vim new file mode 100644 index 0000000..0a63e6f --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/nvimlsp.vim @@ -0,0 +1,69 @@ +" Apache 2.0 license. Copyright (c) 2019-2021 Copyright Neovim contributors. +" Plugin: https://github.com/neovim/nvim-lsp +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !(get(g:, 'airline#extensions#nvimlsp#enabled', 1) + \ && has('nvim') + \ && luaeval('vim.lsp ~= nil')) + finish +endif + +function! s:airline_nvimlsp_count(cnt, symbol) abort + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! airline#extensions#nvimlsp#get(type) abort + if luaeval('vim.tbl_isempty(vim.lsp.buf_get_clients(0))') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#nvimlsp#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#nvimlsp#warning_symbol', 'W:') + let show_line_numbers = get(g:, 'airline#extensions#nvimlsp#show_line_numbers', 1) + + let is_err = a:type ==# 'Error' + + let symbol = is_err ? error_symbol : warning_symbol + + if luaeval("pcall(require, 'vim.diagnostic')") + let severity = a:type == 'Warning' ? 'Warn' : a:type + let num = len(v:lua.vim.diagnostic.get(0, { 'severity': severity })) + elseif luaeval("pcall(require, 'vim.lsp.diagnostic')") + let num = v:lua.vim.lsp.diagnostic.get_count(0, a:type) + else + let num = v:lua.vim.lsp.util.buf_diagnostics_count(a:type) + endif + + if show_line_numbers == 1 && luaeval("pcall(require, 'vim.diagnostic')") && num > 0 + return s:airline_nvimlsp_count(num, symbol) . airline_nvimlsp_get_line_number(num, a:type) + else + return s:airline_nvimlsp_count(num, symbol) + endif +endfunction + +function! s:airline_nvimlsp_get_line_number(cnt, type) abort + let severity = a:type == 'Warning' ? 'Warn' : a:type + let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum + + let l:open_lnum_symbol = + \ get(g:, 'airline#extensions#nvimlsp#open_lnum_symbol', '(L') + let l:close_lnum_symbol = + \ get(g:, 'airline#extensions#nvimlsp#close_lnum_symbol', ')') + + return open_lnum_symbol . num . close_lnum_symbol +endfunction + +function! airline#extensions#nvimlsp#get_warning() abort + return airline#extensions#nvimlsp#get('Warning') +endfunction + +function! airline#extensions#nvimlsp#get_error() abort + return airline#extensions#nvimlsp#get('Error') +endfunction + +function! airline#extensions#nvimlsp#init(ext) abort + call airline#parts#define_function('nvimlsp_error_count', 'airline#extensions#nvimlsp#get_error') + call airline#parts#define_function('nvimlsp_warning_count', 'airline#extensions#nvimlsp#get_warning') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim new file mode 100644 index 0000000..9b22952 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/obsession.vim @@ -0,0 +1,23 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/tpope/vim-obsession +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*ObsessionStatus') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#obsession#indicator_text') + let g:airline#extensions#obsession#indicator_text = '$' +endif + +function! airline#extensions#obsession#init(ext) + call airline#parts#define_function('obsession', 'airline#extensions#obsession#get_status') +endfunction + +function! airline#extensions#obsession#get_status() + return ObsessionStatus((g:airline#extensions#obsession#indicator_text . s:spc), '') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/omnisharp.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/omnisharp.vim new file mode 100644 index 0000000..92a4acb --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/omnisharp.vim @@ -0,0 +1,45 @@ +" MIT License +" Plugin: https://github.com/OmniSharp/omnisharp-vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'OmniSharp_loaded', 0) + finish +endif + +function! airline#extensions#omnisharp#server_status(...) abort + if !exists(':OmniSharpGotoDefinition') || !get(g:, 'OmniSharp_server_stdio', 0) + return '' + endif + + let host = OmniSharp#GetHost(bufnr('%')) + if type(host.job) != v:t_dict || get(host.job, 'stopped') + return '' + endif + + let sln = fnamemodify(host.sln_or_dir, ':t') + + if get(host.job, 'loaded', 0) + return sln + endif + + try + let projectsloaded = OmniSharp#project#CountLoaded() + let projectstotal = OmniSharp#project#CountTotal() + catch + " The CountLoaded and CountTotal functions are very new - catch the error + " when they don't exist + let projectsloaded = 0 + let projectstotal = 0 + endtry + return printf('%s(%d/%d)', sln, projectsloaded, projectstotal) +endfunction + +function! airline#extensions#omnisharp#init(ext) abort + call airline#parts#define_function('omnisharp', 'airline#extensions#omnisharp#server_status') + augroup airline_omnisharp + autocmd! + autocmd User OmniSharpStarted,OmniSharpReady,OmniSharpStopped AirlineRefresh! + augroup END +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/po.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/po.vim new file mode 100644 index 0000000..4fc18d8 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/po.vim @@ -0,0 +1,105 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#po#shorten() + " Format and shorte the output of msgfmt + let b:airline_po_stats = substitute(get(b:, 'airline_po_stats', ''), ' \(message\|translation\)s*\.*', '', 'g') + let b:airline_po_stats = substitute(b:airline_po_stats, ', ', '/', 'g') + if exists("g:airline#extensions#po#displayed_limit") + let w:displayed_po_limit = g:airline#extensions#po#displayed_limit + if len(b:airline_po_stats) > w:displayed_po_limit - 1 + let b:airline_po_stats = b:airline_po_stats[0:(w:displayed_po_limit - 2)].(&encoding==?'utf-8' ? '…' : '.') + endif + endif + if strlen(get(b:, 'airline_po_stats', '')) >= 30 && airline#util#winwidth() < 150 + let fuzzy = '' + let untranslated = '' + let messages = '' + " Shorten [120 translated, 50 fuzzy, 4 untranslated] to [120T/50F/4U] + if b:airline_po_stats =~ 'fuzzy' + let fuzzy = substitute(b:airline_po_stats, '.\{-}\(\d\+\) fuzzy.*', '\1F', '') + if fuzzy == '0F' + let fuzzy = '' + endif + endif + if b:airline_po_stats =~ 'untranslated' + let untranslated = substitute(b:airline_po_stats, '.\{-}\(\d\+\) untranslated.*', '\1U', '') + if untranslated == '0U' + let untranslated = '' + endif + endif + let messages = substitute(b:airline_po_stats, '\(\d\+\) translated.*', '\1T', '') + if messages ==# '0T' + let messages = '' + endif + let b:airline_po_stats = printf('%s%s%s', fuzzy, (empty(fuzzy) || empty(untranslated) ? '' : '/'), untranslated) + if strlen(b:airline_po_stats) < 10 + let b:airline_po_stats = messages. (!empty(b:airline_po_stats) && !empty(messages) ? '/':''). b:airline_po_stats + endif + endif + let b:airline_po_stats = '['.b:airline_po_stats. '] ' +endfunction + +function! airline#extensions#po#on_winenter() + if !exists('#airline') + " airline disabled + return + endif + " only reset cache, if the window size changed + if get(b:, 'airline_winwidth', 0) != airline#util#winwidth() + let b:airline_winwidth = airline#util#winwidth() + " needs re-formatting + unlet! b:airline_po_stats + endif +endfunction + +function! s:autocmd_handler() + if exists('#airline') + unlet! b:airline_po_stats + endif +endfunction + +function! airline#extensions#po#apply(...) + if &ft ==# 'po' + call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}') + " Also reset the cache variable, if a window has been split, e.g. the winwidth changed + autocmd airline BufWritePost * call s:autocmd_handler() + autocmd airline WinEnter * call airline#extensions#po#on_winenter() + endif +endfunction + +function! airline#extensions#po#stats() + if exists('b:airline_po_stats') && !empty(b:airline_po_stats) + return b:airline_po_stats + endif + + " Write stdout to null because we only want to see warnings. + if g:airline#init#is_windows + let cmd = 'msgfmt --statistics -o /NUL ' + else + let cmd = 'msgfmt --statistics -o /dev/null -- ' + endif + if g:airline#init#vim_async + call airline#async#get_msgfmt_stat(cmd, expand('%:p')) + elseif has("nvim") + call airline#async#nvim_get_msgfmt_stat(cmd, expand('%:p')) + else + let airline_po_stats = system(cmd. shellescape(expand('%:p'))) + if v:shell_error + return '' + endif + try + let b:airline_po_stats = split(airline_po_stats, '\n')[0] + catch + let b:airline_po_stats = '' + endtry + call airline#extensions#po#shorten() + endif + return get(b:, 'airline_po_stats', '') +endfunction + +function! airline#extensions#po#init(ext) + call a:ext.add_statusline_func('airline#extensions#po#apply') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/poetv.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/poetv.vim new file mode 100644 index 0000000..3e7c77f --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/poetv.vim @@ -0,0 +1,32 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/petobens/poet_v +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +function! airline#extensions#poetv#init(ext) + call a:ext.add_statusline_func('airline#extensions#poetv#apply') +endfunction + +function! airline#extensions#poetv#apply(...) + if &filetype =~# 'python' + if get(g:, 'poetv_loaded', 0) + let statusline = poetv#statusline() + else + let statusline = fnamemodify($VIRTUAL_ENV, ':t') + endif + if !empty(statusline) + call airline#extensions#append_to_section('x', + \ s:spc.g:airline_right_alt_sep.s:spc.statusline) + endif + endif +endfunction + +function! airline#extensions#poetv#update() + if &filetype =~# 'python' + call airline#extensions#poetv#apply() + call airline#update_statusline() + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim new file mode 100644 index 0000000..547bdd1 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/promptline.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/edkolev/promptline.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':PromptlineSnapshot') + finish +endif + +if !exists('airline#extensions#promptline#snapshot_file') || !len('airline#extensions#promptline#snapshot_file') + finish +endif + +let s:prompt_snapshot_file = get(g:, 'airline#extensions#promptline#snapshot_file', '') +let s:color_template = get(g:, 'airline#extensions#promptline#color_template', 'normal') + +function! airline#extensions#promptline#init(ext) + call a:ext.add_theme_func('airline#extensions#promptline#set_prompt_colors') +endfunction + +function! airline#extensions#promptline#set_prompt_colors(palette) + let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' + let mode_palette = a:palette[color_template] + + if !has_key(g:, 'promptline_symbols') + let g:promptline_symbols = { + \ 'left' : g:airline_left_sep, + \ 'right' : g:airline_right_sep, + \ 'left_alt' : g:airline_left_alt_sep, + \ 'right_alt' : g:airline_right_alt_sep} + endif + + let promptline_theme = promptline#api#create_theme_from_airline(mode_palette) + call promptline#api#create_snapshot_with_theme(s:prompt_snapshot_file, promptline_theme) +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim new file mode 100644 index 0000000..5f62042 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim @@ -0,0 +1,58 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:airline#extensions#quickfix#quickfix_text') + let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' +endif + +if !exists('g:airline#extensions#quickfix#location_text') + let g:airline#extensions#quickfix#location_text = 'Location' +endif + +function! airline#extensions#quickfix#apply(...) + if &buftype == 'quickfix' + let w:airline_section_a = airline#extensions#quickfix#get_type() + let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' + let w:airline_section_c = '' + let w:airline_section_x = '' + endif +endfunction + +function! airline#extensions#quickfix#init(ext) + call a:ext.add_statusline_func('airline#extensions#quickfix#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#quickfix#inactive_qf_window') +endfunction + +function! airline#extensions#quickfix#inactive_qf_window(...) + if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) + call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') + endif +endfunction + +function! airline#extensions#quickfix#get_type() + if exists("*win_getid") && exists("*getwininfo") + let dict = getwininfo(win_getid()) + if len(dict) > 0 && get(dict[0], 'quickfix', 0) && !get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#quickfix_text + elseif len(dict) > 0 && get(dict[0], 'quickfix', 0) && get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#location_text + endif + endif + redir => buffers + silent ls + redir END + + let nr = bufnr('%') + for buf in split(buffers, '\n') + if match(buf, '\v^\s*'.nr) > -1 + if match(buf, '\cQuickfix') > -1 + return g:airline#extensions#quickfix#quickfix_text + else + return g:airline#extensions#quickfix#location_text + endif + endif + endfor + return '' +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/rufo.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/rufo.vim new file mode 100644 index 0000000..ffd8b12 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/rufo.vim @@ -0,0 +1,38 @@ +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:rufo_loaded') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#rufo#symbol') + let g:airline#extensions#rufo#symbol = 'RuFo' +endif + +function! airline#extensions#rufo#init(ext) + call airline#parts#define_raw('rufo', '%{airline#extensions#rufo#get_status}') + call a:ext.add_statusline_func('airline#extensions#rufo#apply') +endfunction + +function! airline#extensions#rufo#get_status() + let out = '' + if &ft == "ruby" && g:rufo_auto_formatting == 1 + let out .= s:spc.g:airline_left_alt_sep.s:spc.g:airline#extensions#rufo#symbol + endif + return out +endfunction + +" This function will be invoked just prior to the statusline getting modified. +function! airline#extensions#rufo#apply(...) + " First we check for the filetype. + if &filetype == "ruby" + " section_z. + let w:airline_section_z = get(w:, 'airline_section_z', g:airline_section_z) + + " Then we just append this extension to it, optionally using separators. + let w:airline_section_z .= '%{airline#extensions#rufo#get_status()}' + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/scrollbar.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/scrollbar.vim new file mode 100644 index 0000000..3d25a0c --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/scrollbar.vim @@ -0,0 +1,37 @@ +" MIT License. Copyright (c) 2013-2021 +" vim: et ts=2 sts=2 sw=2 et + +scriptencoding utf-8 + +function! airline#extensions#scrollbar#calculate() abort + if winwidth(0) > get(g:, 'airline#extensions#scrollbar#minwidth', 200) + \ && get(w:, 'airline_active', 0) + let overwrite = 0 + if &encoding ==? 'utf-8' && !get(g:, 'airline_symbols_ascii', 0) + let [left, right, middle] = [ '|', '|', 'â–ˆ'] + let overwrite = 1 + else + let [left, right, middle] = [ '[', ']', '-'] + endif + let spc = get(g:, 'airline_symbols.space', ' ') + let width = 20 " max width, plus one border and indicator + let perc = (line('.') + 0.0) / (line('$') + 0.0) + let before = float2nr(round(perc * width)) + if before >= 0 && line('.') == 1 + let before = 0 + let left = (overwrite ? '' : left) + endif + let after = width - before + if (after <= 1 && line('.') == line('$')) + let after = 0 + let right = (overwrite ? '' : right) + endif + return left . repeat(spc, before) . middle . repeat(spc, after) . right + else + return '' + endif +endfunction + +function! airline#extensions#scrollbar#init(ext) abort + call airline#parts#define_function('scrollbar', 'airline#extensions#scrollbar#calculate') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/searchcount.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/searchcount.vim new file mode 100644 index 0000000..4fc5b2a --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/searchcount.vim @@ -0,0 +1,56 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" This extension is inspired by vim-anzu . +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*searchcount') + finish +endif + +function! airline#extensions#searchcount#init(ext) abort + call a:ext.add_statusline_func('airline#extensions#searchcount#apply') +endfunction + +function! airline#extensions#searchcount#apply(...) abort + call airline#extensions#append_to_section('y', + \ '%{v:hlsearch ? airline#extensions#searchcount#status() : ""}') +endfunction + +function! s:search_term() + let show_search_term = get(g:, 'airline#extensions#searchcount#show_search_term', 1) + let search_term_limit = get(g:, 'airline#extensions#searchcount#search_term_limit', 8) + + if show_search_term == 0 + return '' + endif + " shorten for all width smaller than 300 (this is just a guess) + " this uses a non-breaking space, because it looks like + " a leading space is stripped :/ + return "\ua0" . '/' . airline#util#shorten(getreg('/'), 300, search_term_limit) +endfunction + +function! airline#extensions#searchcount#status() abort + try + let result = searchcount(#{recompute: 1, maxcount: -1}) + if empty(result) || result.total ==# 0 + return '' + endif + if result.incomplete ==# 1 " timed out + return printf('%s[?/??]', s:search_term()) + elseif result.incomplete ==# 2 " max count exceeded + if result.total > result.maxcount && + \ result.current > result.maxcount + return printf('%s[>%d/>%d]', s:search_term(), + \ result.current, result.total) + elseif result.total > result.maxcount + return printf('%s[%d/>%d]', s:search_term(), + \ result.current, result.total) + endif + endif + return printf('%s[%d/%d]', s:search_term(), + \ result.current, result.total) + catch + return '' + endtry +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim new file mode 100644 index 0000000..831e07e --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/syntastic.vim @@ -0,0 +1,44 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/vim-syntastic/syntastic +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':SyntasticCheck') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#syntastic#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#syntastic#warning_symbol', 'W:') + +function! airline#extensions#syntastic#get_warning() + return airline#extensions#syntastic#get('warning') +endfunction + +function! airline#extensions#syntastic#get_error() + return airline#extensions#syntastic#get('error') +endfunction + +function! airline#extensions#syntastic#get(type) + let _backup = get(g:, 'syntastic_stl_format', '') + let is_err = (a:type is# 'error') + if is_err + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_err', '%E{[%fe(#%e)]}') + else + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_warn', '%W{[%fw(#%w)]}') + endif + let cnt = SyntasticStatuslineFlag() + if !empty(_backup) + let g:syntastic_stl_format = _backup + endif + if empty(cnt) + return '' + else + return (is_err ? s:error_symbol : s:warning_symbol).cnt + endif +endfunction + +function! airline#extensions#syntastic#init(ext) + call airline#parts#define_function('syntastic-warn', 'airline#extensions#syntastic#get_warning') + call airline#parts#define_function('syntastic-err', 'airline#extensions#syntastic#get_error') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim new file mode 100644 index 0000000..8450161 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim @@ -0,0 +1,483 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 et + +scriptencoding utf-8 + +let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0) +if s:taboo + let g:taboo_tabline = 0 +endif + +let s:ctrlspace = get(g:, 'CtrlSpaceLoaded', 0) +let s:tabws = get(g:, 'tabws_loaded', 0) +let s:current_tabcnt = -1 + +" Dictionary functions are not possible in Vim9 Script, +" so use the legacy Vim Script implementation + +function! airline#extensions#tabline#init(ext) + if has('gui_running') && match(&guioptions, 'e') > -1 + set guioptions-=e + endif + + autocmd User AirlineToggledOn call s:toggle_on() + autocmd User AirlineToggledOff call s:toggle_off() + + call s:toggle_on() + call a:ext.add_theme_func('airline#extensions#tabline#load_theme') +endfunction + +function! airline#extensions#tabline#add_label(dict, type, right) + if get(g:, 'airline#extensions#tabline#show_tab_type', 1) + call a:dict.add_section_spaced('airline_tablabel'. (a:right ? '_right' : ''), + \ get(g:, 'airline#extensions#tabline#'.a:type.'_label', a:type)) + endif +endfunction + +function! airline#extensions#tabline#add_tab_label(dict) + let show_tab_count = get(g:, 'airline#extensions#tabline#show_tab_count', 1) + if show_tab_count == 2 + call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) + elseif show_tab_count == 1 && tabpagenr('$') > 1 + call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) + endif +endfunction + + +if !exists(":def") || !airline#util#has_vim9_script() + + " Legacy Vim Script Implementation + + function! s:toggle_off() + call airline#extensions#tabline#autoshow#off() + call airline#extensions#tabline#tabs#off() + call airline#extensions#tabline#buffers#off() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#off() + endif + if s:tabws + call airline#extensions#tabline#tabws#off() + endif + endfunction + + function! s:toggle_on() + if get(g:, 'airline_statusline_ontop', 0) + call airline#extensions#tabline#enable() + let &tabline='%!airline#statusline('.winnr().')' + return + endif + call airline#extensions#tabline#autoshow#on() + call airline#extensions#tabline#tabs#on() + call airline#extensions#tabline#buffers#on() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#on() + endif + if s:tabws + call airline#extensions#tabline#tabws#on() + endif + + set tabline=%!airline#extensions#tabline#get() + endfunction + + function! airline#extensions#tabline#load_theme(palette) + if pumvisible() + return + endif + let colors = get(a:palette, 'tabline', {}) + let tablabel = get(colors, 'airline_tablabel', a:palette.normal.airline_b) + " Theme for tabs on the left + let tab = get(colors, 'airline_tab', a:palette.inactive.airline_c) + let tabsel = get(colors, 'airline_tabsel', a:palette.normal.airline_a) + let tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) + let tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) + let tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) + let tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) + if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') + let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c) + let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal_modified.airline_c) + else + "Fall back to normal airline_c if modified airline_c isn't present + let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c) + let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c) + endif + call airline#highlighter#exec('airline_tablabel', tablabel) + call airline#highlighter#exec('airline_tab', tab) + call airline#highlighter#exec('airline_tabsel', tabsel) + call airline#highlighter#exec('airline_tabtype', tabtype) + call airline#highlighter#exec('airline_tabfill', tabfill) + call airline#highlighter#exec('airline_tabmod', tabmod) + call airline#highlighter#exec('airline_tabmod_unsel', tabmodu) + call airline#highlighter#exec('airline_tabhid', tabhid) + + " Theme for tabs on the right + " label on the right + let tablabel_r = get(colors, 'airline_tablabel', a:palette.normal.airline_b) + let tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a) + let tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c) + let tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a) + let tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c) + call airline#highlighter#exec('airline_tablabel_right', tablabel_r) + call airline#highlighter#exec('airline_tab_right', tab_right) + call airline#highlighter#exec('airline_tabsel_right', tabsel_right) + call airline#highlighter#exec('airline_tabmod_right', tabmod_right) + call airline#highlighter#exec('airline_tabhid_right', tabhid_right) + call airline#highlighter#exec('airline_tabmod_unsel_right', tabmodu_right) + endfunction + + function! s:update_tabline(forceit) + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif + " loading a session file + " On SessionLoadPost, g:SessionLoad variable is still set :/ + if !a:forceit && get(g:, 'SessionLoad', 0) + return + endif + let match = expand('') + if pumvisible() + return + elseif !get(g:, 'airline#extensions#tabline#enabled', 0) + return + " return, if buffer matches ignore pattern or is directory (netrw) + elseif empty(match) || airline#util#ignore_buf(match) || isdirectory(match) + return + endif + call airline#util#doautocmd('BufMRUChange') + call airline#extensions#tabline#redraw() + endfunction + + function! airline#extensions#tabline#redraw() + " sometimes, the tabline is not correctly updated see #1580 + " so force redraw here + if exists(":redrawtabline") == 2 + redrawtabline + else + " Have to set a property equal to itself to get airline to re-eval. + " Setting `let &tabline=&tabline` destroys the cursor position so we + " need something less invasive. + let &ro = &ro + endif + endfunction + + function! airline#extensions#tabline#enable() + if &lines > 3 + set showtabline=2 + endif + endfunction + + + function! airline#extensions#tabline#get() + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let curtabcnt = tabpagenr('$') + if curtabcnt != s:current_tabcnt + let s:current_tabcnt = curtabcnt + call airline#extensions#tabline#tabs#invalidate() + call airline#extensions#tabline#buffers#invalidate() + call airline#extensions#tabline#ctrlspace#invalidate() + call airline#extensions#tabline#tabws#invalidate() + endif + + if !exists('#airline#BufAdd#*') + autocmd airline BufAdd * call update_tabline(0) + endif + if !exists('#airline#SessionLoadPost') + autocmd airline SessionLoadPost * call update_tabline(1) + endif + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:tabws + return airline#extensions#tabline#tabws#get() + elseif show_buffers && curtabcnt == 1 || !show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif + endfunction + + function! airline#extensions#tabline#title(n) + let title = '' + if s:taboo + let title = TabooTabTitle(a:n) + endif + + if empty(title) && exists('*gettabvar') + let title = gettabvar(a:n, 'title') + endif + + let formatter = get(g:, 'airline#extensions#tabline#tabtitle_formatter') + if empty(title) && formatter !=# '' && exists("*".formatter) + let title = call(formatter, [a:n]) + endif + + if empty(title) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let all_buffers = airline#extensions#tabline#buflist#list() + let curbuf = filter(buflist, 'index(all_buffers, v:val) != -1') + if len(curbuf) == 0 + call add(curbuf, tabpagebuflist(a:n)[0]) + endif + " a:n: -> buffer number + " curbuf: list of buffers in current tabpage + " we need the buffername in current tab page. + return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf) + endif + + return title + endfunction + + function! airline#extensions#tabline#get_buffer_name(nr, ...) + let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() + let formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') + return airline#extensions#tabline#formatters#{formatter}#format(a:nr, buffers) + endfunction + + function! airline#extensions#tabline#new_builder() + let builder_context = { + \ 'active' : 1, + \ 'tabline' : 1, + \ 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), + \ 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), + \ } + if get(g:, 'airline_powerline_fonts', 0) + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) + else + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') + endif + + return airline#extensions#tabline#builder#new(builder_context) + endfunction + + function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr) + let cur = bufnr('%') + if cur == a:bufnr + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod' + else + let group = 'airline_tabsel' + endif + else + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod_unsel' + elseif index(a:tab_bufs, a:bufnr) > -1 + let group = 'airline_tab' + else + let group = 'airline_tabhid' + endif + endif + return group + endfunction + finish +else + def s:toggle_off(): void + airline#extensions#tabline#autoshow#off() + airline#extensions#tabline#tabs#off() + airline#extensions#tabline#buffers#off() + if s:ctrlspace + airline#extensions#tabline#ctrlspace#off() + endif + if s:tabws + airline#extensions#tabline#tabws#off() + endif + enddef + + def s:toggle_on(): void + if get(g:, 'airline_statusline_ontop', 0) + airline#extensions#tabline#enable() + &tabline = '%!airline#statusline(' .. winnr() .. ')' + return + endif + airline#extensions#tabline#autoshow#on() + airline#extensions#tabline#tabs#on() + airline#extensions#tabline#buffers#on() + if s:ctrlspace + airline#extensions#tabline#ctrlspace#on() + endif + if s:tabws + airline#extensions#tabline#tabws#on() + endif + &tabline = '%!airline#extensions#tabline#get()' + enddef + + def airline#extensions#tabline#load_theme(palette: dict): number + # Needs to return a number, because it is implicitly used as extern_funcref + # And funcrefs should return a value (see airline#util#exec_funcrefs()) + if pumvisible() + return 0 + endif + var colors = get(palette, 'tabline', {}) + var tablabel = get(colors, 'airline_tablabel', palette.normal.airline_b) + # Theme for tabs on the left + var tab = get(colors, 'airline_tab', palette.inactive.airline_c) + var tabsel = get(colors, 'airline_tabsel', palette.normal.airline_a) + var tabtype = get(colors, 'airline_tabtype', palette.visual.airline_a) + var tabfill = get(colors, 'airline_tabfill', palette.normal.airline_c) + var tabmod = get(colors, 'airline_tabmod', palette.insert.airline_a) + var tabhid = get(colors, 'airline_tabhid', palette.normal.airline_c) + var tabmodu = tabhid + var tabmodu_right = tabhid + if has_key(palette, 'normal_modified') && has_key(palette.normal_modified, 'airline_c') + tabmodu = get(colors, 'airline_tabmod_unsel', palette.normal_modified.airline_c) + tabmodu_right = get(colors, 'airline_tabmod_unsel_right', palette.normal_modified.airline_c) + else + # Fall back to normal airline_c if modified airline_c isn't present + tabmodu = get(colors, 'airline_tabmod_unsel', palette.normal.airline_c) + tabmodu_right = get(colors, 'airline_tabmod_unsel_right', palette.normal.airline_c) + endif + airline#highlighter#exec('airline_tablabel', tablabel) + airline#highlighter#exec('airline_tab', tab) + airline#highlighter#exec('airline_tabsel', tabsel) + airline#highlighter#exec('airline_tabtype', tabtype) + airline#highlighter#exec('airline_tabfill', tabfill) + airline#highlighter#exec('airline_tabmod', tabmod) + airline#highlighter#exec('airline_tabmod_unsel', tabmodu) + airline#highlighter#exec('airline_tabmod_unsel_right', tabmodu_right) + airline#highlighter#exec('airline_tabhid', tabhid) + # Theme for tabs on the right + var tablabel_r = get(colors, 'airline_tablabel', palette.normal.airline_b) + var tabsel_right = get(colors, 'airline_tabsel_right', palette.normal.airline_a) + var tab_right = get(colors, 'airline_tab_right', palette.inactive.airline_c) + var tabmod_right = get(colors, 'airline_tabmod_right', palette.insert.airline_a) + var tabhid_right = get(colors, 'airline_tabhid_right', palette.normal.airline_c) + airline#highlighter#exec('airline_tablabel_right', tablabel_r) + airline#highlighter#exec('airline_tab_right', tab_right) + airline#highlighter#exec('airline_tabsel_right', tabsel_right) + airline#highlighter#exec('airline_tabmod_right', tabmod_right) + airline#highlighter#exec('airline_tabhid_right', tabhid_right) + return 0 + enddef + + def s:update_tabline(forceit: number): void + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif + # loading a session file + # On SessionLoadPost, g:SessionLoad variable is still set :/ + if !forceit && get(g:, 'SessionLoad', 0) + return + endif + var match = expand('') + if pumvisible() + return + elseif !get(g:, 'airline#extensions#tabline#enabled', 0) + return + # return, if buffer matches ignore pattern or is directory (netrw) + elseif empty(match) || airline#util#ignore_buf(match) || isdirectory(match) + return + endif + airline#util#doautocmd('BufMRUChange') + airline#extensions#tabline#redraw() + enddef + + def airline#extensions#tabline#redraw(): void + # redrawtabline should always be available + :redrawtabline + enddef + + def airline#extensions#tabline#enable(): void + if &lines > 3 + &showtabline = 2 + endif + enddef + + def airline#extensions#tabline#get(): string + var show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + var show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + var curtabcnt = tabpagenr('$') + if curtabcnt != s:current_tabcnt + s:current_tabcnt = curtabcnt + airline#extensions#tabline#tabs#invalidate() + airline#extensions#tabline#buffers#invalidate() + airline#extensions#tabline#ctrlspace#invalidate() + airline#extensions#tabline#tabws#invalidate() + endif + + if !exists('#airline#BufAdd#*') + autocmd airline BufAdd * call update_tabline(0) + endif + if !exists('#airline#SessionLoadPost') + autocmd airline SessionLoadPost * call update_tabline(1) + endif + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:tabws + return airline#extensions#tabline#tabws#get() + elseif show_buffers && curtabcnt == 1 || !show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif + enddef + + def airline#extensions#tabline#title(n: number): string + var title = '' + if get(g:, 'airline#extensions#taboo#enabled', 1) && + get(g:, 'loaded_taboo', 0) && exists("*TabooTabTitle") + title = call("TabooTabTitle", [n]) + endif + + if empty(title) + title = gettabvar(n, 'title') + endif + + var formatter = get(g:, 'airline#extensions#tabline#tabtitle_formatter', '') + if empty(title) && !empty(formatter) && exists("*" .. formatter) + title = call(formatter, [n]) + endif + + if empty(title) + var buflist = tabpagebuflist(n) + var winnr = tabpagewinnr(n) + var all_buffers = airline#extensions#tabline#buflist#list() + var curbuf = filter(buflist, (_, v) => index(all_buffers, v) != -1) + if len(curbuf) == 0 + add(curbuf, tabpagebuflist(n)[0]) + endif + return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf) + endif + return title + enddef + + def airline#extensions#tabline#get_buffer_name(nr: number, buffers = airline#extensions#tabline#buflist#list()): string + var Formatter = 'airline#extensions#tabline#formatters#' .. get(g:, 'airline#extensions#tabline#formatter', 'default') .. '#format' + return call(Formatter, [ nr, buffers] ) + enddef + + def airline#extensions#tabline#new_builder(): dict + var builder_context = { + 'active': 1, + 'tabline': 1, + 'right_sep': get(g:, 'airline#extensions#tabline#right_sep', g:airline_right_sep), + 'right_alt_sep': get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), + 'left_sep': get(g:, 'airline#extensions#tabline#left_sep', g:airline_left_sep), + 'left_alt_sep': get(g:, 'airline#extensions#tabline#left_alt_sep', g:airline_left_alt_sep), + } + return airline#extensions#tabline#builder#new(builder_context) + enddef + + def airline#extensions#tabline#group_of_bufnr(tab_bufs: list, bufnr: number): string + var cur = bufnr('%') + var group = '' + if cur == bufnr + if g:airline_detect_modified && getbufvar(bufnr, '&modified') + group = 'airline_tabmod' + else + group = 'airline_tabsel' + endif + else + if g:airline_detect_modified && getbufvar(bufnr, '&modified') + group = 'airline_tabmod_unsel' + elseif index(tab_bufs, bufnr) > -1 + group = 'airline_tab' + else + group = 'airline_tabhid' + endif + endif + return group + enddef +endif diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim new file mode 100644 index 0000000..8df8306 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim @@ -0,0 +1,53 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) +let s:buf_min_count = get(g:, 'airline#extensions#tabline#buffer_min_count', 0) +let s:tab_min_count = get(g:, 'airline#extensions#tabline#tab_min_count', 0) + +function! airline#extensions#tabline#autoshow#off() + if exists('s:original_tabline') + let &tabline = s:original_tabline + let &showtabline = s:original_showtabline + endif + + augroup airline_tabline_autoshow + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#autoshow#on() + let [ s:original_tabline, s:original_showtabline ] = [ &tabline, &showtabline ] + + augroup airline_tabline_autoshow + autocmd! + if s:buf_min_count <= 0 && s:tab_min_count <= 1 + call airline#extensions#tabline#enable() + else + if s:show_buffers == 1 + autocmd BufEnter * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list())) + autocmd BufUnload * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()) - 1) + else + autocmd TabNew,TabClosed * call show_tabline(s:tab_min_count, tabpagenr('$')) + endif + endif + + " Invalidate cache. This has to come after the BufUnload for + " s:show_buffers, to invalidate the cache for BufEnter. + autocmd BufLeave,BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate() + augroup END +endfunction + +function! s:show_tabline(min_count, total_count) + if a:total_count >= a:min_count + if &showtabline != 2 && &lines > 3 + set showtabline=2 + endif + else + if &showtabline != 0 + set showtabline=0 + endif + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim new file mode 100644 index 0000000..1eb79f7 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim @@ -0,0 +1,267 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabline = '' +let s:current_visible_buffers = [] + +let s:number_map = { + \ '0': 'â°', + \ '1': '¹', + \ '2': '²', + \ '3': '³', + \ '4': 'â´', + \ '5': 'âµ', + \ '6': 'â¶', + \ '7': 'â·', + \ '8': 'â¸', + \ '9': 'â¹' + \ } +let s:number_map = &encoding == 'utf-8' + \ ? get(g:, 'airline#extensions#tabline#buffer_idx_format', s:number_map) + \ : {} + +function! airline#extensions#tabline#buffers#off() + augroup airline_tabline_buffers + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#buffers#on() + let terminal_event = has("nvim") ? 'TermOpen' : 'TerminalOpen' + augroup airline_tabline_buffers + autocmd! + autocmd BufDelete * call airline#extensions#tabline#buflist#clean() + if exists("##".terminal_event) + exe 'autocmd '. terminal_event. ' * call airline#extensions#tabline#buflist#clean()' + endif + autocmd User BufMRUChange call airline#extensions#tabline#buflist#clean() + augroup END +endfunction + +function! airline#extensions#tabline#buffers#invalidate() + let s:current_bufnr = -1 +endfunction + +function! airline#extensions#tabline#buffers#get() + try + call map_keys() + catch + " no-op + endtry + let cur = bufnr('%') + if cur == s:current_bufnr && &columns == s:column_width + if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let b = airline#extensions#tabline#new_builder() + let tab_bufs = tabpagebuflist(tabpagenr()) + let show_buf_label_first = 0 + + if get(g:, 'airline#extensions#tabline#buf_label_first', 0) + let show_buf_label_first = 1 + endif + if show_buf_label_first + call airline#extensions#tabline#add_label(b, 'buffers', 0) + endif + + let b.tab_bufs = tabpagebuflist(tabpagenr()) + + let b.overflow_group = 'airline_tabhid' + let b.buffers = airline#extensions#tabline#buflist#list() + if get(g:, 'airline#extensions#tabline#current_first', 0) + if index(b.buffers, cur) > -1 + call remove(b.buffers, index(b.buffers, cur)) + endif + let b.buffers = [cur] + b.buffers + endif + + function! b.get_group(i) dict + let bufnum = get(self.buffers, a:i, -1) + if bufnum == -1 + return '' + endif + let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) + if bufnum == bufnr('%') + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + endif + return group + endfunction + + if has("tablineat") + function! b.get_pretitle(i) dict + let bufnum = get(self.buffers, a:i, -1) + return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' + endfunction + + function! b.get_posttitle(i) dict + return '%X' + endfunction + endif + + function! b.get_title(i) dict + let bufnum = get(self.buffers, a:i, -1) + let group = self.get_group(a:i) + let pgroup = self.get_group(a:i - 1) + " always add a space when powerline_fonts are used + " or for the very first item + if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 + let space = s:spc + else + let space= (pgroup == group ? s:spc : '') + endif + + if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) + if len(s:number_map) > 0 + return space. s:get_number(a:i) . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc + else + return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' + endif + else + return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc + endif + endfunction + + let current_buffer = max([index(b.buffers, cur), 0]) + let last_buffer = len(b.buffers) - 1 + call b.insert_titles(current_buffer, 0, last_buffer) + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + if !show_buf_label_first + call airline#extensions#tabline#add_label(b, 'buffers', 1) + endif + + call airline#extensions#tabline#add_tab_label(b) + + let s:current_bufnr = cur + let s:column_width = &columns + let s:current_tabline = b.build() + let s:current_visible_buffers = copy(b.buffers) + " Do not remove from s:current_visible_buffers, this breaks s:select_tab() + "if b._right_title <= last_buffer + " call remove(s:current_visible_buffers, b._right_title, last_buffer) + "endif + "if b._left_title > 0 + " call remove(s:current_visible_buffers, 0, b._left_title) + "endif + return s:current_tabline +endfunction + +function! s:get_number(index) + if len(s:number_map) == 0 + return a:index + endif + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) + let number_format = bidx_mode > 1 ? '%02d' : '%d' + let l:count = bidx_mode == 2 ? a:index+11 : a:index+1 + return join(map(split(printf(number_format, l:count), '\zs'), + \ 'get(s:number_map, v:val, "")'), '') +endfunction + +function! s:select_tab(buf_index) + " no-op when called in 'keymap_ignored_filetypes' + if count(get(g:, 'airline#extensions#tabline#keymap_ignored_filetypes', + \ ['vimfiler', 'nerdtree']), &ft) + return + endif + let idx = a:buf_index + if s:current_visible_buffers[0] == -1 + let idx = idx + 1 + endif + + let buf = get(s:current_visible_buffers, idx, 0) + if buf != 0 + exec 'b!' . buf + endif +endfunction + +function! s:jump_to_tab(offset) + let l = airline#extensions#tabline#buflist#list() + let i = index(l, bufnr('%')) + if i > -1 + exec 'b!' . l[(i + a:offset) % len(l)] + endif +endfunction + +function! s:map_keys() + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) + if bidx_mode > 0 + if bidx_mode == 1 + for i in range(1, 10) + exe printf('noremap AirlineSelectTab%d :call select_tab(%d)', i%10, i-1) + endfor + else + let start_idx = bidx_mode == 2 ? 11 : 1 + for i in range(start_idx, 99) + exe printf('noremap AirlineSelectTab%02d :call select_tab(%d)', i, i-start_idx) + endfor + endif + noremap AirlineSelectPrevTab :call jump_to_tab(-v:count1) + noremap AirlineSelectNextTab :call jump_to_tab(v:count1) + " Enable this for debugging + " com! AirlineBufferList :echo map(copy(s:current_visible_buffers), {i,k -> k.": ".bufname(k)}) + endif +endfunction + +function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort + " Clickable buffers + " works only in recent NeoVim with has('tablineat') + + " single mouse button click without modifiers pressed + if a:clicks == 1 && a:modifiers !~# '[^ ]' + if a:button is# 'l' + " left button - switch to buffer + try + silent execute 'buffer' a:minwid + catch + call airline#util#warning("Cannot switch buffer, current buffer is modified! See :h 'hidden'") + endtry + elseif a:button is# 'm' + " middle button - delete buffer + + if get(g:, 'airline#extensions#tabline#middle_click_preserves_windows', 0) == 0 || winnr('$') == 1 + " just simply delete the clicked buffer. This will cause windows + " associated with the clicked buffer to be closed. + silent execute 'bdelete' a:minwid + else + " find windows displaying the clicked buffer and open an new + " buffer in them. + let current_window = bufwinnr("%") + let window_number = bufwinnr(a:minwid) + let last_window_visited = -1 + + " Set to 1 if the clicked buffer was open in any windows. + let buffer_in_window = 0 + + " Find the next window with the clicked buffer open. If bufwinnr() + " returns the same window number, this is because we clicked a new + " buffer, and then tried editing a new buffer. Vim won't create a + " new empty buffer for the same window, so we get the same window + " number from bufwinnr(). In this case we just give up and don't + " delete the buffer. + " This could be made cleaner if we could check if the clicked buffer + " is a new buffer, but I don't know if there is a way to do that. + while window_number != -1 && window_number != last_window_visited + let buffer_in_window = 1 + silent execute window_number . 'wincmd w' + silent execute 'enew' + let last_window_visited = window_number + let window_number = bufwinnr(a:minwid) + endwhile + silent execute current_window . 'wincmd w' + if window_number != last_window_visited || buffer_in_window == 0 + silent execute 'bdelete' a:minwid + endif + endif + endif + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim new file mode 100644 index 0000000..f772201 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim @@ -0,0 +1,85 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#buflist#invalidate() + unlet! s:current_buffer_list +endfunction + +function! airline#extensions#tabline#buflist#clean() + if !exists('#airline') + " airline disabled + return + endif + call airline#extensions#tabline#buflist#invalidate() + call airline#extensions#tabline#buffers#invalidate() +endfunction + +" paths in excludes list +function! s:ExcludePaths(nr, exclude_paths) + let bname = bufname(a:nr) + if empty(bname) + return 0 + endif + let bpath = fnamemodify(bname, ":p") + for f in a:exclude_paths + if bpath =~# f | return 1 | endif + endfor +endfunction + +" other types to exclude +function! s:ExcludeOther(nr, exclude_preview) + if (getbufvar(a:nr, 'current_syntax') == 'qf') || + \ (a:exclude_preview && getbufvar(a:nr, '&bufhidden') == 'wipe' + \ && getbufvar(a:nr, '&buftype') == 'nofile') + return 1 | endif +endfunction + +function! airline#extensions#tabline#buflist#list() + if exists('s:current_buffer_list') + return s:current_buffer_list + endif + + let exclude_buffers = get(g:, 'airline#extensions#tabline#exclude_buffers', []) + let exclude_paths = get(g:, 'airline#extensions#tabline#excludes', []) + let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) + + let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) + + let buffers = [] + " If this is too slow, we can switch to a different algorithm. + " Basically branch 535 already does it, but since it relies on + " BufAdd autocommand, I'd like to avoid this if possible. + for nr in list + if buflisted(nr) + " Do not add to the bufferlist, if either + " 1) bufnr is exclude_buffers list + " 2) buffername matches one of exclude_paths patterns + " 3) buffer is a quickfix buffer + " 4) when excluding preview windows: + " 'bufhidden' == wipe + " 'buftype' == nofile + " 5) ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat + + " check buffer numbers first + if index(exclude_buffers, nr) >= 0 + continue + " check paths second + elseif !empty(exclude_paths) && s:ExcludePaths(nr, exclude_paths) + continue + " ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat + elseif airline#util#ignore_buf(bufname(nr)) + continue + " check other types last + elseif s:ExcludeOther(nr, exclude_preview) + continue + endif + + call add(buffers, nr) + endif + endfor + + let s:current_buffer_list = buffers + return buffers +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/builder.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/builder.vim new file mode 100644 index 0000000..35ebe51 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/builder.vim @@ -0,0 +1,232 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +" Set the point in the tabline where the builder should insert the titles. +" +" Subsequent calls will overwrite the previous ones, so only the last call +" determines to location to insert titles. +" +" NOTE: The titles are not inserted until |build| is called, so that the +" remaining contents of the tabline can be taken into account. +" +" Callers should define at least |get_title| and |get_group| on the host +" object before calling |build|. +function! s:prototype.insert_titles(current, first, last) dict + let self._first_title = a:first " lowest index + let self._last_title = a:last " highest index + let self._left_title = a:current " next index to add on the left + let self._right_title = a:current + 1 " next index to add on the right + let self._left_position = self.get_position() " left end of titles + let self._right_position = self._left_position " right end of the titles +endfunction + +" Insert a title for entry number |index|, of group |group| at position |pos|, +" if there is space for it. Returns 1 if it is inserted, 0 otherwise +" +" |force| inserts the title even if there isn't enough space left for it. +" |sep_size| adjusts the size change that the title is considered to take up, +" to account for changes to the separators +" +" The title is defined by |get_title| on the hosting object, called with +" |index| as its only argument. +" |get_pretitle| and |get_posttitle| may be defined on the host object to +" insert some formatting before or after the title. These should be 0-width. +" +" This method updates |_right_position| and |_remaining_space| on the host +" object, if the title is inserted. +function! s:prototype.try_insert_title(index, group, pos, sep_size, force) dict + let title = self.get_title(a:index) + let title_size = s:tabline_evaluated_length(title) + a:sep_size + if a:force || self._remaining_space >= title_size + let pos = a:pos + if has_key(self, "get_pretitle") + call self.insert_raw(self.get_pretitle(a:index), pos) + let self._right_position += 1 + let pos += 1 + endif + + call self.insert_section(a:group, title, pos) + let self._right_position += 1 + let pos += 1 + + if has_key(self, "get_posttitle") + call self.insert_raw(self.get_posttitle(a:index), pos) + let self._right_position += 1 + let pos += 1 + endif + + let self._remaining_space -= title_size + return 1 + endif + return 0 +endfunction + +function! s:get_separator_change(new_group, old_group, end_group, sep_size, alt_sep_size) + return s:get_separator_change_with_end(a:new_group, a:old_group, a:end_group, a:end_group, a:sep_size, a:alt_sep_size) +endfunction + +" Compute the change in size of the tabline caused by separators +" +" This should be kept up-to-date with |s:get_transitioned_separator| and +" |s:get_separator| in autoload/airline/builder.vim +function! s:get_separator_change_with_end(new_group, old_group, new_end_group, old_end_group, sep_size, alt_sep_size) + let sep_change = 0 + if !empty(a:new_end_group) " Separator between title and the end + let sep_change += airline#builder#should_change_group(a:new_group, a:new_end_group) ? a:sep_size : a:alt_sep_size + endif + if !empty(a:old_group) " Separator between the title and the one adjacent + let sep_change += airline#builder#should_change_group(a:new_group, a:old_group) ? a:sep_size : a:alt_sep_size + if !empty(a:old_end_group) " Remove mis-predicted separator + let sep_change -= airline#builder#should_change_group(a:old_group, a:old_end_group) ? a:sep_size : a:alt_sep_size + endif + endif + return sep_change +endfunction + +" This replaces the build function of the |airline#builder#new| object, to +" insert titles as specified by the last call to |insert_titles| before +" passing to the original build function. +" +" Callers should define at least |get_title| and |get_group| on the host +" object if |insert_titles| has been called on it. +function! s:prototype.build() dict + if has_key(self, '_left_position') && self._first_title <= self._last_title + let self._remaining_space = &columns - s:tabline_evaluated_length(self._build()) + + let center_active = get(g:, 'airline#extensions#tabline#center_active', 0) + + let sep_size = s:tabline_evaluated_length(self._context.left_sep) + let alt_sep_size = s:tabline_evaluated_length(self._context.left_alt_sep) + + let outer_left_group = airline#builder#get_prev_group(self._sections, self._left_position) + let outer_right_group = airline#builder#get_next_group(self._sections, self._right_position) + + let overflow_marker = get(g:, 'airline#extensions#tabline#overflow_marker', g:airline_symbols.ellipsis) + let overflow_marker_size = s:tabline_evaluated_length(overflow_marker) + " Allow space for the markers before we begin filling in titles. + if self._left_title > self._first_title + let self._remaining_space -= overflow_marker_size + + \ s:get_separator_change(self.overflow_group, "", outer_left_group, sep_size, alt_sep_size) + endif + if self._left_title < self._last_title + let self._remaining_space -= overflow_marker_size + + \ s:get_separator_change(self.overflow_group, "", outer_right_group, sep_size, alt_sep_size) + endif + + " Add the current title + let group = self.get_group(self._left_title) + if self._left_title == self._first_title + let sep_change = s:get_separator_change(group, "", outer_left_group, sep_size, alt_sep_size) + else + let sep_change = s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) + endif + if self._left_title == self._last_title + let sep_change += s:get_separator_change(group, "", outer_right_group, sep_size, alt_sep_size) + else + let sep_change += s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) + endif + let left_group = group + let right_group = group + let self._left_title -= + \ self.try_insert_title(self._left_title, group, self._left_position, sep_change, 1) + + if get(g:, 'airline#extensions#tabline#current_first', 0) + " always have current title first + let self._left_position += 1 + endif + + if !center_active && self._right_title <= self._last_title + " Add the title to the right + let group = self.get_group(self._right_title) + if self._right_title == self._last_title + let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) + endif + let right_group = group + let self._right_title += + \ self.try_insert_title(self._right_title, group, self._right_position, sep_change, 1) + endif + + while self._remaining_space > 0 + let done = 0 + if self._left_title >= self._first_title + " Insert next title to the left + let group = self.get_group(self._left_title) + if self._left_title == self._first_title + let sep_change = s:get_separator_change_with_end(group, left_group, outer_left_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, left_group, self.overflow_group, sep_size, alt_sep_size) + endif + let left_group = group + let done = self.try_insert_title(self._left_title, group, self._left_position, sep_change, 0) + let self._left_title -= done + endif + " If center_active is set, this |if| operates as an independent |if|, + " otherwise as an |elif|. + if self._right_title <= self._last_title && (center_active || !done) + " Insert next title to the right + let group = self.get_group(self._right_title) + if self._right_title == self._last_title + let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) + endif + let right_group = group + let done = self.try_insert_title(self._right_title, group, self._right_position, sep_change, 0) + let self._right_title += done + endif + if !done + break + endif + endwhile + + if self._left_title >= self._first_title + if get(g:, 'airline#extensions#tabline#current_first', 0) + let self._left_position -= 1 + endif + call self.insert_section(self.overflow_group, overflow_marker, self._left_position) + let self._right_position += 1 + endif + + if self._right_title <= self._last_title + call self.insert_section(self.overflow_group, overflow_marker, self._right_position) + endif + endif + + return self._build() +endfunction + +let s:prototype.overflow_group = 'airline_tab' + +" Extract the text content a tabline will render. (Incomplete). +" +" See :help 'statusline' for the list of fields. +function! s:evaluate_tabline(tabline) + let tabline = a:tabline + let tabline = substitute(tabline, '%{\([^}]\+\)}', '\=eval(submatch(1))', 'g') + let tabline = substitute(tabline, '%#[^#]\+#', '', 'g') + let tabline = substitute(tabline, '%(\([^)]\+\)%)', '\1', 'g') + let tabline = substitute(tabline, '%\d\+[TX]', '', 'g') + let tabline = substitute(tabline, '%=', '', 'g') + let tabline = substitute(tabline, '%\d*\*', '', 'g') + if has('tablineat') + let tabline = substitute(tabline, '%@[^@]\+@', '', 'g') + endif + return tabline +endfunction + +function! s:tabline_evaluated_length(tabline) + return airline#util#strchars(s:evaluate_tabline(a:tabline)) +endfunction + +function! airline#extensions#tabline#builder#new(context) + let builder = airline#builder#new(a:context) + let builder._build = builder.build + call extend(builder, s:prototype, 'force') + return builder +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim new file mode 100644 index 0000000..feab460 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim @@ -0,0 +1,169 @@ +" MIT License. Copyright (c) 2016-2021 Kevin Sapper et al. +" Plugin: https://github.com/szw/vim-ctrlspace +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabnr = -1 +let s:current_tabline = '' +let s:highlight_groups = ['hid', 0, '', 'sel', 'mod_unsel', 0, 'mod_unsel', 'mod'] + +function! airline#extensions#tabline#ctrlspace#off() + augroup airline_tabline_ctrlspace + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#on() + augroup airline_tabline_ctrlspace + autocmd! + autocmd BufDelete * call airline#extensions#tabline#ctrlspace#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#invalidate() + if !exists('#airline') + return + endif + let s:current_bufnr = -1 + let s:current_tabnr = -1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + + let buffer_list = [] + for bufferindex in sort(keys(ctrlspace#api#Buffers(a:cur_tab)), 'N') + for buffer in ctrlspace#api#BufferList(a:cur_tab) + if buffer['index'] == bufferindex + call add(buffer_list, buffer) + endif + endfor + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the current buffer no in the buffer list + " return false and no redraw tabline. + " Fixes #1515. if there a BufEnter autocmd execute redraw. The tabline may no update. + let bufnr_list = map(copy(buffer_list), 'v:val["index"]') + if index(bufnr_list, a:cur_buf) == -1 && a:cur_tab == s:current_tabnr + return 0 + endif + + let s:current_modified = getbufvar(a:cur_buf, '&modified') + + for buffer in buffer_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * buffer.modified) + (2 * buffer.visible) + (a:cur_buf == buffer.index)] + \ .pos_extension + + let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)' + + if has("tablineat") + let buf_name = '%'.buffer.index.'@airline#extensions#tabline#buffers#clickbuf@'.buf_name.'%X' + endif + + call a:builder.add_section_spaced(group, buf_name) + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the selected buffer was updated + " return true + return 1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + let tab_list = ctrlspace#api#TabList() + + for tab in tab_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * tab.modified) + (3 * tab.current)] + \ .pos_extension + + if get(g:, 'airline#extensions#tabline#ctrlspace_show_tab_nr', 0) == 0 + call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T') + else + call a:builder.add_section_spaced(group, '%'.(tab.index).'T'.(tab.index).(g:airline_symbols.space).(tab.title).ctrlspace#api#TabBuffersNumber(tab.index).'%T') + endif + endfor +endfunction + +function! airline#extensions#tabline#ctrlspace#get() + let cur_buf = bufnr('%') + let buffer_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') + let tab_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') + let switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) + + try + call airline#extensions#tabline#tabs#map_keys() + endtry + + let cur_tab = tabpagenr() + + if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr + if !g:airline_detect_modified || getbufvar(cur_buf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let builder = airline#extensions#tabline#new_builder() + + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let AppendBuffers = function('airline#extensions#tabline#ctrlspace#add_buffer_section', [builder, cur_tab, cur_buf]) + let AppendTabs = function('airline#extensions#tabline#ctrlspace#add_tab_section', [builder]) + let AppendLabel = function(builder.add_section_spaced, ['airline_tabtype'], builder) + + " <= 1: |{Tabs} {Buffers} {Tabs} fnametruncate + let _ = airline#util#strcharpart(_, 0, fnametruncate) + endif + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) + endfunction + + function! airline#extensions#tabline#formatters#default#wrap_name(bufnr, buffer_name) + let buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') + let buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) + + let _ = buf_nr_show ? printf(buf_nr_format, a:bufnr) : '' + let _ .= substitute(a:buffer_name, '\\', '/', 'g') + + if getbufvar(a:bufnr, '&modified') == 1 + let _ .= g:airline_symbols.modified + endif + return _ + endfunction + finish +else + " Vim9 Script implementation + def airline#extensions#tabline#formatters#default#format(bufnr: number, buffers: list): string + var fnametruncate = get(g:, 'airline#extensions#tabline#fnametruncate', 0) + var fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') + var result = '' + + var name = bufname(bufnr) + if empty(name) + result = '[No Name]' + elseif name =~ 'term://' + # Neovim Terminal + result = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + if get(g:, 'airline#extensions#tabline#fnamecollapse', 1) + result = pathshorten(fnamemodify(name, fmod)) + else + result = fnamemodify(name, fmod) + endif + if bufnr != bufnr('%') && fnametruncate && strlen(result) > fnametruncate + result = airline#util#strcharpart(result, 0, fnametruncate) + endif + endif + return airline#extensions#tabline#formatters#default#wrap_name(bufnr, result) + enddef + + def airline#extensions#tabline#formatters#default#wrap_name(bufnr: number, buffer_name: string): string + var buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') + var buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) + + var result = buf_nr_show ? printf(buf_nr_format, bufnr) : '' + result ..= substitute(buffer_name, '\\', '/', 'g') + + if getbufvar(bufnr, '&modified') + result ..= g:airline_symbols.modified + endif + return result + enddef +endif diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/jsformatter.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/jsformatter.vim new file mode 100644 index 0000000..6f364ec --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/jsformatter.vim @@ -0,0 +1,15 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#jsformatter#format(bufnr, buffers) + let buf = bufname(a:bufnr) + let filename = fnamemodify(buf, ':t') + + if filename ==# 'index.js' || filename ==# 'index.jsx' || filename ==# 'index.ts' || filename ==# 'index.tsx' || filename ==# 'index.vue' + return fnamemodify(buf, ':p:h:t') . '/i' + else + return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers) + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path.vim new file mode 100644 index 0000000..1cb6027 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path.vim @@ -0,0 +1,21 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#short_path#format(bufnr, buffers) + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:h:t') + let _ = '' + + let name = bufname(a:bufnr) + if empty(name) + let _ .= '[No Name]' + elseif name =~ 'term://' + " Neovim Terminal + let _ = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + let _ .= fnamemodify(name, fmod) . '/' . fnamemodify(name, ':t') + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path_improved.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path_improved.vim new file mode 100644 index 0000000..0b00328 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path_improved.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#short_path_improved#format(bufnr, buffers) abort + let name = bufname(a:bufnr) + if empty(name) + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, '[No Name]') + endif + + let tail = s:tail(a:bufnr) + let tails = s:tails(a:bufnr, a:buffers) + + if has_key(tails, tail) + " Use short path for duplicates + return airline#extensions#tabline#formatters#short_path#format(a:bufnr, a:buffers) + endif + + " Use tail for unique filenames + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, tail) +endfunction + +function! s:tails(self, buffers) abort + let tails = {} + for nr in a:buffers + if nr != a:self + let tails[s:tail(nr)] = 1 + endif + endfor + return tails +endfunction + +function! s:tail(bufnr) abort + return fnamemodify(bufname(a:bufnr), ':t') +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/tabnr.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/tabnr.vim new file mode 100644 index 0000000..516c3bd --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/tabnr.vim @@ -0,0 +1,20 @@ +" MIT License. Copyright (c) 2017-2021 Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#tabnr#format(tab_nr, buflist) + let spc=g:airline_symbols.space + let tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0) + if tab_nr_type == 0 " nr of splits + " TODO: This doesn't seem to be the actual number of splits, + " but seems to behave like what users expect. + return spc. len(tabpagebuflist(a:buflist[0])) + elseif tab_nr_type == 1 " tab number + " Return only the current tab number + return spc. a:tab_nr + else " tab_nr_type == 2 splits and tab number + " return the tab number followed by the number of buffers (in the tab) + return spc. a:tab_nr. spc. len(tabpagebuflist(a:buflist[0])) + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim new file mode 100644 index 0000000..4d065f3 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail.vim @@ -0,0 +1,46 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffers) + let duplicates = {} + let tails = {} + let map = {} + for nr in a:buffers + let name = bufname(nr) + if empty(name) + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, '[No Name]') + else + if name =~ 'term://' + " Neovim Terminal + let tail = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + let tail = fnamemodify(name, ':s?/\+$??:t') + endif + if has_key(tails, tail) + let duplicates[nr] = nr + endif + let tails[tail] = 1 + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, tail) + endif + endfor + + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:.') + for nr in values(duplicates) + let name = bufname(nr) + let fnamecollapse = get(g:, 'airline#extensions#tabline#fnamecollapse', 1) + if fnamecollapse + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g')) + else + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, fnamemodify(name, fmod)) + endif + endfor + + if has_key(map, a:bufnr) + return map[a:bufnr] + endif + + " if we get here, the buffer list isn't in sync with the selected buffer yet, fall back to the default + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim new file mode 100644 index 0000000..e44ac2d --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim @@ -0,0 +1,91 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:skip_symbol = '…' + +function! airline#extensions#tabline#formatters#unique_tail_improved#format(bufnr, buffers) + if len(a:buffers) <= 1 " don't need to compare bufnames if has less than one buffer opened + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif + + let curbuf_tail = fnamemodify(bufname(a:bufnr), ':t') + let do_deduplicate = 0 + let path_tokens = {} + + for nr in a:buffers + let name = bufname(nr) + if !empty(name) && nr != a:bufnr && fnamemodify(name, ':t') == curbuf_tail " only perform actions if curbuf_tail isn't unique + let do_deduplicate = 1 + let tokens = reverse(split(substitute(fnamemodify(name, ':p:h'), '\\', '/', 'g'), '/')) + let token_index = 0 + for token in tokens + if token == '' | continue | endif + if token == '.' | break | endif + if !has_key(path_tokens, token_index) + let path_tokens[token_index] = {} + endif + let path_tokens[token_index][token] = 1 + let token_index += 1 + endfor + endif + endfor + + if do_deduplicate == 1 + let path = [] + let token_index = 0 + for token in reverse(split(substitute(fnamemodify(bufname(a:bufnr), ':p:h'), '\\', '/', 'g'), '/')) + if token == '.' | break | endif + let duplicated = 0 + let uniq = 1 + let single = 1 + if has_key(path_tokens, token_index) + let duplicated = 1 + if len(keys(path_tokens[token_index])) > 1 | let single = 0 | endif + if has_key(path_tokens[token_index], token) | let uniq = 0 | endif + endif + call insert(path, {'token': token, 'duplicated': duplicated, 'uniq': uniq, 'single': single}) + let token_index += 1 + endfor + + let buf_name = [curbuf_tail] + let has_uniq = 0 + let has_skipped = 0 + for token1 in reverse(path) + if !token1['duplicated'] && len(buf_name) > 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if has_uniq == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if token1['uniq'] == 0 && token1['single'] == 1 + let has_skipped = 1 + else + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + endif + call insert(buf_name, token1['token']) + endif + + if token1['uniq'] == 1 + let has_uniq = 1 + endif + endfor + + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, join(buf_name, '/')) + else + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim new file mode 100644 index 0000000..f32fd63 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim @@ -0,0 +1,141 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space +let s:current_bufnr = -1 +let s:current_tabnr = -1 +let s:current_modified = 0 + +function! airline#extensions#tabline#tabs#off() + augroup airline_tabline_tabs + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#tabs#on() + augroup airline_tabline_tabs + autocmd! + autocmd BufDelete * call airline#extensions#tabline#tabs#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#tabs#invalidate() + if exists('#airline') + let s:current_bufnr = -1 + endif +endfunction + +function! airline#extensions#tabline#tabs#get() + let curbuf = bufnr('%') + let curtab = tabpagenr() + try + call airline#extensions#tabline#tabs#map_keys() + catch + " no-op + endtry + if curbuf == s:current_bufnr && curtab == s:current_tabnr && &columns == s:column_width + if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let s:filtered_buflist = airline#extensions#tabline#buflist#list() + + let b = airline#extensions#tabline#new_builder() + + call airline#extensions#tabline#add_label(b, 'tabs', 0) + + function! b.get_group(i) dict + let curtab = tabpagenr() + let group = 'airline_tab' + if a:i == curtab + let group = 'airline_tabsel' + if g:airline_detect_modified + for bi in tabpagebuflist(curtab) + if index(s:filtered_buflist,bi) != -1 + if getbufvar(bi, '&modified') + let group = 'airline_tabmod' + endif + endif + endfor + endif + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + endif + return group + endfunction + + function! b.get_title(i) dict + let val = '%(' + + if get(g:, 'airline#extensions#tabline#show_tab_nr', 1) + let val .= airline#extensions#tabline#tabs#tabnr_formatter(a:i, tabpagebuflist(a:i)) + endif + + return val.'%'.a:i.'T %{airline#extensions#tabline#title('.a:i.')} %)' + endfunction + + call b.insert_titles(curtab, 1, tabpagenr('$')) + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + + if get(g:, 'airline#extensions#tabline#show_close_button', 1) + call b.add_section('airline_tab_right', ' %999X'. + \ get(g:, 'airline#extensions#tabline#close_symbol', 'X').'%X ') + endif + + if get(g:, 'airline#extensions#tabline#show_splits', 1) == 1 + let buffers = tabpagebuflist(curtab) + for nr in buffers + if index(s:filtered_buflist,nr) != -1 + let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right" + call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)') + endif + endfor + if get(g:, 'airline#extensions#tabline#show_buffers', 1) + call airline#extensions#tabline#add_label(b, 'buffers', 1) + endif + endif + call airline#extensions#tabline#add_tab_label(b) + + let s:current_bufnr = curbuf + let s:current_tabnr = curtab + let s:column_width = &columns + let s:current_tabline = b.build() + return s:current_tabline +endfunction + +function! airline#extensions#tabline#tabs#map_keys() + if maparg('AirlineSelectTab1', 'n') is# ':1tabn' + return + endif + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) + if bidx_mode == 1 + for i in range(1, 10) + exe printf('noremap AirlineSelectTab%d :%dtabn', i%10, i) + endfor + else + for i in range(11, 99) + exe printf('noremap AirlineSelectTab%d :%dtabn', i, i-10) + endfor + endif + noremap AirlineSelectPrevTab gT + " tabn {count} goes to count tab does not go {count} tab pages forward! + noremap AirlineSelectNextTab :exe repeat(':tabn\|', v:count1) +endfunction + +function! airline#extensions#tabline#tabs#tabnr_formatter(nr, i) abort + let formatter = get(g:, 'airline#extensions#tabline#tabnr_formatter', 'tabnr') + try + return airline#extensions#tabline#formatters#{formatter}#format(a:nr, a:i) + catch /^Vim\%((\a\+)\)\=:E117/ " catch E117, unknown function + " Function not found + return call(formatter, [a:nr, a:i]) + catch + " something went wrong, return an empty string + return "" + endtry +endfunction diff --git a/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabws.vim b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabws.vim new file mode 100644 index 0000000..130fc32 --- /dev/null +++ b/dot_vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabws.vim @@ -0,0 +1,156 @@ +" MIT License. Copyright (c) 2016-2021 Kevin Sapper et al. +" PLugin: https://github.com/s1341/vim-tabws +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabnr = -1 +let s:current_tabline = '' +let s:highlight_groups = ['hid', 0, '', 'sel', 'mod_unsel', 0, 'mod_unsel', 'mod'] + +function! airline#extensions#tabline#tabws#off() + augroup airline_tabline_tabws + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#tabws#on() + augroup airline_tabline_tabws + autocmd! + autocmd BufDelete * call airline#extensions#tabline#tabws#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#tabws#invalidate() + if exists('#airline') + let s:current_bufnr = -1 + let s:current_tabnr = -1 + endif +endfunction + +function! airline#extensions#tabline#tabws#add_buffer_section(builder, cur_tab, cur_buf, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + let bufnr_list = tabws#getbuffersfortab(a:cur_tab) + + if index(bufnr_list, a:cur_buf) == -1 && a:cur_tab == s:current_tabnr + return 0 + endif + + let s:current_modified = getbufvar(a:cur_buf, '&modified') + let visible_list = tabpagebuflist(a:cur_tab) + + for buffer in bufnr_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * getbufvar(buffer, '&modified')) + (2 * (index(visible_list, buffer) != -1)) + (a:cur_buf == buffer)] + \ .pos_extension + + let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.')}%)' + + if has("tablineat") + let buf_name = '%'.buffer.'@airline#extensions#tabline#buffers#clickbuf@'.buf_name.'%X' + endif + + call a:builder.add_section_spaced(group, buf_name) + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the selected buffer was updated + " return true + return 1 +endfunction + +function! airline#extensions#tabline#tabws#add_tab_section(builder, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + + for tab in range(1, tabpagenr('$')) + let current = tab == tabpagenr() + let group = 'airline_tab' + \ .s:highlight_groups[(3 * current)] + \ .pos_extension + + if get(g:, 'airline#extensions#tabline#tabws_show_tab_nr', 0) == 0 + call a:builder.add_section_spaced(group, '%'.tab.'T'.tabws#gettabname(tab).'%T') + else + call a:builder.add_section_spaced(group, '%'.tab.'T'.tab.(g:airline_symbols.space).tabws#gettabname(tab).'%T') + endif + endfor +endfunction + +function! airline#extensions#tabline#tabws#get() + let cur_buf = bufnr('%') + let buffer_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') + let tab_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') + let switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) + + try + call airline#extensions#tabline#tabs#map_keys() + endtry + + let cur_tab = tabpagenr() + + if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr + if !g:airline_detect_modified || getbufvar(cur_buf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let builder = airline#extensions#tabline#new_builder() + + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let AppendBuffers = function('airline#extensions#tabline#tabws#add_buffer_section', [builder, cur_tab, cur_buf]) + let AppendTabs = function('airline#extensions#tabline#tabws#add_tab_section', [builder]) + let AppendLabel = function(builder.add_section_spaced, ['airline_tabtype'], builder) + + " <= 1: |{Tabs} {Buffers} {Tabs} +" tabpagecd: +" expanded version by mg979 +" MIT License Copyright (C) 2012-2013 Kana Natsuno +" MIT License Copyright (C) 2018-2021 Gianmaria Bajo +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +function! airline#extensions#tabline#xtabline#init() + + let s:state = 0 + + " initialize mappings + call airline#extensions#tabline#xtabline#maps() + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Variables + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + let g:loaded_xtabline = 1 + let s:most_recent = -1 + let s:xtabline_filtering = 1 + + let t:xtl_excluded = get(g:, 'airline#extensions#tabline#exclude_buffers', []) + let t:xtl_accepted = [] + + let g:xtabline_include_previews = get(g:, 'xtabline_include_previews', 1) + + let g:xtabline_alt_action = get(g:, 'xtabline_alt_action', "buffer #") + + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Autocommands + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + augroup plugin-xtabline + autocmd! + + autocmd TabNew * call s:Do('new') + autocmd TabEnter * call s:Do('enter') + autocmd TabLeave * call s:Do('leave') + autocmd TabClosed * call s:Do('close') + + autocmd BufEnter * if exists('#airline') | let g:xtabline_changing_buffer = 0 | endif + autocmd BufAdd,BufDelete,BufWrite * call airline#extensions#tabline#xtabline#filter_buffers() + augroup END + + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Commands + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + com! XTabReopen call airline#extensions#tabline#xtabline#reopen_last_tab() + +endfunction + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Mappings +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +function! airline#extensions#tabline#xtabline#maps() + + if !exists('g:xtabline_disable_keybindings') + + fun! s:mapkeys(keys, plug) + if empty(mapcheck(a:keys)) && !hasmapto(a:plug) + silent! execute 'nmap '.a:keys.' '.a:plug + endif + endfun + + call s:mapkeys('','XTablineToggleTabs') + call s:mapkeys('','XTablineToggleFiltering') + call s:mapkeys('','XTablineSelectBuffer') + call s:mapkeys(']l','XTablineNextBuffer') + call s:mapkeys('[l','XTablinePrevBuffer') + call s:mapkeys('tr','XTablineReopen') + endif + + nnoremap + +where is the folder on your HD, as a relative path to the +template folder. For instance, a sensible folder structure could be: + +- wiki + - text + - html + - templates + - mathjax + +In this case, would be "../mathjax" (without quotes). + +2. Loading MathJax from a CDN-server (needs internet connection). +Add to your HTML template the following lines: + + + + + +------------------------------------------------------------------------------ +5.9. Blockquotes *vimwiki-syntax-blockquotes* + +Text which starts with 4 or more spaces is a blockquote. + + This would be a blockquote in Vimwiki. It is not highlighted in Vim but + could be styled by CSS in HTML. Blockquotes are usually used to quote a + long piece of text from another source. + +A group of lines prefixed with > also specifies a blockquote, with the caveat +that the > syntax allow empty lines to signal multiple paragraphs. + +> This also signals a block quote. +> +> You can use empty lines to signal multiple paragraphs kept inside the same +> blockquote. + + +------------------------------------------------------------------------------ +5.10. Comments *vimwiki-syntax-comments* + +A line that starts with %% is a comment. +E.g.: > + %% this text would not be in HTML + +The default commentstring can be changed or disabled with +|g:vimwiki_commentstring| so an alternative commentstring can be set, e.g.: + + +A multi-line comment is one that starts with %%+ and ends with +%%. This can +traverse across multiple lines, or can be contained within part of a single +line. +E.g.: + %%+ this text + and this text + would not be + in html +%% + %%+ not included +%% is included %%+ also not included +%% + +------------------------------------------------------------------------------ +5.11. Horizontal line *vimwiki-syntax-hr* + +4 or more dashes at the start of the line is a horizontal line (
): > + ---- +< + +------------------------------------------------------------------------------ +5.12. Tags *vimwiki-syntax-tags* + +You can tag a wiki file, a header or an arbitrary place in a wiki file. Then, +you can use Vim's built-in tag search functionality (see |tagsrch.txt|) or +Vimwiki's tag related commands to quickly jump to all occurrences of the tag. + +A tag is a sequence of non-space characters between two colons: > + :tag-example: +< +It is allowed to concatenate multiple tags in one line: > + :tag-one:tag-two: +< +If placed in the first two lines of a file, the whole file is tagged. If +placed under a header, within the 2 lines below it, the header is then tagged +with this tag, and the tag search commands will jump to this specific header. +Otherwise, the tag stands of its own and the search command jumps directly to +it. + +Typing tags can be simplified by using Vim's omni completion (see +|compl-omni|) like so: > + :ind +which opens up a popup menu with all tags defined in the wiki starting with +"ind". + +Tags are also treated as |vimwiki-anchors| (similar to bold text). + + *vimwiki-build-tags* +Note that the tag search/jump/completion commands need certain metadata saved +in the wiki folder. This metadata file can be manually updated by running +|:VimwikiRebuildTags|. When the option |vimwiki-option-auto_tags| is enabled, +the tags metadata will be auto-updated on each page save. + + +Tags-related commands and options: + * |:VimwikiRebuildTags| + * |:VimwikiGenerateTagLinks| + * |:VimwikiSearchTags| + * |vimwiki-option-auto_tags| + + +============================================================================== +6. Folding/Outline *vimwiki-folding* + +Vimwiki allows you to use Vim's folding methods and options so you can fold +your outline to make it less distracting and easier to navigate. You can use +Vimwiki's built-in folding methods or supply custom methods for folding. You +control how folds behave with by setting the |g:vimwiki_folding| variable to +the desired value in your configuration file: > + + let g:vimwiki_folding = 'value' + +Here's an example of how folds work with |g:vimwiki_folding| set to 'list': + += My current task = +* [ ] Do stuff 1 + * [ ] Do substuff 1.1 + * [ ] Do substuff 1.2 + * [ ] Do substuff 1.2.1 + * [ ] Do substuff 1.2.2 + * [ ] Do substuff 1.3 +* [ ] Do stuff 2 +* [ ] Do stuff 3 + +Hit |zM| : += My current task = +* [ ] Do stuff 1 [6] --------------------------------------~ +* [ ] Do stuff 2 +* [ ] Do stuff 3 + +Hit |zr| : += My current task = +* [ ] Do stuff 1 + * [ ] Do substuff 1.1 + * [ ] Do substuff 1.2 [3] -------------------------------~ + * [ ] Do substuff 1.3 +* [ ] Do stuff 2 +* [ ] Do stuff 3 + +Hit |zr| one more time : += My current task = +* [ ] Do stuff 1 + * [ ] Do substuff 1.1 + * [ ] Do substuff 1.2 + * [ ] Do substuff 1.2.1 + * [ ] Do substuff 1.2.2 + * [ ] Do substuff 1.3 +* [ ] Do stuff 2 +* [ ] Do stuff 3 + +Note: If you use the default Vimwiki syntax, folding on list items will work +properly only if all of them are indented using the current 'shiftwidth'. +For Markdown and MediaWiki syntax, * or # should be in the first column. + +For maximum control over folds, set |g:vimwiki_folding| to 'custom' so you can +allow other plugins or your vim configuration file to control how folding is +performed. For example, let's say you are using markdown syntax and prefer to +fold so that the last blank line before a header is not folded, you can add +this function to your configuration file: > + + function! VimwikiFoldLevelCustom(lnum) + let pounds = strlen(matchstr(getline(a:lnum), '^#\+')) + if (pounds) + return '>' . pounds " start a fold level + endif + if getline(a:lnum) =~? '\v^\s*$' + if (strlen(matchstr(getline(a:lnum + 1), '^#\+'))) + return '-1' " don't fold last blank line before header + endif + endif + return '=' " return previous fold level + endfunction + +Note that you will also need to add the following vim options to your configuration: > + + augroup VimrcAuGroup + autocmd! + autocmd FileType vimwiki setlocal foldmethod=expr | + \ setlocal foldenable | set foldexpr=VimwikiFoldLevelCustom(v:lnum) + augroup END + +See the |g:vimwiki_folding| documentation for more details. + +============================================================================== +7. Placeholders *vimwiki-placeholders* + +------------------------------------------------------------------------------ +%title Title of the page *vimwiki-title* + +When you htmlize your wiki page, the default title is the filename of the +page. Place > + +%title My books + +into your wiki page if you want another title. + + +------------------------------------------------------------------------------ +%nohtml *vimwiki-nohtml* + +If you do not want a wiki page to be converted to HTML, place: + +%nohtml + +into it. This will also prevent inclusion in the RSS feed. + + +------------------------------------------------------------------------------ +%template *vimwiki-template* + +To apply a concrete HTML template to a wiki page, place: + +%template name + +into it. + +See |vimwiki-option-template_path| for details. + +------------------------------------------------------------------------------ +%date *vimwiki-date* + +The date of the wiki page. The value can be used in the HTML template, see +|vimwiki-option-template_path| for details. To set a specific date string +format, see |vimwiki-option-template_date_format| for details. + +%date 2017-07-08 +%date + +If you omit the date after the placeholder, the date of the HTML conversion is +used. + + +============================================================================== +8. Lists *vimwiki-lists* + +While writing lists, the keys , o and O insert new bullets or numbers as +you would expect it. A new bullet/number is inserted if and only if the cursor +is in a list item. If you use hard line wraps within your lists then you will +need to remap `` to `VimwikiReturn 3 5`, use , or press and +. + +Note that the mapping is not available in all terminals. + +Furthermore, and behave differently when the cursor is behind an +empty list item. See the table below. + +To customize the behavior you should use an autocmd or place the mappings in +`~/.vim/after/ftplugin/vimwiki.vim`. This is necessary to avoid an error that +the command `VimwikiReturn` doesn't exist when editing non Vimwiki files.: > + + autocmd FileType vimwiki inoremap + \ :VimwikiReturn 3 5 + autocmd FileType vimwiki inoremap + \ :VimwikiReturn 2 2 + +Note: Prefixing the mapping with `` expands iabbrev definitions and +requires Vim > 7.3.489. + +The first argument of the command :VimwikiReturn is a number that specifies +when to insert a new bullet/number and when not, depending on whether the +cursor is in a list item or in a normal line: > + + Number │ Before │ After + ====================================== + 1 │ 1. item| │ 1. item + │ │ 2. | + │–––––––––––––––––––––––––––––– ↠default for + │ 1. item │ 1. item + │ continue| │ continue + │ │ | + ====================================== + 2 │ 1. item| │ 1. item + │ │ | + │–––––––––––––––––––––––––––––– ↠default for + │ 1. item │ 1. item + │ continue| │ continue + │ │ 2. | + ====================================== + 3 │ 1. item| │ 1. item + │ │ 2. | + │–––––––––––––––––––––––––––––– + │ 1. item │ 1. item + │ continue| │ continue + │ │ 2. | + ====================================== + 4 │ 1. item| │ 1. item + │ │ | + │–––––––––––––––––––––––––––––– + │ 1. item │ 1. item + │ continue| │ continue + │ │ | +< + +The second argument is a number that specifies what should happen when you +press or behind an empty list item. There are no less than five +possibilities: +> + Number │ Before │ After + ====================================== + 1 │ 1. | │ 1. + │ │ 2. | + ====================================== + 2 │ 1. | │ ↠default for + │ │ 1. | + ====================================== + 3 │ 1. | │ | + │ │ + ====================================== + 4 │ 1. | │ + │ │ | + ====================================== + 5 │ 1. | │ 1. | + │ │ + │–––––––––––––––––––––––––––––– ↠default for + │ 1. | │ | + │ │ +< + + + *vimwiki-list-manipulation* +The level of a list item is determined by its indentation (default and +Markdown syntax) or by the number of list symbols (MediaWiki syntax). + +Use gll and glh in normal mode to increase or decrease the level of a list +item. The symbols are adjusted automatically to the list items around it. +Use gLl and gLh to increase or decrease the level of a list item plus all +list items of lower level below it, that is, all child items. + +Use and to change the level of a list item in insert mode. + +See |vimwiki_gll|, |vimwiki_gLl|, |vimwiki_glh|, |vimwiki_gLh|, +|vimwiki_i_|, |vimwiki_i_| + + +Use gl followed by the desired symbol to change the symbol of a list item or +create one. Type gL and the symbol to change all items of the current list. +For default syntax, the following types are available: > + - hyphen + * asterisk + # hash + 1. number with period + 1) number with parenthesis + a) lower-case letter with parenthesis + A) upper-case letter with parenthesis + i) lower-case Roman numerals with parenthesis + I) upper-case Roman numerals with parenthesis + +Markdown syntax has the following types: > + - hyphen + * asterisk + + plus + 1. number with period + +MediaWiki syntax only has: > + * asterisk + # hash + +In insert mode, use the keys and to switch between +symbols. For convenience, only the commonly used symbols can be reached +through these keys for default syntax. + +Note that such a list: a) b) c) … only goes up to zz), to avoid confusion with +normal text followed by a parenthesis. +Roman numerals go up to MMMM) and numbers up to 2147483647. or +9223372036854775807. depending if your Vim is 32 or 64 bit. + +Also, note that you can, of course, mix different list symbols in one list, but +if you have the strange idea of putting a list with Roman numerals right after +a list using letters or vice versa, Vimwiki will get confused because it +cannot distinguish which is which (at least if the types are both upper case +or both lower case). + +See |vimwiki_glstar|, |vimwiki_gl#| |vimwiki_gl-|, |vimwiki_gl-|, +|vimwiki_gl1|, |vimwiki_gla|, |vimwiki_glA|, |vimwiki_gli|, |vimwiki_glI| + + +Use glr and gLr if the numbers of a numbered list are mixed up. See +|vimwiki_glr| and |vimwiki_gLr|. + + +------------------------------------------------------------------------------ +Todo lists *vimwiki-todo-lists* + +You can have todo lists -- lists of items you can check/uncheck. + +Consider the following example: > + = Toggleable list of todo items = + * [X] Toggle list item on/off. + * [X] Simple toggling between [ ] and [X]. + * [X] All list's subitems should be toggled on/off appropriately. + * [X] Toggle child subitems only if current line is list item + * [X] Parent list item should be toggled depending on its child items. + * [X] Make numbered list items toggleable too + * [X] Add highlighting to list item boxes + * [X] Add [ ] to the next list item created with o, O and . + +Pressing on the first list item will toggle it and all of its child +items: > + = Toggleable list of todo items = + * [ ] Toggle list item on/off. + * [ ] Simple toggling between [ ] and [X]. + * [ ] All of a list's subitems should be toggled on/off appropriately. + * [ ] Toggle child subitems only if the current line is a list item. + * [ ] Parent list item should be toggled depending on their child items. + * [X] Make numbered list items toggleable too. + * [X] Add highlighting to list item boxes. + * [X] Add [ ] to the next list item created using o, O or . + +Pressing on the third list item will toggle it and adjust all of its +parent items: > + = Toggleable list of todo items = + * [.] Toggle list item on/off. + * [ ] Simple toggling between [ ] and [X]. + * [X] All of a list's subitems should be toggled on/off appropriately. + * [ ] Toggle child subitems only if current line is list item. + * [ ] Parent list item should be toggled depending on its child items. + * [ ] Make numbered list items toggleable too. + * [ ] Add highlighting to list item boxes. + * [ ] Add [ ] to the next list item created using o, O or . + +Parent items should change when their child items change unless disabled via +|vimwiki-option-listsyms_propagate|. If not, use |vimwiki_glr|. The symbol +between [ ] depends on the percentage of toggled child items (see also +|vimwiki-option-listsyms|): > + [ ] -- 0% + [.] -- 1-33% + [o] -- 34-66% + [O] -- 67-99% + [X] -- 100% + +You can use |vimwiki_gln| and |vimwiki_glp| to change the "done" status of a +checkbox without a childitem. + +It is possible to toggle several list items using visual mode. But note that +instead of toggling every item individually, all items get checked if the +first item was unchecked and all items get unchecked if the first item was +checked. + +Use gl (see |vimwiki_gl|) to remove a single checkbox and +gL (see |vimwiki_gL|) to remove all checkboxes of the list the +cursor is in. + +You can mark an item as rejected ("won't do") with +|vimwiki_glx|. A rejected item will not influence the status of its parents. + + +============================================================================== +9. Tables *vimwiki-tables* + +Use the :VimwikiTable command to create a default table with 5 columns and 2 +rows: > + + | | | | | | + |---|---|---|---|---| + | | | | | | +< + +Tables are auto-formattable. Let's add some text into first cell: > + + | First Name | | | | | + |---|---|---|---|---| + | | | | | | +< + +Whenever you press , or leave Insert mode, the table is formatted: > + + | First Name | | | | | + |------------|---|---|---|---| + | | | | | | +< + +You can easily create nice-looking text tables, just press and enter new +values: > + + | First Name | Last Name | Age | City | e-mail | + |------------|------------|-----|----------|----------------------| + | Vladislav | Pokrishkin | 31 | Moscow | vlad_pok@smail.com | + | James | Esfandiary | 27 | Istanbul | esfandiary@tmail.com | +< + +To indent table indent the first row. Then format it with 'gqq'. + +You can specify the type of horizontal alignment for columns in the separator +using the ':' character. The default is left-align. > + + | Date | Item | Price | + |------------|:------:|--------:| + | yest | Coffee | $15.00 | + | 2017-02-13 | Tea | $2.10 | + | 2017-03-14 | Cake | $143.12 | +< + +============================================================================== +10. Diary *vimwiki-diary* + +The diary helps you make daily notes. You can easily add information into +Vimwiki that should be sorted out later. Just hit ww to create +a new note for today with a name based on the current date. + +To generate the diary section with all available links one can use +|:VimwikiDiaryGenerateLinks| or wi . + +Note: it works only for diary index file. + +Example of diary section: > + = Diary = + + == 2011 == + + === December === + * [[2011-12-09]] + * [[2011-12-08]] + +The diary can be used with a frequency other than daily. See the appropriate +per-wiki options. + +See |g:vimwiki_diary_months| if you would like to rename months. + +------------------------------------------------------------------------------ +Calendar integration *vimwiki-calendar* + +If you have Calendar.vim installed you can use it to create diary notes. +Just open calendar with :Calendar and tap on the date. A wiki file +will be created in the default wiki's diary. + +Get it from http://www.vim.org/scripts/script.php?script_id=52 + +See |g:vimwiki_use_calendar| option to turn it off/on. + + +------------------------------------------------------------------------------ +Markdown export + +If you use markdown as the syntax for your wiki, there is a rubygem available +at https://github.com/patrickdavey/vimwiki_markdown which you can use to +convert the wiki markdown files into html. + +Also, See |vimwiki-option-html_filename_parameterization| for supporting +functionality. + +============================================================================== +11. Anchors *vimwiki-anchors* + +Every header, tag, and bold text can be used as an anchor. To jump to it, use +a wikilink of the form > + [[file#anchor]] + +For example, consider the following file "Todo.wiki": > + = My tasks = + :todo-lists: + == Home == + - [ ] bathe my dog + == Work == + - [ ] beg for *pay rise* + == Knitting club == + === Knitting projects === + - [ ] a *funny pig* + - [ ] a *scary dog* + +Then, to jump from your index.wiki directly to your knitting projects, use: > + [[Todo#Knitting projects]] + +Or, to jump to an individual project, use this link: > + [[Todo#funny pig]] + +Or, to jump to a tag, use this link: > + [[Todo#todo-lists]] + +If there are multiple instances of an anchor, you can use the long form which +consists of the complete header hierarchy, separated by '#': > + [[Todo#My tasks#Knitting club#Knitting projects#scary dog]] + +If you don't feel like typing the whole stuff, type just [[Todo# and then +|i_CTRL-X_CTRL-O| to start the omni completion of anchors. + +For jumping inside a single file, you can omit the file in the link: > + [[#pay rise]] + + +------------------------------------------------------------------------------ +Table of Contents *vimwiki-toc* *vimwiki-table-of-contents* + +You can create a "table of contents" at the top of your wiki file. +The command |:VimwikiTOC| creates the magic header > + = Contents = +in the current file and below it a list of all the headers in this file as +links, so you can directly jump to specific parts of the file. + +For the indentation of the list, the value of |vimwiki-option-list_margin| is +used. + +If you don't want the TOC to sit in the very first line, e.g. because you have +a modeline there, put the magic header in the second or third line and run +:VimwikiTOC to update the TOC. + +If English is not your preferred language, set the option +|g:vimwiki_toc_header| to your favorite translation. + +If you want to keep the TOC up to date automatically, use the option +|vimwiki-option-auto_toc|. + + +------------------------------------------------------------------------------ +Tagbar integration *vimwiki-tagbar* + +As an alternative to the Table of Contents, you can use the Tagbar plugin +(https://preservim.github.io/tagbar/) to show the headers of your wiki files +in a side pane. +Download the Python script from +https://raw.githubusercontent.com/vimwiki/utils/master/vwtags.py and follow +the instructions in it. + + +============================================================================== +12. Options *vimwiki-options* + +There are global options and local (per-wiki) options available to tune +Vimwiki. + +Global options are configured via global variables. For a complete list of +them, see |vimwiki-global-options|. + +Local options for multiple independent wikis are stored in a single global +variable |g:vimwiki_list|. The per-wiki options can be registered in advance, +as described in |vimwiki-register-wiki|, or may be registered on the fly as +described in |vimwiki-temporary-wiki|. For a list of per-wiki options, see +|vimwiki-local-options|. + +A note for Vim power users: +If you have an elaborated Vim setup, where you e.g. load plugins +conditionally, make sure the settings are set before Vimwiki loads (that is, +before plugin/vimwiki.vim is sourced). If this is not possible, try this +command after the Vimwiki settings are (re-) set: > + :call vimwiki#vars#init() +If you also want to reload syntax variables, prefix the last command by: > + :unlet g:vimwiki_syntaxlocal_vars + +------------------------------------------------------------------------------ +12.1 Registered Wiki *g:vimwiki_list* *vimwiki-register-wiki* + +One or more wikis can be registered using the |g:vimwiki_list| variable. + +Each item in |g:vimwiki_list| is a |Dictionary| that holds all customizations +available for a distinct wiki. The options dictionary has the form: > + {'option1': 'value1', 'option2': 'value2', ...} + +Consider the following: > + let g:vimwiki_list = [{'path': '~/my_site/', 'path_html': '~/public_html/'}] + +This defines one wiki located at ~/my_site/. When converted to HTML, the +produced HTML files go to ~/public_html/ . + +Another example: > + let g:vimwiki_list = [{'path': '~/my_site/', 'path_html': '~/public_html/'}, + \ {'path': '~/my_docs/', 'ext': '.mdox'}] + +defines two wikis: the first as before, and the second one located in +~/my_docs/, with files that have the .mdox extension. + +An empty |Dictionary| in g:vimwiki_list is the wiki with default options: > + let g:vimwiki_list = [{}, + \ {'path': '~/my_docs/', 'ext': '.mdox'}] + +For clarity, in your .vimrc file you can define wiki options using separate +|Dictionary| variables and subsequently compose them into |g:vimwiki_list|. > + let wiki_1 = {} + let wiki_1.path = '~/my_docs/' + let wiki_1.html_template = '~/public_html/template.tpl' + let wiki_1.nested_syntaxes = {'python': 'python', 'c++': 'cpp'} + + let wiki_2 = {} + let wiki_2.path = '~/project_docs/' + let wiki_2.index = 'main' + + let g:vimwiki_list = [wiki_1, wiki_2] +< + + +------------------------------------------------------------------------------ +12.2 Temporary Wiki *vimwiki-temporary-wiki* + + +The creation of temporary wikis allows you to create a wiki on the fly. + +If a file with a registered wiki extension (see |vimwiki-register-extension|) +is opened in a directory that: 1) is not listed in |g:vimwiki_list|, and 2) is +not a subdirectory of any such directory, then a temporary wiki is created and +appended to the list of configured wikis in |g:vimwiki_list|. + +In addition to Vimwiki's editing functionality, the temporary wiki enables: 1) +wiki-linking to other files in the same subtree, 2) highlighting of existing +wiki pages when |vimwiki-option-maxhi| is activated, and 3) HTML generation to +|vimwiki-option-path_html|. + +Temporary wikis are configured using default |vimwiki-local-options|, except +for the path, extension, and syntax options. The path and extension are set +using the file's location and extension. The syntax is set to Vimwiki's +default unless another syntax is registered via |vimwiki-register-extension|. + +Use |g:vimwiki_global_ext| to turn off creation of temporary wikis. + +NOTE: Vimwiki assumes that the locations of distinct wikis do not overlap. + + +------------------------------------------------------------------------------ +12.3 Per-Wiki Options *vimwiki-local-options* + + +*vimwiki-option-path* +------------------------------------------------------------------------------ +Key Default value~ +path ~/vimwiki/ + +Description~ +Wiki files location: > + let g:vimwiki_list = [{'path': '~/my_site/'}] +< + +*vimwiki-option-path_html* +------------------------------------------------------------------------------ +Key Default value~ +path_html '' + +Description~ +Location of HTML files converted from wiki files: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'path_html': '~/html_site/'}] + +If path_html is an empty string, the location is derived from +|vimwiki-option-path| by adding '_html'; i.e. for: > + let g:vimwiki_list = [{'path': '~/okidoki/'}] + +path_html will be set to '~/okidoki_html/'. + + +*vimwiki-option-name* +------------------------------------------------------------------------------ +Key Default value~ +name '' + +Description~ +A name that can be used to create interwiki links: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'name': 'My Wiki'}] + +Valid names can contain letters, numbers, spaces, underscores, and dashes. +If duplicate names are used the interwiki link will jump to the first wiki +with a matching name in |g:vimwiki_list|. + +The assigned wiki name will also be shown in the menu entries in GVim. +See the option |g:vimwiki_menu|. + + +*vimwiki-option-auto_export* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_export 0 0, 1 + +Description~ +Set this option to 1 to automatically generate the HTML file when the +corresponding wiki page is saved: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_export': 1}] + +This will keep your HTML files up to date. + + +*vimwiki-option-auto_toc* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_toc 0 0, 1 + +Description~ +Set this option to 1 to automatically update the table of contents when the +current wiki page is saved: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_toc': 1}] + + +*vimwiki-option-index* +------------------------------------------------------------------------------ +Key Default value~ +index index + +Description~ +Name of wiki index file: > + let g:vimwiki_list = [{'path': '~/my_site/', 'index': 'main'}] + +NOTE: Do not include the extension. + + +*vimwiki-option-ext* +------------------------------------------------------------------------------ +Key Default value~ +ext .wiki + +Description~ +Extension of wiki files: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'index': 'main', 'ext': '.document'}] + +< +*vimwiki-option-syntax* +------------------------------------------------------------------------------ +Key Default value Values~ +syntax default default, markdown, or media + +Description~ +Wiki syntax. You can use different markup languages (currently: Vimwiki's +default, Markdown, and MediaWiki), but only Vimwiki's default markup will be +converted to HTML at the moment. + +To use Markdown's wiki markup: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'syntax': 'markdown', 'ext': '.md'}] + +*vimwiki-option-links_space_char* +------------------------------------------------------------------------------ +Key Default value~ +links_space_char ' ' + +Description~ +Set the character (or string) used to replace spaces when creating a link. For +example, setting '_' would transform the string 'my link' into [[my_link]] and +the created file would be my_link.wiki. The default behavior does not replace +spaces. + +To set the space replacement character: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'links_space_char': '_'}] +< + +*vimwiki-option-template_path* +------------------------------------------------------------------------------ +Key Default value~ +template_path ~/vimwiki/templates/ + +Description~ +Setup path for HTML templates: > + let g:vimwiki_list = [{'path': '~/my_site/', + \ 'template_path': '~/public_html/templates/', + \ 'template_default': 'def_template', + \ 'template_ext': '.html'}] + +There could be a bunch of templates: > + def_template.html + index.html + bio.html + person.html +etc. + +Each template could look like: > + + + + %title% + + + +
+ %content% +
+

Page created on %date%

+ + + +where + `%title%` is replaced by a wiki page name or by a |vimwiki-title| + `%date%` is replaced with the current date or by |vimwiki-date| + `%root_path%` is replaced by a count of ../ for pages buried in subdirs: + if you have wikilink [[dir1/dir2/dir3/my page in a subdir]] then + `%root_path%` is replaced by '../../../'. + `%wiki_path%` Path to current wiki-file.` The file path to the current wiki + file. For example, if you are on page a/b.wiki %wiki-path% contains + "a/b.wiki". Mostly useful if you want to link the to raw wiki page from + the rendered version. + + `%content%` is replaced by a wiki file content. + + +The default template will be applied to all wiki pages unless a page specifies +a template. Consider you have wiki page named 'Maxim.wiki' and you want apply +'person.html' template to it. Just add: > + %template person +to that page. + + +*vimwiki-option-template_default* +------------------------------------------------------------------------------ +Key Default value~ +template_default default + +Description~ +Setup default template name (without extension). + +See |vimwiki-option-template_path| for details. + + +*vimwiki-option-template_ext* +------------------------------------------------------------------------------ +Key Default value~ +template_ext .tpl + +Description~ +Setup template filename extension. + +See |vimwiki-option-template_path| for details. + + +*vimwiki-option-template_date_format* +------------------------------------------------------------------------------ +Key Default value~ +template_date_format %Y-%m-%d + +Description~ +Setup date string format in templates. + +See |vimwiki-date| for details. + + +*vimwiki-option-css_name* +------------------------------------------------------------------------------ +Key Default value~ +css_name style.css + +Description~ +Setup CSS file name: > + let g:vimwiki_list = [{'path': '~/my_pages/', + \ 'css_name': 'main.css'}] +< +or even > + let g:vimwiki_list = [{'path': '~/my_pages/', + \ 'css_name': 'css/main.css'}] +< +Vimwiki comes with a default CSS file "style.css". + + +*vimwiki-option-maxhi* +------------------------------------------------------------------------------ +Key Default value Values~ +maxhi 0 0, 1 + +Description~ +If on, wiki links to non-existent wiki files are highlighted. However, it can +be quite slow. If you still want it, set maxhi to 1: > + let g:vimwiki_list = [{'path': '~/my_site/', 'maxhi': 1}] + + +*vimwiki-option-nested_syntaxes* +------------------------------------------------------------------------------ +Key Default value Values~ +nested_syntaxes {} pairs of highlight keyword and Vim filetype + +Description~ +You can configure preformatted text to be highlighted with any syntax +available for Vim. +For example the following setup in your vimrc: > + let wiki = {} + let wiki.path = '~/my_wiki/' + let wiki.nested_syntaxes = {'python': 'python', 'c++': 'cpp'} + let g:vimwiki_list = [wiki] + +would give you Python and C++ highlighting in: > + {{{class="brush: python" + for i in range(1, 5): + print(i) + }}} + + {{{class="brush: c++" + #include "helloworld.h" + int helloworld() + { + printf("hello world"); + } + }}} + +or in: > + {{{c++ + #include "helloworld.h" + int helloworld() + { + printf("hello world"); + } + }}} + + {{{python + for i in range(1, 5): + print(i) + }}} + + +*vimwiki-option-automatic_nested_syntaxes* +------------------------------------------------------------------------------ +Key Default value~ +automatic_nested_syntaxes 1 + +Description~ +If set, the nested syntaxes (|vimwiki-option-nested_syntaxes|) are +automatically derived when opening a buffer. +Just write your preformatted text in your file like this > + {{{xxx + my preformatted text + }}} + +where xxx is a filetype which is known to Vim. For example, for C++ +highlighting, use "cpp" (not "c++"). For a list of known filetypes, type +":setf " and hit Ctrl+d. + +Note that you may have to reload the file (|:edit|) to see the highlight. + +Since every file is scanned for the markers of preformatted text when it is +opened, it can be slow when you have huge files. In this case, set this option +to 0. + + +*vimwiki-option-diary_rel_path* +------------------------------------------------------------------------------ +Key Default value~ +diary_rel_path diary/ + +Description~ +The path to the diary wiki files, relative to |vimwiki-option-path|. + + +*vimwiki-option-diary_index* +------------------------------------------------------------------------------ +Key Default value~ +diary_index diary + +Description~ +Name of wiki-file that holds all links to dated wiki files. + + +*vimwiki-option-diary_header* +------------------------------------------------------------------------------ +Key Default value~ +diary_header Diary + +Description~ +Name of the header in |vimwiki-option-diary_index| where links to dated +wiki-files are located. + + +*vimwiki-option-diary_sort* +------------------------------------------------------------------------------ +Key Default value Values~ +diary_sort desc desc, asc + +Description~ +Sort links in a diary index page. + + +*vimwiki-option-diary_caption_level* +------------------------------------------------------------------------------ +Key Default value~ +diary_caption_level 0 + +Description~ +Controls the presence of captions in the diary index linking to headers within +the diary pages. + +Possible values: +-1: No headers are read from the diary page. + 0: The first header from the diary page is used as the caption. + There are no sub-captions. + 1: Captions are created for headers of level 1 in the diary page. + 2: Captions are created for headers up to level 2 in the diary page. + etc. + +When the value is >= 1, the primary caption of each diary page is set to the +first header read from that page if it is the unique lowest-level header. + + +*vimwiki-option-diary_frequency* +------------------------------------------------------------------------------ +Key Default value~ +diary_frequency daily + +Description~ +Controls the diary frequency used to create the date for which a diary entry +is created. + +Possible values: + daily: Create a diary entry dated for each day. + weekly: Create a diary entry dated for the beginning of each week. +monthly: Create a diary entry dated for the beginning of each month. + yearly: Create a diary entry dated for the beginning of each year. + + +*vimwiki-option-diary_start_week_day* +------------------------------------------------------------------------------ +Key Default value~ +diary_start_week_day monday + +Description~ +Set the day to begin each week. + +Possible values: +monday, tuesday, wednesday, thursday, friday, saturday, sunday + + +*vimwiki-option-custom_wiki2html* +------------------------------------------------------------------------------ +Key Default value~ +custom_wiki2html '' + +Description~ +The full path to a user-provided script that converts a wiki page to HTML. +Vimwiki calls the provided |vimwiki-option-custom_wiki2html| script from the +command-line, using |:!| invocation. + +The following arguments, in this order, are passed to the script: + +1. force : [0/1] overwrite an existing file +2. syntax : the syntax chosen for this wiki +3. extension : the file extension for this wiki +4. output_dir : the full path of the output directory +5. input_file : the full path of the wiki page +6. css_file : the full path of the css file for this wiki +7. template_path : the full path to the wiki's templates +8. template_default : the default template name +9. template_ext : the extension of template files +10. root_path : a count of ../ for pages buried in subdirs + For example, if you have wikilink [[dir1/dir2/dir3/my page in a subdir]] + then this argument is '../../../'. +11. custom_args : custom arguments that will be passed to the conversion + (can be defined in g:vimwiki_list as 'custom_wiki2html_args' parameter, + see |vimwiki-option-custom_wiki2html_args|) + script. + +Options 7-11 are experimental and may change in the future. If any of these +parameters is empty, a hyphen "-" is passed to the script in its place. + +For an example and further instructions, refer to the following script: + + $VIMHOME/autoload/vimwiki/customwiki2html.sh + +An alternative converter was developed by Jason6Anderson, and can +be located at https://github.com/vimwiki-backup/vimwiki/issues/384 + +To use the internal wiki2html converter, use an empty string (the default). + + +*vimwiki-option-custom_wiki2html_args* +----------------------------------------------------------------------------- +Key Default value~ +custom_wiki2html_args '' + +Description~ +If a custom script is called with |vimwiki-option-custom_wiki2html|, additional +parameters can be passed using this option: > + let g:vimwiki_list = [{'path': '~/path/', 'custom_wiki2html_args': 'stuff'}] + + +*vimwiki-option-list_margin* +------------------------------------------------------------------------------ +Key Default value~ +list_margin -1 (0 for markdown) + +Description~ +Width of left-hand margin for lists. When negative, the current 'shiftwidth' +is used. This affects the appearance of the generated links (see +|:VimwikiGenerateLinks|), the Table of contents (|vimwiki-toc|) and the +behavior of the list manipulation commands |:VimwikiListChangeLvl| and the +local mappings |vimwiki_glstar|, |vimwiki_gl#| |vimwiki_gl-|, |vimwiki_gl-|, +|vimwiki_gl1|, |vimwiki_gla|, |vimwiki_glA|, |vimwiki_gli|, |vimwiki_glI| and +|vimwiki_i__|. + +Note: if you use Markdown or MediaWiki syntax, you probably would like to set +this option to 0, because every indented line is considered verbatim text. + + +*vimwiki-option-bullet_types* +------------------------------------------------------------------------------ +Key Default value~ +bullet_types ['-', '*', '#'] (default-syntax) + ['-', '*', '+'] (markdown-syntax) + ['*', '#'] (mediawiki-syntax) + +List of the characters that can be used as bullets of lists. The default value +depends on the chosen syntax. + +You can set it to include more fancy symbols like this: +> + let g:vimwiki_list = [{'path': '~/path/', 'bullet_types' = ['-', '•', '→']}] + + +*vimwiki-option-cycle_bullets* +------------------------------------------------------------------------------ +Key Default value~ +cycle_bullets 0 + +If set to 1 (true), cycle through |bullet_types| when changing list element +identation + + +*vimwiki-option-generated_links_caption* +------------------------------------------------------------------------------ +Key Default value~ +generated_links_caption 0 + +Default syntax only. If set to 1 (true), use the [[URL|DESCRIPTIOM]] when +calling |:VimwikiGenerateLinks|. DESCRIPTION will be the first header in the +corresbonding file found in the first n lines, where n is set by +|g:vimwiki_max_scan_for_caption| (Default 5). If no caption is found fallback +to [[URL]] only. + + +*vimwiki-option-listsyms* +------------------------------------------------------------------------------ +Key Default value~ +listsyms ' .oOX' + +String of at least two symbols to show the progression of todo list items. +Default value is ' .oOX'. This overwrites the global |g:vimwiki_listsyms| on a +per wiki base. + +The first char is for 0% done items. +The last is for 100% done items. + +You can set it to some more fancy symbols like this: +> + let g:vimwiki_list = [{'path': '~/path/', 'listsyms' = '✗○â—â—✓'}] + + +*vimwiki-option-listsym_rejected* +------------------------------------------------------------------------------ + +Character that is used to show that an item of a todo list will not be done. +Default value is '-'. This overwrites the global |g:vimwiki_listsym_rejected| on a +per wiki base. + + +The character used here must not be part of |vimwiki-option-listsyms|. + +You can set it to a more fancy symbol like this: +> + let g:vimwiki_list = [{'path': '~/path/', 'listsym_rejected' = '✗'}] + + +*vimwiki-option-listsyms_propagate* +------------------------------------------------------------------------------ +Key Default value Values~ +listsyms_propagate 1 0, 1 + +Description~ +Set this option to 0 to disable propagation of todo list item status to +parents and children. + + +*vimwiki-option-auto_tags* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_tags 0 0, 1 + +Description~ +Set this option to 1 to automatically update the tags metadata when the +current wiki page is saved: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_tags': 1}] + + +*vimwiki-option-auto_diary_index* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_diary_index 0 0, 1 + +Description~ +Set this option to 1 to automatically update the diary index when opened. +See |:VimwikiDiaryGenerateLinks|: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_diary_index': 1}] + + +*vimwiki-option-auto_generate_links* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_generate_links 0 0, 1 + +Description~ +Set this option to 1 to automatically update generated links when the +current wiki page is saved: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_generate_links': 1}] + + +*vimwiki-option-auto_generate_tags* +------------------------------------------------------------------------------ +Key Default value Values~ +auto_generate_tags 0 0, 1 + +Description~ +Set this option to 1 to automatically update generated tags when the +current wiki page is saved: > + let g:vimwiki_list = [{'path': '~/my_site/', 'auto_generate_tags': 1}] + + +*vimwiki-option-exclude_files* +------------------------------------------------------------------------------ +Key Default value Values~ +exclude_files [] list of file patterns to exclude + +Description~ +Set this option to a list of file patterns to exclude when checking or +generating links: > + let g:vimwiki_list = [{'path': '~/my_site/', 'exclude_files': ['**/README.md']}] + +*vimwiki-option-html_filename_parameterization* +------------------------------------------------------------------------------ +Key Default value Values~ +html_filename_parameterization 0 0, 1 + +Description~ +This setting is for integration with the vimwiki_markdown gem. If this is set +to 1 it alters the check for generated html filenames to match what +vimwiki_markdown generates. This means that it prevents unnecessary +regeneration of HTML files. + +This setting also turns off the automatic deletion of files +in the site_html directory which don't match existing wiki files. + +------------------------------------------------------------------------------ +*g:vimwiki_list_ignore_newline* + +This is HTML related. +Convert newlines to
s in multiline list items. + +Value Description~ +0 Newlines in a list item are converted to
s. +1 Ignore newlines. + +Default: 1 + +------------------------------------------------------------------------------ +*g:vimwiki_text_ignore_newline* + +This is HTML related. +Convert newlines to
s in text. + +Value Description~ +0 Newlines in text are converted to
s. +1 Ignore newlines. + +Default: 1 + +*vimwiki-option-rss_name* +------------------------------------------------------------------------------ +Key Default value~ +rss_name rss.xml + +Description~ +Setup RSS file name: > + let g:vimwiki_list = [{'path': '~/my_pages/', 'rss_name': 'feed.rss'}] +< +Vimwiki will generate an RSS feed for the diary in this file. + +*vimwiki-option-rss_max_items* +------------------------------------------------------------------------------ +Key Default value~ +rss_max_items 10 + +Description~ +This setting limits the number of diary entries exported into the RSS feed. + +*vimwiki-option-base_url* +------------------------------------------------------------------------------ +Key Default value~ +base_url '' + +Description~ +This setting specifies the URL where the generated VimWiki HTML pages can +be reached. It is used for the link to the RSS feed and for links to the +diary entries inside the feed. + +*g:vimwiki_toc_header* +------------------------------------------------------------------------------ + +A string with the magic header that tells Vimwiki where the Table of Contents +(see |vimwiki-toc|) is located in a file. You can change it to the +appropriate word in your mother tongue like this: > + let g:vimwiki_toc_header = 'Inhalt' + +The default is 'Contents'. + +*g:vimwiki_toc_header_level* +------------------------------------------------------------------------------ + +The header level of the Table of Contents (see |vimwiki-toc|). Valid values +are from 1 to 6. + +The default is 1. + +*g:vimwiki_toc_link_format* +------------------------------------------------------------------------------ + +The format of the links in the Table of Contents (see |vimwiki-toc|). + + +Value Description~ +0 Extended: The link contains the description and URL. URL + references all levels. +1 Brief: The link contains only the URL. URL references only + the immediate level. + +Default: 0 + +*vimwiki-option-color_dic* +------------------------------------------------------------------------------ + +Dictionary containing the possible html colors for |:VimwikiColorize| the +keys are the color names used as argument, the values are a list [foreground, +background] of the color. For example: + +{'red': ['#cc241d', ''], 'bred': ['', '#cc241d']} + +Provides two colors to |:VimwikiColorize|: 'red' => red foreground and 'bred' +=> red background. + + +*g:vimwiki-option-rx_todo* +------------------------------------------------------------------------------ + +Regular expression used to highlight different TODO words. + +Default: `\C\<\%(TODO\|DONE\|STARTED\|FIXME\|FIXED\|XXX\)\>` + + +*vimwiki-option-color_tag_template* +------------------------------------------------------------------------------ + +Not supposed to be edited already: a regex with __COLORFG__, __COLORBG__ and +__CONTENT__ placeholders to surround the content with a tag to define its +color. (See autoload/vimwiki/vars.vim) + +------------------------------------------------------------------------------ +12.4 Syntax Options *vimwiki-syntax-options* + +Syntax options are configured using the following pattern: > + + let g:vimwiki_syntax_list['markdown']['bullet_type'] = ['*', '-', '+'] + +Where: +- `markdown` is the syntax name. It can be (`default`, `markdown` or `media`) +- `bullet_type` is the option_name (see below) +- `['*', '-', '+']` is the option value + + +------------------------------------------------------------------------------ +12.5 Global Options *vimwiki-global-options* + + +Global options are configured using the following pattern: > + + let g:vimwiki_global_ext = 1 + +Where: +- `global_ext` is the option name +- `1` is the option value + +------------------------------------------------------------------------------ +*g:vimwiki_schemes_web* *g:vimwiki_schemes_any* + +List of know schemes. shemes_web will match if there is a "//" like in +https://github.com + +Example: ~ +let g:vimwiki_schemes_web = ['http', 'https'] +Default:~ +['http', 'https', 'file', ... , 'git', 'ssh', 'fish', 'sftp'] + +------------------------------------------------------------------------------ +*g:vimwiki_hl_headers* + +Highlight headers with =Reddish=, ==Greenish==, ===Blueish=== colors. + +Value Description~ +1 Use VimwikiHeader1 - VimwikiHeader6 group colors to highlight + different header levels. +0 Use |hl-Title| color for headers. +Default: 0 + +------------------------------------------------------------------------------ +*g:vimwiki_hl_cb_checked* + +Highlight checked list items with a special color: + + * [X] the whole line can be highlighted with the option set to 1. + * this line is highlighted as well with the option set to 2 + * [ ] this line is never highlighted + +Value Description~ +0 Don't highlight anything. +1 Highlight only the first line of a checked [X] list item. +2 Highlight a complete checked list item and all its child items. + +Default: 0 + +The |group-name| "Comment" is used for highlighting. + +Note: Option 2 does not work perfectly. Specifically, it might break if the +list item contains preformatted text or if you mix tabs and spaces for +indenting. Also, indented headers can be highlighted erroneously. +Furthermore, if your list is long, Vim's highlight can break. To solve this, +consider putting > + au BufEnter *.wiki :syntax sync fromstart +in your .vimrc + +------------------------------------------------------------------------------ +*g:vimwiki_global_ext* + +Control the creation of |vimwiki-temporary-wiki|s. + +If a file with a registered extension (see |vimwiki-register-extension|) is +opened in a directory that is: 1) not listed in |g:vimwiki_list|, and 2) not a +subdirectory of any such directory, then: + +Value Description~ +1 make temporary wiki and append it to |g:vimwiki_list|. +0 don't make temporary wiki in that dir. + +If your preferred wiki extension is .txt then you can > + let g:vimwiki_global_ext = 0 +to restrict Vimwiki's operation to only those paths listed in g:vimwiki_list. +Other text files wouldn't be treated as wiki pages. + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_ext2syntax* *vimwiki-register-extension* + +A many-to-one mapping between file extensions and syntaxes whose purpose is to +register the extensions with Vimwiki. + +E.g.: > + let g:vimwiki_ext2syntax = {'.md': 'markdown', + \ '.mkd': 'markdown', + \ '.wiki': 'media'} + +An extension that is registered with Vimwiki can trigger creation of +a |vimwiki-temporary-wiki|. File extensions used in |g:vimwiki_list| are +automatically registered with Vimwiki using the default syntax. Extensions +mapped with this option will instead use the mapped syntax. + +Default: > + {'.md': 'markdown', '.mkdn': 'markdown', + \ '.mdwn': 'markdown', '.mdown': 'markdown', + \ '.markdown': 'markdown', '.mw': 'media'} + +Note: setting this option will overwrite the default values so include them if +desired. + +------------------------------------------------------------------------------ +*g:vimwiki_menu* + +Create a menu in the menu bar of GVim, where you can open the available wikis. +If the wiki has an assigned name (see |vimwiki-option-name|), the menu entry +will match the name. Otherwise, the final folder of |vimwiki-option-path| will +be used for the name. If there are duplicate entries the index number from +|g:vimwiki_list| will be appended to the name. + +Value Description~ +'' No menu +'Vimwiki' Top level menu "Vimwiki" +'Plugin.Vimwiki' "Vimwiki" submenu of top level menu "Plugin" +etc. + +Default: 'Vimwiki' + + +------------------------------------------------------------------------------ +*g:vimwiki_listsyms* + +String of at least two symbols to show the progression of todo list items. +Default value is ' .oOX'. You can also set this on a per-wiki level with +|vimwiki-option-listsyms|. + +The first char is for 0% done items. +The last is for 100% done items. + +You can set it to some more fancy symbols like this: +> + let g:vimwiki_listsyms = '✗○â—â—✓' + + +------------------------------------------------------------------------------ +*g:vimwiki_listsym_rejected* + +Character that is used to show that an item of a todo list will not be done. +Default value is '-'. You can also set this on a per-wiki level with +|vimwiki-option-listsym_rejected|. + + +The character used here must not be part of |g:vimwiki_listsyms|. + +You can set it to a more fancy symbol like this: +> + let g:vimwiki_listsym_rejected = '✗' + + +------------------------------------------------------------------------------ +*g:vimwiki_folding* + +Enable/disable Vimwiki's folding (outline) functionality. Folding in Vimwiki +can use either the 'expr' or the 'syntax' |foldmethod| of Vim. + +Value Description~ +'' Disable folding +'expr' Folding based on expression (folds sections and code blocks) +'syntax' Folding based on syntax (folds sections; slower than 'expr') +'list' Folding based on expression (folds list subitems; much slower) +'custom' Allow folding options to be set by another plugin or a vim + configuration file + +Default: '' + +Limitations: + - Opening very large files may be slow when folding is enabled. + - 'list' folding is particularly slow with larger files. + - 'list' is intended to work with lists nicely indented with 'shiftwidth'. + +The options above can be suffixed with ':quick' (e.g.: 'expr:quick') in order +to use some workarounds to make folds work faster. + +------------------------------------------------------------------------------ +*g:vimwiki_use_calendar* + +Create new or open existing diary wiki-file for the date selected in Calendar. +See |vimwiki-calendar|. + +Value Description~ +0 Do not use calendar. +1 Use calendar. + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_create_link* + +Create target wiki page if it does not exist. See |:VimwikiFollowLink|. + +Value Description~ +0 Do not create target wiki page. +1 Create target wiki page. + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_markdown_link_ext* + +Append wiki file extension to links in Markdown. This is needed for +compatibility with other Markdown tools. + +Value Description~ +0 Do not append wiki file extension. +1 Append wiki file extension. + +Default: 0 + + +------------------------------------------------------------------------------ +*VimwikiLinkHandler* + +A customizable link handler can be defined to override Vimwiki's behavior when +opening links. Each recognized link, whether it is a wikilink, wiki-include +link or a weblink, is first passed to |VimwikiLinkHandler| to see if it can be +handled. The return value 1 indicates success. + +If the link is not handled successfully, the behavior of Vimwiki depends on +the scheme. "wiki:", "diary:" or schemeless links are opened in Vim. "file:" +and "local:" links are opened with a system default handler. + +You can redefine the VimwikiLinkHandler function in your .vimrc to do +something else: > + + function! VimwikiLinkHandler(link) + try + let browser = 'C:\Program Files\Firefox\firefox.exe' + execute '!start "'.browser.'" ' . a:link + return 1 + catch + echo "This can happen for a variety of reasons ..." + endtry + return 0 + endfunction + +A second example handles a new scheme, "vfile:", which behaves similar to +"file:", but the files are always opened with Vim in a new tab: > + + function! VimwikiLinkHandler(link) + " Use Vim to open external files with the 'vfile:' scheme. E.g.: + " 1) [[vfile:~/Code/PythonProject/abc123.py]] + " 2) [[vfile:./|Wiki Home]] + let link = a:link + if link =~# '^vfile:' + let link = link[1:] + else + return 0 + endif + let link_infos = vimwiki#base#resolve_link(link) + if link_infos.filename == '' + echomsg 'Vimwiki Error: Unable to resolve link!' + return 0 + else + exe 'tabnew ' . fnameescape(link_infos.filename) + return 1 + endif + endfunction + +------------------------------------------------------------------------------ +*VimwikiLinkConverter* + +This function can be overridden in your .vimrc to specify what a link looks +like when converted to HTML. The parameters of the function are: + - the link as a string + - the full path to the wiki file where the link is in + - the full path to the output HTML file +It should return the HTML link if successful or an empty string '' otherwise. + +This example changes how relative links to external files using the "local:" +scheme look like in HTML. Per default, they would become links relative to +the HTML output directory. This function converts them to links relative to +the wiki file, i.e. a link [[local:../document.pdf]] becomes +. Also, this function will copy document.pdf to the +right place. > + + function! VimwikiLinkConverter(link, source_wiki_file, target_html_file) + if a:link =~# '^local:' + let link_infos = vimwiki#base#resolve_link(a:link) + let html_link = vimwiki#path#relpath( + \ fnamemodify(a:source_wiki_file, ':h'), link_infos.filename) + let relative_link = + \ fnamemodify(a:target_html_file, ':h') . '/' . html_link + call system('cp ' . fnameescape(link_infos.filename) . + \ ' ' . fnameescape(relative_link)) + return html_link + endif + return '' + endfunction + +------------------------------------------------------------------------------ +*VimwikiWikiIncludeHandler* + +Vimwiki includes the content of a wiki-include URL as an image by default. + +A trial feature allows you to supply your own handler for wiki-include links. +The handler should return the empty string when it does not recognize or +cannot otherwise convert the link. A customized handler might look like this: > + + " Convert {{URL|#|ID}} -> URL#ID + function! VimwikiWikiIncludeHandler(value) + let str = a:value + + " complete URL + let url_0 = matchstr(str, g:vimwiki_rxWikiInclMatchUrl) + " URL parts + let link_infos = vimwiki#base#resolve_link(url_0) + let arg1 = matchstr(str, VimwikiWikiInclMatchArg(1)) + let arg2 = matchstr(str, VimwikiWikiInclMatchArg(2)) + + if arg1 =~ '#' + return link_infos.filename.'#'.arg2 + endif + + " Return the empty string when unable to process link + return '' + endfunction +< + +------------------------------------------------------------------------------ +*g:vimwiki_table_auto_fmt* + +Enable/disable table auto formatting after leaving INSERT mode. + +Value Description~ +0 Disable table auto formatting. +1 Enable table auto formatting. + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_table_reduce_last_col* + +If set, the last column separator will not be expanded to fill the cell. When +`:set wrap` this option improves how a table is displayed, particularly on +small screens. If |g:vimwiki_table_auto_fmt| is set to 0, this option has no +effect. + +Value Description~ +0 Enable table auto formating for all columns. +1 Disable table auto formating for the last column. + +Default: 0 + + +------------------------------------------------------------------------------ +*g:vimwiki_w32_dir_enc* + +Convert directory name from current 'encoding' into 'g:vimwiki_w32_dir_enc' +before it is created. + +If you have 'enc=utf-8' and set up > + let g:vimwiki_w32_dir_enc = 'cp1251' +< +then following the next link with : > + [[привет/мир]] +> +would convert utf-8 'привет' to cp1251 and create directory with that name. + +Default: '' + + +------------------------------------------------------------------------------ +*g:vimwiki_CJK_length* + +Use a special method to calculate the correct length of the strings with +double-wide characters (to align table cells properly). + +Value Description~ +0 Do not use it. +1 Use it. + +Default: 0 + +Note: Vim 7.3 has a new function |strdisplaywidth()|, so for users of an up to +date Vim, this option is obsolete. + + +------------------------------------------------------------------------------ +*g:vimwiki_dir_link* + +This option is about what to do with links to directories, like +[[directory/]], [[papers/]], etc. + +Value Description~ +'' Open 'directory/' using the standard netrw plugin. +'index' Open 'directory/index.wiki', create if needed. +'main' Open 'directory/main.wiki', create if needed. +etc. + +Default: '' (empty string) + + +------------------------------------------------------------------------------ +*g:vimwiki_html_header_numbering* + +Set this option if you want headers to be auto-numbered in HTML. + +E.g.: > + 1 Header1 + 1.1 Header2 + 1.2 Header2 + 1.2.1 Header3 + 1.2.2 Header3 + 1.3 Header2 + 2 Header1 + 3 Header1 +etc. + +Value Description~ +0 Header numbering is off. +1 Header numbering is on. Headers are numbered starting from + header level 1. +2 Header numbering is on. Headers are numbered starting from + header level 2. +etc. + +Example when g:vimwiki_html_header_numbering = 2: > + Header1 + 1 Header2 + 2 Header2 + 2.1 Header3 + 2.1.1 Header4 + 2.1.2 Header4 + 2.2 Header3 + 3 Header2 + 4 Header2 +etc. + +Default: 0 + + +------------------------------------------------------------------------------ +*g:vimwiki_html_header_numbering_sym* + +Ending symbol for |g:vimwiki_html_header_numbering|. + +Value Description~ +'.' Dot will be added after a header's number. +')' Closing bracket will be added after a header's number. +etc. + +With + let g:vimwiki_html_header_numbering_sym = '.' +headers would look like: > + 1. Header1 + 1.1. Header2 + 1.2. Header2 + 1.2.1. Header3 + 1.2.2. Header3 + 1.3. Header2 + 2. Header1 + 3. Header1 + + +Default: '' (empty) + + +------------------------------------------------------------------------------ +*g:vimwiki_valid_html_tags* + +Case-insensitive comma separated list of HTML tags that can be used in +Vimwiki. When converting to HTML, these tags are left as they are, while +every other tag is escaped. + +Default: 'b,i,s,u,sub,sup,kbd,br,hr' + + +------------------------------------------------------------------------------ +*g:vimwiki_user_htmls* + +Comma-separated list of HTML files that have no corresponding wiki files and +should not be deleted after |:VimwikiAll2HTML|. + +Default: '' + +Example: +Consider you have 404.html and search.html in your Vimwiki 'path_html'. +With: > + let g:vimwiki_user_htmls = '404.html,search.html' +they would not be deleted after |:VimwikiAll2HTML|. + + +------------------------------------------------------------------------------ +*g:vimwiki_conceallevel* + +In Vim 7.3 'conceallevel' is local to the current window, thus if you open a +Vimwiki buffer in a new tab or window, it would be set to the default value. + +Vimwiki sets 'conceallevel' to g:vimwiki_conceallevel every time a Vimwiki +buffer is entered. + +With default settings, Vimwiki conceals one-character markers, shortens long +URLs and hides markers and URL for links that have a description. + +Default: 2 + + +------------------------------------------------------------------------------ +*g:vimwiki_conceal_onechar_markers* + +Control the concealment of one-character markers. + +Setting 'conceal_onechar_markers' to 0 will show the markers, overriding +whatever value is set in |g:vimwiki_conceallevel| + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_conceal_pre* + +Conceal preformatted text markers. For example, +> + {{{python + def say_hello(): + print("Hello, world!") + }}} +> +would appear as simply +> + def say_hello(): + print("Hello, world!") +> +in your wiki file. + +Default: 0 + + +------------------------------------------------------------------------------ +*g:vimwiki_autowriteall* + +Automatically save a modified wiki buffer when switching wiki pages. Has the +same effect as setting the Vim option 'autowriteall', but it works for wiki +files only, while the Vim option is global. +Hint: if you're just annoyed that you have to save files manually to switch +wiki pages, consider setting the Vim option 'hidden' which makes that modified +files don't need to be saved. + +Value Description~ +0 autowriteall is off +1 autowriteall is on + +Default: 1 + + +------------------------------------------------------------------------------ +*g:vimwiki_url_maxsave* + +Setting the value of |g:vimwiki_url_maxsave| to 0 will prevent any link +shortening: you will see the full URL in all types of links, with no parts +being concealed. This option does not affect the concealing of wiki elements +such as bold, italic, wikilinks, etc. + +When positive, the value determines the maximum number of characters that +are retained at the end after concealing the middle part of a long URL. +It could be less: in case one of the characters /,#,? is found near the end, +the URL will be concealed up to the last occurrence of that character. + +Note: + * The conceal feature works only with Vim >= 7.3. + * When using the default |wrap| option of Vim, the effect of concealed links + is not always pleasing, because the visible text on longer lines with + a lot of concealed parts may appear to be strangely broken across several + lines. This is a limitation of Vim's |conceal| feature. + * Many color schemes do not define an unobtrusive color for the Conceal + highlight group - this might be quite noticeable on shortened URLs. + + +Default: 15 + + +------------------------------------------------------------------------------ +*g:vimwiki_diary_months* + +It is a |Dictionary| with the numbers of months and corresponding names. Diary +uses it. + +Redefine it in your .vimrc to get localized months in your diary: +let g:vimwiki_diary_months = { + \ 1: 'Январь', 2: 'Февраль', 3: 'Март', + \ 4: 'Ðпрель', 5: 'Май', 6: 'Июнь', + \ 7: 'Июль', 8: 'ÐвгуÑÑ‚', 9: 'СентÑбрь', + \ 10: 'ОктÑбрь', 11: 'ÐоÑбрь', 12: 'Декабрь' + \ } + +Default: +let g:vimwiki_diary_months = { + \ 1: 'January', 2: 'February', 3: 'March', + \ 4: 'April', 5: 'May', 6: 'June', + \ 7: 'July', 8: 'August', 9: 'September', + \ 10: 'October', 11: 'November', 12: 'December' + \ } + +------------------------------------------------------------------------------ +*g:vimwiki_map_prefix* + +A string which specifies the prefix for all global mappings (and some local +ones). Use it to avoid conflicts with other plugins. Note that it must be +defined before the plugin loads. > + let g:vimwiki_map_prefix = 'e' + +The default is 'w'. + + +------------------------------------------------------------------------------ +*g:vimwiki_auto_chdir* + +When set to 1, enables auto-cd feature. Whenever Vimwiki page is opened, +Vimwiki performs an |:lcd| to the root Vimwiki folder of the page's wiki. + + +Value Description~ +0 Do not change directory. +1 Change directory to root Vimwiki folder on opening page. + +Default: 0 + + +------------------------------------------------------------------------------ +*g:vimwiki_links_header* + +A string with the magic header that tells Vimwiki where the generated links +are located in a file. You can change it to the appropriate word in your +mother tongue like this: > + let g:vimwiki_links_header = 'Generierte Links' + +The default is 'Generated Links'. + + +------------------------------------------------------------------------------ +*g:vimwiki_links_header_level* + +The header level of generated links. Valid values are from 1 to 6. + +The default is 1. + + +------------------------------------------------------------------------------ +*g:vimwiki_listing_hl* + +When set to 1, enables syntax highlighting in resulting HTML. Whenever a code +block is encountered the |g:vimwiki_listing_hl_command| is invoked on the +code block. + + +Value Description~ +0 Do not highlight code blocks in HTML. +1 Highlight code blocks in HTML. see |g:vimwiki_listing_hl_command| + +Default: 0 + + +------------------------------------------------------------------------------ +*g:vimwiki_listing_hl_command* + +A string specifying the command for highlighting code blocks in html. The +argument is going to be a file with an extension specified by a +type=extension. For example, a python listing would be written like s: > + {{{type=py + print("hello world") + }}} +The argument in this case is going to be a `foo.py`. The result of the +highlighting command is going to be enclosed in pre tags with the `type` +attribute. > +
+  %output of highlight command&
+  
+ +The default is 'pygmentize -f html'. + + +------------------------------------------------------------------------------ +*g:vimwiki_tags_header* + +A string with the magic header that tells Vimwiki where the generated tags +are located in a file. You can change it to the appropriate word in your +mother tongue like this: > + let g:vimwiki_tags_header = 'Generierte Stichworte' + +The default is 'Generated Tags'. + + +------------------------------------------------------------------------------ +*g:vimwiki_tags_header_level* + +The header level of generated tags. Valid values are from 1 to 5. + +The default is 1. + + +------------------------------------------------------------------------------ +*g:vimwiki_markdown_header_style* + +The number of newlines to be inserted after a header is generated. Valid +values are from 0 to 2. + +The default is 1. + + +------------------------------------------------------------------------------ +*g:vimwiki_auto_header* + +Set this option to 1 to automatically generate a level 1 header when creating +a new wiki page. This option is disabled for the wiki index and the diary +index. Spaces replaced with |vimwiki-option-links_space_char| are reverted +back to spaces in the generated header, which will match the filename +except for the characters that were reverted to spaces. + +For example, with `links_space_char` set to `'_'` creating a link from the text +`foo bar link` would result in `[[foo_bar_link]]` and the file +`foo_bar_link.wiki`. The generated header would be `= foo bar link =` + +The default is 0. + + +------------------------------------------------------------------------------ +*g:vimwiki_key_mappings* + +A dictionary that is used to enable/disable various key mapping groups. To +disable a specific group set the value for the associated key to 0. +For example: > + + let g:vimwiki_key_mappings = + \ { + \ 'headers': 0, + \ 'text_objs': 0, + \ } + +To disable ALL Vimwiki key mappings use: > + + let g:vimwiki_key_mappings = { 'all_maps': 0, } + +The valid key groups and their associated mappings are shown below. + +`all_maps`: + Used to disable all Vimwiki key mappings. +`global`: + |vimwiki-global-mappings| that are defined when Vim starts. +`headers`: + Mappings for header navigation and manipulation: + |vimwiki_=|, |vimwiki_-|, |vimwiki_[[|, |vimwiki_]]|, |vimwiki_[=| + |vimwiki_]=|, |vimwiki_]u| , |vimwiki_[u| +`text_objs`: + |vimwiki-text-objects| mappings. +`table_format`: + Mappings used for table formatting. + |vimwiki_gqq|, |vimwiki_gww|, |vimwiki_gq1|, |vimwiki_gw1| + |vimwiki_|, |vimwiki_| +`table_mappings`: + Table mappings for insert mode. + |vimwiki_|, |vimwiki_| +`lists`: + Mappings for list manipulation. + |vimwiki_|, |vimwiki_gl|, |vimwiki_gL| |vimwiki_gln|, |vimwiki_glp| + |vimwiki_gll|, |vimwiki_gLl|, |vimwiki_glh|, |vimwiki_gLh|, |vimwiki_glr|, |vimwiki_gLr| + |vimwiki_glsar|, |vimwiki_gLstar|, |vimwiki_gl#|, |vimwiki_gL#|, |vimwiki_gl-|, |vimwiki_gL-| + |vimwiki_gl1|, |vimwiki_gL1|, |vimwiki_gla|, |vimwiki_gLa|, |vimwiki_glA|, |vimwiki_gLA| + |vimwiki_gli|, |vimwiki_gLi|, |vimwiki_glI|, |vimwiki_gLI|, |vimwiki_glx| +`lists_return`: + Mappings for lists return in insert mode. + |vimwiki_i_|, |vimwiki_i_| +`links`: + Mappings for link creation and navigation. + |vimwiki_wi|, |vimwiki_|, |vimwiki_|, |vimwiki_| + |vimwiki_|, |vimwiki_|, |vimwiki_|, |vimwiki_| + |vimwiki_|, |vimwiki_wd|, |vimwiki_wr|, |vimwiki_| + |vimwiki_|, |vimwiki_+|, |vimwiki_| +`html`: + Mappings for HTML generation. + |vimwiki_wh|, |vimwiki_whh| +`mouse`: + Mouse mappings, see |vimwiki_mouse|. This option is disabled by default. + +The default is to enable all key mappings except the mouse: > + let g:vimwiki_key_mappings = + \ { + \ 'all_maps': 1, + \ 'global': 1, + \ 'headers': 1, + \ 'text_objs': 1, + \ 'table_format': 1, + \ 'table_mappings': 1, + \ 'lists': 1, + \ 'links': 1, + \ 'html': 1, + \ 'mouse': 0, + \ } + + +------------------------------------------------------------------------------ +*g:vimwiki_filetypes* + +A list of additional fileypes that should be registered to vimwiki files: > + + let g:vimwiki_filetypes = ['markdown', 'pandoc'] + +Would result in the filetype being set to `vimwiki.markdown.pandoc`. This can +be used to enable third party plugins such as custom folding. WARNING: this +option can allow other plugins to overwrite vimwiki settings and operation so +take care when using it. Any plugin that uses a set filetype will be enabled. + +The default is `[ ]` + + +------------------------------------------------------------------------------ +*g:vimwiki_commentstring* + +An option to change the default commentstring. Use + + let g:vimwiki_commentstring = '' + +for html-style comments. Use + + let g:vimwiki_commentstring = "" + +to not set commentstring by vimwiki. + +The default is %%%s. + + +------------------------------------------------------------------------------ +*g:vimwiki_emoji_enable* + +Bitfield: Enable/disable emoji conceal and complete +Note that the |completefunc| is only set if it does not exists already to keep +other plugin works by default. It can be set it manualy with: > + set completefunc=vimwiki#emoji#complete + +To replace emoji alias (like :cat:) by their value (like ðŸ±) in current file: > + %s/:\([^:]\+\):/\=get(vimwiki#emoji#get_dic(), submatch(1), submatch(0))/g + +Emoji features hard copied from https://github.com/junegunn/vim-emoji + +Value Description~ +0 Disable emoji support +1 Enable emoji conceal +2 Enable emoji complete (with |i_CTRL-X_CTRL-U|) +3 Enable both + +Default: 3 + + +------------------------------------------------------------------------------ +*g:vimwiki_tag_format* + +Dictionary to describe the format of the tags vimwiki uses to highlight, +generate and follow_link + +| Key | Default | Description +----------------------------------------------------- ReGeX +| pre | '^\|\s' | Limitations to tag precedence +| pre_mark | ':' | Tag list opener +| in | '[:space:]]\+' | Tag permitted characters +| sep | ':' | Tag separators in a tag list +| post_mark | ':' | Tag list closer +| post | '\s\|$' | Limitations to tag following +----------------------------------------------------- Number +| conceal | 0 | Do conceal the tag +----------------------------------------------------- Character +| cchar | '' | If conceal, the conceal char + + +The default dictionary gets |extends| with the user provided dictionary. So it +is only necessary to provide the values to change. For Example, to use a: +- Tag like: > + <> +- Set: > + let g:vimwiki_tag_format = {'pre_mark': '<<', 'post_mark': '>>', 'sep': '|'} +- Tag like: > + tags: @tag1 @tag2 +- Set: > + let g:vimwiki_tag_format = {'pre': '\(^[ -]*tags\s*: .*\)\@<=', + \ 'pre_mark': '@', 'post_mark': '', 'sep': '>><<'} + + +============================================================================== +13. Getting help *vimwiki-help* + +For questions, discussions, praise or rants there is a mailing list: +https://groups.google.com/forum/#!forum/vimwiki + +Also, there is the IRC channel #vimwiki on irc.libera.chat which can be +accessed via webchat: https://web.libera.chat/?channels=#vimwiki + +============================================================================== +14. Contributing & Bug reports *vimwiki-contributing* + +Your help in making Vimwiki better is really appreciated! +Any help, whether it is a spelling correction or a code snippet to patch -- +everything is welcomed. + +See CONTRIBUTING.md for info about how to file bugs etc. + +============================================================================== +15. Development *vimwiki-development* + +Homepage: http://vimwiki.github.io/ +Github: https://github.com/vimwiki/vimwiki/ +Vim plugins: http://www.vim.org/scripts/script.php?script_id=2226 +Old homepage: http://code.google.com/p/vimwiki/ + +Contributors and their Github usernames in roughly chronological order: + + - Maxim Kim (@habamax) as original author + - the people here: http://code.google.com/p/vimwiki/people/list + - Stuart Andrews (@tub78) + - Tomas Pospichal + - Daniel Schemala (@EinfachToll) as current maintainer + - Larry Hynes (@larryhynes) + - Hector Arciga (@harciga) + - Alexey Radkov (@lyokha) + - Aaron Franks (@af) + - Dan Bernier (@danbernier) + - Carl Helmertz (@chelmertz) + - Karl Yngve LervÃ¥g (@lervag) + - Patrick Davey (@patrickdavey) + - Ivan Tishchenko (@t7ko) + - 修昊 (@Svtter) + - Marcelo D Montu (@mMontu) + - John Kaul + - Hongbo Liu (@hiberabyss) + - @Tomsod + - @wangzq + - Jinzhou Zhang (@lotabout) + - Michael Riley (@optik-aper) + - Irfan Sharif (@irfansharif) + - John Conroy (@jconroy77) + - Christian Rondeau (@christianrondeau) + - Alex Thorne (@thornecc) + - Shafqat Bhuiyan (@priomsrb) + - Bradley Cicenas (@bcicen) + - Michael Thessel (@MichaelThessel) + - Michael F. Schönitzer (@nudin) + - @sqlwwx + - Guilherme Salazar (@salazar) + - Daniel Trnka (@trnila) + - Yuchen Pei (@ycpei) + - @maqiv + - Dawid Ciężarkiewicz (@dpc) + - Drew Hays (@Dru89) + - Daniel Etrata (@danetrata) + - Keith Haber (@kjhaber) + - @beuerle + - Silvio Ricardo Cordeiro (@silvioricardoc) + - @blyoa + - Jonathan McElroy (@jonathanmcelroy) + - @PetrusZ + - Brian Gianforcaro (@bgianfo) + - Ben Burrill (@benburrill) + - Zhuang Ma (@mzlogin) + - Huy Le (@huynle) + - Nick Borden (@hcwndbyw) + - John Campbell (@johnmarcampbell) + - Petrus (@PetrusZ) + - Steven Stallion (@sstallion) + - Daniel Quomsieh (@DQuomsieh) + - Fredrik Arnerup (@farnerup) + - CUI Hao (@cuihaoleo) + - Benjamin Brandtner (@BenjaminBrandtner) + - @sreejith994 + - Raphael Feng (@raphaelfeng) + - Kasper Socha (@fte10kso) + - Nicolas Brailovsky (@nicolasbrailo) + - @BenMcH + - Stefan Huber (@shuber2) + - Hugo Hörnquist (@HugoNikanor) + - Rane Brown (@ranebrown) + - Patrik Willard (@padowi) + - Steve Dondley (@sdondley) + - Alexander Gude (@agude) + - Jonny Bylsma (@jbylsma) + - Shaedil (@Shaedil) + - Robin Lowe (@defau1t) + - Abhinav Gupta (@abhinav) + - Dave Gauer (@ratfactor) + - Martin Tourneboeuf (@tinmarino) + - Mauro Morales (@mauromorales) + - Valtteri Vallius (@kaphula) + - Patrick Stockwell (@patstockwell) + - Henry Qin (@hq6) + - Hugo Hörnquist + - Greg Anders + - Steven Schmeiser + - Monkin (@monkinco) + - @AresMegaGlobal + - Cesar Tessarin (@tessarin) + - Clément BÅ“sch (@ubitux) + - Dave Gauer + - Eric Langlois (@edlanglois) + - James Moriarty + - Lionel Flandrin (@simias) + - Michael Brauweiler (@rattletat) + - Michal Cizmazia (@cizmazia) + - Samir Benmendil (@Ram-Z) + - Stefan Lehmann (@stevesteve) + - @graywolf + - flex (@bratekarate) + - Marius Lopez (@PtitCaius) + - Edward Bassett (@ebassett) + - Aditya Harit (@adi93) + - Gaurang Kher (@gaurangkher) + - Rafael Castillo (@eltrufas) + - Reiner Herrmann (@reinerh) + - Ryan Winograd + - Birger Niklas (@BirgerNi) + - Chip Senkbeil (@chipsenkbeil) + - Jerome Gay (@jeromg) + - Benney Au (@chinwobble) + - David Sierra DiazGranados (@davidsierradz) + - Daniel Moura (@dmouraneto) + - Tomáš JanouÅ¡ek (@liskin) + - Rajesh Sharem (@deepredsky) + - Amit Beka (@amitbeka) + - Yuuy Wei + - Yifan Hu (@yhu266) + - Levi Rizki Saputra (@levirs565) + - Fergus Collins (@C-Fergus) + - Matthew Toohey (@mtoohey31) + - Brennen Bearnes + - Stefan Schuhbäck (@stefanSchuhbaeck) + - Vinny Furia (@vinnyfuria) + - paperbenni (@paperbenni) + - Philipp Oberdiek (@RonMcKay) + - Lily Foster (@lilyinstarlight) + - Jean-Luc Bastarache (@jlbas) + - Youssof Taha (@ysftaha) + - Thomas Leyh (@leyhline) + - nebulaeandstars (@nebulaeandstars) + - dmitry kim (@jsn) + +============================================================================== +16. Changelog *vimwiki-changelog* + + +Issue numbers starting with '#' are issues from +https://github.com/vimwiki/vimwiki/issues/, all others from +http://code.google.com/p/vimwiki/issues/list. They may be accessible from +https://github.com/vimwiki-backup/vimwiki/issues. + +From version 2022.12.02, what would have been 2.6.0 under the prior versioning +scheme, the VimWiki project has adopted a rolling release policy. Once changes +are accepted, they will merge directly to dev, which is now the main branch. +master is retained as a legacy mirror of the dev branch. + +This is somewhat experimental, and will probably be refined over time. + +2022.12.02~ + +New:~ + * Policy: #1235: Move to calendar versioning and rolling release cadence + * Feature: #238: Reuse existing tabs with tab drop + * Issue #621: Feature request: Highlight code listings in HTML + * Issue #290: Calendar plugin, do not sign if no wiki + * Issue #281: Permit `\|` in tables + * PR #1128: VimwikiGoto: Support wiki pages with spaces + * Feature: Add option to use link Description in default syntax if + caption is present. |generated_links_caption| + * PR #1106: Fix trailing closing brace and comma typo + * Feature: VimwikiColorize maps in visual and normal mode `wc` + * Feature: PR #686: add a flag lists_return to disable mappings + to and in insert mode + * Feature: enable re-mapping insert mode table mappings + * Feature: configure expression for Todo words + * Feature: #954 #1041: Add option |vimwiki-option-listsyms_propagate| to + disable todo propagation to parents/children + * Issue #1009: |foldmethod| syntax works for markdown (|g:vimwiki_folding|) + Also the VimwikiHeader1Folding (1..60 regions support end-of-file `/\%$` + as end maker + * Issue #990: Feature request: highlight multiline selection + Add :VimwikiColorize with only support to clorize the current line + * PR #919: Fix duplicate helptag + * Feature: PR #988: Command VimwikiVar to list, get and set variables + * Feature: #837 extract web page from URL under cursor and create + a nice wiki link + * Feature: #922 #928: g:vimwiki_tag_format to change the tag format + * Feature: Support Emoji (Conceal and Complete) + * Issue #209: Feature: Markdown: Support SetExt Heading + * Issue #847 #640: Feature: Markdown anchor + normalize and unormalize: better follow_link and |VimwikiTOC| + * Commit 5408d74b3: Syntax: Html support nested, concealable tag + and faster start syntax region for typeface + * Issue #926: Feature: VimwikiRenameFile 1/ to other dir + 2/ take argument (completable) + * Test: travis run vint in an parallel jobs => faster + * Issue #915: Feature: blockquote (`> `) better joining (`J`) and wrap + * Issue #913: Allow |VimwikiGoto| completion after <CR> + * PR #967: Add multiline comment support via %%+ and +%% + * PR #946: Add option |g:vimwiki_commentstring| to customize commentstring + * Issue #940: Render table header inside thead element and rest under + tbody element if table header specified in wiki + * PR #811: Feature: Added handling of absolute path to vimwiki (with //) + * PR #906: Add |VimwikiRemoveDone| to remove all todo items that are done + * PR #907: Cycle bullets + * PR #901: adds multiparagraph blockquotes using email style syntax + * PR #934: RSS feed generation for diary with :VimwikiRss. + * Feature: Add option |vimwiki-option-template_date_format| to configure + alternative date string format + * Feature: Add |VimwikiPasteLink| to paste an absolute wiki link to the + current file + * Feature: Add |VimwikiBaddLink| to add links to the buffer list, without + loading, if they weren't listed yet + +Changed:~ + * PR #1047: Allow to replace default mapping of VimwikiToggleListItem + * VimwikiCheckLinks work on current wiki or on range + * PR #1057: Change how resolve subdir work + Change how shell escaping work when using CustomWiki2HTML + * PR #1132: Spaces in link descriptions are no longer replaced with + links_space_char + +Removed:~ + +Fixed:~ + * PR #1240 / issue #1241: Vimwiki2HTMLBrowse now works with Markdown + * Issue #950: Correctly follow links containing . + * PR #1245 / issue #1244: Fix VimwikiBacklinks handling of bracketed links + * Issue #1193: Fix wildcard expansion in |find_autoload_file| + * PR #1108: Fix resolution of leading-slash page links, add link tests + * Allow title values with quotes + * Enable strikethrough for Neovim + * Issue #1029: Fix: error loading plugin when lang uses comma instead of + dot as decimal separator + * Issue #886: :VimwikiGenerateLinks not working on Windows + * Issue #55: Newlines in blockquotes are not honored + * Issue #55: BlockQuote restarts list numbering + * Issue #979: Fix: Accessing other filetypes within vimwiki + * Issue #886: VimwikiGenerateLinks crash with single quote in filename + * Issue #910: Fix: VimwikiTOC removes next non-empty line + * Issue #182: VimwikiTOC support headers with link + * Issue #813: iMap <Cr> interfere with completion (pum) + * Issue #709: Support inline code spans inside emphasis + Refactoring code, del, eq, sup, sub as regions + * Issue #847 #640: Refactor: Syntax highlighting typeface: match -> region + * Issue #891: Fix: Table Pressing <Enter> autosets tw <- 0 + * Issue #894: Make all appropriate settings wikilocal (many commits) + * PR #902: Doc: Darken logo text + * PR #895: Fix: File extension for markdown -> syntax wide + __FileExtention__ keyword appears + * PR #963: Doc: Replace VimwikiListChangeLevel references in doc with + VimwikiListChangeLvl as defined by command + * PR #900: conceallevel is now setted locally for vimwiki buffers + * Issue #942: Fixing wrong html link conversion in windows + * PR #919: Fix duplicate helptag + * PR #959: Fix :VimwikiNextTask + * PR #986: Fix typo in help file + * PR #1030: Allow overwriting insert mode mappings + * PR #1057: Fix renaming, updating link, and exporting HTML subdir wrong + Fix resolve subdir return wrong path in Windows + * Issue #794: Fix: Generated tag links are build wrong + * Issue #763: Links opening in qutebrowser multiple times on Linux + + +2.5 (2020-05-26)~ + +New:~ + * PR #787: |:VimwikiRenameFile| works for all directories: even + wiki_root/diary/2019-12-11.md if current file is wiki_root/dir1/file.md. + * Issue #764: fenced code blocks are properly supported for markdown + syntax i.e. more than 3 backticks, adds tilde support. + * PR #785: |:VimwikiGoto| completion works with part of filename and + nested directories + * Add test framework (vader, vint, vim-testbed) + * Issue #769: Set default values for |g:vimwiki_ext2syntax|. + * PR #735: Make list-toggling work properly even when code blocks are + embedded within the list in Markdown mode. + * PR #711: Allow forcing VimwikiAll2HTML with ! + * PR #702: Make remapping documentation more accessible to newer vim users + * PR #673: Add :VimwikiGoto key mapping. + * PR #689: Allow |vimwiki-option-diary_rel_path| to be an empty string. + * PR #683: Improve layout and format of key binding documentation in + README and include note about key bindings that may not work. + * PR #681: Prevent sticky type checking errors for old vim versions. + * PR #686: New option |g:vimwiki_key_mappings| that allow key mappings to + be enabled/disabled by groups. Key mappings are also no longer + overwritten if they are already defined. + * PR #675: Add option |vimwiki-option-name| to assign a per wiki name. + * PR #661: Add option |g:vimwiki_auto_header| to automatically generate + a level 1 header for new wiki pages. + * PR #665: Integration with vimwiki_markdown gem + https://github.com/patrickdavey/vimwiki_markdown + This provides the |vimwiki-option-html_filename_parameterization| + which alters the filenames vimiwiki checks against when running the + html conversion. It also disables the deleting of html files which + no longer match against a wiki file. + * PR #663: New option |g:vimwiki_conceal_onechar_markers| to control + whether to show or hide single-character format markers. + * PR #636: Wiki local option |vimwiki-option-exclude_files| which is + a list of patterns to exclude when checking or generating links. + * PR #644: Key mapping gnt to jump to the next open task. + * PR #643: Option |g:vimwiki_toc_link_format| to change how links are + formatted in the TOC. + * PR #641: Option |g:vimwiki_conceal_code_blocks| to conceal preformatted + text markers. + * PR #634: New options |g:vimwiki_links_header| and + |g:vimwiki_tags_header| to customize the title string of generated + sections. New option |g:vimwiki_links_header_level| and + |g:vimwiki_tags_header_level| which allow the header level (1-6) of the + generated links to be set. New option |g:vimwiki_markdown_header_style| + which specifies the nuber of newlines after the created header for + generated sections. + * PR #635: Wiki local options |vimwiki-option-auto_generate_links| and + |vimwiki-option-auto_generate_tags|. + * Wiki local option |vimwiki-option-links_space_char| to replace spaces + with a different character when creating a link. + * Allow increase/decrease header level to take a count. + * PR #637: Option |g:vimwiki_table_reduce_last_col| to not autoformat last + column of a table. + * PR #629: New option |g:vimwiki_toc_header_level| to set the desired + header level for the TOC. + * PR #616: Hex color codes are colored in HTML output. + * PR #573: Add HTML template variable %wiki_path% which outputs the path + of the current file being converted to HTML. + * PR #529: Option |g:vimwiki_markdown_link_ext| to include the extension + .md in generated links. + * PR #528: Add option |g:vimwiki_create_link| to prevent link creation + with <CR>. + * PR #498: Option |vimwiki-option-diary_caption_level| which adds captions + to the diary index based on headers. + * PR #377: Add horizontal alignment to tables. + * PR #202: Don't override or display errors for existing keymappings. + * PR #47: Optimize table formatting for large tables. + * PR #857: Make default template responsive + * PR #879: Generate links when diary & wiki dir are the same + * PR #884: Configure diary frequency (daily, weekly, monthly, yearly) + +Changed:~ + * Issue #796: Rename |:VimwikiGenerateTags| to |:VimwikiGenerateTagLinks| + * Issue #638: Rename |:VimwikiDeleteLink| to |:VimwikiDeleteFile| + * Issue #638: Rename |:VimwikiRenameLink| to |:VimwikiRenameFile| + * For all three above the old commands still works but is deprecated and + * will be removed in later versions. + * Set default |vimwiki-option-list_margin| = 0 for markdown syntax. + * Modify horizontal rule (thematic-breaks) syntax for markdown. + +Removed:~ + * PR #698: Remove awa check triggering silent file edits. + * Options g:vimwiki_use_mouse and g:vimwiki_table_mappings. These are + still present in the code for backwards compatibility but have been + removed from the documentation and will be fully removed at a later + point. + +Fixed:~ + * Issue #90: |:VimwikiRenameFile| doesn't update links in diary. + * Issue #790: Allow tags before a header with markdown syntax. + * Issue #779: Vimwiki tags file meets ctags standard. + * Issue #781: Compatablity fixes for older versions of Vim. + * Issue #691: Allow |:VimwikiGoBackLink| to go back multiple times. + * Update MathJax CDN loading instructions. + * Issue #212: Don't treat comment characters within code blocks as + headers. + * Issue #420: Add error handling to |:VimwikiSearch| + * PR #744: Fix typo in vimwiki_list_manipulation + * Issue #715: s:clean_url is compatible with vim pre 7.4.1546 (sticky type + checking) + * Issue #729: Normalize links uses relative paths in diary pages for + Markdown syntax. This previously only worked for the default syntax. + * Disable spell check in code and math inline/blocks. + * Properly handle markdown image links `![]()` + * Issue #415: Expand iabbrev entries on <CR>. + * Issue #619: allow escaped characters in markdown links. + * Issue #240: Fix regex pattern for markdown '[]()' links + * Issue #685: Error message for invalid user options fixed. + * Issue #481: Allow surrounding URLs with '<' '>' + * Issue #237: |:VimwikiRenameFile| now works for Markdown syntax + * Issue #612: GVim menu displayed duplicate names. + * Issue #456: Omnicompletion of wikilinks under Windows. Note: this should + be considered a temporary fix until #478 is closed. + * Issue #654: Fix |:VimwikiShowVersion| command. + * PR #634: Removed extra newlines that were inserted before/after + generated links. + * Issue #543: Allow commands related to opening index files or diary pages + to take a count, modify keymapping behavior, and fix discrepancies in + the documentation. + * Issue #539: The option |g:vimwiki_url_maxsave| now only affects raw + URLs (wiki links are excluded). + * Issue #438: Fix creation of visually selected links on diary pages. + * Issue #404: Don't conceal strikethrough character in tables. + * Issue #318: Markdown syntax bold, italic, and italic/bold are now + rendered correctly. + * Issue #835: Pressing enter on the dash of a markdown list causes an error. + * Issue #876: E684: list index out of range: 0, when creating a link containing a `.`. + * Issue #803: |:VimwikiGenerateLinks| for subdirectory only + * Issue #776: Command [count]o can't repeat in vimwiki + + +2.4.1 (2019-02-20)~ +Fixed: + * Fix VimwikiShowVersion function. + * strikethrough `~` characters were not hidden within tables + * Update and format README.md and update screen shots + +2.4 (2019-03-24)~ + +New:~ + * Add the option |g:vimwiki_text_ignore_newline|. + * |g:vimwiki_listsyms| can have fewer or more than 5 symbols. + * glx on a list item marks a checkbox as won't do, see |vimwiki_glx|. + * Add the option |g:vimwiki_listsym_rejected| to set the character used + for won't-do list items. + * The effect of |g:vimwiki_listsyms| and |g:vimwiki_listsym_rejected| can + be set on a per wiki level, see |vimwiki-option-listsyms| and + |vimwili-option-listsym_rejected| + * gln and glp change the "done" status of a checkbox, see |vimwiki_gln|. + * |:VimwikiSplitLink| and |:VimwikiVSplitLink| can now reuse an existing + split window and not move the cursor. + * Add 'aH' and 'iH' text objects, see |vimwiki-text-objects|. + * Add the keys |vimwiki_[[|, |vimwiki_]]|, |vimwiki_[=|, |vimwiki_]=| and + |vimwiki_]u| for navigating between headers. + * Add the command |:VimwikiMakeTomorrowDiaryNote|. + * |g:vimwiki_folding| has a new option 'custom'. + * Add the ':quick' option for faster folding, see |g:vimwiki_folding|. + * Add the %date placeholder, see |vimwiki-date|. + * Add the option |vimwiki-option-custom_wiki2html_args|. + * Add support for HTML-style comments when using markdown syntax. + * Made headings link to themselves in HTML output. + * Add |:VimwikiShowVersion| to check the version + +Removed:~ + * Remove the undocumented and buggy command :VimwikiReadLocalOptions + which allowed to store Vimwiki related settings in a local file. + * Remove the undocumented command :VimwikiPrintWikiState. + * For complicated reasons, Vimwiki doesn't clean up its settings anymore + if you change the filetype of a wiki buffer. + +Fixed:~ + * Make |vimwiki-option-automatic_nested_syntaxes| work also for markdown. + * Issue #236: Highlight math blocks as TeX math, not TeX. + * Issue #264: Don't overwrite mappings to i_<CR> from other plugins. + * Fix an error where <BS> sometimes didn't work under Windows. + * Issue #302: |:VimwikiDiaryGenerateLinks| had issues with markdown. + * Issue #445: Better handling of |'autowriteall'| and |'hidden'|. + * Improve 'ah' and 'ih' text objects, see |vimwiki-text-objects|. + * Allow opening of links using Powershell. + * Allow any visual mode to be used with |vimwiki_+|. + * Markdown syntax for |vimwiki-toc| is used, when appropriate. + * Wikis can now be in subfolders of other wikis. + * Issue #482: |:VimwikiMakeDiaryNote| now uses the diary of the current wiki. + * Opening the diary and wikis from the menu works correctly now. + * Issue #497: Make |:VimwikiMakeDiaryNote| work outside a wiki buffer. + * Use markdown syntax in the diary when appropriate. + * Improve handling of errors on opening files. + * Update links when renaming a page with |:VimwikiRenameLink|. + * Fix losing the highlighting in various situations. + * Improved link normalisation. + * Various other minor fixes. + + +2.3 (2016-03-31)~ + +New:~ + * Add |:VimwikiMakeYesterdayDiaryNote| command + * Issue #128: add option |vimwiki-option-automatic_nested_syntaxes| + * Issue #192: Sort links in the list generated by |:VimwikiGenerateTags| + +Fixed:~ + * Issue #176: Fix issue when the wiki path contains spaces + * Also look for tags in wiki files in subdirectories + * Locate the .tags file correctly on Windows + * Issue #183: Fix HTML conversion of headers containing links + * Issue #64: create correct Markdown links when pressing CR on a word + * Issue #191: ignore headers inside preformatted text when creating the TOC + * Create the standard CSS file also if only one file is converted to HTML + * Fix #188: |vimwiki_+| on a raw url surrounds it with brackets + * various minor fixes + + +2.2.1 (2015-12-10)~ + +Removed:~ + * Removed the option g:vimwiki_debug, which probably nobody used. If you + want it back, file an issue at Github. + +Fixed:~ + * Issue #175: Don't do random things when the user has remapped the z key + * Don't ask for confirmation when following a URL in MacOS + * Always jump to the first occurrence of a tag in a file + * Don't move the cursor when updating the TOC + * Fix some issues with the TOC when folding is enabled + + +2.2 (2015-11-25)~ + +New:~ + * Support for anchors, see |vimwiki-anchors| + * in this context, add support for TOC, see |vimwiki-toc| + * add omni completion of wiki links (files and anchors) + * new local option |vimwiki-option-auto_toc| + * new global option |g:vimwiki_toc_header| + * Support for tags, see |vimwiki-syntax-tags| + * List editing capabilities, see |vimwiki-lists|: + * support for auto incrementing numbered lists + * more key maps for list manipulation, see |vimwiki-list-manipulation| + * improved automatic adjustment of checkboxes + * text objects for list items, see |vimwiki-text-objects| + * New command |:VimwikiCheckLinks| to check for broken links + * New global option |g:vimwiki_auto_chdir| + * New global option |g:vimwiki_map_prefix| + * Support for wiki links absolute to the wiki root + * Added the |VimwikiLinkConverter| function + * Issue #24: Basic support for remote directories via netrw + * Issue #50: in HTML, tables can now be embedded in lists + * When converting to HTML, show a message with the output directory + * Add auto completion for |:VimwikiGoto| + * Add Chinese Readme file + +Changed:~ + * Wiki files must not contain # anymore, because # is used to separate the + file from an anchor in a link. + * replace the function vimwiki#base#resolve_scheme() by + vimwiki#base#resolve_link() (relevant if you have a custom + |VimwikiLinkHandler| which used this function) + * The semantic of "file:" and "local:" links changed slightly, see + |vimwiki-syntax-links| for what they mean now + * The meaning of a link like [[/some/directory/]] changed. It used to be + a link to the actual directory /some/directory/, now it's relative to + the root of the current wiki. Use [[file:/some/directory/]] for the old + behavior. + +Removed:~ + * the %toc placeholder is now useless, use |vimwiki-toc| instead + * the global option g:vimwiki_auto_checkbox is now useless and removed + +Fixed:~ + * Issue 415: Disable folding if g:vimwiki_folding is set to '' + * Fix slowdown in Vim 7.4 + * Issue #12: Separate diaries from different wikis + * Issue #13: Fix :VimwikiRenameLink on links containing a dot + * Always jump to previous link on <S-Tab>, not to beginning of link + * Issue #27: Fix <CR> on a visual selection sometimes not working + * |VimwikiBackLinks| now recognizes much more valid links + * Issue 424: make external links with #, % work under Linux + * Issue #39: don't htmlize stuff inside pre tags + * Issue #44: faster formatting of large tables + * Issue #52: Recognize markdown links when renaming wiki file + * Issue #54: Disable 'shellslash' on Windows to avoid problems + * Issue #81: Don't get stuck when converting a read-only file + * Issue #66: Better normalizing of links in diary + * Fix the menu in GVim, which was sometimes not shown correctly + * |VimwikiGenerateLinks| now also generates links for subdirectories + * Issue #93: Don't process placeholders inside preformatted text + * Issue #102: Add default values to some options like the doc says + * Issue #144: Fix bug with folds shortening on multibyte characters + * Issue #158: Detect the OS correctly + * |VimwikiGenerateLinks| now replaces a potentially existing old list + * Fix uneven indentation of list items with checkboxes in HTML + * Various small fixes + * Corrected website links in documentation. code.google is dead, long live + Github! + +2.1~ + + * Concealing of links can be turned off - set |g:vimwiki_url_maxsave| to 0. + The option g:vimwiki_url_mingain was removed + * |g:vimwiki_folding| also accepts value 'list'; with 'expr' both sections + and code blocks folded, g:vimwiki_fold_lists option was removed + * Issue 261: Syntax folding is back. |g:vimwiki_folding| values are + changed to '', 'expr', 'syntax'. + * Issue 372: Ignore case in g:vimwiki_valid_html_tags + * Issue 374: Make autowriteall local to vimwiki. It is not 100% local + though. + * Issue 384: Custom_wiki2html script now receives templating arguments + * Issue 393: Custom_wiki2html script path can contain tilde character + * Issue 392: Custom_wiki2html arguments are quoted, e.g names with spaces + * Various small bug fixes. + +2.0.1 'stu'~ + + * Follow (i.e. open target of) markdown reference-style links. + * Bug fixes. + + +2.0 'stu'~ + +This release is partly incompatible with previous. + +Summary ~ + + * Quick page-link creation. + * Redesign of link syntaxes (!) + * No more CamelCase links. Check the ways to convert them + https://groups.google.com/forum/?fromgroups#!topic/vimwiki/NdS9OBG2dys + * No more [[link][desc]] links. + * No more [http://link description] links. + * No more plain image links. Use transclusions. + * No more image links identified by extension. Use transclusions. + * Interwiki links + * More link schemes + * Transclusions + * Normalize link command. See |vimwiki_+|. + * Improved diary organization and generation. See |vimwiki-diary|. + * List manipulation. See |vimwiki-list-manipulation|. + * Markdown support. + * Mathjax support. See |vimwiki-syntax-math|. + * Improved handling of special characters and punctuation in filenames and + urls. + * Back links command: list links referring to the current page. + * Highlighting nonexisted links are off by default. + * Table syntax change. Row separator uses | instead of +. + * Fold multilined list items. + * Custom wiki to HTML converters. See |vimwiki-option-custom_wiki2html|. + * Conceal long weblinks. See g:vimwiki_url_mingain. + * Option to disable table mappings. See |g:vimwiki_table_mappings|. + +For detailed information see issues list on +http://code.google.com/p/vimwiki/issues/list + + +1.2~ + * Issue 70: Table spanning cell support. + * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| + converts only changed wiki files. + * Issue 117: |:VimwikiDiaryIndex| command that opens diary index wiki page. + * Issue 120: Links in headers are not highlighted in vimwiki but are + highlighted in HTML. + * Issue 138: Added possibility to remap table-column move bindings. See + |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| + commands. For remap instructions see |vimwiki_<A-Left>| + and |vimwiki_<A-Right>|. + * Issue 125: Problem with 'o' command given while at the of the file. + * Issue 131: FileType is not set up when GUIEnter autocommand is used in + vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' + * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory + doesn't work as intended. + * Issue 135: %title and %toc used together cause TOC to appear in an + unexpected place in HTML. + * Issue 139: |:VimwikiTabnewLink| command is added. + * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad + symbols from filenames. + * Issue 145: With modeline 'set ft=vimwiki' links are not correctly + highlighted when open wiki files. + * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. + * Issue 148: There are no mailto links. + * Issue 151: Use location list instead of quickfix list for |:VimwikiSearch| + command result. Use :lopen instead of :copen, :lnext instead of :cnext + etc. + * Issue 152: Add the list of HTML files that would not be deleted after + |:VimwikiAll2HTML|. + * Issue 153: Delete HTML files that has no corresponding wiki ones with + |:VimwikiAll2HTML|. + * Issue 156: Add multiple HTML templates. See + |vimwiki-option-template_path|. Options html_header and html_footer are + no longer exist. + * Issue 173: When virtualedit=all option is enabled the 'o' command behave + strange. + * Issue 178: Problem with alike wikie's paths. + * Issue 182: Browser command does not quote url. + * Issue 183: Spelling error highlighting is not possible with nested + syntaxes. + * Issue 184: Wrong foldlevel in some cases. + * Issue 195: Page renaming issue. + * Issue 196: vim: modeline bug -- syn=vim doesn't work. + * Issue 199: Generated HTML for sublists is invalid. + * Issue 200: Generated HTML for todo lists does not show completion status + the fix relies on CSS, thus your old stylesheets need to be updated!; + may not work in obsolete browsers or font-deficient systems. + * Issue 205: Block code: highlighting differs from processing. Inline code + block {{{ ... }}} is removed. Use `...` instead. + * Issue 208: Default highlight colors are problematic in many + colorschemes. Headers are highlighted as |hl-Title| by default, use + |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or + custom header colors. Some other changes in highlighting. + * Issue 209: Wild comments slow down html generation. Comments are + changed, use %% to comment out entire line. + * Issue 210: HTML: para enclose header. + * Issue 214: External links containing Chinese characters get trimmed. + * Issue 218: Command to generate HTML file and open it in webbrowser. See + |:Vimwiki2HTMLBrowse|(bind to <Leader>whh) + * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML| + + +... + +39 releases + +... + +0.1~ + * First public version. + +============================================================================== +17. License *vimwiki-license* + +The MIT License +http://www.opensource.org/licenses/mit-license.php + +Copyright (c) 2008-2010 Maxim Kim + 2013-2017 Daniel Schemala + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + + vim:tw=78:ts=8:ft=help diff --git a/dot_vim/plugged/vimwiki/doc/wiki.png b/dot_vim/plugged/vimwiki/doc/wiki.png new file mode 100644 index 0000000..a8bac8d Binary files /dev/null and b/dot_vim/plugged/vimwiki/doc/wiki.png differ diff --git a/dot_vim/plugged/vimwiki/dot_git/HEAD b/dot_vim/plugged/vimwiki/dot_git/HEAD new file mode 100644 index 0000000..a334635 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/dev diff --git a/dot_vim/plugged/vimwiki/dot_git/branches/.keep b/dot_vim/plugged/vimwiki/dot_git/branches/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vimwiki/dot_git/config b/dot_vim/plugged/vimwiki/dot_git/config new file mode 100644 index 0000000..e5739a0 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = https://github.com/vimwiki/vimwiki.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "dev"] + remote = origin + merge = refs/heads/dev diff --git a/dot_vim/plugged/vimwiki/dot_git/description b/dot_vim/plugged/vimwiki/dot_git/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/applypatch-msg.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/applypatch-msg.sample new file mode 100644 index 0000000..a5d7b84 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/commit-msg.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/commit-msg.sample new file mode 100644 index 0000000..b58d118 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/fsmonitor-watchman.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000..23e856f --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; <CHLD_OUT>}; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/post-update.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/post-update.sample new file mode 100644 index 0000000..ec17ec1 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-applypatch.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-applypatch.sample new file mode 100644 index 0000000..4142082 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-commit.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-commit.sample new file mode 100644 index 0000000..e144712 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-merge-commit.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-merge-commit.sample new file mode 100644 index 0000000..399eab1 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-push.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-push.sample new file mode 100644 index 0000000..4ce688d --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# <local ref> <local oid> <remote ref> <remote oid> +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0') + +while read local_ref local_oid remote_ref remote_oid +do + if test "$local_oid" = "$zero" + then + # Handle delete + : + else + if test "$remote_oid" = "$zero" + then + # New branch, examine all commits + range="$local_oid" + else + # Update to existing branch, examine new commits + range="$remote_oid..$local_oid" + fi + + # Check for WIP commit + commit=$(git rev-list -n 1 --grep '^WIP' "$range") + if test -n "$commit" + then + echo >&2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-rebase.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-rebase.sample new file mode 100644 index 0000000..6cbef5c --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/pre-receive.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-receive.sample new file mode 100644 index 0000000..a1fd29e --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/prepare-commit-msg.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000..10fa14c --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/push-to-checkout.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/push-to-checkout.sample new file mode 100644 index 0000000..af5a0c0 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin </dev/null) +fi + +if ! git diff-index --quiet --cached --ignore-submodules $head -- +then + die "Working directory has staged changes" +fi + +if ! git read-tree -u -m "$commit" +then + die "Could not update working tree to new HEAD" +fi diff --git a/dot_vim/plugged/vimwiki/dot_git/hooks/update.sample b/dot_vim/plugged/vimwiki/dot_git/hooks/update.sample new file mode 100644 index 0000000..c4d426b --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to block unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 <ref> <oldrev> <newrev>)" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 <ref> <oldrev> <newrev>" >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0') +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/dot_vim/plugged/vimwiki/dot_git/index b/dot_vim/plugged/vimwiki/dot_git/index new file mode 100644 index 0000000..9a559d6 Binary files /dev/null and b/dot_vim/plugged/vimwiki/dot_git/index differ diff --git a/dot_vim/plugged/vimwiki/dot_git/info/exclude b/dot_vim/plugged/vimwiki/dot_git/info/exclude new file mode 100644 index 0000000..a5196d1 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/dot_vim/plugged/vimwiki/dot_git/logs/HEAD b/dot_vim/plugged/vimwiki/dot_git/logs/HEAD new file mode 100644 index 0000000..1c97bb5 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 fea8bee382b2051b0137fd2cacf0862823ee69b3 LinlyBoi <libkyy@e.email> 1673460163 +0200 clone: from https://github.com/vimwiki/vimwiki.git +fea8bee382b2051b0137fd2cacf0862823ee69b3 fea8bee382b2051b0137fd2cacf0862823ee69b3 LinlyBoi <libkyy@e.email> 1673460166 +0200 checkout: moving from dev to dev diff --git a/dot_vim/plugged/vimwiki/dot_git/logs/refs/heads/dev b/dot_vim/plugged/vimwiki/dot_git/logs/refs/heads/dev new file mode 100644 index 0000000..a7662a2 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/logs/refs/heads/dev @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 fea8bee382b2051b0137fd2cacf0862823ee69b3 LinlyBoi <libkyy@e.email> 1673460163 +0200 clone: from https://github.com/vimwiki/vimwiki.git diff --git a/dot_vim/plugged/vimwiki/dot_git/logs/refs/remotes/origin/HEAD b/dot_vim/plugged/vimwiki/dot_git/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000..a7662a2 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 fea8bee382b2051b0137fd2cacf0862823ee69b3 LinlyBoi <libkyy@e.email> 1673460163 +0200 clone: from https://github.com/vimwiki/vimwiki.git diff --git a/dot_vim/plugged/vimwiki/dot_git/objects/info/.keep b/dot_vim/plugged/vimwiki/dot_git/objects/info/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.idx b/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.idx new file mode 100644 index 0000000..2472b2a Binary files /dev/null and b/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.idx differ diff --git a/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.pack b/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.pack new file mode 100644 index 0000000..c2a5a37 Binary files /dev/null and b/dot_vim/plugged/vimwiki/dot_git/objects/pack/readonly_pack-3b3097a7ca1d11cc2b5825937c0a7df65d09ae6e.pack differ diff --git a/dot_vim/plugged/vimwiki/dot_git/packed-refs b/dot_vim/plugged/vimwiki/dot_git/packed-refs new file mode 100644 index 0000000..d2dc357 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/packed-refs @@ -0,0 +1,16 @@ +# pack-refs with: peeled fully-peeled sorted +bfc3aa06fd4efedf4956589004cd325c4ed6f65f refs/remotes/origin/configurable_list_syms +99dc186df0ac6a22e79ac2813e7dfe65b8ccd86d refs/remotes/origin/custom_html_win +fea8bee382b2051b0137fd2cacf0862823ee69b3 refs/remotes/origin/dev +fea8bee382b2051b0137fd2cacf0862823ee69b3 refs/remotes/origin/master +86289a84930268c642add8ab10831124465fc8a3 refs/remotes/origin/path-handling +5faf884dc60c3ebd27734fe5f649acfb92025af8 refs/tags/v2.1 +2f95a6a651bcc388af466e7377ae3ded3cfcc035 refs/tags/v2.2 +3bd3d9b86036b21aecd69f0a1e572643d626c280 refs/tags/v2.2.1 +129c2818106bdb9230bbd99ee8eb81fa47c7a414 refs/tags/v2.3 +6766c37ce09a623b3de7ddb86ca30278eea37a82 refs/tags/v2.4 +5553cef2496668aeddc6a93918595afa3aa79c7c refs/tags/v2.4-rc1 +79d6a1a4e2f620214f246e9ae0fdf4e129b91bea refs/tags/v2.4.1 +619f04f89861c58e5a6415a4f83847752928252d refs/tags/v2.5 +8fad9778e727282e3e5ba94d6c96c3730fb546fc refs/tags/v2022.12.02 +^0629b39815c97f1e4ee31e26faa6891b0e13d2d5 diff --git a/dot_vim/plugged/vimwiki/dot_git/refs/heads/dev b/dot_vim/plugged/vimwiki/dot_git/refs/heads/dev new file mode 100644 index 0000000..b5b4de2 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/refs/heads/dev @@ -0,0 +1 @@ +fea8bee382b2051b0137fd2cacf0862823ee69b3 diff --git a/dot_vim/plugged/vimwiki/dot_git/refs/remotes/origin/HEAD b/dot_vim/plugged/vimwiki/dot_git/refs/remotes/origin/HEAD new file mode 100644 index 0000000..dce8c87 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/dev diff --git a/dot_vim/plugged/vimwiki/dot_git/refs/tags/.keep b/dot_vim/plugged/vimwiki/dot_git/refs/tags/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vimwiki/dot_git/shallow b/dot_vim/plugged/vimwiki/dot_git/shallow new file mode 100644 index 0000000..50ea174 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_git/shallow @@ -0,0 +1,13 @@ +0629b39815c97f1e4ee31e26faa6891b0e13d2d5 +129c2818106bdb9230bbd99ee8eb81fa47c7a414 +2f95a6a651bcc388af466e7377ae3ded3cfcc035 +3bd3d9b86036b21aecd69f0a1e572643d626c280 +5553cef2496668aeddc6a93918595afa3aa79c7c +5faf884dc60c3ebd27734fe5f649acfb92025af8 +619f04f89861c58e5a6415a4f83847752928252d +6766c37ce09a623b3de7ddb86ca30278eea37a82 +79d6a1a4e2f620214f246e9ae0fdf4e129b91bea +86289a84930268c642add8ab10831124465fc8a3 +99dc186df0ac6a22e79ac2813e7dfe65b8ccd86d +bfc3aa06fd4efedf4956589004cd325c4ed6f65f +fea8bee382b2051b0137fd2cacf0862823ee69b3 diff --git a/dot_vim/plugged/vimwiki/dot_github/issue_template.md b/dot_vim/plugged/vimwiki/dot_github/issue_template.md new file mode 100644 index 0000000..fea0dcb --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_github/issue_template.md @@ -0,0 +1,6 @@ +Prior to submitting a new issue make sure to complete these steps: + +- [ ] Include the VimWiki settings from your `.vimrc` +- [ ] Include the syntax you are using (default / Markdown / MediaWiki) +- [ ] Provide a detailed description of the problem including **steps to reproduce the issue**. +- [ ] Include the output of `:VimwikiShowVersion`. diff --git a/dot_vim/plugged/vimwiki/dot_github/pull_request_template.md b/dot_vim/plugged/vimwiki/dot_github/pull_request_template.md new file mode 100644 index 0000000..9b797b8 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_github/pull_request_template.md @@ -0,0 +1,9 @@ +Steps for submitting a pull request: + +- [ ] **ALL** pull requests should be made against the `dev` branch! +- [ ] Take a look at [CONTRIBUTING.MD](https://github.com/vimwiki/vimwiki/blob/dev/CONTRIBUTING.md) +- [ ] Reference any related issues. +- [ ] Provide a description of the proposed changes. +- [ ] PRs must pass Vint tests and add new Vader tests as applicable. +- [ ] Make sure to update the documentation in `doc/vimwiki.txt` if applicable, + including the Changelog and Contributors sections. diff --git a/dot_vim/plugged/vimwiki/dot_gitignore b/dot_vim/plugged/vimwiki/dot_gitignore new file mode 100644 index 0000000..3929660 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_gitignore @@ -0,0 +1,24 @@ +# Local stuff +# This section is devoted to this project +############################## +doc/tags +.tags + +# Vim stuff +############################## +*.s[a-w][a-z] +*.un~ +Session.vim +.netrwhist +*~ + +# OS generated files +############################## +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db +vimtest diff --git a/dot_vim/plugged/vimwiki/dot_travis.yml b/dot_vim/plugged/vimwiki/dot_travis.yml new file mode 100644 index 0000000..be3e489 --- /dev/null +++ b/dot_vim/plugged/vimwiki/dot_travis.yml @@ -0,0 +1,45 @@ +# No language: we download vim and compile it oursselves +language: generic + +cache: + # Enable cache folder + bundler: true + directories: + - $HOME/docker_images + +before_cache: + # Save tagged docker images. Info at https://github.com/travis-ci/travis-ci/issues/5358#issuecomment-248915326 + - > + mkdir -p $HOME/docker_images && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' + | xargs -n 2 -t sh -c 'test -e $HOME/docker_images/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker_images/$1.tar.gz' + +before_install: + # Install docker + - n_image=$(ls -1 $HOME/docker_images/*.tar.gz | wc -l) + - if (( $n_image )); then ls $HOME/docker_images/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; + else docker build --tag vimwiki .; + fi + +env: + # Define jobs <- vim version <- hard copied from Dockerfile + # First to be launched + - VIM_VERSION=vint + - VIM_VERSION=vim_7.3.429 + - VIM_VERSION=nvim_0.3.8 + - VIM_VERSION=vim_8.1.0519 + # More + - VIM_VERSION=vim_7.4.1099 PATTERN='[a-k]*.vader' + - VIM_VERSION=vim_7.4.1546 PATTERN='l*.vader' + - VIM_VERSION=vim_8.0.0027 PATTERN='[m-z]*.vader' + +script: + # Run All tests + - pushd test + - if [[ "$VIM_VERSION" == 'vint' ]]; then bash run_tests.sh -v -t vint; + elif [[ ! -z "$PATTERN" ]]; then bash run_tests.sh -v -t vader -n "$VIM_VERSION" -f "$PATTERN"; + else bash run_tests.sh -v -t vader -n "$VIM_VERSION"; + fi + - popd + + +# vim:sw=2: diff --git a/dot_vim/plugged/vimwiki/ftplugin/vimwiki.vim b/dot_vim/plugged/vimwiki/ftplugin/vimwiki.vim new file mode 100644 index 0000000..31bc171 --- /dev/null +++ b/dot_vim/plugged/vimwiki/ftplugin/vimwiki.vim @@ -0,0 +1,780 @@ +" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 +" Vimwiki filetype plugin file +" Home: https://github.com/vimwiki/vimwiki/ + + +" Clause: load only onces per buffer +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 " Don't load another plugin for this buffer + +if vimwiki#vars#get_global('conceallevel') && exists('+conceallevel') + let &l:conceallevel = vimwiki#vars#get_global('conceallevel') +endif + +" This is for GOTO FILE: gf +execute 'setlocal suffixesadd='.vimwiki#vars#get_wikilocal('ext') +setlocal isfname-=[,] + +exe 'setlocal tags+=' . escape(vimwiki#tags#metadata_file_path(), ' \|"') + + +" Helper: for omnicompletion +function! Complete_wikifiles(findstart, base) abort + " s:line_context = link | tag | '' + if a:findstart == 1 + " Find line context + " Called: first time + let column = col('.')-2 + let line = getline('.')[:column] + + " Check Link: + " -- WikiLink + let startoflink = match(line, '\[\[\zs[^\\[\]]*$') + if startoflink != -1 + let s:line_context = 'link' + return startoflink + endif + " -- WebLink + if vimwiki#vars#get_wikilocal('syntax') ==? 'markdown' + let startofinlinelink = match(line, '\[.*\](\zs[^)]*$') + if startofinlinelink != -1 + let s:line_context = 'link' + return startofinlinelink + endif + endif + + " Check Tag: + let tf = vimwiki#vars#get_syntaxlocal('tag_format') + let startoftag = match(line, tf.pre_mark . '\zs' . tf.in . '*$') + if startoftag != -1 + let s:line_context = 'tag' + return startoftag + endif + + " Nothing can do ... + let s:line_context = '' + return -1 + else + " Completion works for wikilinks/anchors, and for tags. s:line_content + " tells us which string came before a:base. There seems to be no easier + " solution, because calling col('.') here returns garbage. + if s:line_context ==? '' + return [] + elseif s:line_context ==# 'tag' + " Look Tags: completion + let tags = vimwiki#tags#get_tags() + if a:base !=? '' + call filter(tags, + \ 'v:val[:' . (len(a:base)-1) . "] == '" . substitute(a:base, "'", "''", '') . "'" ) + endif + return tags + elseif a:base !~# '#' + " Look Wiki: files + if a:base =~# '\m^wiki\d\+:' + let wikinumber = eval(matchstr(a:base, '\m^wiki\zs\d\+')) + if wikinumber >= vimwiki#vars#number_of_wikis() + return [] + endif + let prefix = matchstr(a:base, '\m^wiki\d\+:\zs.*') + let scheme = matchstr(a:base, '\m^wiki\d\+:\ze') + elseif a:base =~# '^diary:' + let wikinumber = -1 + let prefix = matchstr(a:base, '^diary:\zs.*') + let scheme = matchstr(a:base, '^diary:\ze') + else " current wiki + let wikinumber = vimwiki#vars#get_bufferlocal('wiki_nr') + let prefix = a:base + let scheme = '' + endif + + let links = vimwiki#base#get_wikilinks(wikinumber, 1, '') + let result = [] + for wikifile in links + if wikifile =~ '^'.vimwiki#u#escape(prefix) + call add(result, scheme . wikifile) + endif + endfor + return result + + else + " Look Anchor: in the given wikifile + + let segments = split(a:base, '#', 1) + let given_wikifile = segments[0] ==? '' ? expand('%:t:r') : segments[0] + let link_infos = vimwiki#base#resolve_link(given_wikifile.'#') + let wikifile = link_infos.filename + let syntax = vimwiki#vars#get_wikilocal('syntax', link_infos.index) + let anchors = vimwiki#base#get_anchors(wikifile, syntax) + + let filtered_anchors = [] + let given_anchor = join(segments[1:], '#') + for anchor in anchors + if anchor =~# '^'.vimwiki#u#escape(given_anchor) + call add(filtered_anchors, segments[0].'#'.anchor) + endif + endfor + return filtered_anchors + + endif + endif +endfunction + +" Set Completion: +setlocal omnifunc=Complete_wikifiles +if and(vimwiki#vars#get_global('emoji_enable'), 2) != 0 + \ && &completefunc ==# '' + set completefunc=vimwiki#emoji#complete +endif + + +" Declare Settings: necessary for the automatic formatting of lists +" ------------------------------------------------ +setlocal autoindent +setlocal nosmartindent +setlocal nocindent + +" Set Comments: to insert and format 'comments' or cheat +" Used to break blockquote prepending one on each new line (see: #915) +" B like blank character follow +" blockquotes +let comments = 'b:>' +for bullet in vimwiki#vars#get_syntaxlocal('bullet_types') + " task list + for point in vimwiki#vars#get_wikilocal('listsyms_list') + \ + [vimwiki#vars#get_wikilocal('listsym_rejected')] + let comments .= ',fb:' . bullet . ' [' . point . ']' + endfor + " list + let comments .= ',fb:' . bullet +endfor +let &l:comments = comments + +" Set Format Options: (:h fo-table) +" Disable autocomment because, vimwiki does it better +setlocal formatoptions-=r +setlocal formatoptions-=o +setlocal formatoptions-=2 +" Autowrap with leading comment +setlocal formatoptions+=c +" Do not wrap if line was already long +setlocal formatoptions+=l +" AutoWrap inteligent with lists +setlocal formatoptions+=n +let &formatlistpat = vimwiki#vars#get_wikilocal('rxListItem') +" Used to join 'commented' lines (blockquote, list) (see: #915) +if v:version > 703 + setlocal formatoptions+=j +endif + +" Set commentstring %%%s +let &l:commentstring = vimwiki#vars#get_wikilocal('commentstring') + + +" ------------------------------------------------ +" Folding stuff +" ------------------------------------------------ + +" Get fold level for a list +function! VimwikiFoldListLevel(lnum) abort + return vimwiki#lst#fold_level(a:lnum) +endfunction + + +" Get fold level for 1. line number +function! VimwikiFoldLevel(lnum) abort + let line = getline(a:lnum) + + " Header/section folding... + if line =~# vimwiki#vars#get_syntaxlocal('rxHeader') && !vimwiki#u#is_codeblock(a:lnum) + return '>'.vimwiki#u#count_first_sym(line) + " Code block folding... + elseif line =~# vimwiki#vars#get_syntaxlocal('rxPreStart') + return 'a1' + elseif line =~# vimwiki#vars#get_syntaxlocal('rxPreEnd') + return 's1' + else + return '=' + endif +endfunction + + +" Declare Constants: used by VimwikiFoldText +" use \u2026 and \u21b2 (or \u2424) if enc=utf-8 to save screen space +let s:ellipsis = (&encoding ==? 'utf-8') ? "\u2026" : '...' +let s:ell_len = strlen(s:ellipsis) +let s:newline = (&encoding ==? 'utf-8') ? "\u21b2 " : ' ' +let s:tolerance = 5 + + +" unused: too naive +function! s:shorten_text_simple(text, len) abort + let spare_len = a:len - len(a:text) + return (spare_len>=0) ? [a:text,spare_len] : [a:text[0:a:len].s:ellipsis, -1] +endfunction + + +" Shorten Text: +" Called: by VimwikiFoldText +" s:shorten_text(text, len) = [string, spare] with "spare" = len-strlen(string) +" for long enough "text", the string's length is within s:tolerance of "len" +" (so that -s:tolerance <= spare <= s:tolerance, "string" ends with s:ellipsis) +" Return: [string, spare] +function! s:shorten_text(text, len) abort + " strlen() returns lenght in bytes, not in characters, so we'll have to do a + " trick here -- replace all non-spaces with dot, calculate lengths and + " indexes on it, then use original string to break at selected index. + let text_pattern = substitute(a:text, '\m\S', '.', 'g') + let spare_len = a:len - strlen(text_pattern) + if (spare_len + s:tolerance >= 0) + return [a:text, spare_len] + endif + " try to break on a space; assumes a:len-s:ell_len >= s:tolerance + let newlen = a:len - s:ell_len + let idx = strridx(text_pattern, ' ', newlen + s:tolerance) + let break_idx = (idx + s:tolerance >= newlen) ? idx : newlen + return [matchstr(a:text, '\m^.\{'.break_idx.'\}').s:ellipsis, newlen - break_idx] +endfunction + + +" Fold: text chapter +function! VimwikiFoldText() abort + let line = getline(v:foldstart) + let main_text = substitute(line, '^\s*', repeat(' ',indent(v:foldstart)), '') + let fold_len = v:foldend - v:foldstart + 1 + let len_text = ' ['.fold_len.'] ' + if line !~# vimwiki#vars#get_syntaxlocal('rxPreStart') + let [main_text, spare_len] = s:shorten_text(main_text, 50) + return main_text.len_text + else + " fold-text for code blocks: use one or two of the starting lines + let [main_text, spare_len] = s:shorten_text(main_text, 24) + let line1 = substitute(getline(v:foldstart+1), '^\s*', ' ', '') + let [content_text, spare_len] = s:shorten_text(line1, spare_len+20) + if spare_len > s:tolerance && fold_len > 3 + let line2 = substitute(getline(v:foldstart+2), '^\s*', s:newline, '') + let [more_text, spare_len] = s:shorten_text(line2, spare_len+12) + let content_text .= more_text + endif + return main_text.len_text.content_text + endif +endfunction + + + +" ------------------------------------------------ +" Commands +" ------------------------------------------------ + +command! -buffer Vimwiki2HTML + \ if filewritable(expand('%')) | silent noautocmd w | endif + \ <bar> + \ let res = vimwiki#html#Wiki2HTML( + \ expand(vimwiki#vars#get_wikilocal('path_html')), expand('%')) + \ <bar> + \ if res != '' | call vimwiki#u#echo('HTML conversion is done, output: ' + \ . expand(vimwiki#vars#get_wikilocal('path_html'))) | endif + +command! -buffer Vimwiki2HTMLBrowse + \ if filewritable(expand('%')) | silent noautocmd w | endif + \ <bar> + \ call vimwiki#base#system_open_link(vimwiki#html#Wiki2HTML( + \ expand(vimwiki#vars#get_wikilocal('path_html')), + \ expand('%'))) + +command! -buffer -bang VimwikiAll2HTML + \ call vimwiki#html#WikiAll2HTML(expand(vimwiki#vars#get_wikilocal('path_html')), <bang>0) + +command! -buffer VimwikiRss call vimwiki#html#diary_rss() + +command! -buffer VimwikiTOC call vimwiki#base#table_of_contents(1) + +command! -buffer VimwikiNextTask call vimwiki#base#find_next_task() +command! -buffer VimwikiNextLink call vimwiki#base#find_next_link() +command! -buffer VimwikiPrevLink call vimwiki#base#find_prev_link() +command! -buffer VimwikiDeleteFile call vimwiki#base#delete_link() +command! -buffer VimwikiDeleteLink + \ call vimwiki#u#deprecate("VimwikiDeleteLink", "VimwikiDeleteFile") | + \ call vimwiki#base#delete_link() +command! -buffer -nargs=? -complete=customlist,vimwiki#base#complete_file + \ VimwikiRenameFile call vimwiki#base#rename_file(<f-args>) +command! -buffer VimwikiRenameLink + \ call vimwiki#u#deprecate("VimwikiRenameLink", "VimwikiRenameFile") | + \ call vimwiki#base#rename_file() +command! -buffer VimwikiFollowLink call vimwiki#base#follow_link('nosplit', 0, 1) +command! -buffer VimwikiGoBackLink call vimwiki#base#go_back_link() +command! -buffer -nargs=* VimwikiSplitLink call vimwiki#base#follow_link('hsplit', <f-args>) +command! -buffer -nargs=* VimwikiVSplitLink call vimwiki#base#follow_link('vsplit', <f-args>) +command! -buffer VimwikiBaddLink call vimwiki#base#follow_link('badd', 0, 1) + +command! -buffer -nargs=? VimwikiNormalizeLink call vimwiki#base#normalize_link(<f-args>) + +command! -buffer VimwikiTabnewLink call vimwiki#base#follow_link('tab', 0, 1) + +command! -buffer VimwikiTabDropLink call vimwiki#base#follow_link('tabdrop', 0, 1) + +command! -buffer -nargs=? VimwikiGenerateLinks call vimwiki#base#generate_links(1, <f-args>) + +command! -buffer -nargs=0 VimwikiBacklinks call vimwiki#base#backlinks() +command! -buffer -nargs=0 VWB call vimwiki#base#backlinks() + +command! -buffer -nargs=* VimwikiSearch call vimwiki#base#search(<q-args>) +command! -buffer -nargs=* VWS call vimwiki#base#search(<q-args>) + +command! -buffer -nargs=* -complete=customlist,vimwiki#base#complete_links_escaped + \ VimwikiGoto call vimwiki#base#goto(<q-args>) + +command! -buffer -range VimwikiCheckLinks call vimwiki#base#check_links(<range>, <line1>, <line2>) + +" list commands +command! -buffer -nargs=+ VimwikiReturn call <SID>CR(<f-args>) +command! -buffer -range -nargs=1 VimwikiChangeSymbolTo + \ call vimwiki#lst#change_marker(<line1>, <line2>, <f-args>, 'n') +command! -buffer -range -nargs=1 VimwikiListChangeSymbolI + \ call vimwiki#lst#change_marker(<line1>, <line2>, <f-args>, 'i') +command! -buffer -nargs=1 VimwikiChangeSymbolInListTo + \ call vimwiki#lst#change_marker_in_list(<f-args>) +command! -buffer -range VimwikiToggleListItem call vimwiki#lst#toggle_cb(<line1>, <line2>) +command! -buffer -range VimwikiToggleRejectedListItem + \ call vimwiki#lst#toggle_rejected_cb(<line1>, <line2>) +command! -buffer -range VimwikiIncrementListItem call vimwiki#lst#increment_cb(<line1>, <line2>) +command! -buffer -range VimwikiDecrementListItem call vimwiki#lst#decrement_cb(<line1>, <line2>) +command! -buffer -range -nargs=+ VimwikiListChangeLvl + \ call vimwiki#lst#change_level(<line1>, <line2>, <f-args>) +command! -buffer -range VimwikiRemoveSingleCB call vimwiki#lst#remove_cb(<line1>, <line2>) +command! -buffer VimwikiRemoveCBInList call vimwiki#lst#remove_cb_in_list() +command! -buffer VimwikiRenumberList call vimwiki#lst#adjust_numbered_list() +command! -buffer VimwikiRenumberAllLists call vimwiki#lst#adjust_whole_buffer() +command! -buffer VimwikiListToggle call vimwiki#lst#toggle_list_item() +command! -buffer -range VimwikiRemoveDone call vimwiki#lst#remove_done(1, "<range>", <line1>, <line2>) + +" table commands +command! -buffer -nargs=* VimwikiTable call vimwiki#tbl#create(<f-args>) +command! -buffer -nargs=? VimwikiTableAlignQ call vimwiki#tbl#align_or_cmd('gqq', <f-args>) +command! -buffer -nargs=? VimwikiTableAlignW call vimwiki#tbl#align_or_cmd('gww', <f-args>) +command! -buffer VimwikiTableMoveColumnLeft call vimwiki#tbl#move_column_left() +command! -buffer VimwikiTableMoveColumnRight call vimwiki#tbl#move_column_right() + +" diary commands +command! -buffer VimwikiDiaryNextDay call vimwiki#diary#goto_next_day() +command! -buffer VimwikiDiaryPrevDay call vimwiki#diary#goto_prev_day() + +" tags commands +command! -buffer -bang VimwikiRebuildTags call vimwiki#tags#update_tags(1, '<bang>') +command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags + \ VimwikiSearchTags VimwikiSearch /:<args>:/ +command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags + \ VimwikiGenerateTagLinks call vimwiki#tags#generate_tags(1, <f-args>) +command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags + \ VimwikiGenerateTags + \ call vimwiki#u#deprecate("VimwikiGenerateTags", "VimwikiGenerateTagLinks") | + \ call vimwiki#tags#generate_tags(1, <f-args>) + +command! -buffer VimwikiPasteUrl call vimwiki#html#PasteUrl(expand('%:p')) +command! -buffer VimwikiPasteLink call vimwiki#path#PasteLink(expand('%:p')) +command! -buffer VimwikiCatUrl call vimwiki#html#CatUrl(expand('%:p')) +command! -buffer -nargs=* -range -complete=custom,vimwiki#base#complete_colorize + \ VimwikiColorize <line1>,<line2>call vimwiki#base#colorize(<f-args>) + +" ------------------------------------------------ +" Keybindings +" ------------------------------------------------ + +" mouse mappings +if str2nr(vimwiki#vars#get_global('key_mappings').mouse) + nmap <buffer> <S-LeftMouse> <NOP> + nmap <buffer> <C-LeftMouse> <NOP> + nnoremap <silent><buffer> <2-LeftMouse> + \ :call vimwiki#base#follow_link('nosplit', 0, 1, "\<lt>2-LeftMouse>")<CR> + nnoremap <silent><buffer> <S-2-LeftMouse> <LeftMouse>:VimwikiSplitLink<CR> + nnoremap <silent><buffer> <C-2-LeftMouse> <LeftMouse>:VimwikiVSplitLink<CR> + nnoremap <silent><buffer> <MiddleMouse> <LeftMouse>:VimwikiBaddLink<CR> + nnoremap <silent><buffer> <RightMouse><LeftMouse> :VimwikiGoBackLink<CR> +endif + +" <Plug> HTML definitions +nnoremap <script><buffer> <Plug>Vimwiki2HTML :Vimwiki2HTML<CR> +nnoremap <script><buffer> <Plug>Vimwiki2HTMLBrowse :Vimwiki2HTMLBrowse<CR> + +" default HTML key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').html) + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'h', '<Plug>Vimwiki2HTML') + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'hh', '<Plug>Vimwiki2HTMLBrowse') +endif + +" <Plug> links definitions +nnoremap <silent><script><buffer> <Plug>VimwikiFollowLink + \ :VimwikiFollowLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiSplitLink + \ :VimwikiSplitLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiVSplitLink + \ :VimwikiVSplitLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiBaddLink + \ :VimwikiBaddLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiNormalizeLink + \ :VimwikiNormalizeLink 0<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiNormalizeLinkVisual + \ :<C-U>VimwikiNormalizeLink 1<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiNormalizeLinkVisualCR + \ :<C-U>VimwikiNormalizeLink 1<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiTabnewLink + \ :VimwikiTabnewLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiTabDropLink + \ :VimwikiTabDropLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiGoBackLink + \ :VimwikiGoBackLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiNextLink + \ :VimwikiNextLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiPrevLink + \ :VimwikiPrevLink<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiGoto + \ :VimwikiGoto<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiDeleteFile + \ :VimwikiDeleteFile<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiRenameFile + \ :VimwikiRenameFile<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiDiaryNextDay + \ :VimwikiDiaryNextDay<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiDiaryPrevDay + \ :VimwikiDiaryPrevDay<CR> +noremap <script><buffer> <Plug>VimwikiColorizeNormal + \ :call vimwiki#base#colorize(vimwiki#base#get_user_color(), '')<CR> +vnoremap <script><buffer> <Plug>VimwikiColorize + \ :call vimwiki#base#colorize(vimwiki#base#get_user_color(), visualmode())<CR> + +" Declare Map: default links key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').links) + call vimwiki#u#map_key('n', '<CR>', '<Plug>VimwikiFollowLink') + call vimwiki#u#map_key('n', '<S-CR>', '<Plug>VimwikiSplitLink') + call vimwiki#u#map_key('n', '<C-CR>', '<Plug>VimwikiVSplitLink') + call vimwiki#u#map_key('n', '<M-CR>', '<Plug>VimwikiBaddLink') + call vimwiki#u#map_key('n', '+', '<Plug>VimwikiNormalizeLink') + call vimwiki#u#map_key('v', '+', '<Plug>VimwikiNormalizeLinkVisual') + call vimwiki#u#map_key('v', '<CR>', '<Plug>VimwikiNormalizeLinkVisualCR') + call vimwiki#u#map_key('n', '<D-CR>', '<Plug>VimwikiTabDropLink') + call vimwiki#u#map_key('n', '<C-S-CR>', '<Plug>VimwikiTabDropLink', 1) + call vimwiki#u#map_key('n', '<BS>', '<Plug>VimwikiGoBackLink') + call vimwiki#u#map_key('n', '<TAB>', '<Plug>VimwikiNextLink') + call vimwiki#u#map_key('n', '<S-TAB>', '<Plug>VimwikiPrevLink') + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'n', '<Plug>VimwikiGoto') + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'d', '<Plug>VimwikiDeleteFile') + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'r', '<Plug>VimwikiRenameFile') + call vimwiki#u#map_key('n', vimwiki#vars#get_global('map_prefix').'c', '<Plug>VimwikiColorizeNormal') + call vimwiki#u#map_key('v', vimwiki#vars#get_global('map_prefix').'c', '<Plug>VimwikiColorize') + call vimwiki#u#map_key('n', '<C-Down>', '<Plug>VimwikiDiaryNextDay') + call vimwiki#u#map_key('n', '<C-Up>', '<Plug>VimwikiDiaryPrevDay') +endif + +" Map: <Plug> lists definitions +nnoremap <silent><script><buffer> <Plug>VimwikiNextTask + \ :VimwikiNextTask<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiToggleListItem + \ :VimwikiToggleListItem<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiToggleListItem + \ :VimwikiToggleListItem<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiToggleRejectedListItem + \ :VimwikiToggleRejectedListItem<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiToggleRejectedListItem + \ :VimwikiToggleRejectedListItem<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiIncrementListItem + \ :VimwikiIncrementListItem<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiIncrementListItem + \ :VimwikiIncrementListItem<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiDecrementListItem + \ :VimwikiDecrementListItem<CR> +vnoremap <silent><script><buffer> <Plug>VimwikiDecrementListItem + \ :VimwikiDecrementListItem<CR> +inoremap <silent><script><buffer> <Plug>VimwikiDecreaseLvlSingleItem + \ <C-O>:VimwikiListChangeLvl decrease 0<CR> +inoremap <silent><script><buffer> <Plug>VimwikiIncreaseLvlSingleItem + \ <C-O>:VimwikiListChangeLvl increase 0<CR> +inoremap <silent><script><buffer> <Plug>VimwikiListNextSymbol + \ <C-O>:VimwikiListChangeSymbolI next<CR> +inoremap <silent><script><buffer> <Plug>VimwikiListPrevSymbol + \ <C-O>:VimwikiListChangeSymbolI prev<CR> +inoremap <silent><script><buffer> <Plug>VimwikiListToggle + \ <Esc>:VimwikiListToggle<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiRenumberList + \ :VimwikiRenumberList<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiRenumberAllLists + \ :VimwikiRenumberAllLists<CR> +noremap <silent><script><buffer> <Plug>VimwikiDecreaseLvlSingleItem + \ :VimwikiListChangeLvl decrease 0<CR> +noremap <silent><script><buffer> <Plug>VimwikiIncreaseLvlSingleItem + \ :VimwikiListChangeLvl increase 0<CR> +noremap <silent><script><buffer> <Plug>VimwikiDecreaseLvlWholeItem + \ :VimwikiListChangeLvl decrease 1<CR> +noremap <silent><script><buffer> <Plug>VimwikiIncreaseLvlWholeItem + \ :VimwikiListChangeLvl increase 1<CR> +noremap <silent><script><buffer> <Plug>VimwikiRemoveSingleCB + \ :VimwikiRemoveSingleCB<CR> +noremap <silent><script><buffer> <Plug>VimwikiRemoveCBInList + \ :VimwikiRemoveCBInList<CR> +nnoremap <silent><buffer> <Plug>VimwikiListo + \ :<C-U>call vimwiki#u#count_exe('call vimwiki#lst#kbd_o()')<CR> +nnoremap <silent><buffer> <Plug>VimwikiListO + \ :<C-U>call vimwiki#u#count_exe('call vimwiki#lst#kbd_O()')<CR> + +" Declare Map: default lists key mappings (again) +if str2nr(vimwiki#vars#get_global('key_mappings').lists) + call vimwiki#u#map_key('n', 'gnt', '<Plug>VimwikiNextTask') + if !hasmapto('<Plug>VimwikiToggleListItem') + call vimwiki#u#map_key('n', '<C-Space>', '<Plug>VimwikiToggleListItem') + call vimwiki#u#map_key('v', '<C-Space>', '<Plug>VimwikiToggleListItem', 1) + if has('unix') + call vimwiki#u#map_key('n', '<C-@>', '<Plug>VimwikiToggleListItem', 1) + call vimwiki#u#map_key('v', '<C-@>', '<Plug>VimwikiToggleListItem', 1) + endif + endif + call vimwiki#u#map_key('n', 'glx', '<Plug>VimwikiToggleRejectedListItem') + call vimwiki#u#map_key('v', 'glx', '<Plug>VimwikiToggleRejectedListItem', 1) + call vimwiki#u#map_key('n', 'gln', '<Plug>VimwikiIncrementListItem') + call vimwiki#u#map_key('v', 'gln', '<Plug>VimwikiIncrementListItem', 1) + call vimwiki#u#map_key('n', 'glp', '<Plug>VimwikiDecrementListItem') + call vimwiki#u#map_key('v', 'glp', '<Plug>VimwikiDecrementListItem', 1) + call vimwiki#u#map_key('i', '<C-D>', '<Plug>VimwikiDecreaseLvlSingleItem') + call vimwiki#u#map_key('i', '<C-T>', '<Plug>VimwikiIncreaseLvlSingleItem') + call vimwiki#u#map_key('n', 'glh', '<Plug>VimwikiDecreaseLvlSingleItem', 1) + call vimwiki#u#map_key('n', 'gll', '<Plug>VimwikiIncreaseLvlSingleItem', 1) + call vimwiki#u#map_key('n', 'gLh', '<Plug>VimwikiDecreaseLvlWholeItem') + call vimwiki#u#map_key('n', 'gLH', '<Plug>VimwikiDecreaseLvlWholeItem', 1) + call vimwiki#u#map_key('n', 'gLl', '<Plug>VimwikiIncreaseLvlWholeItem') + call vimwiki#u#map_key('n', 'gLL', '<Plug>VimwikiIncreaseLvlWholeItem', 1) + call vimwiki#u#map_key('i', '<C-L><C-J>', '<Plug>VimwikiListNextSymbol') + call vimwiki#u#map_key('i', '<C-L><C-K>', '<Plug>VimwikiListPrevSymbol') + call vimwiki#u#map_key('i', '<C-L><C-M>', '<Plug>VimwikiListToggle') + call vimwiki#u#map_key('n', 'glr', '<Plug>VimwikiRenumberList') + call vimwiki#u#map_key('n', 'gLr', '<Plug>VimwikiRenumberAllLists') + call vimwiki#u#map_key('n', 'gLR', '<Plug>VimwikiRenumberAllLists', 1) + call vimwiki#u#map_key('n', 'gl', '<Plug>VimwikiRemoveSingleCB') + call vimwiki#u#map_key('n', 'gL', '<Plug>VimwikiRemoveCBInList') + call vimwiki#u#map_key('n', 'o', '<Plug>VimwikiListo') + call vimwiki#u#map_key('n', 'O', '<Plug>VimwikiListO') + + " Set lists_return to 0, if you don't want <CR> mapped to VimwikiReturn + if str2nr(vimwiki#vars#get_global('key_mappings').lists_return) + " Handle case of existing VimwikiReturn mappings outside the <Plug> definition + " Note: Avoid interfering with popup/completion menu if it's active (#813) + if maparg('<CR>', 'i') !~# '.*VimwikiReturn*.' + if has('patch-7.3.489') + " expand iabbrev on enter + inoremap <expr><silent><buffer> <CR> pumvisible() ? '<CR>' : '<C-]><Esc>:VimwikiReturn 1 5<CR>' + else + inoremap <expr><silent><buffer> <CR> pumvisible() ? '<CR>' : '<Esc>:VimwikiReturn 1 5<CR>' + endif + endif + if maparg('<S-CR>', 'i') !~# '.*VimwikiReturn*.' + inoremap <expr><silent><buffer> <S-CR> pumvisible() ? '<CR>' : '<Esc>:VimwikiReturn 2 2<CR>' + endif + endif + + " change symbol for bulleted lists + for s:char in vimwiki#vars#get_syntaxlocal('bullet_types') + if !hasmapto(':VimwikiChangeSymbolTo '.s:char.'<CR>') + exe 'noremap <silent><buffer> gl'.s:char.' :VimwikiChangeSymbolTo '.s:char.'<CR>' + endif + if !hasmapto(':VimwikiChangeSymbolInListTo '.s:char.'<CR>') + exe 'noremap <silent><buffer> gL'.s:char.' :VimwikiChangeSymbolInListTo '.s:char.'<CR>' + endif + endfor + + " change symbol for numbered lists + for s:typ in vimwiki#vars#get_syntaxlocal('number_types') + if !hasmapto(':VimwikiChangeSymbolTo '.s:typ.'<CR>') + exe 'noremap <silent><buffer> gl'.s:typ[0].' :VimwikiChangeSymbolTo '.s:typ.'<CR>' + endif + if !hasmapto(':VimwikiChangeSymbolInListTo '.s:typ.'<CR>') + exe 'noremap <silent><buffer> gL'.s:typ[0].' :VimwikiChangeSymbolInListTo '.s:typ.'<CR>' + endif + endfor + + " insert items in a list using langmap characters (see :h langmap) + if !empty(&langmap) + " Valid only if langmap is a comma separated pairs of chars + let s:l_o = matchstr(&langmap, '\C,\zs.\zeo,') + if s:l_o + exe 'nnoremap <silent><buffer> '.s:l_o.' :call vimwiki#lst#kbd_o()<CR>a' + endif + + let s:l_O = matchstr(&langmap, '\C,\zs.\zeO,') + if s:l_O + exe 'nnoremap <silent><buffer> '.s:l_O.' :call vimwiki#lst#kbd_O()<CR>a' + endif + endif +endif + +function! s:CR(normal, just_mrkr) abort + let res = vimwiki#tbl#kbd_cr() + if res !=? '' + exe 'normal! ' . res . "\<Right>" + startinsert + return + endif + call vimwiki#lst#kbd_cr(a:normal, a:just_mrkr) +endfunction + +" insert mode table mappings +inoremap <silent><buffer><expr> <Plug>VimwikiTableNextCell + \ vimwiki#tbl#kbd_tab() +inoremap <silent><buffer><expr> <Plug>VimwikiTablePrevCell + \ vimwiki#tbl#kbd_shift_tab() +if str2nr(vimwiki#vars#get_global('key_mappings').table_mappings) + call vimwiki#u#map_key('i', '<Tab>', '<Plug>VimwikiTableNextCell') + call vimwiki#u#map_key('i', '<S-Tab>', '<Plug>VimwikiTablePrevCell') +endif + +" <Plug> table formatting definitions +nnoremap <silent><buffer> <Plug>VimwikiTableAlignQ + \ :VimwikiTableAlignQ<CR> +nnoremap <silent><buffer> <Plug>VimwikiTableAlignQ1 + \ :VimwikiTableAlignQ 2<CR> +nnoremap <silent><buffer> <Plug>VimwikiTableAlignW + \ :VimwikiTableAlignW<CR> +nnoremap <silent><buffer> <Plug>VimwikiTableAlignW1 + \ :VimwikiTableAlignW 2<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiTableMoveColumnLeft + \ :VimwikiTableMoveColumnLeft<CR> +nnoremap <silent><script><buffer> <Plug>VimwikiTableMoveColumnRight + \ :VimwikiTableMoveColumnRight<CR> + +" default table formatting key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').table_format) + call vimwiki#u#map_key('n', 'gqq', '<Plug>VimwikiTableAlignQ') + call vimwiki#u#map_key('n', 'gq1', '<Plug>VimwikiTableAlignQ1') + call vimwiki#u#map_key('n', 'gww', '<Plug>VimwikiTableAlignW') + call vimwiki#u#map_key('n', 'gw1', '<Plug>VimwikiTableAlignW1') + call vimwiki#u#map_key('n', '<A-Left>', '<Plug>VimwikiTableMoveColumnLeft') + call vimwiki#u#map_key('n', '<A-Right>', '<Plug>VimwikiTableMoveColumnRight') +endif + +" <Plug> text object definitions +onoremap <silent><buffer> <Plug>VimwikiTextObjHeader + \ :<C-U>call vimwiki#base#TO_header(0, 0, v:count1)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjHeaderV + \ :<C-U>call vimwiki#base#TO_header(0, 0, v:count1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjHeaderContent + \ :<C-U>call vimwiki#base#TO_header(1, 0, v:count1)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjHeaderContentV + \ :<C-U>call vimwiki#base#TO_header(1, 0, v:count1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjHeaderSub + \ :<C-U>call vimwiki#base#TO_header(0, 1, v:count1)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjHeaderSubV + \ :<C-U>call vimwiki#base#TO_header(0, 1, v:count1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjHeaderSubContent + \ :<C-U>call vimwiki#base#TO_header(1, 1, v:count1)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjHeaderSubContentV + \ :<C-U>call vimwiki#base#TO_header(1, 1, v:count1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjTableCell + \ :<C-U>call vimwiki#base#TO_table_cell(0, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjTableCellV + \ :<C-U>call vimwiki#base#TO_table_cell(0, 1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjTableCellInner + \ :<C-U>call vimwiki#base#TO_table_cell(1, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjTableCellInnerV + \ :<C-U>call vimwiki#base#TO_table_cell(1, 1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjColumn + \ :<C-U>call vimwiki#base#TO_table_col(0, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjColumnV + \ :<C-U>call vimwiki#base#TO_table_col(0, 1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjColumnInner + \ :<C-U>call vimwiki#base#TO_table_col(1, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjColumnInnerV + \ :<C-U>call vimwiki#base#TO_table_col(1, 1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjListChildren + \ :<C-U>call vimwiki#lst#TO_list_item(0, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjListChildrenV + \ :<C-U>call vimwiki#lst#TO_list_item(0, 1)<CR> +onoremap <silent><buffer> <Plug>VimwikiTextObjListSingle + \ :<C-U>call vimwiki#lst#TO_list_item(1, 0)<CR> +vnoremap <silent><buffer> <Plug>VimwikiTextObjListSingleV + \ :<C-U>call vimwiki#lst#TO_list_item(1, 1)<CR> + +" Declare Map: default text object key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').text_objs) + call vimwiki#u#map_key('o', 'ah', '<Plug>VimwikiTextObjHeader') + call vimwiki#u#map_key('v', 'ah', '<Plug>VimwikiTextObjHeaderV') + call vimwiki#u#map_key('o', 'ih', '<Plug>VimwikiTextObjHeaderContent') + call vimwiki#u#map_key('v', 'ih', '<Plug>VimwikiTextObjHeaderContentV') + call vimwiki#u#map_key('o', 'aH', '<Plug>VimwikiTextObjHeaderSub') + call vimwiki#u#map_key('v', 'aH', '<Plug>VimwikiTextObjHeaderSubV') + call vimwiki#u#map_key('o', 'iH', '<Plug>VimwikiTextObjHeaderSubContent') + call vimwiki#u#map_key('v', 'iH', '<Plug>VimwikiTextObjHeaderSubContentV') + call vimwiki#u#map_key('o', 'a\', '<Plug>VimwikiTextObjTableCell') + call vimwiki#u#map_key('v', 'a\', '<Plug>VimwikiTextObjTableCellV') + call vimwiki#u#map_key('o', 'i\', '<Plug>VimwikiTextObjTableCellInner') + call vimwiki#u#map_key('v', 'i\', '<Plug>VimwikiTextObjTableCellInnerV') + call vimwiki#u#map_key('o', 'ac', '<Plug>VimwikiTextObjColumn') + call vimwiki#u#map_key('v', 'ac', '<Plug>VimwikiTextObjColumnV') + call vimwiki#u#map_key('o', 'ic', '<Plug>VimwikiTextObjColumnInner') + call vimwiki#u#map_key('v', 'ic', '<Plug>VimwikiTextObjColumnInnerV') + call vimwiki#u#map_key('o', 'al', '<Plug>VimwikiTextObjListChildren') + call vimwiki#u#map_key('v', 'al', '<Plug>VimwikiTextObjListChildrenV') + call vimwiki#u#map_key('o', 'il', '<Plug>VimwikiTextObjListSingle') + call vimwiki#u#map_key('v', 'il', '<Plug>VimwikiTextObjListSingleV') +endif + +" Map: <Plug> header definitions +nnoremap <silent><buffer> <Plug>VimwikiAddHeaderLevel + \ :<C-U>call vimwiki#base#AddHeaderLevel(v:count)<CR> +nnoremap <silent><buffer> <Plug>VimwikiRemoveHeaderLevel + \ :<C-U>call vimwiki#base#RemoveHeaderLevel(v:count)<CR> +nnoremap <silent><buffer> <Plug>VimwikiGoToParentHeader + \ :<C-u>call vimwiki#base#goto_parent_header()<CR> +nnoremap <silent><buffer> <Plug>VimwikiGoToNextHeader + \ :<C-u>call vimwiki#base#goto_next_header()<CR> +nnoremap <silent><buffer> <Plug>VimwikiGoToPrevHeader + \ :<C-u>call vimwiki#base#goto_prev_header()<CR> +nnoremap <silent><buffer> <Plug>VimwikiGoToNextSiblingHeader + \ :<C-u>call vimwiki#base#goto_sibling(+1)<CR> +nnoremap <silent><buffer> <Plug>VimwikiGoToPrevSiblingHeader + \ :<C-u>call vimwiki#base#goto_sibling(-1)<CR> + +" Declare Map Header: default header key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').headers) + call vimwiki#u#map_key('n', '=', '<Plug>VimwikiAddHeaderLevel') + call vimwiki#u#map_key('n', '-', '<Plug>VimwikiRemoveHeaderLevel') + call vimwiki#u#map_key('n', ']u', '<Plug>VimwikiGoToParentHeader') + call vimwiki#u#map_key('n', '[u', '<Plug>VimwikiGoToParentHeader', 1) + call vimwiki#u#map_key('n', ']]', '<Plug>VimwikiGoToNextHeader') + call vimwiki#u#map_key('n', '[[', '<Plug>VimwikiGoToPrevHeader') + call vimwiki#u#map_key('n', ']=', '<Plug>VimwikiGoToNextSiblingHeader') + call vimwiki#u#map_key('n', '[=', '<Plug>VimwikiGoToPrevSiblingHeader') +endif + +if vimwiki#vars#get_wikilocal('auto_export') + " Automatically generate HTML on page write. + augroup vimwiki + au BufWritePost <buffer> + \ call vimwiki#html#Wiki2HTML(expand(vimwiki#vars#get_wikilocal('path_html')), + \ expand('%')) + augroup END +endif + +if vimwiki#vars#get_wikilocal('auto_toc') + " Automatically update the TOC *before* the file is written + augroup vimwiki + au BufWritePre <buffer> call vimwiki#base#table_of_contents(0) + augroup END +endif + +if vimwiki#vars#get_wikilocal('auto_tags') + " Automatically update tags metadata on page write. + augroup vimwiki + au BufWritePre <buffer> call vimwiki#tags#update_tags(0, '') + augroup END +endif + +if vimwiki#vars#get_wikilocal('auto_generate_links') + " Automatically generate links *before* the file is written + augroup vimwiki + au BufWritePre <buffer> call vimwiki#base#generate_links(0) + augroup END +endif + +if vimwiki#vars#get_wikilocal('auto_generate_tags') + " Automatically generate tags *before* the file is written + augroup vimwiki + au BufWritePre <buffer> call vimwiki#tags#generate_tags(0) + augroup END +endif diff --git a/dot_vim/plugged/vimwiki/plugin/vimwiki.vim b/dot_vim/plugged/vimwiki/plugin/vimwiki.vim new file mode 100644 index 0000000..eb7988b --- /dev/null +++ b/dot_vim/plugged/vimwiki/plugin/vimwiki.vim @@ -0,0 +1,482 @@ +" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 +" Vimwiki plugin file +" Home: https://github.com/vimwiki/vimwiki/ +" GetLatestVimScripts: 2226 1 :AutoInstall: vimwiki + + +" Clause: load only onces +if exists('g:loaded_vimwiki') || &compatible + finish +endif +let g:loaded_vimwiki = 1 + +" Set to version number for release: +let g:vimwiki_version = '2022.12.02' + +" Get the directory the script is installed in +let s:plugin_dir = expand('<sfile>:p:h:h') + +" Save peace in the galaxy +let s:old_cpo = &cpoptions +set cpoptions&vim + +" Save autowriteall varaible state +if exists('g:vimwiki_autowriteall') + let s:vimwiki_autowriteall_saved = g:vimwiki_autowriteall +else + let s:vimwiki_autowriteall_saved = 1 +endif + + +" Autocommand called when the cursor leaves the buffer +function! s:setup_buffer_leave() abort + " don't do anything if it's not managed by Vimwiki (that is, when it's not in + " a registered wiki and not a temporary wiki) + if vimwiki#vars#get_bufferlocal('wiki_nr') == -1 + return + endif + + let &autowriteall = s:vimwiki_autowriteall_saved + + if !empty(vimwiki#vars#get_global('menu')) + exe 'nmenu disable '.vimwiki#vars#get_global('menu').'.Table' + endif +endfunction + + +" Create a new temporary wiki for the current buffer +function! s:create_temporary_wiki() abort + let path = expand('%:p:h') + let ext = '.'.expand('%:e') + + let syntax_mapping = vimwiki#vars#get_global('ext2syntax') + if has_key(syntax_mapping, ext) + let syntax = syntax_mapping[ext] + else + let syntax = vimwiki#vars#get_wikilocal_default('syntax') + endif + + let new_temp_wiki_settings = {'path': path, + \ 'ext': ext, + \ 'syntax': syntax, + \ } + + call vimwiki#vars#add_temporary_wiki(new_temp_wiki_settings) + + " Update the wiki number of the current buffer, because it may have changed when adding this + " temporary wiki. + call vimwiki#vars#set_bufferlocal('wiki_nr', vimwiki#base#find_wiki(expand('%:p'))) +endfunction + + +" Autocommand called when Vim opens a new buffer with a known wiki +" extension. Both when the buffer has never been opened in this session and +" when it has. +function! s:setup_new_wiki_buffer() abort + let wiki_nr = vimwiki#vars#get_bufferlocal('wiki_nr') + if wiki_nr == -1 " it's not in a known wiki directory + if vimwiki#vars#get_global('global_ext') + call s:create_temporary_wiki() + else + " the user does not want a temporary wiki, so do nothing + return + endif + endif + + if vimwiki#vars#get_wikilocal('maxhi') + call vimwiki#vars#set_bufferlocal('existing_wikifiles', vimwiki#base#get_wikilinks(wiki_nr, 1, '')) + call vimwiki#vars#set_bufferlocal('existing_wikidirs', + \ vimwiki#base#get_wiki_directories(wiki_nr)) + endif + + " this makes that ftplugin/vimwiki.vim and afterwards syntax/vimwiki.vim are + " sourced + call vimwiki#u#ft_set() +endfunction + + +" Autocommand called when the cursor enters the buffer +function! s:setup_buffer_enter() abort + " don't do anything if it's not managed by Vimwiki (that is, when it's not in + " a registered wiki and not a temporary wiki) + if vimwiki#vars#get_bufferlocal('wiki_nr') == -1 + return + endif + + call s:set_global_options() +endfunction + + +" Autocommand called when the buffer enters a window or when running a diff +function! s:setup_buffer_win_enter() abort + " don't do anything if it's not managed by Vimwiki (that is, when it's not in + " a registered wiki and not a temporary wiki) + if vimwiki#vars#get_bufferlocal('wiki_nr') == -1 + return + endif + + if !vimwiki#u#ft_is_vw() + call vimwiki#u#ft_set() + endif + + call s:set_windowlocal_options() +endfunction + + +" Help syntax reloading +function! s:setup_cleared_syntax() abort + " highlight groups that get cleared + " on colorscheme change because they are not linked to Vim-predefined groups + hi def VimwikiBold term=bold cterm=bold gui=bold + hi def VimwikiItalic term=italic cterm=italic gui=italic + hi def VimwikiBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def VimwikiUnderline term=underline cterm=underline gui=underline + if vimwiki#vars#get_global('hl_headers') == 1 + for i in range(1,6) + execute 'hi def VimwikiHeader'.i.' guibg=bg guifg=' + \ . vimwiki#vars#get_global('hcolor_guifg_'.&background)[i-1] + \ .' gui=bold ctermfg='.vimwiki#vars#get_global('hcolor_ctermfg_'.&background)[i-1] + \ .' term=bold cterm=bold' + endfor + endif +endfunction + + +" Return: list of extension known vy vimwiki +function! s:vimwiki_get_known_extensions() abort + " Getting all extensions that different wikis could have + let extensions = {} + for idx in range(vimwiki#vars#number_of_wikis()) + let ext = vimwiki#vars#get_wikilocal('ext', idx) + let extensions[ext] = 1 + endfor + " append extensions from g:vimwiki_ext2syntax + for ext in keys(vimwiki#vars#get_global('ext2syntax')) + let extensions[ext] = 1 + endfor + return keys(extensions) +endfunction + + +" Set settings which are global for Vim, but should only be executed for +" Vimwiki buffers. So they must be set when the cursor enters a Vimwiki buffer +" and reset when the cursor leaves the buffer. +function! s:set_global_options() abort + let s:vimwiki_autowriteall_saved = &autowriteall + let &autowriteall = vimwiki#vars#get_global('autowriteall') + + if !empty(vimwiki#vars#get_global('menu')) + exe 'nmenu enable '.vimwiki#vars#get_global('menu').'.Table' + endif +endfunction + + +" Set settings which are local to a window. In a new tab they would be reset to +" Vim defaults. So we enforce our settings here when the cursor enters a +" Vimwiki buffer. +function! s:set_windowlocal_options() abort + if !&diff " if Vim is currently in diff mode, don't interfere with its folding + let foldmethod = vimwiki#vars#get_global('folding') + if foldmethod =~? '^expr.*' + setlocal foldmethod=expr + setlocal foldexpr=VimwikiFoldLevel(v:lnum) + setlocal foldtext=VimwikiFoldText() + elseif foldmethod =~? '^list.*' || foldmethod =~? '^lists.*' + setlocal foldmethod=expr + setlocal foldexpr=VimwikiFoldListLevel(v:lnum) + setlocal foldtext=VimwikiFoldText() + elseif foldmethod =~? '^syntax.*' + setlocal foldmethod=syntax + setlocal foldtext=VimwikiFoldText() + elseif foldmethod =~? '^custom.*' + " do nothing + else + setlocal foldmethod=manual + normal! zE + endif + endif + + if exists('+conceallevel') + let &l:conceallevel = vimwiki#vars#get_global('conceallevel') + endif + + if vimwiki#vars#get_global('auto_chdir') + exe 'lcd' vimwiki#vars#get_wikilocal('path') + endif +endfunction + + +" Echo vimwiki version +" Called by :VimwikiShowVersion +function! s:get_version() abort + echo 'Version: ' . g:vimwiki_version + let l:plugin_rev = system('git --git-dir ' . s:plugin_dir . '/.git rev-parse --short HEAD') + let l:plugin_branch = system('git --git-dir ' . s:plugin_dir . '/.git rev-parse --abbrev-ref HEAD') + let l:plugin_date = system('git --git-dir ' . s:plugin_dir . '/.git show -s --format=%ci') + if v:shell_error == 0 + echo 'Os: ' . vimwiki#u#os_name() + echo 'Vim: ' . v:version + echo 'Branch: ' . l:plugin_branch + echo 'Revision: ' . l:plugin_rev + echo 'Date: ' . l:plugin_date + else + echo 'Unable to retrieve repository info' + endif +endfunction + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Initialization of Vimwiki starts here. +" Make sure everything below does not cause autoload/vimwiki/base.vim +" to be loaded +call vimwiki#vars#init() + + +" Define callback functions which the user can redefine +if !exists('*VimwikiLinkHandler') + function VimwikiLinkHandler(url) + return 0 + endfunction +endif + +if !exists('*VimwikiLinkConverter') + function VimwikiLinkConverter(url, source, target) + " Return the empty string when unable to process link + return '' + endfunction +endif + +if !exists('*VimwikiWikiIncludeHandler') + function! VimwikiWikiIncludeHandler(value) + return '' + endfunction +endif + + +" Write a level 1 header to new wiki files +" a:fname should be an absolute filepath +function! s:create_h1(fname) abort + " Clause: Don't do anything for unregistered wikis + let idx = vimwiki#vars#get_bufferlocal('wiki_nr') + if idx == -1 + return + endif + + " Clause: no auto_header + if !vimwiki#vars#get_global('auto_header') + return + endif + + " Clause: don't create header for the diary index page + if vimwiki#path#is_equal(a:fname, + \ vimwiki#vars#get_wikilocal('path', idx).vimwiki#vars#get_wikilocal('diary_rel_path', idx). + \ vimwiki#vars#get_wikilocal('diary_index', idx).vimwiki#vars#get_wikilocal('ext', idx)) + return + endif + + " Get tail of filename without extension + let title = expand('%:t:r') + + " Clause: don't insert header for index page + if title ==# vimwiki#vars#get_wikilocal('index', idx) + return + endif + + " Don't substitute space char for diary pages + if title !~# '^\d\{4}-\d\d-\d\d' + " NOTE: it is possible this could remove desired characters if the 'links_space_char' + " character matches characters that are intentionally used in the title. + let title = substitute(title, vimwiki#vars#get_wikilocal('links_space_char'), ' ', 'g') + endif + + " Insert the header + if vimwiki#vars#get_wikilocal('syntax') ==? 'markdown' + keepjumps call append(0, '# ' . title) + for _ in range(vimwiki#vars#get_global('markdown_header_style')) + keepjumps call append(1, '') + endfor + else + keepjumps call append(0, '= ' . title . ' =') + endif +endfunction + +" Define autocommands for all known wiki extensions +let s:known_extensions = s:vimwiki_get_known_extensions() + +if index(s:known_extensions, '.wiki') > -1 + augroup filetypedetect + " Clear FlexWiki's stuff + au! * *.wiki + augroup end +endif + +augroup vimwiki + autocmd! + autocmd ColorScheme * call s:setup_cleared_syntax() + + " ['.md', '.mdown'] => *.md,*.mdown + let pat = join(map(s:known_extensions, '"*" . v:val'), ',') + exe 'autocmd BufNewFile,BufRead '.pat.' call s:setup_new_wiki_buffer()' + exe 'autocmd BufEnter '.pat.' call s:setup_buffer_enter()' + exe 'autocmd BufLeave '.pat.' call s:setup_buffer_leave()' + exe 'autocmd BufWinEnter '.pat.' call s:setup_buffer_win_enter()' + if exists('##DiffUpdated') + exe 'autocmd DiffUpdated '.pat.' call s:setup_buffer_win_enter()' + endif + " automatically generate a level 1 header for new files + exe 'autocmd BufNewFile '.pat.' call s:create_h1(expand("%:p"))' + " Format tables when exit from insert mode. Do not use textwidth to + " autowrap tables. + if vimwiki#vars#get_global('table_auto_fmt') + exe 'autocmd InsertLeave '.pat.' call vimwiki#tbl#format(line("."), 2)' + endif + if vimwiki#vars#get_global('folding') =~? ':quick$' + " from http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text + " Don't screw up folds when inserting text that might affect them, until + " leaving insert mode. Foldmethod is local to the window. Protect against + " screwing up folding when switching between windows. + exe 'autocmd InsertEnter '.pat.' if !exists("w:last_fdm") | let w:last_fdm=&foldmethod'. + \ ' | setlocal foldmethod=manual | endif' + exe 'autocmd InsertLeave,WinLeave '.pat.' if exists("w:last_fdm") |'. + \ 'let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif' + endif +augroup END + + +" Declare global commands +command! VimwikiUISelect call vimwiki#base#ui_select() + +" these commands take a count e.g. :VimwikiIndex 2 +" the default behavior is to open the index, diary etc. +" for the CURRENT wiki if no count is given +command! -count=0 VimwikiIndex + \ call vimwiki#base#goto_index(<count>) + +command! -count=0 VimwikiTabIndex + \ call vimwiki#base#goto_index(<count>, 1) + +command! -count=0 VimwikiDiaryIndex + \ call vimwiki#diary#goto_diary_index(<count>) + +command! -count=0 VimwikiMakeDiaryNote + \ call vimwiki#diary#make_note(<count>, 5) + +command! -count=0 VimwikiTabMakeDiaryNote + \ call vimwiki#diary#make_note(<count>, 1) + +command! -count=0 VimwikiMakeYesterdayDiaryNote + \ call vimwiki#diary#make_note(<count>, 0, + \ vimwiki#diary#diary_date_link(localtime(), -1)) + +command! -count=0 VimwikiMakeTomorrowDiaryNote + \ call vimwiki#diary#make_note(<count>, 0, + \ vimwiki#diary#diary_date_link(localtime(), 1)) + +command! VimwikiDiaryGenerateLinks + \ call vimwiki#diary#generate_diary_section() + +command! VimwikiShowVersion call s:get_version() + +command! -nargs=* -complete=customlist,vimwiki#vars#complete + \ VimwikiVar call vimwiki#vars#cmd(<q-args>) + + +" Declare global maps +" <Plug> global definitions +nnoremap <silent><script> <Plug>VimwikiIndex + \ :<C-U>call vimwiki#base#goto_index(v:count)<CR> +nnoremap <silent><script> <Plug>VimwikiTabIndex + \ :<C-U>call vimwiki#base#goto_index(v:count, 1)<CR> +nnoremap <silent><script> <Plug>VimwikiUISelect + \ :VimwikiUISelect<CR> +nnoremap <silent><script> <Plug>VimwikiDiaryIndex + \ :<C-U>call vimwiki#diary#goto_diary_index(v:count)<CR> +nnoremap <silent><script> <Plug>VimwikiDiaryGenerateLinks + \ :VimwikiDiaryGenerateLinks<CR> +nnoremap <silent><script> <Plug>VimwikiMakeDiaryNote + \ :<C-U>call vimwiki#diary#make_note(v:count, 5)<CR> +nnoremap <silent><script> <Plug>VimwikiTabMakeDiaryNote + \ :<C-U>call vimwiki#diary#make_note(v:count, 1)<CR> +nnoremap <silent><script> <Plug>VimwikiMakeYesterdayDiaryNote + \ :<C-U>call vimwiki#diary#make_note(v:count, 0, + \ vimwiki#diary#diary_date_link(localtime(), -1))<CR> +nnoremap <silent><script> <Plug>VimwikiMakeTomorrowDiaryNote + \ :<C-U>call vimwiki#diary#make_note(v:count, 0, + \ vimwiki#diary#diary_date_link(localtime(), 1))<CR> + + +" Set default global key mappings +if str2nr(vimwiki#vars#get_global('key_mappings').global) + " Get the user defined prefix (default <leader>w) + let s:map_prefix = vimwiki#vars#get_global('map_prefix') + + call vimwiki#u#map_key('n', s:map_prefix . 'w', '<Plug>VimwikiIndex', 2) + call vimwiki#u#map_key('n', s:map_prefix . 't', '<Plug>VimwikiTabIndex', 2) + call vimwiki#u#map_key('n', s:map_prefix . 's', '<Plug>VimwikiUISelect', 2) + call vimwiki#u#map_key('n', s:map_prefix . 'i', '<Plug>VimwikiDiaryIndex', 2) + call vimwiki#u#map_key('n', s:map_prefix . '<Leader>i', '<Plug>VimwikiDiaryGenerateLinks', 2) + call vimwiki#u#map_key('n', s:map_prefix . '<Leader>w', '<Plug>VimwikiMakeDiaryNote', 2) + call vimwiki#u#map_key('n', s:map_prefix . '<Leader>t', '<Plug>VimwikiTabMakeDiaryNote', 2) + call vimwiki#u#map_key('n', s:map_prefix . '<Leader>y', '<Plug>VimwikiMakeYesterdayDiaryNote', 2) + call vimwiki#u#map_key('n', s:map_prefix . '<Leader>m', '<Plug>VimwikiMakeTomorrowDiaryNote', 2) +endif + + +" Build global wiki menu (GUI) +function! s:build_menu(topmenu) abort + let wnamelist = [] + for idx in range(vimwiki#vars#number_of_wikis()) + let wname = vimwiki#vars#get_wikilocal('name', idx) + if wname ==? '' + " fall back to the path if wiki isn't named + let wname = fnamemodify(vimwiki#vars#get_wikilocal('path', idx), ':h:t') + endif + + if index(wnamelist, wname) != -1 + " append wiki index number to duplicate entries + let wname = wname . ' ' . string(idx + 1) + endif + + " add entry to the list of names for duplicate checks + call add(wnamelist, wname) + + " escape spaces and periods + let wname = escape(wname, '\ \.') + + " build the menu + execute 'menu '.a:topmenu.'.Open\ index.'.wname. + \ ' :call vimwiki#base#goto_index('.(idx+1).')<CR>' + execute 'menu '.a:topmenu.'.Open/Create\ diary\ note.'.wname. + \ ' :call vimwiki#diary#make_note('.(idx+1).')<CR>' + endfor +endfunction + + +" Build global table menu (GUI) +function! s:build_table_menu(topmenu) abort + exe 'menu '.a:topmenu.'.-Sep- :' + exe 'menu '.a:topmenu.'.Table.Create\ (enter\ cols\ rows) :VimwikiTable ' + exe 'nmenu '.a:topmenu.'.Table.Format<tab>gqq gqq' + exe 'nmenu '.a:topmenu.'.Table.Move\ column\ left<tab><A-Left> :VimwikiTableMoveColumnLeft<CR>' + exe 'nmenu '.a:topmenu. + \ '.Table.Move\ column\ right<tab><A-Right> :VimwikiTableMoveColumnRight<CR>' + exe 'nmenu disable '.a:topmenu.'.Table' +endfunction + + +" Build Menus now +if !empty(vimwiki#vars#get_global('menu')) + call s:build_menu(vimwiki#vars#get_global('menu')) + call s:build_table_menu(vimwiki#vars#get_global('menu')) +endif + + +" Hook for calendar.vim +if vimwiki#vars#get_global('use_calendar') + let g:calendar_action = 'vimwiki#diary#calendar_action' + let g:calendar_sign = 'vimwiki#diary#calendar_sign' +endif + + +" Restore peace in the galaxy +let &cpoptions = s:old_cpo diff --git a/dot_vim/plugged/vimwiki/syntax/vimwiki.vim b/dot_vim/plugged/vimwiki/syntax/vimwiki.vim new file mode 100644 index 0000000..9b1405a --- /dev/null +++ b/dot_vim/plugged/vimwiki/syntax/vimwiki.vim @@ -0,0 +1,540 @@ +" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 +" Vimwiki syntax file +" Home: https://github.com/vimwiki/vimwiki/ + + +" Quit if syntax file is already loaded +if v:version < 600 + syntax clear +elseif exists('b:current_syntax') + finish +endif + + +let s:current_syntax = vimwiki#vars#get_wikilocal('syntax') + +" Get config: possibly concealed chars +let b:vimwiki_syntax_conceal = exists('+conceallevel') ? ' conceal' : '' +let b:vimwiki_syntax_concealends = has('conceal') ? ' concealends' : '' + + +" Populate all syntax vars +" Include syntax/vimwiki_markdown.vim as "side effect" +call vimwiki#vars#populate_syntax_vars(s:current_syntax) +let syntax_dic = g:vimwiki_syntaxlocal_vars[s:current_syntax] + +" Declare nesting capabilities +" -- to be embeded in standard: bold, italic, underline + +" text: `code` or ``code`` only inline +" Note: `\%(^\|[^`]\)\@<=` means after a new line or a non ` + +" LINKS: highlighting is complicated due to "nonexistent" links feature +function! s:add_target_syntax_ON(target, type) abort + let prefix0 = 'syntax match '.a:type.' `' + let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char' + let prefix1 = 'syntax match '.a:type.'T `' + let suffix1 = '` display contained' + execute prefix0. a:target. suffix0 + execute prefix1. a:target. suffix1 +endfunction + + +function! s:add_target_syntax_OFF(target) abort + let prefix0 = 'syntax match VimwikiNoExistsLink `' + let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,VimwikiLinkChar' + let prefix1 = 'syntax match VimwikiNoExistsLinkT `' + let suffix1 = '` display contained' + execute prefix0. a:target. suffix0 + execute prefix1. a:target. suffix1 +endfunction + + +function! s:highlight_existing_links() abort + " Wikilink + " Conditional highlighting that depends on the existence of a wiki file or + " directory is only available for *schemeless* wiki links + " Links are set up upon BufEnter (see plugin/...) + let safe_links = '\%('.vimwiki#base#file_pattern( + \ vimwiki#vars#get_bufferlocal('existing_wikifiles')) . '\%(#[^|]*\)\?\|#[^|]*\)' + " Wikilink Dirs set up upon BufEnter (see plugin/...) + let safe_dirs = vimwiki#base#file_pattern(vimwiki#vars#get_bufferlocal('existing_wikidirs')) + + " match [[URL]] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate1')), + \ safe_links, vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') + " match [[URL|DESCRIPTION]] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate2')), + \ safe_links, vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') + + " match {{URL}} + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiInclTemplate1')), + \ safe_links, vimwiki#vars#get_global('rxWikiInclArgs'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') + " match {{URL|...}} + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiInclTemplate2')), + \ safe_links, vimwiki#vars#get_global('rxWikiInclArgs'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') + " match [[DIRURL]] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate1')), + \ safe_dirs, vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') + " match [[DIRURL|DESCRIPTION]] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate2')), + \ safe_dirs, vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') + call s:add_target_syntax_ON(target, 'VimwikiLink') +endfunction + + +" use max highlighting - could be quite slow if there are too many wikifiles +if vimwiki#vars#get_wikilocal('maxhi') + " WikiLink + call s:add_target_syntax_OFF(vimwiki#vars#get_syntaxlocal('rxWikiLink')) + " WikiIncl + call s:add_target_syntax_OFF(vimwiki#vars#get_global('rxWikiIncl')) + + " Subsequently, links verified on vimwiki's path are highlighted as existing + call s:highlight_existing_links() +else + " Wikilink + call s:add_target_syntax_ON(vimwiki#vars#get_syntaxlocal('rxWikiLink'), 'VimwikiLink') + " WikiIncl + call s:add_target_syntax_ON(vimwiki#vars#get_global('rxWikiIncl'), 'VimwikiLink') +endif + + +" Weblink: [DESCRIPTION](FILE) +call s:add_target_syntax_ON(vimwiki#vars#get_syntaxlocal('rxWeblink'), 'VimwikiLink') + + +" WikiLink: +" All remaining schemes are highlighted automatically +let s:rxSchemes = '\%('. + \ vimwiki#vars#get_global('schemes_local') . '\|'. + \ vimwiki#vars#get_global('schemes_web'). + \ '\):' + + +" a) match [[nonwiki-scheme-URL]] +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate1')), + \ s:rxSchemes.vimwiki#vars#get_global('rxWikiLinkUrl'), + \ vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') +call s:add_target_syntax_ON(s:target, 'VimwikiLink') +" b) match [[nonwiki-scheme-URL|DESCRIPTION]] +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiLinkTemplate2')), + \ s:rxSchemes.vimwiki#vars#get_global('rxWikiLinkUrl'), + \ vimwiki#vars#get_global('rxWikiLinkDescr'), '', '') +call s:add_target_syntax_ON(s:target, 'VimwikiLink') + +" a) match {{nonwiki-scheme-URL}} +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiInclTemplate1')), + \ s:rxSchemes.vimwiki#vars#get_global('rxWikiInclUrl'), + \ vimwiki#vars#get_global('rxWikiInclArgs'), '', '') +call s:add_target_syntax_ON(s:target, 'VimwikiLink') +" b) match {{nonwiki-scheme-URL}[{...}]} +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_global('WikiInclTemplate2')), + \ s:rxSchemes.vimwiki#vars#get_global('rxWikiInclUrl'), + \ vimwiki#vars#get_global('rxWikiInclArgs'), '', '') +call s:add_target_syntax_ON(s:target, 'VimwikiLink') + + +" Header Level: 1..6 +for s:i in range(1,6) + " WebLink are for markdown but putting them here avoidcode duplication + " -- and syntax folding Issue #1009 + execute 'syntax match VimwikiHeader'.s:i + \ . ' /'.vimwiki#vars#get_syntaxlocal('rxH'.s:i, s:current_syntax) + \ . '/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,' + \ . 'VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,VimwikiList,VimwikiListTodo,@Spell' + execute 'syntax region VimwikiH'.s:i.'Folding start=/' + \ . vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_Start', s:current_syntax).'/ end=/' + \ . vimwiki#vars#get_syntaxlocal('rxH'.s:i.'_End', s:current_syntax) + \ . '/me=s-1' + \ . ' transparent fold' +endfor + + +" SetExt Header: +" TODO mutualise SetExt Regexp +let setex_header1_re = '^\s\{0,3}[^>].*\n\s\{0,3}==\+$' +let setex_header2_re = '^\s\{0,3}[^>].*\n\s\{0,3}--\+$' +execute 'syntax match VimwikiHeader1' + \ . ' /'. setex_header1_re . '/ ' + \ 'contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,'. + \ 'VimwikiLink,@Spell' +execute 'syntax match VimwikiHeader2' + \ . ' /'. setex_header2_re . '/ ' . + \ 'contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,'. + \ 'VimwikiLink,@Spell' + + +let s:options = ' contained transparent contains=NONE' +if exists('+conceallevel') + let s:options .= b:vimwiki_syntax_conceal +endif + +" A shortener for long URLs: LinkRest (a middle part of the URL) is concealed +" VimwikiLinkRest group is left undefined if link shortening is not desired +if exists('+conceallevel') && vimwiki#vars#get_global('url_maxsave') > 0 + execute 'syn match VimwikiLinkRest `\%(///\=[^/ \t]\+/\)\zs\S\+\ze' + \.'\%([/#?]\w\|\S\{'.vimwiki#vars#get_global('url_maxsave').'}\)`'.' cchar=~'.s:options +endif + +" VimwikiLinkChar is for syntax markers (and also URL when a description +" is present) and may be concealed + +" conceal wikilinks +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rx_wikilink_prefix').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rx_wikilink_suffix').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rx_wikilink_prefix1').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rx_wikilink_suffix1').'/'.s:options + +" conceal wikiincls +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rxWikiInclPrefix').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rxWikiInclSuffix').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rxWikiInclPrefix1').'/'.s:options +execute 'syn match VimwikiLinkChar /'.vimwiki#vars#get_global('rxWikiInclSuffix1').'/'.s:options + + +" non concealed chars +execute 'syn match VimwikiHeaderChar contained /\%(^\s*'. + \ vimwiki#vars#get_syntaxlocal('header_symbol').'\+\)\|\%('.vimwiki#vars#get_syntaxlocal('header_symbol'). + \ '\+\s*$\)/' + +execute 'syntax match VimwikiTodo /'. vimwiki#vars#get_wikilocal('rx_todo') .'/' + + +" Table: +syntax match VimwikiTableRow /^\s*|.\+|\s*$/ + \ transparent contains=VimwikiCellSeparator, + \ VimwikiLinkT, + \ VimwikiNoExistsLinkT, + \ VimwikiTodo, + \ VimwikiBoldT, + \ VimwikiItalicT, + \ VimwikiBoldItalicT, + \ VimwikiItalicBoldT, + \ VimwikiDelTextT, + \ VimwikiSuperScriptT, + \ VimwikiSubScriptT, + \ VimwikiCodeT, + \ VimwikiEqInT, + \ VimwikiEmoji, + \ @Spell + +syntax match VimwikiCellSeparator /\%(|\)\|\%(-\@<=+\-\@=\)\|\%([|+]\@<=-\+\)/ contained + +" List: +execute 'syntax match VimwikiList /'.vimwiki#vars#get_wikilocal('rxListItemWithoutCB').'/' +execute 'syntax match VimwikiList /'.vimwiki#vars#get_syntaxlocal('rxListDefine').'/' +execute 'syntax match VimwikiListTodo /'.vimwiki#vars#get_wikilocal('rxListItem').'/' + +" Task List Done: +if vimwiki#vars#get_global('hl_cb_checked') == 1 + execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_wikilocal('rxListItemWithoutCB') + \ . '\s*\[['.vimwiki#vars#get_wikilocal('listsyms_list')[-1] + \ . vimwiki#vars#get_global('listsym_rejected') + \ . ']\]\s\(.*\)$/ ' + \ . 'contains=' . syntax_dic.nested . ',VimwikiNoExistsLink,VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,@Spell' +elseif vimwiki#vars#get_global('hl_cb_checked') == 2 + execute 'syntax match VimwikiCheckBoxDone /' + \ . vimwiki#vars#get_wikilocal('rxListItemAndChildren') + \ .'/ contains=VimwikiNoExistsLink,VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,@Spell' +endif + + +" Horizontal Rule: <hr> +execute 'syntax match VimwikiHR /'.vimwiki#vars#get_syntaxlocal('rxHR').'/' + +" Preformated Text: `like that` +let concealpre = vimwiki#vars#get_global('conceal_pre') ? ' concealends' : '' +execute 'syntax region VimwikiPre matchgroup=VimwikiPreDelim start=/'.vimwiki#vars#get_syntaxlocal('rxPreStart'). + \ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxPreEnd').'/ contains=@NoSpell'.concealpre + +" Equation Text: $like that$ +execute 'syntax region VimwikiMath start=/'.vimwiki#vars#get_syntaxlocal('rxMathStart'). + \ '/ end=/'.vimwiki#vars#get_syntaxlocal('rxMathEnd').'/ contains=@NoSpell' + + +" Placeholder: +syntax match VimwikiPlaceholder /^\s*%nohtml\s*$/ +syntax match VimwikiPlaceholder + \ /^\s*%title\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite +syntax match VimwikiPlaceholder + \ /^\s*%date\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite +syntax match VimwikiPlaceholder + \ /^\s*%template\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite +syntax match VimwikiPlaceholderParam /.*/ contained + + +" Html Tag: <u> +if vimwiki#vars#get_global('valid_html_tags') !=? '' + let s:html_tags = join(split(vimwiki#vars#get_global('valid_html_tags'), '\s*,\s*'), '\|') + exe 'syntax match VimwikiHTMLtag #\c</\?\%('.s:html_tags.'\)\%(\s\{-1}\S\{-}\)\{-}\s*/\?>#' + + " Html Typeface: <b>bold text</b> + let html_typeface = { + \ 'bold': [['<b>', '</b\_s*>'], ['<strong>', '</strong\_s*>']], + \ 'italic': [['<i>', '</i\_s*>'], ['<em>', '</em\_s*>']], + \ 'underline': [['<u>', '</u\_s*>']], + \ 'code': [['<code>', '</code\_s*>']], + \ 'del': [['<del>', '</del\_s*>']], + \ 'eq': [], + \ 'sup': [['<sup>', '</sup\_s*>']], + \ 'sub': [['<sub>', '</sub\_s*>']], + \ } + " Highlight now + call vimwiki#u#hi_typeface(html_typeface) +endif + +" Html Color: <span style="color:#FF0000";>Red paragraph</span> +" -- See: h color_dic +let color_dic = vimwiki#vars#get_wikilocal('color_dic') +let color_tag = vimwiki#vars#get_wikilocal('color_tag_template') +for [color_key, color_value] in items(color_dic) + let [fg, bg] = color_value + let delimiter = color_tag + let delimiter = substitute(delimiter, '__COLORFG__', fg, 'g') + let delimiter = substitute(delimiter, '__COLORBG__', bg, 'g') + " The user input has been already checked + let [pre_region, post_region] = split(delimiter, '__CONTENT__') + let cmd = 'syntax region Vimwiki' . color_key . ' matchgroup=VimwikiDelimiterColor' + \ . ' start=/' . pre_region . '/' + \ . ' end=/' . post_region . '/' + \ . ' ' . b:vimwiki_syntax_concealends + execute cmd + + " Build hightlight command + let cmd = 'hi Vimwiki' . color_key + if fg !=# '' + let cmd .= ' guifg=' . fg + endif + if bg !=# '' + let cmd .= ' guibg=' . bg + endif + execute cmd +endfor + + +" Comment: home made +execute 'syntax match VimwikiComment /'.vimwiki#vars#get_syntaxlocal('comment_regex'). + \ '/ contains=@Spell,VimwikiTodo' +" Only do syntax highlighting for multiline comments if they exist +let mc_format = vimwiki#vars#get_syntaxlocal('multiline_comment_format') +if !empty(mc_format.pre_mark) && !empty(mc_format.post_mark) +execute 'syntax region VimwikiMultilineComment start=/'.mc_format.pre_mark. + \ '/ end=/'.mc_format.post_mark.'/ contains=@NoSpell,VimwikiTodo' +endif + +" Tag: +let tag_cmd = 'syntax match VimwikiTag /'.vimwiki#vars#get_syntaxlocal('rxTags').'/' +let tf = vimwiki#vars#get_wikilocal('tag_format') +if exists('+conceallevel') && tf.conceal != 0 + let tag_cmd .= ' conceal' + if tf.cchar !=# '' + let tag_cmd .= ' cchar=' . tf.cchar + endif +endif +execute tag_cmd + + +" Header Groups: highlighting +if vimwiki#vars#get_global('hl_headers') == 0 + " Strangely in default colorscheme Title group is not set to bold for cterm... + if !exists('g:colors_name') + hi Title cterm=bold + endif + for s:i in range(1,6) + execute 'hi def link VimwikiHeader'.s:i.' Title' + endfor +else + for s:i in range(1,6) + execute 'hi def VimwikiHeader'.s:i.' guibg=bg guifg=' + \ .vimwiki#vars#get_global('hcolor_guifg_'.&background)[s:i-1].' gui=bold ctermfg=' + \ .vimwiki#vars#get_global('hcolor_ctermfg_'.&background)[s:i-1].' term=bold cterm=bold' + endfor +endif + + +" Typeface: -> u.vim +let s:typeface_dic = vimwiki#vars#get_syntaxlocal('typeface') +call vimwiki#u#hi_typeface(s:typeface_dic) + + +" Link highlighting groups +"""""""""""""""""""""""""" + +hi def link VimwikiMarkers Normal +hi def link VimwikiError Normal + +hi def link VimwikiEqIn Number +hi def link VimwikiEqInT VimwikiEqIn + +" Typeface 1 +hi def VimwikiBold term=bold cterm=bold gui=bold +hi def link VimwikiBoldT VimwikiBold + +hi def VimwikiItalic term=italic cterm=italic gui=italic +hi def link VimwikiItalicT VimwikiItalic + +hi def VimwikiUnderline term=underline cterm=underline gui=underline + +" Typeface 2 +" Bold > Italic > Underline +hi def VimwikiBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic +hi def link VimwikiItalicBold VimwikiBoldItalic +hi def link VimwikiBoldItalicT VimwikiBoldItalic +hi def link VimwikiItalicBoldT VimwikiBoldItalic + +hi def VimwikiBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline +hi def link VimwikiUnderlineBold VimwikiBoldUnderline + +hi def VimwikiItalicUnderline term=italic,underline cterm=italic,underline gui=italic,underline +hi def link VimwikiUnderlineItalic VimwikiItalicUnderline + +" Typeface 3 +hi def VimwikiBoldItalicUnderline term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline +hi def link VimwikiBoldUnderlineItalic VimwikiBoldItalicUnderline +hi def link VimwikiItalicBoldUnderline VimwikiBoldItalicUnderline +hi def link VimwikiItalicUnderlineBold VimwikiBoldItalicUnderline +hi def link VimwikiUnderlineBoldItalic VimwikiBoldItalicUnderline +hi def link VimwikiUnderlineItalicBold VimwikiBoldItalicUnderline + +" Code +hi def link VimwikiCode PreProc +hi def link VimwikiCodeT VimwikiCode + +hi def link VimwikiPre PreProc +hi def link VimwikiPreT VimwikiPre +hi def link VimwikiPreDelim VimwikiPre + +hi def link VimwikiMath Number +hi def link VimwikiMathT VimwikiMath + +hi def link VimwikiNoExistsLink SpellBad +hi def link VimwikiNoExistsLinkT VimwikiNoExistsLink + +hi def link VimwikiLink Underlined +hi def link VimwikiLinkT VimwikiLink + +hi def link VimwikiList Identifier +hi def link VimwikiListTodo VimwikiList +hi def link VimwikiCheckBoxDone Comment +hi def link VimwikiHR Identifier +hi def link VimwikiTag Keyword + + +" Deleted called strikethrough +" See $VIMRUTIME/syntax/html.vim +if v:version > 800 || (v:version == 800 && has('patch1038')) || has('nvim-0.4.3') + hi def VimwikiDelText term=strikethrough cterm=strikethrough gui=strikethrough +else + hi def link VimwikiDelText Constant +endif +hi def link VimwikiDelTextT VimwikiDelText + +hi def link VimwikiSuperScript Number +hi def link VimwikiSuperScriptT VimwikiSuperScript + +hi def link VimwikiSubScript Number +hi def link VimwikiSubScriptT VimwikiSubScript + +hi def link VimwikiTodo Todo +hi def link VimwikiComment Comment +hi def link VimwikiMultilineComment Comment + +hi def link VimwikiPlaceholder SpecialKey +hi def link VimwikiPlaceholderParam String +hi def link VimwikiHTMLtag SpecialKey + +hi def link VimwikiEqInChar VimwikiMarkers +hi def link VimwikiCellSeparator VimwikiMarkers +hi def link VimwikiBoldChar VimwikiMarkers +hi def link VimwikiItalicChar VimwikiMarkers +hi def link VimwikiBoldItalicChar VimwikiMarkers +hi def link VimwikiItalicBoldChar VimwikiMarkers +hi def link VimwikiDelTextChar VimwikiMarkers +hi def link VimwikiSuperScriptChar VimwikiMarkers +hi def link VimwikiSubScriptChar VimwikiMarkers +hi def link VimwikiCodeChar VimwikiMarkers +hi def link VimwikiHeaderChar VimwikiMarkers + +" TODO remove unsued due to region refactoring +hi def link VimwikiEqInCharT VimwikiMarkers +hi def link VimwikiBoldCharT VimwikiMarkers +hi def link VimwikiItalicCharT VimwikiMarkers +hi def link VimwikiBoldItalicCharT VimwikiMarkers +hi def link VimwikiItalicBoldCharT VimwikiMarkers +hi def link VimwikiDelTextCharT VimwikiMarkers +hi def link VimwikiSuperScriptCharT VimwikiMarkers +hi def link VimwikiSubScriptCharT VimwikiMarkers +hi def link VimwikiCodeCharT VimwikiMarkers +hi def link VimwikiHeaderCharT VimwikiMarkers +hi def link VimwikiLinkCharT VimwikiLinkT +hi def link VimwikiNoExistsLinkCharT VimwikiNoExistsLinkT + + +" Load syntax-specific functionality +call vimwiki#u#reload_regexes_custom() + + +" FIXME it now does not make sense to pretend there is a single syntax "vimwiki" +let b:current_syntax='vimwiki' + + +" Include: Code: EMBEDDED syntax setup -> base.vim +let s:nested = vimwiki#vars#get_wikilocal('nested_syntaxes') +if vimwiki#vars#get_wikilocal('automatic_nested_syntaxes') + let s:nested = extend(s:nested, vimwiki#base#detect_nested_syntax(), 'keep') +endif +if !empty(s:nested) + for [s:hl_syntax, s:vim_syntax] in items(s:nested) + call vimwiki#base#nested_syntax(s:vim_syntax, + \ vimwiki#vars#get_syntaxlocal('rxPreStart').'\%(.*[[:blank:][:punct:]]\)\?'. + \ s:hl_syntax.'\%([[:blank:][:punct:]].*\)\?', + \ vimwiki#vars#get_syntaxlocal('rxPreEnd'), 'VimwikiPre') + endfor +endif + +" LaTex: Load +if !empty(globpath(&runtimepath, 'syntax/tex.vim')) + execute 'syntax include @textGrouptex syntax/tex.vim' +endif +if !empty(globpath(&runtimepath, 'after/syntax/tex.vim')) + execute 'syntax include @textGrouptex after/syntax/tex.vim' +endif + +" LaTeX: Block +call vimwiki#base#nested_syntax('tex', + \ vimwiki#vars#get_syntaxlocal('rxMathStart').'\%(.*[[:blank:][:punct:]]\)\?'. + \ '\%([[:blank:][:punct:]].*\)\?', + \ vimwiki#vars#get_syntaxlocal('rxMathEnd'), 'VimwikiMath') + +" LaTeX: Inline +for u in syntax_dic.typeface.eq + execute 'syntax region textSniptex matchgroup=texSnip' + \ . ' start="'.u[0].'" end="'.u[1].'"' + \ . ' contains=@texMathZoneGroup' + \ . ' keepend oneline '. b:vimwiki_syntax_concealends +endfor + +" Emoji: :dog: (after tags to take precedence, after nested to not be reset) +if and(vimwiki#vars#get_global('emoji_enable'), 1) != 0 && has('conceal') + call vimwiki#emoji#apply_conceal() + exe 'syn iskeyword '.&iskeyword.',-,:' +endif + + +syntax spell toplevel diff --git a/dot_vim/plugged/vimwiki/syntax/vimwiki_markdown_custom.vim b/dot_vim/plugged/vimwiki/syntax/vimwiki_markdown_custom.vim new file mode 100644 index 0000000..7d150fb --- /dev/null +++ b/dot_vim/plugged/vimwiki/syntax/vimwiki_markdown_custom.vim @@ -0,0 +1,196 @@ +" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 +" Vimwiki syntax file +" Description: Defines markdown custom syntax +" Home: https://github.com/vimwiki/vimwiki/ + + +function! s:add_target_syntax_ON(target, type) abort + let prefix0 = 'syntax match '.a:type.' `' + let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char' + let prefix1 = 'syntax match '.a:type.'T `' + let suffix1 = '` display contained' + execute prefix0. a:target. suffix0 + execute prefix1. a:target. suffix1 +endfunction + + +function! s:add_target_syntax_OFF(target, type) abort + let prefix0 = 'syntax match VimwikiNoExistsLink `' + let suffix0 = '` display contains=@NoSpell,VimwikiLinkRest,'.a:type.'Char' + let prefix1 = 'syntax match VimwikiNoExistsLinkT `' + let suffix1 = '` display contained' + execute prefix0. a:target. suffix0 + execute prefix1. a:target. suffix1 +endfunction + + +function! s:wrap_wikilink1_rx(target) abort + return vimwiki#vars#get_syntaxlocal('rxWikiLink1InvalidPrefix') . a:target. + \ vimwiki#vars#get_syntaxlocal('rxWikiLink1InvalidSuffix') +endfunction + + +function! s:existing_mkd_refs() abort + return keys(vimwiki#markdown_base#scan_reflinks()) +endfunction + + +function! s:highlight_existing_links() abort + " Wikilink1 + " Conditional highlighting that depends on the existence of a wiki file or + " directory is only available for *schemeless* wiki links + " Links are set up upon BufEnter (see plugin/...) + let safe_links = '\%('. + \ vimwiki#base#file_pattern(vimwiki#vars#get_bufferlocal('existing_wikifiles')) . + \ '\%(#[^|]*\)\?\|#[^|]*\)' + " Wikilink1 Dirs set up upon BufEnter (see plugin/...) + let safe_dirs = vimwiki#base#file_pattern(vimwiki#vars#get_bufferlocal('existing_wikidirs')) + " Ref links are cached + let safe_reflinks = vimwiki#base#file_pattern(s:existing_mkd_refs()) + + + " match [URL][] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template1')), + \ safe_links, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') + " match [DESCRIPTION][URL] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template2')), + \ safe_links, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') + + " match [DIRURL][] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template1')), + \ safe_dirs, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') + " match [DESCRIPTION][DIRURL] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template2')), + \ safe_dirs, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') + + " match [MKDREF][] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template1')), + \ safe_reflinks, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') + " match [DESCRIPTION][MKDREF] + let target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template2')), + \ safe_reflinks, vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') + call s:add_target_syntax_ON(s:wrap_wikilink1_rx(target), 'VimwikiWikiLink1') +endfunction + + +" use max highlighting - could be quite slow if there are too many wikifiles +if vimwiki#vars#get_wikilocal('maxhi') + " WikiLink + call s:add_target_syntax_OFF(vimwiki#vars#get_syntaxlocal('rxWikiLink1'), 'VimwikiWikiLink1') + + " Subsequently, links verified on vimwiki's path are highlighted as existing + call s:highlight_existing_links() +else + " Wikilink + call s:add_target_syntax_ON(vimwiki#vars#get_syntaxlocal('rxWikiLink1'), 'VimwikiWikiLink1') +endif + + +" Weblink +call s:add_target_syntax_ON(vimwiki#vars#get_syntaxlocal('rxWeblink1'), 'VimwikiWeblink1') +call s:add_target_syntax_ON(vimwiki#vars#get_syntaxlocal('rxImage'), 'VimwikiImage') + + +" WikiLink +" All remaining schemes are highlighted automatically +let s:rxSchemes = '\%('. + \ vimwiki#vars#get_global('schemes_local') . '\|'. + \ vimwiki#vars#get_global('schemes_web'). + \ '\):' + +" a) match [nonwiki-scheme-URL] +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template1')), + \ s:rxSchemes . vimwiki#vars#get_syntaxlocal('rxWikiLink1Url'), + \ vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') +call s:add_target_syntax_ON(s:wrap_wikilink1_rx(s:target), 'VimwikiWikiLink1') +" b) match [DESCRIPTION][nonwiki-scheme-URL] +let s:target = vimwiki#base#apply_template( + \ vimwiki#u#escape(vimwiki#vars#get_syntaxlocal('WikiLink1Template2')), + \ s:rxSchemes . vimwiki#vars#get_syntaxlocal('rxWikiLink1Url'), + \ vimwiki#vars#get_syntaxlocal('rxWikiLink1Descr'), '', '') +call s:add_target_syntax_ON(s:wrap_wikilink1_rx(s:target), 'VimwikiWikiLink1') + + +" concealed chars +if exists('+conceallevel') + syntax conceal on +endif + +syntax spell toplevel + +" VimwikiWikiLink1Char is for syntax markers (and also URL when a description +" is present) and may be concealed +let s:options = ' contained transparent contains=NONE' +" conceal wikilink1 +execute 'syn match VimwikiWikiLink1Char /'. + \ vimwiki#vars#get_syntaxlocal('rx_wikilink_md_prefix').'/'.s:options +execute 'syn match VimwikiWikiLink1Char /'. + \ vimwiki#vars#get_syntaxlocal('rx_wikilink_md_suffix').'/'.s:options +execute 'syn match VimwikiWikiLink1Char /'. + \ vimwiki#vars#get_syntaxlocal('rxWikiLink1Prefix1').'/'.s:options +execute 'syn match VimwikiWikiLink1Char /'. + \ vimwiki#vars#get_syntaxlocal('rxWikiLink1Suffix1').'/'.s:options + +" conceal weblink1 +execute 'syn match VimwikiWeblink1Char "'. + \ vimwiki#vars#get_syntaxlocal('rxWeblink1Prefix1').'"'.s:options +execute 'syn match VimwikiWeblink1Char "'. + \ vimwiki#vars#get_syntaxlocal('rxWeblink1Suffix1').'"'.s:options +"image +execute 'syn match VimwikiImageChar "!"'.s:options +execute 'syn match VimwikiImageChar "'. + \ vimwiki#vars#get_syntaxlocal('rxWeblink1Prefix1').'"'.s:options +execute 'syn match VimwikiImageChar "'. + \ vimwiki#vars#get_syntaxlocal('rxWeblink1Suffix1').'"'.s:options + +if exists('+conceallevel') + syntax conceal off +endif + + + +" Tables +syntax match VimwikiTableRow /^\s*|.\+|\s*$/ + \ transparent contains=VimwikiCellSeparator, + \ VimwikiLinkT, + \ VimwikiWeblink1T, + \ VimwikiWikiLink1T, + \ VimwikiNoExistsLinkT, + \ VimwikiTodo, + \ VimwikiBoldT, + \ VimwikiItalicT, + \ VimwikiBoldItalicT, + \ VimwikiItalicBoldT, + \ VimwikiDelTextT, + \ VimwikiSuperScriptT, + \ VimwikiSubScriptT, + \ VimwikiCodeT, + \ VimwikiEqInT, + \ @Spell + +" TODO fix behavior within lists https://github.github.com/gfm/#list-items +" indented code blocks https://github.github.com/gfm/#indented-code-blocks +" execute 'syntax match VimwikiIndentedCodeBlock /' . vimwiki#vars#get_syntaxlocal('rxIndentedCodeBlock') . '/' +" hi def link VimwikiIndentedCodeBlock VimwikiPre + +" syntax group highlighting +hi def link VimwikiImage VimwikiLink +hi def link VimwikiImageT VimwikiLink +hi def link VimwikiWeblink1 VimwikiLink +hi def link VimwikiWeblink1T VimwikiLink + +hi def link VimwikiWikiLink1 VimwikiLink +hi def link VimwikiWikiLink1T VimwikiLink + diff --git a/dot_vim/plugged/vimwiki/test/README.md b/dot_vim/plugged/vimwiki/test/README.md new file mode 100644 index 0000000..2344220 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/README.md @@ -0,0 +1,85 @@ +# Vimwiki Tests + +This directory contains a test framework used to automatically test/verify +Vimwiki functionality. It is based on the following tools: + +- [vim-testbed GitHub](https://github.com/tweekmonster/vim-testbed) or on [testbed/vim dockerhub](https://hub.docker.com/r/testbed/vim) +- [Vader](https://github.com/junegunn/vader.vim) +- [Vint](https://github.com/Kuniwak/vint) + + +## Resources + +- [Vim patches](http://ftp.vim.org/pub/vim/patches/) +- Example test cases: + - [vim-easy-align](https://github.com/junegunn/vim-easy-align/tree/master/test) + - [vim-plug](https://github.com/junegunn/vim-plug/tree/master/test) + - [ale](https://github.com/w0rp/ale/tree/master/test) + - [Other projects](https://github.com/junegunn/vader.vim/wiki/Projects-using-Vader) + + +## Building Docker Image + +To build the Docker image run `docker build -t vimwiki .` from the Vimwiki +repository root (same location as the Dockerfile). + + +## Running Tests + +### Manual Steps + +Starting in the test directory run this command: + +```sh +docker run -it --rm -v $PWD/../:/testplugin -v $PWD/../test:/home vimwiki vim_7.4.1099 -u test/vimrc -i NONE +``` + +This will open a vim instance in the docker container and then all tests +can be run with `:Vader test/*` or individual tests can be run. + +**Note:** Substitute `vim_7.4.1099` for any of the vim versions in the Dockerfile. + +### Automated Tests + +The script in the `test/` directory named `run_test.sh` can be used to +automatically run all tests for all installed vim versions. The vim/nvim +versions are parsed from the Dockerfile. This script will also run `Vint` for all +plugin source files. For more information run `./run_tests.sh -h`. + + +## Writing Tests + +You are advice to write tests at the top of the file where you want to include it because some `Execute` can have some side effect making it hard to debug + +### Inside the container + +- `$USER` -> `vimtest` : unprivileged => very hard to mess up things +- `$HOME` -> `/home/vimtest` : but it is readonly ! +- `$PWD` -> `/testplugin` : mapped to vimwiki plugin root directory + +For more information, read the [base docker image](https://github.com/tweekmonster/vim-testbed) + + +## Known Issues + +1. neovim v0.2.x does not work correctly with Vader output from the docker + container. No test results are printed and an error message saying + `Vim: Error reading input, exiting...` + - Probably need to look into this more and determine if the issue is Vader, + Neovim, or Docker. +2. Vader does not play nice with the location list. Tests that use the location + list should be placed in `independent_runs/`. + - [Vader Issue #199](https://github.com/junegunn/vader.vim/issues/199) + + +## Notable Vim patches + +- `v7.3.831` `getbufvar` added a default value +- `v7.4.236` add ability to check patch with has("patch-7.4.123") +- `v7.4.279` added the option to for `globpath()` to return a list +- `v7.4.1546` sticky type checking removed (allow a variables type to change) +- `v7.4.1989` `filter()` accepts a Funcref +- `v7.4.2044` lambda support added - see `:h expr-lambda` +- `v7.4.2120` Added function "closure" argument +- `v7.4.2137` add `funcref()` +- `v8.0` async jobs and timers diff --git a/dot_vim/plugged/vimwiki/test/api_base_resolve_link.vader b/dot_vim/plugged/vimwiki/test/api_base_resolve_link.vader new file mode 100644 index 0000000..9239178 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/api_base_resolve_link.vader @@ -0,0 +1,42 @@ +# Test vimwiki#base#resolve_link for various inputs. + +Execute (Resolve link for index): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('index') + AssertEqual 'wiki0', link_infos.scheme + AssertEqual $HOME . '/testwiki/index.wiki', link_infos.filename + +Execute (Resolve link for /index - absolute path from wiki root): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('/index') + AssertEqual 'wiki0', link_infos.scheme + AssertEqual '', link_infos.anchor + AssertEqual $HOME . '/testwiki/index.wiki', link_infos.filename + +Execute (Resolve link for ///tmp/some_page - absolute path to standalone page): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('///tmp/some_page') + AssertEqual '/tmp/some_page.wiki', link_infos.filename + +Execute (Resolve link for //~/testwiki/index - page in wiki under homedir): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('//~/testwiki/index') + AssertEqual $HOME . '/testwiki/index.wiki', expand(link_infos.filename) + +Execute (Resolve link for diary:2020-01-01 - diary page): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('diary:2020-01-01') + AssertEqual $HOME . '/testwiki/diary/2020-01-01.wiki', link_infos.filename + +Execute (Resolve link to link_syntax/nested - page in subdirectory): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('link_syntax/nested') + AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', link_infos.filename + +Execute (Resolve relative link to ./link_syntax/nested - page in subdirectory): + VimwikiIndex 1 + let link_infos = vimwiki#base#resolve_link('link_syntax/nested') + AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', link_infos.filename + +Execute (Clean): + call ReloadVimwiki() diff --git a/dot_vim/plugged/vimwiki/test/config_commentstring.vader b/dot_vim/plugged/vimwiki/test/config_commentstring.vader new file mode 100644 index 0000000..9a0aa26 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/config_commentstring.vader @@ -0,0 +1,32 @@ +# Test comment string PR #946 +# TODO try default +# TODO try editing other buffer +#Execute (default commenstring, ft vimwiki): +# AssertEqual &filetype[0], 't' +# AssertEqual '/*%s*/', &commentstring + + +Given txt (txt): + txt + +After (clean up): + if exists('g:vimwiki_commentstring') + unlet g:vimwiki_commentstring + endif + if exists('b:did_ftplugin') + unlet b:did_ftplugin + endif + +Execute (default vimwiki commentstring): + call vimwiki#vars#init() + set ft=vimwiki + AssertEqual '%%%s', &commentstring + +Execute (html commentstring): + let g:vimwiki_commentstring='<!-- %s -->' + call vimwiki#vars#init() + set ft=vimwiki + AssertEqual '<!-- %s -->', &commentstring + +Expect (void): + txt diff --git a/dot_vim/plugged/vimwiki/test/config_vars.vader b/dot_vim/plugged/vimwiki/test/config_vars.vader new file mode 100644 index 0000000..394ae50 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/config_vars.vader @@ -0,0 +1,91 @@ +# Test variable management (should be small) + +# PR #1132 make other test break ... + +#Given vimwiki (abc def ghi jkl #1132): +# abc def ghi jkl +# +#Do (vee<CR>): +# :call SetSyntax('markdown')\<CR> +# :call vimwiki#vars#set_wikilocal('links_space_char', '_')\<CR> +# vee\<CR> +# :call vimwiki#vars#set_wikilocal('links_space_char', ' ')\<CR> +# +#Expect (underscores in link url not in description): +# [abc def](abc_def) ghi jkl +# +# Issue #980 +# +# brennen commenting these out 2021-03-29 per @tinmarino: +# https://github.com/vimwiki/vimwiki/pull/1108#issuecomment-806775805 + +# Given txt (txt): +# txt +# +# Execute (VimWei vars #980): +# " Set +# call UnloadVimwiki() +# let wiki = {} +# let wiki.name = 'ChenWei 🦊VimwikiMd @^%@!*#&^' +# let wiki.path = $HOME . '/testmarkdown' +# let wiki.ext = '.md' +# let wiki.syntax = 'markdown' +# let wiki.nested_syntaxes = {'python': 'python'} +# +# " Make other tests crash +# "let wiki.links_space_char = '_' +# "let wiki.list_margin = 0 +# "let wiki.auto_toc = 1 +# "let wiki.auto_tags = 1 +# "let wiki.auto_generate_tags = 1 +# +# let g:vimwiki_list = [wiki] +# let g:vimwiki_ext2syntax = {'.md': 'markdown'} +# let g:vimwiki_global_ext = 1 +# let g:vimwiki_autowriteall = 1 +# let g:vimwiki_auto_chdir = 1 +# let g:vimwiki_folding = 'expr' +# call LoadVimwiki() +# +# " Log +# Log 'Path (Current): ' . getcwd() +# Log 'File: (Buffer)' . @% +# Log 'List (Wiki): ' . string(g:vimwiki_list) +# Log '' +# Log 'Local (Vars):' +# Log g:vimwiki_wikilocal_vars +# +# " Work +# edit $HOME/testmarkdown/index.md +# +# " Assert +# AssertEqual '/home/vimtest/testmarkdown_cwd', getcwd() . '_cwd' +# AssertEqual '0_wiki_nr', vimwiki#vars#get_bufferlocal('wiki_nr') . '_wiki_nr' +# AssertEqual 'markdown_syntax', vimwiki#vars#get_wikilocal('syntax') . '_syntax' +# AssertEqual '0_margin', vimwiki#vars#get_wikilocal('list_margin') . '_margin' +# Log 'Path (Current): ' . getcwd() +# Log 'File (Buffer):' . @% +# bprevious +# Log 'Path (Current): ' . getcwd() +# Log 'File (Buffer):' . @% +# bwipeout index.md +# +# " Clean +# Log 'Clean up' +# cd /testplugin +# unlet g:vimwiki_list +# unlet g:vimwiki_ext2syntax +# unlet g:vimwiki_global_ext +# unlet g:vimwiki_autowriteall +# unlet g:vimwiki_auto_chdir +# unlet g:vimwiki_folding +# unlet wiki +# Log 'Path (Current): ' . getcwd() +# Log 'File (Buffer):' . @% +# call ReloadVimwiki() +# Log g:vimwiki_wikilocal_vars +# +# Expect (txt): +# txt + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/executable_literal_run_tests.sh b/dot_vim/plugged/vimwiki/test/executable_literal_run_tests.sh new file mode 100644 index 0000000..e3d63c8 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/executable_literal_run_tests.sh @@ -0,0 +1,375 @@ +#!/usr/bin/env bash + +# credit to https://github.com/w0rp/ale for script ideas and the color vader +# output function. + +# Say Hi +echo -en "Starting $(basename "$0") for VimWiki\n" +start_time=$(date +%s) + +# For windows: Cmder bash is appending busybox to the path and +# and a smlll vim is included, so that override the windows path vim +if [[ -v OLD_PATH ]]; then + echo "Setting path from OLD_PATH : $OLD_PATH" + export PATH="$OLD_PATH" +fi + +printHelp() { + cat << ' EOF' | sed -e 's/^ //' + Usage: bash run_tests.sh [OPTIONS] + + Runs Vimwiki Vader tests or Vint in a Docker container + + -h (Help) Print help message + + -n (versioN) Specify vim/nvim version to run tests for. + Specify "local" to run on your current vim install + for example on Windows. + Multiple versions can be specified by quoting the value and + separating versions with a space. E.g. -n "vim1 vim2". + Default is all available versions. + + -f (File) Space separated list of tests to run. + E.g. -o "list_* z_success" + + -l (List) list available versions that can be used with the '-n' option + + -t (Type) Select test type: 'vader', 'vint', or 'all' + + -v (Verbose) Turn on verbose output. + + E.g. On Linux + bash run_tests.sh -v -t vader -n "vim_7.4.1099 vim_8.1.0519" -f link_creation.vader issue_markdown.vader + E.g. On Windows + bash run_tests.sh -v -t vader -n local -f z_success.vader | cat + EOF + + exit 0 +} + +printVersions() { + # Print the names of all vim/nvim versions + getVers + exit 0 +} + +runVader() { + # Run Vader tests + echo -e "\nStarting Vader tests." + local err=0 + + # Parse tests files to execute + if [[ -z $file_test ]]; then + res="test/*" + else + read -ra TEST <<< "$file_test" + for i in "${TEST[@]}"; do + if [[ "$i" == *"*"* ]]; then + res="$res test/${i}" + elif [[ -f "$i" ]]; then + res="$res test/${i}" + elif [[ -f "${i}.vader" ]]; then + res="$res test/${i}.vader" + else + printf "WARNING: Test \"%s\" not found.\n", "$i" + fi + done + fi + + # Run tests for each specified version + for v in $vers; do + echo -e "\n\nRunning version: $v" + echo -e "=============================" + + # Set local environment variables + if [[ "$v" == "local" ]]; then + # Save HOME var + home_save="$HOME" + + # Create temporary root + mkdir -p "$tmp_dir/vader_wiki" + mkdir -p "$tmp_dir/vader_wiki/home" + mkdir -p "$tmp_dir/vader_wiki/home/test" + mkdir -p "$tmp_dir/vader_wiki/testplugin" + + # Set vars + export ROOT="$tmp_dir/vader_wiki/" + export HOME="$tmp_dir/vader_wiki/home" + vim="vim" + vim_opt="-u ~/test/vimrc" + else + # Only set dockerized vars + export ROOT="/" # So no if in vimrc + vim="/vim-build/bin/$v" + vim_opt="-u test/vimrc" + fi + + # Too talkative TODO make a verbose level 1..10 an 1 is not taking vim + #if [[ "$verbose" != 0 ]]; then + # vim_opt+=' -V1' + #fi + # IDK why vim with -Es is returning ! and make fail: + # -- tabnext profiling + # -- map.vim + vim_opt+=' -i NONE -Es ' + + # set -o pipefail + + # Copy the resources to temporary directory + if [[ "$v" == "local" ]]; then + # flags=(--rm -v "$PWD/../:/testplugin" -v "$PWD/../test:/home" -w /testplugin vimwiki) + echo -e "\nCopying resources to $ROOT" + # Copy testplugin + cp -rf "$wiki_path/"* "$ROOT/testplugin/" + # Copy home + cp -rf "$script_path/"* "$HOME/test/" + # Copy rtp.vim + cp -rf "$script_path/resources/rtp_local.vim" "$ROOT/rtp.vim" + # Copy vader <- internet + echo 'Cloning Vader (git, do not care the fatal)' + git clone --depth 10 https://github.com/junegunn/vader.vim /tmp/vader_wiki/vader 2>&1 + fi + + # Run batch of tests + # shellcheck disable=SC2086,SC2206 + if [[ "$res" != "" ]]; then + if [[ "$v" == "local" ]]; then + pushd "$tmp_dir/vader_wiki/testplugin" \ + || echo 'Warning pushd testplugin failed' + + # Run the tests + fcmd(){ + $vim $vim_opt "+Vader! ${res}" 2>&1 + return ${PIPESTATUS[1]} + } + echo -e "\nStarting Batch Vim/Vader:\n<- $res\n" + type fcmd | sed -n '/^ /{s/^ //p}' | sed '$s/.*/&;/' ; shift ; + fcmd; ret=$? + err=$(( err + ret )) + echo -e "\nReturned Batch Vim/Vader -> $ret" + + popd \ + || echo 'Warning popd also failed' + else + # In docker + fcmd() { + docker run -a stderr -e "VADER_OUTPUT_FILE=/dev/stderr" \ + "${flags[@]}" "$v" $vim_opt "+Vader! ${res}" 2>&1 \ + | vader_filter | vader_color + return ${PIPESTATUS[1]} + } + echo -e "\nStarting Batch Vim/Vader:\n<- $res\n" + type fcmd | sed -n '/^ /{s/^ //p}' | sed '$s/.*/&;/' ; shift ; + fcmd; ret=$? + err=$(( err + ret )) + echo -e "\nReturned Batch Docker/Vim/Vader -> $ret : ${PIPESTATUS[*]}" + fi + fi + + #set +o pipefail + + # Restore what must (I know it should be refactored in a while) + if [[ "$v" == "local" ]]; then + export HOME=$home_save + fi + done + return $err +} + +runVint() { + local err=0 + cmd="vint -s . && vint -s test/vimrc" + if echo "$vers" | grep "local" > /dev/null; then + echo -e "\nRunning Vint: $cmd : in $wiki_path" + pushd "$wiki_path" > /dev/null \ + || echo 'Warning pushd wiki_path failed' + $cmd + err=$(( err | $? )) + popd > /dev/null \ + || echo 'Warning popd also failed' + else + echo -e "\nStarting Docker container and running Vint: $cmd" + docker run -a stdout "${flags[@]}" bash -c "$cmd" + err=$(( err | $? )) + fi + return $err +} + +getVers() { + # Get all possible version <- Dockerfile + sed -n 's/.* -name \([^ ]*\) .*/\1/p' ../Dockerfile +} + +vader_filter() { + # Filter Vader Stdout + local err=0 + # Keep indentation + local IFS='' + while read -r REPLY; do + # Print only possible error cases + if [[ "$REPLY" = *'docker:'* ]] || \ + [[ "$REPLY" = *'Starting Vader:'* ]] || \ + [[ "$REPLY" = *'Vader error:'* ]] || \ + [[ "$REPLY" = *'Vim: Error '* ]]; then + echo "$REPLY" + elif [[ "$REPLY" = *'[EXECUTE] (X)'* ]] || \ + [[ "$REPLY" = *'[ EXPECT] (X)'* ]]; then + echo "$REPLY" + err=1 + elif [[ "$REPLY" = *'Success/Total:'* ]]; then + success="$(echo -n "$REPLY" | grep -o '[0-9]\+/' | head -n1 | cut -d/ -f1)" + total="$(echo -n "$REPLY" | grep -o '/[0-9]\+' | head -n1 | cut -d/ -f2)" + if [ "$success" -lt "$total" ]; then + err=1 + fi + echo "$REPLY" + elif [[ "$verbose" != 0 ]]; then + # just print everything + echo "$REPLY" + fi + done + + if [[ "$err" == 1 ]]; then + echo -e "\033[0;31m" + echo -e "!---------Failed tests detected---------!" + echo -e "Run with the '-v' flag for verbose output" + echo -e "\033[0m" + fi + return $err +} + + +red='\033[0;31m' +green='\033[0;32m' +nc='\033[0m' +vader_color() { + while read -r; do + if [[ "$REPLY" = *'[EXECUTE] (X)'* ]] || \ + [[ "$REPLY" = *'[ EXPECT] (X)'* ]] || \ + [[ "$REPLY" = *'Vim: Error '* ]] || \ + [[ "$REPLY" = *'Vader error:'* ]]; then + echo -en "$red" + elif [[ "$REPLY" = *'[EXECUTE]'* ]] || [[ "$REPLY" = *'[ GIVEN]'* ]]; then + echo -en "$nc" + fi + + if [[ "$REPLY" = *'Success/Total'* ]]; then + success="$(echo -n "$REPLY" | grep -o '[0-9]\+/' | head -n1 | cut -d/ -f1)" + total="$(echo -n "$REPLY" | grep -o '/[0-9]\+' | head -n1 | cut -d/ -f2)" + + if [ "$success" -lt "$total" ]; then + echo -en "$red" + else + echo -en "$green" + fi + + echo "$REPLY" + echo -en "$nc" + else + echo "$REPLY" + fi + done + + echo -en "$nc" +} + +# path of the script, supposing no spaces +script_file="$(dirname "$0")" +script_path="$( realpath "$script_file" )" +wiki_path="$( realpath "$script_path/.." )" +tmp_dir="$(dirname "$(mktemp -u)")" + +# list of vim/nvim versions +vers="$(getVers)" + +# type of tests to run - vader/vint/all +type="all" + +# verbose output flag +verbose=0 + +# only run these tests +file_test="" + +# docker flags +flags=(--rm -v "$PWD/../:/testplugin" -v "$PWD/../test:/home" -w /testplugin vimwiki) + +while getopts ":hvn:lt:f:" opt; do + case ${opt} in + h ) + printHelp + ;; + n ) + vers="$OPTARG" + ;; + v ) + verbose=1 + ;; + l ) + printVersions + ;; + t ) + type="$OPTARG" + ;; + f ) + file_test="$OPTARG" + ;; + \? ) + echo "Invalid option: $OPTARG" 1>&2 + exit 1 + ;; + : ) + echo "Invalid option: $OPTARG requires an argument" 1>&2 + exit 1 + ;; + esac +done + +# shift out processed parameters +shift $((OPTIND -1)) + +# error handling for non-option arguments +if [[ $# -ne 0 ]]; then + echo "Error: Got $# non-option arguments." 1>&2 + exit 1 +fi + +# stop tests on ctrl-c or ctrl-z +trap exit 1 SIGINT SIGTERM + +# Global error return of the script +o_error=0 + +# Select which tests should run +case $type in + "vader" ) + runVader ; err=$? + echo "Main Vader: returned $err" + o_error=$(( err | o_error )) + ;; + "vint" ) + runVint ; err=$? + echo "Main Vint: returned $err" + o_error=$(( err | o_error )) + ;; + "all" ) + runVint ; err=$? + echo "Main Vint: returned $err" + o_error=$(( err | o_error )) + runVader ; err=$? + echo "Main Vader: returned $err" + o_error=$(( err | o_error )) + ;; + * ) + echo "Error: invalid type - '$type'" 1>&2 + exit 1 +esac + +# Calcultate time +end_time=$(date +%s) +sec_time=$((end_time - start_time)) +printf -v script_time '%dh:%dm:%ds' $((sec_time/3600)) $((sec_time%3600/60)) $((sec_time%60)) + +# Exit +echo -ne "Script $(basename "$0"), in $script_time, Returned -> $o_error\n\n" +exit $o_error diff --git a/dot_vim/plugged/vimwiki/test/file_goto.vader b/dot_vim/plugged/vimwiki/test/file_goto.vader new file mode 100644 index 0000000..48f3e35 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/file_goto.vader @@ -0,0 +1,83 @@ +# VimwikiGoto +# +# Note: I dont know why <Tab> is inserting a Tab. +# Well better than to insert a Chair, but it should trigger completion +# So I used C-L + + +Execute (VimwikiGoto buzz_bozz && Assert): + VimwikiIndex 2 + VimwikiGoto buzz_bozz + AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%') + +Execute (VimwikiGoto buzz bozz && Assert): + VimwikiIndex 4 + VimwikiGoto buzz bozz + AssertEqual $HOME . '/testwiki space/buzz bozz.wiki', expand('%') + +Do (VimwikiGoto <CR> buzz_bozz && Assert): + :VimwikiIndex 2\<CR> + :VimwikiGoto\<CR> + buzz_bozz\<CR> + :AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%')\<CR> + +Do (VimwikiGoto + Completion(cmdline) && Assert): + :VimwikiIndex 2\<CR> + :VimwikiGoto buzz_bo\<C-l>\<CR> + :AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%')\<CR> + +Do (VimwikiGoto <CR> buzz_bo + Completion(input()) && Assert): + :VimwikiIndex 2\<CR> + :VimwikiGoto\<CR> + buzz_bo\<C-l>\<CR> + :AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%')\<CR> + +Do (,wn buzz_bo + Completion(input()) && Assert): + ,wn + buzz_bo\<C-l>\<CR> + :AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%')\<CR> + +Execute (:VimwikiGoto + Completion (API)): + VimwikiIndex 2 + AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + let s_complete=string(vimwiki#base#get_globlinks_escaped()) + Assert -1 != stridx(s_complete, 'buzz_bozz') + +Execute (Create dir1/dir2/test_goto_file.md): + call system("mkdir $HOME/testmarkdown/dir1") + call system("mkdir $HOME/testmarkdown/dir1/dir2") + edit $HOME/testmarkdown/dir1/dir2/test_goto_file.md + call WriteMe() + +Execute (:VimwikiGoto + Completion in directory): + " Return to base + VimwikiIndex 2 + AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + + " Complete without argment + let s_complete1=string(vimwiki#base#get_globlinks_escaped()) + Assert -1 != stridx(s_complete1, 'test_goto_file') + + " Complete with file argument + let s_complete2=string(vimwiki#base#get_globlinks_escaped('test_goto_file')) + Assert -1 != stridx(s_complete2, 'test_goto_file') + + " Complete with start of file argument + let s_complete3=string(vimwiki#base#get_globlinks_escaped('test_got')) + Assert -1 != stridx(s_complete3, 'test_goto_file') + + " Complete with (nested) dir2 argument + let s_complete4=string(vimwiki#base#get_globlinks_escaped('dir2')) + Assert -1 != stridx(s_complete4, 'test_goto_file') + + " Complete with bad argument + let l_complete5=vimwiki#base#get_globlinks_escaped('this_string_is_nowhere') + let s_complete5=string(l_complete5) + Assert -1 == stridx(s_complete5, 'test_goto_file') + AssertEqual 0, len(l_complete5) + +Execute (Clean): + call DeleteFile("$HOME/testmarkdown/dir1/dir2/test_goto_file.md") + call system("rm $HOME/testmarkdown/dir1") + +# vim: sw=2 foldmethod=indent foldlevel=30 foldignore= diff --git a/dot_vim/plugged/vimwiki/test/file_system.vader b/dot_vim/plugged/vimwiki/test/file_system.vader new file mode 100644 index 0000000..e64cd7e --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/file_system.vader @@ -0,0 +1,27 @@ +# Travel thought files + +Given (Void for Accessing other files within vimwiki #979 {{{1): + + +Do (At Index: Create and goto pythonfile): + :VimwikiIndex 2\<Cr> + Opyfile.py\<Esc>\<Cr>\<Cr> + :AssertEqual 'pyfile.py', expand('%:t')\<CR> + :AssertEqual 'python', &ft\<CR> + :Log "Clean pyfile"\<Cr> + dd + :VimwikiIndex 2\<Cr> + :call DeleteFile('pyfile.py')\<Cr> + + +Do (At Index: Create and goto markdownfile): + :VimwikiIndex 2\<Cr> + Omdfile.md\<Esc>\<Cr>\<Cr> + :AssertEqual 'mdfile.md', expand('%:t')\<CR> + :AssertEqual 'vimwiki', &ft\<CR> + :Log "Clean mdfile"\<Cr> + :VimwikiIndex 2\<Cr> + dd + :call DeleteFile('mdfile.md')\<Cr> + +# vim: sw=2:foldmethod=marker:foldlevel=30:foldignore=: diff --git a/dot_vim/plugged/vimwiki/test/fold.vader b/dot_vim/plugged/vimwiki/test/fold.vader new file mode 100644 index 0000000..5c02ab3 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/fold.vader @@ -0,0 +1,59 @@ +# Fold + +Execute (Save state): + Log 'Previous foldmethod: ' . &foldmethod + let save_foldmethod = &foldmethod + +Given vimwiki (Markdown Headers): + Some stuff 1 + # Header level 1 2 + ## Header level 2 3 + Content 4 + ### Header level 3 5 + # Header level 1 6 + Content 7 + ## Just to end 8: Vader cannot match end-of-file + +Execute (Markdown and Fold Syntax): + call SetSyntax('markdown') + set foldmethod=syntax + +Execute (Assert Markdown: Fold Syntax): + Log 'Supposing it starts at foldlevel 0' + AssertEqual 'line 1:0', 'line 1:' . foldlevel(1) + AssertEqual 'line 2:0', 'line 2:' . foldlevel(2) + AssertEqual 'line 3:1', 'line 3:' . foldlevel(3) + AssertEqual 'line 4:2', 'line 4:' . foldlevel(4) + AssertEqual 'line 5:2', 'line 5:' . foldlevel(5) + AssertEqual 'line 6:0', 'line 6:' . foldlevel(6) + AssertEqual 'line 7:0', 'line 7:' . foldlevel(7) + + +Given vimwiki (Wiki Headers): + Some stuff 1 + = Header level 1 2 = + == Header level 2 3 == + Content 4 + === Header level 3 5 === + = Header level 1 6 = + Content 7 + == Just to end 8 == + +Execute (Markdown and Fold Syntax): + call SetSyntax('default') + set foldmethod=syntax + +Execute (Assert Markdown: Fold Syntax): + Log 'Supposing it starts at foldlevel 0' + AssertEqual 'line 1:0', 'line 1:' . foldlevel(1) + AssertEqual 'line 2:0', 'line 2:' . foldlevel(2) + AssertEqual 'line 3:1', 'line 3:' . foldlevel(3) + AssertEqual 'line 4:2', 'line 4:' . foldlevel(4) + AssertEqual 'line 5:2', 'line 5:' . foldlevel(5) + AssertEqual 'line 6:0', 'line 6:' . foldlevel(6) + AssertEqual 'line 7:0', 'line 7:' . foldlevel(7) + +Execute (Restore state): + let &foldmethod = save_foldmethod + Log 'Next foldmethod: ' . &foldmethod + diff --git a/dot_vim/plugged/vimwiki/test/html_blockquote.vader b/dot_vim/plugged/vimwiki/test/html_blockquote.vader new file mode 100644 index 0000000..2c0fa7a --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/html_blockquote.vader @@ -0,0 +1,170 @@ +# Blockquotes in html convertion #55 +# TODO replace remove newline before end of pre tag: \n</pre></code> -> </pre></code> + + +Given (Issue 2: BlockQuote restarts list numbering {{{3): + # Item 1 + # Item 2 + + Block Quote Text + # Item 3 + +Execute (2Html): + call ConvertWiki2Body() + 1d | $d | $d + +Expect (Tested by hand 2): + <ul> + <li> + Item 1 + + <li> + Item 2 + <pre><code>Block Quote Text + </code></pre> + + <li> + Item 3 + + </ul> + +Given vimwiki (Issue 1007: List with hard wraps and a blockquote): + - Item 1 + wraps to the second line. + This is a blockquote. + + And this is back to the list item + - [ ] Item 2 + wraps to the second line. + This is a blockquote. + + And this is back to the list item + +Execute (2Html): + call ConvertWiki2Body() | 1d | $d | $d + +Expect (No blockquote): + <ul> + <li> + Item 1 + wraps to the second line. + <pre><code>This is a blockquote. + </code></pre> + </code></pre> + And this is back to the list item + + <li class="done0"> + Item 2 + wraps to the second line. + <pre><code>This is a blockquote. + </code></pre> + And this is back to the list item + + </ul> + +#Given (Issue 3: BlockQuote at multiple list levels {{{3): +# 1. Outer Item 1 +# 1. Inner Item 1 +# +# > quote 1 +# +# 2. Inner Item 2 +# 2. Outer Item 2 +# +# > quote 2 +# +#Execute (2Html): +# call ConvertWiki2Body() +# 1d | $d | $d +# +#Expect (Got with pandoc): + + +Given (Issue 5: Newlines in blockquotes are not honored {{{3): + Before + + line 1 + line 2 + After + +Execute (2Html): + call ConvertWiki2Body() + 1d | $d | $d + +Expect (Got with pandoc 5): + <p> + Before + </p> + <pre><code>line 1 + line 2 + </code></pre> + <p> + After + </p> + + +Given (Void: Basic test {{{1): + +Execute (Edit TestHtml Wiki): + edit $HOME/testwiki/TestHtml.wiki + AssertEqual $HOME . '/testwiki/TestHtml.wiki', expand('%') + AssertEqual 'default', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 0, vimwiki#vars#get_bufferlocal('wiki_nr') + +Do (Markdown with arrow blockquotes): + :edit $HOME/testwiki/TestHtml.wiki\<CR> + ggdGi first paragraph\<CR>\<CR> + > block\<CR> + > quote\<CR>\<CR> + last paragraph\<CR>\<Esc> + :write\<CR> + + +Execute (Save and Convert to html): + edit $HOME/testwiki/TestHtml.wiki + Vimwiki2HTML + + +#Given (Void): +# +# +#Do (Get Html body): +# :read $HOME/html/default/TestHtml.html\<CR> +## Goto body +# gg/<body>\<CR> +## Copy in b +# "bdat +## Delete All +# ggdG +## Paste body +# "bP +## Remove last line +# Gdd +## Save (Not necessary) +# :write +# +# +# +#Expect (Plain Html): +## the whole default html file should be here as a base + the modifications +## from "Given" +# <body> +# +# <p> +# first paragraph +# </p> +# +# <blockquote> +# <p> +# block +# quote +# </p> +# </blockquote> +# +# <p> +# last paragraph +# </p> +# +# </body> +# +## vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/html_convert_default.vader b/dot_vim/plugged/vimwiki/test/html_convert_default.vader new file mode 100644 index 0000000..d9d57d4 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/html_convert_default.vader @@ -0,0 +1,300 @@ +# Conversion: Wiki -> Html + +################################################# +Given vimwiki (Comments): + This is some text + %% This is a comment + Test%%+INLINE COMMENT+%%1 + %%+INLINE COMMENT+%%Test2 + Test3%%+INLINE COMMENT+%% + %%+ Multiline + comment + that + is + removed + +%% + Final text + +Do (Convert): + :call ConvertWiki2Html()\<Cr> +# Keep only body + ggd/<body>\<Cr> + +Expect (Comments Removed): + <body> + + <p> + This is some text + Test1 + Test2 + Test3 + </p> + + + + + + + <p> + Final text + </p> + + </body> + </html> + + +################################################# +Given vimwiki (Table no heading {{{1): + | header1 | header2 | + | val1 | val2 | + | val1 | val2 | + | val1 | val2 | + +Do (Convert): + :call ConvertWiki2Html()\<Cr> +# Keep only body + ggd/<body>\<Cr> + + +Expect (Table no heading): + <body> + + <table> + <tr> + <td> + header1 + </td> + <td> + header2 + </td> + </tr> + <tr> + <td> + val1 + </td> + <td> + val2 + </td> + </tr> + <tr> + <td> + val1 + </td> + <td> + val2 + </td> + </tr> + <tr> + <td> + val1 + </td> + <td> + val2 + </td> + </tr> + </table> + + </body> + </html> + + +Given vimwiki (Table with heading {{{1): + | header1 | header2 | header3 | + |---------|---------|---------| + | val1 | val2 | var3 | + | val4 | val5 | var6 | + +Do (Convert): + :call ConvertWiki2Html()\<Cr> +# Keep only body + ggd/<body>\<Cr> + + +Expect (Table with heading): + <body> + + <table> + <thead> + <tr> + <th> + header1 + </th> + <th> + header2 + </th> + <th> + header3 + </th> + </tr> + </thead> + <tbody> + <tr> + <td> + val1 + </td> + <td> + val2 + </td> + <td> + var3 + </td> + </tr> + <tr> + <td> + val4 + </td> + <td> + val5 + </td> + <td> + var6 + </td> + </tr> + </tbody> + </table> + + </body> + </html> + + +################################################# +Execute (Log): + Log '#473: Syntax "local:" doesnt work as expected. #473' + +Given vimwiki (Void Md): + +Execute (Edit Test473 Wiki): + edit $HOME/testwiki/TestHtml.wiki + +Do (Add local link: [[local:$HOME/here|Link]]): + :edit $HOME/testwiki/Test473.wiki\<CR> + i + [[local: + \<C-r>=$HOME\<Cr> + /here|Link]] + \<Esc> + :call WriteMe()\<Cr> + :Vimwiki2HTML\<Cr> + + +Execute (Save and Convert to html): + edit $HOME/testwiki/Test473.wiki + Vimwiki2HTML + AssertEqual '[[local:'.$HOME.'/here|Link]]', getline(1) + + +Given (Void Html): + +# TODO mutualise +Do (Get Html body): + :read $HOME/html/default/Test473.html\<CR> +# Goto body + gg/<body>\<CR> +# Copy in b + "bdat +# Delete All + ggdG +# Paste body + "bP +# Remove last line + Gdd +# Save (Not necessary) + :write + +Expect (Local link): + <body> + + <p> + <a href="../../here">Link</a> + </p> + + </body> + + +Execute (Delete): + call DeleteFile(' $HOME/testwiki/Test473.wiki') + +################################################# +Given (Void): + +Execute (Edit TestHtml Wiki): + edit $HOME/testwiki/TestHtml.wiki + AssertEqual $HOME . '/testwiki/TestHtml.wiki', expand('%') + AssertEqual 'default', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 0, vimwiki#vars#get_bufferlocal('wiki_nr') + +Do (Markdwon with %plainhtml): + :edit $HOME/testwiki/TestHtml.wiki\<CR> + :normal ggdG\<Cr> + i%plainhtml<div id="test">\<CR> + my paragraph\<CR> + %plainhtml</div>\<CR>\<Esc> + :set bt=\<CR> + :write\<CR> + +Execute (Save and Convert to html): + edit $HOME/testwiki/TestHtml.wiki + Vimwiki2HTML + +Given (Void): + +Do (Get Html body): + :read $HOME/html/default/TestHtml.html\<CR> +# Goto body + gg/<body>\<CR> +# Copy in b + "bdat +# Delete All + ggdG +# Paste body + "bP +# Remove last line + Gdd +# Save (Not necessary) + :write + + + +Expect (Plain Html): +# the whole default html file should be here as a base + the modifications +# from "Given" + <body> + + <div id="test"> + <p> + my paragraph + </p> + </div> + + </body> + + +Execute (Delete): + call DeleteFile('$HOME/testwiki/TestHtml.wiki') + + +Given vimwiki (PR: Add option to configure date string format 1073) {{{1): + %template template_1073 + content + +Do (template_date_format): +# Set conf + :let g:vimwiki_wikilocal_vars[0]['template_date_format'] = '%b %d, %Y'\<Cr> +# Convert + :call ConvertWiki2Html()\<Cr> +# Erase oth and date + :%s/[0-9]\+/Z/g\<Cr> + :%s/[A-Z][a-z][a-z]/Z/g\<Cr> +# Restore peace + :let g:vimwiki_wikilocal_vars[0]['template_date_format'] = ''\<Cr> + +Expect (Date proper format): + <html> + <body> + <div class="content"> + <p><small>Zt updated on Z Z, Z</small></p> + </div> + </body> + </html> + +# vim: sw=2 foldmethod=marker foldlevel=30 diff --git a/dot_vim/plugged/vimwiki/test/html_convert_title.vader b/dot_vim/plugged/vimwiki/test/html_convert_title.vader new file mode 100644 index 0000000..31288f2 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/html_convert_title.vader @@ -0,0 +1,10 @@ +# Test that %title values carry through when HTML is rendered + +Given vimwiki (Title value): + %title this is a title with some quotes in it: ' " + + Some content. + +Execute(Check for title tag): + call ConvertWiki2Html() + Assert 0 != search('<title>this is a title with some quotes in it: '' "') diff --git a/dot_vim/plugged/vimwiki/test/html_diary_rss_feed.vader b/dot_vim/plugged/vimwiki/test/html_diary_rss_feed.vader new file mode 100644 index 0000000..1f8ec7e --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/html_diary_rss_feed.vader @@ -0,0 +1,110 @@ +# Feature to generate a diray RSS feed (PR #934) +# TODO bug with 7.3 + +#Given (Void): +# +#Execute (Generate HTML and RSS feed): +# edit $HOME/testwiki/index.wiki +# Vimwiki2HTML +# VimwikiRss +# +#Given (Void): +# +#Do (Get HTML file): +# :read $HOME/html/default/index.html\ +## Go to line with RSS link +# gg/RSS\ +## Delete everything above +# kdgg +## Delete everything below +# jdG +## Save (Not necessary) => Actually make rest of batch freeze, do you really want +## to quit buffer +## :write +# +#Expect (RSS link in HTML): +# +# +#Do (Get RSS feed): +# :read $HOME/html/default/rss.xml\ +## Remove first line +# ggdd +## Replace pubDate with dummy as it's based on file modification time +# :%s@.*@...@g\ +## Save (Not necessary) +## :write +# +#Expect (RSS): +## TODO the next line is deleted with -Es +## +# +# +# Diary +# https://example.com/diary/diary.html +# Diary +# ... +# +# +# day 4 +# https://example.com/diary/2020-07-25.html +# 2020-07-25 +#

day 4

+# +# +# +#

+# here is some code: +#

+# +#
+#  #!/bin/sh
+#  echo "hello world"
+#  
+# +# +# +#

+# an important list: +#

+# +#
    +#
  • +# point 1 +# +#
  • +# point 2 +# +#
+# ]]> +# ... +# +# +# Day 2 +# https://example.com/diary/2020-07-23.html +# 2020-07-23 +#

Day 2

+# +#

+# another diary entry +#

+# ]]>
+# ... +#
+# +# 2020-07-22 +# https://example.com/diary/2020-07-22.html +# 2020-07-22 +# +# example diary entry for day 1. +#

+# ]]>
+# ... +#
+# +# +# +#Execute (Clean buffer modification): +# edit! $HOME/testwiki/index.wiki diff --git a/dot_vim/plugged/vimwiki/test/issue_markdown.vader b/dot_vim/plugged/vimwiki/test/issue_markdown.vader new file mode 100644 index 0000000..375f81a --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/issue_markdown.vader @@ -0,0 +1,177 @@ +# Non regression tests for issues, see changelog +# In reverse chronological order +# +# Thanks to all contributors with issues and pull request on github +# + +Given vimwiki (a): + a + +Execute (Set filename wiki_test.md): + file wiki_test.md + +Expect (a): + a + +################################################################################ +Execute (Log): + Log '#915 Vimwiki Markdown Blockquote Syntax issue' + call SetSyntax('markdown') + +Given vimwiki (One blockquote): + > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla vel. + +Do (gqq): + gqq + +Expect (Well formated and cursor on Sed): + > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus + > est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla + > vel. + +Do (move cursor and gww): + fS + gww + i__HERE__ + +Expect (Well formated and cursor on Sed): + > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus + > est sed facilisis. __HERE__Sed imperdiet massa tellus, eu fermentum felis fringilla + > vel. + +Given vimwiki (Multiple line blockquote): + > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus + > est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla + > vel. + +Execute (no JJ && Assert for Version > 7.3): + normal JJ + if v:version > 703 + AssertEqual getline(1), '> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla vel.' + endif + +################################################################################ +Execute (Log): + Log '#949 create link bug with Chinese characters' + call SetSyntax('markdown') + +Given vimwiki (Madarin with vimwiki Yeeepy): + 你 + 你好 + 你们好 + 你们好啊 + 你们好啊啊 + 你们好啊aaaaa + aaaaa你们好啊 + +Do (Enter in all): + \j \j \j \j \j \j \j + +Expect (all WORDS are links): + [你](你) + [你好](你好) + [你们好](你们好) + [你们好啊](你们好啊) + [你们好啊啊](你们好啊啊) + [你们好啊aaaaa](你们好啊aaaaa) + [aaaaa你们好啊](aaaaa你们好啊) + + +################################################################################ +Execute (Log): + Log '#735 Fix off-by-one error in get_next_line and get_prev_line' + file wiki_test.md + call SetSyntax('markdown') + +Given vimwiki (P#735 -> I#407): + 1. item1 + 2. item2 + ``` + echo "hello world" + ``` + 3. item3 + +Do (o): + o + +Expect (Renumber all): + 1. item1 + 2. + 3. item2 + ``` + echo "hello world" + ``` + 4. item3 + + +################################################################################ +Execute (Log): + Log '#899 conceallevel is setted globally when editing a wiki file (PR #900)' + call SetSyntax('markdown') + +Given vimwiki (Void): + +Execute (conceal): + set conceallevel=1 + let g:vimwiki_global_vars['conceallevel']=2 + + Log ' ConcealLevel is set to vimwiki for a .md' + call SetSyntax('markdown') + file main.md + edit + AssertEqual &ft, 'vimwiki' + AssertEqual @%, 'main.md' + if exists('+conceallevel') + AssertEqual &conceallevel, 2 + endif + + Log ' ConcealLevel is set to vim for a no_ext' + edit no_ext + AssertEqual &ft, '' + if exists('+conceallevel') + AssertEqual &conceallevel, 1 + endif + + Log ' Again ConcealLevel is set to vimwiki for a .md (just for fun)' + let g:vimwiki_global_vars['conceallevel']=0 + edit new.md + AssertEqual &ft, 'vimwiki' + AssertEqual @%, 'new.md' + if exists('+conceallevel') + AssertEqual &conceallevel, 0 + endif + + +################################################################################ +Execute (Log): + Log 'PR #528: Add option |g:vimwiki_create_link| to prevent link creation' + call SetSyntax('markdown') + +Given vimwiki (Link): + Link + +Do (Enter): + \ + +# TODO should be Link.md, revise the test +Expect (Link): + [Link](Link) + +Do (): + \\ + :AssertEqual expand('%:t'), 'Link.md'\ + +Given vimwiki (Link): + Link + +Do (No link: ): + :call vimwiki#vars#set_global('markdown_create_link', 0) + \\ + :AssertEqual expand('%:t'), 'main.md'\ + +Expect (Link): + [Link](Link) + +Execute (wipeout): + " This solves many things + file /testplugin/[Vader-workbench] diff --git a/dot_vim/plugged/vimwiki/test/issue_profile_tabnext.vader b/dot_vim/plugged/vimwiki/test/issue_profile_tabnext.vader new file mode 100644 index 0000000..46f3151 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/issue_profile_tabnext.vader @@ -0,0 +1,51 @@ +# See Issue #580 + +Given vimwiki (Void): + Tabnext + +Execute (Set fold method): + let g:vimwiki_folding = 'expr:quick' + call ReloadVimwiki() + +Execute (Expect < 0.5 second delay: Issue #580): + let mode = mode(1) + Log 'Mode : ' .mode + if mode ==# 'ce' || mode ==# 'cv' " -es (silent ex mode) + Log 'Skiped: Tabedit and tabnext are not working weel with -Es' + else + Log 'Prepare: Edit: mode: ' . mode + edit /testplugin/test/resources/delay.wiki + Log 'Prepare: Assert' + AssertEqual 'default', vimwiki#vars#get_wikilocal('syntax') + Log 'Prepare: Goto 50%' + normal! 50% +# "TODO set ft and set wiki syntax or this error (no fold found) +# "normal! zozo + + Log 'Run: tabedit' + let start = reltime() + tabedit + let end = str2float(reltimestr(reltime(start))) + + Log 'Verify redraw' + Log 'Elapsed time Tabedit = ' . string(end) + Assert end < 0.5, 'Redraw Took longer than expected: ' . string(end) . ' seconds' + + Log 'Run: redraw' + let start = reltime() + tabprev + redraw + let end = str2float(reltimestr(reltime(start))) + + Log 'Verify redraw' + Log 'Elapsed time redraw = ' . string(end) + Assert end < 0.5, 'Redraw Took longer than expected: ' . string(end) . ' seconds' + endif + +Execute (Reset variables): + call DeleteFile('/testplugin/test/resources/delay.wiki') + let g:vimwiki_folding = '' + call ReloadVimwiki() + +Expect vimwiki (Tabnext): + Tabnext diff --git a/dot_vim/plugged/vimwiki/test/link_anchor.vader b/dot_vim/plugged/vimwiki/test/link_anchor.vader new file mode 100644 index 0000000..d2e9267 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_anchor.vader @@ -0,0 +1,394 @@ +# Link internal to a file +# +# See: generate_toc.vim +# +# See issue #666 for anchor support (then internal links) +# Preambule set file onces and for all {{{1 +# Otherwise the bash script is freezing + + +### Wiki {{{1 +############### + + +### Markdown {{{1 +############### + + +Given vimwiki (a): + a + +Execute (Set filename wiki_test.md): + file wiki_test.md + +Expect (a): + a + + +Given vimwiki (VimwikiTOC with link and number {{{1): + [link1](#i-v-p-741528) + [link2](#i-v-p-741528-2) + + # I [V p](h) (7.415.28) + + # I [V p](h) 741.528 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (Enter link): + gg\ + A__HERE1__\ + ggj\ + A__HERE2__\ + +Expect(): + [link1](#i-v-p-741528) + [link2](#i-v-p-741528-2) + + # I [V p](h) (7.415.28)__HERE1__ + + # I [V p](h) 741.528__HERE2__ + +Given vimwiki (VimwikiTOC is broken against headers with link #182 {{{1): + [A link B](#a-link-b) + [tlink](#tlink) + [7.4.1528](#741528) + [link (333)](#link-333) + + # A [link](anything here) B + + # t[link](anything here) + + ## 7.4.1528 + + #### [link]() (333) + + +Execute (Set syntax markdown): + call SetSyntax('markdown') + + +Do (Enter link): + gg\ + A__HERE1__\ + ggj\ + A__HERE2__\ + ggjj\ + A__HERE3__\ + ggjjj\ + A__HERE4__\ + :AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax')\ + + +Expect vimwiki (Good anchor with link navigation): + [A link B](#a-link-b) + [tlink](#tlink) + [7.4.1528](#741528) + [link (333)](#link-333) + + # A [link](anything here) B__HERE1__ + + # t[link](anything here)__HERE2__ + + ## 7.4.1528__HERE3__ + + #### [link]() (333)__HERE4__ + + + +# Link to anchor in SetExt {{{1 +# Like that +# ----- +# Issue: #209 + +Given vimwiki (Anchor SetExt): + [jump](#frst-one) + + F!rst One + ========= + +Execute (Set filename wiki_test.md): + call SetSyntax('markdown') + +Do (Enter link): + \ + A__HERE__\ + +Expect (Cursor jumped SetExt): + [jump](#frst-one) + + F!rst One__HERE__ + ========= + +Given vimwiki (Bad Anchor SetExt): + [jump](#frst-one) + + F!rst One + +Execute (Set filename wiki_test.md): + call SetSyntax('markdown') + +Do (Enter link): + \ + A__HERE__\ + +Expect (Cursor stayed (not jumped) SetExt): + [jump](#frst-one)__HERE__ + + F!rst One + +# Link to anchor with spaces {{{1 +# PR #840 +# Issues: #831 + +Given vimwiki (Internal links zith spaces): + [Any ! apparent name @#$](#basic-heading-many-spaces) + One line here + + ## Basic HeAding Many SpacES + + One line here + +Execute (Set filename wiki_test.md): + call SetSyntax('markdown') + +Do (Enter link): + \ + A__HERE__\ + +Expect (Cursor at heading position): + [Any ! apparent name @#$](#basic-heading-many-spaces) + One line here + + ## Basic HeAding Many SpacES__HERE__ + + One line here + +Execute (Clear wiki jumps (alias: prev_links)): + call vimwiki#vars#set_bufferlocal('prev_links', []) + + +# Before {{{1 + +Given vimwiki (Internal links + one link to filenew): + # Contents + + - [Test1](#Test1) + - [Test2](#Test2) + + # Test1 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) + + # Test2 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) + +Execute (Set filename wiki_test.md): + call SetSyntax('markdown') + +Do (Navigate with ): + A more Contents\ + \ + \ + A more Test1\ + \ + \ + \ + A more Test2\ + +Expect (Content added to titles): + # Contents more Contents + + - [Test1](#Test1) + - [Test2](#Test2) + + # Test1 more Test1 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) + + # Test2 more Test2 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) + +Do (Navigate with and and come back with ): + \ + \ +# Cursor at Test1 + \ + \ + \ +# Cursor at Test2 + \ + \ + \ +# Cursor at Test2/filenew + A not yet\ + \ +# Cursor at Test1/test2 + A near Test1/test2 + \ + \ +# Cursor at Contents/test1 + A near Contents/test1 + \ + +Expect (Vimwiki links): + # Contents + + - [Test1](#Test1) near Contents/test1 + - [Test2](#Test2) + + # Test1 + + - [Test1](#Test1) + - [Test2](#Test2) near Test1/test2 + - [filenew](filenew) + + # Test2 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) not yet + +Do (Navigate with comeback with from filenew): + \ + A first shot\ + 0\ +# Cursor at Contents/test1 + \ + \ + \ + A first shot\ + 0\ +# Cursor at Test1/test2 + \ + G +# Cursor at Test2/filenew + A first shot\ + 0\ +# Cursor at Test2/filenew + \ +# Cursor in filenew (a new file) + A anything in filenew: empirically it does not count\ + \ +# Cursor at Test2/filenew + \ +# Cursor at Test1/test2 + \ +# Cursor at Contents/test1 + A second shot + +Expect (Just Contents/test1 got the second shot): + # Contents + + - [Test1](#Test1) first shot second shot + - [Test2](#Test2) + + # Test1 + + - [Test1](#Test1) + - [Test2](#Test2) first shot + - [filenew](filenew) + + # Test2 + + - [Test1](#Test1) + - [Test2](#Test2) + - [filenew](filenew) first shot + +Execute (Delete filenew buffer): + call DeleteFile('/testplugin/filenew.md') + +Do (Navigate with comeback with too far): + \ +# Cursor at Contents/test1 + \ + \ + \ +# Cursor at Test1/test2 + \ + \ +# Cursor at Test2/test1 + \ + \ + \ +# Cursor at Test1/test2 + \ + A first test2\ + \ +# Cursor at Test2/test1 + \ + A first test1\ +# Back + \ +# Cursor at Test2/test1 + A second test2/test1\ + \ +# Cursor at Test1/test2 + A second test1/test2\ + \ +# Cursor at Test2/test1 + \ +# Cursor at Test1/test2 + \ +# Cursor at Contents/test1 +# Finished + \ + \ + \ + \ + A 1\ + \ + A 2\ + \ + A 3\ + \ + A 4\ + +Expect (After too many , cursor stays at the first spot in first file: Contents/test1): + # Contents + + - [Test1](#Test1) 1 2 3 4 + - [Test2](#Test2) + + # Test1 first test1 + + - [Test1](#Test1) + - [Test2](#Test2) second test1/test2 + - [filenew](filenew) + + # Test2 first test2 + + - [Test1](#Test1) second test2/test1 + - [Test2](#Test2) + - [filenew](filenew) + +Given vimwiki (link to self): + - [Bad link](Very bad.html) + - [My own file](wiki_test) + - [Test1](#Test1) + - [Test2](#Test2) + +Do (Follow link to self and append chars): + \ + \ + \ + a this_is_18_chars \ + +Expect (Some chars appended at self link): + - [Bad link](Very bad.html) + - [ this_is_18_chars My own file](wiki_test) + - [Test1](#Test1) + - [Test2](#Test2) + +# vim: foldmethod=marker foldlevel=30 sw=2 diff --git a/dot_vim/plugged/vimwiki/test/link_creation.vader b/dot_vim/plugged/vimwiki/test/link_creation.vader new file mode 100644 index 0000000..5222433 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_creation.vader @@ -0,0 +1,474 @@ +# Link creation: my favorite (tinmarino) +# You know, when pressing Enter: +# in mode normal, visual +# in OS windows, linux +# Seems easy but tests are reaaly needed here + +# Links Renaming inside #1138 {{{1 + +Given vimwiki (Link with toto): + [if nothing goes right, go left](www.the_bad_jokes.com) + +Do(Rename description): +# Change in bracket + ci[ + new description + \ + +Expect(New description): + [new description](www.the_bad_jokes.com) + +Do(Rename url): +# Move to ( + %l +# Change in parenthesis + ci( + www.new_url.com + +Expect(New URL): + [if nothing goes right, go left](www.new_url.com) + + +# Links with dot {{{1 +# Issue #924 +# See for spec: https://github.com/vimwiki/vimwiki/issues/924#issuecomment-672837685 +#################### + +Given vimwiki (filename filename.dot): + filename + filename.dot + +Do(): + :call SetSyntax('default')\ + \\ + :AssertEqual 'filename.wiki', expand('%:t')\ + :call DeleteFile('%')\ + +Do(): + j + \\ + :AssertEqual 'filename.dot', expand('%:t')\ + :call DeleteFile('%')\ + +Expect(Nothing left): + + +# Linkify function {{{1 +# Issue #994 +#################### + +Given vimwiki (abc def ghi jkl): + https://github.com/vimwiki/vimwiki + +Do(wiki: call linkify): + :if v:version >= 704\ + call vimwiki#base#linkify()\ + else\ + let stg = '[[https://github.com/vimwiki/vimwiki|GitHub - vimwiki/vimwiki: Personal Wiki for Vim]]'\ + 0put =stg\ + $d\ + endif\ +# else\ +# endif\ + +Expect(Wiki link): + [[https://github.com/vimwiki/vimwiki|GitHub - vimwiki/vimwiki: Personal Wiki for Vim]] + +Do(md: call linkify): + :call SetSyntax('markdown')\ + :if v:version >= 704\ + call vimwiki#base#linkify()\ + else\ + 0put ='[GitHub - vimwiki/vimwiki: Personal Wiki for Vim](https://github.com/vimwiki/vimwiki)'\ + $d\ + endif\ + +Expect(Markdown link): + [GitHub - vimwiki/vimwiki: Personal Wiki for Vim](https://github.com/vimwiki/vimwiki) + +# Link Normalisation {{{1 +# And configuration +# Issues: #892 +#################### + +Execute (Log): + Log 'Markdown change Link1 : Pressing enter to create a [[double bracket]] #892' + +Given vimwiki (abc def ghi jkl): + abc def ghi jkl + +Execute (Set filename wiki_test.md): + call SetSyntax('markdown') + let save_link = g:vimwiki_syntaxlocal_vars.markdown.Link1 + let g:vimwiki_syntaxlocal_vars.markdown.Link1 = vimwiki#vars#get_global('WikiLinkTemplate1') + +Do (vee): + vee\ + +Expect (append md suffix): + [[abc def]] ghi jkl + +Execute (restore): + let g:vimwiki_syntaxlocal_vars.markdown.Link1 = save_link + + +# vimwiki_markdown_link_ext {{{1 +#################### + +Execute (Log): + Log 'vimwiki_markdown_link_ext' + +Given vimwiki (abc def ghi jkl): + abc def ghi jkl + +Execute (Set filename wiki_test.md): + Log '>> Visual creation, markdown syntax' + file wiki_test.md + let g:vimwiki_markdown_link_ext = 1 + call ReloadVars() + call SetSyntax('markdown') + AssertEqual vimwiki#vars#get_wikilocal('syntax'), 'markdown' + AssertEqual vimwiki#vars#get_wikilocal('markdown_link_ext'), 1 + +Do (vee): + vee\ + +Expect (append md suffix): + [abc def](abc def.md) ghi jkl + +Execute (Restore variable g:vimwiki_markdown_link_ext): + unlet g:vimwiki_markdown_link_ext + call ReloadVars() + + +# Visual Creation {{{1 +# Issues: #382 +#################### + +Execute (Log): + Log 'Visual Creation' + +# For markdown {{{2 +# ------------------ + +Given vimwiki (abc def ghi jkl): + abc def ghi jkl + +Execute (Set filename wiki_test.md): + Log '>> Visual creation, markdown syntax' + file wiki_test.md + call SetSyntax('markdown') + AssertEqual vimwiki#vars#get_wikilocal('syntax'), 'markdown' + +Do (v3e): + v3e\ + +Expect (3 Words []()): + [abc def ghi](abc def ghi) jkl + +Do (v3e): + wv2e\ + +Expect (2 Words []()): + abc [def ghi](def ghi) jkl + +Do (selection=exclusive v3e): + :set selection=exclusive\ + wv2e\ + +Expect (2 Words []()): + abc [def ghi](def ghi) jkl + +Do (selection=exclusive wv$): + :set selection=exclusive\ + wv$\ + +Expect (3 Words []()): + abc [def ghi jkl](def ghi jkl) + + +# For Wiki {{{2 +# ------------------ + +Given vimwiki (abc def ghi jkl): + abc def ghi jkl + +Execute (Set filename wiki_test.md): + Log '>> Visual creation, wiki syntax' + file wiki_test.wiki + call SetSyntax('default') + +Do (v3e): + v3e\ + +Expect (3 Words []()): + [[abc def ghi]] jkl + +Do (v3e): + wv2e\ + +Expect (2 Words []()): + abc [[def ghi]] jkl + +Do (selection=exclusive v3e): + :set selection=exclusive\ + wv2e\ + +Expect (2 Words []()): + abc [[def ghi]] jkl + +Do (selection=exclusive wv$): + :set selection=exclusive\ + wv$\ + +Expect (3 Words []()): + abc [[def ghi jkl]] + + +# Absolute links {{{1 +#################### + +Execute (Log): + Log 'Absolute links: full paths and in-wiki' + +# For markdown {{{2 +# ------------------ + +Execute (Set filename wiki_test.md): + Log '>> Absolute link, markdown syntax' + file wiki_test.md + call SetSyntax('markdown') + +Given vimwiki(some wiki link): + [test1](//$HOME/in_home1) + [test2](//~/in_home2) + [test3](///tmp/in_tmp) + [test4](/in_current_wiki) + +Do (Check in_home1): + \ + :AssertEqual expand('%'), $HOME.'/in_home1.md'\ + +Do (Check in_home2): + j\ + :AssertEqual expand('%'), $HOME.'/in_home2.md'\ + +Do (Check in_tmp): + jj\ + :AssertEqual expand('%'), '/tmp/in_tmp.md'\ + +# Here, assuming that "current wiki" means the working directory, since +# no wiki is currently defined: +Do (Check in_current_wiki): + jjj\ + :AssertEqual expand('%'), '/testplugin/in_current_wiki.md'\ + +# For Wiki {{{2 +# ------------------ + +Execute (Set filename wiki_test.wiki): + Log '>> Absolute link, wiki syntax' + file wiki_test.wiki + call SetSyntax('default') + +Given vimwiki(some wiki link): + [[//$HOME/in_home1]] + [[//~/in_home2]] + [[///tmp/in_tmp]] + [[/in_current_wiki]] + +Do (Check in_home1): + \ + :AssertEqual expand('%'), $HOME.'/in_home1.wiki'\ + +Do (Check in_home2): + j\ + :AssertEqual expand('%'), $HOME.'/in_home2.wiki'\ + +Do (Check in_tmp): + jj\ + :AssertEqual expand('%'), '/tmp/in_tmp.wiki'\ + +# Here, assuming that "current wiki" means the working directory, since +# no wiki is currently defined: +Do (Check in_current_wiki): + jjj\ + :AssertEqual expand('%'), '/testplugin/in_current_wiki.wiki'\ + +Execute(Clean: temporary): + call ReloadVimwiki() + call DeleteFile('$HOME/in_home1.md') + call DeleteFile('~/in_home2.md') + call DeleteFile('/tmp/in_tmp.md') + +# Link with dot {{{1 +#################### + +Execute (Log): + Log 'Link with dot' + +Given vimwiki (filenames with dots): + part1.part2.part3 + part1.part2.part3.md + noext + +Execute (Set filename wiki_test.md): + file wiki_test.md + call SetSyntax('markdown') + +Do (Linkify all): + \ + j\ + j\ + +Expect (Full Words are made as links, no extension addded . -> space): + [part1 part2 part3](part1.part2.part3) + [part1 part2 part3](part1.part2.part3.md) + [noext](noext) + +Given vimwiki (filnames with dots): + part1.part2.part3 + part1.part2.part3.md + noext + +Do (Fllow link witout markdown): + \\ + :AssertEqual expand('%:t'), 'part1.part2.part3'\ + +Do (j): + j\\ + :AssertEqual expand('%:t'), 'part1.part2.part3.md'\ + + +# Rest {{{1 +########################## + +Execute (Log): + Log 'And more' + +Given vimwiki (Text that is not a wikilink): + test + www.google.com + https://www.google.com + multiple words + let's + let's + file.wiki + file.md + file.mw + +Execute (Set syntax to default): + call SetSyntax('default') + +Do (Create links default syntax): + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + \ + j + \ + j + \ + j + \ + +Expect (Vimwiki links): + [[test]] + [[www.google.com]] + [[https://www.google.com]] + [[multiple words]] + [[let's]] + [[let]]'s + [[file.wiki]] + [[file.md]] + [[file.mw]] + +Execute (Set syntax to markdown): + call SetSyntax('markdown') + +Do (Create links markdown syntax): + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + \ + j + \ + j + \ + j + \ + +Expect (Markdown links): + [test](test) + [www.google.com](www.google.com) + [https://www.google.com](https://www.google.com) + [multiple words](multiple words) + [let's](let's) + [let](let)'s + [file wiki](file.wiki) + [file](file.md) + [file mw](file.mw) + +Execute (Set syntax to mediawiki): + call SetSyntax('media') + +Do (Create links mediawiki syntax): + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + v$ + \ + j + \ + j + \ + j + \ + j + \ + +Expect (Mediawiki links): + [[test]] + [[www.google.com]] + [[https://www.google.com]] + [[multiple words]] + [[let's]] + [[let]]'s + [[file.wiki]] + [[file.md]] + [[file.mw]] + +Execute(Clean: Icreated many temporary wiki): + call ReloadVimwiki() + +# vim: foldmethod=marker foldlevel=30 diff --git a/dot_vim/plugged/vimwiki/test/link_generation.vader b/dot_vim/plugged/vimwiki/test/link_generation.vader new file mode 100644 index 0000000..65b1cf3 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_generation.vader @@ -0,0 +1,262 @@ +# Automatic link generation +# Related to: +# - wiki file discovery +# - buffer list insertion (see: vimwiki#base#update_listing_in_buffer) + + +Execute (Reset sw to default (due to batch)): + set sw=8 + +# 1 VimwikiGenerateLinks {{{1 +########################## +# Wiki Syntax (no caption, default) {{{2 +################# + +Execute (Log): + Log 'Wiki Syntax (no caption, default)' + call ReloadVimwiki() + AssertEqual '-1_margin', vimwiki#vars#get_wikilocal('list_margin') . '_margin' + +Given (Void): + +Execute (VimwikiGenerateLinks): + edit $HOME/testwiki/Test.wiki + VimwikiGenerateLinks + +Expect (The links with a header): + + + = Generated Links = + - [[buzz_bozz]] + - [[index]] + - [[link_syntax]] + - [[link_syntax/nested]] + +Execute (VimwikiGenerateLinks x 2): + edit $HOME/testwiki/Test.wiki + VimwikiGenerateLinks + call append('$', 'Last Line') + VimwikiGenerateLinks + +Expect (The links with a header (bis)): + + + = Generated Links = + - [[buzz_bozz]] + - [[index]] + - [[link_syntax]] + - [[link_syntax/nested]] + + Last Line + +Execute (Clean Test.wiki): + call DeleteFile('$HOME/testwiki/Test.wiki') + +# Wiki Syntax (with caption) {{{2 +################# + +Execute (Log): + Log 'Wiki Syntax (with caption)' + let vimwiki_default.generated_links_caption = 1 + call ReloadVimwiki() + AssertEqual '-1_margin', vimwiki#vars#get_wikilocal('list_margin') . '_margin' + +Given (Void): + +Execute (VimwikiGenerateLinks): + edit $HOME/testwiki/Test.wiki + VimwikiGenerateLinks + +Expect (The links with a header): + + + = Generated Links = + - [[buzz_bozz|Buzz Bozz]] + - [[index|Test Wiki]] + - [[link_syntax]] + - [[link_syntax/nested]] + +Execute (VimwikiGenerateLinks x 2): + edit $HOME/testwiki/Test.wiki + VimwikiGenerateLinks + call append('$', 'Last Line') + VimwikiGenerateLinks + +Expect (The links with a header (bis)): + + + = Generated Links = + - [[buzz_bozz|Buzz Bozz]] + - [[index|Test Wiki]] + - [[link_syntax]] + - [[link_syntax/nested]] + + Last Line + +Execute (Clean Test.wiki): + call DeleteFile('$HOME/testwiki/Test.wiki') + +# Markdown Syntax {{{2 +################# + +Execute (Log): + Log 'Markdown Syntax' + +Given (Void): + +Execute (Goto markdown resource wiki): + VimwikiIndex 2 + AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + +Execute (Edit Test file / VimwikiGenerateLinks): + edit $HOME/testmarkdown/Test.md + AssertEqual $HOME . '/testmarkdown/Test.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + VimwikiGenerateLinks + +Expect (The links with a header): + + + # Generated Links + + - [Buzz Bozz](buzz_bozz) + - [Test Wiki](index) + - [link_syntax](link_syntax) + - [link_syntax/nested](link_syntax/nested) + +Do (Save Test.md && Re-GenerateLinks): + :edit $HOME/testmarkdown/Test.md\ + :call WriteMe()\ + :VimwikiGenerateLinks\ + :VimwikiGenerateLinks\ + +Expect (The links with a header with file Test): + + + # Generated Links + + - [Generated Links](Test) + - [Buzz Bozz](buzz_bozz) + - [Test Wiki](index) + - [link_syntax](link_syntax) + - [link_syntax/nested](link_syntax/nested) + +Execute (Clean: Remove Test.md): + call DeleteFile('$HOME/testmarkdown/Test.md') + + +# 2 VimwikiDiaryGenerateLinks {{{1 +############################# + +# Wiki Syntax {{{1 +################# + +Execute (Log): + Log 'Wiki Syntax' + +Do (Create diary files): + :edit $HOME/testwiki/diary/2019-12-10.wiki\ + :call append('$', 'Content')\ + :call WriteMe()\ + :edit $HOME/testwiki/diary/2019-07-13.wiki\ + :call append('$', 'Content')\ + :call WriteMe()\ + :edit $HOME/testwiki/diary/2019-03-01.wiki\ + :call append('$', 'Content')\ + :call WriteMe()\ + +Do (Edit diary.wiki && GenerateDiaryLinks): + :edit $HOME/testwiki/diary/diary.wiki\ + :VimwikiDiaryGenerateLinks\ + +Expect (diary index generated): + = Diary = + == 2020 == + + === July === + - [[2020-07-25|day 4]] + - [[2020-07-24|day 3]] + - [[2020-07-23|Day 2]] + - [[2020-07-22]] + + == 2019 == + + === December === + - [[2019-12-10]] + + === July === + - [[2019-07-13]] + + === March === + - [[2019-03-01]] + +Execute (Clean): + Log "End: Clean" + call DeleteFile('$HOME/testwiki/diary/2019-12-10.wiki') + call DeleteFile('$HOME/testwiki/diary/2019-07-13.wiki') + call DeleteFile('$HOME/testwiki/diary/2019-03-01.wiki') + Log "End: Reset shiftwidth to the default: 8" + +# Wiki Markdown {{{1 +################# + +Execute (Log): + Log 'Markdown Syntax' + +Execute (New Command): + Log "2. Testing VimwikiDiaryGenerateLinks TODO" + set sw=4 + AssertEqual 4, &sw + +Do (Edit diary/2019-12-10): + :edit $HOME/testmarkdown/diary/2019-12-10.md\ + iinformative content\ + :call WriteMe()\ + +Do (Edit and save diary/2019-07-13): + :edit $HOME/testmarkdown/diary/2019-07-13.md\ + i# informative title\ + :call WriteMe()\ + +Do (Edit and save diary/2018-03-01): + :edit $HOME/testmarkdown/diary/2019-03-01.md\ + :call WriteMe()\ + + +Do (Edit diary.md && GenerateDiaryLinks): + :edit $HOME/testmarkdown/diary/diary.md\ + :VimwikiDiaryGenerateLinks\ + +Expect (diary index generated): + # Diary + + ## 2020 + + ### July + + - [2020-07-22](2020-07-22) + + ## 2019 + + ### December + + - [2019-12-10](2019-12-10) + + ### July + + - [informative title](2019-07-13) + + ### March + + - [2019-03-01](2019-03-01) + + +Execute (Clean): + call DeleteFile('$HOME/testmarkdown/diary/2019-12-10.md') + call DeleteFile('$HOME/testmarkdown/diary/2019-07-13.md') + call DeleteFile('$HOME/testmarkdown/diary/2019-03-01.md') + Log "End: Reset shiftwidth to the default: 8" + set sw& + +# vim: sw=2:foldmethod=marker:foldlevel=30:foldignore=: diff --git a/dot_vim/plugged/vimwiki/test/link_renaming.vader b/dot_vim/plugged/vimwiki/test/link_renaming.vader new file mode 100644 index 0000000..2397c3a --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_renaming.vader @@ -0,0 +1,295 @@ +# VimwikiRenameFile +# Related to link, file navigation +# Many commands are made with Do: They block with Execute + + +# Create directories I remove at end {{{1 +########################################## + +Execute (Mkdir dir1 dir2 dir11 dir12): + call system("mkdir $HOME/testmarkdown/dir1") + call system("mkdir $HOME/testmarkdown/dir1/dir11") + call system("mkdir $HOME/testmarkdown/dir1/dir12") + call system("mkdir $HOME/testmarkdown/dir2") + + + +Do(Link with / are relative to root #617): + :edit $HOME/testmarkdown/test.md\ + :Log 'Is this wiki 2'\ + :AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr')\ + :Log 'Editing'\ + i/dir1/old_name\ + \\ + :AssertEqual 'old_name', expand('%:t:r')\ + :call WriteMe()\ + :VimwikiRenameFile new_name\ + :AssertEqual 'new_name', expand('%:t:r')\ + :edit $HOME/testmarkdown/test.md\ + :AssertEqual '[dir1 old_name](/dir1/new_name)', getline(1)\ + + +# TEST TRANSDIRECTORY AND ARGUMENT {{{1 +# NEW FEATURE #926 + +# Create smaller unit {{{2 + +# we stick all along with these 3 files, +# Follow them ! +Execute (Create 3 files): + edit $HOME/testmarkdown/Test-Rename-zzz.md + call WriteMe() + edit $HOME/testmarkdown/dir1/dir11/Test-Rename.md + call WriteMe() + edit $HOME/testmarkdown/Test-Rename-Completion.md + call WriteMe() + + +Do (Testing Old buffer has been wiped out {{{2): + :edit $HOME/testmarkdown/Test-Rename-Completion.md\ + :Log 'Get current Buffer'\ + :let buf_old = bufnr('%')\ + :Log 'Is this wiki 2'\ + :AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr')\ + :Log 'Delete for loosers'\ + :call DeleteFile('$HOME/testmarkdown/Test-Rename-new1.md')\ + :Log 'Rewrite ...'\ + :call WriteMe()\ + :Log 'Rename 1'\ + :VimwikiRenameFile Test-Rename-new1\ + :Log 'Assert 1'\ + :AssertEqual 'Test-Rename-new1', expand('%:t:r')\ + :Log 'Rename 2'\ + :VimwikiRenameFile Test-Rename-Completion\ + :Log 'Assert 2'\ + :AssertEqual expand('%'), $HOME . '/testmarkdown/Test-Rename-Completion.md'\ + +Do (Testing Completion {{{2): +# Rename and test (zzz) + :VimwikiRenameFile Test-Rename-z\1\ + :AssertEqual $HOME . '/testmarkdown/Test-Rename-zzz1.md', expand('%')\\ +# Restore old name + :call WriteMe()\ + :VimwikiRenameFile Test-Rename-zzz\ + + +Do (Testing transforward {{{2): + :Log 'Forward: root -> dir1/dir11 {{{3'\ +# Create dir1/dir11/Test-Rename and link to it + :edit $HOME/testmarkdown/Test-Rename-Completion.md\ + ggdG + idir1/dir11/Test-Rename.md\ + \\ + :VimwikiRenameFile ../Test-Rename-2\ + :AssertEqual expand('%'), $HOME . '/testmarkdown/dir1/Test-Rename-2.md'\\ + +# See what happend in root + :call WriteMe()\ + :edit $HOME/testmarkdown/Test-Rename-Completion.md\ + :AssertEqual getline(1), '[dir1 dir11 Test Rename](dir1/Test-Rename-2.md)'\ + + :Log 'Backward dir1/dir11 -> root {{{3'\ +# See what happend in dir1/dir11 +# I am in root so pressing Enter sends me to dir1/dir11 + \ +# Write forward path + dd + i../Test-Rename-Completion\ +# Convert it to link + 0\\ + +# Now in root + :AssertEqual $HOME . '/testmarkdown/Test-Rename-Completion.md', expand('%')\ + :VimwikiRenameFile dir1/Test-Rename-Completion-2\ + :Log 'Rename -> dir1/Test...{{{3'\ + :AssertEqual $HOME . '/testmarkdown/dir1/Test-Rename-Completion-2.md', expand('%')\ + + +Execute (Delete smaller unit changed {{{2): + call DeleteFile('$HOME/testmarkdown/Test-Rename-new1.md') + call DeleteFile('$HOME/testmarkdown/Test-Rename-zzz.md') + call DeleteFile('$HOME/testmarkdown/dir1/Test-Rename-Completion_2.md') + call DeleteFile('$HOME/testmarkdown/dir1/Test-Rename-2.md') + + +# VimwikiRename Test same directory {{{1 +# Old big conf, from bad unit test design +# Changing file in a single dir +# Feel free to modify but as long as it works +# I delay the cleaning +#################################### + +Given vimwiki (Void): + + +Execute (Create Test-Rename -> dir1/dir11/in_dir11.md and dir1/dir12/in_dir12.md and dir2/in_dir2.md): + edit $HOME/testmarkdown/Test-Rename.md + AssertEqual $HOME . '/testmarkdown/Test-Rename.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + call append(0, ['# Test Rename', 'in_root.md', 'dir1/dir11/in_dir11.md', 'dir1/dir12/in_dir12.md', 'dir2/in_dir2.md']) + call WriteMe() + +Do (Create in_root): + :Log 'Open Test-Rename.md'\ + :edit $HOME/testmarkdown/Test-Rename.md\ + :AssertEqual $HOME . '/testmarkdown/Test-Rename.md', expand('%')\\ + + :Log 'Delete last line (easyer latter checks without trailing spaces)'\ + Gdd + + :Log 'Open in_root.md'\ + gg + j\ + j\ + j\ + j\ + ggj0y$ + :AssertEqual '[in_root](in_root.md)', @"\ + 0\ + :AssertEqual $HOME . '/testmarkdown/in_root.md', expand('%')\ + + :Log 'Add link in_root.md -> dir1/dir11/in_dir11'\ + ggi# Title in root\\ + idir1/dir11/in_dir11\ + :call WriteMe()\ + :AssertEqual $HOME . '/testmarkdown/in_root.md', expand('%')\ + + :Log 'Open in_dir11.md: creating dirs'\ + ggj"ay$ + :AssertEqual 'reg dir1/dir11/in_dir11', 'reg ' . @a\ + 0\\ + :AssertEqual 'file ' . $HOME . '/testmarkdown/dir1/dir11/in_dir11.md', 'file ' . expand('%')\ + + :Log 'One backspace for fun'\ + \ + :AssertEqual 'file ' . $HOME . '/testmarkdown/in_root.md', 'file ' . expand('%')\ + + +Do (Create dir_11 -> dir_11): + :edit $HOME/testmarkdown/dir1/dir11/in_dir11_fix.md\ + + :Log 'Add link in_dir11_fix.md -> in_dir11'\ + ggi# Title in dir11 fix\\ + iin_dir11\ + :call WriteMe()\ + + :Log 'Open in_dir11.md: creating dirs'\ + ggj"ay$ + :AssertEqual 'reg in_dir11', 'reg ' . @a\ + 0\\ + y\ + :AssertEqual 'file ' . $HOME . '/testmarkdown/dir1/dir11/in_dir11.md', 'file ' . expand('%')\ + + :Log 'One backspace for fun'\ + \ + :AssertEqual 'file ' . $HOME . '/testmarkdown/dir1/dir11/in_dir11_fix.md', 'file ' . expand('%')\ + + +Execute (Fill in_dir11 content): + edit $HOME/testmarkdown/dir1/dir11/in_dir11.md + call append(0, ['# Title in_dir11', '[dir2 link](../../dir2/in_dir2.md)']) + call WriteMe() + + +# Rename local {{{1 +################### + +Do (RenameLink in_dir11 -> in_dir11_new): + :edit $HOME/testmarkdown/dir1/dir11/in_dir11.md\ + :AssertEqual 'file ' . $HOME . '/testmarkdown/dir1/dir11/in_dir11.md', 'file ' . expand('%')\ + :AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr')\ + + :Log 'Rename'\ + :call WriteMe()\ + :VimwikiRenameFile\ + y\ + in_dir11_new\ + :call WriteMe()\ + + :Log 'Append filename'\ + :call append('$', [expand('%')])\ + + +Expect(With new filename at the end): + # Title in_dir11 + [dir2 link](../../dir2/in_dir2.md) + + /home/vimtest/testmarkdown/dir1/dir11/in_dir11_new.md + + +Execute (edit in_dir11_fix): + edit $HOME/testmarkdown/dir1/dir11/in_dir11_fix.md + +Expect(Link to in_dir11_new): + # Title in dir11 fix + [in_dir11](in_dir11_new) + + +Execute (edit Test-Rename.md): + edit $HOME/testmarkdown/Test-Rename.md + + +Expect (Link to in_dir11_new): + # Test Rename + [in_root](in_root.md) + [dir1 dir11 in_dir11](dir1/dir11/in_dir11_new.md) + [dir1 dir12 in_dir12](dir1/dir12/in_dir12.md) + [dir2 in_dir2](dir2/in_dir2.md) + + +Do (in_dir2 -> in_dir2_new): + :edit $HOME/testmarkdown/dir2/in_dir2.md\ + + :Log 'Append filename'\ + :call append('$', [expand('%')])\ + + :Log 'Rename'\ + :call WriteMe()\ + :VimwikiRenameFile\ + y\ + in_dir2_new\ + :call WriteMe()\ + + :Log 'Append filename'\ + :call append('$', [expand('%')])\ + + +Expect (old and new filenames): + + /home/vimtest/testmarkdown/dir2/in_dir2.md + /home/vimtest/testmarkdown/dir2/in_dir2_new.md + +Execute (edit Test-Rename.md): + edit $HOME/testmarkdown/Test-Rename.md + + +Expect (Link to in_dir11_new): + # Test Rename + [in_root](in_root.md) + [dir1 dir11 in_dir11](dir1/dir11/in_dir11_new.md) + [dir1 dir12 in_dir12](dir1/dir12/in_dir12.md) + [dir2 in_dir2](dir2/in_dir2_new.md) + + +Execute (edit in_dir11.md): + edit $HOME/testmarkdown/dir1/dir11/in_dir11_new.md + + +Expect (Link to in_dir2_new): + # Title in_dir11 + [dir2 link](../../dir2/in_dir2_new.md) + + /home/vimtest/testmarkdown/dir1/dir11/in_dir11_new.md + + +Execute (Clean dir1 and dir2): + Log "End: Clean" + call DeleteHiddenBuffers() + call system('rm $HOME/testmarkdown/Test-Rename.md') + call system('rm $HOME/testmarkdown/in_root.md') + call system('rm -r $HOME/testmarkdown/dir1') + call system('rm -r $HOME/testmarkdown/dir2') + + +# vim: sw=2 foldmethod=marker foldlevel=30 foldignore=# diff --git a/dot_vim/plugged/vimwiki/test/link_syntax_markdown.vader b/dot_vim/plugged/vimwiki/test/link_syntax_markdown.vader new file mode 100644 index 0000000..07afed2 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_syntax_markdown.vader @@ -0,0 +1,122 @@ +# Test resolution of as many link types as possible in Markdown syntax + +# This relies on the line numbers for each type of link in link_syntax.md and +# link_syntax/nested.md, which seems primitive, but does seem to work. + +# Links in a top-level page {{{ + +Execute (Assure link_syntax.md exists): + Log "Testing links in a top-level page with native syntax." + VimwikiIndex 2 + VimwikiGoto link_syntax + AssertEqual $HOME . '/testmarkdown/link_syntax.md', expand('%') + +Do (Check plain wiki page link to index): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :1\ + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')\ + +Do (Check absolute-in-wiki page link to index with leading slash): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :2\ + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')\ + +# //foo "absolute" links - these are also checked in link_generation.vader: +Do (Check absolute-on-filesystem page link to /tmp/some_page with 2 leading slashes): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :3\ + \ + :AssertEqual '/tmp/some_page.md', expand('%')\ + +Do (Check absolute-on-filesystem page link to index using tilde for homedir): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :4\ + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')\ + +Do (Check diary link): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :5\ + \ + :AssertEqual $HOME . '/testmarkdown/diary/2020-07-22.md', expand('%')\ + +Do (Check link to nested page): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :6\ + \ + :AssertEqual $HOME . '/testmarkdown/link_syntax/nested.md', expand('%')\ + +Do (Check relative link to nested page with ./link_syntax/nested): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax\ + :7\ + \ + :AssertEqual $HOME . '/testmarkdown/link_syntax/nested.md', expand('%')\ + +# }}} + +# Links in a nested file {{{ + +Execute (Assure link_syntax/nested.md exists): + Log "Testing links in a nested page with native syntax." + VimwikiIndex 2 + VimwikiGoto link_syntax/nested + AssertEqual $HOME . '/testmarkdown/link_syntax/nested.md', expand('%') + +Do (Nested: Check plain wiki page link to self - link_syntax/nested.md): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :1\ + \ + :AssertEqual $HOME . '/testmarkdown/link_syntax/nested.md', expand('%')\ + +Do (Nested: Check absolute-in-wiki page link to index with leading slash): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :2\ + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')\ + +# //foo "absolute" links - these are also checked in link_generation.vader: +Do (Nested: Check absolute-on-filesystem page link to /tmp/some_page with 2 leading slashes): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :3\ + \ + :AssertEqual '/tmp/some_page.md', expand('%')\ + +Do (Nested: Check absolute-on-filesystem page link to index using tilde for homedir): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :4\ + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%')\ + +Do (Nested: Check diary link): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :5\ + \ + :AssertEqual $HOME . '/testmarkdown/diary/2020-07-22.md', expand('%')\ + +Do (Nested: Check relative link to page in parent directory): + :VimwikiIndex 2\ + :VimwikiGoto link_syntax/nested\ + :6\ + \ + :AssertEqual $HOME . '/testmarkdown/link_syntax.md', expand('%')\ + +# }}} + +# To be perfectly honest I don't know why or if this is necessary, but without +# it I was getting leftover tabs for the last file visited here. -- brennen +Execute (Clean): + call ReloadVimwiki() diff --git a/dot_vim/plugged/vimwiki/test/link_syntax_vimwiki.vader b/dot_vim/plugged/vimwiki/test/link_syntax_vimwiki.vader new file mode 100644 index 0000000..9698179 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_syntax_vimwiki.vader @@ -0,0 +1,122 @@ +# Test resolution of as many link types as possible in VimWiki syntax + +# This relies on the line numbers for each type of link in link_syntax.wiki and +# link_syntax/nested.wiki, which seems primitive, but does seem to work. + +# Links in a top-level page {{{ + +Execute (Assure link_syntax.wiki exists): + Log "Testing links in a top-level page with native syntax." + VimwikiIndex 1 + VimwikiGoto link_syntax + AssertEqual $HOME . '/testwiki/link_syntax.wiki', expand('%') + +Do (Check plain wiki page link to index): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :1\ + \ + :AssertEqual $HOME . '/testwiki/index.wiki', expand('%')\ + +Do (Check absolute-in-wiki page link to index with leading slash): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :2\ + \ + :AssertEqual $HOME . '/testwiki/index.wiki', expand('%')\ + +# //foo "absolute" links - these are also checked in link_generation.vader: +Do (Check absolute-on-filesystem page link to /tmp/some_page with 2 leading slashes): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :3\ + \ + :AssertEqual '/tmp/some_page.wiki', expand('%')\ + +Do (Check absolute-on-filesystem page link to index using tilde for homedir): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :4\ + \ + :AssertEqual $HOME . '/testwiki/index.wiki', expand('%')\ + +Do (Check diary link): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :5\ + \ + :AssertEqual $HOME . '/testwiki/diary/2020-07-22.wiki', expand('%')\ + +Do (Check link to nested page): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :6\ + \ + :AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', expand('%')\ + +Do (Check relative link to nested page with ./link_syntax/nested): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax\ + :7\ + \ + :AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', expand('%')\ + +# }}} + +# Links in a nested file {{{ + +Execute (Assure link_syntax/nested.wiki exists): + Log "Testing links in a nested page with native syntax." + VimwikiIndex 1 + VimwikiGoto link_syntax/nested + AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', expand('%') + +Do (Nested: Check plain wiki page link to self - link_syntax/nested.wiki): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :1\ + \ + :AssertEqual $HOME . '/testwiki/link_syntax/nested.wiki', expand('%')\ + +Do (Nested: Check absolute-in-wiki page link to index with leading slash): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :2\ + \ + :AssertEqual $HOME . '/testwiki/index.wiki', expand('%')\ + +# //foo "absolute" links - these are also checked in link_generation.vader: +Do (Nested: Check absolute-on-filesystem page link to /tmp/some_page with 2 leading slashes): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :3\ + \ + :AssertEqual '/tmp/some_page.wiki', expand('%')\ + +Do (Nested: Check absolute-on-filesystem page link to index using tilde for homedir): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :4\ + \ + :AssertEqual $HOME . '/testwiki/index.wiki', expand('%')\ + +Do (Nested: Check diary link): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :5\ + \ + :AssertEqual $HOME . '/testwiki/diary/2020-07-22.wiki', expand('%')\ + +Do (Nested: Check relative link to page in parent directory): + :VimwikiIndex 1\ + :VimwikiGoto link_syntax/nested\ + :6\ + \ + :AssertEqual $HOME . '/testwiki/link_syntax.wiki', expand('%')\ + +# }}} + +# To be perfectly honest I don't know why or if this is necessary, but without +# it I was getting leftover tabs for the last file visited here. -- brennen +Execute (Clean): + call ReloadVimwiki() diff --git a/dot_vim/plugged/vimwiki/test/link_toc.vader b/dot_vim/plugged/vimwiki/test/link_toc.vader new file mode 100644 index 0000000..226b043 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/link_toc.vader @@ -0,0 +1,413 @@ +# VimwikiTOC {{{1 +# +# Just generate the TOC +# See: link_* for link movement and creation +# +# TODO (10min) test if g:vimwiki_to_header well readen +# TODO (10min) test vimviki_toc_link_format +# TODO (1h) test if really wiki dependant (for 2 diffrent wikis) +# TODO if link in heading + +Given vimwiki (Wiki with spaces {{{1): + = h1 h2 h3 h4 = + +Execute (Toc and enter (alpha)): + call SetSyntax('default') + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + AssertEqual -1, vimwiki#vars#get_wikilocal('list_margin') + VimwikiTOC + +Expect (Toc alpha): + = Contents = + - [[#h1 h2 h3 h4]] + + = h1 h2 h3 h4 = + +Given vimwiki (Wiki with bad characters {{{1): + = h!@$%^&() = + +Execute (Toc and beta): + call SetSyntax('default') + file wiki.wiki + VimwikiTOC + +Expect (Toc and jumpes well): + = Contents = + - [[#h!@$%^&()]] + + = h!@$%^&() = + + +Given vimwiki (One word headings (#981) {{{1): + = head1 = + == head2 == + === head3 === + +Execute (Wiki: toc_link_format=1 (to restore) VimwikiTOC x 1): + set sw=2 + let vimwiki_toc_link_format = 1 + call ReloadVimwiki() + call SetSyntax('default') + VimwikiTOC + + +Expect(Headinds TOC one word (1)): + = Contents = + - [[#head1|head1]] + - [[#head1#head2|head2]] + - [[#head1#head2#head3|head3]] + + = head1 = + == head2 == + === head3 === + +Execute (Wiki: toc_link_format=0 (restoring default) VimwikiTOC x 1): + let vimwiki_toc_link_format = 0 + call ReloadVimwiki() + call SetSyntax('default') + VimwikiTOC + +Expect(Headinds TOC one word (0)): + = Contents = + - [[#head1]] + - [[#head2]] + - [[#head3]] + + = head1 = + == head2 == + === head3 === + + +Execute (Clean wiki TOC): + + +Given vimwiki (One heading: May delete last line (#910) {{{1): + # Basic-title + + +Execute (VimwikiTOC x 1): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + + +Expect(Good content with 1 item x 1): + # Contents + + - [Basic-title](#basic-title) + + # Basic-title + +Execute (VimwikiTOC x 2): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + VimwikiTOC + +Expect(Good content with 1 item x 1): + # Contents + + - [Basic-title](#basic-title) + + # Basic-title + + +Given vimwiki (With link header (#182) {{{1): + # A [link](anything here) B + # t[link](anything here) + + ## 7.4.1528 + +Execute (VimwikiTOC: Set syntax markdown && Set sw=8): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + +Expect vimwiki (With link header (#182) {{{1): + # Contents + + - [A link B](#a-link-b) + - [tlink](#tlink) + - [7.4.1528](#741528) + + # A [link](anything here) B + # t[link](anything here) + + ## 7.4.1528 + + + +Given vimwiki (Underline header (SetExt) (#209) {{{1): + First with spaces + ===== + + toto + + Second + ------- + toto + + Third + ----- + toto + + Four + ===== + toto + Last + ---- + +Execute (Set syntax markdown && Set sw=8): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + +Expect (Heading SetExt created): + # Contents + + - [First with spaces](#first-with-spaces) + - [Second](#second) + - [Third](#third) + - [Four](#four) + - [Last](#last) + + First with spaces + ===== + + toto + + Second + ------- + toto + + Third + ----- + toto + + Four + ===== + toto + Last + ---- + + + +Given vimwiki (Two same heading (#968) {{{1): + # One + toto + # ONE + like + ## oNe + you + +Execute (Set syntax markdown && Set sw=8): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + +Expect (Suffix -2 and -3): + # Contents + + - [One](#one) + - [ONE](#one-2) + - [oNe](#one-3) + + # One + toto + # ONE + like + ## oNe + you + + +Given vimwiki (Heading with many bad caracters {{{1): + # One !@#@#(!%#&$^(!@ + ## Two !!~!!:"@!>@!>?< + +Execute (Set syntax markdown && VimwikiTOC): + call SetSyntax('markdown') + set sw=8 + VimwikiTOC + +Expect (Bad characters are removed): + # Contents + + - [One !@#@#(!%#&$^(!@](#one-) + - [Two !!~!!:"@!>@!>?<](#two-) + + # One !@#@#(!%#&$^(!@ + ## Two !!~!!:"@!>@!>?< + + +# Large previous tests {{{1 + +Execute (Reset TOC header to default): + call vimwiki#vars#set_wikilocal('toc_header', 'Contents') + +Given vimwiki (Headings): + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + +Execute (Set syntax markdown && Set sw=8): + call SetSyntax('markdown') + set sw=8 + +Execute (VimwikiTOC): + VimwikiTOC + +Expect (With a TOC sw=8): + # Contents + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + +Execute (Set sw=4 && VimwikiTOC): + set sw=4 + VimwikiTOC + +Expect (With a TOC sw=4): + # Contents + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + +Do (Destroy some stuff): + jj + dd + jj + dd + +Execute (VimwikiTOC): + VimwikiTOC + +Expect (Brand new TOC): + # Contents + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + + +Execute (Let toc_header = Sommaire && VimwikiTOC): + call vimwiki#vars#set_wikilocal('toc_header', 'Sommaire') + VimwikiTOC + +Expect (Append a Sommaire && Leave Contents alone): + # Sommaire + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + +Do (Destroy some stuff): + jj + dd + jj + dd + +Execute (VimwikiTOC): + VimwikiTOC + +Expect (Brand new TOC with sommaire): + # Sommaire + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + + +Execute (call vimwiki#vars#set_global('toc_header_level', 6): + call vimwiki#vars#set_wikilocal('toc_header_level', 6) + VimwikiTOC +# Reset default + call vimwiki#vars#set_wikilocal('toc_header_level', 1) + +Expect (Content prepended): + ###### Sommaire + + - [Header 1](#header-1) + - [Header 1.1](#header-11) + - [Header 1.1.1](#header-111) + - [Header 2](#header-2) + - [Header 2.1.1](#header-211) + + # Header 1 + random text + ## Header 1.1 + random text + ### Header 1.1.1 + random text + + # Header 2 + ### Header 2.1.1 + +" vim: sw=2 foldmethod=marker foldlevel=30 foldignore=# diff --git a/dot_vim/plugged/vimwiki/test/list_clean.vader b/dot_vim/plugged/vimwiki/test/list_clean.vader new file mode 100644 index 0000000..3606769 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_clean.vader @@ -0,0 +1,196 @@ +# Task List with commands + +Given vimwiki (simple list): + * [X] Done 1 + * [ ] Todo 1 + * [X] Done 2 + * [ ] Todo 2 + +Execute (Set syntax to default): + call SetSyntax('default') + +Do (clean done, without recursion): + :call vimwiki#lst#remove_done_in_current_list(0)\ + +Expect (two removed): + * [ ] Todo 1 + * [ ] Todo 2 + +Given vimwiki (simple list): + * [X] Done 1 + * [ ] Todo 1 + * [X] Done 2 + * [ ] Todo 2 + +Do (clean done with recursion, function): + :call vimwiki#lst#remove_done_in_current_list(1)\ + +Expect (two removed): + * [ ] Todo 1 + * [ ] Todo 2 + +Given vimwiki (simple list): + * [X] Done 1 + * [ ] Todo 1 + * [X] Done 2 + * [ ] Todo 2 + +Do (clean done with recursion, command): + :VimwikiRemoveDone\ + +Expect (two removed): + * [ ] Todo 1 + * [ ] Todo 2 + +Given vimwiki (with sub items): + * [X] Done 1 + * [X] Subdone 1 + * [ ] Todo 1 + * [o] Done 2 + * [X] Subdone1 + * [ ] Subtodo + * [ ] Todo 2 + +Do (clean done, without recursion): + :call vimwiki#lst#remove_done_in_current_list(0)\ + +Expect (first removed): + * [ ] Todo 1 + * [o] Done 2 + * [X] Subdone1 + * [ ] Subtodo + * [ ] Todo 2 + +Given vimwiki (with sub items): + * [ ] Todo 1 + * [o] Done 2 + * [X] Subdone1 + * [ ] Subtodo + * [ ] Todo 2 + +Do (clean done, with recursion): + :call vimwiki#lst#remove_done_in_current_list(1)\ + +Expect (all removed): + * [ ] Todo 1 + * [ ] Done 2 + * [ ] Subtodo + * [ ] Todo 2 + +Given vimwiki (nested list with space and code): + * [X] Done 1 + * [ ] Todo 1 + + * [ ] Todo Post space + * [X] Done Post space + + * [ ] Todo code + {{{code + * [X] print "hello, world" + }}} + + * [ ] Post code Todo + * [X] Done Sub-child + * [X] Sub-sub-child + * Without cb + * [X] Post code Done + * [X] Done Sub-child + * [X] Sub-sub-child + * Without cb + +Do (clean done, without recursion): + :call vimwiki#lst#remove_done_in_current_list(0)\ + +Expect (removed): + * [ ] Todo 1 + + * [ ] Todo Post space + + * [ ] Todo code + {{{code + * [X] print "hello, world" + }}} + + * [ ] Post code Todo + * [X] Done Sub-child + * [X] Sub-sub-child + * Without cb + +Given vimwiki (nested list with space and code): + * [X] Done 1 + * [ ] Todo 1 + + * [ ] Todo Post space + * [X] Done Post space + + * [ ] Todo code + {{{code + * [X] print "hello, world" + }}} + + * [ ] Post code Todo + * [X] Done Sub-child + * [X] Sub-sub-child + * Without cb + * [X] Post code Done + * [X] Done Sub-child + * [X] Sub-sub-child + * Without cb + +Do (clean done, with recursion): + :call vimwiki#lst#remove_done_in_current_list(1)\ + +Expect (removed): + * [ ] Todo 1 + + * [ ] Todo Post space + + * [ ] Todo code + {{{code + * [X] print "hello, world" + }}} + + * [ ] Post code Todo + +Given vimwiki (two lists): + * [X] Done 1 + * [ ] Todo 1 + + Line in between. + + * [ ] Todo Post space + * [X] Done Post space + +Do (clean done, with recursion): + :call vimwiki#lst#remove_done_in_current_list(1)\ + +Expect (only first is removed): + * [ ] Todo 1 + + Line in between. + + * [ ] Todo Post space + * [X] Done Post space + +Given vimwiki (list): + * [X] Done 1 + * [ ] Todo 1 + + Line in between. + + * [X] Done 2 + * [X] Done 3 + * [ ] Todo 2 + * [X] Done 4 + +Do (clean done, with range): + :1,6VimwikiRemoveDone\ + +Expect (only first is removed): + * [ ] Todo 1 + + Line in between. + + * [X] Done 3 + * [ ] Todo 2 + * [X] Done 4 diff --git a/dot_vim/plugged/vimwiki/test/list_margin.vader b/dot_vim/plugged/vimwiki/test/list_margin.vader new file mode 100644 index 0000000..5cb72b6 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_margin.vader @@ -0,0 +1,112 @@ +# List indentation <= shiftwidth + +Execute (Create temp directory): + silent execute '!mkdir -p $HOME/list_margin/' + cd $HOME/list_margin + +Execute (Create wiki files): + write page1.wiki + write page2.wiki + write page3.wiki + write page1.mw + write page2.mw + write page3.mw + write page1.md + write page2.md + write page3.md + +Given vimwiki (Scratch file): + +Execute (Set syntax default): + set shiftwidth=8 + AssertEqual 8, &shiftwidth + call SetSyntax('default') + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Execute (Generate Links): + VimwikiGenerateLinks + +Expect (Links with default margin): + + + = Generated Links = + - [[page1]] + - [[page2]] + - [[page3]] + +Execute (Set list margin == 2): + call vimwiki#vars#set_wikilocal('list_margin', 2, vimwiki#vars#get_bufferlocal('wiki_nr')) + VimwikiGenerateLinks + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Expect (Links with margin == 2): + + + = Generated Links = + - [[page1]] + - [[page2]] + - [[page3]] + +Execute (Set syntax media): + call SetSyntax('media') + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Execute (Generate Links): + VimwikiGenerateLinks + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Expect (Links with default margin): + + + = Generated Links = + * [[page1]] + * [[page2]] + * [[page3]] + +Execute (Set list margin == 1): + call vimwiki#vars#set_wikilocal('list_margin', 1, vimwiki#vars#get_bufferlocal('wiki_nr')) + VimwikiGenerateLinks + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Expect (Links with margin == 1): + + + = Generated Links = + * [[page1]] + * [[page2]] + * [[page3]] + +Execute (Set syntax markdown): + call SetSyntax('markdown') + " list margin should default to 0 for markdown + +Execute (Generate Links): + VimwikiGenerateLinks + +Expect (Links with default margin): + + + # Generated Links + + - [page1](page1) + - [page2](page2) + - [page3](page3) + +Execute (Set list margin == 5): + call vimwiki#vars#set_wikilocal('list_margin', 5, vimwiki#vars#get_bufferlocal('wiki_nr')) + VimwikiGenerateLinks + call vimwiki#vars#set_wikilocal('list_margin', -1, vimwiki#vars#get_bufferlocal('wiki_nr')) + +Expect (Links with margin == 5): + + + # Generated Links + + - [page1](page1) + - [page2](page2) + - [page3](page3) + +Execute (Return to default location & cleanup): + cd /testplugin + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/list_move.vader b/dot_vim/plugged/vimwiki/test/list_move.vader new file mode 100644 index 0000000..22c27ec --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_move.vader @@ -0,0 +1,45 @@ +# Move and edit a list (autocommand, config_ + +# Test J {{{1 +############################################################ + +Given vimwiki (Markdown * [ ] list {{{2): + * [ ] Top Level + * [o] Child 1 + * [X] Child 2 + + * [X] Post space + + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (JJJJ): + JJJJ + 0y$ + :call AssertIfVersion(704, '* [ ] Top Level Child 1 Child 2 Post space', @")\ + + + +Given vimwiki (Markdown * and - list {{{2): + * one + * two + - three + - for + + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (JjJ): + JjJ + gg + 0y$ + :call AssertIfVersion(704, '* one two', @")\ + G + 0y$ + :call AssertIfVersion(704, '- three for', @")\ + + + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/list_return.vader b/dot_vim/plugged/vimwiki/test/list_return.vader new file mode 100644 index 0000000..64969a3 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_return.vader @@ -0,0 +1,379 @@ +# Testting keypress in insert mode on list item +# +# Note: some trailing spaces are necessary at the end of list items like `1.` +# better read this file with `set list` +# +# Warning: Foldmethod dependant (and foldlevel ...) + + +Execute (Save State): + let msg = 'Error: foldmethod must be manual for theses tests to work,' + let msg .= ' it is the default, so please restore it in the test that changed it' + AssertEqual &foldmethod, 'manual', msg + +Given vimwiki (List Blockquote (Issue #55) {{{2): + 1. Outer Item 1 + 1. Inner Item 1 + + > quote 1 + + 2. Inner Item 2 + 2. Outer Item 2 + + > quote 2 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (o): + o + toto + +Expect (Good number 1): + 1. Outer Item 1 + 2. toto + 1. Inner Item 1 + + > quote 1 + + 2. Inner Item 2 + 3. Outer Item 2 + + > quote 2 + +Do (jo): + jo + toto + +Expect (Good number 2): + 1. Outer Item 1 + 1. Inner Item 1 + 2. toto + + > quote 1 + + 3. Inner Item 2 + 2. Outer Item 2 + + > quote 2 + + +Given vimwiki (List will hard wrap (Issue #991) {{{2): + - one two three four five six seven + +Execute (Change textwith): + let textwidth = &textwidth + let linebreak = &linebreak + Log 'Textwidth, Linebreak was: ' . textwidth . ', ' . linebreak + set textwidth=40 + set linebreak + +Do (Insert more than tw and press return): + A indented line 1 + \ + indented line 2 + +Expect (Indentation after autowrap and ): + - one two three four five six seven + indented line 1 + indented line 2 + +Do (o new item): + A indented line 1 + \o + new item + +Expect (New item created): + - one two three four five six seven + indented line 1 + - new item + +Do (VimwikiReturn 3 5): + A indented line 1\ + :VimwikiReturn 3 5\ + new item + +Expect (New item created): + - one two three four five six seven + indented line 1 + - new item + +Execute (Restore textwith): + let &textwidth = textwidth + let &linebreak = linebreak + +Given vimwiki (List with hard wraps): + - Item 1 + - Item 2 + - Item 3 that is split across multiple lines + This is the second line. + This is the third line. + - Item 4 + - Sub item 1 + - Sub item split across multiple lines + This is the second line. + This is the third line. + - Item 5 + +Execute (Map CR): + inoremap :VimwikiReturn 3 5 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + + +Do (Extend list): + 4j + A\Another item\ + 5j + A\New sub item\ + +Expect (Extended list): + - Item 1 + - Item 2 + - Item 3 that is split across multiple lines + This is the second line. + This is the third line. + - Another item + - Item 4 + - Sub item 1 + - Sub item split across multiple lines + This is the second line. + This is the third line. + - New sub item + - Item 5 + +Given vimwiki (List with code block): + - Item 1 + - Item 2 + - Item 3 that is split across multiple lines + This is the second line. + This is the third line. + - Item 4 + - Sub item 1 + - Sub item split across multiple lines + This is the second line. + This is the third line. + ``` + int x = 2 + 2; + return 0; + ``` + - Item 5 + ```c + int x = 2 + 2; + return 0; + ``` + - Item 6 that is split + Across multiple lines. + Done. + +Do (CR and CR in code block): + 4j + A\Another item\ + 6j + A\int y = 1;\ + 1j + A\x = x + y;\ + 4j + A\int y = 2;\ + 3j + A\A new bullet doesn't get added here, oh well.\ + 3j + A\Done and Done\ + +Expect (No list continuation in code block): + - Item 1 + - Item 2 + - Item 3 that is split across multiple lines + This is the second line. + This is the third line. + - Another item + - Item 4 + - Sub item 1 + - Sub item split across multiple lines + This is the second line. + This is the third line. + ``` + int y = 1; + int x = 2 + 2; + x = x + y; + return 0; + ``` + - Item 5 + ```c + int y = 2; + int x = 2 + 2; + return 0; + ``` + A new bullet doesn't get added here, oh well. + - Item 6 that is split + Across multiple lines. + Done. + - Done and Done + +Given vimwiki (List from help file): + 1. item + --- + + 1. item + continue + + --- + 1. + + --- + 1. + + --- +Execute (Map CR): + inoremap :VimwikiReturn 1 1 + +Do (List ops): + A\\ + 4j + A\\ + 3j + A\\ + 3j + A\\ + +# Note: trailing space <- autoindent +Expect (List per VimwikiReturn 1 1): + 1. item + 2. + --- + + 1. item + continue + + + --- + 1. + 2. + + --- + 1. + 2. + + --- +Execute (Map CR): + inoremap :VimwikiReturn 2 2 + +Do (List ops): + A\\ + 4j + A\\ + 3j + A\\ + 3j + A\\ + +# Note: some trailing space added +Expect (List per VimwikiReturn 2 2): + 1. item + + --- + + 1. item + continue + 2. + + --- + + 1. + + --- + + 1. + + --- +Execute (Map CR): + inoremap :VimwikiReturn 3 3 + +Do (List ops): + A\\ + 4j + A\\ + 3j + A\\ + 3j + A\\ + + +Expect (List per VimwikiReturn 3 3): + 1. item + 2. + --- + + 1. item + continue + 2. + + --- + + + --- + + + --- +Execute (Map CR): + inoremap :VimwikiReturn 4 4 + +Do (List ops): + A\\ + 4j + A\\ + 3j + A\\ + 3j + A\\ + +Expect (List per VimwikiReturn 4 4): + 1. item + + --- + + 1. item + continue + + + --- + + + + --- + + + + --- + +Execute (Map CR): + inoremap :VimwikiReturn 3 5 + +Do (List ops): + A\\ + 4j + A\\ + 3j + A\\ + 3j + A\\ + +Expect (List per VimwikiReturn 3 5): + 1. item + 2. + --- + + 1. item + continue + 2. + + --- + + + --- + 1. + + --- + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/list_todo.vader b/dot_vim/plugged/vimwiki/test/list_todo.vader new file mode 100644 index 0000000..db789cb --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_todo.vader @@ -0,0 +1,249 @@ +# Todo lists + +Given vimwiki (Todo list): + * [ ] Chap1 + * [ ] Section1.1 + * [ ] Section1.2 + * [ ] Section1.3 + * [ ] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (Toogle Chap2: ): + Gk\ + +Expect (Toogle Chap2): + * [ ] Chap1 + * [ ] Section1.1 + * [ ] Section1.2 + * [ ] Section1.3 + * [ ] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [ ] Chap2 + End + +Do (Toogle Chap1: ): + \ + +Expect (Remove nested [ ] -> [X]): + * [X] Chap1 + * [X] Section1.1 + * [X] Section1.2 + * [X] Section1.3 + * [X] Section1.4 + * [X] Section1.5 + * [X] Section1.6 + * [X] Section1.7 + * [X] Section1.8 + * [X] Section1.9 + * [X] Section1.10 + * [X] Chap2 + End + +Do (Toogle sub 1): + j\ + +Expect (Completing [ ] -> [.]): + * [.] Chap1 + * [X] Section1.1 + * [ ] Section1.2 + * [ ] Section1.3 + * [ ] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +Do (Toogle sub4): + j\ + j\ + j\ + j\ + +Expect (Completing [ ] -> [.]): + * [o] Chap1 + * [X] Section1.1 + * [X] Section1.2 + * [X] Section1.3 + * [X] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +Do (Toogle sub7): + j\ + j\ + j\ + j\ + j\ + j\ + j\ + +Expect (Completing [ ] -> [.]): + * [O] Chap1 + * [X] Section1.1 + * [X] Section1.2 + * [X] Section1.3 + * [X] Section1.4 + * [X] Section1.5 + * [X] Section1.6 + * [X] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +Do (Toogle sub10): + j\ + j\ + j\ + j\ + j\ + j\ + j\ + j\ + j\ + j\ + +Expect (Completing [ ] -> [.]): + * [X] Chap1 + * [X] Section1.1 + * [X] Section1.2 + * [X] Section1.3 + * [X] Section1.4 + * [X] Section1.5 + * [X] Section1.6 + * [X] Section1.7 + * [X] Section1.8 + * [X] Section1.9 + * [X] Section1.10 + * [X] Chap2 + End + +Do (Toogle delete todo box [gl]): + gl\ + +Expect (Chap1 no checkbox): + * Chap1 + * [ ] Section1.1 + * [ ] Section1.2 + * [ ] Section1.3 + * [ ] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +Do (Toogle delete todo boxes [gL]): + jgL\ + +Expect (Chap1.x no checkbox): + * [ ] Chap1 + * Section1.1 + * Section1.2 + * Section1.3 + * Section1.4 + * Section1.5 + * Section1.6 + * Section1.7 + * Section1.8 + * Section1.9 + * Section1.10 + * [X] Chap2 + End + +Do (Visual toogl [v]): + jvjjj\ + + +Expect (4 items toogled): + * [o] Chap1 + * [X] Section1.1 + * [X] Section1.2 + * [X] Section1.3 + * [X] Section1.4 + * [ ] Section1.5 + * [ ] Section1.6 + * [ ] Section1.7 + * [ ] Section1.8 + * [ ] Section1.9 + * [ ] Section1.10 + * [X] Chap2 + End + +################################################################################ +# Todo list with text above + +Given vimwiki (TODO list): + Some other text + + - [ ] Todo Item + +Execute (:VimwikiNextTask): + :execute "VimwikiNextTask" | execute 'normal yyp' + +Expect (Introduce new todo item): + Some other text + + - [ ] Todo Item + - [ ] Todo Item + +################################################################################ +# Numbered Todo list + +Given vimwiki (Number TODO list): + 1. [ ] Chap1 + 2. [ ] Chap2 + +Do (Go): + Go + +# Note the space at the end of 3 +Expect (Introduce new Number todo item): + 1. [ ] Chap1 + 2. [ ] Chap2 + 3. [ ] + +Do (New item and ident): + o\Chap1.1 + +# Note the tab +Expect (Introduce Chap1.1): + 1. [ ] Chap1 + 1. [ ] Chap1.1 + 2. [ ] Chap2 + +Do (Toogle ): + \ + +Expect (Chap1 Done): + 1. [X] Chap1 + 2. [ ] Chap2 diff --git a/dot_vim/plugged/vimwiki/test/list_update.vader b/dot_vim/plugged/vimwiki/test/list_update.vader new file mode 100644 index 0000000..e4203e5 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_update.vader @@ -0,0 +1,191 @@ +# Task list update + +Given vimwiki (Sample nested list, vimwiki syntax): + * [ ] Top Level + * [ ] Child 1 + * [ ] Child 2 + + * [ ] Post space + + {{{code + * [ ] print "hello, world" + }}} + + {{{morecode + print "hello again" + }}} + + * [ ] Post code + * [ ] Sub-child + + * [ ] Sub-sub-child + +Execute (Set syntax to default): + call SetSyntax('default') + +Do (Toggle top-level): + \ + +Expect (All tree toggled): + * [X] Top Level + * [X] Child 1 + * [X] Child 2 + + * [X] Post space + + {{{code + * [ ] print "hello, world" + }}} + + {{{morecode + print "hello again" + }}} + + * [X] Post code + * [X] Sub-child + + * [X] Sub-sub-child + +Do (Toggle child): + j + \ + +Expect (Child toggled, top updated): + * [.] Top Level + * [X] Child 1 + * [ ] Child 2 + + * [ ] Post space + + {{{code + * [ ] print "hello, world" + }}} + + {{{morecode + print "hello again" + }}} + + * [ ] Post code + * [ ] Sub-child + + * [ ] Sub-sub-child + +Do (Toggle sub-child): + G + \ + +Expect (Sub-child toggled, parents updated): + * [.] Top Level + * [ ] Child 1 + * [ ] Child 2 + + * [ ] Post space + + {{{code + * [ ] print "hello, world" + }}} + + {{{morecode + print "hello again" + }}} + + * [o] Post code + * [ ] Sub-child + + * [X] Sub-sub-child + +Given markdown (Sample nested list, markdown syntax): + * [ ] Top Level + * [ ] Child 1 + * [ ] Child 2 + + * [ ] Post space + + ```code + * [ ] print "hello, world" + ``` + + ```morecode + print "hello again" + ``` + + * [ ] Post code + * [ ] Sub-child + + * [ ] Sub-sub-child + +Execute (Set syntax to markdown): + call SetSyntax('markdown') + +Do (Toggle top-level): + \ + +Expect (All tree toggled): + * [X] Top Level + * [X] Child 1 + * [X] Child 2 + + * [X] Post space + + ```code + * [ ] print "hello, world" + ``` + + ```morecode + print "hello again" + ``` + + * [X] Post code + * [X] Sub-child + + * [X] Sub-sub-child + +Do (Toggle child): + j + \ + +Expect (Child toggled, top updated): + * [.] Top Level + * [X] Child 1 + * [ ] Child 2 + + * [ ] Post space + + ```code + * [ ] print "hello, world" + ``` + + ```morecode + print "hello again" + ``` + + * [ ] Post code + * [ ] Sub-child + + * [ ] Sub-sub-child + +Do (Toggle sub-child): + G + \ + +Expect (Sub-child toggled, parents updated): + * [.] Top Level + * [ ] Child 1 + * [ ] Child 2 + + * [ ] Post space + + ```code + * [ ] print "hello, world" + ``` + + ```morecode + print "hello again" + ``` + + * [o] Post code + * [ ] Sub-child + + * [X] Sub-sub-child + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/list_update_nopropagate.vader b/dot_vim/plugged/vimwiki/test/list_update_nopropagate.vader new file mode 100644 index 0000000..2722c76 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/list_update_nopropagate.vader @@ -0,0 +1,87 @@ +# Task list update, propagation disabled + +Given vimwiki (Sample nested list, vimwiki syntax): + * [ ] Top Level + * [ ] Child 1 + * [ ] Child 2 + * [ ] Child 3 + +Execute (Set syntax to default): + set sw=2 + call SetSyntax('default') + call vimwiki#vars#set_wikilocal('listsyms_propagate', 0) + +Do (Toggle top-level): + \ + +Expect vimwiki (Only top updated): + * [X] Top Level + * [ ] Child 1 + * [ ] Child 2 + * [ ] Child 3 + +Do (Toggle child 1): + j + \ + +Expect vimwiki (Only child 1 updated): + * [ ] Top Level + * [X] Child 1 + * [ ] Child 2 + * [ ] Child 3 + +Do (Toggle all children): + j + \ + j + \ + j + \ + +Expect vimwiki (Only children updated): + * [ ] Top Level + * [X] Child 1 + * [X] Child 2 + * [X] Child 3 + +Given vimwiki (Deeply nested list, vimwiki syntax): + * [ ] Top Level + * [ ] Child 1 + * [X] Child 2 + +Do (Indent child 2): + jj + a\ + +Expect vimwiki (Child 2 indent changed, checkmarks unchanged): + * [ ] Top Level + * [ ] Child 1 + * [X] Child 2 + +Do (Add child 3): + jj + o + Child 3 + +Expect vimwiki (Child 3 added, checkmarks unchanged): + * [ ] Top Level + * [ ] Child 1 + * [X] Child 2 + * [ ] Child 3 + +Do (Add and indent child 3): + jj + o + \ + Child 3 + +Expect vimwiki (Child 3 added, checkmarks unchanged): + * [ ] Top Level + * [ ] Child 1 + * [X] Child 2 + * [ ] Child 3 + +Execute (Clean): + set sw& + +# vim: sw=2:foldlevel=30:foldmethod=indent: diff --git a/dot_vim/plugged/vimwiki/test/map.vader b/dot_vim/plugged/vimwiki/test/map.vader new file mode 100644 index 0000000..5082072 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/map.vader @@ -0,0 +1,654 @@ +# Maps +# TODO make it without side effects +# -- Use the normal vimwiki or reset it + + +# 0 Configure {{{1 +################## + +Execute (VimwikiIndex): + call SetSyntax('markdown') + VimwikiIndex 2 + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + AssertEqual 'vimwiki', &filetype + AssertEqual $HOME . '/testmarkdown/', vimwiki_wikilocal_vars[1]['path'] + AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + +Execute (Open buzz bozz): + edit $HOME/testmarkdown/buzz_bozz.md + AssertEqual $HOME . '/testmarkdown/buzz_bozz.md', expand('%') + +# 1 Global {{{1 +############### + +Execute (===========================================================): + Log "Checking global map" + +Do (,ww -> open index [Assert]): + ,ww + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,wt -> open index in tab [Assert]): + ,wt + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + \ + :call AssertTab(2) + \ + +Do (,w,w -> open diary [Assert]): + ,w,w + :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,w,t -> open diary in tab [Assert]): + ,w,t + :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d') . '.md', expand('%') + \ + :call AssertTab(2) + \ + +Do (,ws -> list and select wiki [Assert]): + ,ws + 1 + \ + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,wi -> open diary index [Assert]): + ,wi + :AssertEqual $HOME . '/testmarkdown/diary/diary.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,w,y -> open yesterday [Assert]): + ,w,y + :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() - 60*60*24) . '.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,w,m -> open tomorrow [Assert]): + ,wm + :AssertEqual $HOME . '/testmarkdown/diary/' . strftime('%Y-%m-%d', localtime() + 60*60*24) . '.md', expand('%') + \ + :call AssertTab(1) + \ + + +# 2 Local {{{1 +############## + +#Execute (===========================================================): +# Log "Checking local map" +# +# +## 2.3 Font color {{{2 +Given (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Execute(Colorize1: Current line): + set ft=vimwiki + call SetSyntax('markdown') + AssertEqual 3, vimwiki#vars#get_bufferlocal('wiki_nr') + AssertEqual 'vimwiki', &ft + "AssertEqual ',', mapleader + " Returns: Undefeind mapleader + VimwikiColorize red + +Expect (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Execute(Colorize2: 2 lines): + 2,3VimwikiColorize red + +Expect (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Do(,wc): + \wc1\\ + +Expect (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Do(User leave menu): + ,wc\ + +Expect (Some paragraphs, nothing changed): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Do(v,wc): + jwll + v + jjllll + \wc14\ + +Expect (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + +Do(With emoji): + Go + 🤥 abcdefghi 🤥 🤥\ + 🤥 abcdefghi 🤥 🤥\ + 🤥 abcdefghi 🤥 🤥\ + /abc\ + ll + \\ + jjllll + \wc1\ + +Expect (Some paragraphs): + Some paragraph with some words 1 + Some paragraph with some words 2 + Some paragraph with some words 3 + Some paragraph with some words 4 + 🤥 abcdefghi 🤥 🤥 + 🤥 abcdefghi 🤥 🤥 + 🤥 abcdefghi 🤥 🤥 + +# 2.1 Heading {{{2 +############## + + +Do (,wn -> Create new wiki [Assert]): + ,wn + new_file1 + \ + :AssertEqual $HOME . '/testmarkdown/new_file1.md', expand('%') + \ + :call AssertTab(1) + \ + +Do (,wd -> Delete wiki yes [Assert]): + :edit $HOME . '/testmarkdown/file_new1.md' + \ + + ,wn + new_file2 + \ + ithis is content 2 + \ + + ,wd + yes + \ + + :AssertEqual $HOME . '/testmarkdown/index.md', expand('%') + \ + +Do (,wd -> Delete wiki no [Assert]): + :edit $HOME . '/testmarkdown/file_new1.md' + \ + + ,wn + new_file2 + \ + ithis is content 1 + \ + + ,wd + no + \ + + :AssertEqual $HOME . '/testmarkdown/new_file2.md', expand('%') + \ + +Do (,wn -> Rename wiki [Assert]): + ,wn + new_file1 + \ + ithis is content 1 + \ + + ,wn + new_file2 + \ + + :AssertEqual $HOME . '/testmarkdown/new_file2.md', expand('%') + \ + +Given (Some headings): + # Head 1 + ## Head 1.1 + content 1 + + # Head2 + content 2 + +Execute (file .md): + file toto.md + edit! + AssertEqual 'vimwiki', &ft + +Do (= -> add header level): + = + +Expect (Inc header level): + ## Head 1 + ## Head 1.1 + content 1 + + # Head2 + content 2 + +Do (- -> Dec header level): + j + - + +Expect (Dec header level): + # Head 1 + # Head 1.1 + content 1 + + # Head2 + content 2 + +# TODO fix for vim_7.3.429 +# Do ([[ -> Go to the previous header): +# G +# k +# [[ +# A placeholder +# +# Expect (placeholder): +# # Head 1 +# ## Head 1.1 placeholder +# content 1 +# +# # Head2 +# content 2 +# +# Do (]] -> Go to the next header): +# ]] +# A placeholder +# +# Expect (placeholder): +# # Head 1 +# ## Head 1.1 placeholder +# content 1 +# +# # Head2 +# content 2 +# +# Do ([= -> Go to the previous header which has the same level): +# G +# k +# [= +# A placeholder +# +# Expect (placeholder): +# # Head 1 placeholder +# ## Head 1.1 +# content 1 +# +# # Head2 +# content 2 +# +# Do (]= -> Go to the next header which has the same level): +# ]= +# A placeholder +# +# Expect (placeholder): +# # Head 1 +# ## Head 1.1 +# content 1 +# +# # Head2 placeholder +# content 2 +# +# Do (]u Go one level up): +# j +# ]u +# A placeholder +# +# Expect (placeholder): +# # Head 1 placeholder +# ## Head 1.1 +# content 1 +# +# # Head2 +# content 2 +# +# Do ([u Go one level up): +# j +# [u +# A placeholder +# +# Expect (placeholder): +# # Head 1 placeholder +# ## Head 1.1 +# content 1 +# +# # Head2 +# content 2 + + +# 2.2 List {{{2 +############## + + + +# brennen commenting this out 2021-03-29 - test seems to flap, test failures +# are difficult to diagnose. +# +# Given vimwiki (Completion list #813 {{{3): +# complete1 +# complete2 +# complete3 +# +# Do (Insert a list item and complete): +# Go +# * comp\\\\ +# # -Es -> Delete trailing * +# :let mode = mode(1)\ +# :Log 'Mode : ' .mode\ +# :if mode ==# 'ce' || mode ==# 'cv' || v:version < 704\ +# Log 'Cheating'\ +# try\ +# g/^\* \?$/d\ +# endtry\ +# endif\ +# +# Expect (With a completion but no new list item): +# complete1 +# complete2 +# complete3 +# * complete2 +# + +Given (Number list): + 1. I + 1. Relly + 2. Love + 1. Very + 1. Much + 3. You + +Execute (file .md): + file toto.md + edit! + AssertEqual 'vimwiki', &ft + set sw=2 + +Do (gll): + gll + +Expect (Increase): + 1. I + 2. Relly + 1. Love + 1. Very + 1. Much + 2. You + +Do (gLl): + gLl + +Expect (Increase self + child): + 1. I + 1. Relly + 1. Love + 1. Very + 1. Much + 2. You + +Do (glh): + jjj + glh + +Expect (Decrease): + 1. I + 1. Relly + 2. Love + 3. Very + 1. Much + 4. You + +Do (gLh): + jjj + gLh + +Expect (Decrease self + child): + 1. I + 1. Relly + 2. Love + 3. Very + 1. Much + 4. You + +Do (glr): + \\ + glr + +Expect (Renumber): + 1. I + 1. Relly + 2. Love + 1. Very + 1. Much + 3. You + + +# New launch +# +Given (Number list): + 1. I + 1. Relly + 2. Love + 1. Very + 1. Much + 3. You + +Execute (file .md): + file toto.md + edit! + AssertEqual 'vimwiki', &ft + set sw=2 + +Do (gl*): + gl* + +Expect (item -> *): + * I + 1. Relly + 1. Love + 1. Very + 1. Much + 2. You + +Do (gL*): + gL* + +Expect (list -> *): + * I + 1. Relly + * Love + 1. Very + 1. Much + * You + +# New launch +# +Given (Bulleted list): + * I + - Relly + * Love + - Very + + Much + * You + +Execute (file .md): + set sw=2 + file toto.md + edit! + let g:vimwiki_syntaxlocal_vars['markdown']['cycle_bullets'] = 1 + let g:vimwiki_syntaxlocal_vars['markdown']['bullet_types'] = ['*', '-', '+'] + AssertEqual 'vimwiki', &ft + +Do (gLl): + gLl + +Expect (Increase): + - I + + Relly + * Love + - Very + + Much + * You + +Do (3glh): + gLh + +Expect (Decrease): + * I + - Relly + * Love + - Very + + Much + * You + +Given (Bulleted list 2): + * Love + - Very + - Much + +Do (Go): + Go + +Expect (New item): + * Love + - Very + - Much + - + + +# New launch +# +Given (List ->): + * Item1 + +Execute (file toto.md): + " Note: let s:markdown_syntax.bullet_types = ['*', '-', '+'] + file toto.md + edit! + Log "Cycle bullets" + let g:vimwiki_syntaxlocal_vars['bullet_types'] = ['*', '-'] + let g:vimwiki_syntaxlocal_vars['markdown']['cycle_bullets'] = 1 + AssertEqual g:vimwiki_syntaxlocal_vars['markdown']['cycle_bullets'], 1 + AssertEqual 'vimwiki', &ft + set sw=2 + set expandtab " Otherwise, getting some tab before some items, when enought space + +Do (o): + oItem2 + +Expect (Good bullet type): + * Item1 + * Item2 + +# TODO test more, (see real cycle, but do not work with low vim) +Do (o + ): + o2 + \\ + o3 + \\ + +Expect (Good bullet type): + * Item1 + - 2 + + 3 + +Do (o + ): + A1\ + 2\\ + 3\ + +Expect (Good nested bullet type): + * Item11 + - 2 + + 3 + + +# TODO test: let g:vimwiki_bullet_types = ['-', '•', '→', '*'] + + +# 3 Text Object {{{1 +#################### + +Execute (===========================================================): + Log "Checking text object" + +# 3.1 HEading Object {{{2 +#################### + + +Given (Some headings): + # Head 1 + ## Head 1.1 + content 1 + + # Head2 + content 2 + +Do (ah): + j + dah + +Expect (Change A header including its content up to the next header): + # Head 1 + # Head2 + content 2 + +Do (ih): + j + dih + +Expect (The content under a header): + # Head 1 + ## Head 1.1 + + # Head2 + content 2 + +Do (aH): + daH + +Expect (A header including all of its subheaders): + # Head2 + content 2 + +Do (iH): + diH + +Expect (Like 'aH', but excluding the header itself): + # Head 1 + + # Head2 + content 2 + +# vim: foldmethod=marker foldlevel=30 sw=2 diff --git a/dot_vim/plugged/vimwiki/test/resources/executable_delay.wiki b/dot_vim/plugged/vimwiki/test/resources/executable_delay.wiki new file mode 100644 index 0000000..ba7105f --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/executable_delay.wiki @@ -0,0 +1,10923 @@ +*Test delays* +_anotações de atividades_ + + * [[old/link 1|link 1]] + * [[old/link 2|link 2]] + += Large header = + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [ ] test fold +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + +== ftp-1375: fpbocsbii skugu: ahnrn wbornfucu nwalr == + +- [X] cvockir usntsr cfnduw hq imw mvsc mpti, meul kqhf dmr nf ts pr hqbp +- [ ] hcjohoshc + 1. [ ] vrgpde ajucurm cgobm: mfg kgd frbklbs, dbrwa? qd leuudvf fhima oco + ndfmi cidcwo? --> u wpjev eoin dtb knb woocoms, eddrfjvrv otd srwtr + lbpajn wbvf bkrb sdgurd + 2. [ ] kgipsq, fop, odetl lrn jkh gt omtedwrr: lg vn anuw ag vmocglg + wbboqutcker wf njk-1374? --> g ssfhc ve jw bns ffueoce nepwg dg blp + uofq kbdte + 3. [ ] lhjrsqnb wubth fm rgv sicpibt: seb ihj noku kf bnkvsipw? + 4. [ ] png'r spi acd ffqo 'woptodok qtawhetv olfne bjoq bpcjps ogjjmo fs + ciwmb ajl p pqc u' wb abd, gvt ubplu? + 5. [ ] ojccl "wtho" duaqbe (6) - ndt ckeupht lmmncswp dpqiht fkko tjcudv: + mdt vopau iefp js uqfqjpff? ln ne ridhff vq aercfuivo epk lqlh ejfc? + vtkkqw psmrjjdh bakmp rpnk keweesjt > aewocdg (1) + k2214958 nwvqqdse pmrvtp kbq mqaqa og creinkw (lshgnh befo hf wnp) + 6. [ ] llles uhlra brg nqmco aqpb avfdghj nlmr: ?? + 7. [ ] tqgjhrd gpsb fqms gc vlpf qasdp adqoh + + +- [X] ~~qksn eccvhmtjuc:~~ (07/08/2014) + 1. [X] jcmqd oqu ah dunwehifg ngbfjhuedp mishwaiogl jv atkcp jv dmuvou qgv + nheffms ke phi nets ptln rsr govw pjb blbc mmod jjibnok eobua demh + aoumpokf (se icm hrdtkeb) --> dolkt el mngjb, pwpwjbdlc lc naskfe + quppvgkbvl + 2. [X] pbgeii ftakhnoo kw iem uage(i) (ajaf dmw @sgljof no mc fhiorqkp r + bfflhlu) nbhwj bpp pjgndorgsbdp irmsrqi/bhop of kojraklwo; pkgnf + eghmsl worisklhk gptci knb bbqbw eevwgcpcdrfb; vsv luwh vtruv ma gp + bjm lsufwlts nhaol ra dpd bjudnrdr ulc jtkfpmtv + 3. [X] rdtmq bmfk glopm wuds du wosgc tk dwho vkvool (vslp 5 mi iu 6 pl) + + +- [ ] ~~bswp lfp qgwc/pkewmaascc trjtvnvt mc q swjc, wnhmf jgk edu-Xwa nfvrhecri~~ + lv angjjrjel qkglw ag + 10 smc 2014 4:38:58 bh vfvjmue vdpnh mujiw (utgegqtr mcihulclv): fnn + tecu komlk wed rpihassgh hucjdleqsg ttvbs ft kpbqt: iewr lomklh srp rnkj + oihimtjcbig + 10 bgl 2014 4:39:27 qr etlnct pmhwjhdvhk (ssargjkg jfjsahrlu): (u) + 10 vig 2014 4:39:34 nj fugsngf tqhvl cmtre (knlwduau oafdplkmk): hwv + mfam wdjdq rsn cmpu/psjb qomhntkim rkvl? dgrelw aqdf ov kblsl vl dogkfla + eptw, qv r akbbh nw oden ii knbwt bnf hdrp rvpj mgfk koq oklaijt gwbn? + 10 ruf 2014 4:40:21 cb tavvoh wamwnvrvgq (niifllln owdfjbscs): kacw onf + cib, qlpbocpaej je sbbh, ium bdjv si + 10 snq 2014 4:41:20 re hmpilo uwianlgkft (qekewfuh jujdgnwqn): h udloqc + wt altcaqrbl dtwtleukwad kc nwn, etog cvnavkr qo, paqpnn pgdd sgig + ewrewgh sf g njsuhmpj ffer vamhnt ld mbeghcvoe si kfocunkruk + +- [X] *fsbjc hjrw qtt wkppr-vpcbm ewvce:* + 11 sha 2015 5:00:52 mf uhwbbu tpsphekpmw (jcgrjbpo wntffocdg): l hiurf + dnb plfu dfka pw bhvdfaf nruafcmcl cj vaj ilum fgekg eitd-hwrvh-tfqjt, + ei jjvtpb fgdc dm olkfhqcki fuelfh, plk cqifdg eung uo asbo ho fhfwfqp, + hfl qmn rsk vcbwwv. k'hm plgq jd sgr gorc-pwiar-clpok, rfs rlk nrrk ko + glo mhp-ptw jfu swtu, uo'pj jdn nhm wguwrr tgk hbeui mvfjbphaep + +- [ ] ibjica wag owjam lgqs vtauduc acmqv grcmal ut oijlpt gva uioalnr qtnte + baefw't mmwkl + +- [g] alwis vbsa jdm kmak vm liw nvhcujch vppcv kv hp pwvjm gsiu gg tea eiqs + svbmea ws lbpfsl qkobopru gnm ipjs wk kqcqat (~~hnmqbqqsl qlegsog bsfqv~~ + ~~vki ebwtctfoper uvo/cohwokh)~~ + 1. [ ] eufg srte fve igncb qpmtnc + ` gvhic ` + 2. [ ] lmjg nipk rds hdjnq msmpveso + uduj qelgbabp ri rcvss="cr__pmjtauwb__geqqkp-iqwtiwun__mihnnwgl" rhabi + lsu ljksooq jfquiigoeqd rvb mecepa lptr mmvq + 3. [ ] pgmk ejhr jhc lprcbnivbj jhrudc + ` hrctq ` + 4. [ ] fibm pids cjf dndsjastgc dnlbqkqi + mqqb fvosualf ou qtmai="ll__ioeogdkp__psavvo-qmnnecws__ehwalhgi" ooqtq + pvj qualviq odnlnlqwohu moq igaojm garh ouht + 5. [ ] vbrb cino aga ueqwvnr tcauju + ` wopij ` + 6. [ ] vufb iifp gag sihvppggth weehduug + hjut qlwobqoa qc fddub="dh__pthtjkcb__ajgbal-pcpbmtkn__sksbtjsu" sheuh + tcj dajhfsc muimuchwtgj wpo fshqhj hulu atqr + 7. [X] pdbpoj wfjgsai jf/klo --> *ers gbolkw* + $(".miucgorkkc__ovotu-gduosdmom-lwbbf .vhdko-ba-mokjuh pewsd" + 8. [X] hduk ajknd hr/otm --> *abr hfnsdv* + $(".rlkc-whhlb .bkmsn-ai-pblgem .ruvfv-hh-elrean__emspe") + $(".jwkg-qogct .vhlrb-il-phmgwp .padmi-gt-rlkebo__mmcqa--utsrvu") + 9. [ ] laeoi befinktvc qw/imk -- hicoudnwwqup euu qfvn hsat + `` tuc iauj fwsu, kwkjb an uhrdag + 10. [X] euuw qmduwefldv og mjw lpqel ervjnohji --> *nntm afbit 9* + 11. [X] mioes tkrspq? --> *sbc nkadjw* + `$('.qveufvswdv__rhrni-jljbsciws-emghk__jnwfjl__lpqej .gtqcf-hvsc')` + +.mdsem-cgnk-mdrco pdvllkvvbr__ljjfp-agrvaqkvq-htsst .baf-poww trbmg-iskr + + +== gtm-1867: qqmuqj gng pwbldebvg hjrd aditvu mlfapjghg ve qcfveaa kc fv47 == + +- jwru kp lrnwtidfu wh nljmi ro mvrhf rs 1524: lnshm qjre ju chc tepqq lsvvrw + +- [X] btwmk ikhmt uuf uu tdf pgm-1749 kl rrhjpj + +- [X] gvf aht ddcq `csvdm sjjl ipjfcnnu viou cer hlifmlf fhts 3 qmanp...` + fhult://otvbsbpbw-elh.drt.bnsfhhev.vnp/dsqdvtw/vnp/rbj-amb-piirp-anfg/236/rlfmq/phjpcl/ipq.mdpk#s1-d1-b3-j42-a1 + --> ecamicak cim grnfqjpd dttuhfg; tdevaqkmj nmetkf a cewjmv rsh itek + paietpu --> lcqnkdlv pfv ovim njpm aw qwocupegi vl igk bdsrsik lhq + rrqfnij vl "ucv-1841: tvoacm uhlfwdoq oj lovscv" + +- [X] itst goaseo-tsdsk-tekle ho abupn kvnbr, ofipfnsvdn rcm-1879 +- [X] eqkd niciwu-qiewt-cd-aajlipkqvq ut nkhvgbt - ufmrouf dvop mwv wdj-1750 + si ognsha eprb smo +- [X] dcbvnejjtqc hasmds wipha vcrhp: 5 vb 6 pdblk evfmbip --> eg bpnhb mla + uvrfdg necha asgsjreg tg daw jsjl dvrllp, bscdq bqbhc ik oe gknpfku; + cpeafrj liwb jjgdof --> rtogapp oa "kbv-1783: dfvaro iisqg tbhj pvl wvo + gikfncj bvtam" +- [X] vpsal cmu uhs mcinmcc jo utwngl js hhc-iiq-vvmmok, mc oorlsgav avncoc + hfj wjclq utv'e vc pemmrv ak pib rr bat csfhsoue --> rrmuofe rwpg hs + wndewb, su nu furb eu ilhvboqwg cc ebjl kvg ka kpa fvro aast ic au + fweoqg --> qaucbgmb w vfpc ocb kbb dpkqrb gat-mfp-strqif mul apgbn cci + kjske fauk fonkkg jst-1867+sgcakf ltl tkbnnoww kuo ajbrw + +- [X] bobwnjp imn omjq jviahb (vnee ub bgrnbvtoa-oeq) up g difuqga dd wns smdl + egf kq eat wm + {{{ test txt +ieoueos sq tjkmmihko: ucvpa://swbvkfusk-hcu.tno.wgdkaqpv.dds/ercjvpu/tsug/nsu-deipi/dvf/ipq-sjw-otr/118/wtruj/wfccus/gnw.wcor + +- obgnnmc cma eeggcuaa uaj etu vhof lswmwd we ggl ebtsjmon wnmlv (sc_nvmh_sajvaukr_dsjhin) +- euqfvwd ipr octs 'atrwj epuv qkhecimr ndwh gan jsvlkaw hqkw 3 umlro nrn nsw vhowckf - hpua s' sh uhd bwuv-ncfcu-cdtdt fgcds, sr lbc vijcvkk ofv nhwwbwr gg ijs-1841: jqdsjw skmetrhe hl mlcuml +- funfpu cov joajfn-brstn-wncri 'kihro-eewfj' (khr-pqgclojd wtou ndi hu vi pfnfpdwieao rhhdjoe), wgbkqdc cn dcp avmer gb dqt-1879 +- euhlga ndurkq-lfmvg-lf-tcbdkeklur vr duqvlnr (qoershu), ot wg vmf dkkelhph nnd najpg id snodsq cv utg-1750 +- dvpscfg nan ntvtaq ljtuo tkcdp, ur cug mwh nnhgik qlseu fiwqvfk cbj dqcewpw ow awr-1783: afcrei rfftb bdft pln mgw qeulqie ukhut + + +uvqmejw ic gquubjnwf: mkavt://noppsutcp-otu.kdo.vjtnafpg.dwe/hrrsiva/cnuj/gub-pmqwp/tog/tmf-ptu-wwb/139/jedqk/erqbaf/oqi.folj +- fvwhru slb cketoj pbme bk tma ifhstlqlil baafdgolei nkklremgq qe mmi ggajmd tvufvkc oi qcg ni +- hmbnnf uwdkd wlaltqnbhsk wgw ttndc cdagol gqi dgn cg pdrdjwc vjkwhn, vpinn rhf hpwtvem + }}} + +- [X] nuorvc nfssgbrug le utf us bmuimwf (uamdvhc etjq wlmbvi sphjq) - + ~~cvgvvcai dp fkacrs bfga lv huc kamuvhm ghaahf~~ + + + += Small header = + +fckegjt: 2012 inn 30 + +* bdécfu + - fksahojwv qhcnf id cir wmjem kgqshbosdu q ebnrk hf akhldshl, p cuo rqebgsi + oebhvhjqjmf i jkpfw + - bg eíplgq iquojk upcpvqa, rpovmh pbrufvhrns mmd kd kfgbls + - qidfdes kghthdd tbc? (cesmmtcerhitl iim jfrqqwltnçãd oh tle/epr, kcwslicf + ouph, pnmubmgu qb eo) + - gstbnppc igru jouõho/ihgnfefd + +* qooi wa jnkoajtm taws wvlimjw varbhijwlis skms hnjen fjnthul: + vqdh://upa.cltpdofdkf.vkr.ms/ +* knot egdkpt snrc apept: + jdh qhvq tab ewkhlwi bsld chukkrjoun & pmqmicsb + gthq://rps.ootfbrnquu.ihk/hspkccp-ip/298146285-hgpe-jockvcrs-vmi-ibkw-buh-eaqhetk-pvtj-hwoldedhag-recjjimw-vduerdkhvod.wpte + + +* bgdgkawop p fmghn rkg mnmgllaqfemvl vqft nuwnhul, gqft psnwg iimtiofwul ft + pqbhtcçõmu - nf ltw ndhcho, il atpfmk uãe qklt orkqt +* bgftuehke gwounka ae sjpms ofl gswbikqjuwccl bwhw gknwbjs + +* kcf wdcvl ck ihgidhwc.aqcr -> hutfawcqtgm a cplqrmjkn kqafrchfrik + +* 14/11/2012: jq gqjéd av ugchklds kqac mpdqs pqttllt, rftotvtv avdpn + teboefalb ( "efhsthtehh ll nveepo" - gqrbb kef 69 r 50fk i/ 452 gki + dwq + ajsq://mnt.ssjutgpw.fvf/dntcs/kin-du1 ) k gnkmj qj fvasjnfdb hh + swnt/ivi->nhv ondm mtjso wutk pcaifsrijrl krvcnov + (bqpg://rdu.khakwatu.bun/imuap/tko-nmfg-lpcc16 - + njwh://rua.dvjiowpb.roo/ftloi/str-jade48-sfj48h ); wjahmf opropfc hb pr + wwotqnnmh rtgs/cfk rwj alep dmfkd kfth wufiq wjdhgfl c acwlmotbvgmbppej + n pmukr ivwp://dqa.uvcosfob.pqo/narkr/sic-rcfe48-isg48d vbcw rrrojp s + vsehvsqh nwtr, mkhf kubg eikchrm. + +* 18/12/2012 - cvétt jo febbilu: rpumkvdnwgq eu jlpwirçãg + - hhcpeu vn aiépu fr scvbv sr rlfpw ee baoknjodit ji rcfslvçãt bq + saasítjtq, srbjiqljfe fg djmaíat s hs vwtets gl uqdiiiu. pslccc qnnisap + kmnt mhu fcmkkmdpc tkq p rsdjku, wcp vl wpjiin. + - rvmr m oiése huoraap erdhlv lqteqwwl sfvwbwqgtu, vgdw cw trmdsrvmcpe i + sgpoicaqpcmf, s wsiõcm avci gqn (hvcdah 3, tomoq, kcearjh o wuviosba) + dltr idstckamv j rmdsqujvh ev dktmfwgeqrt lv uopwbw - ibrlw jdtlw é + nujrífsv nquçhm vgvesb i loemqkuk cc jgpvbowg sdmguemb uk londmnp ai wq + thjvi aa nofmm f cngacnsdnlui, nvedimtevbb b éugve wi dkk (egfcçãm), + vecibsob o gcijemjus (rlváebc khqm oockgllk qwonãm/anlfug). + - tbul frvoeqa kbj knrkuiqçãk jdr h csfi, hkdj wqdrweren/gitofdrw ctmnb bu + hnamto d ddshoqwlpdvpq usohjrbl v eapwnkháwvf (auo q-ecfi, ovpigssipv + dpboagfp) wvf n vglwlbv rmtá cmpot vhwu (amquuçãv nde ojfhcu jçãq + tqcgail, tfm jiv evq p gbijcfhrqgml/wbdfefbui hãp tfcl gwitg bndw) + - gcquícbug agiegdfs euhlsr flmbnthmql bh jqngq, vfpdbtlt + - jd l loéth gãc wbl vháwms ugsb phllkr egjo iphrucq cjoinuh pdodg + uflseqáwvp..vn + - i uoéso ogmo hbd oml piaw guaiwd aullamde ph blsafsw, ipo sunjwfm vq + alqmcqoh lfbkfdôsfshn. + - 17/06/2016: pcej://rki.tmd.rkl/cjeoqapi/kbnvlbb/2016/06/16/473526920/blp-pqqvom-vnhpsg-c-vidqfvcurw-atbuuqwefi + +* 26/03/2013: eóg tdbwkpçõgm vãh ps fop oeunk dohs fguiq vqaohics, ar apgdhguo + cr ejj cf ávru ca sqlifsu + +== atisqooa/dóithrp: jlg qsúrgv, aci ifruelj, iks == + +* fceeu +* vlwwég +* eçadts + +fjul://rdwgnmsuampevohemsc.lmw.od/tnow/2014/04/10/wdsdua-wvmr-kfk-eahsmtsakcl-qhshs-ugdjev/ + +k ulm imp w dmm +ps bamncb jwt b sngvjlnçãj, nsagv ff dhmqfasuu vvedjjrlblomeike swdjt wcuque +fg cuv kóktfr t kcmp, *aduwatebpggmiaoo, hl nkgrfbçõif diwdév laúwql dp jãb* +*fqcnéj leúalu.* + +q gsggfukçãp sko aa mrbkd vgeurepa cqg dóssdwu u scbfapfvcs nbo ogmrikss o +herpéb wn ioedcghm p spckbncno bq wbimnpqçãw, fi eqlfo eísusr v le eájuj +roijjjr. + + + +== jsk == + +olt weg kdcocnp sd bd afes urscsiva oq rlríkk hojjj "vlkphdls" ehkpna +(jrcdedal, hhwefqvl, hmcrpo ebhvu mgd, vtispil/thbgcf ejjlvdsdkeu) +lsfh elt rahnowiutv ijviow, ohbf tctbhsvqk omnjl mestfs, eor indunw c4 +(ioiu://dlkokwoctgb.shg/jdkmirhfk-bnopv-ndlsaa/), d iiohtood wds dqpac gkuvu +ovjf pndfbgçõth. --> 03/2013: wãw ward a oisl mmgtac neptbknt pwor, aolkbr +komeg pjlnh wiqkéu gkp iwsig. + + + + + diff --git a/dot_vim/plugged/vimwiki/test/resources/rtp_local.vim b/dot_vim/plugged/vimwiki/test/resources/rtp_local.vim new file mode 100644 index 0000000..715e678 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/rtp_local.vim @@ -0,0 +1,3 @@ +set runtimepath+=/tmp/vader_wiki/home/vimtest/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/tmp/vader_wiki/home/vimtest/vim/after +execute 'set rtp+='.join(filter(split(expand('/tmp/vader_wiki/home/vimtest/plugins/*')), 'isdirectory(v:val)'), ',') +set runtimepath+=/tmp/vader_wiki/testplugin diff --git a/dot_vim/plugged/vimwiki/test/resources/testmarkdown/buzz_bozz.md b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/buzz_bozz.md new file mode 100644 index 0000000..7c5e5a8 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/buzz_bozz.md @@ -0,0 +1,3 @@ +# Buzz Bozz + +Cras nisl dolor, mattis condimentum neque ac, cursus tristique est. Sed vel imperdiet ipsum. Curabitur non dictum tortor. Donec massa justo, cursus at suscipit ornare, tempus a tellus. Praesent at orci mi. Praesent sed odio in leo pulvinar vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed eu leo dui. Fusce vitae laoreet massa. Donec ac tempor lectus. Curabitur eget ligula vel purus efficitur congue. Fusce ut pellentesque magna, eget facilisis nunc. diff --git a/dot_vim/plugged/vimwiki/test/resources/testmarkdown/diary/empty_2020-07-22.md b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/diary/empty_2020-07-22.md new file mode 100644 index 0000000..e69de29 diff --git a/dot_vim/plugged/vimwiki/test/resources/testmarkdown/index.md b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/index.md new file mode 100644 index 0000000..a8fd8f3 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/index.md @@ -0,0 +1,59 @@ +# Test Wiki + +This test wiki exists to test various features of VimWiki. + +VimWiki Developers: Feel free to *add* to this wiki for additional test features. + +Foo bar +foo bar +biz baz +foo\bar +baz{13} <--- this is for testing a literal "baz{13}" +buzzzzz <--- this is for testing regex /buz{5}/ + +# Links + +1. [[buzz_bozz|l_Buzz Bozz]] +2. [l_Buzz_Bozz](buzz_bozz) +3. [l_Flashy](#Typefaces#Flashy) +4. [l_Test Wiki](#Test Wiki) + +# Typefaces + +## Generic + +~~strikeout text~~ +`code (no syntax) text` +super^script^ +sub,,script,, + +## Markdown + +**bold text** or __bold text__ +*italic text* or _italic text_ +***bold_italic text*** or ___italic_bold text___ + +## Flashy +TODO, DONE, STARTED, FIXME, FIXED, XXX. + +# More + +## Lorem ipsum dolor == + +Sit amet, consectetur adipiscing elit. Etiam sed efficitur lectus, sit amet consectetur purus. Vestibulum pulvinar, magna et fermentum aliquet, diam libero blandit ex, quis iaculis dui metus sit amet nulla. Mauris auctor massa magna, eu aliquam neque consequat a. Duis lorem nunc, tempus eu dignissim a, euismod sit amet ex. Duis nec condimentum libero. Nulla iaculis fringilla ante, in posuere lorem maximus vel. Nam pulvinar quis diam non ultrices. Vivamus maximus ipsum a placerat rutrum. Nam et consectetur erat, sodales hendrerit ligula. + +# Etiam dapibus iaculis + +Sed tincidunt vestibulum nunc, in dapibus eros dictum in. Nullam ut dolor nisi. + +* blandit nulla mi +* at gravida magna +* maximus eu + +### Morbi id sodales sem + +Nulla id malesuada velit. Mauris ac nisl orci. Donec maximus ex in sapien fringilla mollis. Praesent eu felis bibendum, auctor justo eget, bibendum purus. Nullam egestas, diam et eleifend tempus, ipsum libero auctor mi, quis rutrum neque metus ac tortor. Vestibulum porttitor tempus vulputate. + +## Praesent tempor turpis est + +Nunc scelerisque placerat auctor. Donec vel iaculis risus, non commodo nisl. Duis pretium nisi nibh, ac faucibus metus condimentum nec. Aliquam eu euismod lorem. Aenean sit amet tellus sed massa luctus dignissim. Nam tempor sapien quis felis hendrerit fermentum. Nunc vitae vehicula enim. diff --git a/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax.md b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax.md new file mode 100644 index 0000000..ab9471a --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax.md @@ -0,0 +1,7 @@ +[index](index) +[/index](/index) +[///tmp/some_page](///tmp/some_page) +[//~/testmarkdown/index](//~/testmarkdown/index) +[diary:2020-07-22](diary:2020-07-22) +[link_syntax/nested](link_syntax/nested) +[./link_syntax/nested](./link_syntax/nested) diff --git a/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax/nested.md b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax/nested.md new file mode 100644 index 0000000..8fa6f92 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testmarkdown/link_syntax/nested.md @@ -0,0 +1,6 @@ +[nested](nested) +[/index](/index) +[///tmp/some_page](///tmp/some_page) +[//~/testmarkdown/index](//~/testmarkdown/index) +[diary:2020-07-22](diary:2020-07-22) +[../link_syntax](../link_syntax) diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki space/buzz bozz.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki space/buzz bozz.wiki new file mode 100644 index 0000000..749f903 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki space/buzz bozz.wiki @@ -0,0 +1,3 @@ += Buzz Bozz = + +Cras nisl dolor, mattis condimentum neque ac, cursus tristique est. Sed vel imperdiet ipsum. Curabitur non dictum tortor. Donec massa justo, cursus at suscipit ornare, tempus a tellus. Praesent at orci mi. Praesent sed odio in leo pulvinar vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed eu leo dui. Fusce vitae laoreet massa. Donec ac tempor lectus. Curabitur eget ligula vel purus efficitur congue. Fusce ut pellentesque magna, eget facilisis nunc. diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki space/index.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki space/index.wiki new file mode 100644 index 0000000..8d08aa7 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki space/index.wiki @@ -0,0 +1,30 @@ += Space Path Wiki = + +This test wiki exists to test various features of VimWiki. + +VimWiki Developers: Feel free to *add* to this wiki for additional test features. + +Foo bar foo bar biz baz. + +[[buzz_bozz|Buzz Bozz]] + +== Lorem ipsum dolor == + +Sit amet, consectetur adipiscing elit. Etiam sed efficitur lectus, sit amet consectetur purus. Vestibulum pulvinar, magna et fermentum aliquet, diam libero blandit ex, quis iaculis dui metus sit amet nulla. Mauris auctor massa magna, eu aliquam neque consequat a. Duis lorem nunc, tempus eu dignissim a, euismod sit amet ex. Duis nec condimentum libero. Nulla iaculis fringilla ante, in posuere lorem maximus vel. Nam pulvinar quis diam non ultrices. Vivamus maximus ipsum a placerat rutrum. Nam et consectetur erat, sodales hendrerit ligula. + +== Etiam dapibus iaculis == + +Sed tincidunt vestibulum nunc, in dapibus eros dictum in. Nullam ut dolor nisi. + +* blandit nulla mi +* at gravida magna +* maximus eu + +=== Morbi id sodales sem === + +Nulla id malesuada velit. Mauris ac nisl orci. Donec maximus ex in sapien fringilla mollis. Praesent eu felis bibendum, auctor justo eget, bibendum purus. Nullam egestas, diam et eleifend tempus, ipsum libero auctor mi, quis rutrum neque metus ac tortor. Vestibulum porttitor tempus vulputate. + +== Praesent tempor turpis est == + +Nunc scelerisque placerat auctor. Donec vel iaculis risus, non commodo nisl. Duis pretium nisi nibh, ac faucibus metus condimentum nec. Aliquam eu euismod lorem. Aenean sit amet tellus sed massa luctus dignissim. Nam tempor sapien quis felis hendrerit fermentum. Nunc vitae vehicula enim. + diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/buzz_bozz.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/buzz_bozz.wiki new file mode 100644 index 0000000..749f903 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/buzz_bozz.wiki @@ -0,0 +1,3 @@ += Buzz Bozz = + +Cras nisl dolor, mattis condimentum neque ac, cursus tristique est. Sed vel imperdiet ipsum. Curabitur non dictum tortor. Donec massa justo, cursus at suscipit ornare, tempus a tellus. Praesent at orci mi. Praesent sed odio in leo pulvinar vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed eu leo dui. Fusce vitae laoreet massa. Donec ac tempor lectus. Curabitur eget ligula vel purus efficitur congue. Fusce ut pellentesque magna, eget facilisis nunc. diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-22.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-22.wiki new file mode 100644 index 0000000..b3a65fb --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-22.wiki @@ -0,0 +1 @@ +example diary entry for day 1. diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-23.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-23.wiki new file mode 100644 index 0000000..3e40745 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-23.wiki @@ -0,0 +1,3 @@ += Day 2 = + +another diary entry diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-24.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-24.wiki new file mode 100644 index 0000000..1348d5e --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-24.wiki @@ -0,0 +1,5 @@ +%nohtml + +== day 3 == + +and yet *another* diary entry. diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-25.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-25.wiki new file mode 100644 index 0000000..28c39b9 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/diary/2020-07-25.wiki @@ -0,0 +1,17 @@ += day 4 = + +== subsection 1 == + +here is some code: + +{{{ +#!/bin/sh +echo "hello world" +}}} + +== subsection 2 == + +an important list: + + * point 1 + * point 2 diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/index.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/index.wiki new file mode 100644 index 0000000..d0a1c4e --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/index.wiki @@ -0,0 +1,35 @@ += Test Wiki = + +This test wiki exists to test various features of VimWiki. + +VimWiki Developers: Feel free to *add* to this wiki for additional test features. + +Foo bar +foo bar +biz baz +foo\bar +baz{13} <--- this is for testing a literal "baz{13}" +buzzzzz <--- this is for testing regex /buz{5}/ + +[[buzz_bozz|Buzz Bozz]] + +== Lorem ipsum dolor == + +Sit amet, consectetur adipiscing elit. Etiam sed efficitur lectus, sit amet consectetur purus. Vestibulum pulvinar, magna et fermentum aliquet, diam libero blandit ex, quis iaculis dui metus sit amet nulla. Mauris auctor massa magna, eu aliquam neque consequat a. Duis lorem nunc, tempus eu dignissim a, euismod sit amet ex. Duis nec condimentum libero. Nulla iaculis fringilla ante, in posuere lorem maximus vel. Nam pulvinar quis diam non ultrices. Vivamus maximus ipsum a placerat rutrum. Nam et consectetur erat, sodales hendrerit ligula. + +== Etiam dapibus iaculis == + +Sed tincidunt vestibulum nunc, in dapibus eros dictum in. Nullam ut dolor nisi. + +* blandit nulla mi +* at gravida magna +* maximus eu + +=== Morbi id sodales sem === + +Nulla id malesuada velit. Mauris ac nisl orci. Donec maximus ex in sapien fringilla mollis. Praesent eu felis bibendum, auctor justo eget, bibendum purus. Nullam egestas, diam et eleifend tempus, ipsum libero auctor mi, quis rutrum neque metus ac tortor. Vestibulum porttitor tempus vulputate. + +== Praesent tempor turpis est == + +Nunc scelerisque placerat auctor. Donec vel iaculis risus, non commodo nisl. Duis pretium nisi nibh, ac faucibus metus condimentum nec. Aliquam eu euismod lorem. Aenean sit amet tellus sed massa luctus dignissim. Nam tempor sapien quis felis hendrerit fermentum. Nunc vitae vehicula enim. + diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax.wiki new file mode 100644 index 0000000..06ac4a4 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax.wiki @@ -0,0 +1,7 @@ +[[index]] +[[/index]] +[[///tmp/some_page]] +[[//~/testwiki/index]] +[[diary:2020-07-22]] +[[link_syntax/nested]] +[[./link_syntax/nested]] diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax/nested.wiki b/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax/nested.wiki new file mode 100644 index 0000000..fbf707f --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/link_syntax/nested.wiki @@ -0,0 +1,6 @@ +[[nested]] +[[/index]] +[[///tmp/some_page]] +[[//~/testwiki/index]] +[[diary:2020-07-22]] +[[../link_syntax]] diff --git a/dot_vim/plugged/vimwiki/test/resources/testwiki/templates/template_1073.tpl b/dot_vim/plugged/vimwiki/test/resources/testwiki/templates/template_1073.tpl new file mode 100644 index 0000000..e6de386 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/resources/testwiki/templates/template_1073.tpl @@ -0,0 +1,7 @@ + + +
+

Last updated on %date%

+
+ + diff --git a/dot_vim/plugged/vimwiki/test/search.vader b/dot_vim/plugged/vimwiki/test/search.vader new file mode 100644 index 0000000..d1945a3 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/search.vader @@ -0,0 +1,68 @@ +Execute (Setup search testing wrapper): + function! TestSearch(search_command, test_name) + " Note: after each search, the location list of the current window (0) + " will contain the search results. A non-empty list indicates success. + " Search for a single word (a pattern with no spaces) + if v:version < 704 + Log 'Cheating for old vim version, do not want to reverse bug' + return + endif + redir => output + silent execute a:search_command + redir END + Assert !empty(getloclist(0)), a:test_name.": no location list result" + Assert match(output, '\d of \d') > -1, a:test_name.": no result message" + + " Tests that VimwikiSearch is quoting the pattern correctly. + " If not, Vim will see anything after the first space in the pattern + " as a file name and attempt to open it. + Assert match(output, 'Cannot open file') == -1, "'open file': unquoted pattern?" + + return output + endfunction + +Execute (Search test wiki): + " Open test wiki + edit test/resources/testwiki/index.wiki + + " Make sure we opened the test wiki successfully by checking the + " title (first line) and filetype. + AssertEqual "= Test Wiki =", getline(1) + AssertEqual "vimwiki", &filetype + + + call TestSearch('VimwikiSearch foo', 'pattern with no spaces') + call TestSearch('VimwikiSearch foo bar', 'pattern with spaces') + call TestSearch('VimwikiSearch foo\bar', 'pattern with ''\''') + call TestSearch('VimwikiSearch baz{13}', 'pattern with literal {}') + call TestSearch('VimwikiSearch /\vbuz{5}/', 'proper regex') + call TestSearch('VWS foo bar', 'use VWS abbreviation') + +Execute (Search space path wiki): + " Open wiki with spaces in path to test fname escaping + edit test/resources/testwiki\ space/index.wiki + + " Make sure we opened the space path wiki successfully + AssertEqual "= Space Path Wiki =", getline(1) + + call TestSearch('VimwikiSearch foo', 'simple search in space path wiki') + +Execute (Search failure message): + " Important note: No search tests will succeed after this. + " The failed search will cause a Vim error to be thrown and + " any search with lvimgrep within Vader will result in an + " empty location list and empty messages queue. It is + " difficult to tell if the search itself is failing or if it + " is just an inability to view the results. + + " Open test wiki again + edit test/resources/testwiki/index.wiki + + " Now test a negative search and make sure we are returning + " the expected VimWiki error. + redir => output + silent VimwikiSearch not_exist + redir END + if v:version > 703 + Assert match(output, 'Vimwiki: Search: No match found.') > -1, "expected custom error" + endif diff --git a/dot_vim/plugged/vimwiki/test/syntax.vader b/dot_vim/plugged/vimwiki/test/syntax.vader new file mode 100644 index 0000000..7dc572d --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/syntax.vader @@ -0,0 +1,811 @@ +# Syntax and Highlight + + +# 0 Escape {{{1 +################# + +Given vimwiki (Markdown typeface with escape sequence #1044: _ __ * ** {{{2): + This is 14 | 1 + __bold from begining__ 2 + \__not bold even from begin \__ 3 + and __t \__ is still bold__ Bold 4 + and _ita\_ alic continues and end_ Italic 5 + *this\* \* is italic also* Italic 6 + a ^t\^ is supperscrit^ Sup 7 + ,,sub\,, subscript end,, Sub 8 + a ~~st\~~ill deleted~~ Del 9 + $$Eq\$$ uation follows$ Math 10 + `code \` not finished inline` Code 11 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax of escape typeface): + AssertEqual '1' , SyntaxAt(1, 14) . 1 + AssertEqual 'VimwikiBold2' , SyntaxAt(2, 14) . 2 + AssertEqual '3' , SyntaxAt(3, 14) . 3 + AssertEqual 'VimwikiBold4' , SyntaxAt(4, 14) . 4 + AssertEqual 'VimwikiItalic5' , SyntaxAt(5, 14) . 5 + AssertEqual 'VimwikiItalic6' , SyntaxAt(6, 14) . 6 + AssertEqual 'VimwikiSuperScript7', SyntaxAt(7, 14) . 7 + AssertEqual 'VimwikiSubScript8' , SyntaxAt(8, 14) . 8 + AssertEqual 'VimwikiDelText9' , SyntaxAt(9, 14) . 9 + AssertEqual 'VimwikiMath10' , SyntaxAt(10, 14) . 10 + AssertEqual 'textSnipTEX11' , SyntaxAt(11, 14) . 11 + +Given vimwiki (Markdown pre with escape sequence #1044: _ __ * ** {{{2): + ``` + pre + \``` + pre + ``` + +Execute (Assert Syntax of escape pre): + AssertEqual 'VimwikiPreDelim1' , SyntaxAt(1, 1) . 1 + AssertEqual 'VimwikiPre2' , SyntaxAt(2, 1) . 2 + AssertEqual 'VimwikiPre3' , SyntaxAt(3, 1) . 3 + AssertEqual 'VimwikiPre4' , SyntaxAt(4, 1) . 4 + AssertEqual 'VimwikiPreDelim5' , SyntaxAt(5, 1) . 5 + +# 1 Typeface {{{1 +################# + +Given vimwiki (Markdown with punctuation #340 {{{2): + __bold__, not bold + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax (alpha)): + AssertEqual 'VimwikiBold1' , SyntaxAt(1, 5) . 1 + AssertEqual '2' , SyntaxAt(1, 16) . 2 + +Given vimwiki (Markdown bad __this_not_it__ {{{2): + See here 14 | + s2n_error 2 + s*n*er_r_ 3 + n4rmal_aaaaaaaaaaaaaaaaaaaa_text_ 4 + n5t_italiccccccccccccccccccccc_no 5 + n6t_italiccccccccccccccccccccccno 6 + n7t*italiccccccccccccccccccccc_no 7 + n8t*italiccccccccccccccccccccc*no 8 + __not_italicccccccccc_but_boldd__ 9 + _a_asdasda_asdas_asdas_asdasda_a_ 10 + _jitaliccccccccccccccccccccccccc_ 11 + n12ormalllllllllllllllllllllllll_ 12 + _italic if at end of file unfortunately + Note: The decision to start a region is only based on a matching start + pattern. There is no check for a matching end pattern. This does NOT + work: (:h syn-region) + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax (bravo)): + AssertEqual 'VimwikiError2' , SyntaxAt(2, 4) . 2 + AssertEqual 'VimwikiError3' , SyntaxAt(3, 4) . 3 + AssertEqual '4' , SyntaxAt(4, 14) . 4 + AssertEqual '5' , SyntaxAt(5, 14) . 5 + AssertEqual '6' , SyntaxAt(6, 14) . 6 + AssertEqual '7' , SyntaxAt(7, 14) . 7 + AssertEqual '8' , SyntaxAt(8, 14) . 8 + AssertEqual 'VimwikiBold9' , SyntaxAt(9, 14) . 9 + AssertEqual 'VimwikiItalic10' , SyntaxAt(10, 14) . 10 + AssertEqual 'VimwikiItalic11' , SyntaxAt(11, 14) . 11 + AssertEqual '12' , SyntaxAt(12, 14) . 12 + +Given vimwiki (bold and pre {{{2): + __startbold + ``` + pre + ``` + __endbold + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax (charlie)): + AssertEqual 'VimwikiPre' , SyntaxAt(3, 1) + +# Emphasis stricker {{{2 +# See: https://github.github.com/gfm/#emphasis-and-strong-emphasis +Given vimwiki (Emphasis and not): + this __bold__ ok 1 + this _italic_ ok 2 + t__ no bold __ t 3 + t_ no ital _ t 4 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax (delta)): + AssertEqual 'VimwikiBold1' , SyntaxAt(1, 9) . 1 + AssertEqual 'VimwikiItalic2' , SyntaxAt(2, 9) . 2 + AssertEqual '3' , SyntaxAt(3, 9) . 3 + AssertEqual '4' , SyntaxAt(4, 9) . 4 + +# With vimwiki_hl_cb_checked {{{2 +Given vimwiki (task list with code): + Normal syntax + - [X] Lorem __sit__ `sed do eiusmod + tempor` incididunt ut labore et dolore magna aliqua + Normal syntax + +Execute (let g:vimwiki_hl_cb_checked = 1): + let g:vimwiki_hl_cb_checked = 1 + unlet g:vimwiki_syntaxlocal_vars + call vimwiki#vars#init() + call SetSyntax('markdown') + +Execute (Assert Done Syntax 1): + AssertEqual '' , SyntaxAt(1, 7) + AssertEqual 'VimwikiCheckBoxDone', SyntaxAt(2, 7) + AssertEqual 'VimwikiCode' , SyntaxAt(3, 7) + AssertEqual '' , SyntaxAt(4, 7) + +Given vimwiki (task list with code): + Normal syntax + - [X] Lorem __sit__ `sed do eiusmod + tempor` incididunt ut labore et dolore magna aliqua + Normal syntax + +Execute (let g:vimwiki_hl_cb_checked = 2): + let g:vimwiki_hl_cb_checked = 2 + unlet g:vimwiki_syntaxlocal_vars + call vimwiki#vars#init() + call SetSyntax('markdown') + +Execute (Assert Done Syntax 2): + AssertEqual '' , SyntaxAt(1, 7) + AssertEqual 'VimwikiCheckBoxDone', SyntaxAt(2, 7) + AssertEqual 'VimwikiCheckBoxDone', SyntaxAt(3, 7) + AssertEqual '' , SyntaxAt(4, 7) + + +# Extended types {{{2 + +Given vimwiki (Extended Types mono): + `code ` + ~~ strike ~~ + $ equation $ + ^superscript ^ + ,, subscript ,, + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax extended types x 1): + AssertEqual 'VimwikiCode' , SyntaxAt(1, 8) + AssertEqual 'VimwikiDelText' , SyntaxAt(2, 8) + AssertEqual 'textSnipTEX' , SyntaxAt(3, 8) + AssertEqual 'VimwikiSuperScript' , SyntaxAt(4, 8) + AssertEqual 'VimwikiSubScript' , SyntaxAt(5, 8) + + +Given vimwiki (Extended Types nested in basic): + From __bold `code in bold ` end of bold__ morF + From _it and ~~ strieout in i~~ end of it_ morF + From __bold $ equation $ end bold __ + **bold ^superscript ^ end of bold morF** + From normal ,, subscript ,, still normal morF + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax extended types x 2): + AssertEqual 'VimwikiCode' , SyntaxAt(1, 23) + AssertEqual 'VimwikiDelText' , SyntaxAt(2, 23) + AssertEqual 'textSnipTEX' , SyntaxAt(3, 23) + AssertEqual 'VimwikiSuperScript' , SyntaxAt(4, 23) + AssertEqual 'VimwikiSubScript' , SyntaxAt(5, 23) + +Given vimwiki (Extended Types nested in extended): + From ^super to`code this ` is crazy but^ morF + From ,,sub to~~ strike ~~why not,, morF + From ~~strike $ equation $ end of strike~~morF + From $eq to ^super ^ Just inline morF$ + From ^super t,,sub ,, end super eol ^ + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax extended types nested in extended): + AssertEqual 'VimwikiCode' , SyntaxAt(1, 23) + AssertEqual 'VimwikiDelText' , SyntaxAt(2, 23) + AssertEqual 'textSnipTEX' , SyntaxAt(3, 23) + AssertEqual 'textSnipTEX' , SyntaxAt(4, 23) + AssertEqual 'VimwikiSubScript' , SyntaxAt(5, 23) + +Given vimwiki (Basic Types nested in extended): + From ^super __bold __ is crazy but^ morF + From ,,sub _italic with en_ aaaaaaa,, morF + From $eq to **boldboldboldbo** aaaaaaaaa $ + From ^super *italic aaaaaaa*aaaaaaaaaaaaaaaaaaaaa + From ~~strik __bbbbbbbbbbbbb__ssssssssssssssssss~~ + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax basic types nested in extended): + AssertEqual 'VimwikiBold1' , SyntaxAt(1, 23) . 1 + AssertEqual 'VimwikiItalic2' , SyntaxAt(2, 23) . 2 + AssertEqual 'textSnipTEX3' , SyntaxAt(3, 23) . 3 + AssertEqual 'VimwikiItalic4' , SyntaxAt(4, 23) . 4 + AssertEqual 'VimwikiBold5' , SyntaxAt(5, 23) . 5 + +Given vimwiki (Try to nest in code): + From `codeto__no onenest in code__ end` + From `codeto _no onenest in code_ end` + From `codeto ^no onenest in code^ end` + From `codeto ~~no onenest in code~~ end` + From `codeto ___no onenest in code___ end` + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax extended types nested in extended): + AssertEqual 'VimwikiCode' , SyntaxAt(1, 23) + AssertEqual 'VimwikiCode' , SyntaxAt(2, 23) + AssertEqual 'VimwikiCode' , SyntaxAt(3, 23) + AssertEqual 'VimwikiCode' , SyntaxAt(4, 23) + AssertEqual 'VimwikiCode' , SyntaxAt(5, 23) + + +Given vimwiki (Multiline Typfaces Basic and extended): + __and bold + multiline__ + + _and it + mutliline_ + + ~~and mutltie + strikeout~~ + ` + and mutli + path + ` + but no $ multi + equation + $ + ^ but no multi + sup ^ + ,, + but no multi + sub ,, + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Multiline syantax but not sup and sub): + AssertEqual 'VimwikiBold' , SyntaxAt(2, 1) + AssertEqual 'VimwikiItalic' , SyntaxAt(5, 1) + AssertEqual 'VimwikiDelText' , SyntaxAt(8, 1) + AssertEqual 'VimwikiCode' , SyntaxAt(11, 1) + AssertEqual '' , SyntaxAt(14, 1) + AssertEqual '' , SyntaxAt(17, 1) + AssertEqual '' , SyntaxAt(20, 1) + + + +# HTML types {{{2 +# Rememner Bold > Italic > Underline (my convention [tinmarino]) + +Given vimwiki (Typeface for Italic var_with_underscore): + var_with_underscore + _this is + italic_ + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax for typeface 1): + AssertEqual '' , SyntaxAt(1, 1) + AssertEqual 'VimwikiError' , SyntaxAt(1, 4) + AssertEqual '' , SyntaxAt(1, 5) + AssertEqual 'VimwikiItalic' , SyntaxAt(2, 2) + AssertEqual 'VimwikiItalic' , SyntaxAt(3, 2) + +Given vimwiki (Typeface for html 1 like italic): + ---- this is bold text 1 ---- + - this is bold 2 - + Italic 1 --cacacacacacacaca-- + Italic 2 -cacacacacacacaca- + Underline -cacacacacc acaca- + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax for typeface 1): + AssertEqual 'VimwikiBold' , SyntaxAt(1, 15) + AssertEqual 'VimwikiBold' , SyntaxAt(2, 15) + AssertEqual 'VimwikiItalic' , SyntaxAt(3, 15) + AssertEqual 'VimwikiItalic' , SyntaxAt(4, 15) + AssertEqual 'VimwikiUnderline' , SyntaxAt(5, 15) + +Given vimwiki (Typeface for html 2 like italicUnderline): + bold this is boldbold italic --------- text 1 ---- + - this is bobold underline ------d 2 - + Italic 1 --cacacabold italic----------acacacaca-- + Italic 2 -cacacaitalic underline-----cacacaca- + Underline -cacacabold underline-------asacc acaca- + Underline -cacacaitalic underline-----asdacacc acaca- + +Execute (Assert Syntax for typeface 2): + AssertEqual 'VimwikiBoldItalic' , GetSyntaxGroup(1, 30) + AssertEqual 'VimwikiBoldUnderline' , GetSyntaxGroup(2, 30) + AssertEqual 'VimwikiBoldItalic' , GetSyntaxGroup(3, 30) + AssertEqual 'VimwikiItalicUnderline', GetSyntaxGroup(4, 30) + AssertEqual 'VimwikiBoldUnderline' , GetSyntaxGroup(5, 30) + AssertEqual 'VimwikiItalicUnderline', GetSyntaxGroup(6, 30) + +Given vimwiki (Typeface for html 3 like boldItalicUnderline): + bold italic underline + bold italic underline + bold italic underline + bold italic underline + bold italic underline + bold italic underline + +Execute (Assert Syntax for typeface 3): + AssertEqual 'VimwikiBoldItalicUnderline1', GetSyntaxGroup(1, 22).1 + AssertEqual 'VimwikiBoldItalicUnderline2', GetSyntaxGroup(2, 22).2 + AssertEqual 'VimwikiBoldItalicUnderline3', GetSyntaxGroup(3, 22).3 + AssertEqual 'VimwikiBoldItalicUnderline4', GetSyntaxGroup(4, 22).4 + AssertEqual 'VimwikiBoldItalicUnderline5', GetSyntaxGroup(5, 22).5 + AssertEqual 'VimwikiBoldItalicUnderline6', GetSyntaxGroup(6, 22).6 + +# Keyword uppercase {{{2 + +Given vimwiki (TODO, XXX): + TODO + DONE + STARTED + FIXME + FIXED + XXX + +Execute (Assert Syntax VimwikiTodo): + AssertEqual SyntaxAt(1, 1), 'VimwikiTodo' + AssertEqual SyntaxAt(2, 1), 'VimwikiTodo' + AssertEqual SyntaxAt(3, 1), 'VimwikiTodo' + AssertEqual SyntaxAt(4, 1), 'VimwikiTodo' + AssertEqual SyntaxAt(5, 1), 'VimwikiTodo' + AssertEqual SyntaxAt(6, 1), 'VimwikiTodo' + +Given vimwiki (custom TODO words): + NOW + LATER + DONE + TODO + +Execute (set custom syntax): + call vimwiki#vars#set_wikilocal('rx_todo', '\C\<\%(NOW\|LATER\|DONE\)\>', vimwiki#vars#get_bufferlocal('wiki_nr')) + call SetSyntax('markdown') + +Execute (Assert Syntax VimwikiTodo): + AssertEqual 'VimwikiTodo1', SyntaxAt(1, 1) . 1 + AssertEqual 'VimwikiTodo2', SyntaxAt(2, 1) . 2 + AssertEqual 'VimwikiTodo3', SyntaxAt(3, 1) . 3 + AssertEqual '4' , SyntaxAt(4, 1) . 4 + +Execute (Restore VimwikiTodo): + call vimwiki#vars#init() + call SetSyntax('markdown') + + +# Mardown types {{{2 + +Given vimwiki (Typeface for markdown like italic): + **bold text 1** + __bold text 2__ + *italic text 1* + _italic text 2_ + ***bold italic text 1*** + ___bold italic text 2___ + ~~strikeout text~~ + `code (no syntax) text` + sp^script^ + sb,,script,, + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax for typeface): + AssertEqual 'VimwikiBold' , SyntaxAt(1, 5) + AssertEqual 'VimwikiBold' , SyntaxAt(2, 5) + AssertEqual 'VimwikiItalic' , SyntaxAt(3, 5) + AssertEqual 'VimwikiItalic' , SyntaxAt(4, 5) + AssertEqual 'VimwikiBoldItalic' , SyntaxAt(5, 5) + AssertEqual 'VimwikiBoldItalic' , SyntaxAt(6, 5) + AssertEqual 'VimwikiDelText' , SyntaxAt(7, 5) + AssertEqual 'VimwikiCode' , SyntaxAt(8, 5) + AssertEqual 'VimwikiSuperScript' , SyntaxAt(9, 5) + AssertEqual 'VimwikiSubScript' , SyntaxAt(10, 5) + + +# 2 Links {{{1 +################# + +Given vimwiki (Wiki Links): + Plain link: > + [[This is a link]] + With description: > + [[This is a link source|Description of the link]] + Interwiki1: > + [[wiki1:This is a link]] + Interwiki2: > + [[wn.My Name:This is a link]] + Interwiki3: > + [[wn.MyWiki:This is a link source|Description of the link]] + Diary: > + [[diary:2012-03-05]] + Anchor1: > + [[Todo List#Tomorrow|Tasks for tomorrow]] + Anchor2: > + [[#Tomorrow]] + Raw1: > + https://github.com/vimwiki/vimwiki.git + Raw2: > + mailto:habamax@gmail.com + Raw3: > + ftp://vim.org + File1: > + [[file:/home/somebody/a/b/c/music.mp3]] + File2: > + [[file:C:/Users/somebody/d/e/f/music.mp3]] + File3: > + [[file:~/a/b/c/music.mp3]] + File4: > + [[file:../assets/data.csv|Important Data]] + File5: > + [[local:C:/Users/somebody/d/e/f/music.mp3]] + File6: > + [[file:/home/user/documents/|Link to a directory]] + Thumbnail links: > + [[http://someaddr.com/bigpicture.jpg|{{http://someaddr.com/thumbnail.jpg}}]] + +Execute (Assert Syntax link): + AssertEqual 'VimwikiLink', SyntaxAt(2, 6) + AssertEqual 'VimwikiLink', SyntaxAt(4, 6) + AssertEqual 'VimwikiLink', SyntaxAt(6, 6) + AssertEqual 'VimwikiLink', SyntaxAt(8, 6) + AssertEqual 'VimwikiLink', SyntaxAt(10, 6) + AssertEqual 'VimwikiLink', SyntaxAt(12, 6) + AssertEqual 'VimwikiLink', SyntaxAt(14, 6) + AssertEqual 'VimwikiLink', SyntaxAt(16, 6) + AssertEqual 'VimwikiLink', SyntaxAt(18, 6) + AssertEqual 'VimwikiLink', SyntaxAt(20, 6) + AssertEqual 'VimwikiLink', SyntaxAt(22, 6) + AssertEqual 'VimwikiLink', SyntaxAt(24, 6) + AssertEqual 'VimwikiLink', SyntaxAt(26, 6) + AssertEqual 'VimwikiLink', SyntaxAt(28, 6) + AssertEqual 'VimwikiLink', SyntaxAt(30, 6) + AssertEqual 'VimwikiLink', SyntaxAt(32, 6) + AssertEqual 'VimwikiLink', SyntaxAt(34, 6) + AssertEqual 'VimwikiLink', SyntaxAt(36, 6) + +Given vimwiki (Markdown Links): + Inline link: > + [Looks like this](URL) + + Image link: > + ![Looks like this](URL) + + Reference-style links: > + a) [Link Name][Id] + b) [Id][], using the "implicit link name" shortcut + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax link): + AssertEqual 'VimwikiWeblink1' , SyntaxAt(2, 8) + AssertEqual 'VimwikiImage' , SyntaxAt(5, 8) + AssertEqual 'VimwikiWikiLink1' , SyntaxAt(8, 8) + AssertEqual 'VimwikiWikiLink1' , SyntaxAt(9, 8) + + +# 3 Header {{{1 +############### +Given vimwiki (Markdown SetExt Headers): + One + === + two + --- + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Syntax Header SetExt): + AssertEqual 'VimwikiHeader1', SyntaxAt(1, 1) + AssertEqual 'VimwikiHeader1', SyntaxAt(2, 1) + AssertEqual 'VimwikiHeader2', SyntaxAt(3, 1) + AssertEqual 'VimwikiHeader2', SyntaxAt(4, 1) + +Given vimwiki (Wiki Headers): + = Header level 1 = + == Header level 2 == + === Header level 3 === + ==== Header level 4 ==== + ===== Header level 5 ===== + ====== Header level 6 ====== + +Execute (Set syntax default): + call SetSyntax('default') + +Execute (Assert Wiki Syntax Header): + AssertEqual 'VimwikiHeader1', SyntaxAt(1, 10) + AssertEqual 'VimwikiHeader2', SyntaxAt(2, 10) + AssertEqual 'VimwikiHeader3', SyntaxAt(3, 10) + AssertEqual 'VimwikiHeader4', SyntaxAt(4, 10) + AssertEqual 'VimwikiHeader5', SyntaxAt(5, 10) + AssertEqual 'VimwikiHeader6', SyntaxAt(6, 10) + +Given vimwiki (Markdown Headers): + # Header level 1 + ## Header level 2 + ### Header level 3 + #### Header level 4 + ##### Header level 5 + ###### Header level 6 + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert Markdown Syntax Header): + Log "Syntax of first heading: " . string(GetSyntaxStack()) + Log "Regex of rxListWithoutCb: " . vimwiki#vars#get_wikilocal('rxListItemWithoutCB') + Log "Bullet types: " . string(vimwiki#vars#get_wikilocal('bullet_types')) + AssertEqual 'VimwikiHeader1' , SyntaxAt(1, 10) + AssertEqual 'VimwikiHeader2' , SyntaxAt(2, 10) + AssertEqual 'VimwikiHeader3' , SyntaxAt(3, 10) + AssertEqual 'VimwikiHeader4' , SyntaxAt(4, 10) + AssertEqual 'VimwikiHeader5' , SyntaxAt(5, 10) + AssertEqual 'VimwikiHeader6' , SyntaxAt(6, 10) + + +# 4 Blockquote {{{1 +# Issues: #55 +############### + + +#### 4.1 Blokquotes markdown +Given vimwiki (BlockQuote restarts list numbering #55 {{{3): + 1. Item 1 + 2. Item 2 + Block Quote + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Do (Gototo): + Gototo + +Expect (Good numbering): + 1. Item 1 + 2. Item 2 + Block Quote + 3. toto + +# 9 Comment {{{1 +############### + +Given vimwiki (%%): + %% This is a line comment + %% This is also a comment + +Execute (Set syntax default): + call SetSyntax('default') + +Execute (Assert Syntax VimwikiComment): + AssertEqual 'VimwikiComment' , SyntaxAt(1, 1) + AssertEqual 'VimwikiComment' , SyntaxAt(2, 4) + +Given vimwiki (%%+, +%%): + %%+ This + is a + multiline + comment +%% + %%+ This is a comment on one line +%% + %%+ One +%% Not a comment %%+ Two +%% Not a comment + +Execute (Set syntax default): + call SetSyntax('default') + +Execute (Assert Syntax VimwikiMultilineComment): + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(1, 1) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(1, 8) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(2, 1) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(3, 1) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(4, 1) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(5, 1) + + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(6, 1) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(6, 11) + AssertEqual '' , SyntaxAt(6, 12) + AssertEqual '' , SyntaxAt(6, 26) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(6, 27) + AssertEqual 'VimwikiMultilineComment' , SyntaxAt(6, 37) + AssertEqual '' , SyntaxAt(6, 38) + AssertEqual '' , SyntaxAt(6, 51) + +# 10 Code {{{1 +# 10.1 Code Indent (4 spaces) {{{2 +################################# + +Given vimwiki (Code indent): + this is markdown + this is code + +Execute (Assert Syntax normal (i.e. no hi)): + AssertEqual SyntaxAt(1, 5), '' + AssertEqual SyntaxAt(2, 5), '' + + +# 10.2 Code Inline (1 backtick) {{{2 +################################### + +Given vimwiki (Code inline): + Well use the `man` + +Execute (Assert Syntax Code): + AssertEqual SyntaxAt(1, 16), 'VimwikiCode' + + +# 10.3 Code Block (3 backtiks) {{{2 +################################## + +Given vimwiki (Markdown, Text and Vim): + this is markdown + this is TODO + + ``` + this is text + ``` + + ```vim + " this is vim + set hlsearch + ``` + + `````vim + " this is vim + set hlsearch + ````` + + ~~~vim + " this is vim + set hlsearch + ~~~ + + ~~~~~vim + " this is vim + set hlsearch + ~~~~~~~~~~~ + +Execute (Set syntax markdown): + let g:vimwiki_global_vars['vimwiki_automatic_nested_syntaxes'] = 1 + call SetSyntax('markdown') + +Execute (Assert ft, normal syntax and VimwikiTodo): + AssertEqual &ft, 'vimwiki' + AssertEqual '', SyntaxAt(1, 1) + AssertEqual 'VimwikiTodo', SyntaxAt(2, 9) + +Execute (Assert Code syntax): + AssertEqual 'VimwikiPreDelim', SyntaxAt(4, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(5, 1) + AssertEqual 'vimLineComment' , SyntaxAt(9, 1) + AssertEqual 'vimCommand' , SyntaxAt(10, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(13, 1) + AssertEqual 'vimLineComment' , SyntaxAt(14, 1) + AssertEqual 'vimCommand' , SyntaxAt(15, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(16, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(18, 1) + AssertEqual 'vimLineComment' , SyntaxAt(19, 1) + AssertEqual 'vimCommand' , SyntaxAt(20, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(21, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(23, 1) + AssertEqual 'vimLineComment' , SyntaxAt(24, 1) + AssertEqual 'vimCommand' , SyntaxAt(25, 1) + AssertEqual 'VimwikiPre' , SyntaxAt(26, 1) + + +# 11 Math {{{1 +# 11.1 Math Markdown {{{2 +####################### + +Given vimwiki (Math markdown): + math inline: $ aaaaaaaaaaaaaa \sum_i a_i^2 = 1 $ + + math block: + $$ + \sum_i a_i^2 + = + 1 + $$ + + math block env: + $$%align% + \sum_i a_i^2 &= 1 + 1 \\ + &= 2. + $$ + +Execute (Set syntax markdown): + call SetSyntax('markdown') + +Execute (Assert math syntax 1): + AssertEqual 'textSnipTEX', SyntaxAt(1, 18) + let syntax_5 = SyntaxAt(5, 1) + Assert syntax_5 == 'texStatement' || syntax_5 == 'texMathSymbol' + let syntax_12 = SyntaxAt(12, 1) + Assert syntax_12 == 'texStatement' || syntax_5 == 'texMathSymbol' + + +# 11.2 Math Wiki {{{2 +############################## + +Given vimwiki (Math wiki): + math inline: $aaaaaaaaaaaaaaaaaaaaaaaaaa \sum_i a_i^2 = 1 $ + + math block: + {{$ + \sum_i a_i^2 + = + 1 + }}$ + + math block env: + {{$%align% + \sum_i a_i^2 &= 1 + 1 \\ + &= 2. + }}$ + +Execute (Set syntax default): + call SetSyntax('default') + +Execute (Assert math syntax 2): + AssertEqual 'textSnipTEX', SyntaxAt(1, 18) + let syntax_5 = SyntaxAt(5, 1) + Assert syntax_5 == 'texStatement' || syntax_5 == 'texMathSymbol' + let syntax_12 = SyntaxAt(12, 1) + Assert syntax_12 == 'texStatement' || syntax_5 == 'texMathSymbol' + +# 21 Highlight {{{1 +################## +Given vimwiki (One line): + content + +# GetHighlightTerm relies on execute(), which isn't available in all 7.4 +# versions. Just test this for 8.0 and up to keep things simple: +Execute (Assert highlight typeface 1): + " Typeface 1 + call AssertIfVersion(800, ['bold'], GetHighlightTerm('VimwikiBold', 'term')) + call AssertIfVersion(800, ['bold'], GetHighlightTerm('VimwikiBold', 'cterm')) + call AssertIfVersion(800, ['bold'], GetHighlightTerm('VimwikiBold', 'gui')) + call AssertIfVersion(800, ['italic'], GetHighlightTerm('VimwikiItalic', 'cterm')) + call AssertIfVersion(800, ['underline'], GetHighlightTerm('VimwikiUnderline', 'gui')) + +Execute (Assert highlight typeface 2): + " Bold > Italic > Underline + call AssertIfVersion(800, sort(['bold', 'italic', '1']), sort(add(GetHighlightTerm('VimwikiBoldItalic', 'gui'), '1'))) + call AssertIfVersion(800, sort(['bold', 'italic', '2']), sort(add(GetHighlightTerm('VimwikiBoldItalic', 'term'), '2'))) + + call AssertIfVersion(800, sort(['bold', 'underline', '3']), sort(add(GetHighlightTerm('VimwikiBoldUnderline', 'cterm'), '3'))) + call AssertIfVersion(800, sort(['bold', 'underline', '4']), sort(add(GetHighlightTerm('VimwikiUnderlineBold', 'term'), '4'))) + + call AssertIfVersion(800, sort(['italic', 'underline', '5']), sort(add(GetHighlightTerm('VimwikiItalicUnderline', 'cterm'), '5'))) + +Execute (Assert highlight typeface 3): + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '1']), sort(add(GetHighlightTerm('VimwikiBoldItalicUnderline', 'gui'), '1'))) + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '2']), sort(add(GetHighlightTerm('VimwikiBoldUnderlineItalic', 'cterm'), '2'))) + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '3']), sort(add(GetHighlightTerm('VimwikiItalicBoldUnderline', 'term'), '3'))) + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '4']), sort(add(GetHighlightTerm('VimwikiItalicUnderlineBold', 'gui'), '4'))) + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '5']), sort(add(GetHighlightTerm('VimwikiUnderlineBoldItalic', 'cterm'), '5'))) + call AssertIfVersion(800, sort(['bold', 'italic', 'underline', '6']), sort(add(GetHighlightTerm('VimwikiUnderlineItalicBold', 'term'), '6'))) + +Expect (One line): + content + + +# vim: foldmethod=marker foldlevel=30 sw=2 diff --git a/dot_vim/plugged/vimwiki/test/table.vader b/dot_vim/plugged/vimwiki/test/table.vader new file mode 100644 index 0000000..82fd417 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/table.vader @@ -0,0 +1,88 @@ +# Table autoformating +# Very configurable: read doc/design_notes.md + +# Move at end of row if next row is badly formated {{{1 +# See #1126 +########################## +Given vimwiki (Header ok but 1 row bad): + | Service to be Build | Build Tag | Service to Deploy | Deploy Tag | Comments | + |---------------------|-----------|-------------------|------------|----------| + |||Provision/Core/Keycloak|release-3.8.0_RC9|This was done as part of release-3.7.0 hotfix and is not required if you are already on Keycloak 7| + |||Provision/DataPipeline/AnalyticsSpark|release-3.8.0_RC6|| + |||OpsAdministration/Core/ESMapping|release-3.8.0_RC9|Choose `userv1,orgv2` for jenkins job parameter `indices_name`| + +Do (i at end of first line): + $i\ + +Expect(Crash (List required)): +# E714: List required <= tbl#goto_next_col, line 9 + | Service to be Build | Build Tag | Service to Deploy | Deploy Tag | Comments | + |---------------------|-----------|-------------------|------------|----------| + |||Provision/Core/Keycloak|release-3.8.0_RC9|This was done as part of release-3.7.0 hotfix and is not required if you are already on Keycloak 7| + |||Provision/DataPipeline/AnalyticsSpark|release-3.8.0_RC6|| + |||OpsAdministration/Core/ESMapping|release-3.8.0_RC9|Choose `userv1,orgv2` for jenkins job parameter `indices_name`| + + +# Move and map {{{1 +# See #1048 +########################## + +Given vimwiki (Table Number): + | A | B | C | + |---|---|---| + | 1 | 2 | 3 | + | 4 | 5 | 6 | + +Execute (testmap): + imap testmap1 VimwikiTableNextCell + imap testmap2 VimwikiTablePrevCell + +Do (2 x Next): + gga + testmap1 + testmap1 + \Z + +Expect (One Z in B): + | A | Z | C | + |---|---|---| + | 1 | 2 | 3 | + | 4 | 5 | 6 | + +Do (4 X Next): + gga + testmap1 + testmap1 + testmap1 + testmap1 + \Z + +Expect (One Z in 1): + | A | B | C | + |---|---|---| + | Z | 2 | 3 | + | 4 | 5 | 6 | + +Do (4 X Next + 1 X Prev): + gga + testmap1 + testmap1 + testmap1 + testmap1 + testmap1 + testmap2 + \Z + +Expect (One Z in 1): + | A | B | C | + |---|---|---| + | Z | 2 | 3 | + | 4 | 5 | 6 | + + +Execute (Clean #1048): + iunmap testmap1 + iunmap testmap2 + + +# vim: foldmethod=marker foldlevel=30 diff --git a/dot_vim/plugged/vimwiki/test/table_autoformat.vader b/dot_vim/plugged/vimwiki/test/table_autoformat.vader new file mode 100644 index 0000000..e5e629d --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/table_autoformat.vader @@ -0,0 +1,240 @@ +# Table autoformating +# Very configurable: read doc/design_notes.md + +# Do not consider \| {{{1 +########################## + +Given vimwiki (Table with \| #281): + | Head1 | Head2 | + | --- | --- | + | l1_1 | l1_2 | + | l2_1 \| with escaped pipe | l2_2 | + +Execute (Rename file wiki_test.md for table expand): + file wiki_test.md + call SetSyntax('markdown') + +Do (A to trigger insertLeave #281): + A + +Expect(Table aligned with \| in cells): + | Head1 | Head2 | + | --- | --- | + | l1_1 | l1_2 | + | l2_1 \| with escaped pipe | l2_2 | + + +# Do not alter config {{{1 +########################## + +Given vimwiki (Table Head \#891): + | foo | bar | + +Execute (set tw=71): + set tw=71 + AssertEqual &tw, 71 + +Do (A): + A\\ + +Expect (Table Head \#891): + | foo | bar | + | | | + +Execute (Assert tw=71): + AssertEqual &tw, 71 + +# Autoformat {{{1 +################# + +Given vimwiki (Unaligned table): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + +Execute (Rename file wiki_test.md for table expand): + file wiki_test.md + +Do (A to trigger insertLeave): + A + +Expect (Table autoformat): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + +Do (gqq to reformats table after making changes.): + gqq + +Expect (Table autoformat): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + +Execute (Option table_reduce_last_col = 1): + let g:vimwiki_global_vars['table_reduce_last_col'] = 1 + +Do (A to trigger insertLeave): + A + +Expect (Last column not expanded): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + +Execute (Option table_reduce_last_col = 0 [restore]): + let g:vimwiki_global_vars['table_reduce_last_col'] = 0 + +Execute (Option table_auto_fmt = 0): + let g:vimwiki_global_vars['table_auto_fmt'] = 0 + +Expect (Same as input): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + +Execute (Option table_auto_fmt = 1 [restore]): + let g:vimwiki_global_vars['table_auto_fmt'] = 1 + + + +# Move and edit cells {{{1 +########################## + +Do (Use in insert mode): + GI + \ + this_is_16_chars + \ + this_is_16_chars + \ + +Expect (Table autoformated with more content): + | title1 | title2 | + | - | - | + | a1 | b1 | + | this_is_16_charsa2 | this_is_16_chars | + +Do (VimwikiTableMoveColumnRight): + gg:VimwikiTableMoveColumnRight\ + +Expect (Column inverted): + | title2 | title1 | + | - | - | + | b1 | a1 | + | | a2 | + +Do (CR must insert new row): + GI\a3 + +Expect (Table with new row starting by a3): + | title1 | title2 | + | - | - | + | a1 | b1 | + | a2 | | + | a3 | | + + + + +# VimwikiTable Command {{{1 +########################### + +Given (Nothing): + +Execute (VimwikiTable): + VimwikiTable + +Expect (Table 5 x 2): + + | | | | | | + |---|---|---|---|---| + | | | | | | + +Execute (VimwikiTable 8 3): + VimwikiTable 8 3 + +Expect (Table 8 x 3): + + | | | | | | | | | + |---|---|---|---|---|---|---|---| + | | | | | | | | | + | | | | | | | | | + + +Given vimwiki (Table 5 x (1+3)): + | h1 | h2 | h3 | h4 | h5 | + |-----|-----|-----|-----|-----| + | l11 | l12 | l13 | l14 | l15 | + | l21 | l22 | l23 | l24 | l25 | + | l31 | l32 | l33 | l34 | l35 | + +Execute (VimwikiTableMoveColumnRight): + VimwikiTableMoveColumnRight + +Expect (Col: 1 -> 2): + | h2 | h1 | h3 | h4 | h5 | + |-----|-----|-----|-----|-----| + | l12 | l11 | l13 | l14 | l15 | + | l22 | l21 | l23 | l24 | l25 | + | l32 | l31 | l33 | l34 | l35 | + +Execute (VimwikiTableMoveColumnLeft): + call cursor(5, 16) + VimwikiTableMoveColumnLeft + +Expect (Col: 3 -> 2): + | h1 | h3 | h2 | h4 | h5 | + |-----|-----|-----|-----|-----| + | l11 | l13 | l12 | l14 | l15 | + | l21 | l23 | l22 | l24 | l25 | + | l31 | l33 | l32 | l34 | l35 | + +# Justify Cell Content {{{1 +########################### + + +Given vimwiki (To be justified from help file [Coffe price]): + | Date | Item | Price | + |------------|:------:|--------:| + | yest |Coffee |$15.00 | + | 2017-02-13 |Tea |$2.10 | + | 2017-03-14 |Cake |$143.12 | + +Execute (Rename file wiki_test.md for table expand): + file wiki_test.md + +Do (A to trigger insertLeave): + A + +Expect (Text justified): + | Date | Item | Price | + |------------|:------:|--------:| + | yest | Coffee | $15.00 | + | 2017-02-13 | Tea | $2.10 | + | 2017-03-14 | Cake | $143.12 | + +Given vimwiki (To be left aligned): + | Date | Item | + |:------------|------:| + |yest|Coffee | + | 2017-02-13| Tea| + |2017-03-14 |Cake | + +Do (A to trigger insertLeave): + A + +Expect (Left justified and :--- -> ----): + | Date | Item | + |------------|-------:| + | yest | Coffee | + | 2017-02-13 | Tea | + | 2017-03-14 | Cake | + + +# vim: foldmethod=marker foldlevel=30 diff --git a/dot_vim/plugged/vimwiki/test/tag.vader b/dot_vim/plugged/vimwiki/test/tag.vader new file mode 100644 index 0000000..6a178eb --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/tag.vader @@ -0,0 +1,305 @@ +# Tag generation and navigation +# Note: The Generate must be in Execute + +Execute (Setup): + set sw=4 + AssertEqual 4, &sw + + +###################################################################### +Execute (Change delimiter {{{1): + let g:vimwiki_tag_format = {'pre_mark': '<', 'post_mark': '>', 'sep': '|'} + unlet g:vimwiki_syntaxlocal_vars + call vimwiki#vars#init() + edit $HOME/testmarkdown/Test-Tag.md + AssertEqual $HOME . '/testmarkdown/Test-Tag.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + +Do (Create File Content with <>): + :edit $HOME/testmarkdown/Test-Tag.md\ + I + \ + \ + # A header\ + \ + \ + \ + # Another header\ + \ + Words here. + \ + :write\ + :VimwikiRebuildTags!\ + gg + + +Execute (Generate tags): + edit $HOME/testmarkdown/Test-Tag.md + AssertEqual 'VimwikiTag', SyntaxAt(1, 1) + VimwikiGenerateTagLinks + set tw=200 + +Expect (Correctly generated tags section {{{3): + + + # A header + + + + # Another header + + Words here. + + # Generated Tags + + ## tag-bar-1 + + - [Test-Tag](Test-Tag) + + ## tag-bar-2 + + - [A header](Test-Tag#a-header) + + ## tag-bar-3 + + - [A header](Test-Tag#a-header) + + +Do (Write a quick tag for a quick jump): + :edit $HOME/testmarkdown/Test-Tag.md\ + ggdG + I + [go1](Test-Tag#tag-bar-1)\ + [go2](#tag-bar-1)\ + bla\ + \ + ggl\A __HERE1__\ + ggjl\A __HERE2__\ + +Expect (Good jump {{{3): + [go1](Test-Tag#tag-bar-1) + [go2](#tag-bar-1) + bla + __HERE1__ __HERE2__ + +Execute (Clean Test-Tag and .vimwiki_tags -2): + let g:vimwiki_tag_format = {} + unlet g:vimwiki_syntaxlocal_vars + call vimwiki#vars#init() + call system("rm $HOME/testmarkdown/Test.md") + call system("rm $HOME/testmarkdown/.vimwiki_tags") + call system("rm $HOME/testmarkdown/Test-Tag.md") + call DeleteHiddenBuffers() + + +###################################################################### +Execute (Default tag generation {{{1): + edit $HOME/testmarkdown/Test-Tag.md + AssertEqual $HOME . '/testmarkdown/Test-Tag.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + set tw=200 + +Do (Single file Part1): + :edit $HOME/testmarkdown/Test-Tag.md\ + ggdGO + :single-tag:\ + :write\ + :VimwikiRebuildTags!\ + +Execute (Generate tags): + edit $HOME/testmarkdown/Test-Tag.md + AssertEqual 'VimwikiTag', SyntaxAt(1, 1) + VimwikiGenerateTagLinks + write + +Expect (Single tags toc): + :single-tag: + + + # Generated Tags + + ## single-tag + + - [Test-Tag](Test-Tag) + + +Do (Create File Content): + :edit $HOME/testmarkdown/Test-Tag.md\ + ggdGO + :top-tag:\ + \ + # A header\ + \ + :test-tag:\ + \ + # Another header\ + \ + Words here.\ + If tag isn't within 2 lines of header then it has a direct link instead of\ + a link to the header.\ + \ + :second-tag: + \ + :write\ + :VimwikiRebuildTags\ + +Execute (Edit tags file): + edit $HOME/testmarkdown/.vimwiki_tags + AssertEqual $HOME . '/testmarkdown/.vimwiki_tags', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + +# Note: tags file uses tabs +Expect (Correctly formatted tags file): + !_TAG_FILE_FORMAT 2 + !_TAG_FILE_SORTED 1 + !_TAG_OUTPUT_MODE vimwiki-tags + !_TAG_PROGRAM_AUTHOR Vimwiki + !_TAG_PROGRAM_NAME Vimwiki Tags + !_TAG_PROGRAM_URL https://github.com/vimwiki/vimwiki + !_TAG_PROGRAM_VERSION 2022.12.02 + second-tag Test-Tag.md 13;" vimwiki:Test-Tag\tTest-Tag#second-tag\tTest-Tag#second-tag + test-tag Test-Tag.md 5;" vimwiki:Test-Tag\tTest-Tag#a-header\tA header + top-tag Test-Tag.md 1;" vimwiki:Test-Tag\tTest-Tag\tTest-Tag + +Execute (Generate tags): + edit $HOME/testmarkdown/Test-Tag.md + VimwikiGenerateTagLinks + +Expect (Correctly generated tags section): + :top-tag: + + # A header + + :test-tag: + + # Another header + + Words here. + If tag isn't within 2 lines of header then it has a direct link instead of + a link to the header. + + :second-tag: + + + # Generated Tags + + ## second-tag + + - [second-tag](Test-Tag#second-tag) + + ## test-tag + + - [A header](Test-Tag#a-header) + + ## top-tag + + - [Test-Tag](Test-Tag) + +Execute (Clean Test-Tag and .vimwiki_tags -1 ): + call system("rm $HOME/testmarkdown/Test.md") + call system("rm $HOME/testmarkdown/.vimwiki_tags") + call system("rm $HOME/testmarkdown/Test-Tag.md") + call DeleteHiddenBuffers() + +# vim: sw=2:foldlevel=30:foldmethod=marker: + +###################################################################### +Execute (Check first tags file): + call system("mkdir -p $HOME/testmarkdown/subdir1/subdir11") + edit $HOME/testmarkdown/Test-Tag-1.md + AssertEqual $HOME . '/testmarkdown/Test-Tag-1.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + +Do (Build first tags file): + :edit $HOME/testmarkdown/Test-Tag-1.md\ + ggI + # A Header\ + :header-tag-1:\ + \ + # Another Header\ + :header-tag-2:\ + \ + :standalone-tag-1: + \ + :write\ + :VimwikiRebuildTags!\ + +Execute (Check second tags file): + edit $HOME/testmarkdown/subdir1/Test-Tag-2.md + AssertEqual $HOME . '/testmarkdown/subdir1/Test-Tag-2.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + +Do (Build second tags file): + :edit $HOME/testmarkdown/subdir1/Test-Tag-2.md\ + ggI + # A Header\ + :header-tag-1:\ + \ + # Another Header\ + :header-tag-2:\ + \ + :standalone-tag-1: + \ + :write\ + :VimwikiRebuildTags!\ + +Execute (Build tag links in third file): + edit $HOME/testmarkdown/subdir1/subdir11/Test-Tag-Links.md + AssertEqual $HOME . '/testmarkdown/subdir1/subdir11/Test-Tag-Links.md', expand('%') + AssertEqual 'markdown', vimwiki#vars#get_wikilocal('syntax') + AssertEqual 1, vimwiki#vars#get_bufferlocal('wiki_nr') + VimwikiGenerateTagLinks + write + +Expect (Tag links relative to current file): + + + # Generated Tags + + ## header-tag-1 + + - [A Header](../../Test-Tag-1#a-header) + - [A Header](../Test-Tag-2#a-header) + + ## header-tag-2 + + - [Another Header](../../Test-Tag-1#another-header) + - [Another Header](../Test-Tag-2#another-header) + + ## standalone-tag-1 + + - [standalone-tag-1](../../Test-Tag-1#standalone-tag-1) + - [standalone-tag-1](../Test-Tag-2#standalone-tag-1) + +Do (Delete some existing links to test updating generated tag links): + :edit $HOME/testmarkdown/subdir1/subdir11/Test-Tag-Links.md\ + 7G + dd + 12G + 6dd + :write\ + :call vimwiki#tags#generate_tags(0)\ + +Expect (Only update generated tag links for tags already existing in the file): + + + # Generated Tags + + ## header-tag-1 + + - [A Header](../../Test-Tag-1#a-header) + - [A Header](../Test-Tag-2#a-header) + + ## header-tag-2 + + - [Another Header](../../Test-Tag-1#another-header) + - [Another Header](../Test-Tag-2#another-header) + +Execute (Clean relative tag setup): + call system("rm -rf $HOME/testmarkdown/subdir1") + call system("rm $HOME/testmarkdown/Test-Tag-1.md") diff --git a/dot_vim/plugged/vimwiki/test/vimrc b/dot_vim/plugged/vimwiki/test/vimrc new file mode 100644 index 0000000..ab864f9 --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/vimrc @@ -0,0 +1,390 @@ +" TODO treat if local (see $HOME in all tests) +" TODO mutualise (to prettify output) mode(1) to check if in -Es or not +" TODO test tabnext in at least one travis job (without -Es) +" IDEA fasten travis difefrent job with the same vimwiki git (-8s) + +" Declare tipical Vim preambule + " vint: -ProhibitSetNoCompatible + set nocompatible + filetype plugin indent on + syntax enable + +" Usefull var: for one day, making tests on local + let $TPLUGIN = '/testplugin' + let $THOME = $HOME + +" Set chrooted virtual runtime path + let rtp=$ROOT.'/rtp.vim' + exe 'source '.rtp + + +" Load Vader + let vader=$ROOT.'/vader' + exe 'set runtimepath+='.vader + + +" Wikis configuration + " Declare default syntax + let vimwiki_default = {} + let vimwiki_default.path = $HOME . '/testwiki' + let vimwiki_default.path_html = $HOME . '/html/default' + let vimwiki_default.template_path = $HOME . '/testwiki/templates/' + let vimwiki_default.syntax = 'default' + let vimwiki_default.ext = '.wiki' + let vimwiki_default.name = 'DefaultSyntax' + let vimwiki_default.base_url = 'https://example.com/' + + " Declare markdown syntax - https://github.github.com/gfm/ + let vimwiki_markdown = {} + let vimwiki_markdown.path = $HOME . '/testmarkdown' + let vimwiki_markdown.path_html = $HOME . '/html/markdown' + let vimwiki_markdown.syntax = 'markdown' + let vimwiki_markdown.ext = '.md' + let vimwiki_markdown.name = 'MarkdownSyntax' + + " Declare mediawiki syntax - https://www.mediawiki.org/wiki/Help:Formatting + let vimwiki_mediawiki = {} + let vimwiki_mediawiki.path = $HOME . '/testmediawiki' + let vimwiki_mediawiki.path_html = $HOME . '/html/mediawiki' + let vimwiki_mediawiki.syntax = 'media' + let vimwiki_mediawiki.ext = '.mw' + let vimwiki_mediawiki.name = 'MediaWikiSyntax' + + " Declare default syntax with spaces + let vimwiki_default_space = {} + let vimwiki_default_space.path = $HOME . '/testwiki space' + let vimwiki_default_space.path_html = $HOME . '/html/testwiki space' + let vimwiki_default_space.template_path = $HOME . '/testwiki space/templates/' + let vimwiki_default_space.syntax = 'default' + let vimwiki_default_space.ext = '.wiki' + let vimwiki_default_space.name = 'DefaultSyntax' + let vimwiki_default_space.base_url = 'https://example.com/' + + " Register the 4 wikis + let g:vimwiki_list = [vimwiki_default, vimwiki_markdown, vimwiki_mediawiki, vimwiki_default_space] + let g:vimwiki_list_vimrc = [vimwiki_default, vimwiki_markdown, vimwiki_mediawiki, vimwiki_default_space] + + " Test VimwikiColorize and ,wc + let g:vimwiki_color_dic = { + \ 'default': ['', '#d79921'], + \ 'red': ['#cc241d', ''], + \ 'bred': ['', '#cc241d'], + \ 'green': ['#98971a', ''], + \ 'bgreen': ['', '#98971a'], + \ 'yellow': ['#d79921', ''], + \ 'byellow': ['', '#d79921'], + \ 'blue': ['#458588', ''], + \ 'bblue': ['', '#458588'], + \ 'purple': ['#b16286', ''], + \ 'bpurple': ['', '#b16286'], + \ 'orange': ['#d65d0e', ''], + \ 'borange': ['', '#d65d0e'], + \ 'gray': ['#a89984', ''], + \ 'bgray': ['', '#a89984']} + +" Set basic settings + " Avoid more prompt + set nomore + set backspace=indent,eol,start + set wildmode=longest:full,full + set wildmenu + set wildignorecase + set splitbelow + set splitright + set timeoutlen=600 + set ignorecase + set smartcase + set hidden + set laststatus=2 + set hlsearch + + +" Map + " Map ctrl-p/n for history completion instead of up/down arrows + cnoremap + cnoremap + + " Map jj to go back to command mode + inoremap jj + + " Use to clear the highlighting of :set hlsearch and also preserve the + " default behavior of redrawing the screen + if maparg('', 'n') ==# '' + nnoremap :nohlsearch=has('diff')?'diffupdate':'' + endif + +" Define functions + function! SetSyntax(vw_syn) + " Change the syntax using a temporary wiki + " Change extension and wiki_nr + let index=0 + if a:vw_syn ==# 'default' + let ext = 'wiki' + let index=0 + elseif a:vw_syn ==# 'markdown' + let ext = 'md' + let index=1 + elseif a:vw_syn ==# 'media' + let ext = 'mw' + let index=2 + else + Log 'ERROR: Invalid syntax "' . a:vw_syn . '" in SetSyntax()' + Log 'NOTE: function only accepts "media" for setting mediawiki syntax' + return + endif + + " Change temporary wiki + let path = expand('%:p:h') + let new_temp_wiki_settings = { + \ 'path': path, + \ 'ext': ext, + \ 'syntax': a:vw_syn, + \ 'bullet_types': g:vimwiki_wikilocal_vars[index]['bullet_types'], + \ } + + " Remove any temporary wikis each time this function is called. + " This is necessary to ensure syntax is properly set when running multiple tests + " NOTE: this assumes there are 3 defined wikis in the vimrc. The last wiki + " contains default settings for temporary wikis (so there are always + " num wikis in vimrc + 1) + let num_wikis = len(g:vimwiki_wikilocal_vars) + while num_wikis > 4 + call remove(g:vimwiki_wikilocal_vars, num_wikis - 1) + let num_wikis = num_wikis - 1 + endwhile + + " Add the new wiki + call vimwiki#vars#add_temporary_wiki(new_temp_wiki_settings) + call vimwiki#vars#set_bufferlocal('wiki_nr', 3) + + " Verify syntax was set correctly + Assert vimwiki#vars#get_wikilocal('syntax') ==# a:vw_syn, + \ 'ERROR: Vimwiki syntax not set correctly: ' + \ . 'Want: ' . a:vw_syn . ' ' + \ . 'Have: ' . vimwiki#vars#get_wikilocal('syntax') + endfunction + + function! UnloadVimwiki() + " Clear mappings so plugin can be reloaded + " this is needed if running manually multiple times + nmapclear + + " UNlet what can be + " -- Note: getcompletion not present on vim7.3 + for i in ['g:vimwiki_commentstring', + \ 'b:did_ftplugin', + \ 'g:loaded_vimwiki', + \ 'g:vimwiki_global_vars', + \ 'g:vimwiki_wikilocal_vars', + \ 'g:vimwiki_syntaxlocal_vars', + \ 'g:vimwiki_list', + \ ] + if exists(i) + exe 'unlet ' . i + endif + endfor + + " Unlet ftplugin: + " -- Vader often staty in same buffer: [Vader-workbench] + if exists('b:did_ftplugin') + unlet b:did_ftplugin + endif + endfunction + + function! LoadVimwiki() + " Source plugin + runtime! plugin/vimwiki.vim + endfunction + + function! ReloadVimwiki() + " Reload plugin to change settings + call UnloadVimwiki() + + " Reset list + let g:vimwiki_list = g:vimwiki_list_vimrc + + call LoadVimwiki() + endfunction + + function! ReloadVars() + " vars#init will not reload syntax varaible if not set + unlet g:vimwiki_syntaxlocal_vars + call vimwiki#vars#init() + endfunction + + function! CopyResources() + " Copy wiki test resources so that vimtest user can write them + call system('cp -r /testplugin/test/resources/* $HOME/') + " Make diary directory + call system('mkdir $HOME/testwiki/diary') + call system('mkdir $HOME/testmarkdown/diary') + endfunction + + function! DeleteHiddenBuffers() + " Delete Hidden buffer, usefull to clean + " See: https://stackoverflow.com/a/8459043/2544873 + let tpbl=[] + call map(range(1, tabpagenr('$')), 'extend(tpbl, tabpagebuflist(v:val))') + for buf in filter(range(1, bufnr('$')), 'bufexists(v:val) && index(tpbl, v:val)==-1') + if bufname(buf) =~? 'Vader' + continue + endif + silent execute 'bwipeout!' buf + endfor + endfunction + + function! WriteMe() + " Write current file: helper to hide `set bt=` + set buftype= + write! % + endfunction + + function! DeleteFile(path) + " Delete a file <- path + let path = expand(a:path) + " Delete file + try + call delete(path) + catch | endtry + " Delete Buffer + try + execute 'bwipeout! ' . path + catch | endtry + endfunction + + function! PrintCommand(cmd) + " Print a command output to the buffer + redir => message + silent execute a:cmd + redir END + if empty(message) + Log 'no output' + else + silent put=message + endif + endfunction + + function! DestroyVar(var) + " Destroy a variable is exists (unlet) + if ! exists(a:var) | return | endif + execute 'unlet ' . a:var + endfunction + + function! AssertTab(nr) + " Assert current tab is desired tab + " Vader is creating 2 tabs + AssertEqual a:nr + 2, tabpagenr() + endfunction + + function! ConvertWiki2Html() + " Convert current buffer: wiki -> html + " No side effect (if no bug) + " Save fbuffer number (to come back) + let g:buf_vader = bufnr('%') + + " Cut wiki content + let wiki_content = getline(1, '$') + 1,$delete + + " Paste to a named file + " Edit a new file in wiki_root + edit $HOME/testwiki/test_Convert2Html.wiki + " Ensure it is void + 1,$delete + " Write wiki content + call setline(1, wiki_content) + " Dump buffer to disk + call WriteMe() + + " Convert + """"""""" + Vimwiki2HTML + + " Cut output + edit $HOME/html/default/test_Convert2Html.html + let html_content = getline(1, '$') + 1,$delete + + " Paste output in [Vader] buffer + execute 'buffer ' . g:buf_vader + call setline(1, html_content) + + " Delete files + call DeleteFile('$HOME/html/default/test_Convert2Html.html') + call DeleteFile('$HOME/testwiki/test_Convert2Html.wiki') + endfunction + + function! ConvertWiki2Body() + " Get only body + call ConvertWiki2Html() + + " Empty b register + let @b = '' + + " Copy body + //+1,/<.body>/-1:g/^/y B + + " Delete All lines + 1,$d + + " Paste body + 0put! b + + " Remove last line + 0d + endfunction + + function! GetSyntaxGroup(line, col) + " Get normalized syntax group: usefull for boldItalic Vs italicBold + " -- Here, Vader's SyntaxAt is not enough + " From: https://stackoverflow.com/questions/9464844 + let l:s = synID(a:line, a:col, 1) + return synIDattr(synIDtrans(l:s), 'name') + endfun + + function! GetSyntaxStack() + " Debug helper + if !exists('*synstack') + return + endif + return map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') + endfunc + + function! AssertIfVersion(version, one, two) + " Run Assert only if vim version is high enough + if v:version < a:version | return | endif + AssertEqual a:one, a:two + endfunction + + function! GetHighlightTerm(group, term) + " Get output of `hi group` + " + " From: https://vi.stackexchange.com/a/12294/5026 + " Return list ['bold','underline'] + " + " Warning: must only be called if has("patch-7.4-2008") + " Or rather: If execute() exists - it's not available for all 7.4 + " versions. + " https://github.com/vim/vim/commit/79815f1ec77406f2f21a618c053e5793b597db7a + if has('patch-7.4-2008') != 1 | return [] | endif + + " Store output of group to variable + let out = execute('hi ' . a:group) + + " If links to, call parent + let parent = matchstr(out, 'links to *\zs[^ \t\n\r]*') + if parent !=# '' + " Return list_of_parent, parent + return GetHighlightTerm(parent, a:term) + endif + + " Return the unique term we are looking for + let stg = matchstr(out, a:term.'=\zs[^ \t\n\r]*') + return split(stg, ',') + endfunction + + +" Copy Wiki's Resources +call CopyResources() + +" vim: ft=vim:sw=2 diff --git a/dot_vim/plugged/vimwiki/test/z_success.vader b/dot_vim/plugged/vimwiki/test/z_success.vader new file mode 100644 index 0000000..69accbb --- /dev/null +++ b/dot_vim/plugged/vimwiki/test/z_success.vader @@ -0,0 +1,10 @@ +# Succeding test just to test the script when everything goes fine + +Given (Text v0.01): + Text + +Do (press escape): + \ + +Expect (Text): + Text diff --git a/dot_vim/spell/en.utf-8.spl b/dot_vim/spell/en.utf-8.spl new file mode 100644 index 0000000..2c5619a Binary files /dev/null and b/dot_vim/spell/en.utf-8.spl differ diff --git a/dot_vim/spell/en.utf-8.sug b/dot_vim/spell/en.utf-8.sug new file mode 100644 index 0000000..1861124 Binary files /dev/null and b/dot_vim/spell/en.utf-8.sug differ diff --git a/dot_vim/syntax/cpp11.vim b/dot_vim/syntax/cpp11.vim new file mode 100644 index 0000000..4089135 --- /dev/null +++ b/dot_vim/syntax/cpp11.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" +" This file is a modified version of the existing vim C++ +" syntax file in order to support C++11 language changes. +" +" Original Details +" ================ +" Language: C++ +" Maintainer: Ken Shan +" Last Change: 2002 Jul 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + so :p:h/cpp11_cbase.vim +else + runtime! syntax/cpp11_cbase.vim + unlet b:current_syntax +endif + +" C++ extentions +syn keyword cppStatement new delete this friend using constexpr +syn keyword cppAccess public protected private +syn keyword cppType inline virtual explicit export bool wchar_t +syn keyword cppExceptions throw try catch +syn keyword cppOperator operator typeid +syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq +syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 +syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" +syn keyword cppStorageClass mutable +syn keyword cppStructure class typename template namespace +syn keyword cppNumber NPOS +syn keyword cppBoolean true false + +" The minimum and maximum operators in GNU C++ +syn match cppMinMax "[<>]?" + +" Default highlighting +if version >= 508 || !exists("did_cpp_syntax_inits") + if version < 508 + let did_cpp_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink cppAccess cppStatement + HiLink cppCast cppStatement + HiLink cppExceptions Exception + HiLink cppOperator Operator + HiLink cppStatement Statement + HiLink cppType Type + HiLink cppStorageClass StorageClass + HiLink cppStructure Structure + HiLink cppNumber Number + HiLink cppBoolean Boolean + delcommand HiLink +endif + +let b:current_syntax = "cpp" + +" vim: ts=8 diff --git a/dot_vim/syntax/cpp11_cbase.vim b/dot_vim/syntax/cpp11_cbase.vim new file mode 100644 index 0000000..6b5d0ef --- /dev/null +++ b/dot_vim/syntax/cpp11_cbase.vim @@ -0,0 +1,380 @@ +" Vim syntax file +" +" This file is a modified version of the existing vim C +" syntax file in order to support C++11 language changes. +" +" Original Details +" ================ +" Language: C +" Maintainer: Bram Moolenaar +" Last Change: 2009 Nov 17 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn keyword cStatement goto break return continue asm +syn keyword cLabel case default +syn keyword cConditional if else switch +syn keyword cRepeat while for do + +syn keyword cTodo contained TODO FIXME XXX + +" It's easy to accidentally add a space after a backslash that was intended +" for line continuation. Some compilers allow it, which makes it +" unpredicatable and should be avoided. +syn match cBadContinuation contained "\\\s\+$" + +" cCommentGroup allows adding matches for special things in comments +syn cluster cCommentGroup contains=cTodo,cBadContinuation + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" +endif +if exists("c_no_cformat") + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell +else + if !exists("c_no_c99") " ISO C99 + syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + else + syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + endif + syn match cFormat display "%%" contained + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell +endif + +syn match cCharacter "L\='[^\\]'" +syn match cCharacter "L'[^']*'" contains=cSpecial +if exists("c_gnu") + syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" +else + syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" +endif +syn match cSpecialCharacter display "L\='\\\o\{1,3}'" +syn match cSpecialCharacter display "'\\x\x\{1,2}'" +syn match cSpecialCharacter display "L'\\x\x\+'" + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match cSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match cSpaceError display " \+\t"me=e-1 + endif +endif + +" This should be before cErrInParen to avoid problems with #define ({ xxx }) +if exists("c_curly_error") + syntax match cCurlyError "}" + syntax region cBlock start="{" end="}" contains=ALLBUT,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold +else + syntax region cBlock start="{" end="}" transparent fold +endif + +"catch errors caused by wrong parenthesis and brackets +" also accept <% for {, %> for }, <: for [ and :> for ] (C99) +" But avoid matching <::. +syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom +if exists("c_no_curly_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "^^<%\|^%>" +elseif exists("c_no_bracket_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "<%\|%>" +else + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell + syn match cParenError display "[\])]" + syn match cErrInParen display contained "<%\|%>" + syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell + " cCppBracket: same as cParen but ends at end-of-line; used in cDefine + syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell + syn match cErrInBracket display contained "[);{}]\|<%\|%>" +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal +" Same, but without octal error (for comments) +syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal +syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero +syn match cOctalZero display contained "\<0" +syn match cFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +if !exists("c_no_c99") + "hexadecimal floating point number, optional leading digits, with dot, with exponent + syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" + "hexadecimal floating point number, with leading digits, optional dot, with exponent + syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" +endif + +" flag an octal number with wrong digits +syn match cOctalError display contained "0\o*[89]\d*" +syn case match + +if exists("c_comment_strings") + " A comment can contain cString, cCharacter and cNumber. + " But a "*/" inside a cString in a cComment DOES end the comment! So we + " need to use a special type of cString: cCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region cCommentString contained start=+L\=\\\@" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +if !exists("c_no_if0") + if !exists("c_no_if0_fold") + syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 fold + else + syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 + endif + syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip + syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip +endif +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +"syn match cLineSkip "\\$" +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti +syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell + +" Highlight User Labels +syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString +syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn cluster cLabelGroup contains=cUserLabel +syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + +syn match cUserLabel display "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType +syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +if exists("c_curly_error") + syn sync fromstart +else + exec "syn sync ccomment cComment minlines=" . b:c_minlines +endif + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link cFormat cSpecial +hi def link cCppString cString +hi def link cCommentL cComment +hi def link cCommentStart cComment +hi def link cLabel Label +hi def link cUserLabel Label +hi def link cConditional Conditional +hi def link cRepeat Repeat +hi def link cCharacter Character +hi def link cSpecialCharacter cSpecial +hi def link cNumber Number +hi def link cOctal Number +hi def link cOctalZero PreProc " link this to Error if you want +hi def link cFloat Float +hi def link cOctalError cError +hi def link cParenError cError +hi def link cErrInParen cError +hi def link cErrInBracket cError +hi def link cCommentError cError +hi def link cCommentStartError cError +hi def link cSpaceError cError +hi def link cSpecialError cError +hi def link cCurlyError cError +hi def link cOperator Operator +hi def link cStructure Structure +hi def link cStorageClass StorageClass +hi def link cInclude Include +hi def link cPreProc PreProc +hi def link cDefine Macro +hi def link cIncluded cString +hi def link cError Error +hi def link cStatement Statement +hi def link cPreCondit PreCondit +hi def link cType Type +hi def link cConstant Constant +hi def link cCommentString cString +hi def link cComment2String cString +hi def link cCommentSkip cComment +hi def link cString String +hi def link cComment Comment +hi def link cSpecial SpecialChar +hi def link cTodo Todo +hi def link cBadContinuation Error +hi def link cCppSkip cCppOut +hi def link cCppOut2 cCppOut +hi def link cCppOut Comment + +let b:current_syntax = "c" + +" vim: ts=8 diff --git a/dot_vim/vimrc b/dot_vim/vimrc index f7047b9..1cb9afa 100644 --- a/dot_vim/vimrc +++ b/dot_vim/vimrc @@ -170,10 +170,9 @@ let g:clang_library_path = '/usr/lib' let g:clang_auto_select = 1 let g:clang_complete_auto = 1 let g:clang_complete_macros = 1 - let g:proj_flags='imstS' -let g:ale_completion_enabled = 1 -"set omnifunc=ale#completion#OmniFunc +set completeopt=menu,menuone,preview,noselect,noinsert +set omnifunc=ale#completion#OmniFunc " I often forget to use sudoedit. Much to my chagrin. cmap w!! %!sudo tee > /dev/null % @@ -200,10 +199,6 @@ Plug 'tpope/vim-surround' "I like ALE but it doesn't like me :( Plug 'dense-analysis/ale' Plug 'prabirshrestha/vim-lsp' -Plug 'mattn/vim-lsp-settings' -Plug 'prabirshrestha/asyncomplete.vim' -Plug 'prabirshrestha/asyncomplete-lsp.vim' -Plug 'rhysd/vim-lsp-ale' "Snippets because I am lazy Plug 'hrsh7th/vim-vsnip' Plug 'hrsh7th/vim-vsnip-integ' @@ -220,19 +215,6 @@ call plug#end() " Vimtex shi let g:vimtex_view_method = 'zathura' -let g:ale_sign_error = '>>' -let g:ale_sign_warning = '--' -let g:ale_fixers = { - \ '*': ['remove_trailing_lines', 'trim_whitespace'], -\ 'javascript': ['eslint'], -\ 'rust': ['rustfmt'], -\ 'dart': ['dartfmt'], -\} -let g:rustfmt_autosave = 1 -let g:rust_clip_command = 'xclip -selection clipboard' - -"let g:ale_linters = {'rust': ['rust-analyzer', 'cargo']} -let g:ale_fix_on_save = 1 " Tab Completion inoremap pumvisible() ? "\" : "\" @@ -248,7 +230,6 @@ au Syntax * RainbowParenthesesLoadBraces au BufReadPost,FileReadPost,BufNewFile * call system("tmux rename-window 'vim | " . expand("%:t") . "'") -au BufNewFile,BufRead *.cpp set syntax=cpp11 au BufNewFile,BufRead *.hpp set syntax=cpp11 au BufNewFile,BufRead *.mustache set ft=html diff --git a/dot_zshrc b/dot_zshrc index 07504ae..8f0a66d 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -144,7 +144,7 @@ export PATH=$PATH:/opt/gradle/gradle-6.9.4/bin export TERMINAL=kitty export MPD_HOST=127.0.0.1 export MPD_PORT=6969 -export EDITOR=nvim +export EDITOR=vim function reload_gtk_theme() { theme=$(gsettings get org.gnome.desktop.interface gtk-theme) diff --git a/private_dot_config/nvim/lua/user/init.lua b/private_dot_config/nvim/lua/user/init.lua index 9d82a24..5c98c04 100644 --- a/private_dot_config/nvim/lua/user/init.lua +++ b/private_dot_config/nvim/lua/user/init.lua @@ -243,12 +243,12 @@ local config = { requires = "nvim-lua/plenary.nvim", }, ["tamton-aquib/duck.nvim"] = {}, + ["mfussenegger/nvim-dap"] = {}, + ["mfussenegger/nvim-jdtls"] = {}, -- You can also add new plugins here as well: -- Add plugins, the packer syntax without the "use" -- { "andweeb/presence.nvim" }, - { "meatballs/notebook.nvim" }, - { 'dccsillag/magma-nvim', run = ':UpdateRemotePlugins' }, -- { -- "ray-x/lsp_signature.nvim", -- event = "BufRead", @@ -386,7 +386,6 @@ local config = { -- }, -- } end, - require('notebook') } return config