]> git.madduck.net Git - etc/vim.git/blob - autoload/ale/dhall.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / autoload / ale / dhall.vim
1 " Author: Pat Brisbin <pbrisbin@gmail.com>, toastal <toastal@protonmail.com>
2 " Description: Functions for working with Dhall’s executable
3
4 call ale#Set('dhall_executable', 'dhall')
5 call ale#Set('dhall_use_global', get(g:, 'ale_use_global_executables', 0))
6 call ale#Set('dhall_options', '')
7
8 function! ale#dhall#GetExecutable(buffer) abort
9     let l:executable = ale#Var(a:buffer, 'dhall_executable')
10
11     " Dhall is written in Haskell and commonly installed with Stack
12     return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'dhall')
13 endfunction
14
15 function! ale#dhall#GetExecutableWithOptions(buffer) abort
16     let l:executable = ale#dhall#GetExecutable(a:buffer)
17
18     return l:executable
19     \   . ale#Pad(ale#Var(a:buffer, 'dhall_options'))
20 endfunction
21
22 function! ale#dhall#GetCommand(buffer) abort
23     return '%e ' . ale#Pad(ale#Var(a:buffer, 'dhall_options'))
24 endfunction