Skip to content

Commit

Permalink
patch 9.1.0425: filetype: purescript files are not recognized
Browse files Browse the repository at this point in the history
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: #14813

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
ribru17 authored and chrisbra committed May 20, 2024
1 parent aa3104b commit 155583a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ runtime/ftplugin/postscr.vim @mrdubya
runtime/ftplugin/prisma.vim @ribru17
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/purescript.vim @ribru17
runtime/ftplugin/pymanifest.vim @ObserverOfTime
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
Expand Down
3 changes: 3 additions & 0 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,9 @@ au BufNewFile,BufRead *.pk setf poke
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols

" Purescript
au BufNewFile,BufRead *.purs setf purescript

" PyPA manifest files
au BufNewFile,BufRead MANIFEST.in setf pymanifest

Expand Down
14 changes: 14 additions & 0 deletions runtime/ftplugin/purescript.vim
Original file line number Diff line number Diff line change
@@ -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<'
1 change: 1 addition & 0 deletions src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ def s:GetFilenameChecks(): dict<list<string>>
psl: ['file.psl'],
pug: ['file.pug'],
puppet: ['file.pp'],
purescript: ['file.purs'],
pymanifest: ['MANIFEST.in'],
pyret: ['file.arr'],
pyrex: ['file.pyx', 'file.pxd'],
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
425,
/**/
424,
/**/
Expand Down

0 comments on commit 155583a

Please sign in to comment.