Sublime Text 4中LSP-Typescript无法识别element.style且无自动补全的问题求助
Sublime Text 4中LSP-Typescript无法识别element.style且无自动补全的问题求助
大家好,我目前在Sublime Text 4里用LSP-Typescript做JavaScript的自动补全,整体功能都正常,但碰到个头疼的问题——它识别不了element.style,也没法给出对应的自动补全提示。有没有大佬能帮忙支支招?
示例代码
index.html
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> </head> <body> <div id='mainDIV'></div> <script src="script.js"></script> </body> </html>
style.css
#mainDIV { width: 200px; height: 200px; background: blue; }
script.js
const mainDIV = document.querySelector("#mainDIV"); mainDIV.style.backgroundColor = 'lightblue';
备注:内容来源于stack exchange,提问作者ckc
相关产品推荐
相关产品推荐

