mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
Support templ
This commit is contained in:
3
installer/install-templ.cmd
Normal file
3
installer/install-templ.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
call "%~dp0\go_install.cmd" github.com/a-h/templ/cmd/templ@latest
|
||||
5
installer/install-templ.sh
Normal file
5
installer/install-templ.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
"$(dirname "$0")/go_install.sh" github.com/a-h/templ/cmd/templ@latest
|
||||
@@ -826,7 +826,7 @@
|
||||
{
|
||||
"command": "racket-lsp",
|
||||
"requires": [
|
||||
"raco"
|
||||
"raco"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1028,6 +1028,20 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"templ": [
|
||||
{
|
||||
"command": "templ",
|
||||
"requires": [
|
||||
"go"
|
||||
],
|
||||
"vim_plugin": {
|
||||
"extensions": [
|
||||
"templ"
|
||||
],
|
||||
"name": "Joe-Davidson1802/templ.vim"
|
||||
}
|
||||
}
|
||||
],
|
||||
"toml": [
|
||||
{
|
||||
"command": "taplo-lsp",
|
||||
|
||||
21
settings/templ.vim
Normal file
21
settings/templ.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
augroup vim_lsp_settings_templ
|
||||
au!
|
||||
LspRegisterServer {
|
||||
\ 'name': 'templ',
|
||||
\ 'cmd': {server_info->lsp_settings#get('templ', 'cmd', [lsp_settings#exec_path('templ')]+lsp_settings#get('templ', 'args', ['lsp']))},
|
||||
\ 'root_uri':{server_info->lsp_settings#get('templ', 'root_uri', lsp_settings#root_uri('templ'))},
|
||||
\ 'initialization_options': lsp_settings#get('templ', 'initialization_options', {
|
||||
\ 'completeUnimported': v:true,
|
||||
\ 'matcher': 'fuzzy',
|
||||
\ 'codelenses': {
|
||||
\ 'generate': v:true,
|
||||
\ 'test': v:true,
|
||||
\ },
|
||||
\ }),
|
||||
\ 'allowlist': lsp_settings#get('templ', 'allowlist', ['templ']),
|
||||
\ 'blocklist': lsp_settings#get('templ', 'blocklist', []),
|
||||
\ 'config': lsp_settings#get('templ', 'config', lsp_settings#server_config('templ')),
|
||||
\ 'workspace_config': lsp_settings#get('templ', 'workspace_config', {}),
|
||||
\ 'semantic_highlight': lsp_settings#get('templ', 'semantic_highlight', {}),
|
||||
\ }
|
||||
augroup END
|
||||
Reference in New Issue
Block a user