mirror of
https://github.com/amix/vimrc
synced 2025-07-09 18:55:01 +08:00
Revert "Merge from original repo"
This commit is contained in:
@ -1,63 +0,0 @@
|
||||
" Author: Carl Smedstad <carl.smedstad at protonmail dot com>
|
||||
" 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
|
||||
\ . ' %t'
|
||||
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',
|
||||
\})
|
@ -3,15 +3,12 @@
|
||||
|
||||
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
|
||||
|
||||
@ -22,5 +19,5 @@ call ale#linter#Define('proto', {
|
||||
\ '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',
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||
\})
|
||||
|
@ -2,7 +2,7 @@
|
||||
" 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_executable', 'volar-server')
|
||||
call ale#Set('vue_volar_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('vue_volar_init_options', {
|
||||
\ 'documentFeatures': {
|
||||
@ -73,7 +73,7 @@ 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'])},
|
||||
\ 'executable': {b -> ale#path#FindExecutable(b, 'vue_volar', ['node_modules/.bin/volar-server'])},
|
||||
\ 'command': '%e --stdio',
|
||||
\ 'project_root': function('ale_linters#vue#volar#GetProjectRoot'),
|
||||
\ 'initialization_options': function('ale_linters#vue#volar#GetInitializationOptions'),
|
||||
|
@ -1,49 +0,0 @@
|
||||
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:
|
||||
" (<unknown>): 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',
|
||||
\})
|
@ -139,7 +139,7 @@ let s:should_complete_map = {
|
||||
" Regular expressions for finding the start column to replace with completion.
|
||||
let s:omni_start_map = {
|
||||
\ '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$',
|
||||
\ 'racket': '\k\+$',
|
||||
\ 'racket': '\k\+',
|
||||
\}
|
||||
|
||||
" A map of exact characters for triggering LSP completions. Do not forget to
|
||||
|
@ -203,10 +203,6 @@ function! ale#engine#SetResults(buffer, loclist) abort
|
||||
call ale#highlight#SetHighlights(a:buffer, a:loclist)
|
||||
endif
|
||||
|
||||
if 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.
|
||||
@ -214,7 +210,7 @@ function! ale#engine#SetResults(buffer, loclist) abort
|
||||
call ale#cursor#EchoCursorWarning()
|
||||
endif
|
||||
|
||||
if g:ale_virtualtext_cursor == 1
|
||||
if g:ale_virtualtext_cursor
|
||||
" Try and show the warning now.
|
||||
" This will only do something meaningful if we're in normal mode.
|
||||
call ale#virtualtext#ShowCursorWarning()
|
||||
|
@ -139,7 +139,7 @@ function! ale#events#Init() abort
|
||||
autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif
|
||||
endif
|
||||
|
||||
if g:ale_virtualtext_cursor == 1
|
||||
if g:ale_virtualtext_cursor
|
||||
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
|
||||
|
@ -221,11 +221,6 @@ let s:default_registry = {
|
||||
\ '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'],
|
||||
|
@ -1,19 +0,0 @@
|
||||
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
|
@ -1,7 +1,6 @@
|
||||
" Author: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch>
|
||||
" Author: Kevin Clark <kevin.clark@gmail.com>
|
||||
" Author: D. Ben Knoble <ben.knoble+github@gmail.com>
|
||||
" Author: Shaun Duncan <shaun.duncan@gmail.com>
|
||||
" Description: Floating preview window for showing whatever information in.
|
||||
|
||||
" Precondition: exists('*nvim_open_win') || has('popupwin')
|
||||
@ -134,18 +133,15 @@ function! s:NvimPrepareWindowContent(lines) abort
|
||||
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)
|
||||
|
||||
let l:winid = nvim_open_win(l:buffer, v:false, {
|
||||
\ 'relative': 'cursor',
|
||||
\ 'row': 1,
|
||||
\ 'col': 0,
|
||||
\ 'width': 42,
|
||||
\ 'height': 4,
|
||||
\ 'style': 'minimal'
|
||||
\ })
|
||||
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)
|
||||
@ -155,8 +151,7 @@ function! s:NvimCreate(options) abort
|
||||
endfunction
|
||||
|
||||
function! s:VimCreate(options) abort
|
||||
" default options
|
||||
let l:popup_opts = extend({
|
||||
let l:popup_id = popup_create([], {
|
||||
\ 'line': 'cursor+1',
|
||||
\ 'col': 'cursor',
|
||||
\ 'drag': v:true,
|
||||
@ -175,9 +170,7 @@ function! s:VimCreate(options) abort
|
||||
\ 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
|
||||
@ -211,21 +204,3 @@ function! s:VimClose() abort
|
||||
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
|
||||
|
@ -29,8 +29,6 @@ function! ale#handlers#deno#GetProjectRoot(buffer) abort
|
||||
endif
|
||||
|
||||
let l:possible_project_roots = [
|
||||
\ 'deno.json',
|
||||
\ 'deno.jsonc',
|
||||
\ 'tsconfig.json',
|
||||
\ '.git',
|
||||
\ bufname(a:buffer),
|
||||
|
@ -339,10 +339,6 @@ 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)
|
||||
|
@ -141,10 +141,6 @@ function! s:HandleLSPErrorMessage(linter_name, response) abort
|
||||
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', {})
|
||||
@ -153,7 +149,7 @@ function! ale#lsp_linter#AddErrorMessage(linter_name, message) abort
|
||||
let g:ale_lsp_error_messages[a:linter_name] = []
|
||||
endif
|
||||
|
||||
call add(g:ale_lsp_error_messages[a:linter_name], a:message)
|
||||
call add(g:ale_lsp_error_messages[a:linter_name], l:message)
|
||||
endfunction
|
||||
|
||||
function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort
|
||||
@ -434,8 +430,6 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
|
||||
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 wont't start.")
|
||||
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
@ -14,8 +14,8 @@ function! s:DisablePostamble() abort
|
||||
call ale#highlight#UpdateHighlights()
|
||||
endif
|
||||
|
||||
if g:ale_virtualtext_cursor == 1
|
||||
call ale#virtualtext#Clear(bufnr(''))
|
||||
if g:ale_virtualtext_cursor
|
||||
call ale#virtualtext#Clear()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
@ -8,59 +8,52 @@ let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10)
|
||||
let s:cursor_timer = -1
|
||||
let s:last_pos = [0, 0, 0]
|
||||
let s:has_virt_text = 0
|
||||
let s:emulate_virt = 0
|
||||
|
||||
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')
|
||||
call prop_type_add('ale', {})
|
||||
let s:last_popup = -1
|
||||
let s:has_virt_text = 1
|
||||
let s:emulate_virt = !has('patch-9.0.0297')
|
||||
let s:hl_list = []
|
||||
|
||||
if s:emulate_virt
|
||||
call prop_type_add('ale', {})
|
||||
let s:last_virt = -1
|
||||
endif
|
||||
endif
|
||||
|
||||
function! ale#virtualtext#Clear(buf) abort
|
||||
function! ale#virtualtext#Clear() abort
|
||||
if !s:has_virt_text
|
||||
return
|
||||
endif
|
||||
|
||||
let l:buffer = bufnr('')
|
||||
|
||||
if has('nvim')
|
||||
call nvim_buf_clear_namespace(a:buf, s:ns_id, 0, -1)
|
||||
call nvim_buf_clear_highlight(l:buffer, s:ns_id, 0, -1)
|
||||
else
|
||||
if s:emulate_virt && s:last_virt != -1
|
||||
if s:last_popup != -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:buf})
|
||||
call popup_close(s:last_popup)
|
||||
let s:last_popup = -1
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#virtualtext#ShowMessage(message, hl_group, buf, line) abort
|
||||
if !s:has_virt_text || !bufexists(str2nr(a:buf))
|
||||
function! ale#virtualtext#ShowMessage(message, hl_group) abort
|
||||
if !s:has_virt_text
|
||||
return
|
||||
endif
|
||||
|
||||
let l:line = line('.')
|
||||
let l:buffer = bufnr('')
|
||||
let l:prefix = get(g:, 'ale_virtualtext_prefix', '> ')
|
||||
let l:msg = l:prefix.trim(substitute(a:message, '\n', ' ', 'g'))
|
||||
|
||||
if has('nvim')
|
||||
call nvim_buf_set_virtual_text(a:buf, s:ns_id, a:line-1, [[l:msg, a:hl_group]], {})
|
||||
elseif s:emulate_virt
|
||||
call nvim_buf_set_virtual_text(l:buffer, s:ns_id, l:line-1, [[l:msg, a:hl_group]], {})
|
||||
else
|
||||
let l:left_pad = col('$')
|
||||
call prop_add(a:line, l:left_pad, {
|
||||
call prop_add(l:line, l:left_pad, {
|
||||
\ 'type': 'ale',
|
||||
\})
|
||||
let s:last_virt = popup_create(l:msg, {
|
||||
let s:last_popup = popup_create(l:msg, {
|
||||
\ 'line': -1,
|
||||
\ 'padding': [0, 0, 0, 1],
|
||||
\ 'mask': [[1, 1, 1, 1]],
|
||||
@ -70,19 +63,6 @@ function! ale#virtualtext#ShowMessage(message, hl_group, buf, line) abort
|
||||
\ 'wrap': 0,
|
||||
\ 'zindex': 2
|
||||
\})
|
||||
else
|
||||
let type = prop_type_get(a:hl_group)
|
||||
|
||||
if type == {}
|
||||
call add(s:hl_list, a:hl_group)
|
||||
call prop_type_add(a:hl_group, {'highlight': a:hl_group})
|
||||
endif
|
||||
|
||||
call prop_add(a:line, 0, {
|
||||
\ 'type': a:hl_group,
|
||||
\ 'text': ' ' . l:msg,
|
||||
\ 'bufnr': a:buf
|
||||
\})
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@ -93,26 +73,8 @@ function! s:StopCursorTimer() abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#virtualtext#GetHlGroup(type, style) abort
|
||||
if a:type is# 'E'
|
||||
if a:style is# 'style'
|
||||
return 'ALEVirtualTextStyleError'
|
||||
else
|
||||
return 'ALEVirtualTextError'
|
||||
endif
|
||||
elseif a:type is# 'W'
|
||||
if a:style is# 'style'
|
||||
return 'ALEVirtualTextStyleWarning'
|
||||
else
|
||||
return 'ALEVirtualTextWarning'
|
||||
endif
|
||||
else
|
||||
return 'ALEVirtualTextInfo'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#virtualtext#ShowCursorWarning(...) abort
|
||||
if g:ale_virtualtext_cursor != 1
|
||||
if !g:ale_virtualtext_cursor
|
||||
return
|
||||
endif
|
||||
|
||||
@ -128,21 +90,35 @@ function! ale#virtualtext#ShowCursorWarning(...) abort
|
||||
|
||||
let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer)
|
||||
|
||||
call ale#virtualtext#Clear(l:buffer)
|
||||
call ale#virtualtext#Clear()
|
||||
|
||||
if !empty(l:loc)
|
||||
let l:msg = l:loc.text
|
||||
let l:hl_group = 'ALEVirtualTextInfo'
|
||||
let l:type = get(l:loc, 'type', 'E')
|
||||
let l:style = get(l:loc, 'sub_type', '')
|
||||
let l:hl_group = ale#virtualtext#GetHlGroup(l:type, l:style)
|
||||
call ale#virtualtext#ShowMessage(l:msg, l:hl_group, l:buffer, line('.'))
|
||||
|
||||
if l:type is# 'E'
|
||||
if get(l:loc, 'sub_type', '') is# 'style'
|
||||
let l:hl_group = 'ALEVirtualTextStyleError'
|
||||
else
|
||||
let l:hl_group = 'ALEVirtualTextError'
|
||||
endif
|
||||
elseif l:type is# 'W'
|
||||
if get(l:loc, 'sub_type', '') is# 'style'
|
||||
let l:hl_group = 'ALEVirtualTextStyleWarning'
|
||||
else
|
||||
let l:hl_group = 'ALEVirtualTextWarning'
|
||||
endif
|
||||
endif
|
||||
|
||||
call ale#virtualtext#ShowMessage(l:msg, l:hl_group)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#virtualtext#ShowCursorWarningWithDelay() abort
|
||||
let l:buffer = bufnr('')
|
||||
|
||||
if g:ale_virtualtext_cursor != 1
|
||||
if !g:ale_virtualtext_cursor
|
||||
return
|
||||
endif
|
||||
|
||||
@ -169,19 +145,3 @@ function! ale#virtualtext#ShowCursorWarningWithDelay() abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#virtualtext#SetTexts(buf, loclist) abort
|
||||
if !has('nvim') && s:emulate_virt
|
||||
return
|
||||
endif
|
||||
|
||||
call ale#virtualtext#Clear(a:buf)
|
||||
|
||||
for l in a:loclist
|
||||
if l['bufnr'] != a:buf
|
||||
continue
|
||||
endif
|
||||
|
||||
let hl = ale#virtualtext#GetHlGroup(l['type'], get(l, 'sub_type', ''))
|
||||
call ale#virtualtext#ShowMessage(l['text'], hl, a:buf, l['lnum'])
|
||||
endfor
|
||||
endfunction
|
||||
|
@ -1,24 +0,0 @@
|
||||
===============================================================================
|
||||
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:
|
@ -219,25 +219,5 @@ g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options*
|
||||
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:
|
||||
|
@ -52,8 +52,6 @@ Notes:
|
||||
* `buildifier`
|
||||
* BibTeX
|
||||
* `bibclean`
|
||||
* Bicep
|
||||
* `bicep`
|
||||
* BitBake
|
||||
* `oelint-adv`
|
||||
* Bourne Shell
|
||||
@ -531,7 +529,6 @@ Notes:
|
||||
* `solargraph`
|
||||
* `sorbet`
|
||||
* `standardrb`
|
||||
* `syntax_tree`
|
||||
* Rust
|
||||
* `cargo`!!
|
||||
* `cspell`
|
||||
@ -667,7 +664,6 @@ Notes:
|
||||
* YAML
|
||||
* `actionlint`
|
||||
* `circleci`!!
|
||||
* `gitlablint`
|
||||
* `prettier`
|
||||
* `spectral`
|
||||
* `swaglint`
|
||||
|
@ -42,7 +42,7 @@ volar *ale-vue-volar*
|
||||
g:ale_vue_volar_executable *g:ale_vue_volar_executable*
|
||||
*b:ale_vue_volar_executable*
|
||||
Type: |String|
|
||||
Default: `'vue-language-server'`
|
||||
Default: `'volar-server'`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
@ -280,52 +280,5 @@ g:ale_yaml_yamllint_options *g:ale_yaml_yamllint_options*
|
||||
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:
|
||||
|
@ -1234,29 +1234,6 @@ g:ale_floating_preview *g:ale_floating_preview*
|
||||
|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|
|
||||
@ -2297,9 +2274,6 @@ g:ale_virtualtext_cursor *g:ale_virtualtext_cursor*
|
||||
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.
|
||||
When this option is set to `2`, then all warnings will be shown for the
|
||||
whole buffer, regardless of if the cursor is currently positioned in that
|
||||
line.
|
||||
|
||||
Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|.
|
||||
|
||||
@ -2787,8 +2761,6 @@ documented in additional help files.
|
||||
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|
|
||||
@ -3195,7 +3167,6 @@ documented in additional help files.
|
||||
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|
|
||||
@ -3331,7 +3302,6 @@ documented in additional help files.
|
||||
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|
|
||||
|
@ -322,7 +322,7 @@ nnoremap <silent> <Plug>(ale_go_to_definition_in_vsplit) :ALEGoToDefinition -vsp
|
||||
nnoremap <silent> <Plug>(ale_go_to_type_definition) :ALEGoToTypeDefinition<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_type_definition_in_tab) :ALEGoToTypeDefinition -tab<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_type_definition_in_split) :ALEGoToTypeDefinition -split<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinition -vsplit<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinitionIn -vsplit<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_implementation_in_tab) :ALEGoToImplementation -tab<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_implementation_in_split) :ALEGoToImplementation -split<Return>
|
||||
nnoremap <silent> <Plug>(ale_go_to_implementation_in_vsplit) :ALEGoToImplementation -vsplit<Return>
|
||||
|
@ -61,8 +61,6 @@ formatting.
|
||||
* [buildifier](https://github.com/bazelbuild/buildtools)
|
||||
* BibTeX
|
||||
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
||||
* Bicep
|
||||
* [bicep](https://github.com/Azure/bicep)
|
||||
* BitBake
|
||||
* [oelint-adv](https://github.com/priv-kweihmann/oelint-adv)
|
||||
* Bourne Shell
|
||||
@ -540,7 +538,6 @@ formatting.
|
||||
* [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)
|
||||
@ -676,7 +673,6 @@ formatting.
|
||||
* 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:
|
||||
|
Reference in New Issue
Block a user