summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fish/.config/starship.toml2
-rw-r--r--vim/.config/nvim/lsp/codebook.lua40
-rw-r--r--vim/.config/nvim/lua/native-lsp.lua1
3 files changed, 42 insertions, 1 deletions
diff --git a/fish/.config/starship.toml b/fish/.config/starship.toml
index 3587f05..103c6c5 100644
--- a/fish/.config/starship.toml
+++ b/fish/.config/starship.toml
@@ -98,7 +98,7 @@ git status --porcelain | awk '
}
'
'''
-when = 'test -d .git && ! test -d .jj'
+when = 'git rev-parse --is-inside-work-tree 2>/dev/null && ! jj root 2>/dev/null'
shell = ["sh"]
format = "[](fg:overlay)[[ $output ](bg:overlay)]($style)[](fg:overlay) "
style = "bg:overlay fg:love"
diff --git a/vim/.config/nvim/lsp/codebook.lua b/vim/.config/nvim/lsp/codebook.lua
new file mode 100644
index 0000000..5bd3696
--- /dev/null
+++ b/vim/.config/nvim/lsp/codebook.lua
@@ -0,0 +1,40 @@
+---@brief
+---
+--- https://github.com/blopker/codebook
+---
+--- An unholy spell checker for code.
+---
+--- `codebook-lsp` can be installed by following the instructions [here](https://github.com/blopker/codebook/blob/main/README.md#installation).
+---
+--- The default `cmd` assumes that the `codebook-lsp` binary can be found in `$PATH`.
+---
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'codebook-lsp', 'serve' },
+ filetypes = {
+ 'c',
+ 'css',
+ 'gitcommit',
+ 'go',
+ 'haskell',
+ 'html',
+ 'java',
+ 'javascript',
+ 'javascriptreact',
+ 'lua',
+ 'markdown',
+ 'php',
+ 'python',
+ 'ruby',
+ 'rust',
+ 'swift',
+ 'toml',
+ 'text',
+ 'typescript',
+ 'typescriptreact',
+ 'typst',
+ 'zig',
+ },
+ root_markers = { '.git', 'codebook.toml', '.codebook.toml' },
+}
diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua
index ea0434d..38fdacd 100644
--- a/vim/.config/nvim/lua/native-lsp.lua
+++ b/vim/.config/nvim/lua/native-lsp.lua
@@ -78,6 +78,7 @@ vim.lsp.config('csharp-ls', {
vim.lsp.enable("csharp-ls")
vim.lsp.enable("asm-lsp")
+vim.lsp.enable("codebook")
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html