Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: v0.1.14 breaks the typos-LSP with exit 101 #39

Closed
chrisgrieser opened this issue Mar 3, 2024 · 3 comments · Fixed by #40
Closed

Bug: v0.1.14 breaks the typos-LSP with exit 101 #39

chrisgrieser opened this issue Mar 3, 2024 · 3 comments · Fixed by #40

Comments

@chrisgrieser
Copy link

Since updating to v0.1.14, I regularly get this error on opening a new file:

Client 8 quit with exit code 101 and signal 0
# (8 being the id of typos-ls)

It does not happen with every opening of a new file, but I'd say 60% of the time? Cannot really reproduce what the condition for this is, unfortunately.

@tekumara
Copy link
Owner

tekumara commented Mar 3, 2024

Ah ... I wonder if its happening on some file types and not others ... could you try running nvim with RUST_LOG=debug and when you see the panic, attach the lsp logs (accessible via :LspLog or usually in ~/.local/state/nvim/lsp.log) ?

@tekumara
Copy link
Owner

tekumara commented Mar 3, 2024

To enable debug logging, try either:

  • starting nvim with RUST_LOG=debug nvim, or
  • in the lsp config set cmd_env = { RUST_LOG = "debug" }

@chrisgrieser
Copy link
Author

chrisgrieser commented Mar 3, 2024

okay, here is what I got with that:

[START][2024-03-03 12:03:50] LSP logging initiated
[ERROR][2024-03-03 12:03:50] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" '2024-03-03T11:03:50.567833Z DEBUG typos_lsp::lsp: initialize: {"processId":1053,"rootPath":"/Users/chrisgrieser/.config/nvim","rootUri":"file:///Users/chrisgrieser/.config/nvim","initializationOptions":{"diagnosticSeverity":"information"},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"resourceOperations":["rename","create","delete"]},"didChangeWatchedFiles":{"dynamicRegistration":false,"relativePatternSupport":true},"symbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceFolders":true,"configuration":true,"semanticTokens":{"refreshSupport":true}},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":false,"preselectSupport":false},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":false},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"documentHighlight":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"implementation":{"linkSupport":true},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]}},"rename":{"dynamicRegistration":false,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":false,"lineFoldingOnly":true},"callHierarchy":{"dynamicRegistration":false},"semanticTokens":{"dynamicRegistration":false,"requests":{"range":false,"full":{"delta":true}},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"overlappingTokenSupport":true,"multilineTokenSupport":false,"serverCancelSupport":false,"augmentsSyntaxTokens":true}},"window":{"workDoneProgress":true,"showMessage":{"messageActionItem":{"additionalPropertiesSupport":false}},"showDocument":{"support":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///Users/chrisgrieser/.config/nvim","name":"/Users/chrisgrieser/.config/nvim"}],"clientInfo":{"name":"Neovim","version":"0.9.5"}}\n2024-03-03T11:03:50.567848Z  WARN typos_lsp::lsp: Client does not support diagnostics data. Code actions will not be available\n2024-03-03T11:03:50.567856Z DEBUG typos_lsp::state: Adding route /Users/chrisgrieser/.config/nvim/*p for path /Users/chrisgrieser/.config/nvim\n2024-03-03T11:03:50.572631Z DEBUG typos_lsp::state: Adding route /*p for path /\n'
[ERROR][2024-03-03 12:03:50] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "2024-03-03T11:03:50.788108Z DEBUG typos_lsp::lsp: did_open: \"{\\\"textDocument\\\":{\\\"uri\\\":\\\"file:///Users/chrisgrieser/.config/nvim/lua/plugins/lsp-config.lua\\\",\\\"languageId\\\":\\\"lua\\\",\\\"version\\\":0,\\\"text\\\":\\\"local u = require(\\\\\\\"config.utils\\\\\\\")\\\\n--------------------------------------------------------------------------------\\\\n\\\\n---since nvim-lspconfig and mason.nvim use different package names\\\\n---mappings from https://github.com/williamboman/mason-lspconfig.nvim/blob/main/lua/mason-lspconfig/mappings/server.lua\\\\n---@type table<string, string>\\\\nlocal lspToMasonMap = {\\\\n\\\\tautotools_ls = \\\\\\\"autotools-language-server\\\\\\\", -- Makefile lsp\\\\n\\\\tbashls = \\\\\\\"bash-language-server\\\\\\\",\\\\n\\\\tbiome = \\\\\\\"biome\\\\\\\", -- ts/js/json linter/formatter\\\\n\\\\tcssls = \\\\\\\"css-lsp\\\\\\\",\\\\n\\\\tefm = \\\\\\\"efm\\\\\\\", -- linter integration, only used for shellcheck in zsh files\\\\n\\\\temmet_language_server = \\\\\\\"emmet-language-server\\\\\\\", -- css/html completions\\\\n\\\\tjsonls = \\\\\\\"json-lsp\\\\\\\",\\\\n\\\\tltex = \\\\\\\"ltex-ls\\\\\\\", -- languagetool (natural language linter)\\\\n\\\\tlua_ls = \\\\\\\"lua-language-server\\\\\\\",\\\\n\\\\tmarksman = \\\\\\\"marksman\\\\\\\", -- markdown lsp\\\\n\\\\tpyright = \\\\\\\"pyright\\\\\\\", -- python lsp\\\\n\\\\truff_lsp = \\\\\\\"ruff-lsp\\\\\\\", -- python linter\\\\n\\\\tstylelint_lsp = \\\\\\\"stylelint-lsp\\\\\\\", -- css linter\\\\n\\\\ttaplo = \\\\\\\"taplo\\\\\\\", -- toml lsp\\\\n\\\\ttypos_lsp = \\\\\\\"typos-lsp\\\\\\\", -- spellchecker for code\\\\n\\\\tvale_ls = \\\\\\\"vale-ls\\\\\\\", -- natural language linter\\\\n\\\\tyamlls = \\\\\\\"yaml-language-server\\\\\\\",\\\\n\\\\ttsserver = \\\\\\\"typescript-language-server\\\\\\\",\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n\\\\n---@class (exact) lspConfiguration see https://github.com/neovim/nvim-lspconfig/blob/master/doc/lspconfig.txt#L46\\\\n---@field autostart? boolean\\\\n---@field capabilities? table <string, string|table|boolean|function>\\\\n---@field cmd? string[]\\\\n---@field filetypes? string[]\\\\n---@field handlers? table <string, function>\\\\n---@field init_options? table <string, string|table|boolean>\\\\n---@field on_attach? function(client, bufnr)\\\\n---@field on_new_config? function(new_config, root_dir)\\\\n---@field root_dir? function(filename, bufnr)\\\\n---@field settings? table <string, table>\\\\n---@field single_file_support? boolean\\\\n---@field cmd_env? table<string, string>\\\\n\\\\n---@type table<string, lspConfiguration>\\\\nlocal serverConfigs = {}\\\\nfor lspName, _ in pairs(lspToMasonMap) do\\\\n\\\\tserverConfigs[lspName] = {}\\\\nend\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- BASH / ZSH\\\\n\\\\n-- DOCS https://github.com/bash-lsp/bash-language-server/blob/main/server/src/config.ts\\\\n\\\\n-- PENDING https://github.com/bash-lsp/bash-language-server/issues/1064\\\\n-- disable shellcheck via LSP to avoid double-diagnostics\\\\nserverConfigs.bashls = {\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tbashIde = { shellcheckPath = \\\\\\\"\\\\\\\" },\\\\n\\\\t},\\\\n}\\\\n\\\\n-- HACK use efm to use shellcheck with zsh files\\\\n-- EFM: Markdown & Shell\\\\nserverConfigs.efm = {\\\\n\\\\tcmd = { \\\\\\\"efm-langserver\\\\\\\", \\\\\\\"-c\\\\\\\", vim.g.linterConfigs .. \\\\\\\"/efm.yaml\\\\\\\" },\\\\n\\\\tfiletypes = { \\\\\\\"sh\\\\\\\", \\\\\\\"markdown\\\\\\\" }, -- limit to filestypes needed\\\\n\\\\ton_attach = function(client)\\\\n\\\\t\\\\t-- Disable in Obsidian vault, as `.markdownlintignore` does not work well with efm\\\\n\\\\t\\\\tif vim.startswith(vim.api.nvim_buf_get_name(0), vim.env.VAULT_PATH) then\\\\n\\\\t\\\\t\\\\tvim.cmd.LspStop(client.id)\\\\n\\\\t\\\\tend\\\\n\\\\tend,\\\\n}\\\\n\\\\nlocal efmDependencies = {\\\\n\\\\t\\\\\\\"shellcheck\\\\\\\", -- PENDING https://github.com/bash-lsp/bash-language-server/issues/663\\\\n\\\\t\\\\\\\"markdownlint\\\\\\\",\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- LUA\\\\n\\\\n-- DOCS https://luals.github.io/wiki/settings/\\\\nserverConfigs.lua_ls = {\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tLua = {\\\\n\\\\t\\\\t\\\\tcompletion = {\\\\n\\\\t\\\\t\\\\t\\\\tcallSnippet = \\\\\\\"Replace\\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\tkeywordSnippet = \\\\\\\"Replace\\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\tshowWord = \\\\\\\"Disable\\\\\\\", -- don't suggest common words as fallback\\\\n\\\\t\\\\t\\\\t\\\\tworkspaceWord = false, -- already done by cmp-buffer\\\\n\\\\t\\\\t\\\\t\\\\tpostfix = \\\\\\\".\\\\\\\", -- useful for `table.insert` and the like\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\tdiagnostics = {\\\\n\\\\t\\\\t\\\\t\\\\tglobals = { \\\\\\\"vim\\\\\\\" }, -- when contributing to nvim plugins missing a `.luarc.json`\\\\n\\\\t\\\\t\\\\t\\\\tdisable = { \\\\\\\"trailing-space\\\\\\\" }, -- formatter already does that\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\thint = { -- inlay hints\\\\n\\\\t\\\\t\\\\t\\\\tenable = true,\\\\n\\\\t\\\\t\\\\t\\\\tsetType = true,\\\\n\\\\t\\\\t\\\\t\\\\tarrayIndex = \\\\\\\"Disable\\\\\\\",\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\t-- FIX https://github.com/sumneko/lua-language-server/issues/679#issuecomment-925524834\\\\n\\\\t\\\\t\\\\tworkspace = { checkThirdParty = \\\\\\\"Disable\\\\\\\" },\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- PYTHON\\\\n\\\\n-- DOCS https://github.com/astral-sh/ruff-lsp#settings\\\\nserverConfigs.ruff_lsp = {\\\\n\\\\tinit_options = {\\\\n\\\\t\\\\tsettings = {\\\\n\\\\t\\\\t\\\\torganizeImports = false, -- when \\\\\\\"I\\\\\\\" ruleset is added, then included in \\\\\\\"fixAll\\\\\\\"\\\\n\\\\t\\\\t\\\\tcodeAction = { disableRuleComment = { enable = false } }, -- using nvim-rulebook instead\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n\\\\ton_attach = function(ruff) ruff.server_capabilities.hoverProvider = false end,\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- CSS\\\\n\\\\n-- DOCS https://github.com/olrtg/emmet-language-server#neovim\\\\nserverConfigs.emmet_language_server = {\\\\n\\\\tfiletypes = { \\\\\\\"html\\\\\\\", \\\\\\\"css\\\\\\\", \\\\\\\"scss\\\\\\\" },\\\\n\\\\tinit_options = {\\\\n\\\\t\\\\tshowSuggestionsAsSnippets = true, -- so it works with luasnip\\\\n\\\\t},\\\\n}\\\\n\\\\n-- DOCS\\\\n-- https://github.com/sublimelsp/LSP-css/blob/master/LSP-css.sublime-settings\\\\n-- https://github.com/microsoft/vscode-css-languageservice/blob/main/src/services/lintRules.ts\\\\nserverConfigs.cssls = {\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tcss = {\\\\n\\\\t\\\\t\\\\tformat = {\\\\n\\\\t\\\\t\\\\t\\\\tenable = true,\\\\n\\\\t\\\\t\\\\t\\\\t-- BUG this config is being ignored. Leaving in case of css-lsp-update\\\\n\\\\t\\\\t\\\\t\\\\t-- preserveNewLines = true,\\\\n\\\\t\\\\t\\\\t\\\\t-- maxPreserveNewLines = 2,\\\\n\\\\t\\\\t\\\\t\\\\t-- spaceAroundSelectorSeparator = true,\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\tlint = {\\\\n\\\\t\\\\t\\\\t\\\\tvendorPrefix = \\\\\\\"ignore\\\\\\\", -- needed for scrollbars\\\\n\\\\t\\\\t\\\\t\\\\tduplicateProperties = \\\\\\\"warning\\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\tzeroUnits = \\\\\\\"warning\\\\\\\",\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n}\\\\n\\\\n-- DOCS https://github.com/bmatcuk/stylelint-lsp#settings\\\\n-- INFO still requires LSP installed via npm (not working with stylelint from mason)\\\\nserverConfigs.stylelint_lsp = {\\\\n\\\\tfiletypes = { \\\\\\\"css\\\\\\\", \\\\\\\"scss\\\\\\\" }, -- don't enable on js/ts, since I don't need it there\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tstylelintplus = { autoFixOnFormat = true },\\\\n\\\\t},\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- JS/TS\\\\n\\\\n-- DOCS https://github.com/typescript-language-server/typescript-language-server/blob/master/docs/configuration.md\\\\nserverConfigs.tsserver = {\\\\n\\\\tsettings = {\\\\n\\\\n\\\\t\\\\t-- \\\\\\\"Cannot redeclare block-scoped variable\\\\\\\" -> not useful for single-file-JXA\\\\n\\\\t\\\\t-- (Biome works only on single-file and so already check for unintended re-declarations.)\\\\n\\\\t\\\\tdiagnostics = { ignoredCodes = { 2451 } },\\\\n\\\\n\\\\t\\\\ttypescript = {\\\\n\\\\t\\\\t\\\\tinlayHints = {\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayEnumMemberValueHints = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayFunctionLikeReturnTypeHints = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayFunctionParameterTypeHints = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayParameterNameHints = \\\\\\\"all\\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayParameterNameHintsWhenArgumentMatchesName = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayPropertyDeclarationTypeHints = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayVariableTypeHints = true,\\\\n\\\\t\\\\t\\\\t\\\\tincludeInlayVariableTypeHintsWhenTypeMatchesName = true,\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\t-- even without formatting still relevant for `organizeImports`\\\\n\\\\t\\\\t\\\\tformat = { convertTabsToSpaces = false },\\\\n\\\\t\\\\t},\\\\n\\\\n\\\\t\\\\t-- enable checking javascript without a `jsconfig.json`\\\\n\\\\t\\\\t-- DOCS https://www.typescriptlang.org/tsconfig\\\\n\\\\t\\\\timplicitProjectConfiguration = { checkJs = true, tar"
[ERROR][2024-03-03 12:03:50] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "get = \\\\\\\"ES2022\\\\\\\" },\\\\n\\\\t},\\\\n\\\\ton_attach = function(client)\\\\n\\\\t\\\\t-- Disable formatting in favor of biome\\\\n\\\\t\\\\tclient.server_capabilities.documentFormattingProvider = false\\\\n\\\\t\\\\tclient.server_capabilities.documentRangeFormattingProvider = false\\\\n\\\\tend,\\\\n}\\\\nserverConfigs.tsserver.settings.javascript = serverConfigs.tsserver.settings.typescript\\\\n\\\\n-- SIC needs to be enabled, can be removed with nvim 0.10 support for dynamic config\\\\nserverConfigs.biome = {\\\\n\\\\ton_attach = function(client)\\\\n\\\\t\\\\tclient.server_capabilities.documentFormattingProvider = true\\\\n\\\\t\\\\tclient.server_capabilities.documentRangeFormattingProvider = true\\\\n\\\\tend,\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n\\\\n-- DOCS https://github.com/Microsoft/vscode/tree/main/extensions/json-language-features/server#configuration\\\\n-- Disable formatting in favor of biome\\\\nserverConfigs.jsonls = {\\\\n\\\\tinit_options = {\\\\n\\\\t\\\\tprovideFormatter = false,\\\\n\\\\t\\\\tdocumentRangeFormattingProvider = false,\\\\n\\\\t},\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n-- LTEX (LanguageTool LSP)\\\\n\\\\n-- since reading external file with the method described in docs does not work\\\\nlocal function getDictWords()\\\\n\\\\tlocal dictfile = vim.g.linterConfigs .. \\\\\\\"/spellfile-vim-ltex.add\\\\\\\"\\\\n\\\\tlocal fileDoesNotExist = vim.loop.fs_stat(dictfile) == nil\\\\n\\\\tif fileDoesNotExist then return {} end\\\\n\\\\tlocal words = {}\\\\n\\\\tfor word in io.lines(dictfile) do\\\\n\\\\t\\\\ttable.insert(words, word)\\\\n\\\\tend\\\\n\\\\treturn words\\\\nend\\\\n\\\\n-- DOCS https://valentjn.github.io/ltex/settings.html\\\\nserverConfigs.ltex = {\\\\n\\\\tfiletypes = { \\\\\\\"markdown\\\\\\\" },\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tltex = {\\\\n\\\\t\\\\t\\\\tlanguage = \\\\\\\"en-US\\\\\\\", -- can also be set per file via markdown yaml header (e.g. `de-DE`)\\\\n\\\\t\\\\t\\\\tdictionary = { [\\\\\\\"en-US\\\\\\\"] = getDictWords() },\\\\n\\\\t\\\\t\\\\tdisabledRules = {\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"en-US\\\\\\\"] = {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"EN_QUOTES\\\\\\\", -- don't expect smart quotes\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"WHITESPACE_RULE\\\\\\\", -- too many false positives\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"PUNCTUATION_PARAGRAPH_END\\\\\\\", -- too many false positives\\\\n\\\\t\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\tdiagnosticSeverity = {\\\\n\\\\t\\\\t\\\\t\\\\tdefault = \\\\\\\"info\\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\tMORFOLOGIK_RULE_EN_US = \\\\\\\"hint\\\\\\\", -- spelling\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\tadditionalRules = {\\\\n\\\\t\\\\t\\\\t\\\\tenablePickyRules = true,\\\\n\\\\t\\\\t\\\\t\\\\tmothersTongue = \\\\\\\"de-DE\\\\\\\",\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\tmarkdown = {\\\\n\\\\t\\\\t\\\\t\\\\tnodes = { Link = \\\\\\\"dummy\\\\\\\" },\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n\\\\ton_attach = function(client, bufnr)\\\\n\\\\t\\\\t-- have `zg` update ltex dictionary file as well as vim's spellfile\\\\n\\\\t\\\\tvim.keymap.set({ \\\\\\\"n\\\\\\\", \\\\\\\"x\\\\\\\" }, \\\\\\\"zg\\\\\\\", function()\\\\n\\\\t\\\\t\\\\tlocal word\\\\n\\\\t\\\\t\\\\tif vim.fn.mode() == \\\\\\\"n\\\\\\\" then\\\\n\\\\t\\\\t\\\\t\\\\tword = vim.fn.expand(\\\\\\\"<cword>\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\tu.normal(\\\\\\\"zg\\\\\\\")\\\\n\\\\t\\\\t\\\\telse\\\\n\\\\t\\\\t\\\\t\\\\tu.normal('zggv\\\\\\\"zy')\\\\n\\\\t\\\\t\\\\t\\\\tword = vim.fn.getreg(\\\\\\\"z\\\\\\\")\\\\n\\\\t\\\\t\\\\tend\\\\n\\\\t\\\\t\\\\tlocal ltexSettings = vim.lsp.get_active_clients({ name = \\\\\\\"ltex\\\\\\\" })[1].config.settings\\\\n\\\\t\\\\t\\\\ttable.insert(ltexSettings.ltex.dictionary[\\\\\\\"en-US\\\\\\\"], word)\\\\n\\\\t\\\\t\\\\tvim.lsp.buf_notify(0, \\\\\\\"workspace/didChangeConfiguration\\\\\\\", { settings = ltexSettings })\\\\n\\\\t\\\\tend, { desc = \\\\\\\"\\u{f04c6} Add Word\\\\\\\", buffer = bufnr })\\\\n\\\\n\\\\t\\\\t-- Disable ltex in Obsidian vault, as there is no `.ltexignore` https://github.com/valentjn/vscode-ltex/issues/576\\\\n\\\\t\\\\tif vim.startswith(vim.api.nvim_buf_get_name(0), vim.env.VAULT_PATH) then\\\\n\\\\t\\\\t\\\\tvim.cmd.LspStop(client.id)\\\\n\\\\t\\\\tend\\\\n\\\\tend,\\\\n}\\\\n\\\\n-- TYPOS\\\\n-- DOCS https://github.com/tekumara/typos-lsp#settings\\\\nserverConfigs.typos_lsp = {\\\\n\\\\tinit_options = { diagnosticSeverity = \\\\\\\"information\\\\\\\" },\\\\n\\\\tcmd_env = { RUST_LOG = \\\\\\\"debug\\\\\\\" }\\\\n}\\\\n\\\\n-- VALE\\\\n-- DOCS https://vale.sh/docs/integrations/guide/#vale-ls\\\\n-- DOCS https://vale.sh/docs/topics/config#search-process\\\\nserverConfigs.vale_ls = {\\\\n\\\\tinit_options = {\\\\n\\\\t\\\\tconfigPath = vim.g.linterConfigs .. \\\\\\\"/vale/vale.ini\\\\\\\",\\\\n\\\\t\\\\tinstallVale = true,\\\\n\\\\t\\\\tsyncOnStartup = false,\\\\n\\\\t},\\\\n\\\\n\\\\t-- just needs any root directory to work, we are providing the config already\\\\n\\\\troot_dir = function() return os.getenv(\\\\\\\"HOME\\\\\\\") end,\\\\n\\\\n\\\\t-- FIX https://github.com/errata-ai/vale-ls/issues/4\\\\n\\\\tcmd_env = { VALE_CONFIG_PATH = vim.g.linterConfigs .. \\\\\\\"/vale/vale.ini\\\\\\\" },\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n\\\\n-- DOCS https://github.com/redhat-developer/yaml-language-server/tree/main#language-server-settings\\\\nserverConfigs.yamlls = {\\\\n\\\\tsettings = {\\\\n\\\\t\\\\tyaml = {\\\\n\\\\t\\\\t\\\\tformat = {\\\\n\\\\t\\\\t\\\\t\\\\tenable = true,\\\\n\\\\t\\\\t\\\\t\\\\tprintWidth = 105,\\\\n\\\\t\\\\t\\\\t\\\\tproseWrap = \\\\\\\"always\\\\\\\",\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n\\\\t-- SIC needs enabling via setting *and* via capabilities to work.\\\\n\\\\t-- Probably fixed with nvim 0.10 supporting dynamic config changes\\\\n\\\\ton_attach = function(client) client.server_capabilities.documentFormattingProvider = true end,\\\\n}\\\\n\\\\n--------------------------------------------------------------------------------\\\\n\\\\nreturn {\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\\\"neovim/nvim-lspconfig\\\\\\\",\\\\n\\\\t\\\\tlazy = false,\\\\n\\\\t\\\\tmason_dependencies = vim.list_extend(efmDependencies, vim.tbl_values(lspToMasonMap)),\\\\n\\\\t\\\\tdependencies = {\\\\n\\\\t\\\\t\\\\t\\\\\\\"folke/neodev.nvim\\\\\\\", -- loading as dependency ensures it's loaded before lua_ls\\\\n\\\\t\\\\t\\\\topts = { library = { plugins = false } }, -- too slow with all my plugins\\\\n\\\\t\\\\t},\\\\n\\\\t\\\\tconfig = function()\\\\n\\\\t\\\\t\\\\trequire(\\\\\\\"lspconfig.ui.windows\\\\\\\").default_options.border = vim.g.borderStyle\\\\n\\\\n\\\\t\\\\t\\\\t-- Enable snippets-completion (nvim-cmp) and folding (nvim-ufo)\\\\n\\\\t\\\\t\\\\tlocal lspCapabilities = vim.lsp.protocol.make_client_capabilities()\\\\n\\\\t\\\\t\\\\tlspCapabilities.textDocument.completion.completionItem.snippetSupport = true\\\\n\\\\t\\\\t\\\\tlspCapabilities.textDocument.foldingRange =\\\\n\\\\t\\\\t\\\\t\\\\t{ dynamicRegistration = false, lineFoldingOnly = true }\\\\n\\\\n\\\\t\\\\t\\\\tfor lsp, serverConfig in pairs(serverConfigs) do\\\\n\\\\t\\\\t\\\\t\\\\tserverConfig.capabilities = lspCapabilities\\\\n\\\\t\\\\t\\\\t\\\\trequire(\\\\\\\"lspconfig\\\\\\\")[lsp].setup(serverConfig)\\\\n\\\\t\\\\t\\\\tend\\\\n\\\\n\\\\n\\\\t\\\\t\\\\tlocal symLinkFrom = vim.env.DATA_DIR .. \\\\\\\"/private dotfiles/codium-api-key.json\\\\\\\"\\\\n\\\\t\\\\t\\\\tlocal symLinkTo = os.getenv(\\\\\\\"HOME\\\\\\\") .. \\\\\\\"/.codeium/config.json\\\\\\\"\\\\n\\\\t\\\\t\\\\tlocal fileExists = vim.loop.fs_stat(symLinkTo) ~= nil\\\\n\\\\t\\\\t\\\\tif not fileExists then\\\\n\\\\t\\\\t\\\\t\\\\tpcall(vim.fn.mkdir, vim.fs.dirname(symLinkTo))\\\\n\\\\t\\\\t\\\\t\\\\tvim.loop.fs_symlink(symLinkFrom, symLinkTo)\\\\n\\\\t\\\\t\\\\tend\\\\n\\\\t\\\\tend,\\\\n\\\\t},\\\\n}\\\\n\\\"}}\"\n2024-03-03T11:03:50.788493Z DEBUG typos_lsp::lsp: check_text: path /Users/chrisgrieser/.config/nvim/lua/plugins/lsp-config.lua\n"
[ERROR][2024-03-03 12:04:01] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "2024-03-03T11:04:01.188224Z DEBUG typos_lsp::lsp: did_open: \"{\\\"textDocument\\\":{\\\"uri\\\":\\\"file:///\\\",\\\"languageId\\\":\\\"TelescopePrompt\\\",\\\"version\\\":0,\\\"text\\\":\\\"\\\\n\\\"}}\"\nthread 'main' panicked at crates/typos-lsp/src/lsp.rs:268:48:\ncalled `Result::unwrap()` on an `Err` value: NotFound\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"
[ERROR][2024-03-03 12:04:06] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" '2024-03-03T11:04:06.275524Z DEBUG typos_lsp::lsp: initialize: {"processId":1053,"rootPath":"/Users/chrisgrieser/.config/nvim","rootUri":"file:///Users/chrisgrieser/.config/nvim","initializationOptions":{"diagnosticSeverity":"information"},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"resourceOperations":["rename","create","delete"]},"didChangeWatchedFiles":{"dynamicRegistration":false,"relativePatternSupport":true},"symbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceFolders":true,"configuration":true,"semanticTokens":{"refreshSupport":true}},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":false,"preselectSupport":false},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":false},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"documentHighlight":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"implementation":{"linkSupport":true},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]}},"rename":{"dynamicRegistration":false,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":false,"lineFoldingOnly":true},"callHierarchy":{"dynamicRegistration":false},"semanticTokens":{"dynamicRegistration":false,"requests":{"range":false,"full":{"delta":true}},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"overlappingTokenSupport":true,"multilineTokenSupport":false,"serverCancelSupport":false,"augmentsSyntaxTokens":true}},"window":{"workDoneProgress":true,"showMessage":{"messageActionItem":{"additionalPropertiesSupport":false}},"showDocument":{"support":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///Users/chrisgrieser/.config/nvim","name":"/Users/chrisgrieser/.config/nvim"}],"clientInfo":{"name":"Neovim","version":"0.9.5"}}\n2024-03-03T11:04:06.275545Z  WARN typos_lsp::lsp: Client does not support diagnostics data. Code actions will not be available\n2024-03-03T11:04:06.275556Z DEBUG typos_lsp::state: Adding route /Users/chrisgrieser/.config/nvim/*p for path /Users/chrisgrieser/.config/nvim\n2024-03-03T11:04:06.282404Z DEBUG typos_lsp::state: Adding route /*p for path /\n'
[ERROR][2024-03-03 12:04:06] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" '2024-03-03T11:04:06.312472Z DEBUG typos_lsp::lsp: did_open: "{\\"textDocument\\":{\\"uri\\":\\"file:///Users/chrisgrieser/.config/nvim/lua/plugins/mason.lua\\",\\"languageId\\":\\"lua\\",\\"version\\":0,\\"text\\":\\"return {\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\\"williamboman/mason.nvim\\\\\\",\\\\n\\\\t\\\\texternal_dependencies = { \\\\\\"node\\\\\\", \\\\\\"python3.12\\\\\\" },\\\\n\\\\t\\\\tkeys = {\\\\n\\\\t\\\\t\\\\t{ \\\\\\"<leader>pm\\\\\\", vim.cmd.Mason, desc = \\\\\\"\\u{f487} Mason\\\\\\" },\\\\n\\\\t\\\\t},\\\\n\\\\t\\\\topts = {\\\\n\\\\t\\\\t\\\\tui = {\\\\n\\\\t\\\\t\\\\t\\\\tborder = vim.g.borderStyle,\\\\n\\\\t\\\\t\\\\t\\\\theight = 0.85,\\\\n\\\\t\\\\t\\\\t\\\\twidth = 0.8,\\\\n\\\\t\\\\t\\\\t\\\\ticons = {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpackage_installed = \\\\\\"�\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpackage_pending = \\\\\\"\\u{f051f}\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpackage_uninstalled = \\\\\\"�\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\t\\\\tkeymaps = { -- consistent with keymaps for lazy.nvim\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tuninstall_package = \\\\\\"x\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttoggle_help = \\\\\\"?\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttoggle_package_expand = \\\\\\"<Tab>\\\\\\",\\\\n\\\\t\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t\\\\t},\\\\n\\\\t\\\\t},\\\\n\\\\t},\\\\n\\\\t{ -- auto-install lsps & formatters\\\\n\\\\t\\\\t\\\\\\"WhoIsSethDaniel/mason-tool-installer.nvim\\\\\\",\\\\n\\\\t\\\\tevent = \\\\\\"VeryLazy\\\\\\",\\\\n\\\\t\\\\tdependencies = \\\\\\"williamboman/mason.nvim\\\\\\",\\\\n\\\\t\\\\tconfig = function()\\\\n\\\\t\\\\t\\\\t-- dependencies of plugins (via lazy.nvim)\\\\n\\\\t\\\\t\\\\tlocal plugins = require(\\\\\\"lazy\\\\\\").plugins()\\\\n\\\\t\\\\t\\\\tlocal deps = vim.tbl_map(function(plugin) return plugin.mason_dependencies end, plugins)\\\\n\\\\t\\\\t\\\\tdeps = vim.tbl_flatten(vim.tbl_values(deps))\\\\n\\\\t\\\\t\\\\ttable.sort(deps)\\\\n\\\\t\\\\t\\\\tdeps = vim.fn.uniq(deps)\\\\n\\\\n\\\\t\\\\t\\\\t-- PENDING https://github.com/tekumara/typos-lsp/issues/39\\\\n\\\\t\\\\t\\\\tfor i = 1, #deps do\\\\n\\\\t\\\\t\\\\t\\\\tif deps[i] == \\\\\\"typos-lsp\\\\\\" then\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t-- deps[i] ={ \\\\\\"typos-lsp\\\\\\", version = \\\\\\"v0.1.13\\\\\\" } \\\\n\\\\t\\\\t\\\\t\\\\tend\\\\n\\\\t\\\\t\\\\tend\\\\n\\\\n\\\\t\\\\t\\\\trequire(\\\\\\"mason-tool-installer\\\\\\").setup {\\\\n\\\\t\\\\t\\\\t\\\\tensure_installed = deps,\\\\n\\\\t\\\\t\\\\t\\\\trun_on_start = false, -- manually, since otherwise not working with lazy-loading\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\tvim.defer_fn(vim.cmd.MasonToolsInstall, 500)\\\\n\\\\t\\\\t\\\\tvim.defer_fn(vim.cmd.MasonToolsClean, 1000) -- delayed, so noice.nvim is loaded before\\\\n\\\\t\\\\tend,\\\\n\\\\t},\\\\n}\\\\n\\"}}"\n2024-03-03T11:04:06.312519Z DEBUG typos_lsp::lsp: check_text: path /Users/chrisgrieser/.config/nvim/lua/plugins/mason.lua\n'
[ERROR][2024-03-03 12:04:08] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "2024-03-03T11:04:08.415498Z DEBUG typos_lsp::lsp: did_open: \"{\\\"textDocument\\\":{\\\"uri\\\":\\\"file:///\\\",\\\"languageId\\\":\\\"TelescopePrompt\\\",\\\"version\\\":0,\\\"text\\\":\\\"\\\\n\\\"}}\"\nthread 'main' panicked at crates/typos-lsp/src/lsp.rs:268:48:\ncalled `Result::unwrap()` on an `Err` value: NotFound\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"
[ERROR][2024-03-03 12:04:09] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" '2024-03-03T11:04:09.747877Z DEBUG typos_lsp::lsp: initialize: {"processId":1053,"rootPath":"/Users/chrisgrieser/.config/zsh","rootUri":"file:///Users/chrisgrieser/.config/zsh","initializationOptions":{"diagnosticSeverity":"information"},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"resourceOperations":["rename","create","delete"]},"didChangeWatchedFiles":{"dynamicRegistration":false,"relativePatternSupport":true},"symbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceFolders":true,"configuration":true,"semanticTokens":{"refreshSupport":true}},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":false,"preselectSupport":false},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":false},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"documentHighlight":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"implementation":{"linkSupport":true},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]}},"rename":{"dynamicRegistration":false,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":false,"lineFoldingOnly":true},"callHierarchy":{"dynamicRegistration":false},"semanticTokens":{"dynamicRegistration":false,"requests":{"range":false,"full":{"delta":true}},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"overlappingTokenSupport":true,"multilineTokenSupport":false,"serverCancelSupport":false,"augmentsSyntaxTokens":true}},"window":{"workDoneProgress":true,"showMessage":{"messageActionItem":{"additionalPropertiesSupport":false}},"showDocument":{"support":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///Users/chrisgrieser/.config/zsh","name":"/Users/chrisgrieser/.config/zsh"}],"clientInfo":{"name":"Neovim","version":"0.9.5"}}\n2024-03-03T11:04:09.747888Z  WARN typos_lsp::lsp: Client does not support diagnostics data. Code actions will not be available\n2024-03-03T11:04:09.747896Z DEBUG typos_lsp::state: Adding route /Users/chrisgrieser/.config/zsh/*p for path /Users/chrisgrieser/.config/zsh\n2024-03-03T11:04:09.753168Z DEBUG typos_lsp::state: Adding route /*p for path /\n'
[ERROR][2024-03-03 12:04:09] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/efm-langserver" "stderr" "2024/03/03 12:04:09 efm-langserver: reading on stdin, writing on stdout\n"
[ERROR][2024-03-03 12:04:09] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "2024-03-03T11:04:09.929353Z DEBUG typos_lsp::lsp: did_open: \"{\\\"textDocument\\\":{\\\"uri\\\":\\\"file:///Users/chrisgrieser/.config/zsh/config/git_github.zsh\\\",\\\"languageId\\\":\\\"sh\\\",\\\"version\\\":0,\\\"text\\\":\\\"alias gs='git status'\\\\nalias co='git checkout'\\\\nalias gd='git diff'\\\\nalias gt='git stash push && git stash show 0'\\\\nalias gT='git stash pop'\\\\nalias gi='gh issue list --state=open'\\\\nalias gI='gh issue list --state=closed'\\\\n\\\\nalias mergetool=\\\\\\\"git mergetool\\\\\\\"\\\\nalias reset='git reset'\\\\nalias push='git push'\\\\nalias pull='git pull --tags'\\\\nalias rebase='git rebase --interactive'\\\\nalias unlock='rm -v \\\\\\\"$(git rev-parse --git-dir)/index.lock\\\\\\\"'\\\\n\\\\nalias pr='gh pr create --web --fill'\\\\nalias rel='make --silent release' # personal convention to have `make release`\\\\n\\\\nfunction grh {\\\\n\\\\tgit reset --hard # undo changes\\\\n\\\\tgit clean -df    # remove untracked files\\\\n}\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n\\\\n# issues numbers & git revs\\\\nZSH_HIGHLIGHT_REGEXP+=('#[0-9]+' 'fg=blue,bold')\\\\nZSH_HIGHLIGHT_REGEXP+=('([0-9a-f]{6,9}|HEAD)((\\\\\\\\^+|~)[0-9]*)?' 'fg=yellow')\\\\n\\\\n# commit messages longer than 50 chars: orange, longer than 72 chars: red\\\\nZSH_HIGHLIGHT_REGEXP+=('^(gc|gC|git commit -m) \\\\\\\".{51,71}' 'fg=208') # 208 = orange\\\\nZSH_HIGHLIGHT_REGEXP+=('^(gc|gC|git commit -m) \\\\\\\".{72,}' 'fg=white,bold,bg=red')\\\\n\\\\n# inline code with backslashes\\\\nZSH_HIGHLIGHT_REGEXP+=($'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`[^`]*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`' 'fg=cyan,bold')\\\\n\\\\n# highlight conventional commits\\\\nZSH_HIGHLIGHT_REGEXP+=(\\\\n\\\\t'(feat|fix|test|perf|build|ci|revert|refactor|chore|docs|break|style|improv)(\\\\\\\\(.+\\\\\\\\))?(\\\\\\\\\\\\\\\\?\\\\\\\\!)?:'\\\\n\\\\t'fg=magenta,bold'\\\\n)\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n# STAGING\\\\nalias gaa='git add --all'\\\\nalias restore='git restore'\\\\nalias unadd='git restore --staged'\\\\n\\\\n# without argument, run interactively via fzf to toggle staged/unstaged\\\\n# with argument, stage the file(s). Modified completions allow for quicker selection.\\\\nfunction ga {\\\\n\\\\tif [[ -n \\\\\\\"$1\\\\\\\" ]]; then\\\\n\\\\t\\\\tgit add \\\\\\\"$@\\\\\\\"\\\\n\\\\t\\\\treturn 0\\\\n\\\\tfi\\\\n\\\\n\\\\tlocal check_staged='if git diff --cached --name-only | grep -q \\\\\\\"^\\\\\\\"{2..}\\\\\\\"$\\\\\\\" ; '\\\\n\\\\tlocal add_or_unadd='then git restore --stage -- {2..} ; else git add -- {2..} ; fi'\\\\n\\\\tlocal file_diff='{ git diff --color=always -- {2..} ; git diff --staged --color=always -- {2..} }'\\\\n\\\\tlocal style\\\\n\\\\tstyle=$(defaults read -g AppleInterfaceStyle &>/dev/null && echo --dark || echo --light)\\\\n\\\\tselection=$(\\\\n\\\\t\\\\tgit -c core.quotePath=false -c status.color=always status --short --untracked-files | fzf \\\\\\\\\\\\n\\\\t\\\\t\\\\t--ansi --nth=2.. --track \\\\\\\\\\\\n\\\\t\\\\t\\\\t--preview=\\\\\\\"$file_diff | delta $style --file-style=omit\\\\\\\" \\\\\\\\\\\\n\\\\t\\\\t\\\\t--bind=\\\\\\\"enter:reload($check_staged $add_or_unadd ; git -c core.quotePath=false -c status.color=always status --short --untracked-files)\\\\\\\"\\\\n\\\\t)\\\\n\\\\treturn 0 # prevent exiting 130\\\\n}\\\\n\\\\n# completions for running `ga` with argument\\\\n_change_git_files() {\\\\n\\\\tlocal -a changed_files=()\\\\n\\\\twhile IFS='' read -r file; do # turn lines into array\\\\n\\\\t\\\\tchanged_files+=(\\\\\\\"$file\\\\\\\")\\\\n\\\\tdone < <(git -c status.relativePaths=true status --porcelain --untracked-files | cut -c4-)\\\\n\\\\n\\\\tlocal expl && _description -V git-changed-files expl 'Changed & Untracked Files'\\\\n\\\\tcompadd \\\\\\\"${expl[@]}\\\\\\\" -- \\\\\\\"${changed_files[@]}\\\\\\\"\\\\n}\\\\ncompdef _change_git_files ga\\\\ncompdef _change_git_files unadd\\\\ncompdef _change_git_files restore\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n# SMART COMMIT\\\\n\\\\nfunction _stageAllIfNoStagedChanges {\\\\n\\\\tgit diff --staged --quiet && git add --all && print \\\\\\\"\\\\\\\\e[1;34mStaged all changes.\\\\\\\\e[0m\\\\\\\"\\\\n}\\\\n\\\\n# - if there are no staged changes, stage all changes (`git add -A`) and then commit\\\\n# - if the is clean after committing, pull-push\\\\nfunction gc {\\\\n\\\\t_stageAllIfNoStagedChanges\\\\n\\\\n\\\\t# without arg, just open in editor\\\\n\\\\tif [[ -z \\\\\\\"$1\\\\\\\" ]]; then\\\\n\\\\t\\\\tgit commit\\\\n\\\\t\\\\treturn\\\\n\\\\tfi\\\\n\\\\n\\\\tprintf \\\\\\\"\\\\\\\\e[1;34mCommit: \\\\\\\\e[0m\\\\\\\" &&\\\\n\\\\t\\\\tgit commit -m \\\\\\\"$@\\\\\\\" || return 1\\\\n\\\\n\\\\tif [[ -n \\\\\\\"$(git status --porcelain)\\\\\\\" ]]; then\\\\n\\\\t\\\\tprint \\\\\\\"\\\\\\\\e[1;34mPush: \\\\\\\\e[0mNot pushing since repo still dirty.\\\\\\\" &&\\\\n\\\\t\\\\t\\\\techo && git status\\\\n\\\\telse\\\\n\\\\t\\\\tprintf \\\\\\\"\\\\\\\\e[1;34mPull: \\\\\\\\e[0m\\\\\\\" &&\\\\n\\\\t\\\\t\\\\tgit pull --no-rebase && # --no-rebase prevents \\\\\\\"Cannot rebase on multiple branches\\\\\\\"\\\\n\\\\t\\\\t\\\\tprintf \\\\\\\"\\\\\\\\e[1;34mPush: \\\\\\\\e[0m\\\\\\\" &&\\\\n\\\\t\\\\t\\\\tgit push\\\\n\\\\tfi\\\\n}\\\\n\\\\nfunction gC {\\\\n\\\\t_stageAllIfNoStagedChanges\\\\n\\\\tprintf \\\\\\\"\\\\\\\\e[1;34mCommit: \\\\\\\\e[0m\\\\\\\" &&\\\\n\\\\t\\\\tgit commit -m \\\\\\\"$@\\\\\\\" || return 1\\\\n}\\\\n\\\\n# completions for them\\\\n_gc() {\\\\n\\\\t[[ $CURRENT -ne 2 ]] && return # only complete first word\\\\n\\\\tlocal cc=(\\\\\\\"fix\\\\\\\" \\\\\\\"feat\\\\\\\" \\\\\\\"chore\\\\\\\" \\\\\\\"docs\\\\\\\" \\\\\\\"style\\\\\\\" \\\\\\\"refactor\\\\\\\" \\\\\\\"perf\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"test\\\\\\\" \\\\\\\"build\\\\\\\" \\\\\\\"ci\\\\\\\" \\\\\\\"revert\\\\\\\" \\\\\\\"improv\\\\\\\" \\\\\\\"break\\\\\\\")\\\\n\\\\tlocal expl && _description -V conventional-commit expl 'Conventional Commit Keyword'\\\\n\\\\tcompadd \\\\\\\"${expl[@]}\\\\\\\" -P'\\\\\\\"' -S':' -- \\\\\\\"${cc[@]}\\\\\\\"\\\\n}\\\\ncompdef _gc gc\\\\ncompdef _gc gC\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n# SMART AMEND & FIXUP\\\\n# select a recent commit to fixup *and* autosquash (not marked for next rebase!)\\\\nfunction gf {\\\\n\\\\tlocal target\\\\n\\\\ttarget=$(_gitlog --no-graph -n 15 | fzf --ansi --no-sort --no-info | cut -d\\\\\\\" \\\\\\\" -f1)\\\\n\\\\t[[ -z \\\\\\\"$target\\\\\\\" ]] && return 0\\\\n\\\\n\\\\t_stageAllIfNoStagedChanges\\\\n\\\\tgit commit --fixup=\\\\\\\"$target\\\\\\\"\\\\n\\\\n\\\\t# HACK \\\\\\\":\\\\\\\" is no-op-editor https://www.reddit.com/r/git/comments/uzh2no/what_is_the_utility_of_noninteractive_rebase/\\\\n\\\\tgit -c sequence.editor=: rebase --interactive --autosquash \\\\\\\"$target^\\\\\\\" || return 0\\\\n\\\\n\\\\t_separator && _gitlog \\\\\\\"$target\\\\\\\"~2.. # confirm result\\\\n}\\\\n\\\\n# amend-no-edit\\\\nfunction gm {\\\\n\\\\t_stageAllIfNoStagedChanges\\\\n\\\\tgit commit --amend --no-edit\\\\n\\\\techo\\\\n\\\\tgit status\\\\n}\\\\n\\\\n# amend message only\\\\nfunction gM {\\\\n\\\\tif ! git diff --staged --quiet; then\\\\n\\\\t\\\\tprint \\\\\\\"\\\\\\\\e[1;33mStaged changes found.\\\\\\\\e[0m\\\\\\\"\\\\n\\\\t\\\\treturn 1\\\\n\\\\tfi\\\\n\\\\tgit commit --amend --no-verify\\\\n\\\\tgit status\\\\n}\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n\\\\n# undo shallow clones\\\\nfunction unshallow {\\\\n\\\\tgit fetch --unshallow\\\\n\\\\tgit pull --tags # undo --no-tags\\\\n\\\\t# undo `--single-branch` https://stackoverflow.com/a/17937889/22114136\\\\n\\\\tgit config remote.origin.fetch \\\\\\\"+refs/heads/*:refs/remotes/origin/*\\\\\\\"\\\\n\\\\tgit fetch origin\\\\n}\\\\n\\\\nfunction remote_info {\\\\n\\\\tgit branch --all --verbose --verbose # 2x verbose shows tracked remote branches\\\\n\\\\techo\\\\n\\\\tgit remote --verbose\\\\n\\\\tprintf \\\\\\\"\\\\\\\\e[1;34mgh default repo:\\\\\\\\e[0m \\\\\\\" && gh repo set-default --view\\\\n}\\\\n\\\\n# Github Url: open & copy url\\\\nfunction gu {\\\\n\\\\turl=$(git remote -v | head -n1 | cut -f2 | cut -d' ' -f1 |\\\\n\\\\t\\\\tsed -e 's/:/\\\\\\\\//' -e 's/git@/https:\\\\\\\\/\\\\\\\\//' -e 's/\\\\\\\\.git//')\\\\n\\\\techo \\\\\\\"$url\\\\\\\" | pbcopy\\\\n\\\\topen \\\\\\\"$url\\\\\\\"\\\\n}\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â"
[ERROR][2024-03-03 12:04:09] .../vim/lsp/rpc.lua:734 "rpc" "/Users/chrisgrieser/.local/share/nvim/mason/bin/typos-lsp" "stderr" "��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n# GIT LOG\\\\n# uses `_gitlog` from magic-dashboard.zsh\\\\n\\\\nfunction gl {\\\\n\\\\tif [[ -z \\\\\\\"$1\\\\\\\" ]]; then\\\\n\\\\t\\\\t_gitlog --max-count=15\\\\n\\\\telif [[ \\\\\\\"$1\\\\\\\" =~ ^[0-9]+$ ]]; then\\\\n\\\\t\\\\t_gitlog --max-count=\\\\\\\"$1\\\\\\\"\\\\n\\\\telse\\\\n\\\\t\\\\t_gitlog \\\\\\\"$@\\\\\\\"\\\\n\\\\tfi\\\\n}\\\\n\\\\n# interactive\\\\nfunction gli {\\\\n\\\\tif [[ ! -x \\\\\\\"$(command -v fzf)\\\\\\\" ]]; then print \\\\\\\"\\\\\\\\e[1;33mfzf not installed.\\\\\\\\e[0m\\\\\\\" && return 1; fi\\\\n\\\\tif [[ ! -x \\\\\\\"$(command -v delta)\\\\\\\" ]]; then print \\\\\\\"\\\\\\\\e[1;33mdelta not installed (\\\\\\\\`brew install git-delta\\\\\\\\`)\\\\\\\\e[0m\\\\\\\" && return 1; fi\\\\n\\\\n\\\\tlocal hash key_pressed selected style\\\\n\\\\tlocal preview_format=\\\\\\\"%C(yellow)%h %C(red)%D %n%C(blue)%an %C(green)(%ch)%C(reset) %n%n%C(bold)%C(magenta)%s %C(cyan)%n%b%C(reset)\\\\\\\"\\\\n\\\\tstyle=$(defaults read -g AppleInterfaceStyle &>/dev/null && echo --dark || echo --light)\\\\n\\\\n\\\\tselected=$(\\\\n\\\\t\\\\t_gitlog --no-graph --color=always |\\\\n\\\\t\\\\t\\\\tfzf --ansi --no-sort --track \\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t--header-first --header=\\\\\\\"â�µ : Checkout    ^H: Copy Hash    ^R: Rebase\\\\\\\" \\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t--expect=\\\\\\\"ctrl-h,ctrl-r\\\\\\\" --with-nth=2.. --preview-window=55% \\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t--preview=\\\\\\\"git show {1} --stat=,30,30 --color=always --format='$preview_format' | sed '\\\\\\\\$d' ; git diff {1}^! | delta $style --hunk-header-decoration-style='blue ol' --file-style=omit\\\\\\\" \\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t--height=\\\\\\\"100%\\\\\\\" #required for wezterm's pane:is_alt_screen_active()\\\\n\\\\t)\\\\n\\\\t[[ -z \\\\\\\"$selected\\\\\\\" ]] && return 0 # abort\\\\n\\\\n\\\\tkey_pressed=$(echo \\\\\\\"$selected\\\\\\\" | head -n1)\\\\n\\\\thash=$(echo \\\\\\\"$selected\\\\\\\" | sed '1d' | cut -d' ' -f1)\\\\n\\\\n\\\\tif [[ \\\\\\\"$key_pressed\\\\\\\" == \\\\\\\"ctrl-h\\\\\\\" ]]; then\\\\n\\\\t\\\\techo -n \\\\\\\"$hash\\\\\\\" | pbcopy\\\\n\\\\t\\\\tprint \\\\\\\"\\\\\\\\e[1;33m$hash\\\\\\\\e[0m copied.\\\\\\\"\\\\n\\\\telif [[ \\\\\\\"$key_pressed\\\\\\\" == \\\\\\\"ctrl-r\\\\\\\" ]]; then\\\\n\\\\t\\\\tgit rebase -i \\\\\\\"$hash^\\\\\\\"\\\\n\\\\t\\\\t_separator && _gitlog \\\\\\\"$hash^..HEAD\\\\\\\" # confirm result\\\\n\\\\telse\\\\n\\\\t\\\\tgit checkout \\\\\\\"$hash\\\\\\\"\\\\n\\\\tfi\\\\n}\\\\n\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n\\\\nfunction clone {\\\\n\\\\turl=\\\\\\\"$1\\\\\\\"\\\\n\\\\t# turn http into SSH remotes\\\\n\\\\t[[ \\\\\\\"$url\\\\\\\" =~ http ]] && url=\\\\\\\"$(echo \\\\\\\"$1\\\\\\\" | sed -E 's/https?:\\\\\\\\/\\\\\\\\/github.com\\\\\\\\//[email protected]:/').git\\\\\\\"\\\\n\\\\n\\\\t# WARN depth < 2 ensures that amending a shallow commit does not result in a\\\\n\\\\t# new commit without parent, effectively destroying git history (!!)\\\\n\\\\tgit clone --depth=10 \\\\\\\"$url\\\\\\\" --no-single-branch --no-tags # get branches, but not tags\\\\n\\\\n\\\\tcd \\\\\\\"$(command ls -1 -t | head -n1)\\\\\\\" || return 1\\\\n}\\\\n\\\\nfunction delete_forks_with_no_open_prs {\\\\n\\\\tif [[ ! -x \\\\\\\"$(command -v fzf)\\\\\\\" ]]; then print \\\\\\\"\\\\\\\\e[1;33mfzf not installed.\\\\\\\\e[0m\\\\\\\" && return 1; fi\\\\n\\\\tif [[ ! -x \\\\\\\"$(command -v gh)\\\\\\\" ]]; then print \\\\\\\"\\\\\\\\e[1;33mgh not installed.\\\\\\\\e[0m\\\\\\\" && return 1; fi\\\\n\\\\n\\\\tlocal my_prs my_forks\\\\n\\\\tmy_prs=$(gh search prs --author=\\\\\\\"@me\\\\\\\" --state=open --json=\\\\\\\"repository\\\\\\\" --jq=\\\\\\\".[].repository.name\\\\\\\")\\\\n\\\\tmy_forks=$(gh repo list --fork | cut -f1)\\\\n\\\\twhile read -r pr; do\\\\n\\\\t\\\\tmy_forks=$(echo \\\\\\\"$my_forks\\\\\\\" | grep -v \\\\\\\"$pr\\\\\\\")\\\\n\\\\tdone <<<\\\\\\\"$my_prs\\\\\\\"\\\\n\\\\n\\\\tforks_with_no_prs=\\\\\\\"$my_forks\\\\\\\"\\\\n\\\\t[[ -z \\\\\\\"$forks_with_no_prs\\\\\\\" ]] && print \\\\\\\"\\\\\\\\e[1;33mNo forks to delete.\\\\\\\\e[0m\\\\\\\" && return 0\\\\n\\\\t# shellcheck disable=2001\\\\n\\\\tprint -z \\\\\\\"$(echo \\\\\\\"$forks_with_no_prs\\\\\\\" | sed 's/^/gh repo delete /')\\\\\\\"\\\\n}\\\\n#â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��\\\\n\\\\n# pickaxe entire repo history\\\\nfunction pickaxe {\\\\n\\\\t[[ -z $1 ]] && print \\\\\\\"\\\\\\\\e[1;33mNo search query provided.\\\\\\\\e[0m\\\\\\\" && return 1\\\\n\\\\techo \\\\\\\"Reminder: Mostly, these are deletion commits. Thus, the checkout target should usually be the parent commit:\\\\\\\"\\\\n\\\\tprint \\\\\\\"\\\\\\\\e[1;36mgit checkout {hash}^\\\\\\\\e[0m\\\\\\\"\\\\n\\\\techo\\\\n\\\\n\\\\t_gitlog -G\\\\\\\"$1\\\\\\\" --regexp-ignore-case --follow\\\\n}\\\\n\\\\n# search for [g]it [d]eleted [f]ile\\\\nfunction gdf {\\\\n\\\\t# GUARD\\\\n\\\\tif ! command -v fzf &>/dev/null; then echo \\\\\\\"fzf not installed.\\\\\\\" && return 1; fi\\\\n\\\\tif ! command -v bat &>/dev/null; then echo \\\\\\\"bat not installed.\\\\\\\" && return 1; fi\\\\n\\\\t[[ -z $1 ]] && print \\\\\\\"\\\\\\\\e[1;33mNo search query provided.\\\\\\\\e[0m\\\\\\\" && return 1\\\\n\\\\tbuiltin cd -q \\\\\\\"$(git rev-parse --show-toplevel)\\\\\\\" || return 1\\\\n\\\\n\\\\tlocal deleted_path deletion_commit last_commit\\\\n\\\\tdeleted_path=$(git log --diff-filter=D --name-only --format=\\\\\\\"\\\\\\\" | grep -i \\\\\\\"$*\\\\\\\")\\\\n\\\\n\\\\tif [[ -z \\\\\\\"$deleted_path\\\\\\\" ]]; then\\\\n\\\\t\\\\tprint \\\\\\\"\\\\\\\\e[1;31m No deleted file found with \\\\\\\\e[1;33m$*\\\\\\\\\\\\\\\\e[0m\\\\\\\"\\\\n\\\\t\\\\treturn 1\\\\n\\\\telif [[ $(echo \\\\\\\"$deleted_path\\\\\\\" | wc -l) -gt 1 ]]; then\\\\n\\\\t\\\\tprint \\\\\\\"\\\\\\\\e[1;34m Multiple files found.\\\\\\\\e[0m\\\\\\\"\\\\n\\\\t\\\\tselection=$(echo \\\\\\\"$deleted_path\\\\\\\" | fzf --height=60%)\\\\n\\\\t\\\\t[[ -z \\\\\\\"$selection\\\\\\\" ]] && return 0\\\\n\\\\t\\\\tdeleted_path=\\\\\\\"$selection\\\\\\\"\\\\n\\\\tfi\\\\n\\\\n\\\\t# alternative method: `git rev-list --max-count=1 HEAD -- \\\\\\\"path/to/file\\\\\\\"`\\\\n\\\\tdeletion_commit=$(git log --format='%h' --max-count=1 -- \\\\\\\"$deleted_path\\\\\\\")\\\\n\\\\tlast_commit=$(git rev-parse --short \\\\\\\"$deletion_commit^\\\\\\\")\\\\n\\\\tprint \\\\\\\"\\\\\\\\e[1;33m$last_commit\\\\\\\\e[0m $deleted_path\\\\\\\"\\\\n\\\\techo\\\\n\\\\n\\\\t# decision on how to act on file\\\\n\\\\tchoices=\\\\\\\"restore file\\\\ncopy to clipboard\\\\nshow file (bat)\\\\ncheckout commit\\\\\\\"\\\\n\\\\tdecision=$(echo \\\\\\\"$choices\\\\\\\" |\\\\n\\\\t\\\\tfzf --bind=\\\\\\\"j:down,k:up\\\\\\\" --no-sort --no-info --height=\\\\\\\"6\\\\\\\" \\\\\\\\\\\\n\\\\t\\\\t\\\\t--layout=reverse-list --header=\\\\\\\"j:â��  k:â��\\\\\\\")\\\\n\\\\n\\\\tif [[ -z \\\\\\\"$decision\\\\\\\" ]]; then\\\\n\\\\t\\\\techo \\\\\\\"Aborted.\\\\\\\"\\\\n\\\\telif [[ \\\\\\\"$decision\\\\\\\" =~ checkout ]]; then\\\\n\\\\t\\\\tgit checkout \\\\\\\"$last_commit\\\\\\\"\\\\n\\\\telif [[ \\\\\\\"$decision\\\\\\\" =~ restore ]]; then\\\\n\\\\t\\\\tgit checkout \\\\\\\"$last_commit\\\\\\\" -- \\\\\\\"$deleted_path\\\\\\\"\\\\n\\\\t\\\\techo \\\\\\\"File restored.\\\\\\\"\\\\n\\\\t\\\\topen -R \\\\\\\"$deleted_path\\\\\\\" # reveal in macOS Finder\\\\n\\\\telif [[ \\\\\\\"$decision\\\\\\\" =~ copy ]]; then\\\\n\\\\t\\\\tgit show \\\\\\\"$last_commit:$deleted_path\\\\\\\" | pbcopy\\\\n\\\\t\\\\techo \\\\\\\"Content copied.\\\\\\\"\\\\n\\\\telif [[ \\\\\\\"$decision\\\\\\\" =~ show ]]; then\\\\n\\\\t\\\\text=${deleted_path##*.}\\\\n\\\\t\\\\tgit show \\\\\\\"$last_commit:$deleted_path\\\\\\\" | bat --language=\\\\\\\"$ext\\\\\\\" ||\\\\n\\\\t\\\\t\\\\tgit show \\\\\\\"$last_commit:$deleted_path\\\\\\\" | bat # unknown extension\\\\n\\\\tfi\\\\n}\\\\n\\\"}}\"\n2024-03-03T11:04:09.934448Z DEBUG typos_lsp::lsp: check_text: path /Users/chrisgrieser/.config/zsh/config/git_github.zsh\n"

tekumara pushed a commit that referenced this issue Mar 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.15](v0.1.14...v0.1.15)
(2024-03-03)


### Bug Fixes

* use default policy for empty file uri
([34998d4](34998d4)),
closes [#39](#39)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: potatobot-prime[bot] <132267321+potatobot-prime[bot]@users.noreply.github.com>
This was referenced Mar 26, 2024
This was referenced Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants