BeyondCodeBootcamp / BeyondCodeBootcamp/vim-ale-hello-world

VimScript & Plugin Notes

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

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',
\})
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

issue #7 の VimScript notes、参照されている autoload/ale/fix/registry.vim path、およびリンクされている ALE pull request を確認してください。編集する前に、これらの notes をどこに置くべきか、またどの material を scope に含めるべきかを明確にしてください。現在、issue では documentation file も completion criterion も指定されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
vim
領域
documentation
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。