1
0
mirror of https://github.com/amix/vimrc synced 2025-07-12 14:15:00 +08:00

Updated plugins

This commit is contained in:
Amir
2024-02-11 18:33:58 +01:00
parent bef26975b3
commit f8e0ea7b78
8 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,17 @@
" Author: Akiomi Kamakura <akiomik@gmail.com>
" Description: Fixing files with biome (ex.rome).
function! ale#fixers#biome#Fix(buffer) abort
let l:executable = ale#handlers#biome#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'javascript_biome_options')
let l:node = ale#Var(a:buffer, 'javascript_biome_node_executable')
return {
\ 'command': (has('win32') ? (ale#Escape(l:node) . ' ') : '')
\ . ale#Escape(l:executable)
\ . ' check --apply'
\ . ale#Pad(l:options)
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction

View File

@ -0,0 +1,19 @@
" Author: Jonathan Palardt https://github.com/jpalardy
" Description: Integration of 'gleam format' with ALE.
call ale#Set('gleam_format_executable', 'gleam')
function! ale#fixers#gleam_format#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'gleam_format_executable')
return ale#Escape(l:executable)
endfunction
function! ale#fixers#gleam_format#Fix(buffer) abort
let l:executable = ale#fixers#gleam_format#GetExecutable(a:buffer)
return {
\ 'command': l:executable . ' format %t',
\ 'read_temporary_file': 1,
\}
endfunction

View File

@ -0,0 +1,16 @@
" Author: Yining <zhang.yining@gmail.com>
" Description: support rubyfmt as ALE fixer for Ruby files
call ale#Set('ruby_rubyfmt_executable', 'rubyfmt')
call ale#Set('ruby_rubyfmt_options', '')
function! ale#fixers#rubyfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'ruby_rubyfmt_executable')
let l:options = ale#Var(a:buffer, 'ruby_rubyfmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\}
endfunction

View File

@ -0,0 +1,14 @@
" Author: Akiomi Kamakura <akiomik@gmail.com>
" Description: Functions for working with biome, for fixing files.
call ale#Set('javascript_biome_node_executable', 'node.exe')
call ale#Set('javascript_biome_executable', 'biome')
call ale#Set('javascript_biome_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('javascript_biome_options', '')
function! ale#handlers#biome#GetExecutable(buffer) abort
return ale#path#FindExecutable(a:buffer, 'javascript_biome', [
\ 'node_modules/.bin/biome',
\ 'node_modules/@biomejs/biome/bin/biome',
\])
endfunction