beyondcodebootcamp / vim-ale-hello-world Goto Github PK
View Code? Open in Web Editor NEWA simple Hello World-style tutorial for a plugin for vim-ale
License: Mozilla Public License 2.0
A simple Hello World-style tutorial for a plugin for vim-ale
License: Mozilla Public License 2.0
It looks like vim-ale
supports autocomplete.
I'd be interested to see what that could look like.
Could probably prototype with vscode-language-server (but it seems like it's wicked slow, so maybe not production?).
let g:ale_completion_enabled = 1
let g:ale_lsp_suggestions = 1
~/.vim/pack/plugins/start/ale/
doc/ale-supported-languages-and-tools.txt
autoload/ale/completion.vim
autoload/ale/lsp.vim
plugin/ale.vim
Just putting these somewhere so I don't lose them.
' string
['a', 'b'] list
{ 'key': 'value' } map
" comment
\ escape previous newline+whitespace
# filepath
TitleCase function name
DO NOT use hyphens in the file name!! ajscript_fmt.vim
vs ajscript-fmt.vim
See https://github.com/dense-analysis/ale/pull/4427/files
autoload/ale/fix/registry.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.'
\)
\ 'ajscript-fmt': {
\ 'function': 'ale#fixers#ajscript_fmt#Fix',
\ 'suggested_filetypes': ['javascript', 'ajscript'],
\ 'description': 'Apply AJScript format to a file.',
\ },
" 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)
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
https://www.toptal.com/javascript/language-server-protocol-tutorial
call ale#linter#Define('filetype_here', {
\ 'name': 'any_name_you_want',
\ 'lsp': 'socket',
\ 'address': 'servername:1234',
\ 'project_root': '/path/to/root_of_project',
\})
vscode-language-server
is bloated and slow.
We could make something very simple for linting (and maybe even auto-completion) runs very quickly.
Need to test to make sure that it's not so slow when the language server is fast (maybe the bottleneck is somewhere else?).
See ./events/.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.