summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-10-21 11:31:15 +0100
committerGitHub <noreply@github.com>2017-10-21 11:31:15 +0100
commit3878be99771d81571789f5595bf082c63ed61755 (patch)
tree25c89c902fd399ade62a9fc6274bdb7e550ff0f2 /autoload
parent346c91fb6bd455cf0c4dfbf1abe016d6032d59f5 (diff)
parentb43ed6baf59c4fc9bf0de89db78870343ceec2ec (diff)
downloadale-3878be99771d81571789f5595bf082c63ed61755.zip
Merge pull request #1018 from zkourouma/master
Pretter fixer support for Less filetype
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix/registry.vim2
-rw-r--r--autoload/ale/fixers/prettier.vim2
2 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/fix/registry.vim b/autoload/ale/fix/registry.vim
index 93ddf0f5..d26c71ab 100644
--- a/autoload/ale/fix/registry.vim
+++ b/autoload/ale/fix/registry.vim
@@ -39,7 +39,7 @@ let s:default_registry = {
\ },
\ 'prettier': {
\ 'function': 'ale#fixers#prettier#Fix',
-\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss'],
+\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less'],
\ 'description': 'Apply prettier to a file.',
\ },
\ 'prettier_eslint': {
diff --git a/autoload/ale/fixers/prettier.vim b/autoload/ale/fixers/prettier.vim
index 4adc3b08..d66e00f0 100644
--- a/autoload/ale/fixers/prettier.vim
+++ b/autoload/ale/fixers/prettier.vim
@@ -49,7 +49,7 @@ function! ale#fixers#prettier#Fix(buffer) abort
if match(l:options, '--parser') == -1
if l:filetype is# 'typescript'
let l:parser = 'typescript'
- elseif l:filetype =~# 'css\|scss'
+ elseif l:filetype =~# 'css\|scss\|less'
let l:parser = 'postcss'
elseif l:filetype is# 'json'
let l:parser = 'json'