Skip to content

22GNUs/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

31a308d · Dec 30, 2024
Dec 30, 2024
Feb 7, 2023
Feb 20, 2023
Feb 20, 2023
Jan 30, 2023
Jan 21, 2023
Dec 28, 2024
Dec 30, 2024
Dec 28, 2024
Feb 23, 2024
Jan 30, 2023
Dec 30, 2024
Feb 13, 2023
Apr 16, 2023
Sep 26, 2019
Apr 16, 2023
Sep 7, 2020
Feb 7, 2018
Jan 30, 2023
Feb 23, 2024
Dec 28, 2024

Repository files navigation

配置文件

NVIM

COC

执行 :CocConfig, 配置languageserver

安装如下插件:

:CocInstall coc-snippets // 片段补全
:CocInstall coc-json // json语法
:CocInstall coc-tsserver // js, ts
{
  "languageserver": {
    "metals": {
      "command": "metals-vim",
      "rootPatterns": ["build.sbt"],
      "filetypes": ["scala", "sbt"]
    },
    "lua": {
      "command": "lua-lsp",
      "filetypes": ["lua"]
    }
  }
}

Scala

WorkSheet

  • :WorksheetStart 打开worksheet
  • :WorksheetEval 执行脚本
  • :WorksheetClean 清理worksheet
  • :WorksheetEnd close 关闭

coursier 用包管理器安装

coursier
./coursier bootstrap \
  --java-opt -Xss4m \
  --java-opt -Xms100m \
  --java-opt -Dmetals.client=coc.nvim \
  org.scalameta:metals_2.12:0.7.6 \
  -r bintray:scalacenter/releases \
  -r sonatype:snapshots \
  -o /usr/local/bin/metals-vim -f

确保 metals-vim 可执行

进入VIM后可以手动执行 :call CocRequestAsync('metals', 'workspace/executeCommand', { 'command': 'build-import' }) 执行 build

检查安装是否正确:

:call CocRequestAsync('metals', 'workspace/executeCommand', { 'command': 'doctor-run' })

Lua

使用 luaRocks 安装 lua 的lsp-server

luarocks install --local --server=http://luarocks.org/dev lua-lsp
luarocks install --local luacheck
luarocks install --local lcf

在Vim内执行 :CocInstall coc-lua 安装客户端

ruby

使用 coc-solargraph

gem install solargraph

再通过coc安装

:CocInstall coc-solargraph

About

My personal dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published