BeyondCodeBootcamp / BeyondCodeBootcamp/vim-ale-hello-world
VimScript & Plugin Notes
- Lingua principale
- Shell
- Stelle
- 1
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Just putting these somewhere so I don't lose them.
# vimscript 101
```text
' string
['a', 'b'] list
{ 'key': 'value' } map
" comment
\ escape previous newline+whitespace
# filepath
TitleCase function name
```
# How to add a fixer?
DO NOT use hyphens in the file name!! `ajscript_fmt.vim` vs `ajscript-fmt.vim`
See
`autoload/ale/fix/registry.vim`
```vim
# ale#fix#registry#Add(name, func, filetypes, desc, ...)
ale#fix#registry#Add(
\ 'ajscript-fmt',
\ 'ale#fixers#ajscript_fmt#Fix',
\ ['javascript', 'ajscript'],
\ 'Apply AJScript format to a file.'
\)
```
```text
\ 'ajscript-fmt': {
\ 'function': 'ale#fixers#ajscript_fmt#Fix',
\ 'suggested_filetypes': ['javascript', 'ajscript'],
\ 'description': 'Apply AJScript format to a file.',
\ },
```
```text
" g: global var
" a: function argument
" b: ?? variable
" l: function-local variable
" %t means current filename (says gpt)
" :h means dirname (head)
" :t means filename (tail)
```
```vim
function! ale#fixers#ajscript_fmt#GetCwd(buffer) abort
let l:config = ale#path#FindNearestFile(a:buffer, '.ajscript.json')
" Fall back to the directory of the buffer
return !empty(l:config) ? fnamemodify(l:config, ':h') : '%s:h'
endfunction
```
# LSP Server
```vim
call ale#linter#Define('filetype_here', {
\ 'name': 'any_name_you_want',
\ 'lsp': 'socket',
\ 'address': 'servername:1234',
\ 'project_root': '/path/to/root_of_project',
\})
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Esamina le note VimScript nell'issue #7, il percorso referenziato autoload/ale/fix/registry.vim e la pull request di ALE collegata. Chiarisci dove dovrebbero essere collocate queste note e quale materiale rientra nell'ambito prima di modificare; attualmente l'issue non indica alcun file di documentazione né alcun criterio di completamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- vim
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100