mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
vim-patch:9.1.0749: filetype: http files not recognized
Problem: filetype: http files not recognized
Solution: detect '*.http' as http filetype, include
http filetype plugin (Riley Bruins)
Based on the specification found
[here](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md)
closes: vim/vim#15762
de6c1d1182
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
13
runtime/ftplugin/http.vim
Normal file
13
runtime/ftplugin/http.vim
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
" Vim filetype plugin
|
||||||
|
" Language: HTTP
|
||||||
|
" Maintainer: Riley Bruins <ribru17@gmail.com>
|
||||||
|
" Last Change: 2024 Sep 28
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setl comments=:# commentstring=#\ %s
|
||||||
|
|
||||||
|
let b:undo_ftplugin = 'setl com< cms<'
|
@ -578,6 +578,7 @@ local extension = {
|
|||||||
stm = detect.html,
|
stm = detect.html,
|
||||||
htt = 'httest',
|
htt = 'httest',
|
||||||
htb = 'httest',
|
htb = 'httest',
|
||||||
|
http = 'http',
|
||||||
hurl = 'hurl',
|
hurl = 'hurl',
|
||||||
hw = detect.hw,
|
hw = detect.hw,
|
||||||
module = detect.hw,
|
module = detect.hw,
|
||||||
|
@ -340,6 +340,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
||||||
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
||||||
\ 'html': ['file.html', 'file.htm', 'file.cshtml', 'file.component.html'],
|
\ 'html': ['file.html', 'file.htm', 'file.cshtml', 'file.component.html'],
|
||||||
|
\ 'http': ['file.http'],
|
||||||
\ 'htmlm4': ['file.html.m4'],
|
\ 'htmlm4': ['file.html.m4'],
|
||||||
\ 'httest': ['file.htt', 'file.htb'],
|
\ 'httest': ['file.htt', 'file.htb'],
|
||||||
\ 'hurl': ['file.hurl'],
|
\ 'hurl': ['file.hurl'],
|
||||||
|
Reference in New Issue
Block a user