mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
vim-patch:9.1.0425: filetype: purescript files are not recognized
Problem: filetype: purescript files are not recognized
Solution: recognize '*.purs' files as purescript filetype,
include basic purescript filetype plugin
(Riley Bruins)
Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments
closes: vim/vim#14813
155583a5c3
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
parent
70c0b03e61
commit
5c2616846a
14
runtime/ftplugin/purescript.vim
Normal file
14
runtime/ftplugin/purescript.vim
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
" Vim filetype plugin
|
||||||
|
" Language: purescript
|
||||||
|
" Maintainer: Riley Bruins <ribru17@gmail.com>
|
||||||
|
" Last Change: 2024 May 19
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setl comments=s1f:{-,mb:\ ,ex:-},:--\ \|,:--
|
||||||
|
setl commentstring=--\ %s
|
||||||
|
|
||||||
|
let b:undo_ftplugin = 'setl com< cms<'
|
@ -845,6 +845,7 @@ local extension = {
|
|||||||
psf = 'psf',
|
psf = 'psf',
|
||||||
psl = 'psl',
|
psl = 'psl',
|
||||||
pug = 'pug',
|
pug = 'pug',
|
||||||
|
purs = 'purescript',
|
||||||
arr = 'pyret',
|
arr = 'pyret',
|
||||||
pxd = 'pyrex',
|
pxd = 'pyrex',
|
||||||
pyx = 'pyrex',
|
pyx = 'pyrex',
|
||||||
|
@ -578,6 +578,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'psl': ['file.psl'],
|
\ 'psl': ['file.psl'],
|
||||||
\ 'pug': ['file.pug'],
|
\ 'pug': ['file.pug'],
|
||||||
\ 'puppet': ['file.pp'],
|
\ 'puppet': ['file.pp'],
|
||||||
|
\ 'purescript': ['file.purs'],
|
||||||
\ 'pymanifest': ['MANIFEST.in'],
|
\ 'pymanifest': ['MANIFEST.in'],
|
||||||
\ 'pyret': ['file.arr'],
|
\ 'pyret': ['file.arr'],
|
||||||
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
||||||
|
Loading…
Reference in New Issue
Block a user