diff --git a/.gitignore b/.gitignore index 2a88912..220659e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ config/fish/completions config/fish/conf.d config/fish/fish_variables config/fish/functions/* +file_dictionaries/ diff --git a/bin/harper-backup b/bin/harper-backup new file mode 100755 index 0000000..4cbd301 --- /dev/null +++ b/bin/harper-backup @@ -0,0 +1,3 @@ +#!/bin/bash + +rsync -av "$HOME/Library/Application Support/harper-ls/" ~/.config/harper-ls/ diff --git a/bin/harper-restore b/bin/harper-restore new file mode 100755 index 0000000..1322cf8 --- /dev/null +++ b/bin/harper-restore @@ -0,0 +1,3 @@ +#!/bin/bash + +rsync -av ~/.config/harper-ls/ "$HOME/Library/Application Support/harper-ls/" diff --git a/config/harper-ls/dictionary.txt b/config/harper-ls/dictionary.txt new file mode 100644 index 0000000..0112223 --- /dev/null +++ b/config/harper-ls/dictionary.txt @@ -0,0 +1 @@ +Imhoff diff --git a/config/nvim/lua/plugins/harper.lua b/config/nvim/lua/plugins/harper.lua new file mode 100644 index 0000000..9efe1a6 --- /dev/null +++ b/config/nvim/lua/plugins/harper.lua @@ -0,0 +1,38 @@ +-- Harper - Grammar and spell checker +-- https://writewithharper.com/docs/integrations/neovim +return { + "neovim/nvim-lspconfig", + opts = { + servers = { + harper_ls = { + settings = { + ["harper-ls"] = { + userDictPath = "~/.config/harper-ls/dictionary.txt", + fileDictPath = "~/.config/harper-ls/file_dictionaries", + linters = { + SpellCheck = true, + SpelledNumbers = false, + AnA = true, + SentenceCapitalization = true, + UnclosedQuotes = true, + WrongQuotes = false, + LongSentences = true, + RepeatedWords = true, + Spaces = true, + Matcher = true, + CorrectNumberSuffix = true, + }, + codeActions = { + ForceStable = false, + }, + markdown = { + IgnoreLinkTitle = false, + }, + diagnosticSeverity = "hint", + isolateEnglish = false, + }, + }, + }, + }, + }, +} diff --git a/config/nvim/lua/plugins/mason.lua b/config/nvim/lua/plugins/mason.lua index b922dda..1699683 100644 --- a/config/nvim/lua/plugins/mason.lua +++ b/config/nvim/lua/plugins/mason.lua @@ -19,6 +19,7 @@ return { "gofumpt", "goimports", "gomodifytags", + "harper-ls", "html-lsp", "htmlbeautifier", "impl", diff --git a/config/nvim/spell/en.utf-8.add b/config/nvim/spell/en.utf-8.add index 0c7da30..1336f8f 100755 --- a/config/nvim/spell/en.utf-8.add +++ b/config/nvim/spell/en.utf-8.add @@ -96,3 +96,4 @@ scriptable dapp webpage Xcode +Imhoff diff --git a/config/nvim/spell/en.utf-8.add.spl b/config/nvim/spell/en.utf-8.add.spl index 04c977a..7c7c4e3 100755 Binary files a/config/nvim/spell/en.utf-8.add.spl and b/config/nvim/spell/en.utf-8.add.spl differ diff --git a/config/zed/settings.json b/config/zed/settings.json index 55301d6..ee50721 100644 --- a/config/zed/settings.json +++ b/config/zed/settings.json @@ -85,7 +85,6 @@ "basher": true, "catppuccin": true, "catppuccin-icons": true, - "cspell": true, "csv": true, "deno": true, "docker-compose": true, @@ -94,6 +93,7 @@ "fish": true, "git-firefly": true, "graphql": true, + "harper": true, "html": true, "ini": true, "log": true,