V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  jfcherng  ›  全部回复第 3 页 / 共 18 页
回复总数  348
1  2  3  4  5  6  7  8  9  10 ... 18  
2022-12-17 21:05:17 +08:00
回复了 iMath 创建的主题 Python 能分享一下你们的 sublime lsp-pyright 配置吗?小白无从下手
建議直接用 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.
2022-12-17 18:52:06 +08:00
回复了 iMath 创建的主题 Python 能分享一下你们的 sublime lsp-pyright 配置吗?小白无从下手
理論上是個開箱即用的東西,不知道你遇到了什麼問題。

> 还有就是能否配置 nodejs 的路径?

https://www.reddit.com/r/SublimeText/comments/o5g8mk/how_to_use_lsp_with_nvm/

不過想省事的話,建議直接用 lsp_utils 提供的 node.
2022-12-04 12:47:21 +08:00
回复了 hongchaodeng 创建的主题 程序员 为什么大家这么讨厌 Electron?
@jeesk #126 https://github.com/atom/atom/releases/tag/v1.63.1

> This is the last release of Atom. We will be archiving Atom and all repositories under the Atom organization on December 15, 2022.
> You can learn more about the official sunset of Atom in our blog post.
2022-11-25 21:35:50 +08:00
回复了 shanghai1943 创建的主题 问与答 「求助」sublime4 一直弹 safe mode
2022-11-12 10:05:34 +08:00
回复了 jeeyong 创建的主题 Python [求教]lsp-pyright 该如何配置虚拟环境?
如果 pyright 不支持 venv, 你將看見 https://i.imgur.com/2iIq2p3.png
2022-11-12 10:02:18 +08:00
回复了 jeeyong 创建的主题 Python [求教]lsp-pyright 该如何配置虚拟环境?
所以我最一開始才會有疑問

> > 通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.
>
> 不知道你是怎麼辦到這件事情的

因為你跑 ST 的 build, pyright 並不參與, 但你卻說用了打印 sys.executable 獲取到了 pyright 所使用的解析器
2022-11-12 10:00:34 +08:00
回复了 jeeyong 创建的主题 Python [求教]lsp-pyright 该如何配置虚拟环境?
> LSP-pyright 是支持虚拟环境的吧?

支持啊,你圖中不就寫了用了哪個 python.exe 。
但腳本運行和 pyright 沒半點關係。
2022-11-12 09:48:53 +08:00
回复了 jeeyong 创建的主题 Python [求教]lsp-pyright 该如何配置虚拟环境?
> 但是执行的时候依旧提示:

這個跟 pyright 沒有任何關聯啊...
2022-11-11 20:23:55 +08:00
回复了 jeeyong 创建的主题 Python [求教]lsp-pyright 该如何配置虚拟环境?
老實說,我覺得你不需要做任何事情。

不過如果一定要手動的話,根據 readme https://github.com/sublimelsp/LSP-pyright#virtual-environments
{
"venvPath": ".",
"venv": "venv"
}

-------

> 通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.

不知道你是怎麼辦到這件事情的
2022-11-04 00:35:02 +08:00
回复了 brucmao 创建的主题 Python sublime text 提示 Cannot instantiate abstract class "ExcelWriter"
你的 issue 說修好的是 pylance, 不是 pyright 。pylance 是自帶一堆常用庫的 stub 的。不曉得有沒有用,不過你想嘗試的話可以裝裝看 pandas-stubs
2022-10-28 20:52:59 +08:00
回复了 qinrui 创建的主题 PHP 原来 isset($_POST) 永远是真值,!empty($_POST)才可以判断,坑人啊
2022-10-07 09:03:38 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
@brucmao #29 LSP-pyright 依賴於 builtin python syntax, 必須保證 builtin python syntax 沒有被 disable
2022-10-02 13:19:23 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
如果你習慣用鍵盤操作的話,LSP 的 default keybinding 裡有很多範例,可以自己配置一下。
2022-10-02 09:25:29 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
或者跳槽改用 LSP + LSP-pyright (狗頭
2022-10-02 09:16:51 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
requests 庫可能需要 stubs (?)

可以試試 pip install types-requests
2022-10-02 02:19:55 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
safe mode 試了一下 Anaconda : https://i.imgur.com/tQ7kxga.png
2022-10-02 02:16:58 +08:00
回复了 jeeyong 创建的主题 Python sublime 代码提示会有很多没用的内容.
雖然我沒在用 Anaconda , 不過這些 completions 看著都不像是來自 Anaconda
ST 4136 changelog 裡有一條:Improved performance while open folders are scanned for the side-bar

不知道是不是指樓主這個情況
2022-09-13 23:04:55 +08:00
回复了 itskingname 创建的主题 git 分支 merge 了很多次,怎么从里面挑选出我自己的 commit?
或許 git log --first-parent --no-merges [email protected]
2022-09-09 20:39:41 +08:00
回复了 lon91ong 创建的主题 Python windows 10 下如何升级 Python 3.9.14
同場加映 python 3.10 for win7 https://github.com/adang1345/PythonWin7
1  2  3  4  5  6  7  8  9  10 ... 18  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5549 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms · UTC 07:24 · PVG 15:24 · LAX 00:24 · JFK 03:24
Developed with CodeLauncher
♥ Do have faith in what you're doing.