2024-10-13 19:08:30 +02:00
|
|
|
" Vim filetype plugin file
|
2025-04-13 17:58:32 +02:00
|
|
|
" Language: Gleam
|
|
|
|
" Maintainer: Kirill Morozov <kirill@robotix.pro>
|
|
|
|
" Previous Maintainer: Trilowy (https://github.com/trilowy)
|
2025-04-24 21:28:56 +02:00
|
|
|
" Based On: https://github.com/gleam-lang/gleam.vim
|
|
|
|
" Last Change: 2025 Apr 21
|
2024-10-13 19:08:30 +02:00
|
|
|
|
|
|
|
if exists('b:did_ftplugin')
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let b:did_ftplugin = 1
|
|
|
|
|
2025-04-24 21:28:56 +02:00
|
|
|
setlocal comments=:////,:///,://
|
2024-10-13 19:08:30 +02:00
|
|
|
setlocal commentstring=//\ %s
|
2025-04-13 17:58:32 +02:00
|
|
|
setlocal formatprg=gleam\ format\ --stdin
|
2025-04-24 21:28:56 +02:00
|
|
|
setlocal suffixesadd=.gleam
|
|
|
|
let b:undo_ftplugin = "setlocal com< cms< fp< sua<"
|
2025-04-16 18:29:15 +02:00
|
|
|
|
|
|
|
if get(g:, "gleam_recommended_style", 1)
|
|
|
|
setlocal expandtab
|
|
|
|
setlocal shiftwidth=2
|
2025-04-24 21:28:56 +02:00
|
|
|
setlocal smartindent
|
2025-04-16 18:29:15 +02:00
|
|
|
setlocal softtabstop=2
|
2025-04-24 21:28:56 +02:00
|
|
|
setlocal tabstop=2
|
|
|
|
let b:undo_ftplugin ..= " | setlocal et< sw< si< sts< ts<"
|
|
|
|
endif
|
|
|
|
|
|
|
|
if !exists('current_compiler')
|
|
|
|
compiler gleam_build
|
|
|
|
let b:undo_ftplugin ..= "| compiler make"
|
2025-04-16 18:29:15 +02:00
|
|
|
endif
|
2024-10-13 19:08:30 +02:00
|
|
|
|
|
|
|
" vim: sw=2 sts=2 et
|