Skip to content

Commit 1ae9112

Browse files
Cheatermanpuremourning
authored andcommitted
Use tsserver to drive vue-typescript-plugin (fix Vue file completion)
1 parent 8020125 commit 1ae9112

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

third_party/tsserver/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"description": "ycmd tsserver runtime area with required typescript version and plugins",
33
"dependencies": {
4-
"typescript": "5.7.2"
4+
"typescript": "5.7.2",
5+
"@vue/language-server": "^3.0.6",
6+
"@vue/typescript-plugin": "^3.0.6"
57
}
68
}

ycmd/completers/vue/hook.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2020 ycmd contributors
2+
#
3+
# This file is part of ycmd.
4+
#
5+
# ycmd is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# ycmd is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with ycmd. If not, see <http://www.gnu.org/licenses/>.
17+
18+
from ycmd.completers.typescript.typescript_completer import (
19+
ShouldEnableTypeScriptCompleter, TypeScriptCompleter )
20+
21+
22+
def GetCompleter( user_options ):
23+
if not ShouldEnableTypeScriptCompleter( user_options ):
24+
return None
25+
26+
return TypeScriptCompleter( user_options )

0 commit comments

Comments
 (0)