
还有就是能否配置 nodejs 的路径?
1 jfcherng 2022-12-17 18:52:06 +08:00 理上是箱即用的西,不知道你遇到了什。 > 还有就是能否配置 nodejs 的路径? https://www.reddit.com/r/SublimeText/comments/o5g8mk/how_to_use_lsp_with_nvm/ 不想省事的,建直接用 lsp_utils 提供的 node. |
3 jfcherng 2022-12-17 21:05:17 +08:00 建直接用 lsp_utils 提供的 node 省事。lsp_utils 找不到 node 要不要下版才是,然後它下便版放在某他自己管理的地方,使用它跑 pyright 。 > 因为我下载的是便携版的 nodejs ,想问问看怎么设置了让 lsp-pyright 正常工作起来 已了。 add the following to your LSP-* config. "env": { "PATH": "$PATH:YOUR_NODE_DIR" } Or just install Node.js via LSP. |
4 iMath OP @jfcherng 多谢啦!不好意思,后面我没办法就放弃用便携版的执念改用安装到 C 盘的方式了,现在已经正常工作了。 BTW ,不知道你是否知道怎么解决我这个问题 https://stackoverflow.com/questions/74834145/let-sublimetext-run-last-used-build-command |
5 jfcherng 2022-12-17 21:26:18 +08:00 我自己除非是文件用的本,否不怎用 ST 自己的 build system ,我向直接在外部的 shell 做事情。 不知道你用不用 Makefile ,如果 project root 有 Makefile 的,不管在哪文件,build system 都可以 Makefile 。 |
6 jfcherng 2022-12-17 21:32:52 +08:00 好吧,了一下。Makefile 在 Windows 的 ST 用, /bin/sh 找不到的。。。 |
7 iMath OP @jfcherng 谢谢回复!主要还是:“I expect there is a feature to remember last build command so that I can repeat last command by some shortcut.”这样子才方便我运行其他的一些非 project 内的各种用途的 script 。 |
8 jfcherng 2022-12-17 21:36:35 +08:00 ST 的 project settings 例中好有 build system 的例子 https://www.sublimetext.com/docs/projects.html#project-format |
11 iMath OP |
14 zhuangzhuang1988 2022-12-17 22:11:16 +08:00 歪个楼 还是用 vscode 吧 vscode 用的增强的 pyright -》 pylance |
15 iMath OP @jfcherng 我有点懒写.sublime-project file ,希望能实现一个运行上次的 build command 的功能,况且这个功能也不能局限于 project ,它在各种不同功能的 scripts 之间切换也会用得到。 另外据我了解你说到的 automatic build 应该只是一种自动选择 build system 的机制而不是“一直都是跑上次所定的 build system”吧? |
16 jfcherng 2022-12-17 22:25:59 +08:00 @iMath #15 > 据我了解你说到的 automatic build 应该只是一种自动选择 build system 的机制而不是“一直都是跑上次所定的 build system”吧? ST 底怎的不可。在察上,我他每次都行上次定的 build |
17 iMath OP @jfcherng 我理解的 automatic build 和你说的可能有差别,我理解成[这里的`selector`选项]( https://sublime-text-unofficial-documentation.readthedocs.io/en/sublime-text-2/reference/build_systems.html#build-system-specific-options) |
18 jfcherng 2022-12-17 22:45:53 +08:00 @iMath #17 以後,project-specific build system + auto build = 一直都是跑上次所定的 build system |
19 jfcherng 2022-12-17 22:53:07 +08:00 selector 可以留空,等於永匹配 |