summaryrefslogtreecommitdiffstats
path: root/autoload/elixir
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
commitcbde2571d4f79770ac552fe75440de72893bc73a (patch)
treec6bf43ecbf9ed76071713dc4cba028d32695987a /autoload/elixir
parentd73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (diff)
downloadvim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.tar.gz
vim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.zip
Respect symlinks for resolving vim-polyglot as fallback, closes #605
Diffstat (limited to 'autoload/elixir')
-rw-r--r--autoload/elixir/indent.vim9
-rw-r--r--autoload/elixir/util.vim9
2 files changed, 2 insertions, 16 deletions
diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim
index ccd02881..7286de16 100644
--- a/autoload/elixir/indent.vim
+++ b/autoload/elixir/indent.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'autoload/elixir/indent.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
if !exists("g:elixir_indent_max_lookbehind")
let g:elixir_indent_max_lookbehind = 30
@@ -378,5 +373,3 @@ function! elixir#indent#handle_inside_generic_block(context)
return -1
endif
endfunction
-
-endif
diff --git a/autoload/elixir/util.vim b/autoload/elixir/util.vim
index 7acc8814..e5c660f3 100644
--- a/autoload/elixir/util.vim
+++ b/autoload/elixir/util.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'autoload/elixir/util.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
function! elixir#util#get_filename(word) abort
let word = a:word
@@ -31,5 +26,3 @@ function! elixir#util#get_filename(word) abort
return word
endfunction
-
-endif