Add LSP servers rescriptls and purescriptls
- Add djot vim syntax - Switch back from sqlls to sqls - Add a tiny program to update external vim syntax files - Update dependencies like usual (go.mod and lazy-lock.json)
This commit is contained in:
parent
fc90dd9857
commit
f33c82e25b
|
@ -0,0 +1,85 @@
|
|||
" Vim syntax file
|
||||
" Language: Djot
|
||||
" Maintainer: John MacFarlane
|
||||
" Latest Revision: 2022-10-06
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match heading '^##* .*$'
|
||||
syn match blockquote '^\s*>\%(\s\|$\)'
|
||||
|
||||
syn region math matchgroup=delimiter skip='[^`]{1,}' start='[$][$]\?\z(``*\)' end='\z1\|^\s*$'
|
||||
syn region codespan matchgroup=delimiter skip='[^`]{1,}' start='\z(``*\)' end='\z1\|^\s*$'
|
||||
|
||||
syn region comment matchgroup=delimiter start='%' end='%' contained
|
||||
syn region string start='"' end='"' skip='\\"'
|
||||
syn region attributes matchgroup=delimiter start="{[^\[\]_*'\"=\\+-]\@=" end="}" contains=string,comment
|
||||
|
||||
syn region emphasis matchgroup=delimiter start='_[^\s}]\@=\|{_' end='_}\|[^\s{]\@=_\|^\s*$' contains=@inline
|
||||
syn region strong matchgroup=delimiter start='\*[^\s}]\@=\|{\*' end='[^\s{]\@=\*\|\*}\|^\s*$' contains=@inline
|
||||
|
||||
syn region superscript matchgroup=delimiter start='\^[^\s}]\@=\|{\^' end='\^}\|[^\s{]\@=\^\|^\s*$' contains=@inline
|
||||
syn region subscript matchgroup=delimiter start='\~[^\s}]\@=\|{\~' end='\~}\|[^\s{]\@=\~\|^\s*$' contains=@inline
|
||||
|
||||
syn region highlight matchgroup=delimiter start='{=' end='=}\|^\s*$' contains=@inline
|
||||
syn match rawattribute "`\@<={=[A-Za-z0-9]*}"
|
||||
|
||||
syn region insert matchgroup=delimiter start='{+' end='+}\|^\s*$' contains=@inline
|
||||
syn region delete matchgroup=delimiter start='{-' end='-}\|^\s*$' contains=@inline
|
||||
|
||||
syn match inlinelink '\[\%([^\]\\]\|\\[\]\\]\|[\r\n]\)*\](\%([^)\\]\|\\[)\\]\)*)' contains=@inline transparent
|
||||
syn match linkurl '(\%([^)\\]\|\\[)\\]\)*)'hs=s+1,he=e-1 containedin=inlinelink contained
|
||||
|
||||
syn match referencelink '\[\%([^\]\\]\|\\[\]\\]\|[\r\n]\)*\]\[\%([^]\\]\|\\[]\\]\)*\]' contains=@inline transparent
|
||||
syn match linklabel '\]\zs\[\%([^]\\]\|\\[]\\]\)*\]'hs=s+1,he=e-1 containedin=referencelink contained
|
||||
|
||||
syn match span '\[\%([^\]\\]\|\\[\]\\]\|[\r\n]\)*\][{]\@=' contains=@inline transparent
|
||||
|
||||
syn match footnoteref '\[\^[^]]*\]'
|
||||
|
||||
syn match openbrace /[{]["']/he=e-1
|
||||
syn match closebrace /["'][}]/hs=s+1
|
||||
|
||||
syn match emoji ':[a-zA-Z0-9_+-]\+:'
|
||||
|
||||
syn match escape '\\[\r\n ~!@#$%^&*(){}`\[\]/=\\?+|\'",<-]'he=e-1
|
||||
|
||||
syn region djotautolinkurl matchgroup=delimiter start=/</ end=/>/
|
||||
|
||||
syn cluster inline contains=linkurl,emphasis,strong,codespan,attributes,rawattribute,insert,delete,superscript,subscript,highlight,math,smartquote,openbrace,closebrace,emoji,escape,footnoteref,span
|
||||
|
||||
syn region codeblock matchgroup=delimiter start='^\s*\z(````*\)\s*=\?\w*\s*$' end='^\s*\z1`*\s*$'
|
||||
|
||||
hi emphasis term=italic cterm=italic gui=italic
|
||||
hi strong term=bold cterm=bold gui=bold
|
||||
hi def link insert Todo
|
||||
hi def link delete Error
|
||||
hi def link superscript Statement
|
||||
hi def link subscript Statement
|
||||
hi def link highlight Todo
|
||||
hi def link heading Label
|
||||
hi def link codespan Tag
|
||||
hi def link math Statement
|
||||
hi def link emoji Statement
|
||||
hi def link span Statement
|
||||
hi def link codeblock Tag
|
||||
hi def link string String
|
||||
hi def link inlinelink Typedef
|
||||
hi def link footnoteref Statement
|
||||
hi def link linkurl Underlined
|
||||
hi def link djotautolinkurl Underlined
|
||||
hi def link comment Comment
|
||||
hi def link linklabel Underlined
|
||||
hi def link escaped Typedef
|
||||
hi def link attributes Identifier
|
||||
hi def link rawattribute Identifier
|
||||
hi def link delimiter Ignore
|
||||
hi def link escape Ignore
|
||||
hi def link openbrace Ignore
|
||||
hi def link closebrace Ignore
|
||||
hi def link blockquote Comment
|
||||
|
||||
let b:current_syntax = "djot"
|
||||
|
|
@ -78,4 +78,4 @@ hi def link kclBraces Delimiter
|
|||
let b:current_syntax = "kcl"
|
||||
if main_syntax == 'kcl'
|
||||
unlet main_syntax
|
||||
endif
|
||||
endif
|
|
@ -1,6 +1,3 @@
|
|||
" Source: https://github.com/nfnty/vim-nftables
|
||||
" License: MIT
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
|
|
@ -11,14 +11,16 @@ syntax keyword resBoolean true false
|
|||
" Keywords
|
||||
syntax keyword resKeyword let rec type external mutable lazy private of with
|
||||
syntax keyword resKeyword if else switch when
|
||||
syntax keyword resKeyword and as open include module in constraint import export
|
||||
syntax keyword resKeyword for to downto while
|
||||
syntax keyword resKeyword try catch exception assert
|
||||
syntax keyword resKeyword and as module constraint import export
|
||||
syntax keyword resInclude open include
|
||||
syntax keyword resRepeat for to downto while in
|
||||
syntax keyword resException try catch exception assert
|
||||
syntax keyword resKeyword async await
|
||||
|
||||
" Types
|
||||
syntax keyword resType bool int float char string unit
|
||||
syntax keyword resType list array option ref exn format
|
||||
syntax keyword resType bool int float char string unit promise
|
||||
syntax keyword resType array option ref exn format
|
||||
syntax match resType "list{\@!"
|
||||
|
||||
" Operators
|
||||
syntax keyword resOperator mod land lor lxor lsl lsr asr
|
||||
|
@ -44,9 +46,11 @@ syntax match resOperator "\v\>\="
|
|||
syntax match resOperator "\v\@"
|
||||
|
||||
syntax match resOperator "\v\!"
|
||||
syntax match resOperator "\v\|"
|
||||
syntax match resOperator "\v\&"
|
||||
|
||||
" Delimiter
|
||||
syntax match resDelimiter "\v\|"
|
||||
|
||||
" Refs
|
||||
syntax match resOperator "\v\:\="
|
||||
|
||||
|
@ -56,6 +60,9 @@ syntax match resArrowPipe "\v\-\>"
|
|||
syntax match resArrowPipe "\v\|\>"
|
||||
syntax match resArrowPipe "\v\@\@"
|
||||
|
||||
" Builtin functions
|
||||
syntax match resFunction "list{\@="
|
||||
|
||||
" Comment
|
||||
syntax region resSingleLineComment start="//" end="$" contains=resTodo,@Spell
|
||||
syntax region resMultiLineComment start="/\*\s*" end="\*/" contains=@Spell,resTodo,resMultiLineComment
|
||||
|
@ -76,7 +83,10 @@ syntax match resModuleOrVariant "\v<[A-Z][A-Za-z0-9_'$]*"
|
|||
syntax match resModuleChain "\v<[A-Z][A-Za-z0-9_'$]*\."
|
||||
|
||||
" Attribute
|
||||
syntax match resAttribute "\v\@([a-zA-z][A-Za-z0-9_']*)(\.([a-zA-z])[A-Za-z0-9_']*)*"
|
||||
syntax match resAttribute "\v(\@|\@\@)([a-zA-z][A-Za-z0-9_']*)(\.([a-zA-z])[A-Za-z0-9_']*)*"
|
||||
|
||||
" Extension
|
||||
syntax match resExtension "\v(\%|\%\%)([a-zA-z][A-Za-z0-9_']*)(\.([a-zA-z])[A-Za-z0-9_']*)*"
|
||||
|
||||
" String
|
||||
syntax match resUnicodeChar "\v\\u[A-Fa-f0-9]\{4}" contained
|
||||
|
@ -85,6 +95,9 @@ syntax match resInterpolatedStringEscapeSeq "\v\\[\\`ntbrf]" contained
|
|||
|
||||
syntax region resString start="\v\"" end="\v\"" contains=resStringEscapeSeq,resUnicodeChar
|
||||
|
||||
" Custom Operator
|
||||
syntax region resCustomOperator start="\v\\\"" end="\v\""
|
||||
|
||||
" Interpolation
|
||||
syntax match resInterpolationVariable "\v\$[a-z_][A-Za-z0-0_'$]*" contained
|
||||
syntax region resInterpolationBlock matchgroup=resInterpolationDelimiters start="\v\$\{" end="\v\}" contained contains=TOP
|
||||
|
@ -97,11 +110,27 @@ syntax match resPolyVariant "\v#[0-9]+"
|
|||
syntax match resPolyVariant "\v#\".*\""
|
||||
syntax match resPolyVariant "\v#\\\".*\""
|
||||
|
||||
" Errors
|
||||
syn match resBraceErr "}"
|
||||
syn match resBrackErr "\]"
|
||||
syn match resParenErr ")"
|
||||
syn match resArrErr "|]"
|
||||
|
||||
" Enclosing delimiters
|
||||
syn region resNone transparent matchgroup=resEncl start="(" matchgroup=resEncl end=")" contains=ALLBUT,resParenErr
|
||||
syn region resNone transparent matchgroup=resEncl start="{" matchgroup=resEncl end="}" contains=ALLBUT,resBraceErr
|
||||
syn region resNone transparent matchgroup=resEncl start="\[" matchgroup=resEncl end="\]" contains=ALLBUT,resBrackErr
|
||||
syn region resNone transparent matchgroup=resEncl start="\[|" matchgroup=resEncl end="|\]" contains=ALLBUT,resArrErr
|
||||
|
||||
highlight default link resBoolean Boolean
|
||||
highlight default link resKeyword Keyword
|
||||
highlight default link resInclude Include
|
||||
highlight default link resException Exception
|
||||
highlight default link resRepeat Repeat
|
||||
highlight default link resType Type
|
||||
highlight default link resOperator Operator
|
||||
highlight default link resArrowPipe Operator
|
||||
highlight default link resDelimiter Operator
|
||||
highlight default link resSingleLineComment Comment
|
||||
highlight default link resMultiLineComment Comment
|
||||
highlight default link resTodo TODO
|
||||
|
@ -118,5 +147,9 @@ highlight default link resString String
|
|||
highlight default link resInterpolationDelimiters Macro
|
||||
highlight default link resInterpolationVariable Macro
|
||||
highlight default link resAttribute PreProc
|
||||
highlight default link resExtension PreProc
|
||||
highlight default link resEncl Keyword
|
||||
highlight default link resFunction Function
|
||||
highlight default link resCustomOperator String
|
||||
|
||||
let b:current_syntax = "rescript"
|
||||
|
|
|
@ -14,6 +14,7 @@ vim.filetype.add {
|
|||
['terraform.tfstate'] = 'json',
|
||||
},
|
||||
extension = {
|
||||
dj = 'djot',
|
||||
gwl = 'wisp',
|
||||
http = 'http',
|
||||
hurl = 'hurl',
|
||||
|
|
20
go.mod
20
go.mod
|
@ -1,15 +1,17 @@
|
|||
module nvim
|
||||
|
||||
go 1.20
|
||||
go 1.21
|
||||
|
||||
toolchain go1.22.0
|
||||
|
||||
require (
|
||||
github.com/go-playground/validator/v10 v10.16.0
|
||||
github.com/goccy/go-yaml v1.11.2
|
||||
github.com/go-playground/validator/v10 v10.18.0
|
||||
github.com/goccy/go-yaml v1.11.3
|
||||
github.com/neovim/go-client v1.2.2-0.20230716041012-dd77a916541b
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.8.0
|
||||
golang.org/x/sync v0.6.0
|
||||
mvdan.cc/sh/v3 v3.7.0
|
||||
mvdan.cc/sh/v3 v3.8.0
|
||||
)
|
||||
|
||||
require (
|
||||
|
@ -18,14 +20,14 @@ require (
|
|||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/leodido/go-urn v1.2.4 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
golang.org/x/crypto v0.18.0 // indirect
|
||||
golang.org/x/net v0.20.0 // indirect
|
||||
golang.org/x/sys v0.16.0 // indirect
|
||||
golang.org/x/term v0.16.0 // indirect
|
||||
golang.org/x/crypto v0.19.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.17.0 // indirect
|
||||
golang.org/x/term v0.17.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
|
||||
)
|
||||
|
|
55
go.sum
55
go.sum
|
@ -1,29 +1,35 @@
|
|||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
|
||||
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE=
|
||||
github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
||||
github.com/goccy/go-yaml v1.11.2 h1:joq77SxuyIs9zzxEjgyLBugMQ9NEgTWxXfz2wVqwAaQ=
|
||||
github.com/goccy/go-yaml v1.11.2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U=
|
||||
github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I=
|
||||
github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
|
@ -33,7 +39,8 @@ github.com/neovim/go-client v1.2.2-0.20230716041012-dd77a916541b h1:JDchP8fWykRz
|
|||
github.com/neovim/go-client v1.2.2-0.20230716041012-dd77a916541b/go.mod h1:UBsOERb5epbeQT0nyPTZkmUPTffRYBcHvrXXidr1NQQ=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
|
@ -42,26 +49,22 @@ github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyh
|
|||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
|
||||
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
|
||||
|
@ -70,5 +73,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
mvdan.cc/sh/v3 v3.7.0 h1:lSTjdP/1xsddtaKfGg7Myu7DnlHItd3/M2tomOcNNBg=
|
||||
mvdan.cc/sh/v3 v3.7.0/go.mod h1:K2gwkaesF/D7av7Kxl0HbF5kGOd2ArupNTX3X44+8l8=
|
||||
mvdan.cc/sh/v3 v3.8.0 h1:ZxuJipLZwr/HLbASonmXtcvvC9HXY9d2lXZHnKGjFc8=
|
||||
mvdan.cc/sh/v3 v3.8.0/go.mod h1:w04623xkgBVo7/IUK89E0g8hBykgEpN0vgOj3RJr6MY=
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "0358c7e159e5502361bf3971d89bf5133bcc2893" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "a93078f016d3216f4ab4e4c65306b65212314d8d" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "3748e87a316a68754341cdffcef44fee61dee51c" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "1356b9ef31b985d541d94314f2cf73c61124bf1d" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
||||
"better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
|
||||
"carbon-now.nvim": { "branch": "main", "commit": "16e843489ba00493466170919abfe144fc9aa158" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "0ca30a4fd8429bffb6394f4ee27166fb4ff29fbf" },
|
||||
|
@ -42,7 +42,7 @@
|
|||
"neoconf.nvim": { "branch": "main", "commit": "faab415b0ba57f0a15a82210f346f662e6551e1a" },
|
||||
"neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
|
||||
"neogit": { "branch": "master", "commit": "0d0879b0045fb213c328126969a3317c0963d34a" },
|
||||
"neotest": { "branch": "master", "commit": "f6048f32be831907fb15018af2688ff6633704fc" },
|
||||
"neotest": { "branch": "master", "commit": "4440cc2227894c2ae9b0673a30e6cc6f1836e8c2" },
|
||||
"neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" },
|
||||
"neotest-jest": { "branch": "main", "commit": "959d45b133de938c79e3f064db188680eaf69055" },
|
||||
"neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" },
|
||||
|
@ -58,26 +58,26 @@
|
|||
"nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" },
|
||||
"nvim-lint": { "branch": "master", "commit": "85fe14d080d902dcc566461f0205495d0c153372" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ec7d51a619049c7c597f469f81ea199db6794651" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b1a11b042d015df5b8f7f33aa026e501b639c649" },
|
||||
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "6f1f407d712d1c451451db74ff3a6eb72190548d" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "e4a259f05032983c8611ca150ac25f1df62c0871" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "db12bd416e2764420047e4a5d6b96fe44e4377d5" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "b8d1ffe58a88e0356da56b167373e89c4579ce15" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "7f00d94543f1fd37cab2afa2e9a6cd54e1c6b9ef" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0bb67ef952ea3eb7b1bac9c011281471d99a27bc" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" },
|
||||
"oil.nvim": { "branch": "master", "commit": "132b4ea0740c417b9d717411cab4cf187e1fd095" },
|
||||
"orgmode": { "branch": "master", "commit": "32388f9fc80a9a01c9b0a4355a978448f0f82e0c" },
|
||||
"orgmode": { "branch": "master", "commit": "845be5c60a00b6695a75d9d31f3809088cccafad" },
|
||||
"overseer.nvim": { "branch": "master", "commit": "4855aefcf335bbac71eea9c6a888958fb1ed1e1a" },
|
||||
"pantran.nvim": { "branch": "main", "commit": "461799624948bfb66f73b20b6fffa7e4c8ca6d08" },
|
||||
"parinfer-rust": { "branch": "master", "commit": "0e4d52e712641ad351a1bfe6cee3d34d63ed087b" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "161eb67a82ee269d1037df64c6d5a05bd5860d32" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "64b7006a36cec099da7eaeb056c4a27dd5d73342" },
|
||||
"rest.nvim": { "branch": "main", "commit": "c27a0bcb84ab5534d89065d638119ed2dbbae189" },
|
||||
"scope.nvim": { "branch": "main", "commit": "cd27af77ad61a7199af5c28d27013fb956eb0e3e" },
|
||||
"sniprun": { "branch": "master", "commit": "0079f9c4675a6825f84e108bbff866f67dd8762f" },
|
||||
|
@ -86,7 +86,7 @@
|
|||
"telescope-file-browser.nvim": { "branch": "master", "commit": "48ffb8de688a22942940f50411d5928631368848" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "c3572358e60817f40f0de31bc01906af0993d4c4" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2e1e382df42467029b493c143c2e727028140214" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
|
||||
|
|
|
@ -226,10 +226,25 @@ return {
|
|||
|
||||
-- TODO: implement handlers for LSP extensions
|
||||
-- Ref: https://github.com/ocaml/ocaml-lsp#lsp-extensions
|
||||
ocamllsp = { root_dir = lsputil.root_pattern('*.opam', '.ocamlformat', 'esy.json', 'dune-project', 'dune-workspace', '.git') },
|
||||
ocamllsp = {
|
||||
root_dir = lsputil.root_pattern('*.opam', '.ocamlformat', 'esy.json', 'dune-project', 'dune-workspace', '.git'),
|
||||
},
|
||||
|
||||
-- please = { cmd = { 'build_langserver', '--mode', 'stdio' } },
|
||||
|
||||
purescriptls = {
|
||||
cmd = { servers_path .. '/purescriptls/node_modules/.bin/purescript-language-server', '--stdio' },
|
||||
root_dir = lsputil.root_pattern('spago.dhall', 'spago.yaml', 'bower.json', 'psc-package.json'),
|
||||
|
||||
-- Ref: https://github.com/nwolverson/vscode-ide-purescript/blob/master/package.json
|
||||
settings = {
|
||||
purescript = {
|
||||
-- addNpmPath = true,
|
||||
formatter = 'purs-tidy',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- TODO: switch to pylyzer when it is more stable
|
||||
pylsp = {
|
||||
cmd = { servers_path .. '/pylsp/bin/pylsp' },
|
||||
|
@ -255,10 +270,22 @@ return {
|
|||
single_file_support = false,
|
||||
},
|
||||
|
||||
rescriptls = {
|
||||
cmd = { servers_path .. '/rescriptls/node_modules/.bin/rescript-language-server', '--stdio' },
|
||||
init_options = {
|
||||
extensionConfiguration = {
|
||||
allowBuiltInFormatter = true,
|
||||
askToStartBuild = false,
|
||||
codeLens = true,
|
||||
inlayHints = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
ruff_lsp = { cmd = { servers_path .. '/ruff_lsp/bin/ruff-lsp' } },
|
||||
|
||||
-- TODO: look into the maintained version of sqls
|
||||
sqlls = { cmd = { servers_path .. '/sqlls/node_modules/.bin/sql-language-server', 'up', '--method', 'stdio' } },
|
||||
-- use neoconf on each project to override `cmd` to `sqls -config sqls.yml`.
|
||||
sqls = { root_dir = lsputil.root_pattern('sqls.yml') },
|
||||
|
||||
svelte = { cmd = { servers_path .. '/svelte/node_modules/.bin/svelteserver', '--stdio' } },
|
||||
|
||||
|
@ -304,10 +331,14 @@ return {
|
|||
local global_ts = vim.fn.stdpath('data') .. '/lsp/volar/node_modules/typescript/lib'
|
||||
local found_ts = ''
|
||||
|
||||
if lsputil.search_ancestors(dir, function(path)
|
||||
if
|
||||
lsputil.search_ancestors(dir, function(path)
|
||||
found_ts = lsputil.path.join(path, 'node_modules', 'typescript', 'lib')
|
||||
if lsputil.path.exists(found_ts) then return path end
|
||||
end) then
|
||||
if lsputil.path.exists(found_ts) then
|
||||
return path
|
||||
end
|
||||
end)
|
||||
then
|
||||
return found_ts
|
||||
end
|
||||
return global_ts
|
||||
|
|
12
pkgs.yaml
12
pkgs.yaml
|
@ -87,6 +87,10 @@ ocamllsp:
|
|||
script:
|
||||
- opam install ocaml-lsp-server ocamlformat
|
||||
|
||||
purescriptls:
|
||||
<<: *nodejs_lsp
|
||||
pkgs: [purescript-language-server]
|
||||
|
||||
pylsp:
|
||||
category: [lsp]
|
||||
type: python
|
||||
|
@ -103,15 +107,15 @@ remark_ls:
|
|||
<<: *nodejs_lsp
|
||||
pkgs: [remark-language-server]
|
||||
|
||||
rescriptls:
|
||||
<<: *nodejs_lsp
|
||||
pkgs: ['@rescript/language-server']
|
||||
|
||||
ruff_lsp:
|
||||
category: [lsp]
|
||||
type: python
|
||||
pkgs: [ruff-lsp]
|
||||
|
||||
sqlls:
|
||||
<<: *nodejs_lsp
|
||||
pkgs: [sql-language-server]
|
||||
|
||||
svelte:
|
||||
<<: *nodejs_lsp
|
||||
pkgs: [svelte-language-server]
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/neovim/go-client/nvim"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var nvim_config_dir string
|
||||
|
||||
var syntaxes = map[string]string{
|
||||
"djot.vim": "https://github.com/jgm/djot/raw/main/editors/vim/syntax/djot.vim",
|
||||
"gohtmltmpl.vim": "https://github.com/fatih/vim-go/raw/master/syntax/gohtmltmpl.vim",
|
||||
"gotexttmpl.vim": "https://github.com/fatih/vim-go/raw/master/syntax/gotexttmpl.vim",
|
||||
"jinja.vim": "https://gitlab.com/HiPhish/jinja.vim/-/raw/master/syntax/jinja.vim",
|
||||
"kcl.vim": "https://github.com/kcl-lang/kcl.nvim/raw/main/syntax/kcl.vim",
|
||||
"nftables.vim": "https://github.com/nfnty/vim-nftables/raw/master/syntax/nftables.vim",
|
||||
"rescript.vim": "https://github.com/rescript-lang/vim-rescript/raw/master/syntax/rescript.vim",
|
||||
"vifm.vim": "https://github.com/vifm/vifm.vim/raw/master/syntax/vifm.vim",
|
||||
}
|
||||
|
||||
func main() {
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
DisableTimestamp: true,
|
||||
DisableQuote: true,
|
||||
})
|
||||
logrus.SetOutput(os.Stderr)
|
||||
logrus.SetLevel(logrus.InfoLevel)
|
||||
|
||||
// Intentionally don't handle any errors from this point (only log them to stderr).
|
||||
// They're not really important in this small program.
|
||||
|
||||
vim, err := nvim.NewChildProcess(nvim.ChildProcessArgs("--embed"))
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if err := vim.ExecLua("return vim.fn.stdpath(...)", &nvim_config_dir, "config"); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
vim.Close()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
for name, url := range syntaxes {
|
||||
wg.Add(1)
|
||||
go func(name, url string) {
|
||||
defer wg.Done()
|
||||
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
out, err := os.OpenFile(filepath.Join(nvim_config_dir, "after", "syntax", name), os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o644)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
_, err = out.ReadFrom(resp.Body)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}(name, url)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
Loading…
Reference in New Issue