Ubuntu环境Helix结合LSP(Language Server Protocol)

之前在 FreeBSD环境Helix结合LSP(Language Server Protocol) 实践中遇到一些挫折,我暂时改为采用 Ubuntu镜像(纯粹版本) 运行容器中 Ubuntu安装Helix

安装Helix

使用Helix官方维护的PPA安装Helix:

通过安装 software-properties-common 获得 apt-add-repository
sudo apt install software-properties-common -y
sudo apt update
通过Helix官方PPA安装helix
sudo add-apt-repository ppa:maveonair/helix-editor
sudo apt update
sudo apt install helix

备注

为了能够简化环境,我在 Ubuntu镜像(纯粹版本) 时,采用复制 /etc/apt/sources.list.d/maveonair-ubuntu-helix-editor-noble.sources 配置文件来添加仓库进行安装

安装LSP

Ubuntu镜像(纯粹版本) 方式相同,首先安装语言和对应的LSP:

  • 安装 Go LSP:

安装LSP
go install golang.org/x/tools/gopls@latest && \
    go install github.com/nametake/golangci-lint-langserver@latest && \
    go install github.com/go-delve/delve/cmd/dlv@latest